]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Removed #ifdef SNP_DEBUG and used debug lib to output information.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 Mar 2007 06:59:54 +0000 (06:59 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 20 Mar 2007 06:59:54 +0000 (06:59 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2490 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Universal/Network/Snp32_64/Dxe/callback.c
EdkModulePkg/Universal/UserInterface/SetupBrowser/Dxe/ProcessOptions.c

index 16e40c609b486fe8830cabbae893c0e2249a20f8..2821e650f0463471d7d252730d44617bcbbca5c9 100644 (file)
@@ -546,9 +546,7 @@ Returns:
 \r
   if (Index >= MAX_MAP_LENGTH)\r
   {\r
 \r
   if (Index >= MAX_MAP_LENGTH)\r
   {\r
-#if SNP_DEBUG\r
-    Print (L"SNP could not find a mapping, failed to unmap.\n");\r
-#endif\r
+    DEBUG ((EFI_D_ERROR, "SNP could not find a mapping, failed to unmap.\n"));\r
     return ;\r
   }\r
 \r
     return ;\r
   }\r
 \r
index f585568c3f57271bb6998bbd4cc4f6647bc50964..2484f5089c321784aa9660587f34995d08cf110c 100644 (file)
@@ -1,14 +1,14 @@
 /**@file\r
        Implementation for handling the User Interface option processing.\r
 /**@file\r
        Implementation for handling the User Interface option processing.\r
-       \r
+\r
 Copyright (c) 2006 - 2007 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
-http://opensource.org/licenses/bsd-license.php                                            \r
-                                                                                          \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,                     \r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \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
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
 \r
 **/\r
 \r
