kernel - cleanup vfs_cache debugging
[dragonfly.git] / contrib / nvi2 / cl / cl.h
blobbad79b1473f12285f4a78f062bd1f0b98d036a2b
1 /*-
2 * Copyright (c) 1993, 1994
3 * The Regents of the University of California. All rights reserved.
4 * Copyright (c) 1993, 1994, 1995, 1996
5 * Keith Bostic. All rights reserved.
7 * See the LICENSE file for redistribution information.
9 * $Id: cl.h,v 10.34 2011/08/15 20:07:32 zy Exp $
12 #ifdef USE_WIDECHAR
13 #define _XOPEN_SOURCE_EXTENDED
14 #endif
15 #ifdef HAVE_NCURSES_H
16 #include <ncurses.h>
17 #else
18 #include <curses.h>
19 #endif
21 typedef struct _cl_private {
22 char ibuf[256]; /* Input keys. */
24 size_t skip; /* Remaining keys. */
26 CONVWIN cw; /* Conversion buffer. */
28 int eof_count; /* EOF count. */
30 struct termios orig; /* Original terminal values. */
31 struct termios ex_enter;/* Terminal values to enter ex. */
32 struct termios vi_enter;/* Terminal values to enter vi. */
34 char *el; /* Clear to EOL terminal string. */
35 char *cup; /* Cursor movement terminal string. */
36 char *cuu1; /* Cursor up terminal string. */
37 char *rmso, *smso; /* Inverse video terminal strings. */
38 char *smcup, *rmcup; /* Terminal start/stop strings. */
40 char *oname; /* Original screen window name. */
42 SCR *focus; /* Screen that has the "focus". */
44 int killersig; /* Killer signal. */
45 #define INDX_HUP 0
46 #define INDX_INT 1
47 #define INDX_TERM 2
48 #define INDX_WINCH 3
49 #define INDX_MAX 4 /* Original signal information. */
50 struct sigaction oact[INDX_MAX];
52 enum { /* Tty group write mode. */
53 TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;
55 enum { /* Terminal initialization strings. */
56 TE_SENT=0, TI_SENT } ti_te;
58 #define CL_IN_EX 0x0001 /* Currently running ex. */
59 #define CL_LAYOUT 0x0002 /* Screen layout changed. */
60 #define CL_RENAME 0x0004 /* X11 xterm icon/window renamed. */
61 #define CL_RENAME_OK 0x0008 /* User wants the windows renamed. */
62 #define CL_SCR_EX_INIT 0x0010 /* Ex screen initialized. */
63 #define CL_SCR_VI_INIT 0x0020 /* Vi screen initialized. */
64 #define CL_SIGHUP 0x0040 /* SIGHUP arrived. */
65 #define CL_SIGINT 0x0080 /* SIGINT arrived. */
66 #define CL_SIGTERM 0x0100 /* SIGTERM arrived. */
67 #define CL_SIGWINCH 0x0200 /* SIGWINCH arrived. */
68 #define CL_STDIN_TTY 0x0400 /* Talking to a terminal. */
69 u_int32_t flags;
70 } CL_PRIVATE;
72 #define CLP(sp) ((CL_PRIVATE *)((sp)->gp->cl_private))
73 #define GCLP(gp) ((CL_PRIVATE *)gp->cl_private)
74 #define CLSP(sp) ((WINDOW *)((sp)->cl_private))
76 /* Return possibilities from the keyboard read routine. */
77 typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;
79 /* The screen position relative to a specific window. */
80 #define RCNO(sp, cno) (cno)
81 #define RLNO(sp, lno) (lno)
83 #include "cl_extern.h"