[BACK]Return to def.h CVS log [TXT][DIR] Up to [local] / src / usr.bin / mg

Annotation of src/usr.bin/mg/def.h, Revision 1.29

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