MdePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
## @file
|
||||
# Print Library implementation.
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
#
|
||||
# This program and the accompanying materials
|
||||
# are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -20,7 +20,7 @@
|
||||
FILE_GUID = a86fbfca-0183-4eeb-aa8a-762e3b7da1f3
|
||||
MODULE_TYPE = BASE
|
||||
VERSION_STRING = 1.0
|
||||
LIBRARY_CLASS = PrintLib
|
||||
LIBRARY_CLASS = PrintLib
|
||||
|
||||
|
||||
#
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Base Print Library instance implementation.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
@@ -17,8 +17,8 @@
|
||||
|
||||
//
|
||||
// Declare a VA_LIST global variable that is used in calls to BasePrintLibSPrintMarker()
|
||||
// when the BASE_LIST parameter is valid and the VA_LIST parameter is ignored.
|
||||
// A NULL VA_LIST can not be passed into BasePrintLibSPrintMarker() because some
|
||||
// when the BASE_LIST parameter is valid and the VA_LIST parameter is ignored.
|
||||
// A NULL VA_LIST can not be passed into BasePrintLibSPrintMarker() because some
|
||||
// compilers define VA_LIST to be a structure.
|
||||
//
|
||||
VA_LIST gNullVaList;
|
||||
@@ -355,26 +355,26 @@ UnicodeSPrintAsciiFormat (
|
||||
[ATTENTION] This function is deprecated for security reason.
|
||||
|
||||
Converts a decimal value to a Null-terminated Unicode string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated Unicode
|
||||
string specified by Buffer containing at most Width characters. No padding of spaces
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated Unicode
|
||||
string specified by Buffer containing at most Width characters. No padding of spaces
|
||||
is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The number of Unicode characters in Buffer is returned not including the Null-terminator.
|
||||
If the conversion contains more than Width characters, then only the first
|
||||
Width characters are returned, and the total number of characters
|
||||
Width characters are returned, and the total number of characters
|
||||
required to perform the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
|
||||
Additional conversion parameters are specified in Flags.
|
||||
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
formatted in hexadecimal format.
|
||||
If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
|
||||
@@ -390,7 +390,7 @@ UnicodeSPrintAsciiFormat (
|
||||
@param Value The 64-bit signed value to convert to a string.
|
||||
@param Width The maximum number of Unicode characters to place in Buffer, not including
|
||||
the Null-terminator.
|
||||
|
||||
|
||||
@return The number of Unicode characters in Buffer not including the Null-terminator.
|
||||
|
||||
**/
|
||||
@@ -793,29 +793,29 @@ AsciiSPrintUnicodeFormat (
|
||||
[ATTENTION] This function is deprecated for security reason.
|
||||
|
||||
Converts a decimal value to a Null-terminated ASCII string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated ASCII string
|
||||
specified by Buffer containing at most Width characters. No padding of spaces
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated ASCII string
|
||||
specified by Buffer containing at most Width characters. No padding of spaces
|
||||
is ever performed.
|
||||
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The number of ASCII characters in Buffer is returned not including the Null-terminator.
|
||||
If the conversion contains more than Width characters, then only the first Width
|
||||
characters are returned, and the total number of characters required to perform
|
||||
the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
If RADIX_HEX is set in Flags, then the output buffer will be
|
||||
formatted in hexadecimal format.
|
||||
If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
|
||||
|
||||
If Buffer is NULL, then ASSERT().
|
||||
If unsupported bits are set in Flags, then ASSERT().
|
||||
If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
|
||||
@@ -827,7 +827,7 @@ AsciiSPrintUnicodeFormat (
|
||||
@param Value The 64-bit signed value to convert to a string.
|
||||
@param Width The maximum number of ASCII characters to place in Buffer, not including
|
||||
the Null-terminator.
|
||||
|
||||
|
||||
@return The number of ASCII characters in Buffer not including the Null-terminator.
|
||||
|
||||
**/
|
||||
@@ -908,7 +908,7 @@ AsciiValueToStringS (
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
output were produced not including the Null-terminator.
|
||||
|
||||
If FormatString is not aligned on a 16-bit boundary, then ASSERT().
|
||||
@@ -921,7 +921,7 @@ AsciiValueToStringS (
|
||||
@param[in] FormatString A Null-terminated Unicode format string.
|
||||
@param[in] Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return The number of characters that would be produced, not including the
|
||||
@return The number of characters that would be produced, not including the
|
||||
Null-terminator.
|
||||
**/
|
||||
UINTN
|
||||
@@ -936,7 +936,7 @@ SPrintLength (
|
||||
}
|
||||
|
||||
/**
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
Returns the number of characters that would be produced by if the formatted
|
||||
output were produced not including the Null-terminator.
|
||||
|
||||
If FormatString is NULL, then ASSERT() and 0 is returned.
|
||||
@@ -947,7 +947,7 @@ SPrintLength (
|
||||
@param[in] FormatString A Null-terminated ASCII format string.
|
||||
@param[in] Marker VA_LIST marker for the variable argument list.
|
||||
|
||||
@return The number of characters that would be produced, not including the
|
||||
@return The number of characters that would be produced, not including the
|
||||
Null-terminator.
|
||||
**/
|
||||
UINTN
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Print Library internal worker functions.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -83,7 +83,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 * CONST mStatusString[] = {
|
||||
|
||||
@param Buffer The buffer to place the Unicode or ASCII string.
|
||||
@param EndBuffer The end of the input Buffer. No characters will be
|
||||
placed after that.
|
||||
placed after that.
|
||||
@param Length The count of character to be placed into Buffer.
|
||||
(Negative value indicates no buffer fill.)
|
||||
@param Character The character to be placed into Buffer.
|
||||
@@ -102,7 +102,7 @@ BasePrintLibFillBuffer (
|
||||
)
|
||||
{
|
||||
INTN Index;
|
||||
|
||||
|
||||
for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) {
|
||||
*Buffer = (CHAR8) Character;
|
||||
if (Increment != 1) {
|
||||
@@ -128,8 +128,8 @@ BasePrintLibFillBuffer (
|
||||
**/
|
||||
CHAR8 *
|
||||
BasePrintLibValueToString (
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN INT64 Value,
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN INT64 Value,
|
||||
IN UINTN Radix
|
||||
)
|
||||
{
|
||||
@@ -152,23 +152,23 @@ BasePrintLibValueToString (
|
||||
|
||||
/**
|
||||
Internal function that converts a decimal value to a Null-terminated string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated
|
||||
string specified by Buffer containing at most Width characters.
|
||||
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The total number of characters placed in Buffer is returned.
|
||||
If the conversion contains more than Width characters, then only the first
|
||||
Width characters are returned, and the total number of characters
|
||||
Width characters are returned, and the total number of characters
|
||||
required to perform the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If Value is < 0, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
|
||||
@@ -184,7 +184,7 @@ BasePrintLibValueToString (
|
||||
@param Width The maximum number of characters to place in Buffer, not including
|
||||
the Null-terminator.
|
||||
@param Increment The character increment in Buffer.
|
||||
|
||||
|
||||
@return Total number of characters required to perform the conversion.
|
||||
|
||||
**/
|
||||
@@ -222,7 +222,7 @@ BasePrintLibConvertValueToString (
|
||||
ASSERT (((Flags & COMMA_TYPE) == 0) || ((Flags & RADIX_HEX) == 0));
|
||||
|
||||
OriginalBuffer = Buffer;
|
||||
|
||||
|
||||
//
|
||||
// Width is 0 or COMMA_TYPE is set, PREFIX_ZERO is ignored.
|
||||
//
|
||||
@@ -239,7 +239,7 @@ BasePrintLibConvertValueToString (
|
||||
// Set the tag for the end of the input Buffer.
|
||||
//
|
||||
EndBuffer = Buffer + Width * Increment;
|
||||
|
||||
|
||||
//
|
||||
// Convert decimal negative
|
||||
//
|
||||
@@ -248,21 +248,21 @@ BasePrintLibConvertValueToString (
|
||||
Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, 1, '-', Increment);
|
||||
Width--;
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Count the length of the value string.
|
||||
//
|
||||
Radix = ((Flags & RADIX_HEX) == 0)? 10 : 16;
|
||||
ValueBufferPtr = BasePrintLibValueToString (ValueBuffer, Value, Radix);
|
||||
Count = ValueBufferPtr - ValueBuffer;
|
||||
|
||||
|
||||
//
|
||||
// Append Zero
|
||||
//
|
||||
if ((Flags & PREFIX_ZERO) != 0) {
|
||||
Buffer = BasePrintLibFillBuffer (Buffer, EndBuffer, Width - Count, '0', Increment);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Print Comma type for every 3 characters
|
||||
//
|
||||
@@ -282,7 +282,7 @@ BasePrintLibConvertValueToString (
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Print Null-terminator
|
||||
//
|
||||
@@ -496,21 +496,21 @@ BasePrintLibConvertValueToStringS (
|
||||
}
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and a VA_LIST argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine.
|
||||
|
||||
If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
|
||||
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
parsing of Format into.
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
buffer.
|
||||
@param[in] Flags Initial flags value.
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
and COUNT_ONLY_NO_PRINT set.
|
||||
@param[in] Format A Null-terminated format string.
|
||||
@param[in] VaListMarker VA_LIST style variable argument list consumed by
|
||||
@@ -566,7 +566,7 @@ BasePrintLibSPrintMarker (
|
||||
|
||||
//
|
||||
// If you change this code be sure to match the 2 versions of this function.
|
||||
// Nearly identical logic is found in the BasePrintLib and
|
||||
// Nearly identical logic is found in the BasePrintLib and
|
||||
// DxePrintLibPrint2Protocol (both PrintLib instances).
|
||||
//
|
||||
|
||||
@@ -687,24 +687,24 @@ BasePrintLibSPrintMarker (
|
||||
Format += BytesPerFormatCharacter;
|
||||
FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask;
|
||||
switch (FormatCharacter) {
|
||||
case '.':
|
||||
Flags |= PRECISION;
|
||||
case '.':
|
||||
Flags |= PRECISION;
|
||||
break;
|
||||
case '-':
|
||||
Flags |= LEFT_JUSTIFY;
|
||||
case '-':
|
||||
Flags |= LEFT_JUSTIFY;
|
||||
break;
|
||||
case '+':
|
||||
Flags |= PREFIX_SIGN;
|
||||
case '+':
|
||||
Flags |= PREFIX_SIGN;
|
||||
break;
|
||||
case ' ':
|
||||
Flags |= PREFIX_BLANK;
|
||||
case ' ':
|
||||
Flags |= PREFIX_BLANK;
|
||||
break;
|
||||
case ',':
|
||||
Flags |= COMMA_TYPE;
|
||||
case ',':
|
||||
Flags |= COMMA_TYPE;
|
||||
break;
|
||||
case 'L':
|
||||
case 'l':
|
||||
Flags |= LONG_TYPE;
|
||||
case 'l':
|
||||
Flags |= LONG_TYPE;
|
||||
break;
|
||||
case '*':
|
||||
if ((Flags & PRECISION) == 0) {
|
||||
@@ -748,11 +748,11 @@ BasePrintLibSPrintMarker (
|
||||
Precision = Count;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case '\0':
|
||||
//
|
||||
// Make no output if Format string terminates unexpectedly when
|
||||
// looking up for flag, width, precision and type.
|
||||
// looking up for flag, width, precision and type.
|
||||
//
|
||||
Format -= BytesPerFormatCharacter;
|
||||
Precision = 0;
|
||||
@@ -763,7 +763,7 @@ BasePrintLibSPrintMarker (
|
||||
Done = TRUE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Handle each argument type
|
||||
@@ -803,9 +803,9 @@ BasePrintLibSPrintMarker (
|
||||
//
|
||||
// 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
|
||||
// This assumption is made so the format string definition is compatible with the ANSI C
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// architectures. This is why the type "int" is used in this one case.
|
||||
//
|
||||
if (BaseListMarker == NULL) {
|
||||
@@ -843,9 +843,9 @@ BasePrintLibSPrintMarker (
|
||||
//
|
||||
// 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
|
||||
// This assumption is made so the format string definition is compatible with the ANSI C
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// architectures. This is why the type "unsigned int" is used in this one case.
|
||||
//
|
||||
Value = (unsigned int)Value;
|
||||
@@ -857,9 +857,9 @@ BasePrintLibSPrintMarker (
|
||||
//
|
||||
// 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
|
||||
// This assumption is made so the format string definition is compatible with the ANSI C
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// Specification for formatted strings. It is recommended that the Base Types be used
|
||||
// everywhere, but in this one case, compliance with ANSI C is more important, and
|
||||
// provides an implementation that is compatible with that largest possible set of CPU
|
||||
// architectures. This is why the type "unsigned int" is used in this one case.
|
||||
//
|
||||
Value = (unsigned int)Value;
|
||||
@@ -873,7 +873,7 @@ BasePrintLibSPrintMarker (
|
||||
Count = 0;
|
||||
}
|
||||
ArgumentString = (CHAR8 *)ValueBuffer + Count;
|
||||
|
||||
|
||||
Digits = Count % 3;
|
||||
if (Digits != 0) {
|
||||
Digits = 3 - Digits;
|
||||
@@ -946,7 +946,7 @@ BasePrintLibSPrintMarker (
|
||||
GuidData3 = ReadUnaligned16 (&(TmpGuid->Data3));
|
||||
BasePrintLibSPrint (
|
||||
ValueBuffer,
|
||||
MAXIMUM_VALUE_CHARACTERS,
|
||||
MAXIMUM_VALUE_CHARACTERS,
|
||||
0,
|
||||
"%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
|
||||
GuidData1,
|
||||
@@ -967,9 +967,9 @@ BasePrintLibSPrintMarker (
|
||||
|
||||
case 't':
|
||||
if (BaseListMarker == NULL) {
|
||||
TmpTime = VA_ARG (VaListMarker, TIME *);
|
||||
TmpTime = VA_ARG (VaListMarker, TIME *);
|
||||
} else {
|
||||
TmpTime = BASE_ARG (BaseListMarker, TIME *);
|
||||
TmpTime = BASE_ARG (BaseListMarker, TIME *);
|
||||
}
|
||||
if (TmpTime == NULL) {
|
||||
ArgumentString = "<null time>";
|
||||
@@ -1054,7 +1054,7 @@ BasePrintLibSPrintMarker (
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case '\r':
|
||||
Format += BytesPerFormatCharacter;
|
||||
FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask;
|
||||
@@ -1230,11 +1230,11 @@ BasePrintLibSPrintMarker (
|
||||
}
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and variable argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine
|
||||
|
||||
@param StartOfBuffer The character buffer to print the results of the parsing
|
||||
|
@@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Base Print Library instance Internal Functions definition.
|
||||
|
||||
Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@@ -55,21 +55,21 @@ typedef struct {
|
||||
} TIME;
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and a VA_LIST argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine.
|
||||
|
||||
If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
|
||||
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
@param[out] Buffer The character buffer to print the results of the
|
||||
parsing of Format into.
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
@param[in] BufferSize The maximum number of characters to put into
|
||||
buffer.
|
||||
@param[in] Flags Initial flags value.
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
|
||||
and COUNT_ONLY_NO_PRINT set.
|
||||
@param[in] Format A Null-terminated format string.
|
||||
@param[in] VaListMarker VA_LIST style variable argument list consumed by
|
||||
@@ -93,11 +93,11 @@ BasePrintLibSPrintMarker (
|
||||
);
|
||||
|
||||
/**
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
Worker function that produces a Null-terminated string in an output buffer
|
||||
based on a Null-terminated format string and variable argument list.
|
||||
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
VSPrint function to process format and place the results in Buffer. Since a
|
||||
VA_LIST is used this routine allows the nesting of Vararg routines. Thus
|
||||
this is the main print working routine
|
||||
|
||||
@param StartOfBuffer The character buffer to print the results of the parsing
|
||||
@@ -129,7 +129,7 @@ BasePrintLibSPrint (
|
||||
|
||||
@param Buffer Buffer to place the Unicode or ASCII string.
|
||||
@param EndBuffer The end of the input Buffer. No characters will be
|
||||
placed after that.
|
||||
placed after that.
|
||||
@param Length The count of character to be placed into Buffer.
|
||||
(Negative value indicates no buffer fill.)
|
||||
@param Character The character to be placed into Buffer.
|
||||
@@ -161,30 +161,30 @@ BasePrintLibFillBuffer (
|
||||
**/
|
||||
CHAR8 *
|
||||
BasePrintLibValueToString (
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN INT64 Value,
|
||||
IN OUT CHAR8 *Buffer,
|
||||
IN INT64 Value,
|
||||
IN UINTN Radix
|
||||
);
|
||||
|
||||
/**
|
||||
Internal function that converts a decimal value to a Null-terminated string.
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated
|
||||
|
||||
Converts the decimal number specified by Value to a Null-terminated
|
||||
string specified by Buffer containing at most Width characters.
|
||||
If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
|
||||
The total number of characters placed in Buffer is returned.
|
||||
If the conversion contains more than Width characters, then only the first
|
||||
Width characters are returned, and the total number of characters
|
||||
Width characters are returned, and the total number of characters
|
||||
required to perform the conversion is returned.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
Additional conversion parameters are specified in Flags.
|
||||
The Flags bit LEFT_JUSTIFY is always ignored.
|
||||
All conversions are left justified in Buffer.
|
||||
If Width is 0, PREFIX_ZERO is ignored in Flags.
|
||||
If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
|
||||
are inserted every 3rd digit starting from the right.
|
||||
If Value is < 0, then the fist character in Buffer is a '-'.
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
|
||||
then Buffer is padded with '0' characters so the combination of the optional '-'
|
||||
sign character, '0' characters, digit characters for Value, and the Null-terminator
|
||||
add up to Width characters.
|
||||
|
||||
@@ -200,7 +200,7 @@ BasePrintLibValueToString (
|
||||
@param Width The maximum number of characters to place in Buffer, not including
|
||||
the Null-terminator.
|
||||
@param Increment Character increment in Buffer.
|
||||
|
||||
|
||||
@return Total number of characters required to perform the conversion.
|
||||
|
||||
**/
|
||||
|
Reference in New Issue
Block a user