From 703cbe63d64e3b5b09afb9357522003585ede4cf Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Tue, 16 Mar 2010 21:33:23 +0100 Subject: [PATCH] Remove trivial getcharwidth (now implicit) --- term/efi/console.c | 8 -------- term/i386/pc/console.c | 1 - term/i386/pc/vga_text.c | 1 - term/i386/vga_common.c | 7 ------- term/ieee1275/ofconsole.c | 7 ------- util/console.c | 7 ------- 6 files changed, 31 deletions(-) diff --git a/term/efi/console.c b/term/efi/console.c index 875a23a25..35b265ddb 100644 --- a/term/efi/console.c +++ b/term/efi/console.c @@ -112,13 +112,6 @@ grub_console_putchar (const struct grub_unicode_glyph *c) efi_call_2 (o->output_string, o, str); } -static grub_ssize_t -grub_console_getcharwidth (const struct grub_unicode_glyph *c __attribute__ ((unused))) -{ - /* For now, every printable character has the width 1. */ - return 1; -} - static int grub_console_checkkey (void) { @@ -349,7 +342,6 @@ static struct grub_term_output grub_console_term_output = { .name = "console", .putchar = grub_console_putchar, - .getcharwidth = grub_console_getcharwidth, .getwh = grub_console_getwh, .getxy = grub_console_getxy, .gotoxy = grub_console_gotoxy, diff --git a/term/i386/pc/console.c b/term/i386/pc/console.c index 5def6fca0..146e16643 100644 --- a/term/i386/pc/console.c +++ b/term/i386/pc/console.c @@ -57,7 +57,6 @@ static struct grub_term_output grub_console_term_output = { .name = "console", .putchar = grub_console_putchar, - .getcharwidth = grub_console_getcharwidth, .getwh = grub_console_getwh, .getxy = grub_console_getxy, .gotoxy = grub_console_gotoxy, diff --git a/term/i386/pc/vga_text.c b/term/i386/pc/vga_text.c index 82cc11967..379eb3579 100644 --- a/term/i386/pc/vga_text.c +++ b/term/i386/pc/vga_text.c @@ -155,7 +155,6 @@ static struct grub_term_output grub_vga_text_term = .init = grub_vga_text_init_fini, .fini = grub_vga_text_init_fini, .putchar = grub_console_putchar, - .getcharwidth = grub_console_getcharwidth, .getwh = grub_console_getwh, .getxy = grub_vga_text_getxy, .gotoxy = grub_vga_text_gotoxy, diff --git a/term/i386/vga_common.c b/term/i386/vga_common.c index 30458b034..f88dbb04e 100644 --- a/term/i386/vga_common.c +++ b/term/i386/vga_common.c @@ -31,13 +31,6 @@ grub_console_putchar (const struct grub_unicode_glyph *c) grub_console_real_putchar (c->base); } -grub_ssize_t -grub_console_getcharwidth (const struct grub_unicode_glyph *c __attribute__ ((unused))) -{ - /* For now, every printable character has the width 1. */ - return 1; -} - grub_uint16_t grub_console_getwh (void) { diff --git a/term/ieee1275/ofconsole.c b/term/ieee1275/ofconsole.c index 81e7e7b20..926f5e028 100644 --- a/term/ieee1275/ofconsole.c +++ b/term/ieee1275/ofconsole.c @@ -107,12 +107,6 @@ grub_ofconsole_putchar (const struct grub_unicode_glyph *c) grub_ieee1275_write (stdout_ihandle, &chr, 1, 0); } -static grub_ssize_t -grub_ofconsole_getcharwidth (const struct grub_unicode_glyph *c __attribute__((unused))) -{ - return 1; -} - static void grub_ofconsole_setcolorstate (grub_term_color_state state) { @@ -449,7 +443,6 @@ static struct grub_term_output grub_ofconsole_term_output = .init = grub_ofconsole_init_output, .fini = grub_ofconsole_fini, .putchar = grub_ofconsole_putchar, - .getcharwidth = grub_ofconsole_getcharwidth, .getxy = grub_ofconsole_getxy, .getwh = grub_ofconsole_getwh, .gotoxy = grub_ofconsole_gotoxy, diff --git a/util/console.c b/util/console.c index 91480a810..b4316042e 100644 --- a/util/console.c +++ b/util/console.c @@ -69,12 +69,6 @@ grub_ncurses_putchar (const struct grub_unicode_glyph *c) addch (c->base | grub_console_attr); } -static grub_ssize_t -grub_ncurses_getcharwidth (const struct grub_unicode_glyph * c __attribute__ ((unused))) -{ - return 1; -} - static void grub_ncurses_setcolorstate (grub_term_color_state state) { @@ -317,7 +311,6 @@ static struct grub_term_output grub_ncurses_term_output = .init = grub_ncurses_init, .fini = grub_ncurses_fini, .putchar = grub_ncurses_putchar, - .getcharwidth = grub_ncurses_getcharwidth, .getxy = grub_ncurses_getxy, .getwh = grub_ncurses_getwh, .gotoxy = grub_ncurses_gotoxy,