|
|
1.1 root 1: /*
2: * Copyright (c) 1981 Regents of the University of California.
3: * All rights reserved.
4: *
5: * Redistribution and use in source and binary forms are permitted
6: * provided that the above copyright notice and this paragraph are
7: * duplicated in all such forms and that any documentation,
8: * advertising materials, and other materials related to such
9: * distribution and use acknowledge that the software was developed
10: * by the University of California, Berkeley. The name of the
11: * University may not be used to endorse or promote products derived
12: * from this software without specific prior written permission.
13: * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14: * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15: * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16: */
17:
18: #ifndef COHERENT
19: #ifndef lint
20: static uchar sccsid[] = "@(#)curses.c 5.5 (Berkeley) 6/30/88";
21: #endif /* not lint */
22: #endif /* not COHERENT */
23:
24: /*
25: * Define global variables
26: *
27: */
28: #include "curses.h"
29:
30: bool _echoit = TRUE, /* set if stty indicates ECHO */
31: _rawmode = FALSE,/* set if stty indicates RAW mode */
32: My_term = FALSE,/* set if user specifies terminal type */
33: _endwin = FALSE;/* set if endwin has been called */
34:
35: uchar ttytype[50], /* long name of tty */
36: *Def_term = "unknown"; /* default terminal type */
37:
38: int _tty_ch = 1, /* file channel which is a tty */
39: LINES, /* number of lines allowed on screen */
40: COLS, /* number of columns allowed on screen */
41: _res_flg; /* sgtty flags for reseting later */
42:
43: WINDOW *stdscr = NULL,
44: *curscr = NULL;
45:
46: tflgent_t * tflgmap = tflgtab; /* Boolean field into variable xlat tab */
47: tstrent_t * tstrmap = tstrtab; /* String field into variable xlat tab */
48: tkeyent_t * tkeymap = tkeytab; /* Key token into variable xlat table */
49:
50: # ifdef DEBUG
51: FILE *outf; /* debug output file */
52: # endif
53:
54: SGTTY _tty; /* tty modes */
55:
56: bool AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL,
57: XB, XN, XT, XS, XX;
58: uchar *AL,
59: *BC, *BT,
60: *CD, *CE, *CL, *CM, *CR, *CS,
61: *DC, *DL, *DM, *DO,
62: *ED, *EI,
63: *HO,
64: *IC, *IM, *IP,
65: *KE, *KS,
66: *LL,
67: *MA,
68: *ND, *NL,
69: *RC,
70: *SC, *SE, *SF, *SO, *SR,
71: *TA, *TE, *TI,
72: *UC, *UE, *UP, *US,
73: *AL_PARM, *DL_PARM, *UP_PARM, *DOWN_PARM,
74: *LEFT_PARM, *RIGHT_PARM;
75: uchar PC;
76:
77: /*
78: * Capabilities added by INETCO to termcap.
79: * NOTE: Variable names chosen for compatability with terminfo,
80: * rather than choose arbitrary names.
81: */
82: int magic_cookie_glitch;
83:
84: uchar *bell,
85: *cursor_invisible, *cursor_normal, *cursor_visible,
86: *enter_am_mode, *enter_bold_mode, *enter_blink_mode,
87: *enter_delete_mode, *enter_dim_mode, *enter_protected_mode,
88: *enter_reverse_mode, *enter_secure_mode,
89: *exit_am_mode, *exit_attribute_mode,
90: *flash_screen,
91: *init_1string, *init_2string, *init_3string,
92: *key_a1, *key_a3,
93: *key_b2, *key_backspace, *key_beg, *key_btab,
94: *key_c1, *key_c3, *key_cancel, *key_catab, *key_clear,
95: *key_close, *key_command, *key_copy, *key_create, *key_ctab,
96: *key_dc, *key_dl, *key_down,
97: *key_eic, *key_end, *key_enter, *key_eol, *key_eos, *key_exit,
98: *key_f0, *key_f1, *key_f2, *key_f3, *key_f4,
99: *key_f5, *key_f6, *key_f7, *key_f8, *key_f9,
100: *key_f10, *key_f11, *key_f12, *key_f13, *key_f14,
101: *key_f15, *key_f16, *key_f17, *key_f18, *key_f19,
102: *key_f20, *key_f21, *key_f22, *key_f23, *key_f24,
103: *key_f25, *key_f26, *key_f27, *key_f28, *key_f29,
104: *key_f30, *key_f31, *key_f32, *key_f33, *key_f34,
105: *key_f35, *key_f36, *key_f37, *key_f38, *key_f39,
106: *key_f40, *key_f41, *key_f42, *key_f43, *key_f44,
107: *key_f45, *key_f46, *key_f47, *key_f48, *key_f49,
108: *key_f50, *key_f51, *key_f52, *key_f53, *key_f54,
109: *key_f55, *key_f56, *key_f57, *key_f58, *key_f59,
110: *key_f60, *key_f61, *key_f62, *key_f63,
111: *key_find,
112: *key_help, *key_home,
113: *key_ic, *key_il,
114: *key_left, *key_ll,
115: *key_mark, *key_message, *key_move,
116: *key_next, *key_npage,
117: *key_open, *key_options,
118: *key_ppage, *key_previous, *key_print,
119: *key_redo, *key_reference, *key_refresh, *key_replace,
120: *key_restart, *key_resume, *key_right,
121: *key_save, *key_sbeg, *key_scancel, *key_scommand, *key_scopy,
122: *key_screate, *key_sdc, *key_sdl, *key_select, *key_send,
123: *key_seol, *key_sexit, *key_sf, *key_sfind, *key_shelp,
124: *key_shome, *key_sic, *key_sleft, *key_smessage, *key_smove,
125: *key_snext, *key_soptions, *key_sprevious, *key_sprint,
126: *key_sr, *key_sredo, *key_sreplace, *key_sright, *key_srsume,
127: *key_ssave, *key_ssuspend, *key_stab, *key_sundo, *key_suspend,
128: *key_undo, *key_up,
129: *reset_1string, *reset_2string, *reset_3string;
130:
131: /*
132: * From the tty modes...
133: */
134:
135: bool GT, NONL, UPPERCASE, normtty, _pfast;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.