]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Library/PrintLib.h
DebugLib:
[mirror_edk2.git] / MdePkg / Include / Library / PrintLib.h
index bdab062638a3cd74009f61a0fc8fb9537c243fdf..e1b3cb37bba051bdb62606ff6351089b1b9cf674 100644 (file)
   The Unicode string is produced by parsing the format string specified by FormatString.  \r
   Arguments are pulled from the variable argument list specified by Marker based on the \r
   contents of the format string.  \r
-  The length of the produced output buffer is returned.\r
-  If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
+  The number of Unicode characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
 \r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
+  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
   If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
+  ASSERT().\r
   If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   @param  Marker          VA_LIST marker for the variable argument list.\r
   \r
-  @return return Length of the produced output buffer.\r
+  @return The number of Unicode characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -86,22 +90,26 @@ UnicodeVSPrint (
   and BufferSize.\r
   The Unicode string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list based on the contents of the format string.\r
-  The length of the produced output buffer is returned.  \r
-  If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
+  The number of Unicode characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
 \r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
+  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
   If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
+  ASSERT().\r
   If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of Unicode characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -122,23 +130,27 @@ UnicodeSPrint (
   The Unicode string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list specified by Marker based on the \r
   contents of the format string.\r
-  The length of the produced output buffer is returned.\r
-  If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
-\r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  The number of Unicode characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
+\r
+  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r
+  ASSERT().\r
   If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   @param  Marker          VA_LIST marker for the variable argument list.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of Unicode characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -159,22 +171,26 @@ UnicodeVSPrintAsciiFormat (
   The Unicode string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list based on the contents of the \r
   format string.\r
-  The length of the produced output buffer is returned.\r
-  If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
-\r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  The number of Unicode characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
+  If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
+\r
+  If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 1 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r
+  ASSERT().\r
   If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength Unicode characters, then ASSERT().\r
+  contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           Unicode string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of Unicode characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -195,23 +211,27 @@ UnicodeSPrintAsciiFormat (
   The ASCII string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list specified by Marker based on \r
   the contents of the format string.\r
-  The length of the produced output buffer is returned.\r
+  The number of ASCII characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
   If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
 \r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
+  If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r
+  contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   @param  Marker          VA_LIST marker for the variable argument list.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of ASCII characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -232,22 +252,26 @@ AsciiVSPrint (
   The ASCII string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list based on the contents of the \r
   format string.\r
-  The length of the produced output buffer is returned.\r
+  The number of ASCII characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
   If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
 \r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
+  If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r
+  contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of ASCII characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -268,23 +292,27 @@ AsciiSPrint (
   The ASCII string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list specified by Marker based on \r
   the contents of the format string.\r
-  The length of the produced output buffer is returned.\r
+  The number of ASCII characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
   If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
 \r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
+  If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r
+  contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   @param  Marker          VA_LIST marker for the variable argument list.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of ASCII characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -305,22 +333,26 @@ AsciiVSPrintUnicodeFormat (
   The ASCII string is produced by parsing the format string specified by FormatString.\r
   Arguments are pulled from the variable argument list based on the contents of the \r
   format string.\r
-  The length of the produced output buffer is returned.\r
+  The number of ASCII characters in the produced output buffer is returned not including\r
+  the Null-terminator.\r
   If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
 \r
-  If BufferSize is not 0 and StartOfBuffer is NULL, then ASSERT().\r
-  If BufferSize is not 0 and FormatString is NULL, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r
-  PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
-  If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r
-  contains more than PcdMaximumUnicodeStringLength ASCII characters, then ASSERT().\r
+  If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r
+  If BufferSize > 0 and FormatString is NULL, then ASSERT().\r
+  If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
+  PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
+  ASSERT().\r
+  If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r
+  contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r
+  Null-terminator, then ASSERT().\r
 \r
-  @param  StartOfBuffer   APointer to the output buffer for the produced Null-terminated \r
+  @param  StartOfBuffer   A pointer to the output buffer for the produced Null-terminated \r
                           ASCII string.\r
   @param  BufferSize      The size, in bytes, of the output buffer specified by StartOfBuffer.\r
   @param  FormatString    Null-terminated Unicode format string.\r
   \r
-  @return Length of the produced output buffer.\r
+  @return The number of ASCII characters in the produced output buffer not including the\r
+          Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -338,7 +370,7 @@ AsciiSPrintUnicodeFormat (
   Converts the decimal number specified by Value to a Null-terminated Unicode \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
+  The number of Unicode characters in Buffer is returned not including the Null-terminator.\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
@@ -362,9 +394,9 @@ AsciiSPrintUnicodeFormat (
                   Unicode string.\r
   @param  Flags   The bitmask of flags that specify left justification, zero pad, and commas.\r
   @param  Value   The 64-bit signed value to convert to a string.\r
-  @param  Width    The maximum number of Unicode characters to place in Buffer.\r
+  @param  Width   The maximum number of Unicode characters to place in Buffer.\r
   \r
-  @return Total number of characters required to perform the conversion.\r
+  @return The number of Unicode characters in Buffer not including the Null-terminator.\r
 \r
 **/\r
 UINTN\r
@@ -382,7 +414,7 @@ UnicodeValueToString (
   Converts the decimal number specified by Value to a Null-terminated ASCII string \r
   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
+  The number of ASCII characters in Buffer is returned not including the Null-terminator.\r
   If the conversion contains more than Width characters, then only the first Width\r
   characters are returned, and the total number of characters required to perform\r
   the conversion is returned.\r
@@ -406,9 +438,9 @@ UnicodeValueToString (
                   ASCII string.\r
   @param  Flags   The bitmask of flags that specify left justification, zero pad, and commas.\r
   @param  Value   The 64-bit signed value to convert to a string.\r
-  @param  Width    The maximum number of ASCII characters to place in Buffer.\r
+  @param  Width   The maximum number of ASCII characters to place in Buffer.\r
   \r
-  @return Total number of characters required to perform the conversion.\r
+  @return The number of ASCII characters in Buffer not including the Null-terminator.\r
 \r
 **/\r
 UINTN\r