Display single column Unicode characters in one column.
[nvi.git] / cl / cl.h
blobdfbe733a472cd5ff0bab2b0c5a0c08a6e4614ce7
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.24 2000/07/23 11:14:44 skimo Exp $ (Berkeley) $Date: 2000/07/23 11:14:44 $
11 #ifdef HAVE_NCURSES_H
12 #include <ncurses.h>
13 #else
14 #include <curses.h>
15 #endif
17 typedef struct _cl_private {
18 CHAR_T ibuf[256]; /* Input keys. */
20 int eof_count; /* EOF count. */
22 struct termios orig; /* Original terminal values. */
23 struct termios ex_enter;/* Terminal values to enter ex. */
24 struct termios vi_enter;/* Terminal values to enter vi. */
26 char *el; /* Clear to EOL terminal string. */
27 char *cup; /* Cursor movement terminal string. */
28 char *cuu1; /* Cursor up terminal string. */
29 char *rmso, *smso; /* Inverse video terminal strings. */
30 char *smcup, *rmcup; /* Terminal start/stop strings. */
32 char *oname; /* Original screen window name. */
34 int killersig; /* Killer signal. */
35 #define INDX_HUP 0
36 #define INDX_INT 1
37 #define INDX_TERM 2
38 #define INDX_WINCH 3
39 #define INDX_MAX 4 /* Original signal information. */
40 struct sigaction oact[INDX_MAX];
42 enum { /* Tty group write mode. */
43 TGW_UNKNOWN=0, TGW_SET, TGW_UNSET } tgw;
45 enum { /* Terminal initialization strings. */
46 TE_SENT=0, TI_SENT } ti_te;
48 #define CL_IN_EX 0x0001 /* Currently running ex. */
49 #define CL_LAYOUT 0x0002 /* Screen layout changed. */
50 #define CL_RENAME 0x0004 /* X11 xterm icon/window renamed. */
51 #define CL_RENAME_OK 0x0008 /* User wants the windows renamed. */
52 #define CL_SCR_EX_INIT 0x0010 /* Ex screen initialized. */
53 #define CL_SCR_VI_INIT 0x0020 /* Vi screen initialized. */
54 #define CL_SIGHUP 0x0040 /* SIGHUP arrived. */
55 #define CL_SIGINT 0x0080 /* SIGINT arrived. */
56 #define CL_SIGTERM 0x0100 /* SIGTERM arrived. */
57 #define CL_SIGWINCH 0x0200 /* SIGWINCH arrived. */
58 #define CL_STDIN_TTY 0x0400 /* Talking to a terminal. */
59 u_int32_t flags;
60 } CL_PRIVATE;
62 #define CLP(sp) ((CL_PRIVATE *)((sp)->gp->cl_private))
63 #define GCLP(gp) ((CL_PRIVATE *)gp->cl_private)
64 #define CLSP(sp) ((WINDOW *)((sp)->cl_private))
66 /* Return possibilities from the keyboard read routine. */
67 typedef enum { INP_OK=0, INP_EOF, INP_ERR, INP_INTR, INP_TIMEOUT } input_t;
69 /* The screen position relative to a specific window. */
71 #define RCNO(sp, cno) (sp)->coff + (cno)
72 #define RLNO(sp, lno) (sp)->roff + (lno)
74 #define RCNO(sp, cno) (cno)
75 #define RLNO(sp, lno) (lno)
78 * XXX
79 * Some implementations of curses.h don't define these for us. Used for
80 * compatibility only.
82 #ifndef TRUE
83 #define TRUE 1
84 #endif
85 #ifndef FALSE
86 #define FALSE 0
87 #endif
89 #include "extern.h"