]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
MdeModulePkg: Clean up source files
[mirror_edk2.git] / MdeModulePkg / Universal / DisplayEngineDxe / InputHandler.c
index d02c0bf0742433ef5f0ba2187dad22a410539848..cf829a32145ffa955d8f32b7347e83738c667320 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
 Implementation for handling user input from the User Interfaces.\r
 \r
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2004 - 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
@@ -34,14 +34,14 @@ GetFieldFromOp (
   if (OpCode->OpCode == EFI_IFR_STRING_OP) {\r
     StringOp = (EFI_IFR_STRING *) OpCode;\r
     *Minimum = StringOp->MinSize;\r
-    *Maximum = StringOp->MaxSize;    \r
+    *Maximum = StringOp->MaxSize;\r
   } else if (OpCode->OpCode == EFI_IFR_PASSWORD_OP) {\r
     PasswordOp = (EFI_IFR_PASSWORD *) OpCode;\r
     *Minimum = PasswordOp->MinSize;\r
-    *Maximum = PasswordOp->MaxSize;       \r
+    *Maximum = PasswordOp->MaxSize;\r
   } else {\r
     *Minimum = 0;\r
-    *Maximum = 0;       \r
+    *Maximum = 0;\r
   }\r
 }\r
 \r
@@ -160,11 +160,11 @@ ReadString (
     if (!IsPassword) {\r
       PrintStringAt (Start + 1, Top + 3, BufferedString);\r
     }\r
-    \r
+\r
     gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));\r
     gST->ConOut->SetCursorPosition (gST->ConOut, Start + GetStringWidth (StringPtr) / 2, Top + 3);\r
   }\r
