]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ECC clean up.
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Jan 2009 08:46:31 +0000 (08:46 +0000)
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 8 Jan 2009 08:46:31 +0000 (08:46 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@7213 6f19259b-4bc3-4df7-8a09-765794883524

MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c
MdeModulePkg/Universal/Console/TerminalDxe/Terminal.c

index dc06160067fc03fd91c5d2670d9ab32fb982f96c..a0983baf697681e4aef936223e51108b57cbd112 100644 (file)
@@ -211,10 +211,10 @@ Error:
 \r
 \r
 /**\r
-  Start this driver on Controller by opening Graphics Output protocol or \r
+  Start this driver on Controller by opening Graphics Output protocol or\r
   UGA Draw protocol, and installing Simple Text Out protocol on Controller.\r
   (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
-  \r
+\r
   @param  This                 Protocol instance pointer.\r
   @param  Controller           Handle of device to bind driver to\r
   @param  RemainingDevicePath  Optional parameter use to pick a specific child\r
@@ -297,18 +297,18 @@ GraphicsConsoleControllerDriverStart (
     //\r
     //    +--------------------------------+ <-- Package\r
     //    |                                |\r
-    //    |    PackageLength(4 bytes)      | \r
+    //    |    PackageLength(4 bytes)      |\r
     //    |                                |\r
     //    |--------------------------------| <-- SimplifiedFont\r
     //    |                                |\r
-    //    |EFI_HII_SIMPLE_FONT_PACKAGE_HDR | \r
+    //    |EFI_HII_SIMPLE_FONT_PACKAGE_HDR |\r
     //    |                                |\r
     //    |--------------------------------| <-- Location\r
     //    |                                |\r
     //    |     gUsStdNarrowGlyphData      |\r
     //    |                                |\r
     //    +--------------------------------+\r
-    \r
+\r
     PackageLength   = sizeof (EFI_HII_SIMPLE_FONT_PACKAGE_HDR) + NarrowFontSize + 4;\r
     Package = AllocateZeroPool (PackageLength);\r
     if (Package == NULL) {\r
@@ -370,10 +370,10 @@ GraphicsConsoleControllerDriverStart (
                    &ModeNumber\r
                    );\r
     }\r
-    \r
+\r
     Mode = Private->GraphicsOutput->Mode;\r
-     \r
-    if (EFI_ERROR (Status) || (Mode->MaxMode)) {\r
+\r
+    if (EFI_ERROR (Status) || (Mode->MaxMode != 0)) {\r
       //\r
       // Set default mode failed or device don't support default mode, then get the current mode information\r
       //\r
@@ -564,10 +564,10 @@ Error:
 }\r
 \r
 /**\r
-  Stop this driver on Controller by removing Simple Text Out protocol \r
+  Stop this driver on Controller by removing Simple Text Out protocol\r
   and closing the Graphics Output Protocol or UGA Draw protocol on Controller.\r
   (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.)\r
-  \r
+\r
 \r
   @param  This              Protocol instance pointer.\r
   @param  Controller        Handle of device to stop driver on\r
@@ -576,7 +576,7 @@ Error:
   @param  ChildHandleBuffer List of Child Handles to Stop.\r
 \r
   @retval EFI_SUCCESS       This driver is removed Controller.\r
-  @retval EFI_NOT_STARTED   Simple Text Out protocol could not be found the \r
+  @retval EFI_NOT_STARTED   Simple Text Out protocol could not be found the\r
                             Controller.\r
   @retval other             This driver was not removed from this device.\r
 \r
@@ -659,17 +659,17 @@ GraphicsConsoleControllerDriverStop (
   for the Graphics Console device based on Graphics Output Protocol.\r
 \r
   If yes, set the graphic devcice's current mode to this specific mode.\r
-  \r
+\r
   @param  GraphicsOutput        Graphics Output Protocol instance pointer.\r
   @param  HorizontalResolution  User defined horizontal resolution\r
   @param  VerticalResolution    User defined vertical resolution.\r
   @param  CurrentModeNumber     Current specific mode to be check.\r
 \r
   @retval EFI_SUCCESS       The mode is supported.\r
-  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics \r
+  @retval EFI_UNSUPPORTED   The specific mode is out of range of graphics\r
                             device supported.\r
-  @retval other             The specific mode does not support user defined \r
-                            resolution or failed to set the current mode to the \r
+  @retval other             The specific mode does not support user defined\r
+                            resolution or failed to set the current mode to the\r
                             specific mode on graphics device.\r
 \r
 **/\r
@@ -689,7 +689,7 @@ CheckModeSupported (
 \r
   Status  = EFI_SUCCESS;\r
   MaxMode = GraphicsOutput->Mode->MaxMode;\r
-  \r
+\r
   for (ModeNumber = 0; ModeNumber < MaxMode; ModeNumber++) {\r
     Status = GraphicsOutput->QueryMode (\r
                        GraphicsOutput,\r
@@ -722,9 +722,9 @@ CheckModeSupported (
 /**\r
   Locate HII Database protocol and HII Font protocol.\r
 \r
-  @retval  EFI_SUCCESS     HII Database protocol and HII Font protocol \r
+  @retval  EFI_SUCCESS     HII Database protocol and HII Font protocol\r
                            are located successfully.\r
-  @return  other           Failed to locate HII Database protocol or \r
+  @return  other           Failed to locate HII Database protocol or\r
                            HII Font protocol.\r
 \r
 **/\r
@@ -778,7 +778,7 @@ EfiLocateHiiProtocol (
 \r
 /**\r
   Reset the text output device hardware and optionally run diagnostics.\r
-  \r
+\r
   Implements SIMPLE_TEXT_OUTPUT.Reset().\r
   If ExtendeVerification is TRUE, then perform dependent Graphics Console\r
   device reset, and set display mode to mode 0.\r
@@ -809,7 +809,7 @@ GraphicsConsoleConOutReset (
 /**\r
   Write a Unicode string to the output device.\r
 \r
-  Implements SIMPLE_TEXT_OUTPUT.OutputString(). \r
+  Implements SIMPLE_TEXT_OUTPUT.OutputString().\r
   The Unicode string will be converted to Glyphs and will be\r
   sent to the Graphics Console.\r
 \r
@@ -1025,8 +1025,8 @@ GraphicsConsoleConOutOutputString (
       // Count is used to determine how many characters are used regardless of their attributes\r
       //\r
       for (Count = 0, Index = 0; (This->Mode->CursorColumn + Index) < MaxColumn; Count++, Index++) {\r
-        if (WString[Count] == CHAR_NULL || \r
-            WString[Count] == CHAR_BACKSPACE || \r
+        if (WString[Count] == CHAR_NULL ||\r
+            WString[Count] == CHAR_BACKSPACE ||\r
             WString[Count] == CHAR_LINEFEED ||\r
             WString[Count] == CHAR_CARRIAGE_RETURN ||\r
             WString[Count] == WIDE_CHAR ||\r
@@ -1036,7 +1036,7 @@ GraphicsConsoleConOutOutputString (
         //\r
         // Is the wide attribute on?\r
         //\r
-        if (This->Mode->Attribute & EFI_WIDE_ATTRIBUTE) {\r
+        if ((This->Mode->Attribute & EFI_WIDE_ATTRIBUTE) != 0) {\r
           //\r
           // If wide, add one more width unit than normal since we are going to increment at the end of the for loop\r
           //\r
@@ -1089,7 +1089,7 @@ GraphicsConsoleConOutOutputString (
 }\r
 \r
 /**\r
-  Verifies that all characters in a Unicode string can be output to the \r
+  Verifies that all characters in a Unicode string can be output to the\r
   target device.\r
 \r
   Implements SIMPLE_TEXT_OUTPUT.TestString().\r
@@ -1201,7 +1201,7 @@ Done:
 \r
 /**\r
   Sets the output device(s) to a specified mode.\r
-  \r
+\r
   Implements SIMPLE_TEXT_OUTPUT.SetMode().\r
   Set the Graphics Console to a specified mode. In this driver, we only support mode 0.\r
 \r
@@ -1209,7 +1209,7 @@ Done:
   @param  ModeNumber            The text mode to set.\r
 \r
   @retval EFI_SUCCESS           The requested text mode is set.\r
-  @retval EFI_DEVICE_ERROR      The requested text mode cannot be set because of \r
+  @retval EFI_DEVICE_ERROR      The requested text mode cannot be set because of\r
                                 Graphics Console device error.\r
   @retval EFI_UNSUPPORTED       The text mode number is not valid.\r
 \r
@@ -1402,7 +1402,7 @@ Done:
 \r
   @param  This                  Protocol instance pointer.\r
   @param  Attribute             The attribute to set. Bits 0..3 are the foreground\r
-                                color, and bits 4..6 are the background color. \r
+                                color, and bits 4..6 are the background color.\r
                                 All other bits are undefined and must be zero.\r
 \r
   @retval EFI_SUCCESS           The requested attribute is set.\r
@@ -1442,7 +1442,7 @@ GraphicsConsoleConOutSetAttribute (
 \r
 \r
 /**\r
-  Clears the output device(s) display to the currently selected background \r
+  Clears the output device(s) display to the currently selected background\r
   color.\r
 \r
   Implements SIMPLE_TEXT_OUTPUT.ClearScreen().\r
@@ -1702,7 +1702,7 @@ DrawUnicodeWeightAtCursorN (
 \r
   if (Private->GraphicsOutput != NULL) {\r
     //\r
-    // If Graphics Output protocol exists, using HII Font protocol to draw. \r
+    // If Graphics Output protocol exists, using HII Font protocol to draw.\r
     //\r
     Blt->Image.Screen = Private->GraphicsOutput;\r
 \r
@@ -1721,7 +1721,7 @@ DrawUnicodeWeightAtCursorN (
 \r
   } else if (FeaturePcdGet (PcdUgaConsumeSupport)) {\r
     //\r
-    // If Graphics Output protocol cannot be found and PcdUgaConsumeSupport enabled, \r
+    // If Graphics Output protocol cannot be found and PcdUgaConsumeSupport enabled,\r
     // using UGA Draw protocol to draw.\r
     //\r
     ASSERT (Private->UgaDraw!= NULL);\r
index f39cbcd8f5cb14ae4a74040b0100eebdb1bf5f73..2e8ea670097f25cf448659e0b389cc5e12ca7bd9 100644 (file)
@@ -104,7 +104,7 @@ TERMINAL_DEV  mTerminalDevTemplate = {
 };\r
 \r
 /**\r
-  Test to see if this driver supports Controller. \r
+  Test to see if this driver supports Controller.\r
 \r
   @param  This                Protocol instance pointer.\r
   @param  Controller          Handle of device to test\r
@@ -342,7 +342,7 @@ TerminalDriverBindingStart (
   if (!EFI_ERROR (Status)) {\r
     Status = EFI_SUCCESS;\r
     for (Index = 0; Index < EntryCount; Index++) {\r
-      if (OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) {\r
+      if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) {\r
         Status = EFI_ALREADY_STARTED;\r
       }\r
     }\r
@@ -728,7 +728,7 @@ Error:
 /**\r
   Stop this driver on Controller by closing Simple Text In, Simple Text\r
   In Ex, Simple Text Out protocol, and removing parent device path from\r
-  Console Device Environment Variables.    \r
+  Console Device Environment Variables.\r
 \r
   @param  This              Protocol instance pointer.\r
   @param  Controller        Handle of device to stop driver on\r
@@ -1141,7 +1141,7 @@ TerminalRemoveConsoleDevVariable (
   @param  VariableSize           Returns the size of the EFI variable that was read\r
 \r
   @return Dynamically allocated memory that contains a copy of the EFI variable.\r
-          Caller is responsible freeing the buffer. If variable was not read, \r
+          Caller is responsible freeing the buffer. If variable was not read,\r
           NULL returned.\r
 \r
 **/\r