[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Fixed ieee1275 console
From: |
Robert Millan |
Subject: |
Re: [PATCH] Fixed ieee1275 console |
Date: |
Mon, 1 Oct 2007 14:31:02 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
On Mon, Oct 01, 2007 at 12:57:35PM +0200, Marcin Kurek wrote:
> 2) menu looks ugly like hell as it contains some random characters in
> place of borders.
I have a few concerns about this part:
> static void
> grub_ofconsole_putchar (grub_uint32_t c)
> {
> - char chr = c;
> - if (c == '\n')
> - {
> + char chr;
> +
> + switch (c)
> + {
> + case GRUB_TERM_DISP_LEFT:
> + c = '<';
> + break;
> + case GRUB_TERM_DISP_UP:
> + c = '^';
> + break;
> + case GRUB_TERM_DISP_RIGHT:
> + c = '>';
> + break;
> + case GRUB_TERM_DISP_DOWN:
> + c = 'v';
> + break;
> + case GRUB_TERM_DISP_HLINE:
> + c = '-';
> + break;
> + case GRUB_TERM_DISP_VLINE:
> + c = '|';
> + break;
> + case GRUB_TERM_DISP_UL:
> + case GRUB_TERM_DISP_UR:
> + case GRUB_TERM_DISP_LL:
> + case GRUB_TERM_DISP_LR:
> + c = '+';
> + break;
> + case '\t':
> + c = ' ';
> + break;
> +
> + default:
> + /* of does not support Unicode. */
> + if (c > 0x7f)
> + c = '?';
> + break;
> + }
1- First, you're duplicating code from term/i386/pc/serial.c. I think it should
be shared.
2- Do we _always_ want to map to ascii? Of course, mapping to ascii is the best
choice when we don't have anything better, but if we can distinguish physical
screen (cp437 charset, on PCs and on efika as well) from serial cable (must
be ascii?), we could still draw pretty lines instead of -|+ stuff.
3- The cp437 charset in efika is buggy (I don't know about pegasos), as some
chars are replaced with portions of the bplan logo (sigh). I gave it a try
before, and the only sane way to draw a pretty rectangle seems to
be:
(warning, utf-8 follows. if you can't read this get a decent MUA ;-))
╒═╕
│ │
╘═╛
I had this pending patch liing around. I never got the time to sort out all
these problems, but perhaps you can obtain something useful from it.
--
Robert Millan
<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call, if you are unable to speak?
(as seen on /.)
charset.diff
Description: Text Data
- [PATCH] Fixed ieee1275 console, Marcin Kurek, 2007/10/01
- Re: [PATCH] Fixed ieee1275 console,
Robert Millan <=
- Re: [PATCH] Fixed ieee1275 console, Robert Millan, 2007/10/01
- Re: [PATCH] Fixed ieee1275 console, Marcin Kurek, 2007/10/01
- Re: [PATCH] Fixed ieee1275 console, Robert Millan, 2007/10/01
- Re: [PATCH] Fixed ieee1275 console, Marcin Kurek, 2007/10/01
- Re: [PATCH] Fixed ieee1275 console, Robert Millan, 2007/10/02
- Re: [PATCH] Fixed ieee1275 console, Marcin Kurek, 2007/10/03
- Re: [PATCH] Fixed ieee1275 console, Robert Millan, 2007/10/04
- Re: [PATCH] Fixed ieee1275 console, Marcin Kurek, 2007/10/10
- Re: [PATCH] Fixed ieee1275 console, Robert Millan, 2007/10/10
- Re: [PATCH] Fixed ieee1275 console, Marcin Kurek, 2007/10/10