home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD2.bin / bbs / dev / curses-2.10.lha / curses / src / _data.c < prev    next >
C/C++ Source or Header  |  1994-02-21  |  3KB  |  117 lines

  1. /* -*-C-*-
  2.  *
  3.  *
  4.  * Filename : _data.c
  5.  *
  6.  * Author   : Simon J Raybould.    (sie@fulcrum.bt.co.uk).
  7.  *
  8.  * Date     : Friday 23rd August 1991.
  9.  *
  10.  * Desc     : Internal data.
  11.  *
  12.  *
  13.  * THIS CODE IS NOT PUBLIC DOMAIN
  14.  * ==============================
  15.  * 
  16.  * This code is copyright Simon J Raybould 1991, all rights are reserved.
  17.  * All code, ideas, data structures and algorithms remain the property of the
  18.  * author. Neither the whole nor sections of this code may be used as part
  19.  * of other code without the authors consent. If you wish to use some of this
  20.  * code then please email me at (sie@fulcrum.bt.co.uk).
  21.  *
  22.  * This source is not public domain, so you do not have any right to alter it
  23.  * or sell it for personal gain. The source is provided purely for reference
  24.  * purposes. You may re-compile the source with any compiler you choose.
  25.  * You must not distribute altered copies without the authors consent. My
  26.  * intention is that the source will help people isolate any bugs much more
  27.  * effectivly.
  28.  *
  29.  * Disclaimer
  30.  * ==========
  31.  *
  32.  * No implication is made as to this code being fit for any purpose at all.
  33.  * I (the author) shall not be held responsible for any loss of data or damage 
  34.  * to property that may result from its use or misuse.
  35.  *
  36.  *
  37.  * Revision History
  38.  * ================
  39.  *
  40.  * $Log: _data.c,v $
  41.  * Revision 1.7  1993/05/17  23:33:10  sie
  42.  * Underscores added to names.
  43.  * Changes for version 2.10
  44.  *
  45.  * Revision 1.6  1992/12/25  23:40:50  sie
  46.  * GNU C port.
  47.  *
  48.  * Revision 1.5  92/06/10  23:45:09  sie
  49.  * Added serial support.
  50.  * 
  51.  * Revision 1.4  92/01/25  23:56:54  sie
  52.  * added FontHeight and FontWidth.
  53.  * 
  54.  * Revision 1.3  91/12/30  11:52:48  sie
  55.  * default DEPTH now 1.
  56.  * 
  57.  * Revision 1.2  91/12/28  22:46:17  sie
  58.  * changed attrs to UBYTE from short + some tidying up.
  59.  * 
  60.  * Revision 1.1  91/09/07  11:52:52  sie
  61.  * Initial revision
  62.  * 
  63.  *
  64.  */
  65.  
  66. static char *rcsid = "$Header: /SRC/lib/curses/src/RCS/_data.c,v 1.7 1993/05/17 23:33:10 sie Exp $";
  67.  
  68. #include "acurses.h"
  69.  
  70. /*
  71.  * Should initialise all of these to NULL to be certain that
  72.  * CleanExit() will function correctly. Most compilers will do this
  73.  * anyway, but better safe than GURUed.
  74.  */
  75.  
  76. struct IntuitionBase *IntuitionBase = NULL;
  77. struct GfxBase *GfxBase = NULL;
  78.  
  79. struct Library *ConsoleDevice = NULL;
  80. struct IOStdReq ioreq;
  81. struct Screen *_CursesScreen = NULL;
  82. struct Window *_CursesWindow = NULL;
  83. struct MsgPort *_CursesMsgPort = NULL;
  84.  
  85. struct RastPort *_RPort = NULL;
  86. struct ViewPort *_VPort = NULL;
  87. BPTR _ifh = NULL;
  88.  
  89. BYTEBITS _CursesFlags = CFLAG_ECHO | CFLAG_NLCR | CFLAG_CURSOR;
  90. int _CursesType = CUST_CURSES;    /* default to use graphics library */
  91.  
  92. short _CursorCol = 0, _CursorLine = 0, _LCursorLine = -1, _LCursorCol = -1;
  93. struct RefreshElement *_HeadRefreshList=(struct RefreshElement *)NULL;
  94.  
  95. WINDOW *stdscr = (WINDOW *)NULL, *curscr = (WINDOW *)NULL;
  96. int LINES=24, COLS=80, DEPTH=1;  /* Defaults */
  97. int _FontHeight=8, _FontWidth=8, _FontBase=6; /* defaults for topaz 8 */
  98.  
  99.  
  100. /*
  101.  *  Need to be global so that flushinp() can reset them.
  102.  */
  103. unsigned char _GetchNChars=0, _GetchBufPos=0;
  104.  
  105. /*
  106.  * termcap stuff.
  107.  */
  108. char *__area;                   /* need to remember where the users buffer is */
  109. char *__capary[MAX_CAPS];       /* array of pointers to capabilities */
  110. int __no_caps = 0;              /* number of capabilities */
  111.  
  112. /*
  113.  * data for ANSI curses.
  114.  */
  115. char *_clstr;                    /* clear screen capability */
  116. char *_cmstr;                    /* cursor motion capability */
  117.