Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

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