X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FLibrary%2FBasePrintLib%2FPrintLibInternal.h;h=05f2e1bc99b509d10f78fe351adc806067bdc525;hb=9ade4339658e962c067d01f12ff83f1c2dab13ab;hp=5369620e3e3b0325fac584c14245bc4749bdef5b;hpb=7c905091582f4f03b369d8262b49966071b61bc3;p=mirror_edk2.git diff --git a/MdePkg/Library/BasePrintLib/PrintLibInternal.h b/MdePkg/Library/BasePrintLib/PrintLibInternal.h index 5369620e3e..05f2e1bc99 100644 --- a/MdePkg/Library/BasePrintLib/PrintLibInternal.h +++ b/MdePkg/Library/BasePrintLib/PrintLibInternal.h @@ -1,11 +1,11 @@ /** @file Base Print Library instance Internal Functions definition. - Copyright (c) 2006 - 2008, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + http://opensource.org/licenses/bsd-license.php. THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -24,15 +24,17 @@ // // Print primitives // -#define PREFIX_SIGN 0x02 -#define PREFIX_BLANK 0x04 -#define LONG_TYPE 0x10 -#define OUTPUT_UNICODE 0x40 -#define FORMAT_UNICODE 0x100 -#define PAD_TO_WIDTH 0x200 -#define ARGUMENT_UNICODE 0x400 -#define PRECISION 0x800 -#define ARGUMENT_REVERSED 0x1000 +#define PREFIX_SIGN BIT1 +#define PREFIX_BLANK BIT2 +#define LONG_TYPE BIT4 +#define OUTPUT_UNICODE BIT6 +#define FORMAT_UNICODE BIT8 +#define PAD_TO_WIDTH BIT9 +#define ARGUMENT_UNICODE BIT10 +#define PRECISION BIT11 +#define ARGUMENT_REVERSED BIT12 +#define COUNT_ONLY_NO_PRINT BIT13 +#define UNSIGNED_TYPE BIT14 // // Record date and time information @@ -59,24 +61,34 @@ typedef struct { VA_LIST is used this routine allows the nesting of Vararg routines. Thus this is the main print working routine. - @param Buffer Character buffer to print the results of the parsing - of Format into. - @param BufferSize Maximum number of characters to put into buffer. - @param Flags Initial flags value. - Can only have FORMAT_UNICODE and OUTPUT_UNICODE set. - @param Format Null-terminated format string. - @param Marker Vararg list consumed by processing Format. - - @return Number of characters printed not including the Null-terminator. + If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all. + + @param[out] Buffer The character buffer to print the results of the + parsing of Format into. + @param[in] BufferSize The maximum number of characters to put into + buffer. + @param[in] Flags Initial flags value. + Can only have FORMAT_UNICODE, OUTPUT_UNICODE, + and COUNT_ONLY_NO_PRINT set. + @param[in] Format A Null-terminated format string. + @param[in] VaListMarker VA_LIST style variable argument list consumed by + processing Format. + @param[in] BaseListMarker BASE_LIST style variable argument list consumed + by processing Format. + + @return The number of characters printed not including the Null-terminator. + If COUNT_ONLY_NO_PRINT was set returns the same, but without any + modification to Buffer. **/ UINTN -BasePrintLibVSPrint ( +BasePrintLibSPrintMarker ( OUT CHAR8 *Buffer, IN UINTN BufferSize, IN UINTN Flags, IN CONST CHAR8 *Format, - IN VA_LIST Marker + IN VA_LIST VaListMarker, OPTIONAL + IN BASE_LIST BaseListMarker OPTIONAL ); /** @@ -87,19 +99,20 @@ BasePrintLibVSPrint ( VA_LIST is used this routine allows the nesting of Vararg routines. Thus this is the main print working routine - @param StartOfBuffer Character buffer to print the results of the parsing + @param StartOfBuffer The character buffer to print the results of the parsing of Format into. - @param BufferSize Maximum number of characters to put into buffer. + @param BufferSize The maximum number of characters to put into buffer. Zero means no limit. @param Flags Initial flags value. Can only have FORMAT_UNICODE and OUTPUT_UNICODE set @param FormatString Null-terminated format string. @param ... The variable argument list. - @return Number of characters printed. + @return The number of characters printed. **/ UINTN +EFIAPI BasePrintLibSPrint ( OUT CHAR8 *StartOfBuffer, IN UINTN BufferSize, @@ -116,10 +129,10 @@ BasePrintLibSPrint ( @param Buffer Buffer to place the Unicode or ASCII string. @param EndBuffer The end of the input Buffer. No characters will be placed after that. - @param Length Count of character to be placed into Buffer. + @param Length The count of character to be placed into Buffer. (Negative value indicates no buffer fill.) - @param Character Character to be placed into Buffer. - @param Increment Character increment in Buffer. + @param Character The character to be placed into Buffer. + @param Increment The character increment in Buffer. @return Buffer Buffer filled with the input Character. @@ -139,7 +152,7 @@ BasePrintLibFillBuffer ( Print worker function that converts a decimal or hexadecimal number to an ASCII string in Buffer. @param Buffer Location to place the ASCII string of Value. - @param Value Value to convert to a Decimal or Hexadecimal string in Buffer. + @param Value The value to convert to a Decimal or Hexadecimal string in Buffer. @param Radix Radix of the value @return A pointer to the end of buffer filled with ASCII string. @@ -178,7 +191,7 @@ BasePrintLibValueToString ( If unsupported bits are set in Flags, then ASSERT(). If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT() - @param Buffer Pointer to the output buffer for the produced Null-terminated + @param Buffer The pointer to the output buffer for the produced Null-terminated string. @param Flags The bitmask of flags that specify left justification, zero pad, and commas.