home *** CD-ROM | disk | FTP | other *** search
/ The CDPD Public Domain Collection for CDTV 3 / CDPDIII.bin / pd / programming / c / curses / src / _data.c < prev    next >
Encoding:
C/C++ Source or Header  |  1992-06-30  |  2.8 KB  |  97 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.5  92/06/10  23:45:09  sie
  42.  * Added serial support.
  43.  * 
  44.  * Revision 1.4  92/01/25  23:56:54  sie
  45.  * added FontHeight and FontWidth.
  46.  * 
  47.  * Revision 1.3  91/12/30  11:52:48  sie
  48.  * default DEPTH now 1.
  49.  * 
  50.  * Revision 1.2  91/12/28  22:46:17  sie
  51.  * changed attrs to UBYTE from short + some tidying up.
  52.  * 
  53.  * Revision 1.1  91/09/07  11:52:52  sie
  54.  * Initial revision
  55.  * 
  56.  *
  57.  */
  58.  
  59. static char *rcsid = "$Header: SRC:lib/curses/src/RCS/_data.c,v 1.5 92/06/10 23:45:09 sie Exp $";
  60.  
  61. #include "acurses.h"
  62.  
  63. /*
  64.  * Should initialise all of these to NULL to be certain that
  65.  * CleanExit() will function correctly. Most compilers will do this
  66.  * anyway, but better safe than GURUed.
  67.  */
  68.  
  69. struct IntuitionBase *IntuitionBase = NULL;
  70. struct GfxBase *GfxBase = NULL;
  71.  
  72. struct Library *ConsoleDevice = NULL;
  73. struct IOStdReq ioreq;
  74. struct Screen *CursesScreen = NULL;
  75. struct Window *CursesWindow = NULL;
  76.  
  77. struct RastPort *RPort = NULL;
  78. struct ViewPort *VPort = NULL;
  79. struct FileHandle *ifh = NULL;
  80.  
  81. BYTEBITS CursesFlags = CFLAG_ECHO | CFLAG_NLCR | CFLAG_CURSOR;
  82. int CursesType = CUST_CURSES;    /* default to use graphics library */
  83.  
  84. short CursorCol = 0, CursorLine = 0, LCursorLine = -1, LCursorCol = -1;
  85. struct WindowState *HeadWindowList = (struct WindowState *)NULL;
  86. struct RefreshElement *HeadRefreshList=(struct RefreshElement *)NULL;
  87.  
  88. WINDOW *stdscr = (WINDOW *)NULL, *curscr = (WINDOW *)NULL;
  89. int LINES=24, COLS=80, DEPTH=1;  /* Defaults */
  90. int FontHeight, FontWidth, FontBase;
  91.  
  92.  
  93. /*
  94.  *  Need to be global so that flushinp() can reset them !
  95.  */
  96. unsigned char GetchNChars=0, GetchBufPos=0;
  97.