1/* $NetBSD: common.h,v 1.2 2008/05/20 17:38:19 aymeric Exp $ */ 2 3/*- 4 * Copyright (c) 1991, 1993, 1994 5 * The Regents of the University of California. All rights reserved. 6 * Copyright (c) 1991, 1993, 1994, 1995, 1996 7 * Keith Bostic. All rights reserved. 8 * 9 * See the LICENSE file for redistribution information. 10 * 11 * Id: common.h,v 10.20 2002/03/02 23:36:22 skimo Exp (Berkeley) Date: 2002/03/02 23:36:22 12 */ 13 14/* 15 * Avoid include sys/types.h after definition of pgno_t 16 */ 17#include <sys/types.h> 18#include <sys/queue.h> 19#include <bitstring.h> 20/* 21 * Porting information built at configuration time. Included before 22 * any of nvi's include files. 23 */ 24#include "port.h" 25 26/* 27 * Pseudo-local includes. These are files that are unlikely to exist 28 * on most machines to which we're porting vi, and we want to include 29 * them in a very specific order, regardless. 30 */ 31#include "db.h" 32#include <regex.h> 33 34/* 35 * Forward structure declarations. Not pretty, but the include files 36 * are far too interrelated for a clean solution. 37 */ 38typedef struct _cb CB; 39typedef struct _csc CSC; 40typedef struct _conv CONV; 41typedef struct _conv_win CONVWIN; 42typedef struct _event EVENT; 43typedef struct _excmd EXCMD; 44typedef struct _exf EXF; 45typedef struct _fref FREF; 46typedef struct _gs GS; 47typedef struct _lmark LMARK; 48typedef struct _mark MARK; 49typedef struct _msg MSGS; 50typedef struct _option OPTION; 51typedef struct _optlist OPTLIST; 52typedef struct _scr SCR; 53typedef struct _script SCRIPT; 54typedef struct _seq SEQ; 55typedef struct _tag TAG; 56typedef struct _tagf TAGF; 57typedef struct _tagq TAGQ; 58typedef struct _text TEXT; 59typedef struct _win WIN; 60 61/* Autoindent state. */ 62typedef enum { C_NOTSET, C_CARATSET, C_NOCHANGE, C_ZEROSET } carat_t; 63 64/* Busy message types. */ 65typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t; 66 67/* 68 * Routines that return a confirmation return: 69 * 70 * CONF_NO User answered no. 71 * CONF_QUIT User answered quit, eof or an error. 72 * CONF_YES User answered yes. 73 */ 74typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t; 75 76/* Directions. */ 77typedef enum { NOTSET, FORWARD, BACKWARD } dir_t; 78 79/* Line operations. */ 80typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t; 81 82/* Lock return values. */ 83typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t; 84 85/* Sequence types. */ 86typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t; 87 88#define ENTIRE_LINE ((size_t)-1) 89/* 90 * Local includes. 91 */ 92#include "key.h" /* Required by args.h. */ 93#include "args.h" /* Required by options.h. */ 94#include "options.h" /* Required by screen.h. */ 95 96#include "msg.h" /* Required by gs.h. */ 97#include "cut.h" /* Required by gs.h. */ 98#include "seq.h" /* Required by screen.h. */ 99#include "util.h" /* Required by ex.h. */ 100#include "mark.h" /* Required by gs.h. */ 101#include "conv.h" /* Required by ex.h and screen.h */ 102#include "../ex/ex.h" /* Required by gs.h. */ 103#include "gs.h" /* Required by screen.h. */ 104#include "log.h" /* Required by screen.h */ 105#include "screen.h" /* Required by exf.h. */ 106#include "exf.h" 107#include "mem.h" 108#if defined(USE_DB4_LOGGING) 109#include "vi_auto.h" 110#endif 111 112#include "extern.h" 113