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