term.h 37 KB

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