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 */
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 /* uninitialized global definitions */
61 int currow
; /* Cursor row */
62 int curcol
; /* Cursor column */
63 int thisflag
; /* Flags, this command */
64 int lastflag
; /* Flags, last command */
65 int curgoal
; /* Goal for C-P, C-N */
66 char opertree
[NLINE
+1]; /* operate within this tree */
67 char browse_dir
[NLINE
+1]; /* directory of last browse (cwd) */
68 WINDOW
*curwp
; /* Current window */
69 BUFFER
*curbp
; /* Current buffer */
70 WINDOW
*wheadp
; /* Head of list of windows */
71 BUFFER
*bheadp
; /* Head of list of buffers */
72 BUFFER
*blistp
; /* Buffer for C-X C-B */
74 BUFFER
*bfind(char *, int, int); /* Lookup a buffer by name */
75 LINE
*lalloc(int used
); /* Allocate a line */
76 int km_popped
; /* menu popped up */
77 #if defined(HAS_TERMCAP) || defined(HAS_TERMINFO) || defined(VMS)
78 KBESC_T
*kbesc
; /* keyboard esc sequence trie */
79 #endif /* HAS_TERMCAP/HAS_TERMINFO/VMS */
80 void *input_cs
; /* passed to mbtow() via kbseq() */
84 /* for all the other .C files */
86 /* initialized global external declarations */
89 extern int fillcol
; /* Fill column */
90 extern int userfillcol
; /* Fillcol set from cmd line */
91 extern UCS pat
[]; /* Search pattern */
92 extern UCS rpat
[]; /* Replace pattern */
94 extern int sup_keyhelp
;
95 extern int mline_open
; /* Message line is open */
96 extern int ComposerTopLine
; /* TRUE if message line is open */
97 extern int ComposerEditing
; /* TRUE if message line is open */
98 extern char modecode
[]; /* letters to represent modes */
99 extern KEYTAB keytab
[]; /* key bind to functions table */
100 extern KEYTAB pkeytab
[]; /* pico's function table */
101 extern long gmode
; /* global editor mode */
102 extern int sgarbf
; /* State of screen unknown */
103 extern int mpresf
; /* Stuff in message line */
104 extern int clexec
; /* command line execution flag */
105 extern char *alt_speller
; /* alt spell checking command */
106 extern int preserve_start_stop
; /* TRUE if pass ^S/^Q to term */
107 extern UCS
*glo_quote_str
; /* points to quote string if set*/
108 extern char *glo_quote_str_orig
;
109 extern int use_system_translation
;
110 extern char *display_character_set
;
111 extern char *keyboard_character_set
;
112 extern UCS
*glo_wordseps
;
113 extern char *glo_wordseps_orig
;
114 /* initialized global external declarations */
115 extern int currow
; /* Cursor row */
116 extern int curcol
; /* Cursor column */
117 extern int thisflag
; /* Flags, this command */
118 extern int lastflag
; /* Flags, last command */
119 extern int curgoal
; /* Goal for C-P, C-N */
120 extern char opertree
[NLINE
+1]; /* operate within this tree */
121 extern char browse_dir
[NLINE
+1]; /* directory of last browse (cwd) */
122 extern WINDOW
*curwp
; /* Current window */
123 extern BUFFER
*curbp
; /* Current buffer */
124 extern WINDOW
*wheadp
; /* Head of list of windows */
125 extern BUFFER
*bheadp
; /* Head of list of buffers */
126 extern BUFFER
*blistp
; /* Buffer for C-X C-B */
128 extern BUFFER
*bfind(char *, int, int); /* Lookup a buffer by name */
129 extern LINE
*lalloc(int used
); /* Allocate a line */
130 extern int km_popped
; /* menu popped up */
132 * This is a weird one. It has to be defined differently for pico and for
133 * pine. It seems to need to be defined at startup as opposed to set later.
134 * It doesn't work to set it later in pico. When pico is used with a
135 * screen reader it seems to jump to the cursor every time through the
136 * mswin_charavail() loop in GetKey, and the timeout is this long. So we
137 * just need to set it higher than we do in pine. If we understood this
138 * we would probably see that we don't need any timer at all in pico, but
139 * we don't remember why it is here so we'd better leave it.
141 * This is defined in .../pico/main.c and in .../alpine/alpine.c.
143 extern int my_timer_period
; /* here so can be set */
145 extern MENUITEM menuitems
[]; /* key labels and functions */
146 extern MENUITEM
*mfunc
; /* single generic function */
147 extern mousehandler_t mtrack
; /* func used to track the mouse */
150 #if defined(HAS_TERMCAP) || defined(HAS_TERMINFO) || defined(VMS)
151 extern KBESC_T
*kbesc
; /* keyboard esc sequence trie */
152 #endif /* HAS_TERMCAP/HAS_TERMINFO/VMS */
153 extern void *input_cs
; /* passed to mbtow() via kbseq() */
157 /* terminal table defined only in TERM.C */
160 #if defined(VMS) && !defined(__ALPHA)
165 TERM term
; /* Terminal information. */