1 /* EDEF: Global variable definitions for 2 MicroEMACS 3.9 3 4 written by Daniel Lawrence 5 based on code by Dave G. Conroy, 6 Steve Wilhite and George Jones 7 */ 8 9 #ifdef maindef 10 11 /* for MAIN.C */ 12 13 /* initialized global definitions */ 14 15 NOSHARE int DNEAR fillcol = 72; /* Current fill column */ 16 NOSHARE short kbdm[NKBDM]; /* Macro */ 17 NOSHARE char *execstr = NULL; /* pointer to string to execute */ 18 NOSHARE char golabel[NPAT] = ""; /* current line to go to */ 19 NOSHARE char paralead[NPAT] = " \t"; /* paragraph leadin chars */ 20 NOSHARE char fmtlead[NPAT] = ""; /* format command leadin chars */ 21 NOSHARE char mainbuf[] = "main"; /* name of main buffer */ 22 NOSHARE char lterm[NSTRING]; /* line terminators on file write */ 23 NOSHARE unsigned char wordlist[256]; /* characters considered "in words" */ 24 NOSHARE int DNEAR wlflag = FALSE; /* word list enabled flag */ 25 NOSHARE int DNEAR clearflag = TRUE; /* clear screen on screen change? */ 26 NOSHARE int DNEAR execlevel = 0; /* execution IF level */ 27 NOSHARE int DNEAR eolexist = TRUE; /* does clear to EOL exist? */ 28 NOSHARE int DNEAR revexist = FALSE; /* does reverse video exist? */ 29 NOSHARE int DNEAR exec_error = FALSE; /* macro execution error pending? */ 30 NOSHARE int DNEAR flickcode = TRUE; /* do flicker supression? */ 31 NOSHARE int DNEAR mouse_move = 1; /* user allow tracking mouse moves? */ 32 NOSHARE int DNEAR mmove_flag = TRUE; /* code currently allowing mmoves? */ 33 NOSHARE int DNEAR newscreenflag = FALSE;/* Create new screen on reads? */ 34 NOSHARE int DNEAR overlap = 2; /* overlap when paging screens */ 35 CONST char *modename[] = { /* name of modes */ 36 "WRAP", "CMODE", "SPELL", "EXACT", "VIEW", "OVER", 37 "MAGIC", "CRYPT", "ASAVE", "REP", "ABBREV"}; 38 CONST char modecode[] = "WCSEVOMYARB"; /* letters to represent modes */ 39 NOSHARE int DNEAR numfunc = NFUNCS; /* number of bindable functions */ 40 NOSHARE int DNEAR gmode = 0; /* global editor mode */ 41 NOSHARE int DNEAR gflags = GFREAD; /* global control flag */ 42 NOSHARE int DNEAR gfcolor = 7; /* global forgrnd color (white) */ 43 NOSHARE int DNEAR gbcolor = 0; /* global backgrnd color (black)*/ 44 NOSHARE int DNEAR deskcolor = 0; /* desktop background color */ 45 NOSHARE int DNEAR gasave = 256; /* global ASAVE size */ 46 NOSHARE int DNEAR gacount = 256; /* count until next ASAVE */ 47 NOSHARE int DNEAR sgarbf = TRUE; /* TRUE if screen is garbage */ 48 NOSHARE int DNEAR mpresf = FALSE; /* TRUE if message in last line */ 49 NOSHARE int DNEAR clexec = FALSE; /* command line execution flag */ 50 NOSHARE int DNEAR mstore = FALSE; /* storing text to macro flag */ 51 NOSHARE int DNEAR discmd = TRUE; /* display command flag */ 52 NOSHARE int DNEAR disinp = TRUE; /* display input characters */ 53 NOSHARE int DNEAR modeflag = TRUE; /* display modelines flag */ 54 NOSHARE int DNEAR timeflag = FALSE; /* display time */ 55 NOSHARE int DNEAR undoflag = TRUE; /* processing undo commands */ 56 NOSHARE OBJECT obj; /* scratch undo object */ 57 NOSHARE int DNEAR undoing = FALSE; /* currently undoing a command? */ 58 NOSHARE char DNEAR lasttime[6] = ""; /* last time string displayed */ 59 NOSHARE int DNEAR popflag = TRUE; /* pop-up windows enabled? */ 60 NOSHARE int DNEAR popwait = TRUE; /* user wait on pops enabled? */ 61 NOSHARE int DNEAR posflag = FALSE; /* display point position */ 62 NOSHARE int cpending = FALSE; /* input character pending? */ 63 NOSHARE int charpending; /* character pushed back */ 64 NOSHARE int DNEAR sscroll = FALSE; /* smooth scrolling enabled flag*/ 65 NOSHARE int DNEAR hscroll = TRUE; /* horizontal scrolling flag */ 66 NOSHARE int DNEAR hscrollbar = TRUE; /* horizontal scroll bar flag */ 67 NOSHARE int DNEAR vscrollbar = TRUE; /* vertical scroll bar flag */ 68 NOSHARE int DNEAR hjump = 1; /* horizontal jump size */ 69 NOSHARE int DNEAR ssave = TRUE; /* safe save flag */ 70 NOSHARE struct BUFFER *bstore = NULL; /* buffer to store macro text to*/ 71 NOSHARE int DNEAR vtrow = 0; /* Row location of SW cursor */ 72 NOSHARE int DNEAR vtcol = 0; /* Column location of SW cursor */ 73 NOSHARE int DNEAR ttrow = HUGE; /* Row location of HW cursor */ 74 NOSHARE int DNEAR ttcol = HUGE; /* Column location of HW cursor */ 75 NOSHARE int DNEAR lbound = 0; /* leftmost column of current line 76 being displayed */ 77 NOSHARE int DNEAR taboff = 0; /* tab offset for display */ 78 NOSHARE int DNEAR tabsize = 8; /* current hard tab size */ 79 NOSHARE int DNEAR stabsize = 0; /* current soft tab size (0: use hard tabs) */ 80 NOSHARE int DNEAR reptc = CTRL | 'U'; /* current universal repeat char*/ 81 NOSHARE int DNEAR abortc = CTRL | 'G'; /* current abort command char */ 82 NOSHARE int DNEAR sterm = CTRL | '['; /* search terminating character */ 83 NOSHARE int DNEAR isterm = CTRL | '['; /* incremental-search terminating char */ 84 NOSHARE int DNEAR searchtype = SRNORM; /* current search style */ 85 NOSHARE int DNEAR yankflag = FALSE; /* current yank style */ 86 87 NOSHARE int DNEAR prefix = 0; /* currently pending prefix bits */ 88 NOSHARE int DNEAR prenum = 0; /* " " numeric arg */ 89 NOSHARE int DNEAR predef = TRUE; /* " " default flag */ 90 91 NOSHARE int DNEAR quotec = CTRL | 'Q'; /* quote char during mlreply() */ 92 NOSHARE CONST char *cname[] = { /* names of colors */ 93 "BLACK", "RED", "GREEN", "YELLOW", "BLUE", 94 "MAGENTA", "CYAN", "GREY", 95 "GRAY", "LRED", "LGREEN", "LYELLOW", "LBLUE", 96 "LMAGENTA", "LCYAN", "WHITE"}; 97 98 NOSHARE int kill_index; /* current index into kill ring */ 99 NOSHARE KILL *kbufp[NRING]; /* current kill buffer chunk pointer*/ 100 NOSHARE KILL *kbufh[NRING]; /* kill buffer header pointer */ 101 NOSHARE int kskip[NRING]; /* # of bytes to skip in 1st kill chunk */ 102 NOSHARE int kused[NRING]; /* # of bytes used in last kill chunk*/ 103 NOSHARE EWINDOW *swindow = NULL; /* saved window pointer */ 104 NOSHARE int cryptflag = FALSE; /* currently encrypting? */ 105 NOSHARE int oldcrypt = FALSE; /* using old(broken) encryption? */ 106 NOSHARE short *kbdptr; /* current position in keyboard buf */ 107 NOSHARE short *kbdend = &kbdm[0]; /* ptr to end of the keyboard */ 108 NOSHARE int DNEAR kbdmode = STOP; /* current keyboard macro mode */ 109 NOSHARE int DNEAR kbdrep = 0; /* number of repetitions */ 110 NOSHARE int DNEAR restflag = FALSE; /* restricted use? */ 111 NOSHARE int DNEAR lastkey = 0; /* last keystoke */ 112 NOSHARE long DNEAR seed = 1L; /* random number seed */ 113 NOSHARE long envram = 0l; /* # of bytes current in use by malloc */ 114 NOSHARE long access_time = 0L; /* counter of buffer access */ 115 NOSHARE int DNEAR macbug = FALSE; /* macro debugging flag */ 116 NOSHARE int DNEAR mouseflag = TRUE; /* use the mouse? */ 117 NOSHARE int DNEAR diagflag = FALSE; /* diagonal mouse movements? */ 118 CONST char errorm[] = "ERROR"; /* error literal */ 119 CONST char truem[] = "TRUE"; /* true literal */ 120 CONST char falsem[] = "FALSE"; /* false litereal */ 121 NOSHARE int DNEAR cmdstatus = TRUE; /* last command status */ 122 NOSHARE char palstr[49] = ""; /* palette string */ 123 NOSHARE char lastmesg[NSTRING] = ""; /* last message posted */ 124 NOSHARE char rval[NSTRING] = "0"; /* result of last procedure/sub */ 125 NOSHARE char *lastptr = NULL; /* ptr to lastmesg[] */ 126 NOSHARE int DNEAR saveflag = 0; /* Flags, saved with the $target var */ 127 NOSHARE char *fline = NULL; /* dynamic return line */ 128 NOSHARE int DNEAR flen = 0; /* current length of fline */ 129 NOSHARE int DNEAR eexitflag = FALSE; /* EMACS exit flag */ 130 NOSHARE int DNEAR eexitval = 0; /* and the exit return value */ 131 NOSHARE int xpos = 0; /* current column mouse is positioned to*/ 132 NOSHARE int ypos = 0; /* current screen row " */ 133 NOSHARE int nclicks = 0; /* cleared on any non-mouse event */ 134 NOSHARE int disphigh = FALSE; /* display high bit chars escaped */ 135 NOSHARE int dispundo = FALSE; /* display undo stack depth on comand line */ 136 NOSHARE int defferupdate = FALSE; /* if TRUE, update(TRUE) should be 137 called before yielding to another 138 Windows application */ 139 NOSHARE int notquiescent = 1; /* <=0 only when getkey called 140 directly by editloop () */ 141 NOSHARE int fbusy = FALSE; /* indicates file activity if FREADING 142 or FWRITING. Used by abort mechanism */ 143 NOSHARE int hilite = 10; /* current region to highlight (255 if none) */ 144 145 /* uninitialized global definitions */ 146 147 NOSHARE int DNEAR currow; /* Cursor row */ 148 NOSHARE int DNEAR curcol; /* Cursor column */ 149 NOSHARE int DNEAR thisflag; /* Flags, this command */ 150 NOSHARE int DNEAR lastflag; /* Flags, last command */ 151 NOSHARE int DNEAR curgoal; /* Goal for C-P, C-N */ 152 NOSHARE EWINDOW *curwp; /* Current window */ 153 NOSHARE BUFFER *curbp; /* Current buffer */ 154 NOSHARE EWINDOW *wheadp; /* Head of list of windows */ 155 NOSHARE BUFFER *bheadp; /* Head of list of buffers */ 156 NOSHARE UTABLE *uv_head; /* head of list of user variables */ 157 NOSHARE UTABLE *uv_global; /* global variable table */ 158 NOSHARE ABBREV *ab_head; /* head of the abbreviation list */ 159 NOSHARE int DNEAR ab_bell; /* are we ringing the bell on completion? */ 160 NOSHARE int DNEAR ab_cap; /* match capatilization on expansion? */ 161 NOSHARE int DNEAR ab_quick; /* aggressive completion enabled? */ 162 NOSHARE char ab_word[NSTRING]; /* current word being typed */ 163 NOSHARE char *ab_pos; /* current place in ab_word */ 164 NOSHARE char *ab_end; /* ptr to physical end of ab_word */ 165 NOSHARE SCREEN *first_screen; /* Head and current screen in list */ 166 NOSHARE BUFFER *blistp; /* Buffer for C-X C-B */ 167 NOSHARE BUFFER *ulistp; /* Buffer for C-X U */ 168 NOSHARE BUFFER *slistp; /* Buffer for A-B */ 169 170 NOSHARE char sres[NBUFN]; /* current screen resolution */ 171 NOSHARE char os[NBUFN]; /* what OS are we running under */ 172 173 NOSHARE char lowcase[HICHAR]; /* lower casing map */ 174 NOSHARE char upcase[HICHAR]; /* upper casing map */ 175 176 NOSHARE unsigned char pat[NPAT]; /* Search pattern */ 177 NOSHARE unsigned char tap[NPAT]; /* Reversed pattern array. */ 178 NOSHARE unsigned char rpat[NPAT]; /* replacement pattern */ 179 180 /* Various "Hook" execution variables */ 181 182 NOSHARE KEYTAB readhook; /* executed on all file reads */ 183 NOSHARE KEYTAB wraphook; /* executed when wrapping text */ 184 NOSHARE KEYTAB cmdhook; /* executed before looking for a command */ 185 NOSHARE KEYTAB writehook; /* executed on all file writes */ 186 NOSHARE KEYTAB exbhook; /* executed when exiting a buffer */ 187 NOSHARE KEYTAB bufhook; /* executed when entering a buffer */ 188 NOSHARE KEYTAB exithook; /* executed when exiting emacs */ 189 190 /* The variables matchline and matchoff hold the line 191 * and offset position of the *start* of the match. 192 * The variable patmatch holds the string that satisfies 193 * the search command. 194 */ 195 NOSHARE int matchlen; 196 NOSHARE int matchoff; 197 NOSHARE LINE *matchline; 198 NOSHARE char *patmatch = NULL; 199 200 #if MAGIC 201 /* 202 * The variables magical and rmagical determine if there 203 * were actual metacharacters in the search and replace strings - 204 * if not, then we don't have to use the slower MAGIC mode 205 * search functions. 206 */ 207 NOSHARE short int DNEAR magical = FALSE; 208 NOSHARE short int DNEAR rmagical = FALSE; 209 210 NOSHARE MC mcpat[NPAT]; /* the magic pattern */ 211 NOSHARE MC tapcm[NPAT]; /* the reversed magic pattern */ 212 NOSHARE MC mcdeltapat[2]; /* the no-magic pattern */ 213 NOSHARE MC tapatledcm[2]; /* the reversed no-magic pattern*/ 214 NOSHARE RMC rmcpat[NPAT]; /* the replacement magic array */ 215 NOSHARE char *grpmatch[MAXGROUPS]; /* holds groups found in search */ 216 217 #endif 218 219 DELTA deltapat; /* Forward pattern delta structure.*/ 220 DELTA tapatled; /* Reverse pattern delta structure.*/ 221 222 /* directive name table: 223 This holds the names of all the directives.... */ 224 225 CONST char *dname[] = { 226 "if", "else", "endif", 227 "goto", "return", "endm", 228 "while", "endwhile", "break", 229 "force" 230 }; 231 /* directive lengths */ 232 CONST short int dname_len[NUMDIRS] = {2, 4, 5, 4, 6, 4, 5, 7, 5, 5}; 233 234 /* var needed for macro debugging output */ 235 NOSHARE char outline[NSTRING]; /* global string to hold debug line text */ 236 237 /* 238 * System message notification (at the moment, VMS only). 239 */ 240 #if VMS 241 NOSHARE char brdcstbuf[1024]; /* Broadcast messages */ 242 NOSHARE int pending_msg = FALSE; /* Flag - have we notified user yet.*/ 243 #endif 244 245 #if HANDLE_WINCH 246 int winch_flag=0; /* Window size changed flag */ 247 #endif 248 249 #else 250 251 /* for all the other .C files */ 252 253 /* initialized global external declarations */ 254 255 NOSHARE extern int DNEAR fillcol; /* Current fill column */ 256 NOSHARE extern short kbdm[DUMMYSZ]; /* Holds keyboard macro data */ 257 NOSHARE extern char *execstr; /* pointer to string to execute */ 258 NOSHARE extern char golabel[DUMMYSZ]; /* current line to go to */ 259 NOSHARE extern char paralead[DUMMYSZ]; /* paragraph leadin chars */ 260 NOSHARE extern char fmtlead[DUMMYSZ]; /* format command leadin chars */ 261 NOSHARE extern char mainbuf[DUMMYSZ]; /* name of main buffer */ 262 NOSHARE extern char lterm[DUMMYSZ]; /* line terminators on file write */ 263 NOSHARE extern unsigned char wordlist[DUMMYSZ];/* characters considered "in words" */ 264 NOSHARE extern int DNEAR wlflag; /* word list enabled flag */ 265 NOSHARE extern int DNEAR clearflag; /* clear screen on screen change? */ 266 NOSHARE extern int DNEAR execlevel; /* execution IF level */ 267 NOSHARE extern int DNEAR eolexist; /* does clear to EOL exist? */ 268 NOSHARE extern int DNEAR revexist; /* does reverse video exist? */ 269 NOSHARE extern int DNEAR exec_error; /* macro execution error pending? */ 270 NOSHARE extern int DNEAR flickcode; /* do flicker supression? */ 271 NOSHARE extern int DNEAR mouse_move; /* user allow tracking mouse moves? */ 272 NOSHARE extern int DNEAR mmove_flag; /* code currently allowing mmoves? */ 273 NOSHARE extern int DNEAR newscreenflag; /* Create new screen on reads? */ 274 NOSHARE extern int DNEAR overlap; /* overlap when paging screens */ 275 CONST extern char *modename[DUMMYSZ]; /* text names of modes */ 276 CONST extern char modecode[DUMMYSZ]; /* letters to represent modes */ 277 NOSHARE extern int DNEAR numfunc; /* number of bindable functions */ 278 NOSHARE extern KEYTAB keytab[DUMMYSZ]; /* key bind to functions table */ 279 NOSHARE extern NBIND names[DUMMYSZ]; /* name to function table */ 280 NOSHARE extern int DNEAR gmode; /* global editor mode */ 281 NOSHARE extern int DNEAR gflags; /* global control flag */ 282 NOSHARE extern int DNEAR gfcolor; /* global forgrnd color (white) */ 283 NOSHARE extern int DNEAR gbcolor; /* global backgrnd color (black)*/ 284 NOSHARE extern int DNEAR deskcolor; /* desktop background color */ 285 NOSHARE extern int DNEAR gasave; /* global ASAVE size */ 286 NOSHARE extern int DNEAR gacount; /* count until next ASAVE */ 287 NOSHARE extern int DNEAR sgarbf; /* State of screen unknown */ 288 NOSHARE extern int DNEAR mpresf; /* Stuff in message line */ 289 NOSHARE extern int DNEAR clexec; /* command line execution flag */ 290 NOSHARE extern int DNEAR mstore; /* storing text to macro flag */ 291 NOSHARE extern int DNEAR discmd; /* display command flag */ 292 NOSHARE extern int DNEAR disinp; /* display input characters */ 293 NOSHARE extern int DNEAR modeflag; /* display modelines flag */ 294 NOSHARE extern int DNEAR timeflag; /* display time */ 295 NOSHARE extern int DNEAR undoflag; /* processing undo commands */ 296 NOSHARE extern OBJECT obj; /* scratch undo object */ 297 NOSHARE extern int DNEAR undoing; /* currently undoing a command? */ 298 NOSHARE extern char DNEAR lasttime[DUMMYSZ];/* last time string displayed*/ 299 NOSHARE extern int DNEAR popflag; /* pop-up windows enabled? */ 300 NOSHARE extern int DNEAR popwait; /* user wait on pops enabled? */ 301 NOSHARE extern int DNEAR posflag; /* display point position */ 302 NOSHARE extern int cpending; /* input character pending? */ 303 NOSHARE extern int charpending; /* character pushed back */ 304 NOSHARE extern int DNEAR sscroll; /* smooth scrolling enabled flag*/ 305 NOSHARE extern int DNEAR hscroll; /* horizontal scrolling flag */ 306 NOSHARE extern int DNEAR hscrollbar; /* horizontal scroll bar flag */ 307 NOSHARE extern int DNEAR vscrollbar; /* vertical scroll bar flag */ 308 NOSHARE extern int DNEAR hjump; /* horizontal jump size */ 309 NOSHARE extern int DNEAR ssave; /* safe save flag */ 310 NOSHARE extern struct BUFFER *bstore; /* buffer to store macro text to*/ 311 NOSHARE extern int DNEAR vtrow; /* Row location of SW cursor */ 312 NOSHARE extern int DNEAR vtcol; /* Column location of SW cursor */ 313 NOSHARE extern int DNEAR ttrow; /* Row location of HW cursor */ 314 NOSHARE extern int DNEAR ttcol; /* Column location of HW cursor */ 315 NOSHARE extern int DNEAR lbound; /* leftmost column of current line 316 being displayed */ 317 NOSHARE extern int DNEAR taboff; /* tab offset for display */ 318 NOSHARE extern int DNEAR tabsize; /* current hard tab size */ 319 NOSHARE extern int DNEAR stabsize; /* current soft tab size (0: use hard tabs) */ 320 NOSHARE extern int DNEAR reptc; /* current universal repeat char*/ 321 NOSHARE extern int DNEAR abortc; /* current abort command char */ 322 NOSHARE extern int DNEAR sterm; /* search terminating character */ 323 NOSHARE extern int DNEAR isterm; /* incremental-search terminating char */ 324 NOSHARE extern int DNEAR searchtype; /* current search style */ 325 NOSHARE extern int DNEAR yankflag; /* current yank style */ 326 327 NOSHARE extern int DNEAR prefix; /* currently pending prefix bits */ 328 NOSHARE extern int DNEAR prenum; /* " " numeric arg */ 329 NOSHARE extern int DNEAR predef; /* " " default flag */ 330 331 NOSHARE extern int DNEAR quotec; /* quote char during mlreply() */ 332 NOSHARE extern CONST char *cname[DUMMYSZ];/* names of colors */ 333 334 NOSHARE extern int kill_index; /* current index into kill ring */ 335 NOSHARE extern KILL *kbufp[DUMMYSZ]; /* current kill buffer chunk pointer */ 336 NOSHARE extern KILL *kbufh[DUMMYSZ]; /* kill buffer header pointer */ 337 NOSHARE extern int kskip[DUMMYSZ]; /* # of bytes to skip in 1st kill chunk */ 338 NOSHARE extern int kused[DUMMYSZ]; /* # of bytes used in kill buffer*/ 339 NOSHARE extern EWINDOW *swindow; /* saved window pointer */ 340 NOSHARE extern int cryptflag; /* currently encrypting? */ 341 NOSHARE extern int oldcrypt; /* using old(broken) encryption? */ 342 NOSHARE extern short *kbdptr; /* current position in keyboard buf */ 343 NOSHARE extern short *kbdend; /* ptr to end of the keyboard */ 344 NOSHARE extern int kbdmode; /* current keyboard macro mode */ 345 NOSHARE extern int kbdrep; /* number of repetitions */ 346 NOSHARE extern int restflag; /* restricted use? */ 347 NOSHARE extern int lastkey; /* last keystoke */ 348 NOSHARE extern long seed; /* random number seed */ 349 NOSHARE extern long envram; /* # of bytes current in use by malloc */ 350 NOSHARE extern long access_time; /* counter of buffer access */ 351 NOSHARE extern int DNEAR macbug; /* macro debugging flag */ 352 NOSHARE extern int DNEAR mouseflag; /* use the mouse? */ 353 NOSHARE extern int DNEAR diagflag; /* diagonal mouse movements? */ 354 CONST extern char errorm[DUMMYSZ]; /* error literal */ 355 CONST extern char truem[DUMMYSZ]; /* true literal */ 356 CONST extern char falsem[DUMMYSZ]; /* false litereal */ 357 NOSHARE extern int DNEAR cmdstatus; /* last command status */ 358 NOSHARE extern char palstr[DUMMYSZ]; /* palette string */ 359 NOSHARE extern char lastmesg[DUMMYSZ]; /* last message posted */ 360 NOSHARE extern char rval[DUMMYSZ]; /* result of last procedure */ 361 NOSHARE extern char *lastptr; /* ptr to lastmesg[] */ 362 NOSHARE extern int DNEAR saveflag; /* Flags, saved with the $target var */ 363 NOSHARE extern char *fline; /* dynamic return line */ 364 NOSHARE extern int DNEAR flen; /* current length of fline */ 365 NOSHARE extern int DNEAR eexitflag; /* EMACS exit flag */ 366 NOSHARE extern int DNEAR eexitval; /* and the exit return value */ 367 NOSHARE extern int xpos; /* current column mouse is positioned to */ 368 NOSHARE extern int ypos; /* current screen row " */ 369 NOSHARE extern int nclicks; /* cleared on any non-mouse event*/ 370 NOSHARE extern int disphigh; /* display high bit chars escaped*/ 371 NOSHARE extern int dispundo; /* display undo stack depth on comand line */ 372 NOSHARE extern int defferupdate; /* if TRUE, update(TRUE) should be 373 called before yielding to another 374 Windows application */ 375 NOSHARE extern int notquiescent; /* <=0 only when getkey called 376 directly by editloop () */ 377 NOSHARE extern int fbusy; /* indicates file activity if FREADING 378 or FWRITING. Used by abort mechanism */ 379 NOSHARE extern int hilite; /* current region to highlight (255 if none) */ 380 381 /* uninitialized global external declarations */ 382 383 NOSHARE extern int DNEAR currow; /* Cursor row */ 384 NOSHARE extern int DNEAR curcol; /* Cursor column */ 385 NOSHARE extern int DNEAR thisflag; /* Flags, this command */ 386 NOSHARE extern int DNEAR lastflag; /* Flags, last command */ 387 NOSHARE extern int DNEAR curgoal; /* Goal for C-P, C-N */ 388 NOSHARE extern EWINDOW *curwp; /* Current window */ 389 NOSHARE extern BUFFER *curbp; /* Current buffer */ 390 NOSHARE extern EWINDOW *wheadp; /* Head of list of windows */ 391 NOSHARE extern BUFFER *bheadp; /* Head of list of buffers */ 392 NOSHARE extern ABBREV *ab_head; /* head of the abbreviation list */ 393 NOSHARE extern UTABLE *uv_head; /* head of list of user variables */ 394 NOSHARE extern UTABLE *uv_global; /* global variable table */ 395 NOSHARE extern int DNEAR ab_bell; /* are we ringing the bell on completion? */ 396 NOSHARE extern int DNEAR ab_cap; /* match capatilization on expansion? */ 397 NOSHARE extern int DNEAR ab_quick; /* aggressive completion enabled? */ 398 NOSHARE extern char ab_word[DUMMYSZ]; /* current word being typed */ 399 NOSHARE extern char *ab_pos; /* current place in ab_word */ 400 NOSHARE extern char *ab_end; /* ptr to physical end of ab_word */ 401 NOSHARE extern SCREEN *first_screen; /* Head and current screen in list */ 402 NOSHARE extern BUFFER *blistp; /* Buffer for C-X C-B */ 403 NOSHARE extern BUFFER *ulistp; /* Buffer for C-X U */ 404 NOSHARE extern BUFFER *slistp; /* Buffer for A-B */ 405 406 NOSHARE extern char sres[NBUFN]; /* current screen resolution */ 407 NOSHARE extern char os[NBUFN]; /* what OS are we running under */ 408 409 NOSHARE extern char lowcase[HICHAR]; /* lower casing map */ 410 NOSHARE extern char upcase[HICHAR]; /* upper casing map */ 411 412 NOSHARE extern unsigned char pat[DUMMYSZ]; /* Search pattern */ 413 NOSHARE extern unsigned char tap[DUMMYSZ]; /* Reversed pattern array. */ 414 NOSHARE extern unsigned char rpat[DUMMYSZ]; /* replacement pattern */ 415 416 /* Various "Hook" execution variables */ 417 418 NOSHARE extern KEYTAB readhook; /* executed on all file reads */ 419 NOSHARE extern KEYTAB wraphook; /* executed when wrapping text */ 420 NOSHARE extern KEYTAB cmdhook; /* executed before looking for a cmd */ 421 NOSHARE extern KEYTAB writehook; /* executed on all file writes */ 422 NOSHARE extern KEYTAB exbhook; /* executed when exiting a buffer */ 423 NOSHARE extern KEYTAB bufhook; /* executed when entering a buffer */ 424 NOSHARE extern KEYTAB exithook; /* executed when exiting emacs */ 425 426 NOSHARE extern int matchlen; 427 NOSHARE extern int matchoff; 428 NOSHARE extern LINE *matchline; 429 NOSHARE extern char *patmatch; 430 431 #if MAGIC 432 NOSHARE extern short int magical; 433 NOSHARE extern short int rmagical; 434 NOSHARE extern MC mcpat[NPAT]; /* the magic pattern */ 435 NOSHARE extern MC tapcm[NPAT]; /* the reversed magic pattern */ 436 NOSHARE extern MC mcdeltapat[2]; /* the no-magic pattern */ 437 NOSHARE extern MC tapatledcm[2]; /* the reversed no-magic pattern*/ 438 NOSHARE extern RMC rmcpat[NPAT]; /* the replacement magic array */ 439 NOSHARE extern char *grpmatch[MAXGROUPS]; /* holds groups found in search */ 440 #endif 441 442 NOSHARE extern DELTA deltapat; /* Forward pattern delta structure.*/ 443 NOSHARE extern DELTA tapatled; /* Reverse pattern delta structure.*/ 444 445 CONST extern char *dname[DUMMYSZ]; /* directive name table */ 446 CONST extern short int dname_len[NUMDIRS]; /* directive lengths */ 447 448 /* var needed for macro debugging output */ 449 NOSHARE extern char outline[DUMMYSZ]; /* global string to hold debug line text */ 450 451 /* 452 * System message notification (at the moment, VMS only). 453 */ 454 #if VMS 455 NOSHARE extern char brdcstbuf[1024]; /* Broadcast messages */ 456 NOSHARE extern int pending_msg; /* Flag - have we notified user yet.*/ 457 #endif 458 459 #if HANDLE_WINCH 460 NOSHARE extern int winch_flag; /* Window size changed flag */ 461 #endif 462 463 #endif 464 465 /* terminal table defined only in TERM.C */ 466 467 #ifndef termdef 468 NOSHARE extern TERM term; /* Terminal information. */ 469 #endif 470