Debian Codegraph @

term.h

raw
1 /**************************************************************************
2 * This program is Copyright (C) 1986-2002 by Jonathan Payne. JOVE is *
3 * provided by Jonathan and Jovehacks without charge and without *
4 * warranty. You may copy, modify, and/or distribute JOVE, provided that *
5 * this notice is included in all the source files and documentation. *
6 **************************************************************************/
7
8 /* Notes:
9 * - pervasive exports are declared in jove.h
10 * - some of the things declared here are defined in system-specific
11 * files (unix.c, termcap.c, ibmpcdos.c, win32.c, etc).
12 */
13
14 extern void
15 ttysetattr(jbool n),
16 ttsize(void),
17 getTERM(void),
18 settout(void),
19 dobell(int x),
20 clr_page(void),
21 i_lines(int, int, int),
22 d_lines(int, int, int);
23
24 /* MSDOS keyboard routines */
25
26 #ifdef MSDOS
27
28 # ifdef IBMPCDOS
29 extern void
30 pcSetTerm(void),
31 pcUnsetTerm(void);
32
33 extern jbool
34 enhanced_keybrd; /* VAR: exploit "enhanced" keyboard? */
35 # endif /* IBMPCDOS */
36
37 extern ZXchar getrawinchar(void);
38 extern jbool rawkey_ready(void);
39
40 #endif /* MSDOS */
41
42 /* Win32 keyboard routines */
43
44 #ifdef WIN32
45
46 int getInputEvents(char *bp, int size);
47 int inputEventWaiting(int nsecs);
48 int FatalErrorMessage(char* str);
49
50 #endif /* WIN32 */
51
52 #ifdef PCSCRATTR
53 extern int
54 Txattr, /* VAR: text-attribute (white on black) */
55 Mlattr, /* VAR: mode-line-attribute (black on white) */
56 Hlattr; /* VAR: highlight-attribute */
57 #endif /* PCSCRATTR */
58
59 #ifndef TERMCAP
60
61 extern void
62 clr_eoln(void);
63
64 #else /* TERMCAP */ /* the body is the rest of this file */
65
66 /* termcap declarations */
67
68 extern const char
69 *CS, /* change scrolling region */
70 *SO, /* Start standout */
71 *SE, /* End standout */
72 *US, /* Start underlining */
73 *UE, /* End underlining */
74 *CM, /* The cursor motion string */
75 *CL, /* Clear screen */
76 *CE, /* Clear to end of line */
77 *HO, /* Home cursor */
78 *AL, /* Addline (insert line) */
79 *DL, /* Delete line */
80 *VS, /* Visual start */
81 *VE, /* Visual end */
82 *KS, /* Keypad mode start */
83 *KE, /* Keypad mode end */
84 *TI, /* Cursor addressing start */
85 *TE, /* Cursor addressing end */
86 *LL, /* Last line, first column */
87 *SF, /* Scroll forward (defaults to \n) */
88 *SR, /* Scroll reverse */
89 *VB, /* visible bell */
90 *BL, /* audible bell (defaults to BEL) */
91 *lPC, /* pad character (as a string!) */
92 *NL, /* newline character (defaults to \n) */
93 *DO, /* down one line (defaults to \n capability) */
94 *M_AL, /* Insert line with arg */
95 *M_DL, /* Delete line with arg */
96 *M_SF, /* Scroll forward with arg */
97 *M_SR; /* Scroll back with arg */
98
99 # define INFINITY 10000 /* cost too high to afford */
100
101 extern int
102 UPlen, /* length of the UP string */
103 HOlen, /* length of Home string */
104 LLlen, /* length of last line string */
105
106 phystab, /* ("it") terminal's tabstop settings */
107 UG; /* number of magic cookies left by US and UE */
108
109 extern jbool
110 Hazeltine, /* Hazeltine tilde kludge */
111 UL, /* underscores don't replace chars already on screen */
112 NP; /* there is No Pad character */
113
114 extern char
115 PC; /* pad character, as a char (set from lPC; defaults to NUL) */
116
117 extern const char
118 *BC, /* back space (defaults to BS) */
119 *UP; /* Scroll reverse, or up */
120
121 extern short ospeed;
122
123 extern jbool CanScroll; /* can this terminal scroll? */
124
125 # ifdef ID_CHAR
126
127 extern const char
128 *IC, /* Insert char */
129 *DC, /* Delete char */
130 *IM, /* Insert mode */
131 *EI, /* End insert mode */
132 *IP, /* insert pad after character inserted */
133 *M_IC, /* Insert char with arg */
134 *M_DC; /* Delete char with arg */
135
136 extern jbool UseIC; /* VAR: whether or not to use i/d char processesing */
137
138 extern int
139 IMEIlen, /* length of insert mode + end insert mode strings */
140 IClen, /* length of insert char */
141 MIClen, /* length of insert char with arg */
142 DClen, /* length of delete char */
143 MDClen, /* length of delete char with arg */
144 CElen; /* length of clear to end of line */
145
146 extern jbool
147 MI; /* okay to move while in insert mode */
148
149 # endif /* ID_CHAR */
150
151 extern void
152 putpad(const char *str, int lines),
153 putmulti(const char *ss, const char *ms, int num, int lines);
154
155 #endif /* TERMCAP */