remove all trailing whitespace

This commit is contained in:
fzielcke 2009-06-10 21:04:23 +00:00
parent d2d4966571
commit b39f9d20a9
222 changed files with 3286 additions and 3286 deletions

View file

@ -72,7 +72,7 @@ grub_set_history (int newsize)
/* Copy the older part. */
grub_memmove (hist_lines, old_hist_lines + hist_pos,
(hist_size - hist_pos) * sizeof (char *));
/* Copy the newer part. */
grub_memmove (hist_lines + hist_size - hist_pos, old_hist_lines,
hist_end * sizeof (char *));
@ -162,7 +162,7 @@ print_completion (const char *item, grub_completion_type_t type, int count)
what = "things";
break;
}
grub_printf ("\nPossible %s are:\n", what);
}
@ -199,10 +199,10 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
xpos = (plen + lpos) % 79;
ypos = ystart + (plen + lpos) / 79;
grub_gotoxy (xpos, ypos);
grub_refresh ();
}
void cl_print (int pos, int c)
{
char *p;
@ -212,7 +212,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
if (xpos++ > 78)
{
grub_putchar ('\n');
xpos = 1;
if (ypos == (unsigned) (grub_getxy () & 0xFF))
ystart--;
@ -226,7 +226,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
grub_putchar (*p);
}
}
void cl_insert (const char *str)
{
grub_size_t len = grub_strlen (str);
@ -241,7 +241,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
cl_print (lpos - len, echo_char);
cl_set_pos ();
}
grub_refresh ();
}
@ -256,28 +256,28 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
cl_print (lpos, ' ');
lpos = saved_lpos;
cl_set_pos ();
grub_memmove (buf + lpos, buf + lpos + len, llen - lpos + 1);
llen -= len;
cl_print (lpos, echo_char);
cl_set_pos ();
}
grub_refresh ();
}
plen = grub_strlen (prompt);
lpos = llen = 0;
buf[0] = '\0';
if ((grub_getxy () >> 8) != 0)
grub_putchar ('\n');
grub_printf (prompt);
xpos = plen;
ystart = ypos = (grub_getxy () & 0xFF);
cl_insert (cmdline);
if (hist_used == 0)
@ -319,18 +319,18 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
{
char *insert;
int restore;
/* Backup the next character and make it 0 so it will
be easy to use string functions. */
char backup = buf[lpos];
buf[lpos] = '\0';
insert = grub_normal_do_completion (buf, &restore,
print_completion);
/* Restore the original string. */
buf[lpos] = backup;
if (restore)
{
/* Restore the prompt. */
@ -401,7 +401,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
if (lpos > 0)
{
grub_size_t n = lpos;
if (kill_buf)
grub_free (kill_buf);
@ -440,7 +440,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
else
break;
/* fall through */
case 4: /* Ctrl-d */
if (lpos < llen)
cl_delete (1);
@ -474,7 +474,7 @@ grub_cmdline_get (const char *prompt, char cmdline[], unsigned max_len,
grub_history_replace (histpos, buf);
grub_history_add ("");
}
grub_memcpy (cmdline, buf + lpos, llen - lpos + 1);
return 1;