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