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