]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Library/UefiDebugLibConOut/DebugLib.c
remove some comments introduced by tools.
[mirror_edk2.git] / MdePkg / Library / UefiDebugLibConOut / DebugLib.c
index 97db1f41babb08d5d5ef2e614f50da1f7f279072..3cf31bd8a95873de0882835a363f4e99e5740785 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   UEFI Debug Library that uses PrintLib to send messages to CONOUT.\r
 \r
-  Copyright (c) 2006, Intel Corporation<BR>\r
+  Copyright (c) 2006 - 2007, Intel Corporation<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
 **/\r
 \r
+\r
+#include <Uefi.h>\r
+\r
+\r
+#include <Library/DebugLib.h>\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+\r
+\r
 //\r
 // Define the maximum debug and assert message length that this library supports \r
 //\r
@@ -65,7 +77,7 @@ DebugPrint (
   //\r
   // Send the print string to the Console Output device\r
   //\r
-  if (gST->ConOut != NULL) {\r
+  if ((gST != NULL) && (gST->ConOut != NULL)) {\r
     gST->ConOut->OutputString (gST->ConOut, Buffer);\r
   }\r
 }\r
@@ -98,7 +110,7 @@ VOID
 EFIAPI\r
 DebugAssert (\r
   IN CONST CHAR8  *FileName,\r
-  IN INTN         LineNumber,\r
+  IN UINTN        LineNumber,\r
   IN CONST CHAR8  *Description\r
   )\r
 {\r
@@ -112,7 +124,7 @@ DebugAssert (
   //\r
   // Send the print string to the Console Output device\r
   //\r
-  if (gST->ConOut != NULL) {\r
+  if ((gST != NULL) && (gST->ConOut != NULL)) {\r
     gST->ConOut->OutputString (gST->ConOut, Buffer);\r
   }\r
 \r
@@ -136,7 +148,7 @@ DebugAssert (
 \r
   If Buffer is NULL, then ASSERT().\r
 \r
-  If Length is greater than (MAX_ADDRESS \96 Buffer + 1), then ASSERT(). \r
+  If Length is greater than (MAX_ADDRESS ? Buffer + 1), then ASSERT(). \r
 \r
   @param   Buffer  Pointer to the target buffer to fill with PcdDebugClearMemoryValue.\r
   @param   Length  Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. \r
@@ -180,7 +192,7 @@ DebugAssertEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED) != 0);\r
 }\r
 \r
 \r
@@ -201,7 +213,7 @@ DebugPrintEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_PRINT_ENABLED) != 0);\r
 }\r
 \r
 \r
@@ -222,7 +234,7 @@ DebugCodeEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_DEBUG_CODE_ENABLED) != 0);\r
 }\r
 \r
 \r
@@ -243,5 +255,5 @@ DebugClearMemoryEnabled (
   VOID\r
   )\r
 {\r
-  return ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
+  return (BOOLEAN) ((PcdGet8(PcdDebugPropertyMask) & DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED) != 0);\r
 }\r