term.h 40 KB

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