4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Instance of Print Library based on gEfiPrint2ProtocolGuid.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Implement the print library instance by wrap the interface
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync provided in the Print2 protocol. This protocol is defined as the internal
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync protocol related to this implementation, not in the public spec. So, this
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync library instance is only for this code base.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncCopyright (c) 2009 - 2012, Intel Corporation. All rights reserved.<BR>
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncThis program and the accompanying materials
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncare licensed and made available under the terms and conditions of the BSD License
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncwhich accompanies this distribution. The full text of the license may be found at
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncTHE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncWITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The constructor function caches the pointer to Print2 protocol.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The constructor function locates Print2 protocol from protocol database.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync It will ASSERT() if that operation fails and it will always return EFI_SUCCESS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param ImageHandle The firmware allocated handle for the EFI image.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param SystemTable A pointer to the EFI System Table.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Status = SystemTable->BootServices->LocateProtocol (
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Worker function that converts a VA_LIST to a BASE_LIST based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param AsciiFormat TRUE if Format is an ASCII string. FALSE if Format is a Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Format Null-terminated format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param VaListMarker VA_LIST style variable argument list consumed by processing Format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BaseListMarker BASE_LIST style variable argument list consumed by processing Format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Size The size, in bytes, of the BaseListMarker buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of bytes in BaseListMarker. 0 if BaseListMarker is too small.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the first character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync while (FormatCharacter != 0) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Parse Flags and Width
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the next character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the next character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BASE_ARG (BaseListMarker, UINTN) = VA_ARG (VaListMarker, UINTN);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make no output if Format string terminates unexpectedly when
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // looking up for flag, width, precision and type.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // break skipped on purpose.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Handle each argument type
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BASE_ARG (BaseListMarker, INT64) = VA_ARG (VaListMarker, INT64);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BASE_ARG (BaseListMarker, int) = VA_ARG (VaListMarker, int);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BASE_ARG (BaseListMarker, VOID *) = VA_ARG (VaListMarker, VOID *);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BASE_ARG (BaseListMarker, UINTN) = VA_ARG (VaListMarker, UINTN);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BASE_ARG (BaseListMarker, RETURN_STATUS) = VA_ARG (VaListMarker, RETURN_STATUS);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // If BASE_LIST is larger than Size, then return FALSE
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if ((UINTN)((UINT8 *)BaseListMarker - (UINT8 *)BaseListStart) > Size) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the next character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the next character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in an output buffer based on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a Null-terminated Unicode format string and a VA_LIST argument list
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Unicode string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker VA_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return UnicodeBSPrint (StartOfBuffer, BufferSize, FormatString, (BASE_LIST)BaseListMarker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in an output buffer based on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync a Null-terminated Unicode format string and a BASE_LIST argument list
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Unicode string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker BASE_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return mPrint2Protocol->UnicodeBSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode format string and variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Unicode string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list based on the contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param ... Variable argument list whose contents are accessed based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync NumberOfPrinted = UnicodeVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and a VA_LIST argument list
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Unicode string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker VA_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return UnicodeBSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, (BASE_LIST)BaseListMarker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and a BASE_LIST argument list
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Unicode string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker BASE_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return mPrint2Protocol->UnicodeBSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Unicode string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list based on the contents of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 1 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumUnicodeStringLength Unicode characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param ... Variable argument list whose contents are accessed based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync NumberOfPrinted = UnicodeVSPrintAsciiFormat (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Converts a decimal value to a Null-terminated Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Converts the decimal number specified by Value to a Null-terminated Unicode
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync string specified by Buffer containing at most Width characters. No padding of spaces
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of Unicode characters in Buffer is returned not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If the conversion contains more than Width characters, then only the first
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Width characters are returned, and the total number of characters
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync required to perform the conversion is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Additional conversion parameters are specified in Flags.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Flags bit LEFT_JUSTIFY is always ignored.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync All conversions are left justified in Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Width is 0, PREFIX_ZERO is ignored in Flags.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are inserted every 3rd digit starting from the right.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If RADIX_HEX is set in Flags, then the output buffer will be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync formatted in hexadecimal format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then Buffer is padded with '0' characters so the combination of the optional '-'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync sign character, '0' characters, digit characters for Value, and the Null-terminator
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync add up to Width characters.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Buffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Buffer is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If unsupported bits are set in Flags, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Buffer Pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Unicode string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Flags The bitmask of flags that specify left justification, zero pad, and commas.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The 64-bit signed value to convert to a string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Width The maximum number of Unicode characters to place in Buffer, not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of Unicode characters in Buffer not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return mPrint2Protocol->UnicodeValueToString (Buffer, Flags, Value, Width);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and a VA_LIST argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The ASCII string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumAsciiStringLength ASCII characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker VA_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return AsciiBSPrint (StartOfBuffer, BufferSize, FormatString, (BASE_LIST)BaseListMarker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and a BASE_LIST argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The ASCII string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumAsciiStringLength ASCII characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker BASE_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return mPrint2Protocol->AsciiBSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The ASCII string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list based on the contents of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumAsciiStringLength ASCII characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param ... Variable argument list whose contents are accessed based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync NumberOfPrinted = AsciiVSPrint (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and a VA_LIST argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The ASCII string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumAsciiStringLength ASCII characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker VA_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return AsciiBSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, (BASE_LIST)BaseListMarker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and a BASE_LIST argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The ASCII string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list specified by Marker based on
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the contents of the format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumAsciiStringLength ASCII characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Marker BASE_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return mPrint2Protocol->AsciiBSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII format string and variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and BufferSize.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The ASCII string is produced by parsing the format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Arguments are pulled from the variable argument list based on the contents of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in the produced output buffer is returned not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize is 0, then no output buffer is produced and 0 is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync contains more than PcdMaximumAsciiStringLength ASCII characters not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param ... Variable argument list whose contents are accessed based on the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync format string specified by FormatString.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in the produced output buffer not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync NumberOfPrinted = AsciiVSPrintUnicodeFormat (StartOfBuffer, BufferSize, FormatString, Marker);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Converts a decimal value to a Null-terminated ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Converts the decimal number specified by Value to a Null-terminated ASCII string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync specified by Buffer containing at most Width characters. No padding of spaces
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync is ever performed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The number of ASCII characters in Buffer is returned not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If the conversion contains more than Width characters, then only the first Width
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync characters are returned, and the total number of characters required to perform
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the conversion is returned.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Additional conversion parameters are specified in Flags.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync The Flags bit LEFT_JUSTIFY is always ignored.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync All conversions are left justified in Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Width is 0, PREFIX_ZERO is ignored in Flags.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync are inserted every 3rd digit starting from the right.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If RADIX_HEX is set in Flags, then the output buffer will be
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync formatted in hexadecimal format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync then Buffer is padded with '0' characters so the combination of the optional '-'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync sign character, '0' characters, digit characters for Value, and the Null-terminator
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync add up to Width characters.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Buffer is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If unsupported bits are set in Flags, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Buffer Pointer to the output buffer for the produced Null-terminated
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Flags The bitmask of flags that specify left justification, zero pad, and commas.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The 64-bit signed value to convert to a string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Width The maximum number of ASCII characters to place in Buffer, not including
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of ASCII characters in Buffer not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return mPrint2Protocol->AsciiValueToString (Buffer, Flags, Value, Width);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync// Record date and time information
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsynctypedef struct {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mHexStr[] = {'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Internal function that convert a number to a string in Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Print worker function that converts a decimal or hexadecimal number to an ASCII string in Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Buffer Location to place the ASCII string of Value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Value The value to convert to a Decimal or Hexadecimal string in Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Radix Radix of the value
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return A pointer to the end of buffer filled with ASCII string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Loop to convert one digit at a time in reverse order
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Value = (INT64)DivU64x32Remainder ((UINT64)Value, (UINT32)Radix, &Remainder);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync } while (Value != 0);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Return pointer of the end of filled buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Worker function that produces a Null-terminated string in an output buffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync based on a Null-terminated format string and a VA_LIST argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VSPrint function to process format and place the results in Buffer. Since a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VA_LIST is used this routine allows the nesting of Vararg routines. Thus
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this is the main print working routine.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Buffer The character buffer to print the results of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync parsing of Format into.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] BufferSize The maximum number of characters to put into
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Flags Initial flags value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and COUNT_ONLY_NO_PRINT set.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Format A Null-terminated format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] VaListMarker VA_LIST style variable argument list consumed by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync processing Format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] BaseListMarker BASE_LIST style variable argument list consumed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by processing Format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of characters printed not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If COUNT_ONLY_NO_PRINT was set returns the same, but without any
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync modification to Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Worker function that produces a Null-terminated string in an output buffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync based on a Null-terminated format string and variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VSPrint function to process format and place the results in Buffer. Since a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VA_LIST is used this routine allows the nesting of Vararg routines. Thus
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this is the main print working routine
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param StartOfBuffer The character buffer to print the results of the parsing
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync of Format into.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param BufferSize The maximum number of characters to put into buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Zero means no limit.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param Flags Initial flags value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Can only have FORMAT_UNICODE and OUTPUT_UNICODE set
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param FormatString A Null-terminated format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param ... The variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of characters printed.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync NumberOfPrinted = InternalPrintLibSPrintMarker (StartOfBuffer, BufferSize, Flags, FormatString, Marker, NULL);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsyncGLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *mStatusString[] = {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Warning Unknown Glyph", // RETURN_WARN_UNKNOWN_GLYPH = 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Warning Delete Failure", // RETURN_WARN_DELETE_FAILURE = 2
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Warning Write Failure", // RETURN_WARN_WRITE_FAILURE = 3
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Warning Buffer Too Small", // RETURN_WARN_BUFFER_TOO_SMALL = 4
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Invalid Parameter", // RETURN_INVALID_PARAMETER = 2 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Bad Buffer Size", // RETURN_BAD_BUFFER_SIZE = 4 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Buffer Too Small", // RETURN_BUFFER_TOO_SMALL, = 5 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Device Error", // RETURN_DEVICE_ERROR = 7 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Write Protected", // RETURN_WRITE_PROTECTED = 8 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Out of Resources", // RETURN_OUT_OF_RESOURCES = 9 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Volume Corrupt", // RETURN_VOLUME_CORRUPTED = 10 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Volume Full", // RETURN_VOLUME_FULL = 11 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Media changed", // RETURN_MEDIA_CHANGED = 13 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Access Denied", // RETURN_ACCESS_DENIED = 15 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "No Response", // RETURN_NO_RESPONSE = 16 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Not started", // RETURN_NOT_STARTED = 19 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Already started", // RETURN_ALREADY_STARTED = 20 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "Protocol Error" // RETURN_PROTOCOL_ERROR = 24 | MAX_BIT
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Worker function that produces a Null-terminated string in an output buffer
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync based on a Null-terminated format string and a VA_LIST argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VSPrint function to process format and place the results in Buffer. Since a
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync VA_LIST is used this routine allows the nesting of Vararg routines. Thus
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync this is the main print working routine.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[out] Buffer The character buffer to print the results of the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync parsing of Format into.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] BufferSize The maximum number of characters to put into
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Flags Initial flags value.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Can only have FORMAT_UNICODE, OUTPUT_UNICODE,
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync and COUNT_ONLY_NO_PRINT set.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Format A Null-terminated format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] VaListMarker VA_LIST style variable argument list consumed by
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync processing Format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] BaseListMarker BASE_LIST style variable argument list consumed
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync by processing Format.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of characters printed not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If COUNT_ONLY_NO_PRINT was set returns the same, but without any
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync modification to Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // If you change this code be sure to match the 2 versions of this function.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Nearly identical logic is found in the BasePrintLib and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // DxePrintLibPrint2Protocol (both PrintLib instances).
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Reserve space for the Null terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Set the tag for the end of the input Buffer.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync EndBuffer = Buffer + BufferSize * BytesPerOutputCharacter;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure format string cannot contain more than PcdMaximumUnicodeStringLength
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Unicode characters if PcdMaximumUnicodeStringLength is not zero.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make sure format string cannot contain more than PcdMaximumAsciiStringLength
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Ascii characters if PcdMaximumAsciiStringLength is not zero.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the first character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Loop until the end of the format string is reached or the output buffer is full
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync while (FormatCharacter != 0 && Buffer < EndBuffer) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Clear all the flag bits except those that may have been passed in
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Flags &= (OUTPUT_UNICODE | FORMAT_UNICODE | COUNT_ONLY_NO_PRINT);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Set the default width to zero, and the default precision to 1
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Parse Flags and Width
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for (Count = 0; ((FormatCharacter >= '0') && (FormatCharacter <= '9')); ){
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Make no output if Format string terminates unexpectedly when
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // looking up for flag, width, precision and type.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // break skipped on purpose.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Handle each argument type
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Flag space, +, 0, L & l are invalid for type p.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Flags &= ~(PREFIX_BLANK | PREFIX_SIGN | PREFIX_ZERO | LONG_TYPE);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // break skipped on purpose
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // break skipped on purpose
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // 'd','x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // This assumption is made so the format string definition is compatible with the ANSI C
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Specification for formatted strings. It is recommended that the Base Types be used
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // everywhere, but in this one case, compliance with ANSI C is more important, and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // provides an implementation that is compatible with that largest possible set of CPU
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // architectures. This is why the type "int" is used in this one case.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // 'd','x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int".
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // This assumption is made so the format string definition is compatible with the ANSI C
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Specification for formatted strings. It is recommended that the Base Types be used
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // everywhere, but in this one case, compliance with ANSI C is more important, and
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // provides an implementation that is compatible with that largest possible set of CPU
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // architectures. This is why the type "unsigned int" is used in this one case.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Convert Value to a reversed string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Count = InternalPrintLibValueToString (ValueBuffer, Value, Radix) - ValueBuffer;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // break skipped on purpose
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ArgumentString = BASE_ARG (BaseListMarker, CHAR8 *);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Set the default precision for string to be zero if not specified.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Character = BASE_ARG (BaseListMarker, UINTN) & 0xffff;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync "%02d/%02d/%04d %02d:%02d",
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Clear error bit
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ArgumentString = mStatusString [Index + WARNING_STATUS_NUMBER];
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync InternalPrintLibSPrint ((CHAR8 *) ValueBuffer, MAXIMUM_VALUE_CHARACTERS, 0, "%08X", Status);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Translate '\r\n' to '\r\n'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Translate '\r' to '\r'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Translate '\n' to '\r\n' and '\n\r' to '\r\n'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // if the type is '%' or unknown, then print it to the screen
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Translate '\r\n' to '\r\n'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Translate '\r' to '\r'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Translate '\n' to '\r\n' and '\n\r' to '\r\n'
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Retrieve the ArgumentString attriubutes
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync BytesPerArgumentCharacter = -BytesPerArgumentCharacter;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Compute the number of characters in ArgumentString and store it in Count
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // ArgumentString is either null-terminated, or it contains Precision characters
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync for (Count = 0; Count < Precision || ((Flags & PRECISION) == 0); Count++) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ArgumentCharacter = ((ArgumentString[Count * BytesPerArgumentCharacter] & 0xff) | ((ArgumentString[Count * BytesPerArgumentCharacter + 1]) << 8)) & ArgumentMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Pad before the string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if ((Flags & (PAD_TO_WIDTH | LEFT_JUSTIFY)) == (PAD_TO_WIDTH)) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LengthToReturn += ((Width - Precision) * BytesPerOutputCharacter);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LengthToReturn += ((Precision - Count) * BytesPerOutputCharacter);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LengthToReturn += ((Precision - Count) * BytesPerOutputCharacter);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Output the Prefix character if it is present
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Copy the string into the output buffer performing the required type conversions
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync ArgumentCharacter = ((*ArgumentString & 0xff) | (*(ArgumentString + 1) << 8)) & ArgumentMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Pad after the string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync if ((Flags & (PAD_TO_WIDTH | LEFT_JUSTIFY)) == (PAD_TO_WIDTH | LEFT_JUSTIFY)) {
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync LengthToReturn += ((Width - Precision) * BytesPerOutputCharacter);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the next character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync // Get the next character from the format string
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync FormatCharacter = ((*Format & 0xff) | (*(Format + 1) << 8)) & FormatMask;
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Returns the number of characters that would be produced by if the formatted
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync output were produced not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If FormatString is not aligned on a 16-bit boundary, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] FormatString A Null-terminated Unicode format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Marker VA_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of characters that would be produced, not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync return InternalPrintLibSPrintMarker (NULL, 0, FORMAT_UNICODE | OUTPUT_UNICODE | COUNT_ONLY_NO_PRINT, (CHAR8 *)FormatString, Marker, NULL);
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Returns the number of characters that would be produced by if the formatted
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync output were produced not including the Null-terminator.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync If FormatString is NULL, then ASSERT().
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] FormatString A Null-terminated ASCII format string.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @param[in] Marker VA_LIST marker for the variable argument list.
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync @return The number of characters that would be produced, not including the
4fd606d1f5abe38e1f42c38de1d2e895166bd0f4vboxsync Null-terminator.