term.h 41 KB

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