|
|
1.1 ! root 1: /* 2648.h 4.1 83/03/09 */ ! 2: /* ! 3: * lib2648: routines to deal directly with the HP 2648 Graphics terminal. ! 4: */ ! 5: ! 6: #include <stdio.h> ! 7: ! 8: #define ESC '\033' /* Escape */ ! 9: ! 10: /* Normal/inverse video */ ! 11: #define NORMAL 0 /* not inverse video */ ! 12: #define INVERSE 1 /* inverse video */ ! 13: ! 14: /* Kinds of lines we can draw */ ! 15: #define MX 10 /* exclusive or what's on screen */ ! 16: #define MC 11 /* clear what's on screen */ ! 17: #define MS 12 /* set what's on screen */ ! 18: ! 19: /* Escape sequence modes the terminal might be in */ ! 20: #define NONE 20 /* not in an escape sequence */ ! 21: #define ESCD 21 /* in an escape * d sequence */ ! 22: #define ESCP 22 /* in an escape * p sequence */ ! 23: #define ESCM 23 /* in an escape * m sequence */ ! 24: #define TEXT 24 /* in graphics text mode */ ! 25: ! 26: /* ! 27: * Constants for 2648 ^E/^F handshaking. ! 28: */ ! 29: #define ENQ 5 /* ^E sent by system to terminal */ ! 30: #define ACK 6 /* ^F reply by terminal to system */ ! 31: #define TBLKSIZ 32 /* Max # chars between handshakes */ ! 32: ! 33: /* ! 34: * Misc. variables used by lib2648. ! 35: */ ! 36: int _on2648; /* true if getenv("TERM") is hp2648 */ ! 37: int _video; /* are we in inverse video mode? */ ! 38: int _actsmode; /* line type mode screen actually in */ ! 39: int _supsmode; /* line type mode screen supposed to be in */ ! 40: int _escmode; /* flavor of escape sequence currently in */ ! 41: int _cursoron; /* true if cursor is on */ ! 42: ! 43: int _outcount; /* # of consecutive chars without read sent */ ! 44: char _pushback[BUFSIZ]; /* queue of chars pushed back onto the input */ ! 45: char *_pb_front, *_pb_back; ! 46: ! 47: int _penx, _peny; /* where pen is really at */ ! 48: int _curx, _cury; /* where cursor is really at */ ! 49: int _supx, _supy; /* where pen and cursor are supposed to be */ ! 50: ! 51: #ifdef TRACE ! 52: FILE *trace; /* trace file for debugging */ ! 53: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.