diff options
author | Jeff Bailey <jbailey@gnu.org> | 2003-07-28 22:40:54 +0000 |
---|---|---|
committer | Jeff Bailey <jbailey@gnu.org> | 2003-07-28 22:40:54 +0000 |
commit | ae4b8581fa4ada4843663eca3cdcb35824658227 (patch) | |
tree | 9b1d96d9d3d93ff34bccb065457d0de9e0d395a1 /console-client/vga.c | |
parent | 23667bac3f98eb3085ca8239b7abc1bc3f9c5b44 (diff) |
2003-07-14 Marco Gerards <metgerards@student.han.nl>
* vga.c: New global variable vga_display_max_glyphs.
(parse_startup_args): New macro PARSE_FONT_OPT_NOARGS.
(parse_startup_args): Parse --max-colors and --max-glyphs.
(vga_display_init): Set disp->df_size to match the color setting.
Diffstat (limited to 'console-client/vga.c')
-rw-r--r-- | console-client/vga.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/console-client/vga.c b/console-client/vga.c index 304adbc1..d1d73e39 100644 --- a/console-client/vga.c +++ b/console-client/vga.c @@ -1,5 +1,5 @@ /* vga.c - The VGA device display driver. - Copyright (C) 2002 Free Software Foundation, Inc. + Copyright (C) 2002, 2003 Free Software Foundation, Inc. Written by Marcus Brinkmann. This file is part of the GNU Hurd. @@ -62,6 +62,9 @@ static char *vga_display_font_bold; "/lib/hurd/fonts/vga-system-bold-italic.bdf" static char *vga_display_font_bold_italic; +/* If false use all colors, else use double font slots. */ +static int vga_display_max_glyphs; + /* The timer used for flashing the screen. */ static struct timer_list vga_display_timer; @@ -171,12 +174,24 @@ parse_startup_args (int no_exit, int argc, char *argv[], int *next) } \ } while (0) +#define PARSE_FONT_OPT_NOARGS(x,y,z) \ + { \ + if (!strcmp (argv[*next], x)) \ + { \ + (*next)++; \ + vga_display_##y = z; \ + } \ + } + while (*next < argc) { PARSE_FONT_OPT ("--font", font); PARSE_FONT_OPT ("--font-italic", font_italic); PARSE_FONT_OPT ("--font-bold", font_bold); PARSE_FONT_OPT ("--font-bold-italic", font_bold_italic); + PARSE_FONT_OPT_NOARGS ("--max-colors", max_glyphs, 1); + PARSE_FONT_OPT_NOARGS ("--max-glyphs", max_glyphs, 0); + break; } @@ -206,8 +221,7 @@ vga_display_init (void **handle, int no_exit, int argc, char *argv[], int *next) if (!disp) return ENOMEM; - /* Set this to 256 for full color support. */ - disp->df_size = 512; + disp->df_size = vga_display_max_glyphs ? 512 : 256; disp->width = VGA_DISP_WIDTH; disp->height = VGA_DISP_HEIGHT; |