2 * $Id: edef.h 900 2008-01-05 01:13:26Z hubert@u.washington.edu $
4 * ========================================================================
5 * Copyright 2006 University of Washington
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * ========================================================================
15 * Program: Global definitions and initializations
18 /* EDEF: Global variable definitions for
21 written by Dave G. Conroy
22 modified by Steve Wilhite, George Jones
23 greatly modified by Daniel Lawrence
33 /* initialized global definitions */
34 PCOLORS
*Pcolors
= NULL
; /* colors for Pico */
35 int direction
= 0; /* direction of writing */
36 int fillcol
= 72; /* Current fill column */
37 int userfillcol
= -1; /* Fillcol set from cmd line */
38 UCS pat
[NPAT
]; /* Search pattern */
39 UCS rpat
[NPAT
]; /* Replace pattern */
40 int sgarbk
= TRUE
; /* TRUE if keyhelp garbaged */
41 int sup_keyhelp
= FALSE
; /* TRUE if keyhelp is suppressed*/
42 int mline_open
= FALSE
; /* TRUE if message line is open */
43 int ComposerTopLine
= 2; /* TRUE if message line is open */
44 int ComposerEditing
= FALSE
; /* TRUE if editing the headers */
45 char modecode
[] = "WCSEVO"; /* letters to represent modes */
46 long gmode
= MDWRAP
|MDREPLACE
; /* global editor mode */
47 int sgarbf
= TRUE
; /* TRUE if screen is garbage */
48 int mpresf
= FALSE
; /* TRUE if message in last line */
49 int clexec
= FALSE
; /* command line execution flag */
50 char *alt_speller
= NULL
; /* alt spell checking command */
51 int preserve_start_stop
= FALSE
; /* TRUE if pass ^S/^Q to term */
52 UCS
*glo_quote_str
= NULL
; /* points to quote string if set*/
53 char *glo_quote_str_orig
= NULL
;
54 int use_system_translation
= FALSE
;
55 char *display_character_set
= NULL
;
56 char *keyboard_character_set
= NULL
;
57 UCS
*glo_wordseps
= NULL
; /* points to word separators if set */
58 char *glo_wordseps_orig
= NULL
;
60 char **dictionary
= NULL
; /* speller dictionary */
61 int chosen_dict
= -1; /* the dictionary chosen */
64 /* uninitialized global definitions */
65 int currow
; /* Cursor row */
66 int curcol
; /* Cursor column */
67 int thisflag
; /* Flags, this command */
68 int lastflag
; /* Flags, last command */
69 int curgoal
; /* Goal for C-P, C-N */
70 char opertree
[NLINE
+1]; /* operate within this tree */
71 char browse_dir
[NLINE
+1]; /* directory of last browse (cwd) */
72 WINDOW
*curwp
; /* Current window */
73 BUFFER
*curbp
; /* Current buffer */
74 WINDOW
*wheadp
; /* Head of list of windows */
75 BUFFER
*bheadp
; /* Head of list of buffers */
76 BUFFER
*blistp
; /* Buffer for C-X C-B */
78 BUFFER
*bfind(char *, int, int); /* Lookup a buffer by name */
79 LINE
*lalloc(int used
); /* Allocate a line */
80 int km_popped
; /* menu popped up */
81 #if defined(HAS_TERMCAP) || defined(HAS_TERMINFO) || defined(VMS)
82 KBESC_T
*kbesc
; /* keyboard esc sequence trie */
83 #endif /* HAS_TERMCAP/HAS_TERMINFO/VMS */
84 void *input_cs
; /* passed to mbtow() via kbseq() */
88 /* for all the other .C files */
90 /* initialized global external declarations */
92 extern PCOLORS
*Pcolors
; /* colors for Pico */
94 extern int fillcol
; /* Fill column */
95 extern int userfillcol
; /* Fillcol set from cmd line */
96 extern UCS pat
[]; /* Search pattern */
97 extern UCS rpat
[]; /* Replace pattern */
99 extern int sup_keyhelp
;
100 extern int mline_open
; /* Message line is open */
101 extern int ComposerTopLine
; /* TRUE if message line is open */
102 extern int ComposerEditing
; /* TRUE if message line is open */
103 extern char modecode
[]; /* letters to represent modes */
104 extern KEYTAB keytab
[]; /* key bind to functions table */
105 extern KEYTAB pkeytab
[]; /* pico's function table */
106 extern long gmode
; /* global editor mode */
107 extern int sgarbf
; /* State of screen unknown */
108 extern int mpresf
; /* Stuff in message line */
109 extern int clexec
; /* command line execution flag */
110 extern char *alt_speller
; /* alt spell checking command */
111 extern int preserve_start_stop
; /* TRUE if pass ^S/^Q to term */
112 extern UCS
*glo_quote_str
; /* points to quote string if set*/
113 extern char *glo_quote_str_orig
;
114 extern int use_system_translation
;
115 extern char *display_character_set
;
116 extern char *keyboard_character_set
;
117 extern UCS
*glo_wordseps
;
118 extern char *glo_wordseps_orig
;
120 extern char **dictionary
;
121 extern int chosen_dict
;
122 #endif /* _WINDOWS */
123 /* initialized global external declarations */
124 extern int currow
; /* Cursor row */
125 extern int curcol
; /* Cursor column */
126 extern int thisflag
; /* Flags, this command */
127 extern int lastflag
; /* Flags, last command */
128 extern int curgoal
; /* Goal for C-P, C-N */
129 extern char opertree
[NLINE
+1]; /* operate within this tree */
130 extern char browse_dir
[NLINE
+1]; /* directory of last browse (cwd) */
131 extern WINDOW
*curwp
; /* Current window */
132 extern BUFFER
*curbp
; /* Current buffer */
133 extern WINDOW
*wheadp
; /* Head of list of windows */
134 extern BUFFER
*bheadp
; /* Head of list of buffers */
135 extern BUFFER
*blistp
; /* Buffer for C-X C-B */
137 extern BUFFER
*bfind(char *, int, int); /* Lookup a buffer by name */
138 extern LINE
*lalloc(int used
); /* Allocate a line */
139 extern int km_popped
; /* menu popped up */
141 * This is a weird one. It has to be defined differently for pico and for
142 * pine. It seems to need to be defined at startup as opposed to set later.
143 * It doesn't work to set it later in pico. When pico is used with a
144 * screen reader it seems to jump to the cursor every time through the
145 * mswin_charavail() loop in GetKey, and the timeout is this long. So we
146 * just need to set it higher than we do in pine. If we understood this
147 * we would probably see that we don't need any timer at all in pico, but
148 * we don't remember why it is here so we'd better leave it.
150 * This is defined in .../pico/main.c and in .../alpine/alpine.c.
152 extern int my_timer_period
; /* here so can be set */
154 extern MENUITEM menuitems
[]; /* key labels and functions */
155 extern MENUITEM
*mfunc
; /* single generic function */
156 extern mousehandler_t mtrack
; /* func used to track the mouse */
159 #if defined(HAS_TERMCAP) || defined(HAS_TERMINFO) || defined(VMS)
160 extern KBESC_T
*kbesc
; /* keyboard esc sequence trie */
161 #endif /* HAS_TERMCAP/HAS_TERMINFO/VMS */
162 extern void *input_cs
; /* passed to mbtow() via kbseq() */
166 /* terminal table defined only in TERM.C */
169 #if defined(VMS) && !defined(__ALPHA)
174 TERM term
; /* Terminal information. */