reset screen offset of top line if it exceeds the number of screens
[nvi.git] / common / common.h
blob45ac7686e4c5643d2549ef7565013bc42ebeffeb
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.
7 * See the LICENSE file for redistribution information.
9 * $Id: common.h,v 10.20 2002/03/02 23:36:22 skimo Exp $ (Berkeley) $Date: 2002/03/02 23:36:22 $
13 * Avoid include sys/types.h after definition of pgno_t
15 #include <sys/types.h>
16 #include <sys/queue.h>
17 #include <bitstring.h>
19 * Porting information built at configuration time. Included before
20 * any of nvi's include files.
22 #include "port.h"
25 * Pseudo-local includes. These are files that are unlikely to exist
26 * on most machines to which we're porting vi, and we want to include
27 * them in a very specific order, regardless.
29 #include "vi_db.h"
30 #include <regex.h>
33 * Forward structure declarations. Not pretty, but the include files
34 * are far too interrelated for a clean solution.
36 typedef struct _cb CB;
37 typedef struct _csc CSC;
38 typedef struct _conv CONV;
39 typedef struct _conv_win CONVWIN;
40 typedef struct _event EVENT;
41 typedef struct _excmd EXCMD;
42 typedef struct _exf EXF;
43 typedef struct _fref FREF;
44 typedef struct _gs GS;
45 typedef struct _lmark LMARK;
46 typedef struct _mark MARK;
47 typedef struct _msg MSGS;
48 typedef struct _option OPTION;
49 typedef struct _optlist OPTLIST;
50 typedef struct _scr SCR;
51 typedef struct _script SCRIPT;
52 typedef struct _seq SEQ;
53 typedef struct _tag TAG;
54 typedef struct _tagf TAGF;
55 typedef struct _tagq TAGQ;
56 typedef struct _text TEXT;
57 typedef struct _win WIN;
59 /* Autoindent state. */
60 typedef enum { C_NOTSET, C_CARATSET, C_ZEROSET } carat_t;
62 /* Busy message types. */
63 typedef enum { BUSY_ON = 1, BUSY_OFF, BUSY_UPDATE } busy_t;
66 * Routines that return a confirmation return:
68 * CONF_NO User answered no.
69 * CONF_QUIT User answered quit, eof or an error.
70 * CONF_YES User answered yes.
72 typedef enum { CONF_NO, CONF_QUIT, CONF_YES } conf_t;
74 /* Directions. */
75 typedef enum { NOTSET, FORWARD, BACKWARD } dir_t;
77 /* Line operations. */
78 typedef enum { LINE_APPEND, LINE_DELETE, LINE_INSERT, LINE_RESET } lnop_t;
80 /* Lock return values. */
81 typedef enum { LOCK_FAILED, LOCK_SUCCESS, LOCK_UNAVAIL } lockr_t;
83 /* Sequence types. */
84 typedef enum { SEQ_ABBREV, SEQ_COMMAND, SEQ_INPUT } seq_t;
87 * Local includes.
89 #include "key.h" /* Required by args.h. */
90 #include "args.h" /* Required by options.h. */
91 #include "options.h" /* Required by screen.h. */
93 #include "msg.h" /* Required by gs.h. */
94 #include "cut.h" /* Required by gs.h. */
95 #include "seq.h" /* Required by screen.h. */
96 #include "util.h" /* Required by ex.h. */
97 #include "mark.h" /* Required by gs.h. */
98 #include "conv.h" /* Required by ex.h and screen.h */
99 #include "../ex/ex.h" /* Required by gs.h. */
100 #include "gs.h" /* Required by screen.h. */
101 #include "log.h" /* Required by screen.h */
102 #include "screen.h" /* Required by exf.h. */
103 #include "exf.h"
104 #include "mem.h"
105 #ifndef USE_BUNDLED_DB
106 #include "vi_auto.h"
107 #endif
109 #include "extern.h"