-  \r
+\r
   do {\r
     Status = WaitForKeyStroke (&Key);\r
     ASSERT_EFI_ERROR (Status);\r
@@ -264,7 +264,7 @@ ReadString (
           for (Index = 0; Index < CurrentCursor; Index++) {\r
             TempString[Index] = StringPtr[Index];\r
           }\r
-                 TempString[Index] = CHAR_NULL;\r
+      TempString[Index] = CHAR_NULL;\r
           StrCatS (TempString, MaxLen, KeyPad);\r
           StrCatS (TempString, MaxLen, StringPtr + CurrentCursor);\r
           StrCpyS (StringPtr, MaxLen, TempString);\r
@@ -361,7 +361,7 @@ AdjustQuestionValue (
       QuestionValue->Value.date.Day = Maximum;\r
     }\r
   }\r
-  \r
+\r
   //\r
   // Change the Year area.\r
   //\r
@@ -400,7 +400,7 @@ GetValueFromNum (
   EFI_IFR_NUMERIC       *NumericOp;\r
 \r
   NumericOp = (EFI_IFR_NUMERIC *) OpCode;\r
-  \r
+\r
   switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) {\r
   case EFI_IFR_NUMERIC_SIZE_1:\r
     if (IntInput) {\r
@@ -415,7 +415,7 @@ GetValueFromNum (
     *Step    = NumericOp->data.u8.Step;\r
     *StorageWidth = (UINT16) sizeof (UINT8);\r
     break;\r
-  \r
+\r
   case EFI_IFR_NUMERIC_SIZE_2:\r
     if (IntInput) {\r
       *Minimum = (INT64) (INT16) NumericOp->data.u16.MinValue;\r
@@ -429,7 +429,7 @@ GetValueFromNum (
     *Step    = NumericOp->data.u16.Step;\r
     *StorageWidth = (UINT16) sizeof (UINT16);\r
     break;\r
-  \r
+\r
   case EFI_IFR_NUMERIC_SIZE_4:\r
     if (IntInput) {\r
       *Minimum = (INT64) (INT32) NumericOp->data.u32.MinValue;\r
@@ -443,7 +443,7 @@ GetValueFromNum (
     *Step    = NumericOp->data.u32.Step;\r
     *StorageWidth = (UINT16) sizeof (UINT32);\r
     break;\r
-  \r
+\r
   case EFI_IFR_NUMERIC_SIZE_8:\r
     if (IntInput) {\r
       *Minimum = (INT64) NumericOp->data.u64.MinValue;\r
@@ -457,7 +457,7 @@ GetValueFromNum (
     *Step    = NumericOp->data.u64.Step;\r
     *StorageWidth = (UINT16) sizeof (UINT64);\r
     break;\r
-  \r
+\r
   default:\r
     break;\r
   }\r
@@ -557,8 +557,8 @@ GetNumericInput (
     case 1:\r
       switch (QuestionValue->Value.date.Month) {\r
       case 2:\r
-        if ((QuestionValue->Value.date.Year % 4) == 0  && \r
-            ((QuestionValue->Value.date.Year % 100) != 0 || \r
+        if ((QuestionValue->Value.date.Year % 4) == 0  &&\r
+            ((QuestionValue->Value.date.Year % 100) != 0 ||\r
             (QuestionValue->Value.date.Year % 400) == 0)) {\r
           Maximum = 29;\r
         } else {\r
@@ -574,7 +574,7 @@ GetNumericInput (
       default:\r
         Maximum = 31;\r
         break;\r
-      } \r
+      }\r
 \r
       EraseLen = 3;\r
       EditValue = QuestionValue->Value.date.Day;\r
@@ -907,7 +907,7 @@ EnterCarriageReturn:
       if (IntInput) {\r
         //\r
         // After user input Enter, need to check whether the input value.\r
-        // If input a negative value, should compare with maximum value. \r
+        // If input a negative value, should compare with maximum value.\r
         // else compare with the minimum value.\r
         //\r
         if (Negative) {\r
@@ -977,7 +977,7 @@ EnterCarriageReturn:
       // Sample like: 2012.02.29 -> 2013.02.29 -> 2013.02.01\r
       //              2013.03.29 -> 2013.02.29 -> 2013.02.28\r
       //\r
-      if (Question->OpCode->OpCode  == EFI_IFR_DATE_OP && \r
+      if (Question->OpCode->OpCode  == EFI_IFR_DATE_OP &&\r
         (MenuOption->Sequence == 0 || MenuOption->Sequence == 2)) {\r
         AdjustQuestionValue (QuestionValue, (UINT8)MenuOption->Sequence);\r
       }\r
@@ -1136,12 +1136,12 @@ AdjustOptionOrder (
       break;\r
     }\r
   }\r
-  \r
+\r
   *PopUpMenuLines = Index;\r
-  \r
+\r
   //\r
   // Prepare HiiValue array\r
-  //  \r
+  //\r
   HiiValueArray = AllocateZeroPool (*PopUpMenuLines * sizeof (EFI_HII_VALUE));\r
   ASSERT (HiiValueArray != NULL);\r
 \r
@@ -1149,21 +1149,21 @@ AdjustOptionOrder (
     HiiValueArray[Index].Type = ValueType;\r
     HiiValueArray[Index].Value.u64 = GetArrayData (ValueArray, ValueType, Index);\r
   }\r
-  \r
+\r
   for (Index = 0; Index < *PopUpMenuLines; Index++) {\r
     OneOfOption = ValueToOption (Question, &HiiValueArray[*PopUpMenuLines - Index - 1]);\r
     if (OneOfOption == NULL) {\r
       return EFI_NOT_FOUND;\r
     }\r
-  \r
+\r
     RemoveEntryList (&OneOfOption->Link);\r
-  \r
+\r
     //\r
     // Insert to head.\r
     //\r
     InsertHeadList (&Question->OptionListHead, &OneOfOption->Link);\r
   }\r
-  \r
+\r
   FreePool (HiiValueArray);\r
 \r
   return EFI_SUCCESS;\r
@@ -1191,13 +1191,13 @@ IsValuesEqual (
   case EFI_IFR_TYPE_BOOLEAN:\r
   case EFI_IFR_TYPE_NUM_SIZE_8:\r
     return (BOOLEAN) (Value1->u8 == Value2->u8);\r
-  \r
+\r
   case EFI_IFR_TYPE_NUM_SIZE_16:\r
     return (BOOLEAN) (Value1->u16 == Value2->u16);\r
-  \r
+\r
   case EFI_IFR_TYPE_NUM_SIZE_32:\r
     return (BOOLEAN) (Value1->u32 == Value2->u32);\r
-  \r
+\r
   case EFI_IFR_TYPE_NUM_SIZE_64:\r
     return (BOOLEAN) (Value1->u64 == Value2->u64);\r
 \r
@@ -1660,7 +1660,7 @@ TheKey:
       gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute);\r
 \r
       return EFI_SUCCESS;\r
-      \r
+\r
     default:\r
       break;\r
     }\r