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