\r
**/\r
\r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
+\r
+#include "UefiLibInternal.h"\r
\r
/**\r
Internal function which prints a formatted Unicode string to the console output device\r
specified by Console and returns the number of Unicode characters that printed\r
to it. If the length of the formatted Unicode string is greater than PcdUefiLibMaxPrintBufferSize,\r
then only the first PcdUefiLibMaxPrintBufferSize characters are sent to Console.\r
+ If Format is NULL, then ASSERT().\r
+ If Format is not aligned on a 16-bit boundary, then ASSERT().\r
\r
@param Format Null-terminated Unicode format string.\r
@param Console The output console.\r
@param Marker VA_LIST marker for the variable argument list.\r
-\r
- If Format is NULL, then ASSERT().\r
- If Format is not aligned on a 16-bit boundary, then ASSERT().\r
-\r
+ \r
+ @return The number of Unicode characters in the produced\r
+ output buffer not including the Null-terminator.\r
**/\r
-\r
-STATIC\r
UINTN\r
+EFIAPI\r
InternalPrint (\r
IN CONST CHAR16 *Format,\r
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console,\r
\r
Return = UnicodeVSPrint (Buffer, BufferSize, Format, Marker);\r
\r
- if (Console != NULL) {\r
+ if (Console != NULL && Return > 0) {\r
//\r
// To be extra safe make sure Console has been initialized\r
//\r
characters that printed to ConOut. If the length of the formatted Unicode\r
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first\r
PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.\r
+ If Format is NULL, then ASSERT().\r
+ If Format is not aligned on a 16-bit boundary, then ASSERT().\r
\r
@param Format Null-terminated Unicode format string.\r
@param ... VARARG list consumed to process Format.\r
- If Format is NULL, then ASSERT().\r
- If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+ \r
+ @return The number of Unicode characters in the produced\r
+ output buffer not including the Null-terminator.\r
\r
**/\r
UINTN\r
characters that printed to StdErr. If the length of the formatted Unicode\r
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first\r
PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.\r
+ If Format is NULL, then ASSERT().\r
+ If Format is not aligned on a 16-bit boundary, then ASSERT().\r
\r
@param Format Null-terminated Unicode format string.\r
@param ... VARARG list consumed to process Format.\r
- If Format is NULL, then ASSERT().\r
- If Format is not aligned on a 16-bit boundary, then ASSERT().\r
\r
+ @return The number of Unicode characters in the produced\r
+ output buffer not including the Null-terminator.\r
**/\r
\r
UINTN\r
specified by Console and returns the number of ASCII characters that printed\r
to it. If the length of the formatted ASCII string is greater than PcdUefiLibMaxPrintBufferSize,\r
then only the first PcdUefiLibMaxPrintBufferSize characters are sent to Console.\r
+ If Format is NULL, then ASSERT().\r
+\r
+ If Format is NULL, then ASSERT().\r
+ If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+ \r
\r
@param Format Null-terminated ASCII format string.\r
@param Console The output console.\r
@param Marker VA_LIST marker for the variable argument list.\r
\r
- If Format is NULL, then ASSERT().\r
+ @return The number of Unicode characters in the produced\r
+ output buffer not including the Null-terminator.\r
\r
**/\r
-\r
-STATIC\r
UINTN\r
+EFIAPI\r
AsciiInternalPrint (\r
IN CONST CHAR8 *Format,\r
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Console,\r
characters that printed to ConOut. If the length of the formatted ASCII\r
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first\r
PcdUefiLibMaxPrintBufferSize characters are sent to ConOut.\r
+ If Format is NULL, then ASSERT().\r
\r
@param Format Null-terminated ASCII format string.\r
@param ... VARARG list consumed to process Format.\r
- If Format is NULL, then ASSERT().\r
- If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+ \r
+ @return The number of Ascii characters in the produced\r
+ output buffer not including the Null-terminator.\r
\r
**/\r
UINTN\r
{\r
VA_LIST Marker;\r
UINTN Return;\r
-\r
+ ASSERT (Format != NULL);\r
+ \r
VA_START (Marker, Format);\r
\r
Return = AsciiInternalPrint( Format, gST->ConOut, Marker);\r
characters that printed to StdErr. If the length of the formatted ASCII\r
string is greater than PcdUefiLibMaxPrintBufferSize, then only the first\r
PcdUefiLibMaxPrintBufferSize characters are sent to StdErr.\r
+ If Format is NULL, then ASSERT().\r
\r
@param Format Null-terminated ASCII format string.\r
@param ... VARARG list consumed to process Format.\r
- If Format is NULL, then ASSERT().\r
- If Format is not aligned on a 16-bit boundary, then ASSERT().\r
+ \r
+ @return The number of Ascii characters in the produced output\r
+ buffer not including the Null-terminator.\r
\r
**/\r
UINTN\r
VA_LIST Marker;\r
UINTN Return;\r
\r
+ ASSERT (Format != NULL);\r
+ \r
VA_START (Marker, Format);\r
\r
Return = AsciiInternalPrint( Format, gST->StdErr, Marker);\r