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