]> git.proxmox.com Git - mirror_edk2.git/blame_incremental - MdePkg/Include/Library/PrintLib.h
MdePkg/Include/Protocol/Tls.h: Add the data type of EfiTlsVerifyHost (CVE-2019-14553)
[mirror_edk2.git] / MdePkg / Include / Library / PrintLib.h
... / ...
CommitLineData
1/** @file\r
2 Provides services to print a formatted string to a buffer. All combinations of\r
3 Unicode and ASCII strings are supported.\r
4\r
5Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
6SPDX-License-Identifier: BSD-2-Clause-Patent\r
7\r
8 The Print Library functions provide a simple means to produce formatted output\r
9 strings. Many of the output functions use a format string to describe how to\r
10 format the output of variable arguments. The format string consists of normal\r
11 text and argument descriptors. There are no restrictions for how the normal\r
12 text and argument descriptors can be mixed. The following end of line(EOL)\r
13 translations must be performed on the contents of the format string:\r
14\r
15 - '\\r' is translated to '\\r'\r
16 - '\\r\\n' is translated to '\\r\\n'\r
17 - '\\n' is translated to '\\r\\n'\r
18 - '\\n\\r' is translated to '\\r\\n'\r
19\r
20 This does not follow the ANSI C standard for sprint(). The format of argument\r
21 descriptors is described below. The ANSI C standard for sprint() has been\r
22 followed for some of the format types, and has not been followed for others.\r
23 The exceptions are noted below.\r
24\r
25 %[flags][width][.precision]type\r
26\r
27 [flags]:\r
28 - -\r
29 - The field is left justified. If not flag is not specified, then the\r
30 field is right justified.\r
31 - space\r
32 - Prefix a space character to a number. Only valid for types X, x, and d.\r
33 - +\r
34 - Prefix a plus character to a number. Only valid for types X, x, and d.\r
35 If both space and + are specified, then space is ignored.\r
36 - 0\r
37 - Pad with 0 characters to the left of a number. Only valid for types\r
38 X, x, and d.\r
39 - ,\r
40 - Place a comma every 3rd digit of the number. Only valid for type d.\r
41 If 0 is also specified, then 0 is ignored.\r
42 - L, l\r
43 - The number being printed is size UINT64. Only valid for types X, x, and d.\r
44 If this flag is not specified, then the number being printed is size int.\r
45 - NOTE: All invalid flags are ignored.\r
46\r
47 [width]:\r
48\r
49 - *\r
50 - The width of the field is specified by a UINTN argument in the\r
51 argument list.\r
52 - number\r
53 - The number specified as a decimal value represents the width of\r
54 the field.\r
55 - NOTE: If [width] is not specified, then a field width of 0 is assumed.\r
56\r
57 [.precision]:\r
58\r
59 - *\r
60 - The precision of the field is specified by a UINTN argument in the\r
61 argument list.\r
62 - number\r
63 - The number specified as a decimal value represents the precision of\r
64 the field.\r
65 - NOTE: If [.precision] is not specified, then a precision of 0 is assumed.\r
66\r
67 type:\r
68\r
69 - %\r
70 - Print a %%.\r
71 - c\r
72 - The argument is a Unicode character. ASCII characters can be printed\r
73 using this type too by making sure bits 8..15 of the argument are set to 0.\r
74 - x\r
75 - The argument is an unsigned hexadecimal number. The characters used are 0..9 and\r
76 A..F. If the flag 'L' is not specified, then the argument is assumed\r
77 to be size int. This does not follow ANSI C.\r
78 - X\r
79 - The argument is an unsigned hexadecimal number and the number is padded with\r
80 zeros. This is equivalent to a format string of "0x". If the flag\r
81 'L' is not specified, then the argument is assumed to be size int.\r
82 This does not follow ANSI C.\r
83 - d\r
84 - The argument is a signed decimal number. If the flag 'L' is not specified,\r
85 then the argument is assumed to be size int.\r
86 - u\r
87 - The argument is a unsigned decimal number. If the flag 'L' is not specified,\r
88 then the argument is assumed to be size int.\r
89 - p\r
90 - The argument is a pointer that is a (VOID *), and it is printed as an\r
91 unsigned hexadecimal number The characters used are 0..9 and A..F.\r
92 - a\r
93 - The argument is a pointer to an ASCII string.\r
94 This does not follow ANSI C.\r
95 - S, s\r
96 - The argument is a pointer to a Unicode string.\r
97 This does not follow ANSI C.\r
98 - g\r
99 - The argument is a pointer to a GUID structure. The GUID is printed\r
100 in the format XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX.\r
101 This does not follow ANSI C.\r
102 - t\r
103 - The argument is a pointer to an EFI_TIME structure. The time and\r
104 date are printed in the format "mm/dd/yyyy hh:mm" where mm is the\r
105 month zero padded, dd is the day zero padded, yyyy is the year zero\r
106 padded, hh is the hour zero padded, and mm is minutes zero padded.\r
107 This does not follow ANSI C.\r
108 - r\r
109 - The argument is a RETURN_STATUS value. This value is converted to\r
110 a string following the table below. This does not follow ANSI C.\r
111 - RETURN_SUCCESS\r
112 - "Success"\r
113 - RETURN_LOAD_ERROR\r
114 - "Load Error"\r
115 - RETURN_INVALID_PARAMETER\r
116 - "Invalid Parameter"\r
117 - RETURN_UNSUPPORTED\r
118 - "Unsupported"\r
119 - RETURN_BAD_BUFFER_SIZE\r
120 - "Bad Buffer Size"\r
121 - RETURN_BUFFER_TOO_SMALL\r
122 - "Buffer Too Small"\r
123 - RETURN_NOT_READY\r
124 - "Not Ready"\r
125 - RETURN_DEVICE_ERROR\r
126 - "Device Error"\r
127 - RETURN_WRITE_PROTECTED\r
128 - "Write Protected"\r
129 - RETURN_OUT_OF_RESOURCES\r
130 - "Out of Resources"\r
131 - RETURN_VOLUME_CORRUPTED\r
132 - "Volume Corrupt"\r
133 - RETURN_VOLUME_FULL\r
134 - "Volume Full"\r
135 - RETURN_NO_MEDIA\r
136 - "No Media"\r
137 - RETURN_MEDIA_CHANGED\r
138 - "Media changed"\r
139 - RETURN_NOT_FOUND\r
140 - "Not Found"\r
141 - RETURN_ACCESS_DENIED\r
142 - "Access Denied"\r
143 - RETURN_NO_RESPONSE\r
144 - "No Response"\r
145 - RETURN_NO_MAPPING\r
146 - "No mapping"\r
147 - RETURN_TIMEOUT\r
148 - "Time out"\r
149 - RETURN_NOT_STARTED\r
150 - "Not started"\r
151 - RETURN_ALREADY_STARTED\r
152 - "Already started"\r
153 - RETURN_ABORTED\r
154 - "Aborted"\r
155 - RETURN_ICMP_ERROR\r
156 - "ICMP Error"\r
157 - RETURN_TFTP_ERROR\r
158 - "TFTP Error"\r
159 - RETURN_PROTOCOL_ERROR\r
160 - "Protocol Error"\r
161 - RETURN_WARN_UNKNOWN_GLYPH\r
162 - "Warning Unknown Glyph"\r
163 - RETURN_WARN_DELETE_FAILURE\r
164 - "Warning Delete Failure"\r
165 - RETURN_WARN_WRITE_FAILURE\r
166 - "Warning Write Failure"\r
167 - RETURN_WARN_BUFFER_TOO_SMALL\r
168 - "Warning Buffer Too Small"\r
169\r
170**/\r
171\r
172#ifndef __PRINT_LIB_H__\r
173#define __PRINT_LIB_H__\r
174\r
175///\r
176/// Define the maximum number of characters that are required to\r
177/// encode with a NULL terminator a decimal, hexadecimal, GUID,\r
178/// or TIME value.\r
179///\r
180/// Maximum Length Decimal String = 28\r
181/// "-9,223,372,036,854,775,808"\r
182/// Maximum Length Hexadecimal String = 17\r
183/// "FFFFFFFFFFFFFFFF"\r
184/// Maximum Length GUID = 37\r
185/// "00000000-0000-0000-0000-000000000000"\r
186/// Maximum Length TIME = 18\r
187/// "12/12/2006 12:12"\r
188///\r
189#define MAXIMUM_VALUE_CHARACTERS 38\r
190\r
191///\r
192/// Flags bitmask values use in UnicodeValueToString() and\r
193/// AsciiValueToString()\r
194///\r
195#define LEFT_JUSTIFY 0x01\r
196#define COMMA_TYPE 0x08\r
197#define PREFIX_ZERO 0x20\r
198#define RADIX_HEX 0x80\r
199\r
200/**\r
201 Produces a Null-terminated Unicode string in an output buffer based on\r
202 a Null-terminated Unicode format string and a VA_LIST argument list.\r
203\r
204 This function is similar as vsnprintf_s defined in C11.\r
205\r
206 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
207 and BufferSize.\r
208 The Unicode string is produced by parsing the format string specified by FormatString.\r
209 Arguments are pulled from the variable argument list specified by Marker based on the\r
210 contents of the format string.\r
211 The number of Unicode characters in the produced output buffer is returned not including\r
212 the Null-terminator.\r
213\r
214 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
215 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
216\r
217 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
218 unmodified and 0 is returned.\r
219 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
220 unmodified and 0 is returned.\r
221 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >\r
222 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output\r
223 buffer is unmodified and 0 is returned.\r
224 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
225 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
226 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
227\r
228 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.\r
229\r
230 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
231 Unicode string.\r
232 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
233 @param FormatString A Null-terminated Unicode format string.\r
234 @param Marker VA_LIST marker for the variable argument list.\r
235\r
236 @return The number of Unicode characters in the produced output buffer not including the\r
237 Null-terminator.\r
238\r
239**/\r
240UINTN\r
241EFIAPI\r
242UnicodeVSPrint (\r
243 OUT CHAR16 *StartOfBuffer,\r
244 IN UINTN BufferSize,\r
245 IN CONST CHAR16 *FormatString,\r
246 IN VA_LIST Marker\r
247 );\r
248\r
249/**\r
250 Produces a Null-terminated Unicode string in an output buffer based on\r
251 a Null-terminated Unicode format string and a BASE_LIST argument list.\r
252\r
253 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
254 and BufferSize.\r
255 The Unicode string is produced by parsing the format string specified by FormatString.\r
256 Arguments are pulled from the variable argument list specified by Marker based on the\r
257 contents of the format string.\r
258 The number of Unicode characters in the produced output buffer is returned not including\r
259 the Null-terminator.\r
260\r
261 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
262 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
263\r
264 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
265 unmodified and 0 is returned.\r
266 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
267 unmodified and 0 is returned.\r
268 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >\r
269 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output\r
270 buffer is unmodified and 0 is returned.\r
271 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
272 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
273 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
274\r
275 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.\r
276\r
277 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
278 Unicode string.\r
279 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
280 @param FormatString A Null-terminated Unicode format string.\r
281 @param Marker BASE_LIST marker for the variable argument list.\r
282\r
283 @return The number of Unicode characters in the produced output buffer not including the\r
284 Null-terminator.\r
285\r
286**/\r
287UINTN\r
288EFIAPI\r
289UnicodeBSPrint (\r
290 OUT CHAR16 *StartOfBuffer,\r
291 IN UINTN BufferSize,\r
292 IN CONST CHAR16 *FormatString,\r
293 IN BASE_LIST Marker\r
294 );\r
295\r
296/**\r
297 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r
298 Unicode format string and variable argument list.\r
299\r
300 This function is similar as snprintf_s defined in C11.\r
301\r
302 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
303 and BufferSize.\r
304 The Unicode string is produced by parsing the format string specified by FormatString.\r
305 Arguments are pulled from the variable argument list based on the contents of the format string.\r
306 The number of Unicode characters in the produced output buffer is returned not including\r
307 the Null-terminator.\r
308\r
309 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
310 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
311\r
312 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
313 unmodified and 0 is returned.\r
314 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
315 unmodified and 0 is returned.\r
316 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >\r
317 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output\r
318 buffer is unmodified and 0 is returned.\r
319 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
320 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
321 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
322\r
323 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned.\r
324\r
325 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
326 Unicode string.\r
327 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
328 @param FormatString A Null-terminated Unicode format string.\r
329 @param ... Variable argument list whose contents are accessed based on the\r
330 format string specified by FormatString.\r
331\r
332 @return The number of Unicode characters in the produced output buffer not including the\r
333 Null-terminator.\r
334\r
335**/\r
336UINTN\r
337EFIAPI\r
338UnicodeSPrint (\r
339 OUT CHAR16 *StartOfBuffer,\r
340 IN UINTN BufferSize,\r
341 IN CONST CHAR16 *FormatString,\r
342 ...\r
343 );\r
344\r
345/**\r
346 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r
347 ASCII format string and a VA_LIST argument list.\r
348\r
349 This function is similar as vsnprintf_s defined in C11.\r
350\r
351 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
352 and BufferSize.\r
353 The Unicode string is produced by parsing the format string specified by FormatString.\r
354 Arguments are pulled from the variable argument list specified by Marker based on the\r
355 contents of the format string.\r
356 The number of Unicode characters in the produced output buffer is returned not including\r
357 the Null-terminator.\r
358\r
359 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
360\r
361 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
362 unmodified and 0 is returned.\r
363 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
364 unmodified and 0 is returned.\r
365 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >\r
366 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output\r
367 buffer is unmodified and 0 is returned.\r
368 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
369 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then\r
370 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
371\r
372 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
373\r
374 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
375 Unicode string.\r
376 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
377 @param FormatString A Null-terminated ASCII format string.\r
378 @param Marker VA_LIST marker for the variable argument list.\r
379\r
380 @return The number of Unicode characters in the produced output buffer not including the\r
381 Null-terminator.\r
382\r
383**/\r
384UINTN\r
385EFIAPI\r
386UnicodeVSPrintAsciiFormat (\r
387 OUT CHAR16 *StartOfBuffer,\r
388 IN UINTN BufferSize,\r
389 IN CONST CHAR8 *FormatString,\r
390 IN VA_LIST Marker\r
391 );\r
392\r
393/**\r
394 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r
395 ASCII format string and a BASE_LIST argument list.\r
396\r
397 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
398 and BufferSize.\r
399 The Unicode string is produced by parsing the format string specified by FormatString.\r
400 Arguments are pulled from the variable argument list specified by Marker based on the\r
401 contents of the format string.\r
402 The number of Unicode characters in the produced output buffer is returned not including\r
403 the Null-terminator.\r
404\r
405 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
406\r
407 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
408 unmodified and 0 is returned.\r
409 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
410 unmodified and 0 is returned.\r
411 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >\r
412 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output\r
413 buffer is unmodified and 0 is returned.\r
414 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
415 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then\r
416 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
417\r
418 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
419\r
420 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
421 Unicode string.\r
422 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
423 @param FormatString A Null-terminated ASCII format string.\r
424 @param Marker BASE_LIST marker for the variable argument list.\r
425\r
426 @return The number of Unicode characters in the produced output buffer not including the\r
427 Null-terminator.\r
428\r
429**/\r
430UINTN\r
431EFIAPI\r
432UnicodeBSPrintAsciiFormat (\r
433 OUT CHAR16 *StartOfBuffer,\r
434 IN UINTN BufferSize,\r
435 IN CONST CHAR8 *FormatString,\r
436 IN BASE_LIST Marker\r
437 );\r
438\r
439/**\r
440 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r
441 ASCII format string and variable argument list.\r
442\r
443 This function is similar as snprintf_s defined in C11.\r
444\r
445 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r
446 and BufferSize.\r
447 The Unicode string is produced by parsing the format string specified by FormatString.\r
448 Arguments are pulled from the variable argument list based on the contents of the\r
449 format string.\r
450 The number of Unicode characters in the produced output buffer is returned not including\r
451 the Null-terminator.\r
452\r
453 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r
454\r
455 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
456 unmodified and 0 is returned.\r
457 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
458 unmodified and 0 is returned.\r
459 If PcdMaximumUnicodeStringLength is not zero, and BufferSize >\r
460 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output\r
461 buffer is unmodified and 0 is returned.\r
462 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
463 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then\r
464 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
465\r
466 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r
467\r
468 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
469 Unicode string.\r
470 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
471 @param FormatString A Null-terminated ASCII format string.\r
472 @param ... Variable argument list whose contents are accessed based on the\r
473 format string specified by FormatString.\r
474\r
475 @return The number of Unicode characters in the produced output buffer not including the\r
476 Null-terminator.\r
477\r
478**/\r
479UINTN\r
480EFIAPI\r
481UnicodeSPrintAsciiFormat (\r
482 OUT CHAR16 *StartOfBuffer,\r
483 IN UINTN BufferSize,\r
484 IN CONST CHAR8 *FormatString,\r
485 ...\r
486 );\r
487\r
488#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
489\r
490/**\r
491 [ATTENTION] This function is deprecated for security reason.\r
492\r
493 Converts a decimal value to a Null-terminated Unicode string.\r
494\r
495 Converts the decimal number specified by Value to a Null-terminated Unicode\r
496 string specified by Buffer containing at most Width characters. No padding of spaces\r
497 is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.\r
498 The number of Unicode characters in Buffer is returned, not including the Null-terminator.\r
499 If the conversion contains more than Width characters, then only the first\r
500 Width characters are returned, and the total number of characters\r
501 required to perform the conversion is returned.\r
502 Additional conversion parameters are specified in Flags.\r
503\r
504 The Flags bit LEFT_JUSTIFY is always ignored.\r
505 All conversions are left justified in Buffer.\r
506 If Width is 0, PREFIX_ZERO is ignored in Flags.\r
507 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas\r
508 are inserted every 3rd digit starting from the right.\r
509 If RADIX_HEX is set in Flags, then the output buffer will be\r
510 formatted in hexadecimal format.\r
511 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.\r
512 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,\r
513 then Buffer is padded with '0' characters so the combination of the optional '-'\r
514 sign character, '0' characters, digit characters for Value, and the Null-terminator\r
515 add up to Width characters.\r
516 If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().\r
517 If Buffer is NULL, then ASSERT().\r
518 If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
519 If unsupported bits are set in Flags, then ASSERT().\r
520 If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().\r
521 If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()\r
522\r
523 @param Buffer The pointer to the output buffer for the produced Null-terminated\r
524 Unicode string.\r
525 @param Flags The bitmask of flags that specify left justification, zero pad, and commas.\r
526 @param Value The 64-bit signed value to convert to a string.\r
527 @param Width The maximum number of Unicode characters to place in Buffer, not including\r
528 the Null-terminator.\r
529\r
530 @return The number of Unicode characters in Buffer, not including the Null-terminator.\r
531\r
532**/\r
533UINTN\r
534EFIAPI\r
535UnicodeValueToString (\r
536 IN OUT CHAR16 *Buffer,\r
537 IN UINTN Flags,\r
538 IN INT64 Value,\r
539 IN UINTN Width\r
540 );\r
541\r
542#endif\r
543\r
544/**\r
545 Converts a decimal value to a Null-terminated Unicode string.\r
546\r
547 Converts the decimal number specified by Value to a Null-terminated Unicode\r
548 string specified by Buffer containing at most Width characters. No padding of\r
549 spaces is ever performed. If Width is 0 then a width of\r
550 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than\r
551 Width characters, then only the first Width characters are placed in Buffer.\r
552 Additional conversion parameters are specified in Flags.\r
553\r
554 The Flags bit LEFT_JUSTIFY is always ignored.\r
555 All conversions are left justified in Buffer.\r
556 If Width is 0, PREFIX_ZERO is ignored in Flags.\r
557 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and\r
558 commas are inserted every 3rd digit starting from the right.\r
559 If RADIX_HEX is set in Flags, then the output buffer will be formatted in\r
560 hexadecimal format.\r
561 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in\r
562 Buffer is a '-'.\r
563 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then\r
564 Buffer is padded with '0' characters so the combination of the optional '-'\r
565 sign character, '0' characters, digit characters for Value, and the\r
566 Null-terminator add up to Width characters.\r
567\r
568 If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r
569 If an error would be returned, then the function will also ASSERT().\r
570\r
571 @param Buffer The pointer to the output buffer for the produced\r
572 Null-terminated Unicode string.\r
573 @param BufferSize The size of Buffer in bytes, including the\r
574 Null-terminator.\r
575 @param Flags The bitmask of flags that specify left justification,\r
576 zero pad, and commas.\r
577 @param Value The 64-bit signed value to convert to a string.\r
578 @param Width The maximum number of Unicode characters to place in\r
579 Buffer, not including the Null-terminator.\r
580\r
581 @retval RETURN_SUCCESS The decimal value is converted.\r
582 @retval RETURN_BUFFER_TOO_SMALL If BufferSize cannot hold the converted\r
583 value.\r
584 @retval RETURN_INVALID_PARAMETER If Buffer is NULL.\r
585 If PcdMaximumUnicodeStringLength is not\r
586 zero, and BufferSize is greater than\r
587 (PcdMaximumUnicodeStringLength *\r
588 sizeof (CHAR16) + 1).\r
589 If unsupported bits are set in Flags.\r
590 If both COMMA_TYPE and RADIX_HEX are set in\r
591 Flags.\r
592 If Width >= MAXIMUM_VALUE_CHARACTERS.\r
593\r
594**/\r
595RETURN_STATUS\r
596EFIAPI\r
597UnicodeValueToStringS (\r
598 IN OUT CHAR16 *Buffer,\r
599 IN UINTN BufferSize,\r
600 IN UINTN Flags,\r
601 IN INT64 Value,\r
602 IN UINTN Width\r
603 );\r
604\r
605/**\r
606 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
607 ASCII format string and a VA_LIST argument list.\r
608\r
609 This function is similar as vsnprintf_s defined in C11.\r
610\r
611 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
612 and BufferSize.\r
613 The ASCII string is produced by parsing the format string specified by FormatString.\r
614 Arguments are pulled from the variable argument list specified by Marker based on\r
615 the contents of the format string.\r
616 The number of ASCII characters in the produced output buffer is returned not including\r
617 the Null-terminator.\r
618\r
619 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
620 unmodified and 0 is returned.\r
621 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
622 unmodified and 0 is returned.\r
623 If PcdMaximumAsciiStringLength is not zero, and BufferSize >\r
624 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer\r
625 is unmodified and 0 is returned.\r
626 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
627 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then\r
628 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
629\r
630 If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
631\r
632 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
633 ASCII string.\r
634 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
635 @param FormatString A Null-terminated ASCII format string.\r
636 @param Marker VA_LIST marker for the variable argument list.\r
637\r
638 @return The number of ASCII characters in the produced output buffer not including the\r
639 Null-terminator.\r
640\r
641**/\r
642UINTN\r
643EFIAPI\r
644AsciiVSPrint (\r
645 OUT CHAR8 *StartOfBuffer,\r
646 IN UINTN BufferSize,\r
647 IN CONST CHAR8 *FormatString,\r
648 IN VA_LIST Marker\r
649 );\r
650\r
651/**\r
652 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
653 ASCII format string and a BASE_LIST argument list.\r
654\r
655 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
656 and BufferSize.\r
657 The ASCII string is produced by parsing the format string specified by FormatString.\r
658 Arguments are pulled from the variable argument list specified by Marker based on\r
659 the contents of the format string.\r
660 The number of ASCII characters in the produced output buffer is returned not including\r
661 the Null-terminator.\r
662\r
663 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
664 unmodified and 0 is returned.\r
665 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
666 unmodified and 0 is returned.\r
667 If PcdMaximumAsciiStringLength is not zero, and BufferSize >\r
668 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer\r
669 is unmodified and 0 is returned.\r
670 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
671 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then\r
672 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
673\r
674 If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
675\r
676 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
677 ASCII string.\r
678 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
679 @param FormatString A Null-terminated ASCII format string.\r
680 @param Marker BASE_LIST marker for the variable argument list.\r
681\r
682 @return The number of ASCII characters in the produced output buffer not including the\r
683 Null-terminator.\r
684\r
685**/\r
686UINTN\r
687EFIAPI\r
688AsciiBSPrint (\r
689 OUT CHAR8 *StartOfBuffer,\r
690 IN UINTN BufferSize,\r
691 IN CONST CHAR8 *FormatString,\r
692 IN BASE_LIST Marker\r
693 );\r
694\r
695/**\r
696 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
697 ASCII format string and variable argument list.\r
698\r
699 This function is similar as snprintf_s defined in C11.\r
700\r
701 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
702 and BufferSize.\r
703 The ASCII string is produced by parsing the format string specified by FormatString.\r
704 Arguments are pulled from the variable argument list based on the contents of the\r
705 format string.\r
706 The number of ASCII characters in the produced output buffer is returned not including\r
707 the Null-terminator.\r
708\r
709 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
710 unmodified and 0 is returned.\r
711 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
712 unmodified and 0 is returned.\r
713 If PcdMaximumAsciiStringLength is not zero, and BufferSize >\r
714 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer\r
715 is unmodified and 0 is returned.\r
716 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r
717 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then\r
718 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
719\r
720 If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
721\r
722 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
723 ASCII string.\r
724 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
725 @param FormatString A Null-terminated ASCII format string.\r
726 @param ... Variable argument list whose contents are accessed based on the\r
727 format string specified by FormatString.\r
728\r
729 @return The number of ASCII characters in the produced output buffer not including the\r
730 Null-terminator.\r
731\r
732**/\r
733UINTN\r
734EFIAPI\r
735AsciiSPrint (\r
736 OUT CHAR8 *StartOfBuffer,\r
737 IN UINTN BufferSize,\r
738 IN CONST CHAR8 *FormatString,\r
739 ...\r
740 );\r
741\r
742/**\r
743 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
744 Unicode format string and a VA_LIST argument list.\r
745\r
746 This function is similar as vsnprintf_s defined in C11.\r
747\r
748 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
749 and BufferSize.\r
750 The ASCII string is produced by parsing the format string specified by FormatString.\r
751 Arguments are pulled from the variable argument list specified by Marker based on\r
752 the contents of the format string.\r
753 The number of ASCII characters in the produced output buffer is returned not including\r
754 the Null-terminator.\r
755\r
756 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
757\r
758 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
759 unmodified and 0 is returned.\r
760 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
761 unmodified and 0 is returned.\r
762 If PcdMaximumAsciiStringLength is not zero, and BufferSize >\r
763 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer\r
764 is unmodified and 0 is returned.\r
765 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
766 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
767 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
768\r
769 If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
770\r
771 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
772 ASCII string.\r
773 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
774 @param FormatString A Null-terminated Unicode format string.\r
775 @param Marker VA_LIST marker for the variable argument list.\r
776\r
777 @return The number of ASCII characters in the produced output buffer not including the\r
778 Null-terminator.\r
779\r
780**/\r
781UINTN\r
782EFIAPI\r
783AsciiVSPrintUnicodeFormat (\r
784 OUT CHAR8 *StartOfBuffer,\r
785 IN UINTN BufferSize,\r
786 IN CONST CHAR16 *FormatString,\r
787 IN VA_LIST Marker\r
788 );\r
789\r
790/**\r
791 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
792 Unicode format string and a BASE_LIST argument list.\r
793\r
794 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
795 and BufferSize.\r
796 The ASCII string is produced by parsing the format string specified by FormatString.\r
797 Arguments are pulled from the variable argument list specified by Marker based on\r
798 the contents of the format string.\r
799 The number of ASCII characters in the produced output buffer is returned not including\r
800 the Null-terminator.\r
801\r
802 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
803\r
804 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
805 unmodified and 0 is returned.\r
806 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
807 unmodified and 0 is returned.\r
808 If PcdMaximumAsciiStringLength is not zero, and BufferSize >\r
809 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer\r
810 is unmodified and 0 is returned.\r
811 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
812 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
813 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
814\r
815 If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
816\r
817 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
818 ASCII string.\r
819 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
820 @param FormatString A Null-terminated Unicode format string.\r
821 @param Marker BASE_LIST marker for the variable argument list.\r
822\r
823 @return The number of ASCII characters in the produced output buffer not including the\r
824 Null-terminator.\r
825\r
826**/\r
827UINTN\r
828EFIAPI\r
829AsciiBSPrintUnicodeFormat (\r
830 OUT CHAR8 *StartOfBuffer,\r
831 IN UINTN BufferSize,\r
832 IN CONST CHAR16 *FormatString,\r
833 IN BASE_LIST Marker\r
834 );\r
835\r
836/**\r
837 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r
838 Unicode format string and variable argument list.\r
839\r
840 This function is similar as snprintf_s defined in C11.\r
841\r
842 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r
843 and BufferSize.\r
844 The ASCII string is produced by parsing the format string specified by FormatString.\r
845 Arguments are pulled from the variable argument list based on the contents of the\r
846 format string.\r
847 The number of ASCII characters in the produced output buffer is returned not including\r
848 the Null-terminator.\r
849\r
850 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
851\r
852 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is\r
853 unmodified and 0 is returned.\r
854 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is\r
855 unmodified and 0 is returned.\r
856 If PcdMaximumAsciiStringLength is not zero, and BufferSize >\r
857 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer\r
858 is unmodified and 0 is returned.\r
859 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r
860 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r
861 ASSERT(). Also, the output buffer is unmodified and 0 is returned.\r
862\r
863 If BufferSize is 0, then no output buffer is produced and 0 is returned.\r
864\r
865 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated\r
866 ASCII string.\r
867 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r
868 @param FormatString A Null-terminated Unicode format string.\r
869 @param ... Variable argument list whose contents are accessed based on the\r
870 format string specified by FormatString.\r
871\r
872 @return The number of ASCII characters in the produced output buffer not including the\r
873 Null-terminator.\r
874\r
875**/\r
876UINTN\r
877EFIAPI\r
878AsciiSPrintUnicodeFormat (\r
879 OUT CHAR8 *StartOfBuffer,\r
880 IN UINTN BufferSize,\r
881 IN CONST CHAR16 *FormatString,\r
882 ...\r
883 );\r
884\r
885#ifndef DISABLE_NEW_DEPRECATED_INTERFACES\r
886\r
887/**\r
888 [ATTENTION] This function is deprecated for security reason.\r
889\r
890 Converts a decimal value to a Null-terminated ASCII string.\r
891\r
892 Converts the decimal number specified by Value to a Null-terminated ASCII string\r
893 specified by Buffer containing at most Width characters. No padding of spaces\r
894 is ever performed.\r
895 If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.\r
896 The number of ASCII characters in Buffer is returned, not including the Null-terminator.\r
897 If the conversion contains more than Width characters, then only the first Width\r
898 characters are returned, and the total number of characters required to perform\r
899 the conversion is returned.\r
900 Additional conversion parameters are specified in Flags.\r
901 The Flags bit LEFT_JUSTIFY is always ignored.\r
902 All conversions are left justified in Buffer.\r
903 If Width is 0, PREFIX_ZERO is ignored in Flags.\r
904 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas\r
905 are inserted every 3rd digit starting from the right.\r
906 If RADIX_HEX is set in Flags, then the output buffer will be\r
907 formatted in hexadecimal format.\r
908 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'.\r
909 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored,\r
910 then Buffer is padded with '0' characters so the combination of the optional '-'\r
911 sign character, '0' characters, digit characters for Value, and the Null-terminator\r
912 add up to Width characters.\r
913\r
914 If Buffer is NULL, then ASSERT().\r
915 If unsupported bits are set in Flags, then ASSERT().\r
916 If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT().\r
917 If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()\r
918\r
919 @param Buffer A pointer to the output buffer for the produced Null-terminated\r
920 ASCII string.\r
921 @param Flags The bitmask of flags that specify left justification, zero pad, and commas.\r
922 @param Value The 64-bit signed value to convert to a string.\r
923 @param Width The maximum number of ASCII characters to place in Buffer, not including\r
924 the Null-terminator.\r
925\r
926 @return The number of ASCII characters in Buffer, not including the Null-terminator.\r
927\r
928**/\r
929UINTN\r
930EFIAPI\r
931AsciiValueToString (\r
932 OUT CHAR8 *Buffer,\r
933 IN UINTN Flags,\r
934 IN INT64 Value,\r
935 IN UINTN Width\r
936 );\r
937\r
938#endif\r
939\r
940/**\r
941 Converts a decimal value to a Null-terminated Ascii string.\r
942\r
943 Converts the decimal number specified by Value to a Null-terminated Ascii\r
944 string specified by Buffer containing at most Width characters. No padding of\r
945 spaces is ever performed. If Width is 0 then a width of\r
946 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than\r
947 Width characters, then only the first Width characters are placed in Buffer.\r
948 Additional conversion parameters are specified in Flags.\r
949\r
950 The Flags bit LEFT_JUSTIFY is always ignored.\r
951 All conversions are left justified in Buffer.\r
952 If Width is 0, PREFIX_ZERO is ignored in Flags.\r
953 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and\r
954 commas are inserted every 3rd digit starting from the right.\r
955 If RADIX_HEX is set in Flags, then the output buffer will be formatted in\r
956 hexadecimal format.\r
957 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in\r
958 Buffer is a '-'.\r
959 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then\r
960 Buffer is padded with '0' characters so the combination of the optional '-'\r
961 sign character, '0' characters, digit characters for Value, and the\r
962 Null-terminator add up to Width characters.\r
963\r
964 If an error would be returned, then the function will ASSERT().\r
965\r
966 @param Buffer The pointer to the output buffer for the produced\r
967 Null-terminated Ascii string.\r
968 @param BufferSize The size of Buffer in bytes, including the\r
969 Null-terminator.\r
970 @param Flags The bitmask of flags that specify left justification,\r
971 zero pad, and commas.\r
972 @param Value The 64-bit signed value to convert to a string.\r
973 @param Width The maximum number of Ascii characters to place in\r
974 Buffer, not including the Null-terminator.\r
975\r
976 @retval RETURN_SUCCESS The decimal value is converted.\r
977 @retval RETURN_BUFFER_TOO_SMALL If BufferSize cannot hold the converted\r
978 value.\r
979 @retval RETURN_INVALID_PARAMETER If Buffer is NULL.\r
980 If PcdMaximumAsciiStringLength is not\r
981 zero, and BufferSize is greater than\r
982 PcdMaximumAsciiStringLength.\r
983 If unsupported bits are set in Flags.\r
984 If both COMMA_TYPE and RADIX_HEX are set in\r
985 Flags.\r
986 If Width >= MAXIMUM_VALUE_CHARACTERS.\r
987\r
988**/\r
989RETURN_STATUS\r
990EFIAPI\r
991AsciiValueToStringS (\r
992 IN OUT CHAR8 *Buffer,\r
993 IN UINTN BufferSize,\r
994 IN UINTN Flags,\r
995 IN INT64 Value,\r
996 IN UINTN Width\r
997 );\r
998\r
999/**\r
1000 Returns the number of characters that would be produced by if the formatted\r
1001 output were produced not including the Null-terminator.\r
1002\r
1003 If FormatString is not aligned on a 16-bit boundary, then ASSERT().\r
1004\r
1005 If FormatString is NULL, then ASSERT() and 0 is returned.\r
1006 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more\r
1007 than PcdMaximumUnicodeStringLength Unicode characters not including the\r
1008 Null-terminator, then ASSERT() and 0 is returned.\r
1009\r
1010 @param[in] FormatString A Null-terminated Unicode format string.\r
1011 @param[in] Marker VA_LIST marker for the variable argument list.\r
1012\r
1013 @return The number of characters that would be produced, not including the\r
1014 Null-terminator.\r
1015**/\r
1016UINTN\r
1017EFIAPI\r
1018SPrintLength (\r
1019 IN CONST CHAR16 *FormatString,\r
1020 IN VA_LIST Marker\r
1021 );\r
1022\r
1023/**\r
1024 Returns the number of characters that would be produced by if the formatted\r
1025 output were produced not including the Null-terminator.\r
1026\r
1027 If FormatString is NULL, then ASSERT() and 0 is returned.\r
1028 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more\r
1029 than PcdMaximumAsciiStringLength Ascii characters not including the\r
1030 Null-terminator, then ASSERT() and 0 is returned.\r
1031\r
1032 @param[in] FormatString A Null-terminated ASCII format string.\r
1033 @param[in] Marker VA_LIST marker for the variable argument list.\r
1034\r
1035 @return The number of characters that would be produced, not including the\r
1036 Null-terminator.\r
1037**/\r
1038UINTN\r
1039EFIAPI\r
1040SPrintLengthAsciiFormat (\r
1041 IN CONST CHAR8 *FormatString,\r
1042 IN VA_LIST Marker\r
1043 );\r
1044\r
1045#endif\r