2005-08-21 Yoshinori K. Okuji <okuji@enbug.org>

* util/console.c (grub_ncurses_putchar): If C is greater than
        0x7f, set C to a question mark.
        (grub_ncurses_getcharwidth): New function.
        (grub_ncurses_term): Specify grub_ncurses_getcharwidth as
        getcharwidth.

        * normal/menu.c (print_entry): Made aware of Unicode. First,
        convert TITLE to UCS-4, and predict the cursor position by
        grub_getcharwidth.

        * include/grub/misc.h (grub_utf8_to_ucs4): Specify the qualifier
        const to SRC.
        * kern/misc.c (grub_utf16_to_utf8): Likewise.
This commit is contained in:
okuji 2005-08-21 07:22:51 +00:00
parent 16ccb8b138
commit 385c6a92a3
5 changed files with 72 additions and 13 deletions

View file

@ -809,7 +809,8 @@ grub_utf16_to_utf8 (grub_uint8_t *dest, grub_uint16_t *src,
characters (when the input is unknown). If an invalid sequence is found,
return -1. */
grub_ssize_t
grub_utf8_to_ucs4 (grub_uint32_t *dest, grub_uint8_t *src, grub_size_t size)
grub_utf8_to_ucs4 (grub_uint32_t *dest, const grub_uint8_t *src,
grub_size_t size)
{
grub_uint32_t *p = dest;
int count = 0;