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