1 /*- 2 * Copyright (c) 1991, 1993, 1994 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 1991, 1993, 1994, 1995, 1996 5 * Keith Bostic. All rights reserved. 6 * 7 * See the LICENSE file for redistribution information. 8 */ 9 10 #include "/usr/include/db.h" /* Only include db1. */ 11 #include <regex.h> /* May refer to the bundled regex. */ 12 13 /* 14 * Forward structure declarations. Not pretty, but the include files 15 * are far too interrelated for a clean solution. 16 */ 17 typedef struct _cb CB; 18 typedef struct _csc CSC; 19 typedef struct _conv CONV; 20 typedef struct _conv_win CONVWIN; 21 typedef struct _event EVENT; 22 typedef struct _excmd EXCMD; 23 typedef struct _exf EXF; 24 typedef struct _fref FREF; 25 typedef struct _gs GS; 26 typedef struct _lmark LMARK; 27 typedef struct _mark MARK; 28 typedef struct _msg MSGS; 29 typedef struct _option OPTION; 30 typedef struct _optlist OPTLIST; 31 typedef struct _scr SCR; 32 typedef struct _script SCRIPT; 33 typedef struct _seq SEQ; 34 typedef struct _tag TAG; 35 typedef struct _tagf TAGF; 36 typedef struct _tagq TAGQ; 37 typedef struct _text TEXT; 38 39 /* Autoindent state. */ 40 typedef enum { C_NOTSET, C_CARATSET, C_ZEROSET } carat_t; 41 42 /* Busy message types. */ 43 typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t; 44 45 /* 46 * Routines that return a confirmation return: 47 * 48 * CONF_NO User answered no. 49 * CONF_QUIT User answered quit, eof or an error. 50 * CONF_YES User answered yes. 51 */ 52 typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t; 53 54 /* Directions. */ 55 typedef enum { NOTSET, FORWARD, BACKWARD } dir_t; 56 57 /* Line operations. */ 58 typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t; 59 60 /* Lock return values. */ 61 typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t; 62 63 /* Sequence types. */ 64 typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t; 65 66 /* 67 * Local includes. 68 */ 69 #include "key.h" /* Required by args.h. */ 70 #include "args.h" /* Required by options.h. */ 71 #include "options.h" /* Required by screen.h. */ 72 73 #include "msg.h" /* Required by gs.h. */ 74 #include "cut.h" /* Required by gs.h. */ 75 #include "seq.h" /* Required by screen.h. */ 76 #include "util.h" /* Required by ex.h. */ 77 #include "mark.h" /* Required by gs.h. */ 78 #include "conv.h" /* Required by ex.h and screen.h */ 79 #include "../ex/ex.h" /* Required by gs.h. */ 80 #include "gs.h" /* Required by screen.h. */ 81 #include "screen.h" /* Required by exf.h. */ 82 #include "exf.h" 83 #include "log.h" 84 #include "mem.h" 85 86 #include "extern.h" 87