|
|
1.1 ! root 1: /********************************************************************* ! 2: * COPYRIGHT NOTICE * ! 3: ********************************************************************** ! 4: * This software is copyright (C) 1982 by Pavel Curtis * ! 5: * * ! 6: * Permission is granted to reproduce and distribute * ! 7: * this file by any means so long as no fee is charged * ! 8: * above a nominal handling fee and so long as this * ! 9: * notice is always included in the copies. * ! 10: * * ! 11: * Other rights are reserved except as explicitly granted * ! 12: * by written permission of the author. * ! 13: * Pavel Curtis * ! 14: * Computer Science Dept. * ! 15: * 405 Upson Hall * ! 16: * Cornell University * ! 17: * Ithaca, NY 14853 * ! 18: * * ! 19: * Ph- (607) 256-4934 * ! 20: * * ! 21: * Pavel.Cornell@Udel-Relay (ARPAnet) * ! 22: * decvax!cornell!pavel (UUCPnet) * ! 23: *********************************************************************/ ! 24: ! 25: /* ! 26: * curses.priv.h ! 27: * ! 28: * Header file for curses library objects which are private to ! 29: * the library. ! 30: * ! 31: * $Log: RCS/curses.priv.v $ ! 32: * Revision 2.3 92/10/26 21:42:44 munk ! 33: * reduced MAXLINES and MAXCOLUMNS only under COHERENT 3.x not under 4.0 ! 34: * ! 35: * Revision 2.2 91/04/20 17:46:12 munk ! 36: * MAXLINES reduced to 25 and MAXCOLUMNS reduced to 80 if compiled ! 37: * under COHERENT, to reduce size of memory used ! 38: * ! 39: * Revision 2.1 82/10/25 14:46:17 pavel ! 40: * Added Copyright Notice ! 41: * ! 42: * Revision 2.0 82/10/25 13:50:25 pavel ! 43: * Beta-one Test Release ! 44: */ ! 45: ! 46: #include <stdio.h> ! 47: #include "curses.h" ! 48: ! 49: #define min(a,b) ((a) > (b) ? (b) : (a)) ! 50: #define max(a,b) ((a) < (b) ? (b) : (a)) ! 51: ! 52: #define CHANGED -1 ! 53: ! 54: WINDOW *stdscr, *curscr, *newscr; ! 55: int LINES, COLS, COLORS, COLOR_PAIRS, __color__, __pair_changed__; ! 56: short __pairs__[2][64]; ! 57: ! 58: extern int _tracing; ! 59: ! 60: ! 61: struct try ! 62: { ! 63: struct try *child; /* ptr to child. NULL if none */ ! 64: struct try *sibling; /* ptr to sibling. NULL if none */ ! 65: char ch; /* character at this node */ ! 66: short value; /* code of string so far. NULL if none */ ! 67: }; ! 68: ! 69: ! 70: struct screen ! 71: { ! 72: FILE *_ifp; /* input file ptr for this terminal */ ! 73: FILE *_ofp; /* output file ptr for this terminal */ ! 74: struct term *_term; /* used by terminfo stuff */ ! 75: WINDOW *_curscr; /* windows specific to a given terminal */ ! 76: WINDOW *_newscr; ! 77: struct try *_keytry; /* "Try" for use with keypad mode */ ! 78: char _backbuf[10]; /* Buffer for pushed back characters */ ! 79: int _backcnt; /* How many characters in _backbuf? */ ! 80: int _cursrow; /* Row and column of physical cursor */ ! 81: int _curscol; ! 82: bool _nl; /* True if terminal has CRMOD bit on */ ! 83: bool _raw; /* True if in raw mode */ ! 84: bool _cbreak; /* True if in cbreak mode */ ! 85: bool _echo; /* True if echo on */ ! 86: bool _nlmapping; /* True if terminal is really doing */ ! 87: /* NL mapping (fn of raw and nl) */ ! 88: int _costs[9]; /* costs of cursor movements for mvcur */ ! 89: int _costinit; /* set if _costs[] is initialized */ ! 90: }; ! 91: ! 92: extern struct screen *SP; ! 93: ! 94: #define MAXCOLUMNS 135 ! 95: #define MAXLINES 66 ! 96: #define UNINITIALISED ((struct try * ) -1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.