xref: /original-bsd/lib/libcurses/curses.c (revision 04218a6a)
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 lint
19 static char sccsid[] = "@(#)curses.c	5.6 (Berkeley) 11/22/89";
20 #endif /* not lint */
21 
22 /*
23  * Define global variables
24  *
25  */
26 # include	"curses.h"
27 
28 bool	_echoit		= TRUE,	/* set if stty indicates ECHO		*/
29 	_rawmode	= FALSE,/* set if stty indicates RAW mode	*/
30 	My_term		= FALSE,/* set if user specifies terminal type	*/
31 	_endwin		= FALSE;/* set if endwin has been called	*/
32 
33 char	ttytype[50],		/* long name of tty			*/
34 	*Def_term	= "unknown";	/* default terminal type	*/
35 
36 int	_tty_ch		= 0,	/* file channel which is a tty		*/
37 	LINES,			/* number of lines allowed on screen	*/
38 	COLS,			/* number of columns allowed on screen	*/
39 	_res_flg;		/* sgtty flags for reseting later	*/
40 
41 WINDOW	*stdscr		= NULL,
42 	*curscr		= NULL;
43 
44 # ifdef DEBUG
45 FILE	*outf;			/* debug output file			*/
46 # endif
47 
48 SGTTY	_tty;			/* tty modes				*/
49 
50 bool	AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL, XB, XN,
51 	XT, XS, XX;
52 char	*AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL, *DM,
53 	*DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6, *K7, *K8,
54 	*K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL, *KR, *KS, *KU,
55 	*LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF, *SO, *SR, *TA, *TE,
56 	*TI, *UC, *UE, *UP, *US, *VB, *VS, *VE, *AL_PARM, *DL_PARM,
57 	*UP_PARM, *DOWN_PARM, *LEFT_PARM, *RIGHT_PARM;
58 char	PC;
59 
60 /*
61  * From the tty modes...
62  */
63 
64 bool	GT, NONL, UPPERCASE, normtty, _pfast;
65