term: Remove trailing whitespaces
Signed-off-by: Elyes Haouas <ehaouas@noos.fr> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
c1d79dbcc9
commit
b232f6f66e
@ -122,7 +122,7 @@ check_is_serial (void)
|
||||
return is_serial = 0;
|
||||
return is_serial = grub_arc_is_device_serial (consout, 0);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
set_console_dimensions (void)
|
||||
{
|
||||
|
||||
@ -306,10 +306,10 @@ grub_gfxterm_set_window (struct grub_video_render_target *target,
|
||||
render_target = target;
|
||||
|
||||
/* Create virtual screen. */
|
||||
if (grub_virtual_screen_setup (border_width, border_width,
|
||||
width - 2 * border_width,
|
||||
height - 2 * border_width,
|
||||
font)
|
||||
if (grub_virtual_screen_setup (border_width, border_width,
|
||||
width - 2 * border_width,
|
||||
height - 2 * border_width,
|
||||
font)
|
||||
!= GRUB_ERR_NONE)
|
||||
{
|
||||
return grub_errno;
|
||||
@ -439,9 +439,9 @@ redraw_screen_rect (unsigned int x, unsigned int y,
|
||||
|
||||
grub_video_set_active_render_target (render_target);
|
||||
/* Save viewport and set it to our window. */
|
||||
grub_video_get_viewport ((unsigned *) &saved_view.x,
|
||||
(unsigned *) &saved_view.y,
|
||||
(unsigned *) &saved_view.width,
|
||||
grub_video_get_viewport ((unsigned *) &saved_view.x,
|
||||
(unsigned *) &saved_view.y,
|
||||
(unsigned *) &saved_view.width,
|
||||
(unsigned *) &saved_view.height);
|
||||
grub_video_set_viewport (window.x, window.y, window.width, window.height);
|
||||
|
||||
@ -679,7 +679,7 @@ draw_cursor (int show)
|
||||
unsigned int height;
|
||||
unsigned int ascent;
|
||||
grub_video_color_t color;
|
||||
|
||||
|
||||
write_char ();
|
||||
|
||||
if (!show)
|
||||
@ -702,12 +702,12 @@ draw_cursor (int show)
|
||||
* virtual_screen.normal_char_height
|
||||
+ ascent);
|
||||
height = 2;
|
||||
|
||||
|
||||
/* Render cursor to text layer. */
|
||||
grub_video_set_active_render_target (text_layer);
|
||||
grub_video_fill_rect (color, x, y, width, height);
|
||||
grub_video_set_active_render_target (render_target);
|
||||
|
||||
|
||||
/* Mark cursor to be redrawn. */
|
||||
dirty_region_add (virtual_screen.offset_x + x,
|
||||
virtual_screen.offset_y + y,
|
||||
@ -751,9 +751,9 @@ real_scroll (void)
|
||||
while (i--)
|
||||
{
|
||||
/* Save viewport and set it to our window. */
|
||||
grub_video_get_viewport ((unsigned *) &saved_view.x,
|
||||
(unsigned *) &saved_view.y,
|
||||
(unsigned *) &saved_view.width,
|
||||
grub_video_get_viewport ((unsigned *) &saved_view.x,
|
||||
(unsigned *) &saved_view.y,
|
||||
(unsigned *) &saved_view.width,
|
||||
(unsigned *) &saved_view.height);
|
||||
|
||||
grub_video_set_viewport (window.x, window.y, window.width,
|
||||
@ -818,7 +818,7 @@ scroll_up (void)
|
||||
/* Clear first line in text buffer. */
|
||||
for (i = 0; i < virtual_screen.columns; i++)
|
||||
grub_unicode_destroy_glyph (&virtual_screen.text_buffer[i].code);
|
||||
|
||||
|
||||
/* Scroll text buffer with one line to up. */
|
||||
grub_memmove (virtual_screen.text_buffer,
|
||||
virtual_screen.text_buffer + virtual_screen.columns,
|
||||
@ -904,7 +904,7 @@ grub_gfxterm_putchar (struct grub_term_output *term,
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
for (i = 1; i < char_width && p + i <
|
||||
for (i = 1; i < char_width && p + i <
|
||||
virtual_screen.text_buffer + virtual_screen.columns
|
||||
* virtual_screen.rows; i++)
|
||||
{
|
||||
|
||||
@ -43,7 +43,7 @@ enum
|
||||
static const struct grub_arg_option background_image_cmd_options[] =
|
||||
{
|
||||
{"mode", 'm', 0, N_("Background image mode."),
|
||||
/* TRANSLATORS: This refers to background image mode (stretched or
|
||||
/* TRANSLATORS: This refers to background image mode (stretched or
|
||||
in left-top corner). Note that GRUB will accept only original
|
||||
keywords stretch and normal, not the translated ones.
|
||||
So please put both in translation
|
||||
@ -100,7 +100,7 @@ grub_gfxterm_background_image_cmd (grub_extcmd_context_t ctxt,
|
||||
{
|
||||
struct grub_video_bitmap *scaled_bitmap;
|
||||
grub_video_bitmap_create_scaled (&scaled_bitmap,
|
||||
width,
|
||||
width,
|
||||
height,
|
||||
grub_gfxterm_background.bitmap,
|
||||
GRUB_VIDEO_BITMAP_SCALE_METHOD_BEST);
|
||||
|
||||
@ -32,7 +32,7 @@ int10_9 (grub_uint8_t ch, grub_uint16_t n)
|
||||
regs.eax = ch | 0x0900;
|
||||
regs.ebx = grub_console_cur_color & 0xff;
|
||||
regs.ecx = n;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ grub_console_getxy (struct grub_term_output *term __attribute__ ((unused)))
|
||||
|
||||
regs.eax = 0x0300;
|
||||
regs.ebx = 0;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
|
||||
return (struct grub_term_coordinate) {
|
||||
@ -78,7 +78,7 @@ grub_console_gotoxy (struct grub_term_output *term __attribute__ ((unused)),
|
||||
regs.ebx = 0;
|
||||
regs.eax = 0x0200;
|
||||
regs.edx = (pos.y << 8) | pos.x;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
}
|
||||
|
||||
@ -101,14 +101,14 @@ grub_console_putchar_real (grub_uint8_t c)
|
||||
{
|
||||
regs.eax = c | 0x0e00;
|
||||
regs.ebx = 0x0001;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
return;
|
||||
}
|
||||
|
||||
/* get the current position */
|
||||
pos = grub_console_getxy (NULL);
|
||||
|
||||
|
||||
/* write the character with the attribute */
|
||||
int10_9 (c, 1);
|
||||
|
||||
@ -158,7 +158,7 @@ grub_console_cls (struct grub_term_output *term)
|
||||
* %ch = cursor starting scanline
|
||||
* %cl = cursor ending scanline
|
||||
*/
|
||||
static void
|
||||
static void
|
||||
grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
|
||||
int on)
|
||||
{
|
||||
@ -170,7 +170,7 @@ grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
|
||||
{
|
||||
regs.eax = 0x0300;
|
||||
regs.ebx = 0;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
console_cursor_shape = regs.ecx;
|
||||
if ((console_cursor_shape >> 8) >= (console_cursor_shape & 0xff))
|
||||
@ -179,7 +179,7 @@ grub_console_setcursor (struct grub_term_output *term __attribute__ ((unused)),
|
||||
/* set %cx to the designated cursor shape */
|
||||
regs.ecx = on ? console_cursor_shape : 0x2000;
|
||||
regs.eax = 0x0100;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
regs.flags = GRUB_CPU_INT_FLAGS_DEFAULT;
|
||||
grub_bios_interrupt (0x10, ®s);
|
||||
}
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ grub_console_dimensions (void)
|
||||
val, sizeof (val) - 1, 0))
|
||||
{
|
||||
grub_ieee1275_ihandle_t stdout_options;
|
||||
val[sizeof (val) - 1] = 0;
|
||||
val[sizeof (val) - 1] = 0;
|
||||
|
||||
if (! grub_ieee1275_finddevice (val, &stdout_options)
|
||||
&& ! grub_ieee1275_get_property (stdout_options, "device_type",
|
||||
|
||||
@ -90,7 +90,7 @@ do_real_config (struct grub_serial_port *port)
|
||||
break;
|
||||
case GRUB_SERIAL_STOP_BITS_2:
|
||||
parity_stop_spec |= 0xc;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
*port->escc_desc->escc_ctrl = 4;
|
||||
|
||||
@ -276,7 +276,7 @@ grub_ofserial_init (void)
|
||||
dev_iterate_real (&alias, 1);
|
||||
|
||||
grub_ieee1275_devices_iterate (dev_iterate);
|
||||
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (ofserial_hash); i++)
|
||||
{
|
||||
struct ofserial_hash_ent *ent;
|
||||
|
||||
@ -312,7 +312,7 @@ grub_serial_ns8250_add_port (grub_port_t port)
|
||||
p->driver = &grub_ns8250_driver;
|
||||
grub_serial_config_defaults (p);
|
||||
p->port = port;
|
||||
grub_serial_register (p);
|
||||
grub_serial_register (p);
|
||||
|
||||
return p->name;
|
||||
}
|
||||
|
||||
@ -28,50 +28,50 @@
|
||||
|
||||
static const grub_uint8_t set1_mapping[128] =
|
||||
{
|
||||
/* 0x00 */ 0 /* Unused */, GRUB_KEYBOARD_KEY_ESCAPE,
|
||||
/* 0x02 */ GRUB_KEYBOARD_KEY_1, GRUB_KEYBOARD_KEY_2,
|
||||
/* 0x04 */ GRUB_KEYBOARD_KEY_3, GRUB_KEYBOARD_KEY_4,
|
||||
/* 0x06 */ GRUB_KEYBOARD_KEY_5, GRUB_KEYBOARD_KEY_6,
|
||||
/* 0x08 */ GRUB_KEYBOARD_KEY_7, GRUB_KEYBOARD_KEY_8,
|
||||
/* 0x0a */ GRUB_KEYBOARD_KEY_9, GRUB_KEYBOARD_KEY_0,
|
||||
/* 0x0c */ GRUB_KEYBOARD_KEY_DASH, GRUB_KEYBOARD_KEY_EQUAL,
|
||||
/* 0x0e */ GRUB_KEYBOARD_KEY_BACKSPACE, GRUB_KEYBOARD_KEY_TAB,
|
||||
/* 0x10 */ GRUB_KEYBOARD_KEY_Q, GRUB_KEYBOARD_KEY_W,
|
||||
/* 0x12 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_R,
|
||||
/* 0x14 */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_Y,
|
||||
/* 0x16 */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_I,
|
||||
/* 0x18 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_P,
|
||||
/* 0x1a */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_RBRACKET,
|
||||
/* 0x1c */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_LEFT_CTRL,
|
||||
/* 0x1e */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_S,
|
||||
/* 0x20 */ GRUB_KEYBOARD_KEY_D, GRUB_KEYBOARD_KEY_F,
|
||||
/* 0x22 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_H,
|
||||
/* 0x24 */ GRUB_KEYBOARD_KEY_J, GRUB_KEYBOARD_KEY_K,
|
||||
/* 0x26 */ GRUB_KEYBOARD_KEY_L, GRUB_KEYBOARD_KEY_SEMICOLON,
|
||||
/* 0x28 */ GRUB_KEYBOARD_KEY_DQUOTE, GRUB_KEYBOARD_KEY_RQUOTE,
|
||||
/* 0x2a */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, GRUB_KEYBOARD_KEY_BACKSLASH,
|
||||
/* 0x2c */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_X,
|
||||
/* 0x2e */ GRUB_KEYBOARD_KEY_C, GRUB_KEYBOARD_KEY_V,
|
||||
/* 0x30 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_N,
|
||||
/* 0x32 */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_COMMA,
|
||||
/* 0x34 */ GRUB_KEYBOARD_KEY_DOT, GRUB_KEYBOARD_KEY_SLASH,
|
||||
/* 0x36 */ GRUB_KEYBOARD_KEY_RIGHT_SHIFT, GRUB_KEYBOARD_KEY_NUMMUL,
|
||||
/* 0x38 */ GRUB_KEYBOARD_KEY_LEFT_ALT, GRUB_KEYBOARD_KEY_SPACE,
|
||||
/* 0x3a */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_F1,
|
||||
/* 0x3c */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F3,
|
||||
/* 0x3e */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_F5,
|
||||
/* 0x40 */ GRUB_KEYBOARD_KEY_F6, GRUB_KEYBOARD_KEY_F7,
|
||||
/* 0x42 */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F9,
|
||||
/* 0x44 */ GRUB_KEYBOARD_KEY_F10, GRUB_KEYBOARD_KEY_NUM_LOCK,
|
||||
/* 0x46 */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, GRUB_KEYBOARD_KEY_NUM7,
|
||||
/* 0x48 */ GRUB_KEYBOARD_KEY_NUM8, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x4a */ GRUB_KEYBOARD_KEY_NUMMINUS, GRUB_KEYBOARD_KEY_NUM4,
|
||||
/* 0x4c */ GRUB_KEYBOARD_KEY_NUM5, GRUB_KEYBOARD_KEY_NUM6,
|
||||
/* 0x4e */ GRUB_KEYBOARD_KEY_NUMPLUS, GRUB_KEYBOARD_KEY_NUM1,
|
||||
/* 0x50 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM3,
|
||||
/* 0x52 */ GRUB_KEYBOARD_KEY_NUM0, GRUB_KEYBOARD_KEY_NUMDOT,
|
||||
/* 0x54 */ 0, 0,
|
||||
/* 0x56 */ GRUB_KEYBOARD_KEY_102ND, GRUB_KEYBOARD_KEY_F11,
|
||||
/* 0x00 */ 0 /* Unused */, GRUB_KEYBOARD_KEY_ESCAPE,
|
||||
/* 0x02 */ GRUB_KEYBOARD_KEY_1, GRUB_KEYBOARD_KEY_2,
|
||||
/* 0x04 */ GRUB_KEYBOARD_KEY_3, GRUB_KEYBOARD_KEY_4,
|
||||
/* 0x06 */ GRUB_KEYBOARD_KEY_5, GRUB_KEYBOARD_KEY_6,
|
||||
/* 0x08 */ GRUB_KEYBOARD_KEY_7, GRUB_KEYBOARD_KEY_8,
|
||||
/* 0x0a */ GRUB_KEYBOARD_KEY_9, GRUB_KEYBOARD_KEY_0,
|
||||
/* 0x0c */ GRUB_KEYBOARD_KEY_DASH, GRUB_KEYBOARD_KEY_EQUAL,
|
||||
/* 0x0e */ GRUB_KEYBOARD_KEY_BACKSPACE, GRUB_KEYBOARD_KEY_TAB,
|
||||
/* 0x10 */ GRUB_KEYBOARD_KEY_Q, GRUB_KEYBOARD_KEY_W,
|
||||
/* 0x12 */ GRUB_KEYBOARD_KEY_E, GRUB_KEYBOARD_KEY_R,
|
||||
/* 0x14 */ GRUB_KEYBOARD_KEY_T, GRUB_KEYBOARD_KEY_Y,
|
||||
/* 0x16 */ GRUB_KEYBOARD_KEY_U, GRUB_KEYBOARD_KEY_I,
|
||||
/* 0x18 */ GRUB_KEYBOARD_KEY_O, GRUB_KEYBOARD_KEY_P,
|
||||
/* 0x1a */ GRUB_KEYBOARD_KEY_LBRACKET, GRUB_KEYBOARD_KEY_RBRACKET,
|
||||
/* 0x1c */ GRUB_KEYBOARD_KEY_ENTER, GRUB_KEYBOARD_KEY_LEFT_CTRL,
|
||||
/* 0x1e */ GRUB_KEYBOARD_KEY_A, GRUB_KEYBOARD_KEY_S,
|
||||
/* 0x20 */ GRUB_KEYBOARD_KEY_D, GRUB_KEYBOARD_KEY_F,
|
||||
/* 0x22 */ GRUB_KEYBOARD_KEY_G, GRUB_KEYBOARD_KEY_H,
|
||||
/* 0x24 */ GRUB_KEYBOARD_KEY_J, GRUB_KEYBOARD_KEY_K,
|
||||
/* 0x26 */ GRUB_KEYBOARD_KEY_L, GRUB_KEYBOARD_KEY_SEMICOLON,
|
||||
/* 0x28 */ GRUB_KEYBOARD_KEY_DQUOTE, GRUB_KEYBOARD_KEY_RQUOTE,
|
||||
/* 0x2a */ GRUB_KEYBOARD_KEY_LEFT_SHIFT, GRUB_KEYBOARD_KEY_BACKSLASH,
|
||||
/* 0x2c */ GRUB_KEYBOARD_KEY_Z, GRUB_KEYBOARD_KEY_X,
|
||||
/* 0x2e */ GRUB_KEYBOARD_KEY_C, GRUB_KEYBOARD_KEY_V,
|
||||
/* 0x30 */ GRUB_KEYBOARD_KEY_B, GRUB_KEYBOARD_KEY_N,
|
||||
/* 0x32 */ GRUB_KEYBOARD_KEY_M, GRUB_KEYBOARD_KEY_COMMA,
|
||||
/* 0x34 */ GRUB_KEYBOARD_KEY_DOT, GRUB_KEYBOARD_KEY_SLASH,
|
||||
/* 0x36 */ GRUB_KEYBOARD_KEY_RIGHT_SHIFT, GRUB_KEYBOARD_KEY_NUMMUL,
|
||||
/* 0x38 */ GRUB_KEYBOARD_KEY_LEFT_ALT, GRUB_KEYBOARD_KEY_SPACE,
|
||||
/* 0x3a */ GRUB_KEYBOARD_KEY_CAPS_LOCK, GRUB_KEYBOARD_KEY_F1,
|
||||
/* 0x3c */ GRUB_KEYBOARD_KEY_F2, GRUB_KEYBOARD_KEY_F3,
|
||||
/* 0x3e */ GRUB_KEYBOARD_KEY_F4, GRUB_KEYBOARD_KEY_F5,
|
||||
/* 0x40 */ GRUB_KEYBOARD_KEY_F6, GRUB_KEYBOARD_KEY_F7,
|
||||
/* 0x42 */ GRUB_KEYBOARD_KEY_F8, GRUB_KEYBOARD_KEY_F9,
|
||||
/* 0x44 */ GRUB_KEYBOARD_KEY_F10, GRUB_KEYBOARD_KEY_NUM_LOCK,
|
||||
/* 0x46 */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, GRUB_KEYBOARD_KEY_NUM7,
|
||||
/* 0x48 */ GRUB_KEYBOARD_KEY_NUM8, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x4a */ GRUB_KEYBOARD_KEY_NUMMINUS, GRUB_KEYBOARD_KEY_NUM4,
|
||||
/* 0x4c */ GRUB_KEYBOARD_KEY_NUM5, GRUB_KEYBOARD_KEY_NUM6,
|
||||
/* 0x4e */ GRUB_KEYBOARD_KEY_NUMPLUS, GRUB_KEYBOARD_KEY_NUM1,
|
||||
/* 0x50 */ GRUB_KEYBOARD_KEY_NUM2, GRUB_KEYBOARD_KEY_NUM3,
|
||||
/* 0x52 */ GRUB_KEYBOARD_KEY_NUM0, GRUB_KEYBOARD_KEY_NUMDOT,
|
||||
/* 0x54 */ 0, 0,
|
||||
/* 0x56 */ GRUB_KEYBOARD_KEY_102ND, GRUB_KEYBOARD_KEY_F11,
|
||||
/* 0x58 */ GRUB_KEYBOARD_KEY_F12, 0,
|
||||
/* 0x5a */ 0, 0,
|
||||
/* 0x5c */ 0, 0,
|
||||
@ -98,22 +98,22 @@ static const grub_uint8_t set1_mapping[128] =
|
||||
static const struct
|
||||
{
|
||||
grub_uint8_t from, to;
|
||||
} set1_e0_mapping[] =
|
||||
} set1_e0_mapping[] =
|
||||
{
|
||||
{0x1c, GRUB_KEYBOARD_KEY_NUMENTER},
|
||||
{0x1d, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
|
||||
{0x35, GRUB_KEYBOARD_KEY_NUMSLASH },
|
||||
{0x35, GRUB_KEYBOARD_KEY_NUMSLASH },
|
||||
{0x38, GRUB_KEYBOARD_KEY_RIGHT_ALT},
|
||||
{0x47, GRUB_KEYBOARD_KEY_HOME},
|
||||
{0x47, GRUB_KEYBOARD_KEY_HOME},
|
||||
{0x48, GRUB_KEYBOARD_KEY_UP},
|
||||
{0x49, GRUB_KEYBOARD_KEY_PPAGE},
|
||||
{0x49, GRUB_KEYBOARD_KEY_PPAGE},
|
||||
{0x4b, GRUB_KEYBOARD_KEY_LEFT},
|
||||
{0x4d, GRUB_KEYBOARD_KEY_RIGHT},
|
||||
{0x4f, GRUB_KEYBOARD_KEY_END},
|
||||
{0x4f, GRUB_KEYBOARD_KEY_END},
|
||||
{0x50, GRUB_KEYBOARD_KEY_DOWN},
|
||||
{0x51, GRUB_KEYBOARD_KEY_NPAGE},
|
||||
{0x52, GRUB_KEYBOARD_KEY_INSERT},
|
||||
{0x53, GRUB_KEYBOARD_KEY_DELETE},
|
||||
{0x53, GRUB_KEYBOARD_KEY_DELETE},
|
||||
};
|
||||
|
||||
static const grub_uint8_t set2_mapping[256] =
|
||||
@ -182,14 +182,14 @@ static const grub_uint8_t set2_mapping[256] =
|
||||
/* 0x7a */ GRUB_KEYBOARD_KEY_NUM3, GRUB_KEYBOARD_KEY_NUMMINUS,
|
||||
/* 0x7c */ GRUB_KEYBOARD_KEY_NUMMUL, GRUB_KEYBOARD_KEY_NUM9,
|
||||
/* 0x7e */ GRUB_KEYBOARD_KEY_SCROLL_LOCK, 0,
|
||||
/* 0x80 */ 0, 0,
|
||||
/* 0x80 */ 0, 0,
|
||||
/* 0x82 */ 0, GRUB_KEYBOARD_KEY_F7,
|
||||
};
|
||||
|
||||
static const struct
|
||||
{
|
||||
grub_uint8_t from, to;
|
||||
} set2_e0_mapping[] =
|
||||
} set2_e0_mapping[] =
|
||||
{
|
||||
{0x11, GRUB_KEYBOARD_KEY_RIGHT_ALT},
|
||||
{0x14, GRUB_KEYBOARD_KEY_RIGHT_CTRL},
|
||||
@ -266,7 +266,7 @@ fetch_key (struct grub_ps2_state *ps2_state, grub_uint8_t at_key, int *is_break)
|
||||
ret = set2_e0_mapping[i].to;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
|
||||
@ -79,7 +79,7 @@ struct grub_serial_input_state
|
||||
struct grub_serial_port *port;
|
||||
};
|
||||
|
||||
static void
|
||||
static void
|
||||
serial_put (grub_term_output_t term, const int c)
|
||||
{
|
||||
struct grub_serial_output_state *data = term->data;
|
||||
@ -214,7 +214,7 @@ grub_cmd_serial (grub_extcmd_context_t ctxt, int argc, char **args)
|
||||
|
||||
port = grub_serial_find (name);
|
||||
if (!port)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("serial port `%s' isn't found"),
|
||||
name);
|
||||
|
||||
@ -400,7 +400,7 @@ grub_serial_unregister (struct grub_serial_port *port)
|
||||
{
|
||||
if (port->driver->fini)
|
||||
port->driver->fini (port);
|
||||
|
||||
|
||||
if (port->term_in)
|
||||
grub_term_unregister_input (port->term_in);
|
||||
if (port->term_out)
|
||||
|
||||
@ -286,7 +286,7 @@ grub_terminfo_setcolorstate (struct grub_term_output *term,
|
||||
int fg;
|
||||
int bg;
|
||||
/* Map from VGA to terminal colors. */
|
||||
const int colormap[8]
|
||||
const int colormap[8]
|
||||
= { 0, /* Black. */
|
||||
4, /* Blue. */
|
||||
2, /* Green. */
|
||||
@ -479,10 +479,10 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, int ma
|
||||
[23] = GRUB_TERM_KEY_F11,
|
||||
[24] = GRUB_TERM_KEY_F12,
|
||||
};
|
||||
char fx_key[] =
|
||||
char fx_key[] =
|
||||
{ 'P', 'Q', 'w', 'x', 't', 'u',
|
||||
'q', 'r', 'p', 'M', 'A', 'B', 'H', 'F' };
|
||||
unsigned fx_code[] =
|
||||
unsigned fx_code[] =
|
||||
{ GRUB_TERM_KEY_F1, GRUB_TERM_KEY_F2, GRUB_TERM_KEY_F3,
|
||||
GRUB_TERM_KEY_F4, GRUB_TERM_KEY_F5, GRUB_TERM_KEY_F6,
|
||||
GRUB_TERM_KEY_F7, GRUB_TERM_KEY_F8, GRUB_TERM_KEY_F9,
|
||||
@ -512,7 +512,7 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, int ma
|
||||
}
|
||||
|
||||
CONTINUE_READ;
|
||||
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE (three_code_table); i++)
|
||||
if (three_code_table[i].key == c)
|
||||
{
|
||||
@ -562,7 +562,7 @@ grub_terminfo_readkey (struct grub_term_input *term, int *keys, int *len, int ma
|
||||
keys[0] = fx_code[num - 1];
|
||||
*len = 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
case '1' ... '9':
|
||||
{
|
||||
@ -662,7 +662,7 @@ grub_terminfo_output_init (struct grub_term_output *term)
|
||||
static grub_err_t
|
||||
print_terminfo (void)
|
||||
{
|
||||
const char *encoding_names[(GRUB_TERM_CODE_TYPE_MASK
|
||||
const char *encoding_names[(GRUB_TERM_CODE_TYPE_MASK
|
||||
>> GRUB_TERM_CODE_TYPE_SHIFT) + 1]
|
||||
= {
|
||||
/* VGA and glyph descriptor types are just for completeness,
|
||||
|
||||
@ -110,7 +110,7 @@ grub_console_init_early (void)
|
||||
* grub_console_init_lately():
|
||||
* Initializes terminfo formatting by registering terminal type.
|
||||
* Called after heap has been configured.
|
||||
*
|
||||
*
|
||||
*/
|
||||
void
|
||||
grub_console_init_lately (void)
|
||||
|
||||
@ -162,7 +162,7 @@ grub_usb_keyboard_attach (grub_usb_device_t usbdev, int configno, int interfno)
|
||||
if (curnum == ARRAY_SIZE (grub_usb_keyboards))
|
||||
return 0;
|
||||
|
||||
if (usbdev->descdev.class != 0
|
||||
if (usbdev->descdev.class != 0
|
||||
|| usbdev->descdev.subclass != 0 || usbdev->descdev.protocol != 0)
|
||||
return 0;
|
||||
|
||||
@ -199,7 +199,7 @@ grub_usb_keyboard_attach (grub_usb_device_t usbdev, int configno, int interfno)
|
||||
|
||||
/* Configure device */
|
||||
grub_usb_set_configuration (usbdev, configno + 1);
|
||||
|
||||
|
||||
/* Place the device in boot mode. */
|
||||
grub_usb_control_msg (usbdev, GRUB_USB_REQTYPE_CLASS_INTERFACE_OUT,
|
||||
USB_HID_SET_PROTOCOL, 0, interfno, 0, 0);
|
||||
@ -291,7 +291,7 @@ parse_keycode (struct grub_usb_keyboard_data *termdata)
|
||||
for ( ; index < termdata->max_index; index++)
|
||||
{
|
||||
keycode = termdata->current_report[index];
|
||||
|
||||
|
||||
if (keycode == KEY_NO_KEY
|
||||
|| keycode == KEY_ERR_BUFFER
|
||||
|| keycode == KEY_ERR_POST
|
||||
@ -316,7 +316,7 @@ parse_keycode (struct grub_usb_keyboard_data *termdata)
|
||||
/* Keycode is in last report, it means it was not released,
|
||||
* ignore it. */
|
||||
continue;
|
||||
|
||||
|
||||
if (keycode == KEY_CAPS_LOCK)
|
||||
{
|
||||
termdata->mods ^= GRUB_TERM_STATUS_CAPS;
|
||||
@ -367,7 +367,7 @@ grub_usb_keyboard_getkey (struct grub_term_input *term)
|
||||
keycode = parse_keycode (termdata);
|
||||
if (keycode != GRUB_TERM_NO_KEY)
|
||||
return keycode;
|
||||
|
||||
|
||||
/* Poll interrupt pipe. */
|
||||
err = grub_usb_check_transfer (termdata->transfer, &actual);
|
||||
|
||||
@ -387,7 +387,7 @@ grub_usb_keyboard_getkey (struct grub_term_input *term)
|
||||
grub_memcpy (termdata->last_report,
|
||||
termdata->current_report,
|
||||
sizeof (termdata->report));
|
||||
|
||||
|
||||
grub_memcpy (termdata->current_report,
|
||||
termdata->report,
|
||||
sizeof (termdata->report));
|
||||
@ -424,7 +424,7 @@ grub_usb_keyboard_getkey (struct grub_term_input *term)
|
||||
|
||||
termdata->index = 2; /* New data received. */
|
||||
termdata->max_index = actual;
|
||||
|
||||
|
||||
return parse_keycode (termdata);
|
||||
}
|
||||
|
||||
@ -457,7 +457,7 @@ GRUB_MOD_FINI(usb_keyboard)
|
||||
|
||||
if (!data)
|
||||
continue;
|
||||
|
||||
|
||||
if (data->transfer)
|
||||
grub_usb_cancel_transfer (data->transfer);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user