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 this notice is preserved and that due credit is given 7 * to the University of California at Berkeley. The name of the University 8 * may not be used to endorse or promote products derived from this 9 * software without specific prior written permission. This software 10 * is provided ``as is'' without express or implied warranty. 11 */ 12 13 #ifndef lint 14 static char sccsid[] = "@(#)curses.c 5.4 (Berkeley) 06/08/88"; 15 #endif /* not lint */ 16 17 /* 18 * Define global variables 19 * 20 */ 21 # include "curses.h" 22 23 bool _echoit = TRUE, /* set if stty indicates ECHO */ 24 _rawmode = FALSE,/* set if stty indicates RAW mode */ 25 My_term = FALSE,/* set if user specifies terminal type */ 26 _endwin = FALSE;/* set if endwin has been called */ 27 28 char ttytype[50], /* long name of tty */ 29 *Def_term = "unknown"; /* default terminal type */ 30 31 int _tty_ch = 1, /* file channel which is a tty */ 32 LINES, /* number of lines allowed on screen */ 33 COLS, /* number of columns allowed on screen */ 34 _res_flg; /* sgtty flags for reseting later */ 35 36 WINDOW *stdscr = NULL, 37 *curscr = NULL; 38 39 # ifdef DEBUG 40 FILE *outf; /* debug output file */ 41 # endif 42 43 SGTTY _tty; /* tty modes */ 44 45 bool AM, BS, CA, DA, DB, EO, HC, HZ, IN, MI, MS, NC, NS, OS, UL, XB, XN, 46 XT, XS, XX; 47 char *AL, *BC, *BT, *CD, *CE, *CL, *CM, *CR, *CS, *DC, *DL, *DM, 48 *DO, *ED, *EI, *K0, *K1, *K2, *K3, *K4, *K5, *K6, *K7, *K8, 49 *K9, *HO, *IC, *IM, *IP, *KD, *KE, *KH, *KL, *KR, *KS, *KU, 50 *LL, *MA, *ND, *NL, *RC, *SC, *SE, *SF, *SO, *SR, *TA, *TE, 51 *TI, *UC, *UE, *UP, *US, *VB, *VS, *VE, *AL_PARM, *DL_PARM, 52 *UP_PARM, *DOWN_PARM, *LEFT_PARM, *RIGHT_PARM; 53 char PC; 54 55 /* 56 * From the tty modes... 57 */ 58 59 bool GT, NONL, UPPERCASE, normtty, _pfast; 60