[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: console-client patch: selecting amount of font slots
From: |
Marco Gerards |
Subject: |
Re: console-client patch: selecting amount of font slots |
Date: |
14 Jul 2003 21:00:48 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Here is the next version of my patch.
I've made some modifications as Marcus and Alfred proposed (thanks for
the comments btw. :)).
Thanks,
Marco
2003-07-14 Marco Gerards <metgerards@student.han.nl>
* vga.c: New global variable vga_display_max_colors.
(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.
Common subdirectories: ../../hurdcvs/hurd/console-client/CVS and
console-client/CVS
diff -up ../../hurdcvs/hurd/console-client/vga.c console-client/vga.c
--- ../../hurdcvs/hurd/console-client/vga.c 2002-09-17 14:26:10.000000000
+0200
+++ console-client/vga.c 2003-07-14 00:17:56.000000000 +0200
@@ -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 one use all colors, else use double font slots. */
+static int vga_display_max_colors = 1;
+
/* The timer used for flashing the screen. */
static struct timer_list vga_display_timer;
@@ -171,12 +174,23 @@ parse_startup_args (int no_exit, int arg
} \
} 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_colors, 1);
+ PARSE_FONT_OPT_NOARGS ("--max-glyphs", max_colors, 0);
break;
}
@@ -206,8 +220,7 @@ vga_display_init (void **handle, int no_
if (!disp)
return ENOMEM;
- /* Set this to 256 for full color support. */
- disp->df_size = 512;
+ disp->df_size = vga_display_max_colors ? 256 : 512;
disp->width = VGA_DISP_WIDTH;
disp->height = VGA_DISP_HEIGHT;
Re: console-client patch: selecting amount of font slots,
Marco Gerards <=