\r
static CONST CHAR8 mHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};\r
\r
+\r
+/**\r
+ Internal function that places the character into the Buffer.\r
+\r
+ Internal function that places ASCII or Unicode character into the Buffer.\r
+\r
+ @param Buffer Buffer to place the Unicode or ASCII string.\r
+ @param Length Count of character to be placed into Buffer.\r
+ @param Character Character to be placed into Buffer.\r
+ @param Increment Character increment in Buffer.\r
+\r
+ @return Number of characters printed.\r
+\r
+**/\r
CHAR8 *\r
BasePrintLibFillBuffer (\r
CHAR8 *Buffer,\r
}\r
\r
/**\r
- Print worker function that prints a Value as a decimal number in Buffer.\r
+ Internal function that convert a decimal number to a string in Buffer.\r
\r
- @param Buffer Location to place the Unicode or ASCII string of Value.\r
- \r
- @param Value Value to convert to a Decimal or Hexidecimal string in Buffer.\r
- \r
- @param Flags Flags to use in printing string, see file header for details.\r
- \r
- @param Precision Minimum number of digits to return in the ASCII string\r
+ Print worker function that convert a decimal number to a string in Buffer.\r
+\r
+ @param Buffer Location to place the Unicode or ASCII string of Value.\r
+ @param Value Value to convert to a Decimal or Hexidecimal string in Buffer.\r
+ @param Radix Radix of the value\r
\r
@return Number of characters printed.\r
\r
return Digits;\r
}\r
\r
+/**\r
+ Internal function that converts a decimal value to a Null-terminated string.\r
+ \r
+ Converts the decimal number specified by Value to a Null-terminated \r
+ string specified by Buffer containing at most Width characters.\r
+ If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.\r
+ The total number of characters placed in Buffer is returned.\r
+ If the conversion contains more than Width characters, then only the first\r
+ Width characters are returned, and the total number of characters \r
+ required to perform the conversion is returned.\r
+ Additional conversion parameters are specified in Flags. \r
+ The Flags bit LEFT_JUSTIFY is always ignored.\r
+ All conversions are left justified in Buffer.\r
+ If Width is 0, PREFIX_ZERO is ignored in Flags.\r
+ If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas\r
+ are inserted every 3rd digit starting from the right.\r
+ If Value is < 0, then the fist character in Buffer is a '-'.\r
+ If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, \r
+ then Buffer is padded with '0' characters so the combination of the optional '-' \r
+ sign character, '0' characters, digit characters for Value, and the Null-terminator\r
+ add up to Width characters.\r
+\r
+ If Buffer is NULL, then ASSERT().\r
+ If unsupported bits are set in Flags, then ASSERT().\r
+ If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()\r
+\r
+ @param Buffer Pointer to the output buffer for the produced Null-terminated\r
+ string.\r
+ @param Flags The bitmask of flags that specify left justification, zero pad,\r
+ and commas.\r
+ @param Value The 64-bit signed value to convert to a string.\r
+ @param Width The maximum number of characters to place in Buffer.\r
+ @param Increment Character increment in Buffer.\r
+ \r
+ @return Total number of characters required to perform the conversion.\r
+\r
+**/\r
UINTN\r
BasePrintLibConvertValueToString (\r
IN OUT CHAR8 *Buffer,\r
\r
return ((Buffer - OriginalBuffer) / Increment);\r
}\r
-\r
-\r
-UINTN\r
-UnicodeValueToString (\r
- IN OUT CHAR16 *Buffer,\r
- IN UINTN Flags,\r
- IN INT64 Value,\r
- IN UINTN Width\r
- )\r
-{\r
- return BasePrintLibConvertValueToString ((CHAR8 *)Buffer, Flags, Value, Width, 2);\r
-}\r
-\r
-UINTN\r
-AsciiValueToString (\r
- IN OUT CHAR8 *Buffer,\r
- IN UINTN Flags,\r
- IN INT64 Value,\r
- IN UINTN Width\r
- )\r
-{\r
- return BasePrintLibConvertValueToString ((CHAR8 *)Buffer, Flags, Value, Width, 1);\r
-}\r