1 |
/* vga.c - The VGA device display driver. |
/* vga.c - The VGA device display driver. |
2 |
Copyright (C) 2002 Free Software Foundation, Inc. |
Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
3 |
Written by Marcus Brinkmann. |
Written by Marcus Brinkmann. |
4 |
|
|
5 |
This file is part of the GNU Hurd. |
This file is part of the GNU Hurd. |
62 |
"/lib/hurd/fonts/vga-system-bold-italic.bdf" |
"/lib/hurd/fonts/vga-system-bold-italic.bdf" |
63 |
static char *vga_display_font_bold_italic; |
static char *vga_display_font_bold_italic; |
64 |
|
|
65 |
|
/* If false use all colors, else use double font slots. */ |
66 |
|
static int vga_display_max_glyphs; |
67 |
|
|
68 |
/* The timer used for flashing the screen. */ |
/* The timer used for flashing the screen. */ |
69 |
static struct timer_list vga_display_timer; |
static struct timer_list vga_display_timer; |
70 |
|
|
174 |
} \ |
} \ |
175 |
} while (0) |
} while (0) |
176 |
|
|
177 |
|
#define PARSE_FONT_OPT_NOARGS(x,y,z) \ |
178 |
|
{ \ |
179 |
|
if (!strcmp (argv[*next], x)) \ |
180 |
|
{ \ |
181 |
|
(*next)++; \ |
182 |
|
vga_display_##y = z; \ |
183 |
|
} \ |
184 |
|
} |
185 |
|
|
186 |
while (*next < argc) |
while (*next < argc) |
187 |
{ |
{ |
188 |
PARSE_FONT_OPT ("--font", font); |
PARSE_FONT_OPT ("--font", font); |
189 |
PARSE_FONT_OPT ("--font-italic", font_italic); |
PARSE_FONT_OPT ("--font-italic", font_italic); |
190 |
PARSE_FONT_OPT ("--font-bold", font_bold); |
PARSE_FONT_OPT ("--font-bold", font_bold); |
191 |
PARSE_FONT_OPT ("--font-bold-italic", font_bold_italic); |
PARSE_FONT_OPT ("--font-bold-italic", font_bold_italic); |
192 |
|
PARSE_FONT_OPT_NOARGS ("--max-colors", max_glyphs, 1); |
193 |
|
PARSE_FONT_OPT_NOARGS ("--max-glyphs", max_glyphs, 0); |
194 |
|
|
195 |
|
|
196 |
break; |
break; |
197 |
} |
} |
221 |
if (!disp) |
if (!disp) |
222 |
return ENOMEM; |
return ENOMEM; |
223 |
|
|
224 |
/* Set this to 256 for full color support. */ |
disp->df_size = vga_display_max_glyphs ? 512 : 256; |
|
disp->df_size = 512; |
|
225 |
disp->width = VGA_DISP_WIDTH; |
disp->width = VGA_DISP_WIDTH; |
226 |
disp->height = VGA_DISP_HEIGHT; |
disp->height = VGA_DISP_HEIGHT; |
227 |
|
|