term.h 39 KB

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