|
|
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.2 91/04/20 17:46:12 munk
33: MAXLINES reduced to 25 and MAXCOLUMNS reduced to 80 if compiled
34: under COHERENT, to reduce size of memory used
35:
36: Revision 2.1 82/10/25 14:46:17 pavel
37: Added Copyright Notice
38:
39: Revision 2.0 82/10/25 13:50:25 pavel
40: Beta-one Test Release
41:
42: *
43: */
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 *newscr;
55:
56: extern int _tracing;
57:
58:
59: struct try
60: {
61: struct try *child; /* ptr to child. NULL if none */
62: struct try *sibling; /* ptr to sibling. NULL if none */
63: char ch; /* character at this node */
64: short value; /* code of string so far. NULL if none */
65: };
66:
67:
68: struct screen
69: {
70: FILE *_ifp; /* input file ptr for this terminal */
71: FILE *_ofp; /* output file ptr for this terminal */
72: struct term *_term; /* used by terminfo stuff */
73: WINDOW *_curscr; /* windows specific to a given terminal */
74: WINDOW *_newscr;
75: struct try *_keytry; /* "Try" for use with keypad mode */
76: char _backbuf[10]; /* Buffer for pushed back characters */
77: int _backcnt; /* How many characters in _backbuf? */
78: int _cursrow; /* Row and column of physical cursor */
79: int _curscol;
80: bool _nl; /* True if terminal has CRMOD bit on */
81: bool _raw; /* True if in raw mode */
82: bool _cbreak; /* True if in cbreak mode */
83: bool _echo; /* True if echo on */
84: bool _nlmapping; /* True if terminal is really doing */
85: /* NL mapping (fn of raw and nl) */
86: int _costs[9]; /* costs of cursor movements for mvcur */
87: int _costinit; /* set if _costs[] is initialized */
88: };
89:
90: extern struct screen *SP;
91:
92: #ifndef COHERENT
93: #define MAXCOLUMNS 135
94: #define MAXLINES 66
95: #else
96: #define MAXCOLUMNS 80
97: #define MAXLINES 25
98: #endif
99: #define UNINITIALISED ((struct try * ) -1)
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.