]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkModulePkg/Library/EdkDxePrintLib/PrintLib.c
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
24 static EFI_PRINT_PROTOCOL
*gPrintProtocol
= NULL
;
28 OUT CHAR16
*StartOfBuffer
,
30 IN
const CHAR16
*FormatString
,
37 VSPrint function to process format and place the results in Buffer. Since a
38 VA_LIST is used this rountine allows the nesting of Vararg routines. Thus
39 this is the main print working routine
43 StartOfBuffer - Unicode buffer to print the results of the parsing of Format into.
45 BufferSize - Maximum number of characters to put into buffer. Zero means
48 FormatString - Unicode format string see file header for more details.
50 Marker - Vararg list consumed by processing Format.
54 Number of characters printed.
60 if (gPrintProtocol
== NULL
) {
61 Status
= gBS
->LocateProtocol (
62 &gEfiPrintProtocolGuid
,
64 (VOID
**)&gPrintProtocol
66 if (EFI_ERROR (Status
)) {
67 gPrintProtocol
= NULL
;
69 if (gPrintProtocol
== NULL
) {
73 return gPrintProtocol
->VSPrint (StartOfBuffer
, BufferSize
, FormatString
, Marker
);
78 OUT CHAR16
*StartOfBuffer
,
80 IN
const CHAR16
*FormatString
,
88 VA_START (Marker
, FormatString
);
89 Return
= UnicodeVSPrint (StartOfBuffer
, BufferSize
, FormatString
, Marker
);
96 OUT CHAR8
*StartOfBuffer
,
98 IN
const CHAR8
*FormatString
,
105 VSPrint function to process format and place the results in Buffer. Since a
106 VA_LIST is used this rountine allows the nesting of Vararg routines. Thus
107 this is the main print working routine
111 StartOfBuffer - Unicode buffer to print the results of the parsing of Format into.
113 BufferSize - Maximum number of characters to put into buffer. Zero means
116 FormatString - Unicode format string see file header for more details.
118 Marker - Vararg list consumed by processing Format.
122 Number of characters printed.
131 OUT CHAR8
*StartOfBuffer
,
133 IN
const CHAR8
*FormatString
,
141 VA_START (Marker
, FormatString
);
142 Return
= AsciiVSPrint (StartOfBuffer
, BufferSize
, FormatString
, Marker
);