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