1 | /****************************************************************************
|
---|
2 | * Copyright (c) 1998-2001,2003 Free Software Foundation, Inc. *
|
---|
3 | * *
|
---|
4 | * Permission is hereby granted, free of charge, to any person obtaining a *
|
---|
5 | * copy of this software and associated documentation files (the *
|
---|
6 | * "Software"), to deal in the Software without restriction, including *
|
---|
7 | * without limitation the rights to use, copy, modify, merge, publish, *
|
---|
8 | * distribute, distribute with modifications, sublicense, and/or sell *
|
---|
9 | * copies of the Software, and to permit persons to whom the Software is *
|
---|
10 | * furnished to do so, subject to the following conditions: *
|
---|
11 | * *
|
---|
12 | * The above copyright notice and this permission notice shall be included *
|
---|
13 | * in all copies or substantial portions of the Software. *
|
---|
14 | * *
|
---|
15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
|
---|
16 | * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
|
---|
17 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
|
---|
18 | * IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
|
---|
19 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
|
---|
20 | * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
|
---|
21 | * THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
---|
22 | * *
|
---|
23 | * Except as contained in this notice, the name(s) of the above copyright *
|
---|
24 | * holders shall not be used in advertising or otherwise to promote the *
|
---|
25 | * sale, use or other dealings in this Software without prior written *
|
---|
26 | * authorization. *
|
---|
27 | ****************************************************************************/
|
---|
28 |
|
---|
29 | /****************************************************************************/
|
---|
30 | /* Author: Zeyd M. Ben-Halim <zmbenhal@netcom.com> 1992,1995 */
|
---|
31 | /* and: Eric S. Raymond <esr@snark.thyrsus.com> */
|
---|
32 | /* and: Thomas E. Dickey 1995-2003 */
|
---|
33 | /****************************************************************************/
|
---|
34 |
|
---|
35 | /* $Id: kNIX-bootstrap-os2.x86-term.h 3073 2007-04-09 00:14:03Z bird $ */
|
---|
36 |
|
---|
37 | /*
|
---|
38 | ** term.h -- Definition of struct term
|
---|
39 | */
|
---|
40 |
|
---|
41 | #ifndef NCURSES_TERM_H_incl
|
---|
42 | #define NCURSES_TERM_H_incl 1
|
---|
43 |
|
---|
44 | #undef NCURSES_VERSION
|
---|
45 | #define NCURSES_VERSION "5.5"
|
---|
46 |
|
---|
47 | #include <ncurses_dll.h>
|
---|
48 |
|
---|
49 | #ifdef __cplusplus
|
---|
50 | extern "C" {
|
---|
51 | #endif
|
---|
52 |
|
---|
53 | /* Make this file self-contained by providing defaults for the HAVE_TERMIO[S]_H
|
---|
54 | * definition (based on the system for which this was configured).
|
---|
55 | */
|
---|
56 |
|
---|
57 | #undef HAVE_TERMIOS_H
|
---|
58 | #define HAVE_TERMIOS_H 1
|
---|
59 |
|
---|
60 | #undef HAVE_TCGETATTR
|
---|
61 | #define HAVE_TCGETATTR 1
|
---|
62 |
|
---|
63 | #undef NCURSES_CONST
|
---|
64 | #define NCURSES_CONST /*nothing*/
|
---|
65 |
|
---|
66 | #undef NCURSES_XNAMES
|
---|
67 | #define NCURSES_XNAMES 1
|
---|
68 |
|
---|
69 | /* We will use these symbols to hide differences between
|
---|
70 | * termios/termio/sgttyb interfaces.
|
---|
71 | */
|
---|
72 | #undef TTY
|
---|
73 | #undef SET_TTY
|
---|
74 | #undef GET_TTY
|
---|
75 |
|
---|
76 | /* Assume POSIX termio if we have the header and function */
|
---|
77 | #if HAVE_TERMIOS_H && HAVE_TCGETATTR
|
---|
78 |
|
---|
79 | #undef TERMIOS
|
---|
80 | #define TERMIOS 1
|
---|
81 |
|
---|
82 | #include <termios.h>
|
---|
83 | #define TTY struct termios
|
---|
84 |
|
---|
85 | #else /* !HAVE_TERMIOS_H */
|
---|
86 |
|
---|
87 | #if 1 /* HAVE_TERMIO_H */
|
---|
88 |
|
---|
89 | #undef TERMIOS
|
---|
90 | #define TERMIOS 1
|
---|
91 |
|
---|
92 | #include <termio.h>
|
---|
93 | #define TTY struct termio
|
---|
94 |
|
---|
95 | /* Add definitions to make termio look like termios.
|
---|
96 | * But ifdef it, since there are some implementations
|
---|
97 | * that try to do this for us in a fake <termio.h>.
|
---|
98 | */
|
---|
99 | #ifndef TCSANOW
|
---|
100 | #define TCSANOW TCSETA
|
---|
101 | #endif
|
---|
102 | #ifndef TCSADRAIN
|
---|
103 | #define TCSADRAIN TCSETAW
|
---|
104 | #endif
|
---|
105 | #ifndef TCSAFLUSH
|
---|
106 | #define TCSAFLUSH TCSETAF
|
---|
107 | #endif
|
---|
108 | #ifndef tcsetattr
|
---|
109 | #define tcsetattr(fd, cmd, arg) ioctl(fd, cmd, arg)
|
---|
110 | #endif
|
---|
111 | #ifndef tcgetattr
|
---|
112 | #define tcgetattr(fd, arg) ioctl(fd, TCGETA, arg)
|
---|
113 | #endif
|
---|
114 | #ifndef cfgetospeed
|
---|
115 | #define cfgetospeed(t) ((t)->c_cflag & CBAUD)
|
---|
116 | #endif
|
---|
117 | #ifndef TCIFLUSH
|
---|
118 | #define TCIFLUSH 0
|
---|
119 | #endif
|
---|
120 | #ifndef TCOFLUSH
|
---|
121 | #define TCOFLUSH 1
|
---|
122 | #endif
|
---|
123 | #ifndef TCIOFLUSH
|
---|
124 | #define TCIOFLUSH 2
|
---|
125 | #endif
|
---|
126 | #ifndef tcflush
|
---|
127 | #define tcflush(fd, arg) ioctl(fd, TCFLSH, arg)
|
---|
128 | #endif
|
---|
129 |
|
---|
130 | #else /* !HAVE_TERMIO_H */
|
---|
131 |
|
---|
132 | #undef TERMIOS
|
---|
133 | #include <sgtty.h>
|
---|
134 | #include <sys/ioctl.h>
|
---|
135 | #define TTY struct sgttyb
|
---|
136 |
|
---|
137 | #endif /* HAVE_TERMIO_H */
|
---|
138 |
|
---|
139 | #endif /* HAVE_TERMIOS_H */
|
---|
140 |
|
---|
141 | #ifdef TERMIOS
|
---|
142 | #define GET_TTY(fd, buf) tcgetattr(fd, buf)
|
---|
143 | #define SET_TTY(fd, buf) tcsetattr(fd, TCSADRAIN, buf)
|
---|
144 | #else
|
---|
145 | #define GET_TTY(fd, buf) gtty(fd, buf)
|
---|
146 | #define SET_TTY(fd, buf) stty(fd, buf)
|
---|
147 | #endif
|
---|
148 |
|
---|
149 | #define NAMESIZE 256
|
---|
150 |
|
---|
151 | #define CUR cur_term->type.
|
---|
152 |
|
---|
153 | #define auto_left_margin CUR Booleans[0]
|
---|
154 | #define auto_right_margin CUR Booleans[1]
|
---|
155 | #define no_esc_ctlc CUR Booleans[2]
|
---|
156 | #define ceol_standout_glitch CUR Booleans[3]
|
---|
157 | #define eat_newline_glitch CUR Booleans[4]
|
---|
158 | #define erase_overstrike CUR Booleans[5]
|
---|
159 | #define generic_type CUR Booleans[6]
|
---|
160 | #define hard_copy CUR Booleans[7]
|
---|
161 | #define has_meta_key CUR Booleans[8]
|
---|
162 | #define has_status_line CUR Booleans[9]
|
---|
163 | #define insert_null_glitch CUR Booleans[10]
|
---|
164 | #define memory_above CUR Booleans[11]
|
---|
165 | #define memory_below CUR Booleans[12]
|
---|
166 | #define move_insert_mode CUR Booleans[13]
|
---|
167 | #define move_standout_mode CUR Booleans[14]
|
---|
168 | #define over_strike CUR Booleans[15]
|
---|
169 | #define status_line_esc_ok CUR Booleans[16]
|
---|
170 | #define dest_tabs_magic_smso CUR Booleans[17]
|
---|
171 | #define tilde_glitch CUR Booleans[18]
|
---|
172 | #define transparent_underline CUR Booleans[19]
|
---|
173 | #define xon_xoff CUR Booleans[20]
|
---|
174 | #define needs_xon_xoff CUR Booleans[21]
|
---|
175 | #define prtr_silent CUR Booleans[22]
|
---|
176 | #define hard_cursor CUR Booleans[23]
|
---|
177 | #define non_rev_rmcup CUR Booleans[24]
|
---|
178 | #define no_pad_char CUR Booleans[25]
|
---|
179 | #define non_dest_scroll_region CUR Booleans[26]
|
---|
180 | #define can_change CUR Booleans[27]
|
---|
181 | #define back_color_erase CUR Booleans[28]
|
---|
182 | #define hue_lightness_saturation CUR Booleans[29]
|
---|
183 | #define col_addr_glitch CUR Booleans[30]
|
---|
184 | #define cr_cancels_micro_mode CUR Booleans[31]
|
---|
185 | #define has_print_wheel CUR Booleans[32]
|
---|
186 | #define row_addr_glitch CUR Booleans[33]
|
---|
187 | #define semi_auto_right_margin CUR Booleans[34]
|
---|
188 | #define cpi_changes_res CUR Booleans[35]
|
---|
189 | #define lpi_changes_res CUR Booleans[36]
|
---|
190 | #define columns CUR Numbers[0]
|
---|
191 | #define init_tabs CUR Numbers[1]
|
---|
192 | #define lines CUR Numbers[2]
|
---|
193 | #define lines_of_memory CUR Numbers[3]
|
---|
194 | #define magic_cookie_glitch CUR Numbers[4]
|
---|
195 | #define padding_baud_rate CUR Numbers[5]
|
---|
196 | #define virtual_terminal CUR Numbers[6]
|
---|
197 | #define width_status_line CUR Numbers[7]
|
---|
198 | #define num_labels CUR Numbers[8]
|
---|
199 | #define label_height CUR Numbers[9]
|
---|
200 | #define label_width CUR Numbers[10]
|
---|
201 | #define max_attributes CUR Numbers[11]
|
---|
202 | #define maximum_windows CUR Numbers[12]
|
---|
203 | #define max_colors CUR Numbers[13]
|
---|
204 | #define max_pairs CUR Numbers[14]
|
---|
205 | #define no_color_video CUR Numbers[15]
|
---|
206 | #define buffer_capacity CUR Numbers[16]
|
---|
207 | #define dot_vert_spacing CUR Numbers[17]
|
---|
208 | #define dot_horz_spacing CUR Numbers[18]
|
---|
209 | #define max_micro_address CUR Numbers[19]
|
---|
210 | #define max_micro_jump CUR Numbers[20]
|
---|
211 | #define micro_col_size CUR Numbers[21]
|
---|
212 | #define micro_line_size CUR Numbers[22]
|
---|
213 | #define number_of_pins CUR Numbers[23]
|
---|
214 | #define output_res_char CUR Numbers[24]
|
---|
215 | #define output_res_line CUR Numbers[25]
|
---|
216 | #define output_res_horz_inch CUR Numbers[26]
|
---|
217 | #define output_res_vert_inch CUR Numbers[27]
|
---|
218 | #define print_rate CUR Numbers[28]
|
---|
219 | #define wide_char_size CUR Numbers[29]
|
---|
220 | #define buttons CUR Numbers[30]
|
---|
221 | #define bit_image_entwining CUR Numbers[31]
|
---|
222 | #define bit_image_type CUR Numbers[32]
|
---|
223 | #define back_tab CUR Strings[0]
|
---|
224 | #define bell CUR Strings[1]
|
---|
225 | #define carriage_return CUR Strings[2]
|
---|
226 | #define change_scroll_region CUR Strings[3]
|
---|
227 | #define clear_all_tabs CUR Strings[4]
|
---|
228 | #define clear_screen CUR Strings[5]
|
---|
229 | #define clr_eol CUR Strings[6]
|
---|
230 | #define clr_eos CUR Strings[7]
|
---|
231 | #define column_address CUR Strings[8]
|
---|
232 | #define command_character CUR Strings[9]
|
---|
233 | #define cursor_address CUR Strings[10]
|
---|
234 | #define cursor_down CUR Strings[11]
|
---|
235 | #define cursor_home CUR Strings[12]
|
---|
236 | #define cursor_invisible CUR Strings[13]
|
---|
237 | #define cursor_left CUR Strings[14]
|
---|
238 | #define cursor_mem_address CUR Strings[15]
|
---|
239 | #define cursor_normal CUR Strings[16]
|
---|
240 | #define cursor_right CUR Strings[17]
|
---|
241 | #define cursor_to_ll CUR Strings[18]
|
---|
242 | #define cursor_up CUR Strings[19]
|
---|
243 | #define cursor_visible CUR Strings[20]
|
---|
244 | #define delete_character CUR Strings[21]
|
---|
245 | #define delete_line CUR Strings[22]
|
---|
246 | #define dis_status_line CUR Strings[23]
|
---|
247 | #define down_half_line CUR Strings[24]
|
---|
248 | #define enter_alt_charset_mode CUR Strings[25]
|
---|
249 | #define enter_blink_mode CUR Strings[26]
|
---|
250 | #define enter_bold_mode CUR Strings[27]
|
---|
251 | #define enter_ca_mode CUR Strings[28]
|
---|
252 | #define enter_delete_mode CUR Strings[29]
|
---|
253 | #define enter_dim_mode CUR Strings[30]
|
---|
254 | #define enter_insert_mode CUR Strings[31]
|
---|
255 | #define enter_secure_mode CUR Strings[32]
|
---|
256 | #define enter_protected_mode CUR Strings[33]
|
---|
257 | #define enter_reverse_mode CUR Strings[34]
|
---|
258 | #define enter_standout_mode CUR Strings[35]
|
---|
259 | #define enter_underline_mode CUR Strings[36]
|
---|
260 | #define erase_chars CUR Strings[37]
|
---|
261 | #define exit_alt_charset_mode CUR Strings[38]
|
---|
262 | #define exit_attribute_mode CUR Strings[39]
|
---|
263 | #define exit_ca_mode CUR Strings[40]
|
---|
264 | #define exit_delete_mode CUR Strings[41]
|
---|
265 | #define exit_insert_mode CUR Strings[42]
|
---|
266 | #define exit_standout_mode CUR Strings[43]
|
---|
267 | #define exit_underline_mode CUR Strings[44]
|
---|
268 | #define flash_screen CUR Strings[45]
|
---|
269 | #define form_feed CUR Strings[46]
|
---|
270 | #define from_status_line CUR Strings[47]
|
---|
271 | #define init_1string CUR Strings[48]
|
---|
272 | #define init_2string CUR Strings[49]
|
---|
273 | #define init_3string CUR Strings[50]
|
---|
274 | #define init_file CUR Strings[51]
|
---|
275 | #define insert_character CUR Strings[52]
|
---|
276 | #define insert_line CUR Strings[53]
|
---|
277 | #define insert_padding CUR Strings[54]
|
---|
278 | #define key_backspace CUR Strings[55]
|
---|
279 | #define key_catab CUR Strings[56]
|
---|
280 | #define key_clear CUR Strings[57]
|
---|
281 | #define key_ctab CUR Strings[58]
|
---|
282 | #define key_dc CUR Strings[59]
|
---|
283 | #define key_dl CUR Strings[60]
|
---|
284 | #define key_down CUR Strings[61]
|
---|
285 | #define key_eic CUR Strings[62]
|
---|
286 | #define key_eol CUR Strings[63]
|
---|
287 | #define key_eos CUR Strings[64]
|
---|
288 | #define key_f0 CUR Strings[65]
|
---|
289 | #define key_f1 CUR Strings[66]
|
---|
290 | #define key_f10 CUR Strings[67]
|
---|
291 | #define key_f2 CUR Strings[68]
|
---|
292 | #define key_f3 CUR Strings[69]
|
---|
293 | #define key_f4 CUR Strings[70]
|
---|
294 | #define key_f5 CUR Strings[71]
|
---|
295 | #define key_f6 CUR Strings[72]
|
---|
296 | #define key_f7 CUR Strings[73]
|
---|
297 | #define key_f8 CUR Strings[74]
|
---|
298 | #define key_f9 CUR Strings[75]
|
---|
299 | #define key_home CUR Strings[76]
|
---|
300 | #define key_ic CUR Strings[77]
|
---|
301 | #define key_il CUR Strings[78]
|
---|
302 | #define key_left CUR Strings[79]
|
---|
303 | #define key_ll CUR Strings[80]
|
---|
304 | #define key_npage CUR Strings[81]
|
---|
305 | #define key_ppage CUR Strings[82]
|
---|
306 | #define key_right CUR Strings[83]
|
---|
307 | #define key_sf CUR Strings[84]
|
---|
308 | #define key_sr CUR Strings[85]
|
---|
309 | #define key_stab CUR Strings[86]
|
---|
310 | #define key_up CUR Strings[87]
|
---|
311 | #define keypad_local CUR Strings[88]
|
---|
312 | #define keypad_xmit CUR Strings[89]
|
---|
313 | #define lab_f0 CUR Strings[90]
|
---|
314 | #define lab_f1 CUR Strings[91]
|
---|
315 | #define lab_f10 CUR Strings[92]
|
---|
316 | #define lab_f2 CUR Strings[93]
|
---|
317 | #define lab_f3 CUR Strings[94]
|
---|
318 | #define lab_f4 CUR Strings[95]
|
---|
319 | #define lab_f5 CUR Strings[96]
|
---|
320 | #define lab_f6 CUR Strings[97]
|
---|
321 | #define lab_f7 CUR Strings[98]
|
---|
322 | #define lab_f8 CUR Strings[99]
|
---|
323 | #define lab_f9 CUR Strings[100]
|
---|
324 | #define meta_off CUR Strings[101]
|
---|
325 | #define meta_on CUR Strings[102]
|
---|
326 | #define newline CUR Strings[103]
|
---|
327 | #define pad_char CUR Strings[104]
|
---|
328 | #define parm_dch CUR Strings[105]
|
---|
329 | #define parm_delete_line CUR Strings[106]
|
---|
330 | #define parm_down_cursor CUR Strings[107]
|
---|
331 | #define parm_ich CUR Strings[108]
|
---|
332 | #define parm_index CUR Strings[109]
|
---|
333 | #define parm_insert_line CUR Strings[110]
|
---|
334 | #define parm_left_cursor CUR Strings[111]
|
---|
335 | #define parm_right_cursor CUR Strings[112]
|
---|
336 | #define parm_rindex CUR Strings[113]
|
---|
337 | #define parm_up_cursor CUR Strings[114]
|
---|
338 | #define pkey_key CUR Strings[115]
|
---|
339 | #define pkey_local CUR Strings[116]
|
---|
340 | #define pkey_xmit CUR Strings[117]
|
---|
341 | #define print_screen CUR Strings[118]
|
---|
342 | #define prtr_off CUR Strings[119]
|
---|
343 | #define prtr_on CUR Strings[120]
|
---|
344 | #define repeat_char CUR Strings[121]
|
---|
345 | #define reset_1string CUR Strings[122]
|
---|
346 | #define reset_2string CUR Strings[123]
|
---|
347 | #define reset_3string CUR Strings[124]
|
---|
348 | #define reset_file CUR Strings[125]
|
---|
349 | #define restore_cursor CUR Strings[126]
|
---|
350 | #define row_address CUR Strings[127]
|
---|
351 | #define save_cursor CUR Strings[128]
|
---|
352 | #define scroll_forward CUR Strings[129]
|
---|
353 | #define scroll_reverse CUR Strings[130]
|
---|
354 | #define set_attributes CUR Strings[131]
|
---|
355 | #define set_tab CUR Strings[132]
|
---|
356 | #define set_window CUR Strings[133]
|
---|
357 | #define tab CUR Strings[134]
|
---|
358 | #define to_status_line CUR Strings[135]
|
---|
359 | #define underline_char CUR Strings[136]
|
---|
360 | #define up_half_line CUR Strings[137]
|
---|
361 | #define init_prog CUR Strings[138]
|
---|
362 | #define key_a1 CUR Strings[139]
|
---|
363 | #define key_a3 CUR Strings[140]
|
---|
364 | #define key_b2 CUR Strings[141]
|
---|
365 | #define key_c1 CUR Strings[142]
|
---|
366 | #define key_c3 CUR Strings[143]
|
---|
367 | #define prtr_non CUR Strings[144]
|
---|
368 | #define char_padding CUR Strings[145]
|
---|
369 | #define acs_chars CUR Strings[146]
|
---|
370 | #define plab_norm CUR Strings[147]
|
---|
371 | #define key_btab CUR Strings[148]
|
---|
372 | #define enter_xon_mode CUR Strings[149]
|
---|
373 | #define exit_xon_mode CUR Strings[150]
|
---|
374 | #define enter_am_mode CUR Strings[151]
|
---|
375 | #define exit_am_mode CUR Strings[152]
|
---|
376 | #define xon_character CUR Strings[153]
|
---|
377 | #define xoff_character CUR Strings[154]
|
---|
378 | #define ena_acs CUR Strings[155]
|
---|
379 | #define label_on CUR Strings[156]
|
---|
380 | #define label_off CUR Strings[157]
|
---|
381 | #define key_beg CUR Strings[158]
|
---|
382 | #define key_cancel CUR Strings[159]
|
---|
383 | #define key_close CUR Strings[160]
|
---|
384 | #define key_command CUR Strings[161]
|
---|
385 | #define key_copy CUR Strings[162]
|
---|
386 | #define key_create CUR Strings[163]
|
---|
387 | #define key_end CUR Strings[164]
|
---|
388 | #define key_enter CUR Strings[165]
|
---|
389 | #define key_exit CUR Strings[166]
|
---|
390 | #define key_find CUR Strings[167]
|
---|
391 | #define key_help CUR Strings[168]
|
---|
392 | #define key_mark CUR Strings[169]
|
---|
393 | #define key_message CUR Strings[170]
|
---|
394 | #define key_move CUR Strings[171]
|
---|
395 | #define key_next CUR Strings[172]
|
---|
396 | #define key_open CUR Strings[173]
|
---|
397 | #define key_options CUR Strings[174]
|
---|
398 | #define key_previous CUR Strings[175]
|
---|
399 | #define key_print CUR Strings[176]
|
---|
400 | #define key_redo CUR Strings[177]
|
---|
401 | #define key_reference CUR Strings[178]
|
---|
402 | #define key_refresh CUR Strings[179]
|
---|
403 | #define key_replace CUR Strings[180]
|
---|
404 | #define key_restart CUR Strings[181]
|
---|
405 | #define key_resume CUR Strings[182]
|
---|
406 | #define key_save CUR Strings[183]
|
---|
407 | #define key_suspend CUR Strings[184]
|
---|
408 | #define key_undo CUR Strings[185]
|
---|
409 | #define key_sbeg CUR Strings[186]
|
---|
410 | #define key_scancel CUR Strings[187]
|
---|
411 | #define key_scommand CUR Strings[188]
|
---|
412 | #define key_scopy CUR Strings[189]
|
---|
413 | #define key_screate CUR Strings[190]
|
---|
414 | #define key_sdc CUR Strings[191]
|
---|
415 | #define key_sdl CUR Strings[192]
|
---|
416 | #define key_select CUR Strings[193]
|
---|
417 | #define key_send CUR Strings[194]
|
---|
418 | #define key_seol CUR Strings[195]
|
---|
419 | #define key_sexit CUR Strings[196]
|
---|
420 | #define key_sfind CUR Strings[197]
|
---|
421 | #define key_shelp CUR Strings[198]
|
---|
422 | #define key_shome CUR Strings[199]
|
---|
423 | #define key_sic CUR Strings[200]
|
---|
424 | #define key_sleft CUR Strings[201]
|
---|
425 | #define key_smessage CUR Strings[202]
|
---|
426 | #define key_smove CUR Strings[203]
|
---|
427 | #define key_snext CUR Strings[204]
|
---|
428 | #define key_soptions CUR Strings[205]
|
---|
429 | #define key_sprevious CUR Strings[206]
|
---|
430 | #define key_sprint CUR Strings[207]
|
---|
431 | #define key_sredo CUR Strings[208]
|
---|
432 | #define key_sreplace CUR Strings[209]
|
---|
433 | #define key_sright CUR Strings[210]
|
---|
434 | #define key_srsume CUR Strings[211]
|
---|
435 | #define key_ssave CUR Strings[212]
|
---|
436 | #define key_ssuspend CUR Strings[213]
|
---|
437 | #define key_sundo CUR Strings[214]
|
---|
438 | #define req_for_input CUR Strings[215]
|
---|
439 | #define key_f11 CUR Strings[216]
|
---|
440 | #define key_f12 CUR Strings[217]
|
---|
441 | #define key_f13 CUR Strings[218]
|
---|
442 | #define key_f14 CUR Strings[219]
|
---|
443 | #define key_f15 CUR Strings[220]
|
---|
444 | #define key_f16 CUR Strings[221]
|
---|
445 | #define key_f17 CUR Strings[222]
|
---|
446 | #define key_f18 CUR Strings[223]
|
---|
447 | #define key_f19 CUR Strings[224]
|
---|
448 | #define key_f20 CUR Strings[225]
|
---|
449 | #define key_f21 CUR Strings[226]
|
---|
450 | #define key_f22 CUR Strings[227]
|
---|
451 | #define key_f23 CUR Strings[228]
|
---|
452 | #define key_f24 CUR Strings[229]
|
---|
453 | #define key_f25 CUR Strings[230]
|
---|
454 | #define key_f26 CUR Strings[231]
|
---|
455 | #define key_f27 CUR Strings[232]
|
---|
456 | #define key_f28 CUR Strings[233]
|
---|
457 | #define key_f29 CUR Strings[234]
|
---|
458 | #define key_f30 CUR Strings[235]
|
---|
459 | #define key_f31 CUR Strings[236]
|
---|
460 | #define key_f32 CUR Strings[237]
|
---|
461 | #define key_f33 CUR Strings[238]
|
---|
462 | #define key_f34 CUR Strings[239]
|
---|
463 | #define key_f35 CUR Strings[240]
|
---|
464 | #define key_f36 CUR Strings[241]
|
---|
465 | #define key_f37 CUR Strings[242]
|
---|
466 | #define key_f38 CUR Strings[243]
|
---|
467 | #define key_f39 CUR Strings[244]
|
---|
468 | #define key_f40 CUR Strings[245]
|
---|
469 | #define key_f41 CUR Strings[246]
|
---|
470 | #define key_f42 CUR Strings[247]
|
---|
471 | #define key_f43 CUR Strings[248]
|
---|
472 | #define key_f44 CUR Strings[249]
|
---|
473 | #define key_f45 CUR Strings[250]
|
---|
474 | #define key_f46 CUR Strings[251]
|
---|
475 | #define key_f47 CUR Strings[252]
|
---|
476 | #define key_f48 CUR Strings[253]
|
---|
477 | #define key_f49 CUR Strings[254]
|
---|
478 | #define key_f50 CUR Strings[255]
|
---|
479 | #define key_f51 CUR Strings[256]
|
---|
480 | #define key_f52 CUR Strings[257]
|
---|
481 | #define key_f53 CUR Strings[258]
|
---|
482 | #define key_f54 CUR Strings[259]
|
---|
483 | #define key_f55 CUR Strings[260]
|
---|
484 | #define key_f56 CUR Strings[261]
|
---|
485 | #define key_f57 CUR Strings[262]
|
---|
486 | #define key_f58 CUR Strings[263]
|
---|
487 | #define key_f59 CUR Strings[264]
|
---|
488 | #define key_f60 CUR Strings[265]
|
---|
489 | #define key_f61 CUR Strings[266]
|
---|
490 | #define key_f62 CUR Strings[267]
|
---|
491 | #define key_f63 CUR Strings[268]
|
---|
492 | #define clr_bol CUR Strings[269]
|
---|
493 | #define clear_margins CUR Strings[270]
|
---|
494 | #define set_left_margin CUR Strings[271]
|
---|
495 | #define set_right_margin CUR Strings[272]
|
---|
496 | #define label_format CUR Strings[273]
|
---|
497 | #define set_clock CUR Strings[274]
|
---|
498 | #define display_clock CUR Strings[275]
|
---|
499 | #define remove_clock CUR Strings[276]
|
---|
500 | #define create_window CUR Strings[277]
|
---|
501 | #define goto_window CUR Strings[278]
|
---|
502 | #define hangup CUR Strings[279]
|
---|
503 | #define dial_phone CUR Strings[280]
|
---|
504 | #define quick_dial CUR Strings[281]
|
---|
505 | #define tone CUR Strings[282]
|
---|
506 | #define pulse CUR Strings[283]
|
---|
507 | #define flash_hook CUR Strings[284]
|
---|
508 | #define fixed_pause CUR Strings[285]
|
---|
509 | #define wait_tone CUR Strings[286]
|
---|
510 | #define user0 CUR Strings[287]
|
---|
511 | #define user1 CUR Strings[288]
|
---|
512 | #define user2 CUR Strings[289]
|
---|
513 | #define user3 CUR Strings[290]
|
---|
514 | #define user4 CUR Strings[291]
|
---|
515 | #define user5 CUR Strings[292]
|
---|
516 | #define user6 CUR Strings[293]
|
---|
517 | #define user7 CUR Strings[294]
|
---|
518 | #define user8 CUR Strings[295]
|
---|
519 | #define user9 CUR Strings[296]
|
---|
520 | #define orig_pair CUR Strings[297]
|
---|
521 | #define orig_colors CUR Strings[298]
|
---|
522 | #define initialize_color CUR Strings[299]
|
---|
523 | #define initialize_pair CUR Strings[300]
|
---|
524 | #define set_color_pair CUR Strings[301]
|
---|
525 | #define set_foreground CUR Strings[302]
|
---|
526 | #define set_background CUR Strings[303]
|
---|
527 | #define change_char_pitch CUR Strings[304]
|
---|
528 | #define change_line_pitch CUR Strings[305]
|
---|
529 | #define change_res_horz CUR Strings[306]
|
---|
530 | #define change_res_vert CUR Strings[307]
|
---|
531 | #define define_char CUR Strings[308]
|
---|
532 | #define enter_doublewide_mode CUR Strings[309]
|
---|
533 | #define enter_draft_quality CUR Strings[310]
|
---|
534 | #define enter_italics_mode CUR Strings[311]
|
---|
535 | #define enter_leftward_mode CUR Strings[312]
|
---|
536 | #define enter_micro_mode CUR Strings[313]
|
---|
537 | #define enter_near_letter_quality CUR Strings[314]
|
---|
538 | #define enter_normal_quality CUR Strings[315]
|
---|
539 | #define enter_shadow_mode CUR Strings[316]
|
---|
540 | #define enter_subscript_mode CUR Strings[317]
|
---|
541 | #define enter_superscript_mode CUR Strings[318]
|
---|
542 | #define enter_upward_mode CUR Strings[319]
|
---|
543 | #define exit_doublewide_mode CUR Strings[320]
|
---|
544 | #define exit_italics_mode CUR Strings[321]
|
---|
545 | #define exit_leftward_mode CUR Strings[322]
|
---|
546 | #define exit_micro_mode CUR Strings[323]
|
---|
547 | #define exit_shadow_mode CUR Strings[324]
|
---|
548 | #define exit_subscript_mode CUR Strings[325]
|
---|
549 | #define exit_superscript_mode CUR Strings[326]
|
---|
550 | #define exit_upward_mode CUR Strings[327]
|
---|
551 | #define micro_column_address CUR Strings[328]
|
---|
552 | #define micro_down CUR Strings[329]
|
---|
553 | #define micro_left CUR Strings[330]
|
---|
554 | #define micro_right CUR Strings[331]
|
---|
555 | #define micro_row_address CUR Strings[332]
|
---|
556 | #define micro_up CUR Strings[333]
|
---|
557 | #define order_of_pins CUR Strings[334]
|
---|
558 | #define parm_down_micro CUR Strings[335]
|
---|
559 | #define parm_left_micro CUR Strings[336]
|
---|
560 | #define parm_right_micro CUR Strings[337]
|
---|
561 | #define parm_up_micro CUR Strings[338]
|
---|
562 | #define select_char_set CUR Strings[339]
|
---|
563 | #define set_bottom_margin CUR Strings[340]
|
---|
564 | #define set_bottom_margin_parm CUR Strings[341]
|
---|
565 | #define set_left_margin_parm CUR Strings[342]
|
---|
566 | #define set_right_margin_parm CUR Strings[343]
|
---|
567 | #define set_top_margin CUR Strings[344]
|
---|
568 | #define set_top_margin_parm CUR Strings[345]
|
---|
569 | #define start_bit_image CUR Strings[346]
|
---|
570 | #define start_char_set_def CUR Strings[347]
|
---|
571 | #define stop_bit_image CUR Strings[348]
|
---|
572 | #define stop_char_set_def CUR Strings[349]
|
---|
573 | #define subscript_characters CUR Strings[350]
|
---|
574 | #define superscript_characters CUR Strings[351]
|
---|
575 | #define these_cause_cr CUR Strings[352]
|
---|
576 | #define zero_motion CUR Strings[353]
|
---|
577 | #define char_set_names CUR Strings[354]
|
---|
578 | #define key_mouse CUR Strings[355]
|
---|
579 | #define mouse_info CUR Strings[356]
|
---|
580 | #define req_mouse_pos CUR Strings[357]
|
---|
581 | #define get_mouse CUR Strings[358]
|
---|
582 | #define set_a_foreground CUR Strings[359]
|
---|
583 | #define set_a_background CUR Strings[360]
|
---|
584 | #define pkey_plab CUR Strings[361]
|
---|
585 | #define device_type CUR Strings[362]
|
---|
586 | #define code_set_init CUR Strings[363]
|
---|
587 | #define set0_des_seq CUR Strings[364]
|
---|
588 | #define set1_des_seq CUR Strings[365]
|
---|
589 | #define set2_des_seq CUR Strings[366]
|
---|
590 | #define set3_des_seq CUR Strings[367]
|
---|
591 | #define set_lr_margin CUR Strings[368]
|
---|
592 | #define set_tb_margin CUR Strings[369]
|
---|
593 | #define bit_image_repeat CUR Strings[370]
|
---|
594 | #define bit_image_newline CUR Strings[371]
|
---|
595 | #define bit_image_carriage_return CUR Strings[372]
|
---|
596 | #define color_names CUR Strings[373]
|
---|
597 | #define define_bit_image_region CUR Strings[374]
|
---|
598 | #define end_bit_image_region CUR Strings[375]
|
---|
599 | #define set_color_band CUR Strings[376]
|
---|
600 | #define set_page_length CUR Strings[377]
|
---|
601 | #define display_pc_char CUR Strings[378]
|
---|
602 | #define enter_pc_charset_mode CUR Strings[379]
|
---|
603 | #define exit_pc_charset_mode CUR Strings[380]
|
---|
604 | #define enter_scancode_mode CUR Strings[381]
|
---|
605 | #define exit_scancode_mode CUR Strings[382]
|
---|
606 | #define pc_term_options CUR Strings[383]
|
---|
607 | #define scancode_escape CUR Strings[384]
|
---|
608 | #define alt_scancode_esc CUR Strings[385]
|
---|
609 | #define enter_horizontal_hl_mode CUR Strings[386]
|
---|
610 | #define enter_left_hl_mode CUR Strings[387]
|
---|
611 | #define enter_low_hl_mode CUR Strings[388]
|
---|
612 | #define enter_right_hl_mode CUR Strings[389]
|
---|
613 | #define enter_top_hl_mode CUR Strings[390]
|
---|
614 | #define enter_vertical_hl_mode CUR Strings[391]
|
---|
615 | #define set_a_attributes CUR Strings[392]
|
---|
616 | #define set_pglen_inch CUR Strings[393]
|
---|
617 |
|
---|
618 | #define BOOLWRITE 37
|
---|
619 | #define NUMWRITE 33
|
---|
620 | #define STRWRITE 394
|
---|
621 |
|
---|
622 | /* older synonyms for some capabilities */
|
---|
623 | #define beehive_glitch no_esc_ctlc
|
---|
624 | #define teleray_glitch dest_tabs_magic_smso
|
---|
625 | #define micro_char_size micro_col_size
|
---|
626 |
|
---|
627 | #ifdef __INTERNAL_CAPS_VISIBLE
|
---|
628 | #define termcap_init2 CUR Strings[394]
|
---|
629 | #define termcap_reset CUR Strings[395]
|
---|
630 | #define magic_cookie_glitch_ul CUR Numbers[33]
|
---|
631 | #define backspaces_with_bs CUR Booleans[37]
|
---|
632 | #define crt_no_scrolling CUR Booleans[38]
|
---|
633 | #define no_correctly_working_cr CUR Booleans[39]
|
---|
634 | #define carriage_return_delay CUR Numbers[34]
|
---|
635 | #define new_line_delay CUR Numbers[35]
|
---|
636 | #define linefeed_if_not_lf CUR Strings[396]
|
---|
637 | #define backspace_if_not_bs CUR Strings[397]
|
---|
638 | #define gnu_has_meta_key CUR Booleans[40]
|
---|
639 | #define linefeed_is_newline CUR Booleans[41]
|
---|
640 | #define backspace_delay CUR Numbers[36]
|
---|
641 | #define horizontal_tab_delay CUR Numbers[37]
|
---|
642 | #define number_of_function_keys CUR Numbers[38]
|
---|
643 | #define other_non_function_keys CUR Strings[398]
|
---|
644 | #define arrow_key_map CUR Strings[399]
|
---|
645 | #define has_hardware_tabs CUR Booleans[42]
|
---|
646 | #define return_does_clr_eol CUR Booleans[43]
|
---|
647 | #define acs_ulcorner CUR Strings[400]
|
---|
648 | #define acs_llcorner CUR Strings[401]
|
---|
649 | #define acs_urcorner CUR Strings[402]
|
---|
650 | #define acs_lrcorner CUR Strings[403]
|
---|
651 | #define acs_ltee CUR Strings[404]
|
---|
652 | #define acs_rtee CUR Strings[405]
|
---|
653 | #define acs_btee CUR Strings[406]
|
---|
654 | #define acs_ttee CUR Strings[407]
|
---|
655 | #define acs_hline CUR Strings[408]
|
---|
656 | #define acs_vline CUR Strings[409]
|
---|
657 | #define acs_plus CUR Strings[410]
|
---|
658 | #define memory_lock CUR Strings[411]
|
---|
659 | #define memory_unlock CUR Strings[412]
|
---|
660 | #define box_chars_1 CUR Strings[413]
|
---|
661 | #endif /* __INTERNAL_CAPS_VISIBLE */
|
---|
662 |
|
---|
663 |
|
---|
664 | /*
|
---|
665 | * Predefined terminfo array sizes
|
---|
666 | */
|
---|
667 | #define BOOLCOUNT 44
|
---|
668 | #define NUMCOUNT 39
|
---|
669 | #define STRCOUNT 414
|
---|
670 |
|
---|
671 | /* used by code for comparing entries */
|
---|
672 | #define acs_chars_index 146
|
---|
673 |
|
---|
674 | typedef struct termtype { /* in-core form of terminfo data */
|
---|
675 | char *term_names; /* str_table offset of term names */
|
---|
676 | char *str_table; /* pointer to string table */
|
---|
677 | char *Booleans; /* array of boolean values */
|
---|
678 | short *Numbers; /* array of integer values */
|
---|
679 | char **Strings; /* array of string offsets */
|
---|
680 |
|
---|
681 | #if NCURSES_XNAMES
|
---|
682 | char *ext_str_table; /* pointer to extended string table */
|
---|
683 | char **ext_Names; /* corresponding names */
|
---|
684 |
|
---|
685 | unsigned short num_Booleans;/* count total Booleans */
|
---|
686 | unsigned short num_Numbers; /* count total Numbers */
|
---|
687 | unsigned short num_Strings; /* count total Strings */
|
---|
688 |
|
---|
689 | unsigned short ext_Booleans;/* count extensions to Booleans */
|
---|
690 | unsigned short ext_Numbers; /* count extensions to Numbers */
|
---|
691 | unsigned short ext_Strings; /* count extensions to Strings */
|
---|
692 | #endif /* NCURSES_XNAMES */
|
---|
693 |
|
---|
694 | } TERMTYPE;
|
---|
695 |
|
---|
696 | typedef struct term { /* describe an actual terminal */
|
---|
697 | TERMTYPE type; /* terminal type description */
|
---|
698 | short Filedes; /* file description being written to */
|
---|
699 | TTY Ottyb, /* original state of the terminal */
|
---|
700 | Nttyb; /* current state of the terminal */
|
---|
701 | int _baudrate; /* used to compute padding */
|
---|
702 | char * _termname; /* used for termname() */
|
---|
703 | } TERMINAL;
|
---|
704 |
|
---|
705 | extern NCURSES_EXPORT_VAR(TERMINAL *) cur_term;
|
---|
706 |
|
---|
707 | #if 0 /* BROKEN_LINKER */
|
---|
708 | #define boolnames _nc_boolnames()
|
---|
709 | #define boolcodes _nc_boolcodes()
|
---|
710 | #define boolfnames _nc_boolfnames()
|
---|
711 | #define numnames _nc_numnames()
|
---|
712 | #define numcodes _nc_numcodes()
|
---|
713 | #define numfnames _nc_numfnames()
|
---|
714 | #define strnames _nc_strnames()
|
---|
715 | #define strcodes _nc_strcodes()
|
---|
716 | #define strfnames _nc_strfnames()
|
---|
717 |
|
---|
718 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolnames (void);
|
---|
719 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolcodes (void);
|
---|
720 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_boolfnames (void);
|
---|
721 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numnames (void);
|
---|
722 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numcodes (void);
|
---|
723 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_numfnames (void);
|
---|
724 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strnames (void);
|
---|
725 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strcodes (void);
|
---|
726 | extern NCURSES_EXPORT(NCURSES_CONST char * const *) _nc_strfnames (void);
|
---|
727 |
|
---|
728 | #else
|
---|
729 |
|
---|
730 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolnames[];
|
---|
731 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
|
---|
732 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolfnames[];
|
---|
733 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numnames[];
|
---|
734 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numcodes[];
|
---|
735 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) numfnames[];
|
---|
736 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strnames[];
|
---|
737 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strcodes[];
|
---|
738 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) strfnames[];
|
---|
739 |
|
---|
740 | #endif
|
---|
741 |
|
---|
742 | /* internals */
|
---|
743 | extern NCURSES_EXPORT(int) _nc_set_tty_mode (TTY *buf);
|
---|
744 | extern NCURSES_EXPORT(int) _nc_get_tty_mode (TTY *buf);
|
---|
745 | extern NCURSES_EXPORT(int) _nc_read_entry (const char * const, char * const, TERMTYPE *const);
|
---|
746 | extern NCURSES_EXPORT(int) _nc_read_file_entry (const char *const, TERMTYPE *);
|
---|
747 | extern NCURSES_EXPORT(char *) _nc_first_name (const char *const);
|
---|
748 | extern NCURSES_EXPORT(int) _nc_name_match (const char *const, const char *const, const char *const);
|
---|
749 | extern NCURSES_EXPORT(int) _nc_read_termcap_entry (const char *const, TERMTYPE *const);
|
---|
750 | extern NCURSES_EXPORT(const TERMTYPE *) _nc_fallback (const char *);
|
---|
751 |
|
---|
752 | /* entry points */
|
---|
753 | extern NCURSES_EXPORT(TERMINAL *) set_curterm (TERMINAL *);
|
---|
754 | extern NCURSES_EXPORT(int) del_curterm (TERMINAL *);
|
---|
755 |
|
---|
756 | /* miscellaneous entry points */
|
---|
757 | extern NCURSES_EXPORT(int) restartterm (NCURSES_CONST char *, int, int *);
|
---|
758 | extern NCURSES_EXPORT(int) setupterm (NCURSES_CONST char *,int,int *);
|
---|
759 |
|
---|
760 | /* terminfo entry points, also declared in curses.h */
|
---|
761 | #if !defined(__NCURSES_H)
|
---|
762 | extern NCURSES_EXPORT(char *) tigetstr (NCURSES_CONST char *);
|
---|
763 | extern NCURSES_EXPORT(char *) tparm (NCURSES_CONST char *, ...);
|
---|
764 | extern NCURSES_EXPORT_VAR(char) ttytype[];
|
---|
765 | extern NCURSES_EXPORT(int) putp (const char *);
|
---|
766 | extern NCURSES_EXPORT(int) tigetflag (NCURSES_CONST char *);
|
---|
767 | extern NCURSES_EXPORT(int) tigetnum (NCURSES_CONST char *);
|
---|
768 | #endif /* __NCURSES_H */
|
---|
769 |
|
---|
770 | /* termcap database emulation (XPG4 uses const only for 2nd param of tgetent) */
|
---|
771 | #if !defined(NCURSES_TERMCAP_H_incl)
|
---|
772 | extern NCURSES_EXPORT(char *) tgetstr (NCURSES_CONST char *, char **);
|
---|
773 | extern NCURSES_EXPORT(char *) tgoto (const char *, int, int);
|
---|
774 | extern NCURSES_EXPORT(int) tgetent (char *, const char *);
|
---|
775 | extern NCURSES_EXPORT(int) tgetflag (NCURSES_CONST char *);
|
---|
776 | extern NCURSES_EXPORT(int) tgetnum (NCURSES_CONST char *);
|
---|
777 | extern NCURSES_EXPORT(int) tputs (const char *, int, int (*)(int));
|
---|
778 | #endif /* NCURSES_TERMCAP_H_incl */
|
---|
779 |
|
---|
780 | #ifdef __cplusplus
|
---|
781 | }
|
---|
782 | #endif
|
---|
783 |
|
---|
784 | #endif /* NCURSES_TERM_H_incl */
|
---|