]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelFrameworkModulePkg/Universal/HiiDataBaseDxe/Strings.c
Modules clean up.
[mirror_edk2.git] / IntelFrameworkModulePkg / Universal / HiiDataBaseDxe / Strings.c
index a8b04c088445c1ddf699430312be9c064b924194..5928f1b33087aaae9c9661139eabeced88c775be 100644 (file)
@@ -1,13 +1,13 @@
 /*++\r
 \r
-Copyright (c) 2006 - 2007, Intel Corporation                                                         \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
+Copyright (c) 2006 - 2007, Intel Corporation\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
+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
 Module Name:\r
 \r
@@ -20,11 +20,6 @@ Abstract:
 --*/\r
 \r
 \r
-//\r
-// Include common header file for this module.\r
-//\r
-#include "CommonHeader.h"\r
-\r
 #include "HiiDatabase.h"\r
 \r
 STATIC\r
@@ -56,10 +51,10 @@ HiiTestString (
 \r
 Routine Description:\r
   Test if all of the characters in a string have corresponding font characters.\r
-  \r
+\r
 Arguments:\r
 \r
-Returns: \r
+Returns:\r
 \r
 --*/\r
 {\r
@@ -75,7 +70,7 @@ Returns:
   HiiData     = EFI_HII_DATA_FROM_THIS (This);\r
   GlobalData  = HiiData->GlobalData;\r
 \r
-  \r
+\r
   //\r
   // Rewind through the string looking for a glyph width identifier\r
   // If no width identifier exists, we assume string has narrow width identifier\r
@@ -155,18 +150,18 @@ Routine Description:
   We will make a buffer the size of the package + EfiStrSize of the new string.  We will\r
   copy the string package that first gets changed and the following language packages until\r
   we encounter the NULL string package.  All this time we will ensure that the offsets have\r
-  been adjusted.  \r
+  been adjusted.\r
 \r
 Arguments:\r
-  \r
+\r
   This         -  Pointer to the HII protocol.\r
   Language     -  Pointer to buffer which contains the language code of this NewString.\r
   Handle       -  Handle of the package instance to be processed.\r
   Reference    -  The token number for the string. If 0, new string token to be returned through this parameter.\r
-  NewString    -  Buffer pointer for the new string. \r
+  NewString    -  Buffer pointer for the new string.\r
   ResetStrings -  Indicate if we are resetting a string.\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
   EFI_SUCCESS            - The string has been added or reset to Hii database.\r
   EFI_INVALID_PARAMETER  - Some parameter passed in is invalid.\r
@@ -661,11 +656,11 @@ Routine Description:
   We will make a buffer the size of the package + StrSize of the new string.  We will\r
   copy the string package that first gets changed and the following language packages until\r
   we encounter the NULL string package.  All this time we will ensure that the offsets have\r
-  been adjusted.  \r
+  been adjusted.\r
 \r
 Arguments:\r
-  \r
-Returns: \r
+\r
+Returns:\r
 \r
 --*/\r
 {\r
@@ -730,12 +725,12 @@ HiiResetStrings (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
     This function removes any new strings that were added after the initial string export for this handle.\r
 \r
 Arguments:\r
 \r
-Returns: \r
+Returns:\r
 \r
 --*/\r
 {\r
@@ -787,7 +782,7 @@ HiiGetString (
 /*++\r
 \r
 Routine Description:\r
-  \r
+\r
   This function extracts a string from a package already registered with the EFI HII database.\r
 \r
 Arguments:\r
@@ -795,7 +790,7 @@ Arguments:
   Handle          - The HII handle on which the string resides.\r
   Token           - The string token assigned to the string.\r
   Raw             - If TRUE, the string is returned unedited in the internal storage format described\r
-                    above. If false, the string returned is edited by replacing <cr> with <space> \r
+                    above. If false, the string returned is edited by replacing <cr> with <space>\r
                     and by removing special characters such as the <wide> prefix.\r
   LanguageString  - Pointer to a NULL-terminated string containing a single ISO 639-2 language\r
                     identifier, indicating the language to print. If the LanguageString is empty (starts\r
@@ -805,11 +800,11 @@ Arguments:
   StringBuffer    - The buffer designed to receive the characters in the string. Type EFI_STRING is\r
                     defined in String.\r
 \r
-Returns: \r
+Returns:\r
   EFI_INVALID_PARAMETER - If input parameter is invalid.\r
   EFI_BUFFER_TOO_SMALL  - If the *BufferLength is too small.\r
   EFI_SUCCESS           - Operation is successful.\r
-  \r
+\r
 --*/\r
 {\r
   EFI_HII_PACKAGE_INSTANCE  *PackageInstance;\r
@@ -930,11 +925,11 @@ LangNotFound:
     //\r
     // Back to the start of package.\r
     //\r
-    StringPack = (VOID*)(((UINT8*)StringPack) - Length); \r
+    StringPack = (VOID*)(((UINT8*)StringPack) - Length);\r
     //\r
     // Terminating zero sub-pack.\r
     //\r
-    Length += sizeof (EFI_HII_STRING_PACK); \r
+    Length += sizeof (EFI_HII_STRING_PACK);\r
 \r
     //\r
     // If trying to get the entire string package and have insufficient space.  Return error.\r
@@ -1009,11 +1004,11 @@ LangNotFound:
           // Skip "Narraw, Wide, NoBreak"\r
           //\r
           if (CompareMem (Local, &Narrow,  2) &&\r
-              CompareMem (Local, &Wide,    2) && \r
-              CompareMem (Local, &NoBreak, 2)) {          \r
-            CopyMem (&StringBuffer[Count++], Local, 2);          \r
-          }        \r
-        } \r
+              CompareMem (Local, &Wide,    2) &&\r
+              CompareMem (Local, &NoBreak, 2)) {\r
+            CopyMem (&StringBuffer[Count++], Local, 2);\r
+          }\r
+        }\r
         //\r
         // Add "NULL" at the end.\r
         //\r
@@ -1051,13 +1046,13 @@ HiiGetLine (
 \r
 Routine Description:\r
 \r
-  This function allows a program to extract a part of a string of not more than a given width.  \r
-  With repeated calls, this allows a calling program to extract "lines" of text that fit inside \r
+  This function allows a program to extract a part of a string of not more than a given width.\r
+  With repeated calls, this allows a calling program to extract "lines" of text that fit inside\r
   columns.  The effort of measuring the fit of strings inside columns is localized to this call.\r
 \r
 Arguments:\r
 \r
-Returns: \r
+Returns:\r
 \r
 --*/\r
 {\r