Annotation of src/usr.bin/mg/def.h, Revision 1.69
1.69 ! kjell 1: /* $OpenBSD: def.h,v 1.68 2005/10/13 05:24:52 kjell Exp $ */
1.64 kjell 2:
3: /* This file is in the public domain. */
1.30 vincent 4:
5: #include <sys/queue.h>
1.6 niklas 6:
1.1 deraadt 7: /*
8: * This file is the general header file for all parts
1.4 millert 9: * of the Mg display editor. It contains all of the
1.1 deraadt 10: * general definitions and macros. It also contains some
11: * conditional compilation flags. All of the per-system and
12: * per-terminal definitions are in special header files.
13: */
1.58 henning 14:
1.4 millert 15: #include "sysdef.h" /* Order is critical. */
1.1 deraadt 16: #include "ttydef.h"
17: #include "chrdef.h"
18:
19: #ifdef NO_MACRO
20: #ifndef NO_STARTUP
1.4 millert 21: #define NO_STARTUP /* NO_MACRO implies NO_STARTUP */
1.1 deraadt 22: #endif
23: #endif
24:
1.47 vincent 25: typedef int (*PF)(int, int); /* generally useful type */
1.1 deraadt 26:
27: /*
28: * Table sizes, etc.
29: */
1.7 art 30: #define NFILEN 1024 /* Length, file name. */
31: #define NBUFN NFILEN /* Length, buffer name. */
1.4 millert 32: #define NLINE 256 /* Length, line. */
33: #define PBMODES 4 /* modes per buffer */
34: #define NKBDM 256 /* Length, keyboard macro. */
35: #define NPAT 80 /* Length, pattern. */
36: #define HUGE 1000 /* A rather large number. */
37: #define NSRCH 128 /* Undoable search commands. */
38: #define NXNAME 64 /* Length, extended command. */
1.60 db 39: #define NKNAME 20 /* Length, key names. */
1.68 kjell 40: #define NTIME 50 /* Length, timestamp string. */
1.1 deraadt 41: /*
42: * Universal.
43: */
1.4 millert 44: #define FALSE 0 /* False, no, bad, etc. */
45: #define TRUE 1 /* True, yes, good, etc. */
46: #define ABORT 2 /* Death, ^G, abort, etc. */
1.1 deraadt 47:
1.4 millert 48: #define KPROMPT 2 /* keyboard prompt */
1.1 deraadt 49:
50: /*
51: * These flag bits keep track of
52: * some aspects of the last command. The CFCPCN
53: * flag controls goal column setting. The CFKILL
54: * flag controls the clearing versus appending
55: * of data in the kill buffer.
56: */
1.4 millert 57: #define CFCPCN 0x0001 /* Last command was C-P, C-N */
58: #define CFKILL 0x0002 /* Last command was a kill */
1.60 db 59: #define CFINS 0x0004 /* Last command was self-insert */
1.1 deraadt 60:
61: /*
62: * File I/O.
63: */
1.4 millert 64: #define FIOSUC 0 /* Success. */
65: #define FIOFNF 1 /* File not found. */
66: #define FIOEOF 2 /* End of file. */
67: #define FIOERR 3 /* Error. */
68: #define FIOLONG 4 /* long line partially read */
1.69 ! kjell 69: #ifndef NO_DIRED
! 70: # define FIODIR 5 /* File is a directory */
! 71: #endif /* !NO_DIRED */
1.1 deraadt 72:
73: /*
74: * Directory I/O.
75: */
1.4 millert 76: #define DIOSUC 0 /* Success. */
77: #define DIOEOF 1 /* End of file. */
78: #define DIOERR 2 /* Error. */
1.1 deraadt 79:
80: /*
81: * Display colors.
82: */
1.4 millert 83: #define CNONE 0 /* Unknown color. */
84: #define CTEXT 1 /* Text color. */
85: #define CMODE 2 /* Mode line color. */
86:
87: /*
1.22 millert 88: * Flags for keyboard invoked functions.
1.4 millert 89: */
90: #define FFUNIV 1 /* universal argument */
1.27 deraadt 91: #define FFNEGARG 2 /* negative only argument */
1.4 millert 92: #define FFOTHARG 4 /* other argument */
93: #define FFARG 7 /* any argument */
94: #define FFRAND 8 /* Called by other function */
1.1 deraadt 95:
96: /*
97: * Flags for "eread".
98: */
1.4 millert 99: #define EFFUNC 0x0001 /* Autocomplete functions. */
100: #define EFBUF 0x0002 /* Autocomplete buffers. */
101: #define EFFILE 0x0004 /* " files (maybe someday) */
1.60 db 102: #define EFAUTO 0x0007 /* Some autocompletion on */
1.4 millert 103: #define EFNEW 0x0008 /* New prompt. */
104: #define EFCR 0x0010 /* Echo CR at end; last read. */
1.20 art 105: #define EFDEF 0x0020 /* buffer contains default args */
1.63 kjell 106: #define EFNUL 0x0040 /* Null Minibuffer OK */
1.1 deraadt 107:
108: /*
109: * Flags for "ldelete"/"kinsert"
110: */
111: #define KNONE 0
112: #define KFORW 1
113: #define KBACK 2
114:
1.49 vincent 115:
116: /*
117: * This structure holds the starting position
118: * (as a line/offset pair) and the number of characters in a
119: * region of a buffer. This makes passing the specification
120: * of a region around a little bit easier.
121: */
122: typedef struct {
123: struct LINE *r_linep; /* Origin LINE address. */
1.60 db 124: int r_offset; /* Origin LINE offset. */
125: RSIZE r_size; /* Length in characters. */
1.49 vincent 126: } REGION;
127:
128:
1.1 deraadt 129: /*
130: * All text is kept in circularly linked
131: * lists of "LINE" structures. These begin at the
132: * header line (which is the blank line beyond the
133: * end of the buffer). This line is pointed to by
1.60 db 134: * the "BUFFER". Each line contains the number of
1.1 deraadt 135: * bytes in the line (the "used" size), the size
136: * of the text array, and the text. The end of line
137: * is not stored as a byte; it's implied. Future
138: * additions will include update hints, and a
139: * list of marks into the line.
140: */
1.4 millert 141: typedef struct LINE {
1.60 db 142: struct LINE *l_fp; /* Link to the next line */
143: struct LINE *l_bp; /* Link to the previous line */
144: int l_size; /* Allocated size */
145: int l_used; /* Used size */
146: char *l_text; /* Content of the line */
1.4 millert 147: } LINE;
1.1 deraadt 148:
149: /*
150: * The rationale behind these macros is that you
151: * could (with some editing, like changing the type of a line
152: * link from a "LINE *" to a "REFLINE", and fixing the commands
153: * like file reading that break the rules) change the actual
154: * storage representation of lines to use something fancy on
155: * machines with small address spaces.
156: */
157: #define lforw(lp) ((lp)->l_fp)
158: #define lback(lp) ((lp)->l_bp)
159: #define lgetc(lp, n) (CHARMASK((lp)->l_text[(n)]))
160: #define lputc(lp, n, c) ((lp)->l_text[(n)]=(c))
161: #define llength(lp) ((lp)->l_used)
162: #define ltext(lp) ((lp)->l_text)
163:
164: /*
165: * All repeated structures are kept as linked lists of structures.
166: * All of these start with a LIST structure (except lines, which
167: * have their own abstraction). This will allow for
168: * later conversion to generic list manipulation routines should
1.60 db 169: * I decide to do that. It does mean that there are four extra
1.1 deraadt 170: * bytes per window. I feel that this is an acceptable price,
171: * considering that there are usually only one or two windows.
172: */
173: typedef struct LIST {
174: union {
1.18 mickey 175: struct MGWIN *l_wp;
176: struct BUFFER *x_bp; /* l_bp is used by LINE */
177: struct LIST *l_nxt;
1.1 deraadt 178: } l_p;
1.36 vincent 179: const char *l_name;
1.1 deraadt 180: } LIST;
1.4 millert 181:
1.1 deraadt 182: /*
183: * Usual hack - to keep from uglifying the code with lotsa
184: * references through the union, we #define something for it.
185: */
186: #define l_next l_p.l_nxt
187:
188: /*
189: * There is a window structure allocated for
190: * every active display window. The windows are kept in a
191: * big list, in top to bottom screen order, with the listhead at
192: * "wheadp". Each window contains its own values of dot and mark.
193: * The flag field contains some bits that are set by commands
194: * to guide redisplay; although this is a bit of a compromise in
195: * terms of decoupling, the full blown redisplay is just too
196: * expensive to run for every input character.
197: */
1.4 millert 198: typedef struct MGWIN {
1.60 db 199: LIST w_list; /* List header */
1.18 mickey 200: struct BUFFER *w_bufp; /* Buffer displayed in window */
201: struct LINE *w_linep; /* Top line in the window */
202: struct LINE *w_dotp; /* Line containing "." */
203: struct LINE *w_markp; /* Line containing "mark" */
1.60 db 204: int w_doto; /* Byte offset for "." */
205: int w_marko; /* Byte offset for "mark" */
206: char w_toprow; /* Origin 0 top row of window */
207: char w_ntrows; /* # of rows of text in window */
208: char w_force; /* If NZ, forcing row. */
209: char w_flag; /* Flags. */
1.54 vincent 210: struct LINE *w_wrapline;
1.4 millert 211: } MGWIN;
1.1 deraadt 212: #define w_wndp w_list.l_p.l_wp
213: #define w_name w_list.l_name
214:
215: /*
216: * Window flags are set by command processors to
217: * tell the display system what has happened to the buffer
218: * mapped by the window. Setting "WFHARD" is always a safe thing
219: * to do, but it may do more work than is necessary. Always try
220: * to set the simplest action that achieves the required update.
221: * Because commands set bits in the "w_flag", update will see
222: * all change flags, and do the most general one.
223: */
1.43 vincent 224: #define WFFORCE 0x01 /* Force reframe. */
225: #define WFMOVE 0x02 /* Movement from line to line. */
226: #define WFEDIT 0x04 /* Editing within a line. */
227: #define WFHARD 0x08 /* Better to a full display. */
228: #define WFMODE 0x10 /* Update mode line. */
1.1 deraadt 229:
1.35 vincent 230: struct undo_rec;
231:
1.1 deraadt 232: /*
233: * Text is kept in buffers. A buffer header, described
234: * below, exists for every buffer in the system. The buffers are
235: * kept in a big list, so that commands that search for a buffer by
236: * name can find the buffer header. There is a safe store for the
237: * dot and mark in the header, but this is only valid if the buffer
238: * is not being displayed (that is, if "b_nwnd" is 0). The text for
239: * the buffer is kept in a circularly linked list of lines, with
240: * a pointer to the header line in "b_linep".
241: */
1.4 millert 242: typedef struct BUFFER {
1.60 db 243: LIST b_list; /* buffer list pointer */
1.18 mickey 244: struct BUFFER *b_altb; /* Link to alternate buffer */
245: struct LINE *b_dotp; /* Link to "." LINE structure */
246: struct LINE *b_markp; /* ditto for mark */
247: struct LINE *b_linep; /* Link to the header LINE */
248: struct MAPS_S *b_modes[PBMODES]; /* buffer modes */
1.60 db 249: int b_doto; /* Offset of "." in above LINE */
250: int b_marko; /* ditto for the "mark" */
251: short b_nmodes; /* number of non-fundamental modes */
252: char b_nwnd; /* Count of windows on buffer */
253: char b_flag; /* Flags */
254: char b_fname[NFILEN]; /* File name */
255: struct fileinfo b_fi; /* File attributes */
1.67 kjell 256: LIST_HEAD(, undo_rec) b_undo; /* Undo actions list */
257: int b_undopos; /* Where we were during the */
258: /* last undo action. */
259: struct undo_rec *b_undoptr;
1.4 millert 260: } BUFFER;
1.1 deraadt 261: #define b_bufp b_list.l_p.x_bp
262: #define b_bname b_list.l_name
263:
1.43 vincent 264: #define BFCHG 0x01 /* Changed. */
265: #define BFBAK 0x02 /* Need to make a backup. */
1.1 deraadt 266: #ifdef NOTAB
1.43 vincent 267: #define BFNOTAB 0x04 /* no tab mode */
1.1 deraadt 268: #endif
1.43 vincent 269: #define BFOVERWRITE 0x08 /* overwrite mode */
1.60 db 270: #define BFREADONLY 0x10 /* read only mode */
1.1 deraadt 271:
272: /*
1.30 vincent 273: * This structure holds information about recent actions for the Undo command.
274: */
275: struct undo_rec {
1.34 deraadt 276: LIST_ENTRY(undo_rec) next;
1.30 vincent 277: enum {
278: INSERT = 1,
279: DELETE,
280: BOUNDARY
281: } type;
282: REGION region;
283: int pos;
1.34 deraadt 284: char *content;
1.30 vincent 285: };
286:
287: /*
1.4 millert 288: * Prototypes.
289: */
290:
1.5 millert 291: /* tty.c X */
1.29 millert 292: void ttinit(void);
293: void ttreinit(void);
294: void tttidy(void);
295: void ttmove(int, int);
296: void tteeol(void);
297: void tteeop(void);
298: void ttbeep(void);
299: void ttinsl(int, int, int);
300: void ttdell(int, int, int);
301: void ttwindow(int, int);
302: void ttnowindow(void);
303: void ttcolor(int);
304: void ttresize(void);
1.31 deraadt 305:
306: volatile sig_atomic_t winch_flag;
1.4 millert 307:
308: /* ttyio.c */
1.29 millert 309: void ttopen(void);
310: int ttraw(void);
311: void ttclose(void);
312: int ttcooked(void);
313: int ttputc(int);
314: void ttflush(void);
315: int ttgetc(void);
316: int ttwait(int);
317: int typeahead(void);
1.4 millert 318:
319: /* dir.c */
1.29 millert 320: void dirinit(void);
321: int changedir(int, int);
322: int showcwdir(int, int);
1.4 millert 323:
324: /* dired.c */
1.29 millert 325: int dired(int, int);
326: int d_otherwindow(int, int);
327: int d_undel(int, int);
328: int d_undelbak(int, int);
329: int d_findfile(int, int);
330: int d_ffotherwindow(int, int);
331: int d_expunge(int, int);
332: int d_copy(int, int);
333: int d_del(int, int);
334: int d_rename(int, int);
1.48 vincent 335: int d_shell_command(int, int);
336: int d_create_directory(int, int);
1.5 millert 337:
338: /* file.c X */
1.29 millert 339: int fileinsert(int, int);
340: int filevisit(int, int);
1.62 jason 341: int filevisitalt(int, int);
1.40 vincent 342: int filevisitro(int, int);
1.29 millert 343: int poptofile(int, int);
344: BUFFER *findbuffer(char *);
345: int readin(char *);
346: int insertfile(char *, char *, int);
347: int filewrite(int, int);
348: int filesave(int, int);
349: int buffsave(BUFFER *);
350: int makebkfile(int, int);
351: int writeout(BUFFER *, char *);
352: void upmodes(BUFFER *);
1.5 millert 353:
354: /* line.c X */
1.29 millert 355: LINE *lalloc(int);
356: int lrealloc(LINE *, int);
357: void lfree(LINE *);
358: void lchange(int);
1.54 vincent 359: int linsert_str(const char *, int);
1.29 millert 360: int linsert(int, int);
1.55 vincent 361: int lnewline_at(LINE *, int);
1.29 millert 362: int lnewline(void);
363: int ldelete(RSIZE, int);
364: int ldelnewline(void);
365: int lreplace(RSIZE, char *, int);
366: void kdelete(void);
367: int kinsert(int, int);
368: int kremove(int);
1.5 millert 369:
370: /* window.c X */
1.50 vincent 371: MGWIN *new_window(BUFFER *);
372: void free_window(MGWIN *);
1.29 millert 373: int reposition(int, int);
374: int refresh(int, int);
375: int nextwind(int, int);
376: int prevwind(int, int);
377: int onlywind(int, int);
378: int splitwind(int, int);
379: int enlargewind(int, int);
380: int shrinkwind(int, int);
381: int delwind(int, int);
382: MGWIN *wpopup(void);
1.4 millert 383:
384: /* buffer.c */
1.47 vincent 385: int togglereadonly(int, int);
1.36 vincent 386: BUFFER *bfind(const char *, int);
1.29 millert 387: int poptobuffer(int, int);
1.57 jfb 388: int killbuffer(BUFFER *);
389: int killbuffer_cmd(int, int);
1.29 millert 390: int savebuffers(int, int);
391: int listbuffers(int, int);
392: int addlinef(BUFFER *, char *, ...);
1.12 art 393: #define addline(bp, text) addlinef(bp, "%s", text)
1.29 millert 394: int anycb(int);
395: int bclear(BUFFER *);
396: int showbuffer(BUFFER *, MGWIN *, int);
397: MGWIN *popbuf(BUFFER *);
398: int bufferinsert(int, int);
399: int usebuffer(int, int);
400: int notmodified(int, int);
401: int popbuftop(BUFFER *);
1.4 millert 402:
403: /* display.c */
1.29 millert 404: int vtresize(int, int, int);
405: void vtinit(void);
406: void vttidy(void);
407: void update(void);
1.5 millert 408:
409: /* echo.c X */
1.29 millert 410: void eerase(void);
1.36 vincent 411: int eyorn(const char *);
412: int eyesno(const char *);
1.29 millert 413: void ewprintf(const char *fmt, ...);
1.56 vincent 414: char *ereply(const char *, char *, size_t, ...);
415: char *eread(const char *, char *, size_t, int, ...);
1.29 millert 416: int getxtra(LIST *, LIST *, int, int);
417: void free_file_list(LIST *);
1.4 millert 418:
419: /* fileio.c */
1.36 vincent 420: int ffropen(const char *, BUFFER *);
421: int ffwopen(const char *, BUFFER *);
1.29 millert 422: int ffclose(BUFFER *);
423: int ffputbuf(BUFFER *);
424: int ffgetline(char *, int, int *);
1.36 vincent 425: int fbackupfile(const char *);
426: char *adjustname(const char *);
1.29 millert 427: char *startupfile(char *);
428: int copy(char *, char *);
429: BUFFER *dired_(char *);
430: int d_makename(LINE *, char *, int);
431: LIST *make_file_list(char *);
1.4 millert 432:
1.5 millert 433: /* kbd.c X */
1.29 millert 434: int do_meta(int, int);
435: int bsmap(int, int);
436: void ungetkey(int);
437: int getkey(int);
438: int doin(void);
439: int rescan(int, int);
440: int universal_argument(int, int);
441: int digit_argument(int, int);
442: int negative_argument(int, int);
443: int selfinsert(int, int);
444: int quote(int, int);
1.4 millert 445:
446: /* main.c */
1.29 millert 447: int ctrlg(int, int);
448: int quit(int, int);
1.4 millert 449:
450: /* ttyio.c */
1.60 db 451: void panic(char *);
1.4 millert 452:
453: /* cinfo.c */
1.29 millert 454: char *keyname(char *, size_t, int);
1.4 millert 455:
456: /* basic.c */
1.29 millert 457: int gotobol(int, int);
458: int backchar(int, int);
459: int gotoeol(int, int);
460: int forwchar(int, int);
461: int gotobob(int, int);
462: int gotoeob(int, int);
463: int forwline(int, int);
464: int backline(int, int);
465: void setgoal(void);
466: int getgoal(LINE *);
467: int forwpage(int, int);
468: int backpage(int, int);
469: int forw1page(int, int);
470: int back1page(int, int);
471: int pagenext(int, int);
472: void isetmark(void);
473: int setmark(int, int);
474: int swapmark(int, int);
475: int gotoline(int, int);
1.5 millert 476:
477: /* random.c X */
1.29 millert 478: int showcpos(int, int);
479: int getcolpos(void);
480: int twiddle(int, int);
481: int openline(int, int);
482: int newline(int, int);
483: int deblank(int, int);
484: int justone(int, int);
485: int delwhite(int, int);
486: int indent(int, int);
487: int forwdel(int, int);
488: int backdel(int, int);
489: int killline(int, int);
490: int yank(int, int);
491: int space_to_tabstop(int, int);
1.5 millert 492:
493: /* extend.c X */
1.29 millert 494: int insert(int, int);
495: int bindtokey(int, int);
496: int localbind(int, int);
497: int define_key(int, int);
498: int unbindtokey(int, int);
499: int localunbind(int, int);
500: int extend(int, int);
501: int evalexpr(int, int);
502: int evalbuffer(int, int);
503: int evalfile(int, int);
1.36 vincent 504: int load(const char *);
1.29 millert 505: int excline(char *);
1.5 millert 506:
507: /* help.c X */
1.29 millert 508: int desckey(int, int);
509: int wallchart(int, int);
510: int help_help(int, int);
511: int apropos_command(int, int);
1.5 millert 512:
513: /* paragraph.c X */
1.29 millert 514: int gotobop(int, int);
515: int gotoeop(int, int);
516: int fillpara(int, int);
517: int killpara(int, int);
518: int fillword(int, int);
519: int setfillcol(int, int);
1.5 millert 520:
521: /* word.c X */
1.29 millert 522: int backword(int, int);
523: int forwword(int, int);
524: int upperword(int, int);
525: int lowerword(int, int);
526: int capword(int, int);
527: int delfword(int, int);
528: int delbword(int, int);
529: int inword(void);
1.5 millert 530:
531: /* region.c X */
1.29 millert 532: int killregion(int, int);
533: int copyregion(int, int);
534: int lowerregion(int, int);
535: int upperregion(int, int);
536: int prefixregion(int, int);
537: int setprefix(int, int);
1.30 vincent 538: int region_get_data(REGION *, char *, int);
539: int region_put_data(const char *, int);
1.5 millert 540:
541: /* search.c X */
1.29 millert 542: int forwsearch(int, int);
543: int backsearch(int, int);
544: int searchagain(int, int);
545: int forwisearch(int, int);
546: int backisearch(int, int);
547: int queryrepl(int, int);
548: int forwsrch(void);
549: int backsrch(void);
550: int readpattern(char *);
1.5 millert 551:
552: /* spawn.c X */
1.29 millert 553: int spawncli(int, int);
1.5 millert 554:
555: /* ttykbd.c X */
1.29 millert 556: void ttykeymapinit(void);
557: void ttykeymaptidy(void);
1.5 millert 558:
559: /* match.c X */
1.29 millert 560: int showmatch(int, int);
1.5 millert 561:
562: /* version.c X */
1.29 millert 563: int showversion(int, int);
1.5 millert 564:
565: #ifndef NO_MACRO
566: /* macro.c X */
1.29 millert 567: int definemacro(int, int);
568: int finishmacro(int, int);
569: int executemacro(int, int);
1.5 millert 570: #endif /* !NO_MACRO */
571:
572: /* modes.c X */
1.29 millert 573: int indentmode(int, int);
574: int fillmode(int, int);
575: int blinkparen(int, int);
1.5 millert 576: #ifdef NOTAB
1.29 millert 577: int notabmode(int, int);
1.5 millert 578: #endif /* NOTAB */
1.29 millert 579: int overwrite(int, int);
580: int set_default_mode(int,int);
1.5 millert 581:
582: #ifdef REGEX
583: /* re_search.c X */
1.29 millert 584: int re_forwsearch(int, int);
585: int re_backsearch(int, int);
586: int re_searchagain(int, int);
587: int re_queryrepl(int, int);
1.61 cloder 588: int replstr(int, int);
1.29 millert 589: int setcasefold(int, int);
590: int delmatchlines(int, int);
591: int delnonmatchlines(int, int);
592: int cntmatchlines(int, int);
593: int cntnonmatchlines(int, int);
1.5 millert 594: #endif /* REGEX */
1.1 deraadt 595:
1.30 vincent 596: /* undo.c X */
1.35 vincent 597: void free_undo_record(struct undo_rec *);
1.47 vincent 598: int undo_dump(int, int);
1.30 vincent 599: int undo_enable(int);
600: int undo_add_boundary(void);
601: int undo_add_insert(LINE *, int, int);
602: int undo_add_delete(LINE *, int, int);
1.65 kjell 603: void undo_no_boundary(int);
1.30 vincent 604: int undo_add_change(LINE *, int, int);
1.32 vincent 605: int undo(int, int);
1.41 vincent 606:
607: /* autoexec.c X */
608: int auto_execute(int, int);
609: PF *find_autoexec(const char *);
610: int add_autoexec(const char *, const char *);
1.46 vincent 611:
612: /* mail.c X */
613: void mail_init(void);
1.66 kjell 614:
615: /* grep.c X */
616: int next_error(int, int);
1.30 vincent 617:
1.1 deraadt 618: /*
619: * Externals.
620: */
1.5 millert 621: extern BUFFER *bheadp;
622: extern BUFFER *curbp;
623: extern MGWIN *curwp;
624: extern MGWIN *wheadp;
625: extern int thisflag;
626: extern int lastflag;
627: extern int curgoal;
1.45 deraadt 628: extern int startrow;
1.5 millert 629: extern int epresf;
630: extern int sgarbf;
631: extern int mode;
632: extern int nrow;
633: extern int ncol;
634: extern int ttrow;
635: extern int ttcol;
636: extern int tttop;
637: extern int ttbot;
638: extern int tthue;
639: extern int defb_nmodes;
640: extern int defb_flag;
1.17 mickey 641: extern const char cinfo[];
1.5 millert 642: extern char *keystrings[];
1.25 vincent 643: extern char pat[NPAT];
1.5 millert 644: #ifndef NO_DPROMPT
645: extern char prompt[];
646: #endif /* !NO_DPROMPT */
647:
648: /*
649: * Globals.
650: */
651: int tceeol;
652: int tcinsl;
653: int tcdell;