Changeset 77662 in vbox for trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/PrintLib.h
- Timestamp:
- Mar 12, 2019 12:40:12 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 129295
- Location:
- trunk/src/VBox/Devices/EFI/FirmwareNew
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/FirmwareNew
-
Property svn:mergeinfo
changed from (toggle deleted branches)
to (toggle deleted branches)/vendor/edk2/current 103735-103757,103769-103776 /vendor/edk2/current 103735-103757,103769-103776,129194-129237
-
Property svn:mergeinfo
changed from (toggle deleted branches)
-
trunk/src/VBox/Devices/EFI/FirmwareNew/MdePkg/Include/Library/PrintLib.h
r58466 r77662 3 3 Unicode and ASCII strings are supported. 4 4 5 Copyright (c) 2006 - 201 3, Intel Corporation. All rights reserved.<BR>5 Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR> 6 6 This program and the accompanying materials are licensed and made available under 7 7 the terms and conditions of the BSD License that accompanies this distribution. … … 89 89 - d 90 90 - The argument is a signed decimal number. If the flag 'L' is not specified, 91 then the argument is assumed to be size int. 92 - u 93 - The argument is a unsigned decimal number. If the flag 'L' is not specified, 91 94 then the argument is assumed to be size int. 92 95 - p … … 205 208 a Null-terminated Unicode format string and a VA_LIST argument list. 206 209 210 This function is similar as vsnprintf_s defined in C11. 211 207 212 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer 208 213 and BufferSize. … … 210 215 Arguments are pulled from the variable argument list specified by Marker based on the 211 216 contents of the format string. 212 The number of Unicode characters in the produced output buffer is returned, not including 213 the Null-terminator. 214 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned. 215 216 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). 217 If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 218 If BufferSize > 1 and FormatString is NULL, then ASSERT(). 219 If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT(). 217 The number of Unicode characters in the produced output buffer is returned not including 218 the Null-terminator. 219 220 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 221 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 222 223 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 224 unmodified and 0 is returned. 225 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is 226 unmodified and 0 is returned. 227 If PcdMaximumUnicodeStringLength is not zero, and BufferSize > 228 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output 229 buffer is unmodified and 0 is returned. 220 230 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 221 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then 222 ASSERT(). 223 If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string 224 contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the 225 Null-terminator, then ASSERT(). 231 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then 232 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 233 234 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned. 226 235 227 236 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 228 237 Unicode string. 229 238 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 230 @param FormatString Null-terminated Unicode format string.239 @param FormatString A Null-terminated Unicode format string. 231 240 @param Marker VA_LIST marker for the variable argument list. 232 241 233 @return The number of Unicode characters in the produced output buffer ,not including the242 @return The number of Unicode characters in the produced output buffer not including the 234 243 Null-terminator. 235 244 … … 253 262 Arguments are pulled from the variable argument list specified by Marker based on the 254 263 contents of the format string. 255 The number of Unicode characters in the produced output buffer is returned, not including 256 the Null-terminator. 257 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned. 258 259 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). 260 If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 261 If BufferSize > 1 and FormatString is NULL, then ASSERT(). 262 If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT(). 264 The number of Unicode characters in the produced output buffer is returned not including 265 the Null-terminator. 266 267 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 268 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 269 270 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 271 unmodified and 0 is returned. 272 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is 273 unmodified and 0 is returned. 274 If PcdMaximumUnicodeStringLength is not zero, and BufferSize > 275 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output 276 buffer is unmodified and 0 is returned. 263 277 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 264 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then 265 ASSERT(). 266 If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string 267 contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the 268 Null-terminator, then ASSERT(). 278 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then 279 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 280 281 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned. 269 282 270 283 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 271 284 Unicode string. 272 285 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 273 @param FormatString Null-terminated Unicode format string.286 @param FormatString A Null-terminated Unicode format string. 274 287 @param Marker BASE_LIST marker for the variable argument list. 275 288 276 @return The number of Unicode characters in the produced output buffer ,not including the289 @return The number of Unicode characters in the produced output buffer not including the 277 290 Null-terminator. 278 291 … … 291 304 Unicode format string and variable argument list. 292 305 306 This function is similar as snprintf_s defined in C11. 307 293 308 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer 294 309 and BufferSize. 295 310 The Unicode string is produced by parsing the format string specified by FormatString. 296 311 Arguments are pulled from the variable argument list based on the contents of the format string. 297 The number of Unicode characters in the produced output buffer is returned, not including 298 the Null-terminator. 299 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned. 300 301 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). 302 If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 303 If BufferSize > 1 and FormatString is NULL, then ASSERT(). 304 If BufferSize > 1 and FormatString is not aligned on a 16-bit boundary, then ASSERT(). 312 The number of Unicode characters in the produced output buffer is returned not including 313 the Null-terminator. 314 315 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 316 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 317 318 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 319 unmodified and 0 is returned. 320 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is 321 unmodified and 0 is returned. 322 If PcdMaximumUnicodeStringLength is not zero, and BufferSize > 323 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output 324 buffer is unmodified and 0 is returned. 305 325 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 306 326 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then 307 ASSERT(). 308 If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string 309 contains more than PcdMaximumUnicodeStringLength Unicode characters not including the 310 Null-terminator, then ASSERT(). 327 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 328 329 If BufferSize is 0 or 1, then the output buffer is unmodified and 0 is returned. 311 330 312 331 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 313 332 Unicode string. 314 333 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 315 @param FormatString A null-terminated Unicode format string.316 @param ... The variable argument list whose contents are accessed based on the334 @param FormatString A Null-terminated Unicode format string. 335 @param ... Variable argument list whose contents are accessed based on the 317 336 format string specified by FormatString. 318 337 319 @return The number of Unicode characters in the produced output buffer ,not including the338 @return The number of Unicode characters in the produced output buffer not including the 320 339 Null-terminator. 321 340 … … 332 351 /** 333 352 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated 334 ASCII format string and a VA_LIST argument list 353 ASCII format string and a VA_LIST argument list. 354 355 This function is similar as vsnprintf_s defined in C11. 335 356 336 357 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer … … 339 360 Arguments are pulled from the variable argument list specified by Marker based on the 340 361 contents of the format string. 341 The number of Unicode characters in the produced output buffer is returned, not including 342 the Null-terminator. 362 The number of Unicode characters in the produced output buffer is returned not including 363 the Null-terminator. 364 365 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 366 367 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 368 unmodified and 0 is returned. 369 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is 370 unmodified and 0 is returned. 371 If PcdMaximumUnicodeStringLength is not zero, and BufferSize > 372 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output 373 buffer is unmodified and 0 is returned. 374 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than 375 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then 376 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 377 343 378 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned. 344 379 345 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().346 If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().347 If BufferSize > 1 and FormatString is NULL, then ASSERT().348 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than349 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator, then350 ASSERT().351 If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string352 contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the353 Null-terminator, then ASSERT().354 355 380 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 356 381 Unicode string. 357 382 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 358 @param FormatString A null-terminated ASCII format string.383 @param FormatString A Null-terminated ASCII format string. 359 384 @param Marker VA_LIST marker for the variable argument list. 360 385 … … 374 399 /** 375 400 Produces a Null-terminated Unicode string in an output buffer based on a Null-terminated 376 ASCII format string and a BASE_LIST argument list 401 ASCII format string and a BASE_LIST argument list. 377 402 378 403 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer … … 381 406 Arguments are pulled from the variable argument list specified by Marker based on the 382 407 contents of the format string. 383 The number of Unicode characters in the produced output buffer is returned, not including 384 the Null-terminator. 408 The number of Unicode characters in the produced output buffer is returned not including 409 the Null-terminator. 410 411 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 412 413 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 414 unmodified and 0 is returned. 415 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is 416 unmodified and 0 is returned. 417 If PcdMaximumUnicodeStringLength is not zero, and BufferSize > 418 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output 419 buffer is unmodified and 0 is returned. 420 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than 421 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then 422 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 423 385 424 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned. 386 425 387 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().388 If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().389 If BufferSize > 1 and FormatString is NULL, then ASSERT().390 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than391 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator, then392 ASSERT().393 If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string394 contains more than PcdMaximumUnicodeStringLength Unicode characters, not including the395 Null-terminator, then ASSERT().396 397 426 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 398 427 Unicode string. 399 428 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 400 @param FormatString A null-terminated ASCII format string.401 @param Marker ABASE_LIST marker for the variable argument list.402 403 @return The number of Unicode characters in the produced output buffer ,not including the429 @param FormatString A Null-terminated ASCII format string. 430 @param Marker BASE_LIST marker for the variable argument list. 431 432 @return The number of Unicode characters in the produced output buffer not including the 404 433 Null-terminator. 405 434 … … 418 447 ASCII format string and variable argument list. 419 448 449 This function is similar as snprintf_s defined in C11. 450 420 451 Produces a Null-terminated Unicode string in the output buffer specified by StartOfBuffer 421 452 and BufferSize. … … 423 454 Arguments are pulled from the variable argument list based on the contents of the 424 455 format string. 425 The number of Unicode characters in the produced output buffer is returned, not including 426 the Null-terminator. 456 The number of Unicode characters in the produced output buffer is returned not including 457 the Null-terminator. 458 459 If StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT(). 460 461 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 462 unmodified and 0 is returned. 463 If BufferSize > 1 and FormatString is NULL, then ASSERT(). Also, the output buffer is 464 unmodified and 0 is returned. 465 If PcdMaximumUnicodeStringLength is not zero, and BufferSize > 466 (PcdMaximumUnicodeStringLength * sizeof (CHAR16) + 1), then ASSERT(). Also, the output 467 buffer is unmodified and 0 is returned. 468 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than 469 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then 470 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 471 427 472 If BufferSize is 0 or 1, then no output buffer is produced and 0 is returned. 428 473 429 If BufferSize > 1 and StartOfBuffer is NULL, then ASSERT().430 If BufferSize > 1 and StartOfBuffer is not aligned on a 16-bit boundary, then ASSERT().431 If BufferSize > 1 and FormatString is NULL, then ASSERT().432 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than433 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator, then434 ASSERT().435 If PcdMaximumUnicodeStringLength is not zero, and produced Null-terminated Unicode string436 contains more than PcdMaximumUnicodeStringLength Unicode characters, the437 Null-terminator, then ASSERT().438 439 474 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 440 475 Unicode string. 441 476 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 442 @param FormatString A null-terminated ASCII format string.477 @param FormatString A Null-terminated ASCII format string. 443 478 @param ... Variable argument list whose contents are accessed based on the 444 479 format string specified by FormatString. 445 480 446 @return The number of Unicode characters in the produced output buffer ,not including the481 @return The number of Unicode characters in the produced output buffer not including the 447 482 Null-terminator. 448 483 … … 457 492 ); 458 493 459 /** 494 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 495 496 /** 497 [ATTENTION] This function is deprecated for security reason. 498 460 499 Converts a decimal value to a Null-terminated Unicode string. 461 500 … … 507 546 ); 508 547 548 #endif 549 550 /** 551 Converts a decimal value to a Null-terminated Unicode string. 552 553 Converts the decimal number specified by Value to a Null-terminated Unicode 554 string specified by Buffer containing at most Width characters. No padding of 555 spaces is ever performed. If Width is 0 then a width of 556 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than 557 Width characters, then only the first Width characters are placed in Buffer. 558 Additional conversion parameters are specified in Flags. 559 560 The Flags bit LEFT_JUSTIFY is always ignored. 561 All conversions are left justified in Buffer. 562 If Width is 0, PREFIX_ZERO is ignored in Flags. 563 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and 564 commas are inserted every 3rd digit starting from the right. 565 If RADIX_HEX is set in Flags, then the output buffer will be formatted in 566 hexadecimal format. 567 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in 568 Buffer is a '-'. 569 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then 570 Buffer is padded with '0' characters so the combination of the optional '-' 571 sign character, '0' characters, digit characters for Value, and the 572 Null-terminator add up to Width characters. 573 574 If Buffer is not aligned on a 16-bit boundary, then ASSERT(). 575 If an error would be returned, then the function will also ASSERT(). 576 577 @param Buffer The pointer to the output buffer for the produced 578 Null-terminated Unicode string. 579 @param BufferSize The size of Buffer in bytes, including the 580 Null-terminator. 581 @param Flags The bitmask of flags that specify left justification, 582 zero pad, and commas. 583 @param Value The 64-bit signed value to convert to a string. 584 @param Width The maximum number of Unicode characters to place in 585 Buffer, not including the Null-terminator. 586 587 @retval RETURN_SUCCESS The decimal value is converted. 588 @retval RETURN_BUFFER_TOO_SMALL If BufferSize cannot hold the converted 589 value. 590 @retval RETURN_INVALID_PARAMETER If Buffer is NULL. 591 If PcdMaximumUnicodeStringLength is not 592 zero, and BufferSize is greater than 593 (PcdMaximumUnicodeStringLength * 594 sizeof (CHAR16) + 1). 595 If unsupported bits are set in Flags. 596 If both COMMA_TYPE and RADIX_HEX are set in 597 Flags. 598 If Width >= MAXIMUM_VALUE_CHARACTERS. 599 600 **/ 601 RETURN_STATUS 602 EFIAPI 603 UnicodeValueToStringS ( 604 IN OUT CHAR16 *Buffer, 605 IN UINTN BufferSize, 606 IN UINTN Flags, 607 IN INT64 Value, 608 IN UINTN Width 609 ); 610 509 611 /** 510 612 Produces a Null-terminated ASCII string in an output buffer based on a Null-terminated 511 613 ASCII format string and a VA_LIST argument list. 614 615 This function is similar as vsnprintf_s defined in C11. 512 616 513 617 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer … … 516 620 Arguments are pulled from the variable argument list specified by Marker based on 517 621 the contents of the format string. 518 The number of ASCII characters in the produced output buffer is returned, not including 519 the Null-terminator. 622 The number of ASCII characters in the produced output buffer is returned not including 623 the Null-terminator. 624 625 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 626 unmodified and 0 is returned. 627 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is 628 unmodified and 0 is returned. 629 If PcdMaximumAsciiStringLength is not zero, and BufferSize > 630 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer 631 is unmodified and 0 is returned. 632 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than 633 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then 634 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 635 520 636 If BufferSize is 0, then no output buffer is produced and 0 is returned. 521 637 522 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().523 If BufferSize > 0 and FormatString is NULL, then ASSERT().524 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than525 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator, then526 ASSERT().527 If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string528 contains more than PcdMaximumAsciiStringLength ASCII characters, not including the529 Null-terminator, then ASSERT().530 531 638 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 532 639 ASCII string. 533 640 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 534 @param FormatString A null-terminated ASCII format string.641 @param FormatString A Null-terminated ASCII format string. 535 642 @param Marker VA_LIST marker for the variable argument list. 536 643 537 @return The number of ASCII characters in the produced output buffer ,not including the644 @return The number of ASCII characters in the produced output buffer not including the 538 645 Null-terminator. 539 646 … … 557 664 Arguments are pulled from the variable argument list specified by Marker based on 558 665 the contents of the format string. 559 The number of ASCII characters in the produced output buffer is returned, not including 560 the Null-terminator. 666 The number of ASCII characters in the produced output buffer is returned not including 667 the Null-terminator. 668 669 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 670 unmodified and 0 is returned. 671 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is 672 unmodified and 0 is returned. 673 If PcdMaximumAsciiStringLength is not zero, and BufferSize > 674 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer 675 is unmodified and 0 is returned. 676 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than 677 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then 678 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 679 561 680 If BufferSize is 0, then no output buffer is produced and 0 is returned. 562 681 563 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().564 If BufferSize > 0 and FormatString is NULL, then ASSERT().565 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than566 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator, then567 ASSERT().568 If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string569 contains more than PcdMaximumAsciiStringLength ASCII characters, not including the570 Null-terminator, then ASSERT().571 572 682 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 573 683 ASCII string. 574 684 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 575 @param FormatString A null-terminated ASCII format string.685 @param FormatString A Null-terminated ASCII format string. 576 686 @param Marker BASE_LIST marker for the variable argument list. 577 687 578 @return The number of ASCII characters in the produced output buffer ,not including the688 @return The number of ASCII characters in the produced output buffer not including the 579 689 Null-terminator. 580 690 … … 593 703 ASCII format string and variable argument list. 594 704 705 This function is similar as snprintf_s defined in C11. 706 595 707 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer 596 708 and BufferSize. … … 598 710 Arguments are pulled from the variable argument list based on the contents of the 599 711 format string. 600 The number of ASCII characters in the produced output buffer is returned, not including 601 the Null-terminator. 712 The number of ASCII characters in the produced output buffer is returned not including 713 the Null-terminator. 714 715 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 716 unmodified and 0 is returned. 717 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is 718 unmodified and 0 is returned. 719 If PcdMaximumAsciiStringLength is not zero, and BufferSize > 720 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer 721 is unmodified and 0 is returned. 722 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than 723 PcdMaximumAsciiStringLength Ascii characters not including the Null-terminator, then 724 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 725 602 726 If BufferSize is 0, then no output buffer is produced and 0 is returned. 603 727 604 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().605 If BufferSize > 0 and FormatString is NULL, then ASSERT().606 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more than607 PcdMaximumAsciiStringLength ASCII characters, not including the Null-terminator, then608 ASSERT().609 If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string610 contains more than PcdMaximumAsciiStringLength ASCII characters, not including the611 Null-terminator, then ASSERT().612 613 728 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 614 729 ASCII string. 615 730 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 616 @param FormatString A null-terminated ASCII format string.617 @param ... The variable argument list whose contents are accessed based on the731 @param FormatString A Null-terminated ASCII format string. 732 @param ... Variable argument list whose contents are accessed based on the 618 733 format string specified by FormatString. 619 734 620 @return The number of ASCII characters in the produced output buffer ,not including the735 @return The number of ASCII characters in the produced output buffer not including the 621 736 Null-terminator. 622 737 … … 635 750 Unicode format string and a VA_LIST argument list. 636 751 752 This function is similar as vsnprintf_s defined in C11. 753 637 754 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer 638 755 and BufferSize. … … 640 757 Arguments are pulled from the variable argument list specified by Marker based on 641 758 the contents of the format string. 642 The number of ASCII characters in the produced output buffer is returned, not including 643 the Null-terminator. 759 The number of ASCII characters in the produced output buffer is returned not including 760 the Null-terminator. 761 762 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 763 764 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 765 unmodified and 0 is returned. 766 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is 767 unmodified and 0 is returned. 768 If PcdMaximumAsciiStringLength is not zero, and BufferSize > 769 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer 770 is unmodified and 0 is returned. 771 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 772 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then 773 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 774 644 775 If BufferSize is 0, then no output buffer is produced and 0 is returned. 645 776 646 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().647 If BufferSize > 0 and FormatString is NULL, then ASSERT().648 If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().649 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than650 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then651 ASSERT().652 If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string653 contains more than PcdMaximumAsciiStringLength ASCII characters, not including the654 Null-terminator, then ASSERT().655 656 777 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 657 778 ASCII string. 658 779 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 659 @param FormatString A null-terminated Unicode format string.780 @param FormatString A Null-terminated Unicode format string. 660 781 @param Marker VA_LIST marker for the variable argument list. 661 782 662 @return The number of ASCII characters in the produced output buffer ,not including the783 @return The number of ASCII characters in the produced output buffer not including the 663 784 Null-terminator. 664 785 … … 682 803 Arguments are pulled from the variable argument list specified by Marker based on 683 804 the contents of the format string. 684 The number of ASCII characters in the produced output buffer is returned, not including 685 the Null-terminator. 805 The number of ASCII characters in the produced output buffer is returned not including 806 the Null-terminator. 807 808 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 809 810 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 811 unmodified and 0 is returned. 812 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is 813 unmodified and 0 is returned. 814 If PcdMaximumAsciiStringLength is not zero, and BufferSize > 815 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer 816 is unmodified and 0 is returned. 817 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 818 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then 819 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 820 686 821 If BufferSize is 0, then no output buffer is produced and 0 is returned. 687 822 688 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().689 If BufferSize > 0 and FormatString is NULL, then ASSERT().690 If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().691 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than692 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then693 ASSERT().694 If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string695 contains more than PcdMaximumAsciiStringLength ASCII characters, not including the696 Null-terminator, then ASSERT().697 698 823 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 699 824 ASCII string. 700 825 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 701 @param FormatString A null-terminated Unicode format string.826 @param FormatString A Null-terminated Unicode format string. 702 827 @param Marker BASE_LIST marker for the variable argument list. 703 828 704 @return The number of ASCII characters in the produced output buffer ,not including the829 @return The number of ASCII characters in the produced output buffer not including the 705 830 Null-terminator. 706 831 … … 719 844 Unicode format string and variable argument list. 720 845 846 This function is similar as snprintf_s defined in C11. 847 721 848 Produces a Null-terminated ASCII string in the output buffer specified by StartOfBuffer 722 849 and BufferSize. … … 724 851 Arguments are pulled from the variable argument list based on the contents of the 725 852 format string. 726 The number of ASCII characters in the produced output buffer is returned, not including 727 the Null-terminator. 853 The number of ASCII characters in the produced output buffer is returned not including 854 the Null-terminator. 855 856 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 857 858 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT(). Also, the output buffer is 859 unmodified and 0 is returned. 860 If BufferSize > 0 and FormatString is NULL, then ASSERT(). Also, the output buffer is 861 unmodified and 0 is returned. 862 If PcdMaximumAsciiStringLength is not zero, and BufferSize > 863 (PcdMaximumAsciiStringLength * sizeof (CHAR8)), then ASSERT(). Also, the output buffer 864 is unmodified and 0 is returned. 865 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than 866 PcdMaximumUnicodeStringLength Unicode characters not including the Null-terminator, then 867 ASSERT(). Also, the output buffer is unmodified and 0 is returned. 868 728 869 If BufferSize is 0, then no output buffer is produced and 0 is returned. 729 870 730 If BufferSize > 0 and StartOfBuffer is NULL, then ASSERT().731 If BufferSize > 0 and FormatString is NULL, then ASSERT().732 If BufferSize > 0 and FormatString is not aligned on a 16-bit boundary, then ASSERT().733 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more than734 PcdMaximumUnicodeStringLength Unicode characters, not including the Null-terminator, then735 ASSERT().736 If PcdMaximumAsciiStringLength is not zero, and produced Null-terminated ASCII string737 contains more than PcdMaximumAsciiStringLength ASCII characters, not including the738 Null-terminator, then ASSERT().739 740 871 @param StartOfBuffer A pointer to the output buffer for the produced Null-terminated 741 872 ASCII string. 742 873 @param BufferSize The size, in bytes, of the output buffer specified by StartOfBuffer. 743 @param FormatString A null-terminated Unicode format string.874 @param FormatString A Null-terminated Unicode format string. 744 875 @param ... Variable argument list whose contents are accessed based on the 745 876 format string specified by FormatString. 746 877 747 @return The number of ASCII characters in the produced output buffer ,not including the878 @return The number of ASCII characters in the produced output buffer not including the 748 879 Null-terminator. 749 880 … … 758 889 ); 759 890 760 /** 891 #ifndef DISABLE_NEW_DEPRECATED_INTERFACES 892 893 /** 894 [ATTENTION] This function is deprecated for security reason. 895 761 896 Converts a decimal value to a Null-terminated ASCII string. 762 897 … … 807 942 ); 808 943 944 #endif 945 946 /** 947 Converts a decimal value to a Null-terminated Ascii string. 948 949 Converts the decimal number specified by Value to a Null-terminated Ascii 950 string specified by Buffer containing at most Width characters. No padding of 951 spaces is ever performed. If Width is 0 then a width of 952 MAXIMUM_VALUE_CHARACTERS is assumed. If the conversion contains more than 953 Width characters, then only the first Width characters are placed in Buffer. 954 Additional conversion parameters are specified in Flags. 955 956 The Flags bit LEFT_JUSTIFY is always ignored. 957 All conversions are left justified in Buffer. 958 If Width is 0, PREFIX_ZERO is ignored in Flags. 959 If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and 960 commas are inserted every 3rd digit starting from the right. 961 If RADIX_HEX is set in Flags, then the output buffer will be formatted in 962 hexadecimal format. 963 If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in 964 Buffer is a '-'. 965 If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, then 966 Buffer is padded with '0' characters so the combination of the optional '-' 967 sign character, '0' characters, digit characters for Value, and the 968 Null-terminator add up to Width characters. 969 970 If an error would be returned, then the function will ASSERT(). 971 972 @param Buffer The pointer to the output buffer for the produced 973 Null-terminated Ascii string. 974 @param BufferSize The size of Buffer in bytes, including the 975 Null-terminator. 976 @param Flags The bitmask of flags that specify left justification, 977 zero pad, and commas. 978 @param Value The 64-bit signed value to convert to a string. 979 @param Width The maximum number of Ascii characters to place in 980 Buffer, not including the Null-terminator. 981 982 @retval RETURN_SUCCESS The decimal value is converted. 983 @retval RETURN_BUFFER_TOO_SMALL If BufferSize cannot hold the converted 984 value. 985 @retval RETURN_INVALID_PARAMETER If Buffer is NULL. 986 If PcdMaximumAsciiStringLength is not 987 zero, and BufferSize is greater than 988 PcdMaximumAsciiStringLength. 989 If unsupported bits are set in Flags. 990 If both COMMA_TYPE and RADIX_HEX are set in 991 Flags. 992 If Width >= MAXIMUM_VALUE_CHARACTERS. 993 994 **/ 995 RETURN_STATUS 996 EFIAPI 997 AsciiValueToStringS ( 998 IN OUT CHAR8 *Buffer, 999 IN UINTN BufferSize, 1000 IN UINTN Flags, 1001 IN INT64 Value, 1002 IN UINTN Width 1003 ); 1004 809 1005 /** 810 1006 Returns the number of characters that would be produced by if the formatted 811 1007 output were produced not including the Null-terminator. 812 1008 813 If Format is NULL, then ASSERT(). 814 If Format is not aligned on a 16-bit boundary, then ASSERT(). 1009 If FormatString is not aligned on a 16-bit boundary, then ASSERT(). 1010 1011 If FormatString is NULL, then ASSERT() and 0 is returned. 1012 If PcdMaximumUnicodeStringLength is not zero, and FormatString contains more 1013 than PcdMaximumUnicodeStringLength Unicode characters not including the 1014 Null-terminator, then ASSERT() and 0 is returned. 815 1015 816 1016 @param[in] FormatString A Null-terminated Unicode format string. … … 831 1031 output were produced not including the Null-terminator. 832 1032 833 If Format is NULL, then ASSERT(). 1033 If FormatString is NULL, then ASSERT() and 0 is returned. 1034 If PcdMaximumAsciiStringLength is not zero, and FormatString contains more 1035 than PcdMaximumAsciiStringLength Ascii characters not including the 1036 Null-terminator, then ASSERT() and 0 is returned. 834 1037 835 1038 @param[in] FormatString A Null-terminated ASCII format string.
Note:
See TracChangeset
for help on using the changeset viewer.