update to 1.01
[nvi.git] / common / gs.h
blob9c333de675a1bfe4ca42222ddcf904215d3cb5de
1 /*-
2 * Copyright (c) 1993
3 * The Regents of the University of California. All rights reserved.
5 * %sccs.include.redist.c%
7 * $Id: gs.h,v 8.26 1994/01/09 14:20:11 bostic Exp $ (Berkeley) $Date: 1994/01/09 14:20:11 $
8 */
10 struct _gs {
11 CIRCLEQ_HEAD(_dqh, _scr) dq; /* Displayed screens. */
12 CIRCLEQ_HEAD(_hqh, _scr) hq; /* Hidden screens. */
14 mode_t origmode; /* Original terminal mode. */
15 struct termios
16 original_termios; /* Original terminal values. */
17 struct termios
18 s5_curses_botch; /* System V curses workaround. */
20 MSGH msgq; /* User message list. */
22 char *tmp_bp; /* Temporary buffer. */
23 size_t tmp_blen; /* Size of temporary buffer. */
25 #ifdef DEBUG
26 FILE *tracefp; /* Trace file pointer. */
27 #endif
29 /* INFORMATION SHARED BY ALL SCREENS. */
30 IBUF *tty; /* Key input buffer. */
32 CB *dcbp; /* Default cut buffer pointer. */
33 CB *dcb_store; /* Default cut buffer storage. */
34 LIST_HEAD(_cuth, _cb) cutq; /* Linked list of cut buffers. */
36 #define MAX_BIT_SEQ 128 /* Max + 1 fast check character. */
37 LIST_HEAD(_seqh, _seq) seqq; /* Linked list of maps, abbrevs. */
38 bitstr_t bit_decl(seqb, MAX_BIT_SEQ);
40 #define term_key_val(sp, ch) \
41 ((ch) <= MAX_FAST_KEY ? sp->gp->special_key[ch] : \
42 (ch) > sp->gp->max_special ? 0 : __term_key_val(sp, ch))
43 #define MAX_FAST_KEY 255 /* Max + 1 fast check character.*/
44 CHAR_T max_special; /* Max special character. */
45 u_char *special_key; /* Fast lookup table. */
46 CHNAME const *cname; /* Display names of ASCII characters. */
48 #define G_ABBREV 0x00001 /* If have abbreviations. */
49 #define G_BELLSCHED 0x00002 /* Bell scheduled. */
50 #define G_CURSES_INIT 0x00004 /* Curses: initialized. */
51 #define G_CURSES_S5CB 0x00008 /* Curses: s5_curses_botch set. */
52 #define G_ISFROMTTY 0x00010 /* Reading from a tty. */
53 #define G_RECOVER_SET 0x00020 /* Recover system initialized. */
54 #define G_SETMODE 0x00040 /* Tty mode changed. */
55 #define G_SIGALRM 0x00080 /* SIGALRM arrived. */
56 #define G_SIGHUP 0x00100 /* SIGHUP arrived. */
57 #define G_SIGTERM 0x00200 /* SIGTERM arrived. */
58 #define G_SIGWINCH 0x00400 /* SIGWINCH arrived. */
59 #define G_SLEEPING 0x00800 /* Asleep (die on signal). */
60 #define G_SNAPSHOT 0x01000 /* Always snapshot files. */
61 #define G_TMP_INUSE 0x02000 /* Temporary buffer in use. */
62 u_int flags;
65 extern GS *__global_list; /* List of screens. */