2 Copyright (c) 2006, Intel Corporation
3 All rights reserved. This program and the accompanying materials
4 are licensed and made available under the terms and conditions of the BSD License
5 which accompanies this distribution. The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 IN CONST CHAR8
*Format
,
31 Print function for a maximum of PXE_MAX_PRINT_BUFFER ascii
36 Format - Ascii format string see file header for more details.
38 ... - Vararg list consumed by processing Format.
42 Number of characters printed.
50 CHAR16 Buffer
[PXE_MAX_PRINT_BUFFER
];
51 CHAR16 UnicodeFormat
[PXE_MAX_PRINT_BUFFER
];
53 MaxIndex
= AsciiStrLen ((CHAR8
*) Format
);
54 if (MaxIndex
> PXE_MAX_PRINT_BUFFER
) {
56 // Format string was too long for use to process.
61 for (Index
= 0; Index
< PXE_MAX_PRINT_BUFFER
; Index
++) {
62 UnicodeFormat
[Index
] = (CHAR16
) Format
[Index
];
65 VA_START (Marker
, Format
);
66 Return
= UnicodeVSPrint (Buffer
, sizeof (Buffer
), UnicodeFormat
, Marker
);
70 // Need to convert to Unicode to do an OutputString
73 if (gST
->ConOut
!= NULL
) {
75 // To be extra safe make sure ConOut has been initialized
77 gST
->ConOut
->OutputString (gST
->ConOut
, Buffer
);