mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 18:24:24 +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
|
@ -9,7 +9,7 @@ typedef struct _FRAME
|
||||||
void *Address;
|
void *Address;
|
||||||
} FRAME;
|
} FRAME;
|
||||||
|
|
||||||
static const char *i386ExceptionDescriptionText[] =
|
static const CHAR *i386ExceptionDescriptionText[] =
|
||||||
{
|
{
|
||||||
"Exception 00: DIVIDE BY ZERO\n\n",
|
"Exception 00: DIVIDE BY ZERO\n\n",
|
||||||
"Exception 01: DEBUG EXCEPTION\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
|
#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
|
#if 0
|
||||||
static void
|
static void
|
||||||
i386PrintChar(char chr, ULONG x, ULONG y)
|
i386PrintChar(CHAR chr, ULONG x, ULONG y)
|
||||||
{
|
{
|
||||||
MachVideoPutChar(chr, SCREEN_ATTR, x, y);
|
MachVideoPutChar(chr, SCREEN_ATTR, x, y);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Used to store the current X and Y position on the screen */
|
|
||||||
ULONG i386_ScreenPosX = 0;
|
|
||||||
ULONG i386_ScreenPosY = 0;
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
i386PrintText(char *pszText)
|
i386PrintText(CHAR *pszText)
|
||||||
{
|
{
|
||||||
char chr;
|
char chr;
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -68,15 +68,16 @@ i386PrintText(char *pszText)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PrintText(const char *format, ...)
|
PrintText(const CHAR *format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
char buffer[256];
|
CHAR buffer[256];
|
||||||
|
|
||||||
va_start(argptr, format);
|
va_start(argptr, format);
|
||||||
_vsnprintf(buffer, sizeof(buffer), format, argptr);
|
_vsnprintf(buffer, sizeof(buffer), format, argptr);
|
||||||
buffer[sizeof(buffer) - 1] = 0;
|
buffer[sizeof(buffer) - 1] = ANSI_NULL;
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
i386PrintText(buffer);
|
i386PrintText(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,53 +25,50 @@ static unsigned CurrentAttr = 0x0f;
|
||||||
VOID
|
VOID
|
||||||
XboxConsPutChar(int c)
|
XboxConsPutChar(int c)
|
||||||
{
|
{
|
||||||
ULONG Width;
|
ULONG Width, Unused;
|
||||||
ULONG Height;
|
|
||||||
ULONG Depth;
|
|
||||||
|
|
||||||
if ('\r' == c)
|
if (c == '\r')
|
||||||
{
|
{
|
||||||
CurrentCursorX = 0;
|
CurrentCursorX = 0;
|
||||||
}
|
}
|
||||||
else if ('\n' == c)
|
else if (c == '\n')
|
||||||
{
|
{
|
||||||
CurrentCursorX = 0;
|
CurrentCursorX = 0;
|
||||||
CurrentCursorY++;
|
CurrentCursorY++;
|
||||||
}
|
}
|
||||||
else if ('\t' == c)
|
else if (c == '\t')
|
||||||
{
|
{
|
||||||
CurrentCursorX = (CurrentCursorX + 8) & ~ 7;
|
CurrentCursorX = (CurrentCursorX + 8) & ~ 7;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
XboxVideoPutChar(c, CurrentAttr, CurrentCursorX, CurrentCursorY);
|
XboxVideoPutChar(c, CurrentAttr, CurrentCursorX, CurrentCursorY);
|
||||||
CurrentCursorX++;
|
CurrentCursorX++;
|
||||||
}
|
}
|
||||||
XboxVideoGetDisplaySize(&Width, &Height, &Depth);
|
|
||||||
if (Width <= CurrentCursorX)
|
XboxVideoGetDisplaySize(&Width, &Unused, &Unused);
|
||||||
|
if (CurrentCursorX >= Width)
|
||||||
{
|
{
|
||||||
CurrentCursorX = 0;
|
CurrentCursorX = 0;
|
||||||
CurrentCursorY++;
|
CurrentCursorY++;
|
||||||
}
|
}
|
||||||
|
// FIXME: Implement vertical screen scrolling if we are at the end of the screen.
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOLEAN
|
BOOLEAN
|
||||||
XboxConsKbHit(VOID)
|
XboxConsKbHit(VOID)
|
||||||
{
|
{
|
||||||
/* No keyboard support yet */
|
/* No keyboard support yet */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
XboxConsGetCh(void)
|
XboxConsGetCh(void)
|
||||||
{
|
{
|
||||||
/* No keyboard support yet */
|
/* No keyboard support yet */
|
||||||
while (1)
|
while (1) ;
|
||||||
{
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue