remove all trailing whitespace
This commit is contained in:
parent
d2d4966571
commit
b39f9d20a9
222 changed files with 3286 additions and 3286 deletions
|
@ -127,7 +127,7 @@ serial_translate_key_sequence (void)
|
|||
{'H', 1},
|
||||
{'4', 4}
|
||||
};
|
||||
|
||||
|
||||
static struct
|
||||
{
|
||||
short key;
|
||||
|
@ -148,7 +148,7 @@ serial_translate_key_sequence (void)
|
|||
if (npending >= 3)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof (three_code_table) / sizeof (three_code_table[0]);
|
||||
i++)
|
||||
|
@ -165,7 +165,7 @@ serial_translate_key_sequence (void)
|
|||
{
|
||||
unsigned int i;
|
||||
short key = *((short *) (input_buf + 2));
|
||||
|
||||
|
||||
for (i = 0;
|
||||
i < sizeof (four_code_table) / sizeof (four_code_table[0]);
|
||||
i++)
|
||||
|
@ -187,16 +187,16 @@ fill_input_buf (const int nowait)
|
|||
for (i = 0; i < 10000 && npending < sizeof (input_buf); i++)
|
||||
{
|
||||
int c;
|
||||
|
||||
|
||||
c = serial_hw_fetch ();
|
||||
if (c >= 0)
|
||||
{
|
||||
input_buf[npending++] = c;
|
||||
|
||||
|
||||
/* Reset the counter to zero, to wait for the same interval. */
|
||||
i = 0;
|
||||
}
|
||||
|
||||
|
||||
if (nowait)
|
||||
break;
|
||||
}
|
||||
|
@ -324,60 +324,60 @@ grub_serial_putchar (grub_uint32_t 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;
|
||||
|
||||
|
||||
default:
|
||||
c = '?';
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\a':
|
||||
break;
|
||||
|
||||
|
||||
case '\b':
|
||||
case 127:
|
||||
if (xpos > 0)
|
||||
xpos--;
|
||||
break;
|
||||
|
||||
|
||||
case '\n':
|
||||
if (ypos < TEXT_HEIGHT)
|
||||
ypos++;
|
||||
break;
|
||||
|
||||
|
||||
case '\r':
|
||||
xpos = 0;
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
if (xpos >= TEXT_WIDTH)
|
||||
{
|
||||
|
@ -388,7 +388,7 @@ grub_serial_putchar (grub_uint32_t c)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
serial_hw_put (c);
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ grub_serial_gotoxy (grub_uint8_t x, grub_uint8_t y)
|
|||
keep_track = 0;
|
||||
grub_terminfo_gotoxy (x, y);
|
||||
keep_track = 1;
|
||||
|
||||
|
||||
xpos = x;
|
||||
ypos = y;
|
||||
}
|
||||
|
@ -507,10 +507,10 @@ grub_cmd_serial (grub_extcmd_t cmd,
|
|||
if (!serial_settings.port)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad unit number.");
|
||||
}
|
||||
|
||||
|
||||
if (state[1].set)
|
||||
serial_settings.port = (unsigned short) grub_strtoul (state[1].arg, 0, 0);
|
||||
|
||||
|
||||
if (state[2].set)
|
||||
{
|
||||
unsigned long speed;
|
||||
|
@ -523,7 +523,7 @@ grub_cmd_serial (grub_extcmd_t cmd,
|
|||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad speed");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state[3].set)
|
||||
{
|
||||
if (! grub_strcmp (state[3].arg, "5"))
|
||||
|
@ -540,7 +540,7 @@ grub_cmd_serial (grub_extcmd_t cmd,
|
|||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad word length");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state[4].set)
|
||||
{
|
||||
if (! grub_strcmp (state[4].arg, "no"))
|
||||
|
@ -555,7 +555,7 @@ grub_cmd_serial (grub_extcmd_t cmd,
|
|||
return grub_error (GRUB_ERR_BAD_ARGUMENT, "bad parity");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (state[5].set)
|
||||
{
|
||||
if (! grub_strcmp (state[5].arg, "1"))
|
||||
|
@ -571,7 +571,7 @@ grub_cmd_serial (grub_extcmd_t cmd,
|
|||
|
||||
/* Initialize with new settings. */
|
||||
hwiniterr = serial_hw_init ();
|
||||
|
||||
|
||||
if (hwiniterr == GRUB_ERR_NONE)
|
||||
{
|
||||
/* Register terminal if not yet registered. */
|
||||
|
@ -599,7 +599,7 @@ grub_cmd_serial (grub_extcmd_t cmd,
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return hwiniterr;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,7 +267,7 @@ static void
|
|||
grub_virtual_screen_invalidate_char (struct grub_colored_char *p)
|
||||
{
|
||||
p->code = 0xFFFF;
|
||||
|
||||
|
||||
if (p->width)
|
||||
{
|
||||
struct grub_colored_char *q;
|
||||
|
@ -411,14 +411,14 @@ grub_vesafb_putchar (grub_uint32_t c)
|
|||
if (virtual_screen.cursor_x > 0)
|
||||
virtual_screen.cursor_x--;
|
||||
break;
|
||||
|
||||
|
||||
case '\n':
|
||||
if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
|
||||
scroll_up ();
|
||||
else
|
||||
virtual_screen.cursor_y++;
|
||||
break;
|
||||
|
||||
|
||||
case '\r':
|
||||
virtual_screen.cursor_x = 0;
|
||||
break;
|
||||
|
@ -431,7 +431,7 @@ grub_vesafb_putchar (grub_uint32_t c)
|
|||
{
|
||||
unsigned width;
|
||||
struct grub_colored_char *p;
|
||||
|
||||
|
||||
grub_virtual_screen_get_glyph (c, 0, &width);
|
||||
|
||||
if (virtual_screen.cursor_x + width > virtual_screen.columns)
|
||||
|
@ -457,14 +457,14 @@ grub_vesafb_putchar (grub_uint32_t c)
|
|||
p[i].index = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
write_char ();
|
||||
|
||||
|
||||
virtual_screen.cursor_x += width;
|
||||
if (virtual_screen.cursor_x >= virtual_screen.columns)
|
||||
{
|
||||
virtual_screen.cursor_x = 0;
|
||||
|
||||
|
||||
if (virtual_screen.cursor_y >= virtual_screen.rows - 1)
|
||||
scroll_up ();
|
||||
else
|
||||
|
@ -480,7 +480,7 @@ static grub_ssize_t
|
|||
grub_vesafb_getcharwidth (grub_uint32_t c)
|
||||
{
|
||||
unsigned width;
|
||||
|
||||
|
||||
if (! grub_virtual_screen_get_glyph (c, 0, &width))
|
||||
return 0;
|
||||
|
||||
|
@ -542,7 +542,7 @@ grub_vesafb_cls (void)
|
|||
grub_virtual_screen_cls ();
|
||||
|
||||
grub_memset (framebuffer,
|
||||
0,
|
||||
0,
|
||||
mode_info.y_resolution * bytes_per_scan_line);
|
||||
}
|
||||
|
||||
|
|
|
@ -95,12 +95,12 @@ get_map_mask (void)
|
|||
{
|
||||
unsigned char old_addr;
|
||||
unsigned char old_data;
|
||||
|
||||
|
||||
old_addr = grub_inb (SEQUENCER_ADDR_PORT);
|
||||
grub_outb (MAP_MASK_REGISTER, SEQUENCER_ADDR_PORT);
|
||||
|
||||
|
||||
old_data = grub_inb (SEQUENCER_DATA_PORT);
|
||||
|
||||
|
||||
grub_outb (old_addr, SEQUENCER_ADDR_PORT);
|
||||
|
||||
return old_data;
|
||||
|
@ -111,12 +111,12 @@ static void
|
|||
set_map_mask (unsigned char mask)
|
||||
{
|
||||
unsigned char old_addr;
|
||||
|
||||
|
||||
old_addr = grub_inb (SEQUENCER_ADDR_PORT);
|
||||
grub_outb (MAP_MASK_REGISTER, SEQUENCER_ADDR_PORT);
|
||||
|
||||
|
||||
grub_outb (mask, SEQUENCER_DATA_PORT);
|
||||
|
||||
|
||||
grub_outb (old_addr, SEQUENCER_ADDR_PORT);
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ static void
|
|||
set_read_map (unsigned char map)
|
||||
{
|
||||
unsigned char old_addr;
|
||||
|
||||
|
||||
old_addr = grub_inb (GRAPHICS_ADDR_PORT);
|
||||
|
||||
grub_outb (READ_MAP_REGISTER, GRAPHICS_ADDR_PORT);
|
||||
|
@ -139,12 +139,12 @@ static void
|
|||
set_start_address (unsigned int start)
|
||||
{
|
||||
unsigned char old_addr;
|
||||
|
||||
|
||||
old_addr = grub_inb (CRTC_ADDR_PORT);
|
||||
|
||||
|
||||
grub_outb (START_ADDR_LOW_REGISTER, CRTC_ADDR_PORT);
|
||||
grub_outb (start & 0xFF, CRTC_DATA_PORT);
|
||||
|
||||
|
||||
grub_outb (START_ADDR_HIGH_REGISTER, CRTC_ADDR_PORT);
|
||||
grub_outb (start >> 8, CRTC_DATA_PORT);
|
||||
|
||||
|
@ -164,7 +164,7 @@ grub_vga_mod_init (void)
|
|||
font = grub_font_get (""); /* Choose any font, for now. */
|
||||
if (!font)
|
||||
return grub_error (GRUB_ERR_BAD_FONT, "No font loaded.");
|
||||
|
||||
|
||||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
|
@ -192,13 +192,13 @@ write_char (void)
|
|||
unsigned char *mem_base;
|
||||
unsigned plane;
|
||||
|
||||
mem_base = (VGA_MEM + xpos +
|
||||
mem_base = (VGA_MEM + xpos +
|
||||
ypos * CHAR_HEIGHT * TEXT_WIDTH + PAGE_OFFSET (page)) - p->index;
|
||||
p -= p->index;
|
||||
|
||||
/* Get glyph for character. */
|
||||
glyph = grub_font_get_glyph (font, p->code);
|
||||
|
||||
|
||||
for (plane = 0x01; plane <= 0x08; plane <<= 1)
|
||||
{
|
||||
unsigned y;
|
||||
|
@ -219,7 +219,7 @@ write_char (void)
|
|||
for (i = 0; i < char_width && offset < 32; i++)
|
||||
{
|
||||
unsigned char fg_mask, bg_mask;
|
||||
|
||||
|
||||
fg_mask = (p->fg_color & plane) ? glyph->bitmap[offset] : 0;
|
||||
bg_mask = (p->bg_color & plane) ? ~(glyph->bitmap[offset]) : 0;
|
||||
offset++;
|
||||
|
@ -227,7 +227,7 @@ write_char (void)
|
|||
if (check_vga_mem (mem + i))
|
||||
mem[i] = (fg_mask | bg_mask);
|
||||
}
|
||||
#endif /* 0 */
|
||||
#endif /* 0 */
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -241,7 +241,7 @@ write_cursor (void)
|
|||
+ (ypos * CHAR_HEIGHT + CHAR_HEIGHT - 3) * TEXT_WIDTH);
|
||||
if (check_vga_mem (mem))
|
||||
*mem = 0xff;
|
||||
|
||||
|
||||
mem += TEXT_WIDTH;
|
||||
if (check_vga_mem (mem))
|
||||
*mem = 0xff;
|
||||
|
@ -252,11 +252,11 @@ scroll_up (void)
|
|||
{
|
||||
unsigned i;
|
||||
unsigned plane;
|
||||
|
||||
|
||||
/* Do all the work in the other page. */
|
||||
grub_memmove (text_buf, text_buf + TEXT_WIDTH,
|
||||
sizeof (struct colored_char) * TEXT_WIDTH * (TEXT_HEIGHT - 1));
|
||||
|
||||
|
||||
for (i = TEXT_WIDTH * (TEXT_HEIGHT - 1); i < TEXT_WIDTH * TEXT_HEIGHT; i++)
|
||||
{
|
||||
text_buf[i].code = ' ';
|
||||
|
@ -279,7 +279,7 @@ scroll_up (void)
|
|||
grub_memset (VGA_MEM + PAGE_OFFSET (1 - page)
|
||||
+ VGA_WIDTH * (VGA_HEIGHT - CHAR_HEIGHT) / 8, 0,
|
||||
VGA_WIDTH * CHAR_HEIGHT / 8);
|
||||
|
||||
|
||||
/* Activate the other page. */
|
||||
page = 1 - page;
|
||||
wait_vretrace ();
|
||||
|
@ -292,7 +292,7 @@ grub_vga_putchar (grub_uint32_t c)
|
|||
#if DEBUG_VGA
|
||||
static int show = 1;
|
||||
#endif
|
||||
|
||||
|
||||
if (c == '\a')
|
||||
/* FIXME */
|
||||
return;
|
||||
|
@ -302,21 +302,21 @@ grub_vga_putchar (grub_uint32_t c)
|
|||
/* Erase current cursor, if any. */
|
||||
if (cursor_state)
|
||||
write_char ();
|
||||
|
||||
|
||||
switch (c)
|
||||
{
|
||||
case '\b':
|
||||
if (xpos > 0)
|
||||
xpos--;
|
||||
break;
|
||||
|
||||
|
||||
case '\n':
|
||||
if (ypos >= TEXT_HEIGHT - 1)
|
||||
scroll_up ();
|
||||
else
|
||||
ypos++;
|
||||
break;
|
||||
|
||||
|
||||
case '\r':
|
||||
xpos = 0;
|
||||
break;
|
||||
|
@ -330,7 +330,7 @@ grub_vga_putchar (grub_uint32_t c)
|
|||
struct grub_font_glyph *glyph;
|
||||
struct colored_char *p;
|
||||
unsigned char_width = 1;
|
||||
|
||||
|
||||
glyph = grub_font_get_glyph(font, c);
|
||||
|
||||
if (xpos + char_width > TEXT_WIDTH)
|
||||
|
@ -354,14 +354,14 @@ grub_vga_putchar (grub_uint32_t c)
|
|||
p[i].index = i;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
write_char ();
|
||||
|
||||
|
||||
xpos += char_width;
|
||||
if (xpos >= TEXT_WIDTH)
|
||||
{
|
||||
xpos = 0;
|
||||
|
||||
|
||||
if (ypos >= TEXT_HEIGHT - 1)
|
||||
scroll_up ();
|
||||
else
|
||||
|
@ -391,9 +391,9 @@ grub_vga_getcharwidth (grub_uint32_t c)
|
|||
{
|
||||
#if 0
|
||||
struct grub_font_glyph glyph;
|
||||
|
||||
|
||||
glyph = grub_font_get_glyph (c);
|
||||
|
||||
|
||||
return glyph.char_width;
|
||||
#else
|
||||
(void) c; /* Prevent warning. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue