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