]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/BasePrintLib/PrintLib.c
Update to make end-of-line consistent for all source files in MdePkg. There are no...
[mirror_edk2.git] / MdePkg / Library / BasePrintLib / PrintLib.c
index 2066c7a1ddd186731d97e4ea5da344449a8c96ae..13cdbe2d4b14ff00ee31b418508745bae6f22422 100644 (file)
@@ -2,6 +2,7 @@
   Base Print Library instance implementation.\r
 \r
   Copyright (c) 2006 - 2008, Intel Corporation<BR>\r
+  Portions Copyright (c) 2008-2009 Apple Inc.<BR>\r
   All rights reserved. This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
 \r
 #include "PrintLibInternal.h"\r
 \r
+//\r
+// Declare a VA_LIST global variable that is used in calls to BasePrintLibSPrintMarker()\r
+// when the BASE_LIST parameter is valid and the VA_LIST parameter is ignored.  \r
+// A NULL VA_LIST can not be passed into  BasePrintLibSPrintMarker() because some \r
+// compilers define VA_LIST to be a structure.\r
+//\r
+VA_LIST gNullVaList;\r
+\r
 #define ASSERT_UNICODE_BUFFER(Buffer) ASSERT ((((UINTN) (Buffer)) & 0x01) == 0)\r
 \r
 /**\r
@@ -109,7 +118,7 @@ UnicodeBSPrint (
 {\r
   ASSERT_UNICODE_BUFFER (StartOfBuffer);\r
   ASSERT_UNICODE_BUFFER (FormatString);\r
-  return BasePrintLibSPrintMarker ((CHAR8 *)StartOfBuffer, BufferSize >> 1, FORMAT_UNICODE | OUTPUT_UNICODE, (CHAR8 *)FormatString, NULL, Marker);\r
+  return BasePrintLibSPrintMarker ((CHAR8 *)StartOfBuffer, BufferSize >> 1, FORMAT_UNICODE | OUTPUT_UNICODE, (CHAR8 *)FormatString, gNullVaList, Marker);\r
 }\r
 \r
 /**\r
@@ -250,7 +259,7 @@ UnicodeBSPrintAsciiFormat (
   )\r
 {\r
   ASSERT_UNICODE_BUFFER (StartOfBuffer);\r
-  return BasePrintLibSPrintMarker ((CHAR8 *)StartOfBuffer, BufferSize >> 1, OUTPUT_UNICODE, FormatString, NULL, Marker);\r
+  return BasePrintLibSPrintMarker ((CHAR8 *)StartOfBuffer, BufferSize >> 1, OUTPUT_UNICODE, FormatString, gNullVaList, Marker);\r
 }\r
 \r
 /**\r
@@ -441,7 +450,7 @@ AsciiBSPrint (
   IN  BASE_LIST     Marker\r
   )\r
 {\r
-  return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, 0, FormatString, NULL, Marker);\r
+  return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, 0, FormatString, gNullVaList, Marker);\r
 }\r
 \r
 /**\r
@@ -581,7 +590,7 @@ AsciiBSPrintUnicodeFormat (
   )\r
 {\r
   ASSERT_UNICODE_BUFFER (FormatString);\r
-  return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, FORMAT_UNICODE, (CHAR8 *)FormatString, NULL, Marker);\r
+  return BasePrintLibSPrintMarker (StartOfBuffer, BufferSize, FORMAT_UNICODE, (CHAR8 *)FormatString, gNullVaList, Marker);\r
 }\r
 \r
 /**\r