[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: |
11 Jul 2003 19:58:03 +0200 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de> writes:
> On Tue, Jul 08, 2003 at 12:28:30AM +0200, Marco Gerards wrote:
> > Here is a patch so users can select the mode to use in vga:
> >
> > * 512 font slots, less colors.
> > * 256 font slots, all colors.
>
> Good, that's needed. However, I think that the option should be named
> differently, because there are just these two possible values. So I think
> that there should be an option --full-color which is disabled by default
> (default is then 512 font slots, and --full-color is 256 font slots).
> Can you make this change?
Here it is! Please tell me if you want me to change anything, but I
think this is what you want.
Changelog entry:
2003-07-11 Marco Gerards <metgerards@student.han.nl>
* vga.c: New global variable vga_display_full_color.
(parse_startup_args): New macro PARSE_FONT_OPT_NOARGS.
(parse_startup_args): Parse "--full-color".
(vga_display_init): Set disp->df_size to match the color
setting.
Patch:
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-11 16:57:16.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;
+/* Use all colors when set, otherwise use double font slots. */
+static int vga_display_full_color = 0;
+
/* 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)) \
+ { \
+ printf("foo\b"); \
+ (*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 ("--full-color", full_color, 1);
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_full_color ? 256 : 512;
disp->width = VGA_DISP_WIDTH;
disp->height = VGA_DISP_HEIGHT;
Re: console-client patch: selecting amount of font slots, Marco Gerards, 2003/07/14