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