]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / SetupBrowserDxe / IfrParse.c
index 9bda482a4ac3301a5a867cf03d11b798302a9d85..3d28e7aa50b47f5a57d38db7cb3a72959d8f9a3b 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Parser for IFR binary encoding.\r
 \r
-Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>\r
 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
@@ -37,7 +37,7 @@ CreateStatement (
 {\r
   FORM_BROWSER_STATEMENT    *Statement;\r
   EFI_IFR_STATEMENT_HEADER  *StatementHdr;\r
-  INTN                      ConditionalExprCount; \r
+  INTN                      ConditionalExprCount;\r
 \r
   if (Form == NULL) {\r
     //\r
@@ -70,8 +70,8 @@ CreateStatement (
     //\r
     // Form is inside of suppressif\r
     //\r
-    \r
-    Statement->Expression = (FORM_EXPRESSION_LIST *) AllocatePool( \r
+\r
+    Statement->Expression = (FORM_EXPRESSION_LIST *) AllocatePool(\r
                                              (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));\r
     ASSERT (Statement->Expression != NULL);\r
     Statement->Expression->Count     = (UINTN) ConditionalExprCount;\r
@@ -246,7 +246,7 @@ CreateQuestion (
       // Check whether old string node already exist.\r
       //\r
       Find = FALSE;\r
-      if (!IsListEmpty(&Statement->Storage->NameValueListHead)) {  \r
+      if (!IsListEmpty(&Statement->Storage->NameValueListHead)) {\r
         Link = GetFirstNode (&Statement->Storage->NameValueListHead);\r
         while (!IsNull (&Statement->Storage->NameValueListHead, Link)) {\r
           NameValueNode = NAME_VALUE_NODE_FROM_LINK (Link);\r
@@ -326,7 +326,7 @@ InitializeConfigHdr (
 {\r
   CHAR16      *Name;\r
 \r
-  if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER || \r
+  if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER ||\r
       Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {\r
     Name = Storage->BrowserStorage->Name;\r
   } else {\r
@@ -621,7 +621,7 @@ GetFstStgFromVarId (
   @param  Storage              browser storage info.\r
 \r
   @return Pointer to a FORMSET_STORAGE data structure.\r
-  \r
+\r
 \r
 **/\r
 FORMSET_STORAGE *\r
@@ -707,7 +707,7 @@ InitializeRequestElement (
   //\r
   // Prepare <RequestElement>\r
   //\r
-  if (Storage->Type == EFI_HII_VARSTORE_BUFFER || \r
+  if (Storage->Type == EFI_HII_VARSTORE_BUFFER ||\r
       Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) {\r
     StrLen = UnicodeSPrint (\r
                RequestElement,\r
@@ -1522,7 +1522,7 @@ ParseOpCodes (
         ExpressionOpCode->ValueType = ((EFI_IFR_GET *) OpCodeData)->VarStoreType;\r
         switch (ExpressionOpCode->ValueType) {\r
         case EFI_IFR_TYPE_BOOLEAN:\r
-        case EFI_IFR_TYPE_NUM_SIZE_8: \r
+        case EFI_IFR_TYPE_NUM_SIZE_8:\r
           ExpressionOpCode->ValueWidth = 1;\r
           break;\r
 \r
@@ -1563,8 +1563,8 @@ ParseOpCodes (
         }\r
         CopyMem (&ExpressionOpCode->VarStoreInfo.VarName,   &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarName,   sizeof (EFI_STRING_ID));\r
         CopyMem (&ExpressionOpCode->VarStoreInfo.VarOffset, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarOffset, sizeof (UINT16));\r
-        if ((ExpressionOpCode->VarStorage != NULL) && \r
-            (ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE || \r
+        if ((ExpressionOpCode->VarStorage != NULL) &&\r
+            (ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE ||\r
              ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) {\r
           ExpressionOpCode->ValueName = GetToken (ExpressionOpCode->VarStoreInfo.VarName, FormSet->HiiHandle);\r
           if (ExpressionOpCode->ValueName == NULL) {\r
@@ -1754,7 +1754,7 @@ ParseOpCodes (
         //\r
         // Form is inside of suppressif\r
         //\r
-        CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( \r
+        CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(\r
                                                  (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));\r
         ASSERT (CurrentForm->SuppressExpression != NULL);\r
         CurrentForm->SuppressExpression->Count     = (UINTN) ConditionalExprCount;\r
@@ -1820,7 +1820,7 @@ ParseOpCodes (
         //\r
         // Form is inside of suppressif\r
         //\r
-        CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( \r
+        CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(\r
                                                  (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));\r
         ASSERT (CurrentForm->SuppressExpression != NULL);\r
         CurrentForm->SuppressExpression->Count     = (UINTN) ConditionalExprCount;\r
@@ -1972,7 +1972,7 @@ ParseOpCodes (
           }\r
         }\r
       }\r
-      CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_REF);        \r
+      CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_REF);\r
       InitializeRequestElement (FormSet, CurrentStatement, CurrentForm);\r
       break;\r
 \r
@@ -2282,7 +2282,7 @@ ParseOpCodes (
         //\r
         // Form is inside of suppressif\r
         //\r
-        CurrentOption->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( \r
+        CurrentOption->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool(\r
                                                  (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *))));\r
         ASSERT (CurrentOption->SuppressExpression != NULL);\r
         CurrentOption->SuppressExpression->Count     = (UINTN) ConditionalExprCount;\r
@@ -2396,11 +2396,11 @@ ParseOpCodes (
       }\r
 \r
       if (SuppressForOption) {\r
-        PushConditionalExpression(CurrentExpression, ExpressOption);       \r
+        PushConditionalExpression(CurrentExpression, ExpressOption);\r
       } else if (SuppressForQuestion) {\r
-        PushConditionalExpression(CurrentExpression, ExpressStatement);  \r
+        PushConditionalExpression(CurrentExpression, ExpressStatement);\r
       } else {\r
-        PushConditionalExpression(CurrentExpression, ExpressForm);  \r
+        PushConditionalExpression(CurrentExpression, ExpressForm);\r
       }\r
 \r
       //\r
@@ -2655,7 +2655,7 @@ ParseOpCodes (
       default:\r
         ASSERT (ParentStatement != NULL);\r
         ParentStatement->Locked = TRUE;\r
-      }      \r
+      }\r
       break;\r
 \r
     //\r
@@ -2679,7 +2679,7 @@ ParseOpCodes (
         ResetScopeStack ();\r
         return Status;\r
       }\r
-      \r
+\r
       //\r
       // Parent statement end tag found, update ParentStatement info.\r
       //\r
@@ -2722,7 +2722,7 @@ ParseOpCodes (
 \r
       case EFI_IFR_SUPPRESS_IF_OP:\r
         if (SuppressForOption) {\r
-          PopConditionalExpression(ExpressOption);      \r
+          PopConditionalExpression(ExpressOption);\r
         } else if (SuppressForQuestion) {\r
           PopConditionalExpression(ExpressStatement);\r
         } else {\r