]>
Commit | Line | Data |
---|---|---|
217697af | 1 | /** @file\r |
2 | \r | |
3 | This print protocol defines six basic print functions to \r | |
4 | print the format unicode and ascii string.\r | |
5 | \r | |
e996a8c9 | 6 | Copyright (c) 2006 - 2009, Intel Corporation\r |
217697af | 7 | All rights reserved. This program and the accompanying materials\r |
8 | are licensed and made available under the terms and conditions of the BSD License\r | |
9 | which accompanies this distribution. The full text of the license may be found at\r | |
10 | http://opensource.org/licenses/bsd-license.php\r | |
11 | \r | |
12 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
13 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
14 | \r | |
15 | **/\r | |
16 | \r | |
17 | #ifndef __PPRINT2_H__\r | |
18 | #define __PPRINT2_H__\r | |
19 | \r | |
2b4d6ac8 | 20 | #define EFI_PRINT2_PROTOCOL_GUID \\r |
217697af | 21 | { 0x5bcc3dbc, 0x8c57, 0x450a, { 0xbb, 0xc, 0xa1, 0xc0, 0xbd, 0xde, 0x48, 0xc } }\r |
22 | \r | |
23 | //\r | |
24 | // Forward reference for pure ANSI compatability\r | |
25 | //\r | |
26 | typedef struct _EFI_PRINT2_PROTOCOL EFI_PRINT2_PROTOCOL;\r | |
27 | \r | |
28 | /**\r | |
29 | Produces a Null-terminated Unicode string in an output buffer based on \r | |
30 | a Null-terminated Unicode format string and a VA_LIST argument list\r | |
31 | \r | |
32 | Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r | |
33 | and BufferSize. \r | |
34 | The Unicode string is produced by parsing the format string specified by FormatString. \r | |
35 | Arguments are pulled from the variable argument list specified by Marker based on the \r | |
36 | contents of the format string. \r | |
37 | The number of Unicode characters in the produced output buffer is returned not including\r | |
38 | the Null-terminator.\r | |
39 | If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r | |
40 | \r | |
41 | If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r | |
42 | If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r | |
43 | If BufferSize > 1 and FormatString is NULL, then ASSERT().\r | |
44 | If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r | |
45 | If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r | |
46 | PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r | |
47 | ASSERT().\r | |
48 | If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r | |
49 | contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r | |
50 | Null-terminator, then ASSERT().\r | |
51 | \r | |
52 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
53 | Unicode string.\r | |
54 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
55 | @param FormatString Null-terminated Unicode format string.\r | |
56 | @param Marker VA_LIST marker for the variable argument list.\r | |
57 | \r | |
58 | @return The number of Unicode characters in the produced output buffer not including the\r | |
59 | Null-terminator.\r | |
60 | \r | |
61 | **/\r | |
62 | typedef\r | |
63 | UINTN\r | |
e996a8c9 | 64 | (EFIAPI *UNICODE_VS_PRINT) (\r |
217697af | 65 | OUT CHAR16 *StartOfBuffer,\r |
66 | IN UINTN BufferSize,\r | |
67 | IN CONST CHAR16 *FormatString,\r | |
68 | IN VA_LIST Marker\r | |
69 | );\r | |
70 | \r | |
e996a8c9 | 71 | /**\r |
72 | Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated \r | |
73 | Unicode format string and variable argument list.\r | |
74 | \r | |
75 | Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r | |
76 | and BufferSize.\r | |
77 | The Unicode string is produced by parsing the format string specified by FormatString.\r | |
78 | Arguments are pulled from the variable argument list based on the contents of the format string.\r | |
79 | The number of Unicode characters in the produced output buffer is returned not including\r | |
80 | the Null-terminator.\r | |
81 | If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r | |
82 | \r | |
83 | If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r | |
84 | If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r | |
85 | If BufferSize > 1 and FormatString is NULL, then ASSERT().\r | |
86 | If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r | |
87 | If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than \r | |
88 | PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r | |
89 | ASSERT().\r | |
90 | If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r | |
91 | contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r | |
92 | Null-terminator, then ASSERT().\r | |
93 | \r | |
94 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
95 | Unicode string.\r | |
96 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
97 | @param FormatString Null-terminated Unicode format string.\r | |
98 | @param ... Variable argument list whose contents are accessed based on the \r | |
99 | format string specified by FormatString.\r | |
100 | \r | |
101 | @return The number of Unicode characters in the produced output buffer not including the\r | |
102 | Null-terminator.\r | |
103 | \r | |
104 | **/\r | |
105 | typedef\r | |
106 | UINTN\r | |
107 | (EFIAPI *UNICODE_S_PRINT) (\r | |
108 | OUT CHAR16 *StartOfBuffer,\r | |
109 | IN UINTN BufferSize,\r | |
110 | IN CONST CHAR16 *FormatString,\r | |
111 | ...\r | |
112 | );\r | |
113 | \r | |
217697af | 114 | /**\r |
115 | Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated\r | |
116 | ASCII format string and a VA_LIST argument list\r | |
117 | \r | |
118 | Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r | |
119 | and BufferSize.\r | |
120 | The Unicode string is produced by parsing the format string specified by FormatString.\r | |
121 | Arguments are pulled from the variable argument list specified by Marker based on the \r | |
122 | contents of the format string.\r | |
123 | The number of Unicode characters in the produced output buffer is returned not including\r | |
124 | the Null-terminator.\r | |
125 | If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r | |
126 | \r | |
127 | If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r | |
128 | If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r | |
129 | If BufferSize > 1 and FormatString is NULL, then ASSERT().\r | |
130 | If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r | |
131 | PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r | |
132 | ASSERT().\r | |
133 | If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r | |
134 | contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r | |
135 | Null-terminator, then ASSERT().\r | |
136 | \r | |
137 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
138 | Unicode string.\r | |
139 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
346cf9ac | 140 | @param FormatString Null-terminated ASCII format string.\r |
217697af | 141 | @param Marker VA_LIST marker for the variable argument list.\r |
142 | \r | |
143 | @return The number of Unicode characters in the produced output buffer not including the\r | |
144 | Null-terminator.\r | |
145 | \r | |
146 | **/\r | |
147 | typedef\r | |
148 | UINTN\r | |
e996a8c9 | 149 | (EFIAPI *UNICODE_VS_PRINT_ASCII_FORMAT) (\r |
217697af | 150 | OUT CHAR16 *StartOfBuffer,\r |
151 | IN UINTN BufferSize,\r | |
152 | IN CONST CHAR8 *FormatString,\r | |
153 | IN VA_LIST Marker\r | |
154 | );\r | |
155 | \r | |
e996a8c9 | 156 | /**\r |
157 | Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated \r | |
158 | ASCII format string and variable argument list.\r | |
159 | \r | |
160 | Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer\r | |
161 | and BufferSize.\r | |
162 | The Unicode string is produced by parsing the format string specified by FormatString.\r | |
163 | Arguments are pulled from the variable argument list based on the contents of the \r | |
164 | format string.\r | |
165 | The number of Unicode characters in the produced output buffer is returned not including\r | |
166 | the Null-terminator.\r | |
167 | If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned.\r | |
168 | \r | |
169 | If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().\r | |
170 | If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().\r | |
171 | If BufferSize > 1 and FormatString is NULL, then ASSERT().\r | |
172 | If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r | |
173 | PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r | |
174 | ASSERT().\r | |
175 | If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string\r | |
176 | contains more than PcdMaximumUnicodeStringLength Unicode characters not including the\r | |
177 | Null-terminator, then ASSERT().\r | |
178 | \r | |
179 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
180 | Unicode string.\r | |
181 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
182 | @param FormatString Null-terminated ASCII format string.\r | |
183 | @param ... Variable argument list whose contents are accessed based on the \r | |
184 | format string specified by FormatString.\r | |
185 | \r | |
186 | @return The number of Unicode characters in the produced output buffer not including the\r | |
187 | Null-terminator.\r | |
188 | \r | |
189 | **/\r | |
190 | typedef\r | |
191 | UINTN\r | |
192 | (EFIAPI *UNICODE_S_PRINT_ASCII_FORMAT) (\r | |
193 | OUT CHAR16 *StartOfBuffer,\r | |
194 | IN UINTN BufferSize,\r | |
195 | IN CONST CHAR8 *FormatString,\r | |
196 | ...\r | |
197 | );\r | |
198 | \r | |
217697af | 199 | /**\r |
200 | Converts a decimal value to a Null-terminated Unicode string.\r | |
201 | \r | |
202 | Converts the decimal number specified by Value to a Null-terminated Unicode \r | |
203 | string specified by Buffer containing at most Width characters. No padding of spaces \r | |
204 | is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.\r | |
205 | The number of Unicode characters in Buffer is returned not including the Null-terminator.\r | |
206 | If the conversion contains more than Width characters, then only the first\r | |
207 | Width characters are returned, and the total number of characters \r | |
208 | required to perform the conversion is returned.\r | |
209 | Additional conversion parameters are specified in Flags. \r | |
210 | \r | |
211 | The Flags bit LEFT_JUSTIFY is always ignored.\r | |
212 | All conversions are left justified in Buffer.\r | |
213 | If Width is 0, PREFIX_ZERO is ignored in Flags.\r | |
214 | If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas\r | |
215 | are inserted every 3rd digit starting from the right.\r | |
216 | If HEX_RADIX is set in Flags, then the output buffer will be \r | |
217 | formatted in hexadecimal format.\r | |
218 | If Value is < 0 and HEX_RADIX is not set in Flags, then the fist character in Buffer is a '-'.\r | |
219 | If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, \r | |
220 | then Buffer is padded with '0' characters so the combination of the optional '-' \r | |
221 | sign character, '0' characters, digit characters for Value, and the Null-terminator\r | |
222 | add up to Width characters.\r | |
223 | If both COMMA_TYPE and HEX_RADIX are set in Flags, then ASSERT().\r | |
224 | If Buffer is NULL, then ASSERT().\r | |
225 | If Buffer is not aligned on a 16-bit boundary, then ASSERT().\r | |
226 | If unsupported bits are set in Flags, then ASSERT().\r | |
227 | If both COMMA_TYPE and HEX_RADIX are set in Flags, then ASSERT().\r | |
228 | If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()\r | |
229 | \r | |
230 | @param Buffer Pointer to the output buffer for the produced Null-terminated\r | |
231 | Unicode string.\r | |
232 | @param Flags The bitmask of flags that specify left justification, zero pad, and commas.\r | |
233 | @param Value The 64-bit signed value to convert to a string.\r | |
234 | @param Width The maximum number of Unicode characters to place in Buffer, not including\r | |
235 | the Null-terminator.\r | |
236 | \r | |
237 | @return The number of Unicode characters in Buffer not including the Null-terminator.\r | |
238 | \r | |
239 | **/\r | |
240 | typedef\r | |
241 | UINTN\r | |
e996a8c9 | 242 | (EFIAPI *UNICODE_VALUE_TO_STRING) (\r |
217697af | 243 | IN OUT CHAR16 *Buffer,\r |
244 | IN UINTN Flags,\r | |
245 | IN INT64 Value,\r | |
246 | IN UINTN Width\r | |
247 | );\r | |
248 | \r | |
249 | /**\r | |
250 | Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r | |
251 | ASCII format string and a VA_LIST argument list.\r | |
252 | \r | |
253 | Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r | |
254 | and BufferSize.\r | |
255 | The ASCII 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 \r | |
257 | the contents of the format string.\r | |
258 | The number of ASCII characters in the produced output buffer is returned not including\r | |
259 | the Null-terminator.\r | |
260 | If BufferSize is 0, then no output buffer is produced and 0 is returned.\r | |
261 | \r | |
262 | If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r | |
263 | If BufferSize > 0 and FormatString is NULL, then ASSERT().\r | |
264 | If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r | |
265 | PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r | |
266 | ASSERT().\r | |
267 | If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r | |
268 | contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r | |
269 | Null-terminator, then ASSERT().\r | |
270 | \r | |
271 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
272 | ASCII string.\r | |
273 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
346cf9ac | 274 | @param FormatString Null-terminated ASCII format string.\r |
217697af | 275 | @param Marker VA_LIST marker for the variable argument list.\r |
276 | \r | |
277 | @return The number of ASCII characters in the produced output buffer not including the\r | |
278 | Null-terminator.\r | |
279 | \r | |
280 | **/\r | |
281 | typedef\r | |
282 | UINTN\r | |
e996a8c9 | 283 | (EFIAPI *ASCII_VS_PRINT) (\r |
217697af | 284 | OUT CHAR8 *StartOfBuffer,\r |
285 | IN UINTN BufferSize,\r | |
286 | IN CONST CHAR8 *FormatString,\r | |
287 | IN VA_LIST Marker\r | |
288 | );\r | |
289 | \r | |
e996a8c9 | 290 | /**\r |
291 | Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r | |
292 | ASCII format string and variable argument list.\r | |
293 | \r | |
294 | Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r | |
295 | and BufferSize.\r | |
296 | The ASCII string is produced by parsing the format string specified by FormatString.\r | |
297 | Arguments are pulled from the variable argument list based on the contents of the \r | |
298 | format string.\r | |
299 | The number of ASCII characters in the produced output buffer is returned not including\r | |
300 | the Null-terminator.\r | |
301 | If BufferSize is 0, then no output buffer is produced and 0 is returned.\r | |
302 | \r | |
303 | If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r | |
304 | If BufferSize > 0 and FormatString is NULL, then ASSERT().\r | |
305 | If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than\r | |
306 | PcdMaximumAsciiStringLength ASCII characters not including the Null-terminator, then\r | |
307 | ASSERT().\r | |
308 | If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r | |
309 | contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r | |
310 | Null-terminator, then ASSERT().\r | |
311 | \r | |
312 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
313 | ASCII string.\r | |
314 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
315 | @param FormatString Null-terminated ASCII format string.\r | |
316 | @param ... Variable argument list whose contents are accessed based on the \r | |
317 | format string specified by FormatString.\r | |
318 | \r | |
319 | @return The number of ASCII characters in the produced output buffer not including the\r | |
320 | Null-terminator.\r | |
321 | \r | |
322 | **/\r | |
323 | typedef\r | |
324 | UINTN\r | |
325 | (EFIAPI *ASCII_S_PRINT) (\r | |
326 | OUT CHAR8 *StartOfBuffer,\r | |
327 | IN UINTN BufferSize,\r | |
328 | IN CONST CHAR8 *FormatString,\r | |
329 | ...\r | |
330 | );\r | |
331 | \r | |
217697af | 332 | /**\r |
333 | Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r | |
346cf9ac | 334 | Unicode format string and a VA_LIST argument list.\r |
217697af | 335 | \r |
336 | Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r | |
337 | and BufferSize.\r | |
338 | The ASCII string is produced by parsing the format string specified by FormatString.\r | |
339 | Arguments are pulled from the variable argument list specified by Marker based on \r | |
340 | the contents of the format string.\r | |
341 | The number of ASCII characters in the produced output buffer is returned not including\r | |
342 | the Null-terminator.\r | |
343 | If BufferSize is 0, then no output buffer is produced and 0 is returned.\r | |
344 | \r | |
345 | If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r | |
346 | If BufferSize > 0 and FormatString is NULL, then ASSERT().\r | |
347 | If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r | |
348 | If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r | |
349 | PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r | |
350 | ASSERT().\r | |
351 | If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r | |
352 | contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r | |
353 | Null-terminator, then ASSERT().\r | |
354 | \r | |
355 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
356 | ASCII string.\r | |
357 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
358 | @param FormatString Null-terminated Unicode format string.\r | |
359 | @param Marker VA_LIST marker for the variable argument list.\r | |
360 | \r | |
361 | @return The number of ASCII characters in the produced output buffer not including the\r | |
362 | Null-terminator.\r | |
363 | \r | |
364 | **/\r | |
365 | typedef\r | |
366 | UINTN\r | |
e996a8c9 | 367 | (EFIAPI *ASCII_VS_PRINT_UNICODE_FORMAT) (\r |
217697af | 368 | OUT CHAR8 *StartOfBuffer,\r |
369 | IN UINTN BufferSize,\r | |
370 | IN CONST CHAR16 *FormatString,\r | |
371 | IN VA_LIST Marker\r | |
372 | );\r | |
373 | \r | |
e996a8c9 | 374 | /**\r |
375 | Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated\r | |
376 | Unicode format string and variable argument list.\r | |
377 | \r | |
378 | Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer\r | |
379 | and BufferSize.\r | |
380 | The ASCII string is produced by parsing the format string specified by FormatString.\r | |
381 | Arguments are pulled from the variable argument list based on the contents of the \r | |
382 | format string.\r | |
383 | The number of ASCII characters in the produced output buffer is returned not including\r | |
384 | the Null-terminator.\r | |
385 | If BufferSize is 0, then no output buffer is produced and 0 is returned.\r | |
386 | \r | |
387 | If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().\r | |
388 | If BufferSize > 0 and FormatString is NULL, then ASSERT().\r | |
389 | If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().\r | |
390 | If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than\r | |
391 | PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then\r | |
392 | ASSERT().\r | |
393 | If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string\r | |
394 | contains more than PcdMaximumAsciiStringLength ASCII characters not including the\r | |
395 | Null-terminator, then ASSERT().\r | |
396 | \r | |
397 | @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated \r | |
398 | ASCII string.\r | |
399 | @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer.\r | |
400 | @param FormatString Null-terminated Unicode format string.\r | |
401 | @param ... Variable argument list whose contents are accessed based on the \r | |
402 | format string specified by FormatString.\r | |
403 | \r | |
404 | @return The number of ASCII characters in the produced output buffer not including the\r | |
405 | Null-terminator.\r | |
406 | \r | |
407 | **/\r | |
408 | typedef\r | |
409 | UINTN\r | |
410 | (EFIAPI *ASCII_S_PRINT_UNICODE_FORMAT) (\r | |
411 | OUT CHAR8 *StartOfBuffer,\r | |
412 | IN UINTN BufferSize,\r | |
413 | IN CONST CHAR16 *FormatString,\r | |
414 | ...\r | |
415 | );\r | |
416 | \r | |
217697af | 417 | /**\r |
418 | Converts a decimal value to a Null-terminated ASCII string.\r | |
419 | \r | |
420 | Converts the decimal number specified by Value to a Null-terminated ASCII string \r | |
421 | specified by Buffer containing at most Width characters. No padding of spaces \r | |
422 | is ever performed.\r | |
423 | If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed.\r | |
424 | The number of ASCII characters in Buffer is returned not including the Null-terminator.\r | |
425 | If the conversion contains more than Width characters, then only the first Width\r | |
426 | characters are returned, and the total number of characters required to perform\r | |
427 | the conversion is returned.\r | |
428 | Additional conversion parameters are specified in Flags. \r | |
429 | The Flags bit LEFT_JUSTIFY is always ignored.\r | |
430 | All conversions are left justified in Buffer.\r | |
431 | If Width is 0, PREFIX_ZERO is ignored in Flags.\r | |
432 | If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas\r | |
433 | are inserted every 3rd digit starting from the right.\r | |
434 | If HEX_RADIX is set in Flags, then the output buffer will be \r | |
435 | formatted in hexadecimal format.\r | |
436 | If Value is < 0 and HEX_RADIX is not set in Flags, then the fist character in Buffer is a '-'.\r | |
437 | If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, \r | |
438 | then Buffer is padded with '0' characters so the combination of the optional '-' \r | |
439 | sign character, '0' characters, digit characters for Value, and the Null-terminator\r | |
440 | add up to Width characters.\r | |
441 | \r | |
442 | If Buffer is NULL, then ASSERT().\r | |
443 | If unsupported bits are set in Flags, then ASSERT().\r | |
444 | If both COMMA_TYPE and HEX_RADIX are set in Flags, then ASSERT().\r | |
445 | If Width >= MAXIMUM_VALUE_CHARACTERS, then ASSERT()\r | |
446 | \r | |
447 | @param Buffer Pointer to the output buffer for the produced Null-terminated\r | |
448 | ASCII string.\r | |
449 | @param Flags The bitmask of flags that specify left justification, zero pad, and commas.\r | |
450 | @param Value The 64-bit signed value to convert to a string.\r | |
451 | @param Width The maximum number of ASCII characters to place in Buffer, not including\r | |
452 | the Null-terminator.\r | |
453 | \r | |
454 | @return The number of ASCII characters in Buffer not including the Null-terminator.\r | |
455 | \r | |
456 | **/\r | |
457 | typedef\r | |
458 | UINTN\r | |
e996a8c9 | 459 | (EFIAPI *ASCII_VALUE_TO_STRING) (\r |
460 | OUT CHAR8 *Buffer,\r | |
461 | IN UINTN Flags,\r | |
462 | IN INT64 Value,\r | |
463 | IN UINTN Width\r | |
217697af | 464 | );\r |
465 | \r | |
466 | struct _EFI_PRINT2_PROTOCOL {\r | |
e996a8c9 | 467 | UNICODE_VS_PRINT UnicodeVSPrint;\r |
468 | UNICODE_S_PRINT UnicodeSPrint;\r | |
469 | UNICODE_VS_PRINT_ASCII_FORMAT UnicodeVSPrintAsciiFormat;\r | |
470 | UNICODE_S_PRINT_ASCII_FORMAT UnicodeSPrintAsciiFormat;\r | |
471 | UNICODE_VALUE_TO_STRING UnicodeValueToString;\r | |
472 | ASCII_VS_PRINT AsciiVSPrint;\r | |
473 | ASCII_S_PRINT AsciiSPrint;\r | |
474 | ASCII_VS_PRINT_UNICODE_FORMAT AsciiVSPrintUnicodeFormat;\r | |
475 | ASCII_S_PRINT_UNICODE_FORMAT AsciiSPrintUnicodeFormat;\r | |
476 | ASCII_VALUE_TO_STRING AsciiValueToString;\r | |
217697af | 477 | };\r |
478 | \r | |
479 | extern EFI_GUID gEfiPrint2ProtocolGuid;\r | |
480 | \r | |
481 | #endif\r |