mirror of
https://github.com/reactos/reactos.git
synced 2025-07-02 07:31:25 +00:00
[FREELDR] Simplify the PrintText() and FrLdrBugCheckWithMessage() routines by using a new PrintTextV() helper.
This commit is contained in:
parent
ad43210b41
commit
60fbf459c3
1 changed files with 15 additions and 12 deletions
|
@ -73,17 +73,24 @@ i386PrintText(CHAR *pszText)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
PrintText(const CHAR *format, ...)
|
PrintTextV(const CHAR *Format, va_list args)
|
||||||
|
{
|
||||||
|
CHAR Buffer[512];
|
||||||
|
|
||||||
|
_vsnprintf(Buffer, sizeof(Buffer), Format, args);
|
||||||
|
Buffer[sizeof(Buffer) - 1] = ANSI_NULL;
|
||||||
|
|
||||||
|
i386PrintText(Buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
PrintText(const CHAR *Format, ...)
|
||||||
{
|
{
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
CHAR buffer[256];
|
|
||||||
|
|
||||||
va_start(argptr, format);
|
va_start(argptr, Format);
|
||||||
_vsnprintf(buffer, sizeof(buffer), format, argptr);
|
PrintTextV(Format, argptr);
|
||||||
buffer[sizeof(buffer) - 1] = ANSI_NULL;
|
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
|
|
||||||
i386PrintText(buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -187,7 +194,6 @@ FrLdrBugCheckWithMessage(
|
||||||
PSTR Format,
|
PSTR Format,
|
||||||
...)
|
...)
|
||||||
{
|
{
|
||||||
CHAR Buffer[1024];
|
|
||||||
va_list argptr;
|
va_list argptr;
|
||||||
|
|
||||||
MachVideoHideShowTextCursor(FALSE);
|
MachVideoHideShowTextCursor(FALSE);
|
||||||
|
@ -205,11 +211,8 @@ FrLdrBugCheckWithMessage(
|
||||||
}
|
}
|
||||||
|
|
||||||
va_start(argptr, Format);
|
va_start(argptr, Format);
|
||||||
_vsnprintf(Buffer, sizeof(Buffer), Format, argptr);
|
PrintTextV(Format, argptr);
|
||||||
va_end(argptr);
|
va_end(argptr);
|
||||||
Buffer[sizeof(Buffer) - 1] = 0;
|
|
||||||
|
|
||||||
i386PrintText(Buffer);
|
|
||||||
|
|
||||||
_disable();
|
_disable();
|
||||||
__halt();
|
__halt();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue