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 * @(#)common.h 10.13 (Berkeley) 9/25/96 10 */ 11 12 /* 13 * Porting information built at configuration time. Included before 14 * any of nvi's include files. 15 */ 16 #include "port.h" 17 18 /* 19 * Pseudo-local includes. These are files that are unlikely to exist 20 * on most machines to which we're porting vi, and we want to include 21 * them in a very specific order, regardless. 22 */ 23 #include <db.h> 24 #include <regex.h> 25 26 /* 27 * Forward structure declarations. Not pretty, but the include files 28 * are far too interrelated for a clean solution. 29 */ 30 typedef struct _cb CB; 31 typedef struct _csc CSC; 32 typedef struct _event EVENT; 33 typedef struct _excmd EXCMD; 34 typedef struct _exf EXF; 35 typedef struct _fref FREF; 36 typedef struct _gs GS; 37 typedef struct _lmark LMARK; 38 typedef struct _mark MARK; 39 typedef struct _msg MSGS; 40 typedef struct _option OPTION; 41 typedef struct _optlist OPTLIST; 42 typedef struct _scr SCR; 43 typedef struct _script SCRIPT; 44 typedef struct _seq SEQ; 45 typedef struct _tag TAG; 46 typedef struct _tagf TAGF; 47 typedef struct _tagq TAGQ; 48 typedef struct _text TEXT; 49 50 /* Autoindent state. */ 51 typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t; 52 53 /* Busy message types. */ 54 typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t; 55 56 /* 57 * Routines that return a confirmation return: 58 * 59 * CONF_NO User answered no. 60 * CONF_QUIT User answered quit, eof or an error. 61 * CONF_YES User answered yes. 62 */ 63 typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t; 64 65 /* Directions. */ 66 typedef enum { NOTSET, FORWARD, BACKWARD } dir_t; 67 68 /* Line operations. */ 69 typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t; 70 71 /* Lock return values. */ 72 typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t; 73 74 /* Sequence types. */ 75 typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t; 76 77 /* 78 * Local includes. 79 */ 80 #include "key.h" /* Required by args.h. */ 81 #include "args.h" /* Required by options.h. */ 82 #include "options.h" /* Required by screen.h. */ 83 84 #include "msg.h" /* Required by gs.h. */ 85 #include "cut.h" /* Required by gs.h. */ 86 #include "seq.h" /* Required by screen.h. */ 87 #include "util.h" /* Required by ex.h. */ 88 #include "mark.h" /* Required by gs.h. */ 89 #include "../ex/ex.h" /* Required by gs.h. */ 90 #include "gs.h" /* Required by screen.h. */ 91 #include "screen.h" /* Required by exf.h. */ 92 #include "exf.h" 93 #include "log.h" 94 #include "mem.h" 95 96 #include "com_extern.h" 97