3 Produces EFI_PRINT2_PROTOCOL and EFI_PRINT2S_PROTOCOL.
4 These protocols define basic print functions to print the format unicode and
7 Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
8 SPDX-License-Identifier: BSD-2-Clause-Patent
15 #define EFI_PRINT2_PROTOCOL_GUID \
16 { 0xf05976ef, 0x83f1, 0x4f3d, { 0x86, 0x19, 0xf7, 0x59, 0x5d, 0x41, 0xe5, 0x38 } }
19 // Forward reference for pure ANSI compatability
21 typedef struct _EFI_PRINT2_PROTOCOL EFI_PRINT2_PROTOCOL
;
24 Produces a Null-terminated Unicode string in an output buffer based on
25 a Null-terminated Unicode format string and a BASE_LIST argument list.
27 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
29 The Unicode string is produced by parsing the format string specified by FormatString.
30 Arguments are pulled from the variable argument list specified by Marker based on the
31 contents of the format string.
32 The number of Unicode characters in the produced output buffer is returned not including
35 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
36 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
38 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
39 unmodified and 0 is returned.
40 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
41 unmodified and 0 is returned.
42 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >
43 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
44 buffer is unmodified and 0 is returned.
45 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
46 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
47 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
49 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.
51 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
53 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
54 @param FormatString A Null-terminated Unicode format string.
55 @param Marker BASE_LIST marker for the variable argument list.
57 @return The number of Unicode characters in the produced output buffer not including the
63 (EFIAPI
*UNICODE_BS_PRINT
)(
64 OUT CHAR16
*StartOfBuffer
,
66 IN CONST CHAR16
*FormatString
,
71 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
72 Unicode format string and variable argument list.
74 This function is similar as snprintf_s defined in C11.
76 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
78 The Unicode string is produced by parsing the format string specified by FormatString.
79 Arguments are pulled from the variable argument list based on the contents of the format string.
80 The number of Unicode characters in the produced output buffer is returned not including
83 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
84 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
86 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
87 unmodified and 0 is returned.
88 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
89 unmodified and 0 is returned.
90 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >
91 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
92 buffer is unmodified and 0 is returned.
93 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
94 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
95 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
97 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.
99 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
101 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
102 @param FormatString A Null-terminated Unicode format string.
103 @param ... Variable argument list whose contents are accessed based on the
104 format string specified by FormatString.
106 @return The number of Unicode characters in the produced output buffer not including the
112 (EFIAPI
*UNICODE_S_PRINT
)(
113 OUT CHAR16
*StartOfBuffer
,
115 IN CONST CHAR16
*FormatString
,
120 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
121 ASCII format string and a BASE_LIST argument list.
123 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
125 The Unicode string is produced by parsing the format string specified by FormatString.
126 Arguments are pulled from the variable argument list specified by Marker based on the
127 contents of the format string.
128 The number of Unicode characters in the produced output buffer is returned not including
131 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
133 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
134 unmodified and 0 is returned.
135 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
136 unmodified and 0 is returned.
137 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >
138 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
139 buffer is unmodified and 0 is returned.
140 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
141 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
142 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
144 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
146 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
148 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
149 @param FormatString A Null-terminated ASCII format string.
150 @param Marker BASE_LIST marker for the variable argument list.
152 @return The number of Unicode characters in the produced output buffer not including the
158 (EFIAPI
*UNICODE_BS_PRINT_ASCII_FORMAT
)(
159 OUT CHAR16
*StartOfBuffer
,
161 IN CONST CHAR8
*FormatString
,
166 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated
167 ASCII format string and variable argument list.
169 This function is similar as snprintf_s defined in C11.
171 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer
173 The Unicode string is produced by parsing the format string specified by FormatString.
174 Arguments are pulled from the variable argument list based on the contents of the
176 The number of Unicode characters in the produced output buffer is returned not including
179 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().
181 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
182 unmodified and 0 is returned.
183 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is
184 unmodified and 0 is returned.
185 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >
186 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output
187 buffer is unmodified and 0 is returned.
188 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
189 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
190 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
192 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.
194 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
196 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
197 @param FormatString A Null-terminated ASCII format string.
198 @param ... Variable argument list whose contents are accessed based on the
199 format string specified by FormatString.
201 @return The number of Unicode characters in the produced output buffer not including the
207 (EFIAPI
*UNICODE_S_PRINT_ASCII_FORMAT
)(
208 OUT CHAR16
*StartOfBuffer
,
210 IN CONST CHAR8
*FormatString
,
215 Converts a decimal value to a Null-terminated Unicode string.
217 Converts the decimal number specified by Value to a Null-terminated Unicode
218 string specified by Buffer containing at most Width characters. No padding of spaces
219 is ever performed. If Width is 0, then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
220 This function returns the number of Unicode characters in Buffer, not including
222 If the conversion contains more than Width characters, this function returns
223 the first Width characters in the conversion, along with the total number of characters in the conversion.
224 Additional conversion parameters are specified in Flags.
226 The Flags bit LEFT_JUSTIFY is always ignored.
227 All conversions are left justified in Buffer.
228 If Width is 0, PREFIX_ZERO is ignored in Flags.
229 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
230 are inserted every 3rd digit starting from the right.
231 If RADIX_HEX is set in Flags, then the output buffer will be
232 formatted in hexadecimal format.
233 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
234 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
235 then Buffer is padded with '0' characters so the combination of the optional '-'
236 sign character, '0' characters, digit characters for Value, and the Null-terminator
237 add up to Width characters.
238 If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
239 If Buffer is NULL, then ASSERT().
240 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
241 If unsupported bits are set in Flags, then ASSERT().
242 If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
243 If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
245 @param Buffer The pointer to the output buffer for the produced Null-terminated
247 @param Flags The bitmask of flags that specify left justification, zero pad, and commas.
248 @param Value The 64-bit signed value to convert to a string.
249 @param Width The maximum number of Unicode characters to place in Buffer, not including
252 @return The number of Unicode characters in Buffer not including the Null-terminator.
257 (EFIAPI
*UNICODE_VALUE_TO_STRING
)(
258 IN OUT CHAR16
*Buffer
,
265 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
266 ASCII format string and a BASE_LIST argument list.
268 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
270 The ASCII string is produced by parsing the format string specified by FormatString.
271 Arguments are pulled from the variable argument list specified by Marker based on
272 the contents of the format string.
273 The number of ASCII characters in the produced output buffer is returned not including
276 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
277 unmodified and 0 is returned.
278 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
279 unmodified and 0 is returned.
280 If PcdMaximumAsciiStringLength is not zero, and BufferSize >
281 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
282 is unmodified and 0 is returned.
283 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
284 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
285 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
287 If BufferSize is 0, then no output buffer is produced and 0 is returned.
289 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
291 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
292 @param FormatString A Null-terminated ASCII format string.
293 @param Marker BASE_LIST marker for the variable argument list.
295 @return The number of ASCII characters in the produced output buffer not including the
301 (EFIAPI
*ASCII_BS_PRINT
)(
302 OUT CHAR8
*StartOfBuffer
,
304 IN CONST CHAR8
*FormatString
,
309 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
310 ASCII format string and variable argument list.
312 This function is similar as snprintf_s defined in C11.
314 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
316 The ASCII string is produced by parsing the format string specified by FormatString.
317 Arguments are pulled from the variable argument list based on the contents of the
319 The number of ASCII characters in the produced output buffer is returned not including
322 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
323 unmodified and 0 is returned.
324 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
325 unmodified and 0 is returned.
326 If PcdMaximumAsciiStringLength is not zero, and BufferSize >
327 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
328 is unmodified and 0 is returned.
329 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than
330 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then
331 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
333 If BufferSize is 0, then no output buffer is produced and 0 is returned.
335 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
337 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
338 @param FormatString A Null-terminated ASCII format string.
339 @param ... Variable argument list whose contents are accessed based on the
340 format string specified by FormatString.
342 @return The number of ASCII characters in the produced output buffer not including the
348 (EFIAPI
*ASCII_S_PRINT
)(
349 OUT CHAR8
*StartOfBuffer
,
351 IN CONST CHAR8
*FormatString
,
356 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
357 Unicode format string and a BASE_LIST argument list.
359 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
361 The ASCII string is produced by parsing the format string specified by FormatString.
362 Arguments are pulled from the variable argument list specified by Marker based on
363 the contents of the format string.
364 The number of ASCII characters in the produced output buffer is returned not including
367 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
369 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
370 unmodified and 0 is returned.
371 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
372 unmodified and 0 is returned.
373 If PcdMaximumAsciiStringLength is not zero, and BufferSize >
374 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
375 is unmodified and 0 is returned.
376 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
377 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
378 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
380 If BufferSize is 0, then no output buffer is produced and 0 is returned.
382 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
384 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
385 @param FormatString A Null-terminated Unicode format string.
386 @param Marker BASE_LIST marker for the variable argument list.
388 @return The number of ASCII characters in the produced output buffer not including the
394 (EFIAPI
*ASCII_BS_PRINT_UNICODE_FORMAT
)(
395 OUT CHAR8
*StartOfBuffer
,
397 IN CONST CHAR16
*FormatString
,
402 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated
403 Unicode format string and variable argument list.
405 This function is similar as snprintf_s defined in C11.
407 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer
409 The ASCII string is produced by parsing the format string specified by FormatString.
410 Arguments are pulled from the variable argument list based on the contents of the
412 The number of ASCII characters in the produced output buffer is returned not including
415 If FormatString is not aligned on a 16-bit boundary, then ASSERT().
417 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is
418 unmodified and 0 is returned.
419 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is
420 unmodified and 0 is returned.
421 If PcdMaximumAsciiStringLength is not zero, and BufferSize >
422 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer
423 is unmodified and 0 is returned.
424 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than
425 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then
426 ASSERT(). Also, the output buffer is unmodified and 0 is returned.
428 If BufferSize is 0, then no output buffer is produced and 0 is returned.
430 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated
432 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.
433 @param FormatString A Null-terminated Unicode format string.
434 @param ... Variable argument list whose contents are accessed based on the
435 format string specified by FormatString.
437 @return The number of ASCII characters in the produced output buffer not including the
443 (EFIAPI
*ASCII_S_PRINT_UNICODE_FORMAT
)(
444 OUT CHAR8
*StartOfBuffer
,
446 IN CONST CHAR16
*FormatString
,
451 Converts a decimal value to a Null-terminated ASCII string.
453 Converts the decimal number specified by Value to a Null-terminated ASCII string
454 specified by Buffer containing at most Width characters. No padding of spaces is ever performed.
455 If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.
456 The number of ASCII characters in Buffer is returned not including the Null-terminator.
457 If the conversion contains more than Width characters, then only the first Width
458 characters are returned, and the total number of characters required to perform
459 the conversion is returned.
460 Additional conversion parameters are specified in Flags.
461 The Flags bit LEFT_JUSTIFY is always ignored.
462 All conversions are left justified in Buffer.
463 If Width is 0, PREFIX_ZERO is ignored in Flags.
464 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas
465 are inserted every 3rd digit starting from the right.
466 If RADIX_HEX is set in Flags, then the output buffer will be
467 formatted in hexadecimal format.
468 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.
469 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,
470 then Buffer is padded with '0' characters so the combination of the optional '-'
471 sign character, '0' characters, digit characters for Value, and the Null-terminator
472 add up to Width characters.
474 If Buffer is NULL, then ASSERT().
475 If unsupported bits are set in Flags, then ASSERT().
476 If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().
477 If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()
479 @param Buffer The pointer to the output buffer for the produced Null-terminated
481 @param Flags The bitmask of flags that specify left justification, zero pad, and commas.
482 @param Value The 64-bit signed value to convert to a string.
483 @param Width The maximum number of ASCII characters to place in Buffer, not including
486 @return The number of ASCII characters in Buffer not including the Null-terminator.
491 (EFIAPI
*ASCII_VALUE_TO_STRING
)(
498 struct _EFI_PRINT2_PROTOCOL
{
499 UNICODE_BS_PRINT UnicodeBSPrint
;
500 UNICODE_S_PRINT UnicodeSPrint
;
501 UNICODE_BS_PRINT_ASCII_FORMAT UnicodeBSPrintAsciiFormat
;
502 UNICODE_S_PRINT_ASCII_FORMAT UnicodeSPrintAsciiFormat
;
503 UNICODE_VALUE_TO_STRING UnicodeValueToString
;
504 ASCII_BS_PRINT AsciiBSPrint
;
505 ASCII_S_PRINT AsciiSPrint
;
506 ASCII_BS_PRINT_UNICODE_FORMAT AsciiBSPrintUnicodeFormat
;
507 ASCII_S_PRINT_UNICODE_FORMAT AsciiSPrintUnicodeFormat
;
508 ASCII_VALUE_TO_STRING AsciiValueToString
;
511 extern EFI_GUID gEfiPrint2ProtocolGuid
;
514 #define EFI_PRINT2S_PROTOCOL_GUID \
515 { 0xcc252d2, 0xc106, 0x4661, { 0xb5, 0xbd, 0x31, 0x47, 0xa4, 0xf8, 0x1f, 0x92 } }
518 // Forward reference for pure ANSI compatability
520 typedef struct _EFI_PRINT2S_PROTOCOL EFI_PRINT2S_PROTOCOL
;
523 Converts a decimal value to a Null-terminated Unicode string.
525 Converts the decimal number specified by Value to a Null-terminated Unicode
526 string specified by Buffer containing at most Width characters. No padding of
527 spaces is ever performed. If Width is 0 then a width of
528 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than
529 Width characters, then only the first Width characters are placed in Buffer.
530 Additional conversion parameters are specified in Flags.
532 The Flags bit LEFT_JUSTIFY is always ignored.
533 All conversions are left justified in Buffer.
534 If Width is 0, PREFIX_ZERO is ignored in Flags.
535 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and
536 commas are inserted every 3rd digit starting from the right.
537 If RADIX_HEX is set in Flags, then the output buffer will be formatted in
539 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in
541 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then
542 Buffer is padded with '0' characters so the combination of the optional '-'
543 sign character, '0' characters, digit characters for Value, and the
544 Null-terminator add up to Width characters.
546 If Buffer is not aligned on a 16-bit boundary, then ASSERT().
547 If an error would be returned, then the function will also ASSERT().
549 @param Buffer The pointer to the output buffer for the produced
550 Null-terminated Unicode string.
551 @param BufferSize The size of Buffer in bytes, including the
553 @param Flags The bitmask of flags that specify left justification,
554 zero pad, and commas.
555 @param Value The 64-bit signed value to convert to a string.
556 @param Width The maximum number of Unicode characters to place in
557 Buffer, not including the Null-terminator.
559 @retval RETURN_SUCCESS The decimal value is converted.
560 @retval RETURN_BUFFER_TOO_SMALL If BufferSize cannot hold the converted
562 @retval RETURN_INVALID_PARAMETER If Buffer is NULL.
563 If PcdMaximumUnicodeStringLength is not
564 zero, and BufferSize is greater than
565 (PcdMaximumUnicodeStringLength *
566 sizeof (CHAR16) + 1).
567 If unsupported bits are set in Flags.
568 If both COMMA_TYPE and RADIX_HEX are set in
570 If Width >= MAXIMUM_VALUE_CHARACTERS.
575 (EFIAPI
*UNICODE_VALUE_TO_STRING_S
)(
576 IN OUT CHAR16
*Buffer
,
584 Converts a decimal value to a Null-terminated Ascii string.
586 Converts the decimal number specified by Value to a Null-terminated Ascii
587 string specified by Buffer containing at most Width characters. No padding of
588 spaces is ever performed. If Width is 0 then a width of
589 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than
590 Width characters, then only the first Width characters are placed in Buffer.
591 Additional conversion parameters are specified in Flags.
593 The Flags bit LEFT_JUSTIFY is always ignored.
594 All conversions are left justified in Buffer.
595 If Width is 0, PREFIX_ZERO is ignored in Flags.
596 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and
597 commas are inserted every 3rd digit starting from the right.
598 If RADIX_HEX is set in Flags, then the output buffer will be formatted in
600 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in
602 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then
603 Buffer is padded with '0' characters so the combination of the optional '-'
604 sign character, '0' characters, digit characters for Value, and the
605 Null-terminator add up to Width characters.
607 If an error would be returned, then the function will ASSERT().
609 @param Buffer The pointer to the output buffer for the produced
610 Null-terminated Ascii string.
611 @param BufferSize The size of Buffer in bytes, including the
613 @param Flags The bitmask of flags that specify left justification,
614 zero pad, and commas.
615 @param Value The 64-bit signed value to convert to a string.
616 @param Width The maximum number of Ascii characters to place in
617 Buffer, not including the Null-terminator.
619 @retval RETURN_SUCCESS The decimal value is converted.
620 @retval RETURN_BUFFER_TOO_SMALL If BufferSize cannot hold the converted
622 @retval RETURN_INVALID_PARAMETER If Buffer is NULL.
623 If PcdMaximumAsciiStringLength is not
624 zero, and BufferSize is greater than
625 PcdMaximumAsciiStringLength.
626 If unsupported bits are set in Flags.
627 If both COMMA_TYPE and RADIX_HEX are set in
629 If Width >= MAXIMUM_VALUE_CHARACTERS.
634 (EFIAPI
*ASCII_VALUE_TO_STRING_S
)(
635 IN OUT CHAR8
*Buffer
,
642 struct _EFI_PRINT2S_PROTOCOL
{
643 UNICODE_BS_PRINT UnicodeBSPrint
;
644 UNICODE_S_PRINT UnicodeSPrint
;
645 UNICODE_BS_PRINT_ASCII_FORMAT UnicodeBSPrintAsciiFormat
;
646 UNICODE_S_PRINT_ASCII_FORMAT UnicodeSPrintAsciiFormat
;
647 UNICODE_VALUE_TO_STRING_S UnicodeValueToStringS
;
648 ASCII_BS_PRINT AsciiBSPrint
;
649 ASCII_S_PRINT AsciiSPrint
;
650 ASCII_BS_PRINT_UNICODE_FORMAT AsciiBSPrintUnicodeFormat
;
651 ASCII_S_PRINT_UNICODE_FORMAT AsciiSPrintUnicodeFormat
;
652 ASCII_VALUE_TO_STRING_S AsciiValueToStringS
;
655 extern EFI_GUID gEfiPrint2SProtocolGuid
;