Annotation of src/usr.bin/mg/def.h, Revision 1.72
1.72 ! kjell 1: /* $OpenBSD: def.h,v 1.71 2005/10/14 06:41:47 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:
1.71 kjell 324: #ifndef NO_DIRED
1.4 millert 325: /* dired.c */
1.71 kjell 326: BUFFER *dired_(char *);
327: #endif /* !NO_DIRED */
1.5 millert 328:
329: /* file.c X */
1.29 millert 330: int fileinsert(int, int);
331: int filevisit(int, int);
1.62 jason 332: int filevisitalt(int, int);
1.40 vincent 333: int filevisitro(int, int);
1.29 millert 334: int poptofile(int, int);
335: BUFFER *findbuffer(char *);
336: int readin(char *);
337: int insertfile(char *, char *, int);
338: int filewrite(int, int);
339: int filesave(int, int);
340: int buffsave(BUFFER *);
341: int makebkfile(int, int);
342: int writeout(BUFFER *, char *);
343: void upmodes(BUFFER *);
1.5 millert 344:
345: /* line.c X */
1.29 millert 346: LINE *lalloc(int);
347: int lrealloc(LINE *, int);
348: void lfree(LINE *);
349: void lchange(int);
1.54 vincent 350: int linsert_str(const char *, int);
1.29 millert 351: int linsert(int, int);
1.55 vincent 352: int lnewline_at(LINE *, int);
1.29 millert 353: int lnewline(void);
354: int ldelete(RSIZE, int);
355: int ldelnewline(void);
356: int lreplace(RSIZE, char *, int);
357: void kdelete(void);
358: int kinsert(int, int);
359: int kremove(int);
1.5 millert 360:
361: /* window.c X */
1.50 vincent 362: MGWIN *new_window(BUFFER *);
363: void free_window(MGWIN *);
1.29 millert 364: int reposition(int, int);
365: int refresh(int, int);
366: int nextwind(int, int);
367: int prevwind(int, int);
368: int onlywind(int, int);
369: int splitwind(int, int);
370: int enlargewind(int, int);
371: int shrinkwind(int, int);
372: int delwind(int, int);
373: MGWIN *wpopup(void);
1.4 millert 374:
375: /* buffer.c */
1.47 vincent 376: int togglereadonly(int, int);
1.36 vincent 377: BUFFER *bfind(const char *, int);
1.29 millert 378: int poptobuffer(int, int);
1.57 jfb 379: int killbuffer(BUFFER *);
380: int killbuffer_cmd(int, int);
1.29 millert 381: int savebuffers(int, int);
382: int listbuffers(int, int);
383: int addlinef(BUFFER *, char *, ...);
1.12 art 384: #define addline(bp, text) addlinef(bp, "%s", text)
1.29 millert 385: int anycb(int);
386: int bclear(BUFFER *);
387: int showbuffer(BUFFER *, MGWIN *, int);
388: MGWIN *popbuf(BUFFER *);
389: int bufferinsert(int, int);
390: int usebuffer(int, int);
391: int notmodified(int, int);
392: int popbuftop(BUFFER *);
1.4 millert 393:
394: /* display.c */
1.29 millert 395: int vtresize(int, int, int);
396: void vtinit(void);
397: void vttidy(void);
398: void update(void);
1.5 millert 399:
400: /* echo.c X */
1.29 millert 401: void eerase(void);
1.36 vincent 402: int eyorn(const char *);
403: int eyesno(const char *);
1.29 millert 404: void ewprintf(const char *fmt, ...);
1.56 vincent 405: char *ereply(const char *, char *, size_t, ...);
406: char *eread(const char *, char *, size_t, int, ...);
1.29 millert 407: int getxtra(LIST *, LIST *, int, int);
408: void free_file_list(LIST *);
1.4 millert 409:
410: /* fileio.c */
1.36 vincent 411: int ffropen(const char *, BUFFER *);
412: int ffwopen(const char *, BUFFER *);
1.29 millert 413: int ffclose(BUFFER *);
414: int ffputbuf(BUFFER *);
415: int ffgetline(char *, int, int *);
1.36 vincent 416: int fbackupfile(const char *);
417: char *adjustname(const char *);
1.29 millert 418: char *startupfile(char *);
419: int copy(char *, char *);
420: LIST *make_file_list(char *);
1.70 kjell 421: int fisdir(const char *);
1.4 millert 422:
1.5 millert 423: /* kbd.c X */
1.29 millert 424: int do_meta(int, int);
425: int bsmap(int, int);
426: void ungetkey(int);
427: int getkey(int);
428: int doin(void);
429: int rescan(int, int);
430: int universal_argument(int, int);
431: int digit_argument(int, int);
432: int negative_argument(int, int);
433: int selfinsert(int, int);
434: int quote(int, int);
1.4 millert 435:
436: /* main.c */
1.29 millert 437: int ctrlg(int, int);
438: int quit(int, int);
1.4 millert 439:
440: /* ttyio.c */
1.60 db 441: void panic(char *);
1.4 millert 442:
443: /* cinfo.c */
1.29 millert 444: char *keyname(char *, size_t, int);
1.4 millert 445:
446: /* basic.c */
1.29 millert 447: int gotobol(int, int);
448: int backchar(int, int);
449: int gotoeol(int, int);
450: int forwchar(int, int);
451: int gotobob(int, int);
452: int gotoeob(int, int);
453: int forwline(int, int);
454: int backline(int, int);
455: void setgoal(void);
456: int getgoal(LINE *);
457: int forwpage(int, int);
458: int backpage(int, int);
459: int forw1page(int, int);
460: int back1page(int, int);
461: int pagenext(int, int);
462: void isetmark(void);
463: int setmark(int, int);
464: int swapmark(int, int);
465: int gotoline(int, int);
1.5 millert 466:
467: /* random.c X */
1.29 millert 468: int showcpos(int, int);
469: int getcolpos(void);
470: int twiddle(int, int);
471: int openline(int, int);
472: int newline(int, int);
473: int deblank(int, int);
474: int justone(int, int);
475: int delwhite(int, int);
476: int indent(int, int);
477: int forwdel(int, int);
478: int backdel(int, int);
479: int killline(int, int);
480: int yank(int, int);
481: int space_to_tabstop(int, int);
1.5 millert 482:
483: /* extend.c X */
1.29 millert 484: int insert(int, int);
485: int bindtokey(int, int);
486: int localbind(int, int);
487: int define_key(int, int);
488: int unbindtokey(int, int);
489: int localunbind(int, int);
490: int extend(int, int);
491: int evalexpr(int, int);
492: int evalbuffer(int, int);
493: int evalfile(int, int);
1.36 vincent 494: int load(const char *);
1.29 millert 495: int excline(char *);
1.5 millert 496:
497: /* help.c X */
1.29 millert 498: int desckey(int, int);
499: int wallchart(int, int);
500: int help_help(int, int);
501: int apropos_command(int, int);
1.5 millert 502:
503: /* paragraph.c X */
1.29 millert 504: int gotobop(int, int);
505: int gotoeop(int, int);
506: int fillpara(int, int);
507: int killpara(int, int);
508: int fillword(int, int);
509: int setfillcol(int, int);
1.5 millert 510:
511: /* word.c X */
1.29 millert 512: int backword(int, int);
513: int forwword(int, int);
514: int upperword(int, int);
515: int lowerword(int, int);
516: int capword(int, int);
517: int delfword(int, int);
518: int delbword(int, int);
519: int inword(void);
1.5 millert 520:
521: /* region.c X */
1.29 millert 522: int killregion(int, int);
523: int copyregion(int, int);
524: int lowerregion(int, int);
525: int upperregion(int, int);
526: int prefixregion(int, int);
527: int setprefix(int, int);
1.30 vincent 528: int region_get_data(REGION *, char *, int);
529: int region_put_data(const char *, int);
1.5 millert 530:
531: /* search.c X */
1.29 millert 532: int forwsearch(int, int);
533: int backsearch(int, int);
534: int searchagain(int, int);
535: int forwisearch(int, int);
536: int backisearch(int, int);
537: int queryrepl(int, int);
538: int forwsrch(void);
539: int backsrch(void);
540: int readpattern(char *);
1.5 millert 541:
542: /* spawn.c X */
1.29 millert 543: int spawncli(int, int);
1.5 millert 544:
545: /* ttykbd.c X */
1.29 millert 546: void ttykeymapinit(void);
547: void ttykeymaptidy(void);
1.5 millert 548:
549: /* match.c X */
1.29 millert 550: int showmatch(int, int);
1.5 millert 551:
552: /* version.c X */
1.29 millert 553: int showversion(int, int);
1.5 millert 554:
555: #ifndef NO_MACRO
556: /* macro.c X */
1.29 millert 557: int definemacro(int, int);
558: int finishmacro(int, int);
559: int executemacro(int, int);
1.5 millert 560: #endif /* !NO_MACRO */
561:
562: /* modes.c X */
1.29 millert 563: int indentmode(int, int);
564: int fillmode(int, int);
565: int blinkparen(int, int);
1.5 millert 566: #ifdef NOTAB
1.29 millert 567: int notabmode(int, int);
1.5 millert 568: #endif /* NOTAB */
1.29 millert 569: int overwrite(int, int);
570: int set_default_mode(int,int);
1.5 millert 571:
572: #ifdef REGEX
573: /* re_search.c X */
1.29 millert 574: int re_forwsearch(int, int);
575: int re_backsearch(int, int);
576: int re_searchagain(int, int);
577: int re_queryrepl(int, int);
1.61 cloder 578: int replstr(int, int);
1.29 millert 579: int setcasefold(int, int);
580: int delmatchlines(int, int);
581: int delnonmatchlines(int, int);
582: int cntmatchlines(int, int);
583: int cntnonmatchlines(int, int);
1.5 millert 584: #endif /* REGEX */
1.1 deraadt 585:
1.30 vincent 586: /* undo.c X */
1.35 vincent 587: void free_undo_record(struct undo_rec *);
1.47 vincent 588: int undo_dump(int, int);
1.30 vincent 589: int undo_enable(int);
590: int undo_add_boundary(void);
591: int undo_add_insert(LINE *, int, int);
592: int undo_add_delete(LINE *, int, int);
1.65 kjell 593: void undo_no_boundary(int);
1.30 vincent 594: int undo_add_change(LINE *, int, int);
1.32 vincent 595: int undo(int, int);
1.41 vincent 596:
597: /* autoexec.c X */
598: int auto_execute(int, int);
599: PF *find_autoexec(const char *);
600: int add_autoexec(const char *, const char *);
1.46 vincent 601:
602: /* mail.c X */
603: void mail_init(void);
1.66 kjell 604:
605: /* grep.c X */
606: int next_error(int, int);
1.30 vincent 607:
1.1 deraadt 608: /*
609: * Externals.
610: */
1.5 millert 611: extern BUFFER *bheadp;
612: extern BUFFER *curbp;
613: extern MGWIN *curwp;
614: extern MGWIN *wheadp;
615: extern int thisflag;
616: extern int lastflag;
617: extern int curgoal;
1.45 deraadt 618: extern int startrow;
1.5 millert 619: extern int epresf;
620: extern int sgarbf;
621: extern int mode;
622: extern int nrow;
623: extern int ncol;
624: extern int ttrow;
625: extern int ttcol;
626: extern int tttop;
627: extern int ttbot;
628: extern int tthue;
629: extern int defb_nmodes;
630: extern int defb_flag;
1.17 mickey 631: extern const char cinfo[];
1.5 millert 632: extern char *keystrings[];
1.25 vincent 633: extern char pat[NPAT];
1.5 millert 634: #ifndef NO_DPROMPT
635: extern char prompt[];
636: #endif /* !NO_DPROMPT */
637:
638: /*
639: * Globals.
640: */
641: int tceeol;
642: int tcinsl;
643: int tcdell;