@@ -616,9 +616,9 @@ ProcessOptions (
           Number = *NvRamMap;\r
         }\r
         UnicodeValueToString (\r
           Number = *NvRamMap;\r
         }\r
         UnicodeValueToString (\r
-          FormattedNumber, \r
-          FALSE, \r
-          (UINTN) Number, \r
+          FormattedNumber,\r
+          FALSE,\r
+          (UINTN) Number,\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -634,9 +634,9 @@ ProcessOptions (
         Number = Tag->Default;\r
 \r
         UnicodeValueToString (\r
         Number = Tag->Default;\r
 \r
         UnicodeValueToString (\r
-          FormattedNumber, \r
-          FALSE, \r
-          (UINTN) Number, \r
+          FormattedNumber,\r
+          FALSE,\r
+          (UINTN) Number,\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -722,9 +722,9 @@ ProcessOptions (
       *OptionString[0]                          = LEFT_NUMERIC_DELIMITER;\r
 \r
       UnicodeValueToString (\r
       *OptionString[0]                          = LEFT_NUMERIC_DELIMITER;\r
 \r
       UnicodeValueToString (\r
-        FormattedNumber, \r
-        FALSE, \r
-        (UINTN) Time.Month, \r
+        FormattedNumber,\r
+        FALSE,\r
+        (UINTN) Time.Month,\r
         (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
         );\r
       Number = (UINT16) GetStringWidth (FormattedNumber);\r
         (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
         );\r
       Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -765,9 +765,9 @@ ProcessOptions (
       SetUnicodeMem (OptionString[0], 4, L' ');\r
 \r
       UnicodeValueToString (\r
       SetUnicodeMem (OptionString[0], 4, L' ');\r
 \r
       UnicodeValueToString (\r
-        FormattedNumber, \r
-        FALSE, \r
-        (UINTN) Time.Day, \r
+        FormattedNumber,\r
+        FALSE,\r
+        (UINTN) Time.Day,\r
         (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
         );\r
       Number = (UINT16) GetStringWidth (FormattedNumber);\r
         (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
         );\r
       Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -807,9 +807,9 @@ ProcessOptions (
       VariableDefinition->FakeNvRamMap[Tag->Id + 1] = (UINT8) (Tag->Value >> 8);\r
       SetUnicodeMem (OptionString[0], 7, L' ');\r
       UnicodeValueToString (\r
       VariableDefinition->FakeNvRamMap[Tag->Id + 1] = (UINT8) (Tag->Value >> 8);\r
       SetUnicodeMem (OptionString[0], 7, L' ');\r
       UnicodeValueToString (\r
-        FormattedNumber, \r
-        FALSE, \r
-        (UINTN) Time.Year, \r
+        FormattedNumber,\r
+        FALSE,\r
+        (UINTN) Time.Year,\r
         (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
         );\r
       Number = (UINT16) GetStringWidth (FormattedNumber);\r
         (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
         );\r
       Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -932,9 +932,9 @@ ProcessOptions (
       case 0:\r
         *OptionString[0] = LEFT_NUMERIC_DELIMITER;\r
         UnicodeValueToString (\r
       case 0:\r
         *OptionString[0] = LEFT_NUMERIC_DELIMITER;\r
         UnicodeValueToString (\r
-          FormattedNumber, \r
-          FALSE, \r
-          (UINTN) Time.Hour, \r
+          FormattedNumber,\r
+          FALSE,\r
+          (UINTN) Time.Hour,\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -953,9 +953,9 @@ ProcessOptions (
       case 1:\r
         SetUnicodeMem (OptionString[0], 4, L' ');\r
         UnicodeValueToString (\r
       case 1:\r
         SetUnicodeMem (OptionString[0], 4, L' ');\r
         UnicodeValueToString (\r
-          FormattedNumber, \r
-          FALSE, \r
-          (UINTN) Time.Minute, \r
+          FormattedNumber,\r
+          FALSE,\r
+          (UINTN) Time.Minute,\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -974,9 +974,9 @@ ProcessOptions (
       case 2:\r
         SetUnicodeMem (OptionString[0], 7, L' ');\r
         UnicodeValueToString (\r
       case 2:\r
         SetUnicodeMem (OptionString[0], 7, L' ');\r
         UnicodeValueToString (\r
-          FormattedNumber, \r
-          FALSE, \r
-          (UINTN) Time.Second, \r
+          FormattedNumber,\r
+          FALSE,\r
+          (UINTN) Time.Second,\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
           (sizeof (FormattedNumber) / sizeof (FormattedNumber[0]))\r
           );\r
         Number = (UINT16) GetStringWidth (FormattedNumber);\r
@@ -1193,13 +1193,13 @@ ProcessOptions (
 }\r
 \r
 /**\r
 }\r
 \r
 /**\r
-  Split StringPtr to several lines of strings stored in FormattedString and the glyph width of \r
+  Split StringPtr to several lines of strings stored in FormattedString and the glyph width of\r
   each line cannot exceed gHelpBlockWidth.\r
 \r
   @param StringPtr          The pointer of string\r
   @param FormattedString    The pointer of format string\r
   each line cannot exceed gHelpBlockWidth.\r
 \r
   @param StringPtr          The pointer of string\r
   @param FormattedString    The pointer of format string\r
-  @param RowCount           The count of row \r
-  \r
+  @param RowCount           The count of row\r
+\r
 **/\r
 VOID\r
 ProcessHelpString (\r
 **/\r
 VOID\r
 ProcessHelpString (\r
@@ -1245,7 +1245,7 @@ ProcessHelpString (
   // every three elements of IndexArray form a screen-line of string:[ IndexArray[i*3], IndexArray[i*3+1] )\r
   // IndexArray[i*3+2] stores the initial glyph width of single character. to save this is because we want\r
   // to bring the width directive of the last line to current screen-line.\r
   // every three elements of IndexArray form a screen-line of string:[ IndexArray[i*3], IndexArray[i*3+1] )\r
   // IndexArray[i*3+2] stores the initial glyph width of single character. to save this is because we want\r
   // to bring the width directive of the last line to current screen-line.\r
-  // e.g.: "\wideabcde ... fghi", if "fghi" also has width directive but is splitted to the next screen-line \r
+  // e.g.: "\wideabcde ... fghi", if "fghi" also has width directive but is splitted to the next screen-line\r
   // different from that of "\wideabcde", we should remember the width directive.\r
   //\r
   AllocateSize  = 0x20;\r
   // different from that of "\wideabcde", we should remember the width directive.\r
   //\r
   AllocateSize  = 0x20;\r
@@ -1256,9 +1256,9 @@ ProcessHelpString (
     *FormattedString = NULL;\r
   }\r
 \r
     *FormattedString = NULL;\r
   }\r
 \r
-  for (PrevCurrIndex = 0, CurrIndex  = 0, LineCount   = 0, LastSpaceIndex = 0, \r
-       IndexArray[0] = 0, GlyphWidth = 1, GlyphOffset = 0, LastSpaceGlyphWidth = 1, LineStartGlyphWidth = 1; \r
-       (StringPtr[CurrIndex] != CHAR_NULL); \r
+  for (PrevCurrIndex = 0, CurrIndex  = 0, LineCount   = 0, LastSpaceIndex = 0,\r
+       IndexArray[0] = 0, GlyphWidth = 1, GlyphOffset = 0, LastSpaceGlyphWidth = 1, LineStartGlyphWidth = 1;\r
+       (StringPtr[CurrIndex] != CHAR_NULL);\r
        CurrIndex ++) {\r
 \r
     if (LineCount == AllocateSize) {\r
        CurrIndex ++) {\r
 \r
     if (LineCount == AllocateSize) {\r
@@ -1272,7 +1272,7 @@ ProcessHelpString (
     }\r
 \r
     switch (StringPtr[CurrIndex]) {\r
     }\r
 \r
     switch (StringPtr[CurrIndex]) {\r
-    \r
+\r
       case NARROW_CHAR:\r
       case WIDE_CHAR:\r
         GlyphWidth = ((StringPtr[CurrIndex] == WIDE_CHAR) ? 2 : 1);\r
       case NARROW_CHAR:\r
       case WIDE_CHAR:\r
         GlyphWidth = ((StringPtr[CurrIndex] == WIDE_CHAR) ? 2 : 1);\r
@@ -1337,12 +1337,12 @@ ProcessHelpString (
             GlyphWidth = LastSpaceGlyphWidth;\r
           } else if (GlyphOffset > BlockWidth) {\r
             //\r
             GlyphWidth = LastSpaceGlyphWidth;\r
           } else if (GlyphOffset > BlockWidth) {\r
             //\r
-            // the word is too long to fit one screen-line and we don't get the chance \r
+            // the word is too long to fit one screen-line and we don't get the chance\r
             // of GlyphOffset == BlockWidth because GlyphWidth = 2\r
             //\r
             CurrIndex --;\r
           }\r
             // of GlyphOffset == BlockWidth because GlyphWidth = 2\r
             //\r
             CurrIndex --;\r
           }\r
-          \r
+\r
           IndexArray[LineCount*3]   = PrevCurrIndex;\r
           IndexArray[LineCount*3+1] = CurrIndex + 1;\r
           IndexArray[LineCount*3+2] = LineStartGlyphWidth;\r
           IndexArray[LineCount*3]   = PrevCurrIndex;\r
           IndexArray[LineCount*3+1] = CurrIndex + 1;\r
           IndexArray[LineCount*3+2] = LineStartGlyphWidth;\r
@@ -1392,8 +1392,8 @@ ProcessHelpString (
   for (CurrIndex = 0; CurrIndex < LineCount; CurrIndex ++) {\r
     *(*FormattedString + CurrIndex * 2 * (BlockWidth + 1)) = (CHAR16)((IndexArray[CurrIndex*3+2] == 2) ? WIDE_CHAR : NARROW_CHAR);\r
     StrnCpy (\r
   for (CurrIndex = 0; CurrIndex < LineCount; CurrIndex ++) {\r
     *(*FormattedString + CurrIndex * 2 * (BlockWidth + 1)) = (CHAR16)((IndexArray[CurrIndex*3+2] == 2) ? WIDE_CHAR : NARROW_CHAR);\r
     StrnCpy (\r
-      *FormattedString + CurrIndex * 2 * (BlockWidth + 1) + 1, \r
-      StringPtr + IndexArray[CurrIndex*3], \r
+      *FormattedString + CurrIndex * 2 * (BlockWidth + 1) + 1,\r
+      StringPtr + IndexArray[CurrIndex*3],\r
       IndexArray[CurrIndex*3+1]-IndexArray[CurrIndex*3]\r
       );\r
   }\r
       IndexArray[CurrIndex*3+1]-IndexArray[CurrIndex*3]\r
       );\r
   }\r