1
2
3
4
5
6
7 #define NPAR 16
8
9 struct vc_data {
10 unsigned long vc_screenbuf_size;
11 unsigned short vc_video_erase_char;
12 unsigned char vc_attr;
13 unsigned char vc_def_color;
14 unsigned char vc_color;
15 unsigned char vc_s_color;
16 unsigned char vc_ulcolor;
17 unsigned char vc_halfcolor;
18 unsigned long vc_origin;
19 unsigned long vc_scr_end;
20 unsigned long vc_pos;
21 unsigned long vc_x,vc_y;
22 unsigned long vc_top,vc_bottom;
23 unsigned long vc_state;
24 unsigned long vc_npar,vc_par[NPAR];
25 unsigned long vc_video_mem_start;
26 unsigned long vc_video_mem_end;
27 unsigned long vc_saved_x;
28 unsigned long vc_saved_y;
29
30 unsigned long vc_charset : 1;
31 unsigned long vc_s_charset : 1;
32 unsigned long vc_disp_ctrl : 1;
33 unsigned long vc_toggle_meta : 1;
34 unsigned long vc_decscnm : 1;
35 unsigned long vc_decom : 1;
36 unsigned long vc_decawm : 1;
37 unsigned long vc_deccm : 1;
38 unsigned long vc_decim : 1;
39 unsigned long vc_deccolm : 1;
40
41 unsigned long vc_intensity : 2;
42 unsigned long vc_underline : 1;
43 unsigned long vc_blink : 1;
44 unsigned long vc_reverse : 1;
45 unsigned long vc_s_intensity : 2;
46 unsigned long vc_s_underline : 1;
47 unsigned long vc_s_blink : 1;
48 unsigned long vc_s_reverse : 1;
49
50 unsigned long vc_ques : 1;
51 unsigned long vc_need_wrap : 1;
52 unsigned long vc_has_scrolled : 1;
53 unsigned long vc_kmalloced : 1;
54 unsigned long vc_report_mouse : 2;
55 unsigned char vc_utf : 1;
56 unsigned char vc_utf_count;
57 long vc_utf_char;
58 unsigned long vc_tab_stop[5];
59 unsigned char vc_palette[16*3];
60 unsigned short * vc_translate;
61 unsigned char vc_G0_charset;
62 unsigned char vc_G1_charset;
63 unsigned char vc_saved_G0;
64 unsigned char vc_saved_G1;
65 unsigned int vc_bell_pitch;
66 unsigned int vc_bell_duration;
67
68 };
69
70 struct vc {
71 struct vc_data *d;
72
73
74
75
76 };
77
78 extern struct vc vc_cons [MAX_NR_CONSOLES];
79
80 #define screenbuf_size (vc_cons[currcons].d->vc_screenbuf_size)
81 #define origin (vc_cons[currcons].d->vc_origin)
82 #define scr_end (vc_cons[currcons].d->vc_scr_end)
83 #define pos (vc_cons[currcons].d->vc_pos)
84 #define top (vc_cons[currcons].d->vc_top)
85 #define bottom (vc_cons[currcons].d->vc_bottom)
86 #define x (vc_cons[currcons].d->vc_x)
87 #define y (vc_cons[currcons].d->vc_y)
88 #define vc_state (vc_cons[currcons].d->vc_state)
89 #define npar (vc_cons[currcons].d->vc_npar)
90 #define par (vc_cons[currcons].d->vc_par)
91 #define ques (vc_cons[currcons].d->vc_ques)
92 #define attr (vc_cons[currcons].d->vc_attr)
93 #define saved_x (vc_cons[currcons].d->vc_saved_x)
94 #define saved_y (vc_cons[currcons].d->vc_saved_y)
95 #define translate (vc_cons[currcons].d->vc_translate)
96 #define G0_charset (vc_cons[currcons].d->vc_G0_charset)
97 #define G1_charset (vc_cons[currcons].d->vc_G1_charset)
98 #define saved_G0 (vc_cons[currcons].d->vc_saved_G0)
99 #define saved_G1 (vc_cons[currcons].d->vc_saved_G1)
100 #define utf (vc_cons[currcons].d->vc_utf)
101 #define utf_count (vc_cons[currcons].d->vc_utf_count)
102 #define utf_char (vc_cons[currcons].d->vc_utf_char)
103 #define video_mem_start (vc_cons[currcons].d->vc_video_mem_start)
104 #define video_mem_end (vc_cons[currcons].d->vc_video_mem_end)
105 #define video_erase_char (vc_cons[currcons].d->vc_video_erase_char)
106 #define disp_ctrl (vc_cons[currcons].d->vc_disp_ctrl)
107 #define toggle_meta (vc_cons[currcons].d->vc_toggle_meta)
108 #define decscnm (vc_cons[currcons].d->vc_decscnm)
109 #define decom (vc_cons[currcons].d->vc_decom)
110 #define decawm (vc_cons[currcons].d->vc_decawm)
111 #define deccm (vc_cons[currcons].d->vc_deccm)
112 #define decim (vc_cons[currcons].d->vc_decim)
113 #define deccolm (vc_cons[currcons].d->vc_deccolm)
114 #define need_wrap (vc_cons[currcons].d->vc_need_wrap)
115 #define has_scrolled (vc_cons[currcons].d->vc_has_scrolled)
116 #define kmalloced (vc_cons[currcons].d->vc_kmalloced)
117 #define report_mouse (vc_cons[currcons].d->vc_report_mouse)
118 #define color (vc_cons[currcons].d->vc_color)
119 #define s_color (vc_cons[currcons].d->vc_s_color)
120 #define def_color (vc_cons[currcons].d->vc_def_color)
121 #define foreground (color & 0x0f)
122 #define background (color & 0xf0)
123 #define charset (vc_cons[currcons].d->vc_charset)
124 #define s_charset (vc_cons[currcons].d->vc_s_charset)
125 #define intensity (vc_cons[currcons].d->vc_intensity)
126 #define underline (vc_cons[currcons].d->vc_underline)
127 #define blink (vc_cons[currcons].d->vc_blink)
128 #define reverse (vc_cons[currcons].d->vc_reverse)
129 #define s_intensity (vc_cons[currcons].d->vc_s_intensity)
130 #define s_underline (vc_cons[currcons].d->vc_s_underline)
131 #define s_blink (vc_cons[currcons].d->vc_s_blink)
132 #define s_reverse (vc_cons[currcons].d->vc_s_reverse)
133 #define ulcolor (vc_cons[currcons].d->vc_ulcolor)
134 #define halfcolor (vc_cons[currcons].d->vc_halfcolor)
135 #define tab_stop (vc_cons[currcons].d->vc_tab_stop)
136 #define palette (vc_cons[currcons].d->vc_palette)
137 #define bell_pitch (vc_cons[currcons].d->vc_bell_pitch)
138 #define bell_duration (vc_cons[currcons].d->vc_bell_duration)
139
140 #define vcmode (vt_cons[currcons]->vc_mode)
141 #define structsize (sizeof(struct vc_data) + sizeof(struct vt_struct))