merge mainline into newreloc
This commit is contained in:
commit
c5c8cf354c
10 changed files with 104 additions and 41 deletions
|
@ -585,6 +585,7 @@ grub_cmdline_get (const char *prompt)
|
|||
break;
|
||||
|
||||
case '\e':
|
||||
grub_free (cl_terms);
|
||||
return 0;
|
||||
|
||||
case '\b':
|
||||
|
@ -635,5 +636,6 @@ grub_cmdline_get (const char *prompt)
|
|||
|
||||
ret = grub_ucs4_to_utf8_alloc (buf + lpos, llen - lpos + 1);
|
||||
grub_free (buf);
|
||||
grub_free (cl_terms);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -499,7 +499,10 @@ grub_normal_do_completion (char *buf, int *restore,
|
|||
|
||||
fail:
|
||||
if (argc != 0)
|
||||
grub_free (argv[0]);
|
||||
{
|
||||
grub_free (argv);
|
||||
grub_free (argv[0]);
|
||||
}
|
||||
grub_free (match);
|
||||
grub_errno = GRUB_ERR_NONE;
|
||||
|
||||
|
|
|
@ -44,6 +44,9 @@ static int grub_more;
|
|||
|
||||
static int grub_normal_char_counter = 0;
|
||||
|
||||
static void
|
||||
putcode_real (grub_uint32_t code, struct grub_term_output *term);
|
||||
|
||||
int
|
||||
grub_normal_get_char_counter (void)
|
||||
{
|
||||
|
@ -94,6 +97,7 @@ print_more (void)
|
|||
FOR_ACTIVE_TERM_OUTPUTS(term)
|
||||
grub_print_spaces (term, 8);
|
||||
grub_term_restore_pos (pos);
|
||||
grub_free (pos);
|
||||
|
||||
/* Scroll one lines or an entire page, depending on the key. */
|
||||
|
||||
|
@ -204,6 +208,20 @@ grub_puts_terminal (const char *str, struct grub_term_output *term)
|
|||
grub_uint32_t *unicode_str, *unicode_last_position;
|
||||
grub_utf8_to_ucs4_alloc (str, &unicode_str,
|
||||
&unicode_last_position);
|
||||
if (!unicode_str)
|
||||
{
|
||||
for (; str; str++)
|
||||
{
|
||||
grub_uint32_t code = *str;
|
||||
if (code > 0x7f)
|
||||
code = '?';
|
||||
|
||||
putcode_real (term, code);
|
||||
if (code == '\n')
|
||||
putcode_real (term, '\r');
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
grub_print_ucs4 (unicode_str, unicode_last_position, 0, 0, term);
|
||||
grub_free (unicode_str);
|
||||
|
@ -760,22 +778,9 @@ grub_xputs_normal (const char *str)
|
|||
|
||||
FOR_ACTIVE_TERM_OUTPUTS(term)
|
||||
{
|
||||
struct grub_unicode_glyph c =
|
||||
{
|
||||
.base = code,
|
||||
.variant = 0,
|
||||
.attributes = 0,
|
||||
.ncomb = 0,
|
||||
.combining = 0,
|
||||
.estimated_width = 1
|
||||
};
|
||||
|
||||
(term->putchar) (term, &c);
|
||||
putcode_real (term, code);
|
||||
if (code == '\n')
|
||||
{
|
||||
c.base = '\r';
|
||||
(term->putchar) (term, &c);
|
||||
}
|
||||
putcode_real (term, '\r');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue