mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
use UnicodeVSPrintAsciiFormat, UnicodeSPrintAsciiFormat to simplify code.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5843 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
7c366ec9ca
commit
7c6d32a564
@ -54,7 +54,6 @@ DebugPrint (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
||||||
CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
|
|
||||||
VA_LIST Marker;
|
VA_LIST Marker;
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -73,8 +72,7 @@ DebugPrint (
|
|||||||
// Convert the DEBUG() message to a Unicode String
|
// Convert the DEBUG() message to a Unicode String
|
||||||
//
|
//
|
||||||
VA_START (Marker, Format);
|
VA_START (Marker, Format);
|
||||||
AsciiVSPrint (AsciiBuffer, sizeof (AsciiBuffer), Format, Marker);
|
UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, Marker);
|
||||||
AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
|
|
||||||
VA_END (Marker);
|
VA_END (Marker);
|
||||||
|
|
||||||
|
|
||||||
@ -119,14 +117,19 @@ DebugAssert (
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
CHAR16 Buffer[MAX_DEBUG_MESSAGE_LENGTH];
|
||||||
CHAR8 AsciiBuffer[MAX_DEBUG_MESSAGE_LENGTH];
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Generate the ASSERT() message in Unicode format
|
// Generate the ASSERT() message in Unicode format
|
||||||
//
|
//
|
||||||
AsciiSPrint (AsciiBuffer, sizeof (AsciiBuffer), "ASSERT %a(%d): %a\n", FileName, LineNumber, Description);
|
UnicodeSPrintAsciiFormat (
|
||||||
AsciiStrToUnicodeStr (AsciiBuffer, Buffer);
|
Buffer,
|
||||||
|
MAX_DEBUG_MESSAGE_LENGTH,
|
||||||
|
"ASSERT %a(%d): %a\n",
|
||||||
|
FileName,
|
||||||
|
LineNumber,
|
||||||
|
Description
|
||||||
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Send the print string to the Console Output device
|
// Send the print string to the Console Output device
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user