bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: console-client patch: selecting amount of font slots


From: Marcus Brinkmann
Subject: Re: console-client patch: selecting amount of font slots
Date: Sat, 12 Jul 2003 17:37:39 +0200 (MSZ)

Marco Gerards <metgerards@student.han.nl> schrieb:
> 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.

I think that you have been right, and full color should be the default.
The corresponding other option would be --max-glyphs, and for
consistency full color should be renamed to --max-colors.
Both options should be implemented so you can clearly specify what you
want even if the default changes.

Thanks,
Marcus

PS: Not deleting the lines below, because this web interface sucks.  Sorry.
> 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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]