home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / ue312os2.zip / h / edef.h < prev    next >
Text File  |  1993-04-21  |  21KB  |  419 lines

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