|
|
1.1 root 1: #ifndef VT_H
2: #define VT_H
3:
4: /*
5: * Type definitions
6: */
7:
8: /*
9: * Virtual terminal structure VTDATA
10: */
11: #ifdef _I386
12: typedef struct {
13: unsigned int off;
14: unsigned /*short*/ seg;
15: } faddr_t;
16: #endif
17:
18: typedef struct _VTDATA {
19: /*
20: * Elements dealing with the graphic adaptor
21: * - equivalent to the assembler definitions above.
22: */
23: void (*vmm_func)();
24: unsigned vmm_port, vmm_seg, vmm_off;
25: unsigned vmm_rowl, vmm_col, vmm_pos, vmm_attr;
26: unsigned vmm_n1, vmm_n2, vmm_brow;
27: unsigned vmm_erow, vmm_lrow, vmm_srow;
28: unsigned vmm_scol, vmm_ibrow, vmm_ierow;
29: unsigned vmm_invis;
30: unsigned vmm_slow, vmm_wrap, vmm_visible, vmm_esc;
31: unsigned vmm_mseg, vmm_moff, vmm_vseg, vmm_voff;
32:
33: /*
34: * Elements dealing with both the graphic adaptor & keyboard
35: * - equivalent to the assembler definitions above.
36: */
37: dev_t vt_ind;
38: #ifdef _I386
39: KBTBL vt_kb[MAX_KEYS];
40: char *vt_buffer;
41: #else
42: SEG *vt_buffer;
43: #endif
44: /*
45: * Elements dealing with the keyboard
46: *
47: * The keyboard mapping table is too large to fit into kernel data space,
48: * so we need to allocate a segment to it.
49: * The function keys tend to be small and tend to change substantially
50: * more often than the mapping table, so we keep them in the kernel data space.
51: */
52: int vnkb_lastc; /* state info */
53: unsigned vnkb_shift; /* Overall shift state */
54: unsigned char **vnkb_funkeyp; /* Pointer to array of func. key ptrs */
55: FNKEY *vnkb_fnkeys; /* Pointer to structure of values */
56: unsigned vnkb_fklength; /* length of k_fnval field in fnkeys */
57: unsigned vnkb_sh_index; /* shift/lock state index */
58: char vnkb_fk_loaded; /* true == function keys resident */
59: } VTDATA;
60:
61: typedef struct _HWentry {
62: unsigned char count, found;
63: short port;
64: faddr_t vidmemory;
65: struct {
66: unsigned char row;
67: unsigned char col;
68: #define TEXTBLOCK 4000 /* 25 x 80 x 2 */
69: } screen;
70: short start;
71: } HWentry;
72:
73: #ifndef KB_MAJOR
74: #include <sys/devices.h> /* KB_MAJOR defined in here */
75: #endif
76:
77: #ifndef VT_MAJOR
78: #define VT_MAJOR KB_MAJOR
79: #endif
80:
81: #define VT_PHYSICAL 0x40
82: #define VT_HW 0x30
83: #define VT_HW_COLOR 0x00
84: #define VT_HW_MONO 0x10
85:
86: #define VT_INDEX(dev) (dev&0x3F)
87:
88: #define NO_DEVICE 0xFF /* to signify that the minor does not exist */
89:
90: #define PRINTV if(vt_verbose)printf
91: #define PUTC if(vt_verbose)putc
92:
93: /*
94: * patchable params for non-standard keyboards
95: */
96: extern int KBDATA; /* Keyboard data */
97: extern int KBCTRL; /* Keyboard control */
98: extern int KBSTS_CMD; /* Keyboard status/command */
99: extern int KBFLAG; /* Keyboard reset flag */
100: extern int KBBOOT; /* 0: disallow reboot from keyboard */
101: extern int KBTIMEOUT; /* shouldn't need this much */
102: extern int KBCMDBYTE; /* no translation */
103:
104: /*
105: * globals
106: */
107: extern int vtmax, vtcount, vtactive;
108: extern int vt_verbose, vt_opened, vtloaded;
109: extern VTDATA *vtconsole, **vtdata;
110: extern char kb_table_loaded;
111: extern HWentry *vtHWtable[];
112:
113: #endif /* VT_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.