mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
loader: implement proper 8 char tab stops
The current console code is printing out 8 spaces for tab, calculate the amount of spaces based on tab stops.
This commit is contained in:
parent
e2eb11e577
commit
686d524bc9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=347388
|
@ -135,11 +135,13 @@ efi_cons_rawputchar(int c)
|
|||
UINTN x, y;
|
||||
conout->QueryMode(conout, conout->Mode->Mode, &x, &y);
|
||||
|
||||
if (c == '\t')
|
||||
/* XXX lame tab expansion */
|
||||
for (i = 0; i < 8; i++)
|
||||
if (c == '\t') {
|
||||
int n;
|
||||
|
||||
n = 8 - ((curx + 8) % 8);
|
||||
for (i = 0; i < n; i++)
|
||||
efi_cons_rawputchar(' ');
|
||||
else {
|
||||
} else {
|
||||
#ifndef TERM_EMU
|
||||
if (c == '\n')
|
||||
efi_cons_efiputchar('\r');
|
||||
|
|
|
@ -136,11 +136,13 @@ vidc_rawputchar(int c)
|
|||
{
|
||||
int i;
|
||||
|
||||
if (c == '\t')
|
||||
/* lame tab expansion */
|
||||
for (i = 0; i < 8; i++)
|
||||
if (c == '\t') {
|
||||
int n;
|
||||
|
||||
n = 8 - ((curx + 8) % 8);
|
||||
for (i = 0; i < n; i++)
|
||||
vidc_rawputchar(' ');
|
||||
else {
|
||||
} else {
|
||||
#ifndef TERM_EMU
|
||||
vidc_biosputchar(c);
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue