home *** CD-ROM | disk | FTP | other *** search
/ Serving the Web / ServingTheWeb1995.disc1of1.iso / linux / slacksrce / d / libc / libc-4.6 / libc-4 / libc-linux / curses-old / curses.c < prev    next >
Encoding:
C/C++ Source or Header  |  1993-01-01  |  3.6 KB  |  161 lines

  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, with or without
  6.  * modification, are permitted provided that the following conditions
  7.  * are met:
  8.  * 1. Redistributions of source code must retain the above copyright
  9.  *    notice, this list of conditions and the following disclaimer.
  10.  * 2. Redistributions in binary form must reproduce the above copyright
  11.  *    notice, this list of conditions and the following disclaimer in the
  12.  *    documentation and/or other materials provided with the distribution.
  13.  * 3. All advertising materials mentioning features or use of this software
  14.  *    must display the following acknowledgement:
  15.  *    This product includes software developed by the University of
  16.  *    California, Berkeley and its contributors.
  17.  * 4. Neither the name of the University nor the names of its contributors
  18.  *    may be used to endorse or promote products derived from this software
  19.  *    without specific prior written permission.
  20.  *
  21.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31.  * SUCH DAMAGE.
  32.  */
  33.  
  34. #if 0
  35. #ifndef lint
  36. static char sccsid[] = "@(#)curses.c    5.7 (Berkeley) 6/1/90";
  37. #endif /* not lint */
  38. #endif
  39.  
  40. /*
  41.  * Define global variables
  42.  *
  43.  */
  44. # include    "curses.h"
  45.  
  46. bool    _echoit        = TRUE,    /* set if stty indicates ECHO        */
  47.     _rawmode    = FALSE,/* set if stty indicates RAW mode    */
  48.     My_term        = FALSE,/* set if user specifies terminal type    */
  49.     _endwin        = FALSE;/* set if endwin has been called    */
  50.  
  51. char    ttytype[50] = "",    /* long name of tty        */
  52.  
  53.     *Def_term = "unknown";    /* default terminal type    */
  54.  
  55. int    _tty_ch    = 0,    /* file channel which is a tty        */
  56.     /* let applications detect the values. */
  57.     LINES = 0,    /* number of lines allowed on screen    */
  58.     COLS = 0;    /* number of columns allowed on screen    */
  59.  
  60. tcflag_t _res_iflg = 0;
  61. tcflag_t _res_lflg = 0;
  62.  
  63. WINDOW    *stdscr        = NULL,
  64.     *curscr        = NULL;
  65.  
  66. # ifdef DEBUG
  67. FILE    *outf = 0;    /* debug output file        */
  68. # endif
  69.  
  70. SGTTY    _tty = {0, 0, 0, 0, 0, ""};    /* tty modes    */
  71.  
  72. bool    AM = 0,
  73.     BS = 0,
  74.     CA = 0,
  75.     DA = 0,
  76.     DB = 0,
  77.     EO = 0,
  78.     HC = 0,
  79.     HZ = 0,
  80.     IN = 0,
  81.     MI = 0,
  82.     MS = 0,
  83.     NC = 0,
  84.     NS = 0,
  85.     OS = 0,
  86.     UL = 0,
  87.     XB = 0,
  88.     XN = 0,
  89.     XT = 0,
  90.     XS = 0,
  91.     XX = 0;
  92. char    *AL = 0,
  93.     *BC = 0,
  94.     *BT = 0,
  95.     *CD = 0,
  96.     *CE = 0,
  97.     *CL = 0,
  98.     *CM = 0,
  99.     *CR = 0,
  100.     *CS = 0,
  101.     *DC = 0,
  102.     *DL = 0,
  103.     *DM = 0,
  104.     *DO = 0,
  105.     *ED = 0,
  106.     *EI = 0,
  107.     *K0 = 0,
  108.     *K1 = 0,
  109.     *K2 = 0,
  110.     *K3 = 0,
  111.     *K4 = 0,
  112.     *K5 = 0,
  113.     *K6 = 0,
  114.     *K7 = 0,
  115.     *K8 = 0,
  116.     *K9 = 0,
  117.     *HO = 0,
  118.     *IC = 0,
  119.     *IM = 0,
  120.     *IP = 0,
  121.     *KD = 0,
  122.     *KE = 0,
  123.     *KH = 0,
  124.     *KL = 0,
  125.     *KR = 0,
  126.     *KS = 0,
  127.     *KU = 0,
  128.     *LL = 0,
  129.     *MA = 0,
  130.     *ND = 0,
  131.     *NL = 0,
  132.     *RC = 0,
  133.     *SC = 0,
  134.     *SE = 0,
  135.     *SF = 0,
  136.     *SO = 0,
  137.     *SR = 0,
  138.     *TA = 0,
  139.     *TE = 0,
  140.     *TI = 0,
  141.     *UC = 0,
  142.     *UE = 0,
  143.     *UP = 0,
  144.     *US = 0,
  145.     *VB = 0,
  146.     *VS = 0,
  147.     *VE = 0,
  148.     *AL_PARM = 0,
  149.     *DL_PARM = 0,
  150.     *UP_PARM = 0,
  151.     *DOWN_PARM = 0,
  152.     *LEFT_PARM = 0,
  153.     *RIGHT_PARM = 0;
  154. char    PC = 0;
  155.  
  156. /*
  157.  * From the tty modes...
  158.  */
  159.  
  160. bool    GT = 0, NONL = 0, UPPERCASE = 0, normtty = 0, _pfast = 0;
  161.