mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[FREELDR] xboxcons.c, i386bug.c: Formatting and whitespace fixes.
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
This commit is contained in:
parent
fbf4660f46
commit
043307624f
2 changed files with 33 additions and 35 deletions
|
@ -9,7 +9,7 @@ typedef struct _FRAME
|
|||
void *Address;
|
||||
} FRAME;
|
||||
|
||||
static const char *i386ExceptionDescriptionText[] =
|
||||
static const CHAR *i386ExceptionDescriptionText[] =
|
||||
{
|
||||
"Exception 00: DIVIDE BY ZERO\n\n",
|
||||
"Exception 01: DEBUG EXCEPTION\n\n",
|
||||
|
@ -34,20 +34,20 @@ static const char *i386ExceptionDescriptionText[] =
|
|||
|
||||
#define SCREEN_ATTR 0x1F // Bright white on blue background
|
||||
|
||||
/* Used to store the current X and Y position on the screen */
|
||||
static ULONG i386_ScreenPosX = 0;
|
||||
static ULONG i386_ScreenPosY = 0;
|
||||
|
||||
#if 0
|
||||
static void
|
||||
i386PrintChar(char chr, ULONG x, ULONG y)
|
||||
i386PrintChar(CHAR chr, ULONG x, ULONG y)
|
||||
{
|
||||
MachVideoPutChar(chr, SCREEN_ATTR, x, y);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Used to store the current X and Y position on the screen */
|
||||
ULONG i386_ScreenPosX = 0;
|
||||
ULONG i386_ScreenPosY = 0;
|
||||
|
||||
static void
|
||||
i386PrintText(char *pszText)
|
||||
i386PrintText(CHAR *pszText)
|
||||
{
|
||||
char chr;
|
||||
while (1)
|
||||
|
@ -68,15 +68,16 @@ i386PrintText(char *pszText)
|
|||
}
|
||||
|
||||
static void
|
||||
PrintText(const char *format, ...)
|
||||
PrintText(const CHAR *format, ...)
|
||||
{
|
||||
va_list argptr;
|
||||
char buffer[256];
|
||||
CHAR buffer[256];
|
||||
|
||||
va_start(argptr, format);
|
||||
_vsnprintf(buffer, sizeof(buffer), format, argptr);
|
||||
buffer[sizeof(buffer) - 1] = 0;
|
||||
buffer[sizeof(buffer) - 1] = ANSI_NULL;
|
||||
va_end(argptr);
|
||||
|
||||
i386PrintText(buffer);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,20 +25,18 @@ static unsigned CurrentAttr = 0x0f;
|
|||
VOID
|
||||
XboxConsPutChar(int c)
|
||||
{
|
||||
ULONG Width;
|
||||
ULONG Height;
|
||||
ULONG Depth;
|
||||
ULONG Width, Unused;
|
||||
|
||||
if ('\r' == c)
|
||||
if (c == '\r')
|
||||
{
|
||||
CurrentCursorX = 0;
|
||||
}
|
||||
else if ('\n' == c)
|
||||
else if (c == '\n')
|
||||
{
|
||||
CurrentCursorX = 0;
|
||||
CurrentCursorY++;
|
||||
}
|
||||
else if ('\t' == c)
|
||||
else if (c == '\t')
|
||||
{
|
||||
CurrentCursorX = (CurrentCursorX + 8) & ~ 7;
|
||||
}
|
||||
|
@ -47,12 +45,14 @@ XboxConsPutChar(int c)
|
|||
XboxVideoPutChar(c, CurrentAttr, CurrentCursorX, CurrentCursorY);
|
||||
CurrentCursorX++;
|
||||
}
|
||||
XboxVideoGetDisplaySize(&Width, &Height, &Depth);
|
||||
if (Width <= CurrentCursorX)
|
||||
|
||||
XboxVideoGetDisplaySize(&Width, &Unused, &Unused);
|
||||
if (CurrentCursorX >= Width)
|
||||
{
|
||||
CurrentCursorX = 0;
|
||||
CurrentCursorY++;
|
||||
}
|
||||
// FIXME: Implement vertical screen scrolling if we are at the end of the screen.
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
|
@ -66,10 +66,7 @@ int
|
|||
XboxConsGetCh(void)
|
||||
{
|
||||
/* No keyboard support yet */
|
||||
while (1)
|
||||
{
|
||||
;
|
||||
}
|
||||
while (1) ;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue