summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
diff options
context:
space:
mode:
authorLiming Gao <liming.gao@intel.com>2018-06-27 21:08:52 +0800
committerLiming Gao <liming.gao@intel.com>2018-06-28 11:19:45 +0800
commitd1102dba7210b95e41d06c2338a22ba6af248645 (patch)
tree8b4af076b5d6f2aa7f35563d4defcca4d4bfdd87 /MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
parentca79bab7af4770c5eb578f6d495af01705aedb79 (diff)
downloadedk2-d1102dba7210b95e41d06c2338a22ba6af248645.zip
edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.gz
edk2-d1102dba7210b95e41d06c2338a22ba6af248645.tar.bz2
MdeModulePkg: Clean up source files
1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao <liming.gao@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c')
-rw-r--r--MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c58
1 files changed, 29 insertions, 29 deletions
diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
index d02c0bf..cf829a3 100644
--- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
+++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c
@@ -1,7 +1,7 @@
/** @file
Implementation for handling user input from the User Interfaces.
-Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -34,14 +34,14 @@ GetFieldFromOp (
if (OpCode->OpCode == EFI_IFR_STRING_OP) {
StringOp = (EFI_IFR_STRING *) OpCode;
*Minimum = StringOp->MinSize;
- *Maximum = StringOp->MaxSize;
+ *Maximum = StringOp->MaxSize;
} else if (OpCode->OpCode == EFI_IFR_PASSWORD_OP) {
PasswordOp = (EFI_IFR_PASSWORD *) OpCode;
*Minimum = PasswordOp->MinSize;
- *Maximum = PasswordOp->MaxSize;
+ *Maximum = PasswordOp->MaxSize;
} else {
*Minimum = 0;
- *Maximum = 0;
+ *Maximum = 0;
}
}
@@ -160,11 +160,11 @@ ReadString (
if (!IsPassword) {
PrintStringAt (Start + 1, Top + 3, BufferedString);
}
-
+
gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK));
gST->ConOut->SetCursorPosition (gST->ConOut, Start + GetStringWidth (StringPtr) / 2, Top + 3);
}
-
+
do {
Status = WaitForKeyStroke (&Key);
ASSERT_EFI_ERROR (Status);
@@ -264,7 +264,7 @@ ReadString (
for (Index = 0; Index < CurrentCursor; Index++) {
TempString[Index] = StringPtr[Index];
}
- TempString[Index] = CHAR_NULL;
+ TempString[Index] = CHAR_NULL;
StrCatS (TempString, MaxLen, KeyPad);
StrCatS (TempString, MaxLen, StringPtr + CurrentCursor);
StrCpyS (StringPtr, MaxLen, TempString);
@@ -361,7 +361,7 @@ AdjustQuestionValue (
QuestionValue->Value.date.Day = Maximum;
}
}
-
+
//
// Change the Year area.
//
@@ -400,7 +400,7 @@ GetValueFromNum (
EFI_IFR_NUMERIC *NumericOp;
NumericOp = (EFI_IFR_NUMERIC *) OpCode;
-
+
switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) {
case EFI_IFR_NUMERIC_SIZE_1:
if (IntInput) {
@@ -415,7 +415,7 @@ GetValueFromNum (
*Step = NumericOp->data.u8.Step;
*StorageWidth = (UINT16) sizeof (UINT8);
break;
-
+
case EFI_IFR_NUMERIC_SIZE_2:
if (IntInput) {
*Minimum = (INT64) (INT16) NumericOp->data.u16.MinValue;
@@ -429,7 +429,7 @@ GetValueFromNum (
*Step = NumericOp->data.u16.Step;
*StorageWidth = (UINT16) sizeof (UINT16);
break;
-
+
case EFI_IFR_NUMERIC_SIZE_4:
if (IntInput) {
*Minimum = (INT64) (INT32) NumericOp->data.u32.MinValue;
@@ -443,7 +443,7 @@ GetValueFromNum (
*Step = NumericOp->data.u32.Step;
*StorageWidth = (UINT16) sizeof (UINT32);
break;
-
+
case EFI_IFR_NUMERIC_SIZE_8:
if (IntInput) {
*Minimum = (INT64) NumericOp->data.u64.MinValue;
@@ -457,7 +457,7 @@ GetValueFromNum (
*Step = NumericOp->data.u64.Step;
*StorageWidth = (UINT16) sizeof (UINT64);
break;
-
+
default:
break;
}
@@ -557,8 +557,8 @@ GetNumericInput (
case 1:
switch (QuestionValue->Value.date.Month) {
case 2:
- if ((QuestionValue->Value.date.Year % 4) == 0 &&
- ((QuestionValue->Value.date.Year % 100) != 0 ||
+ if ((QuestionValue->Value.date.Year % 4) == 0 &&
+ ((QuestionValue->Value.date.Year % 100) != 0 ||
(QuestionValue->Value.date.Year % 400) == 0)) {
Maximum = 29;
} else {
@@ -574,7 +574,7 @@ GetNumericInput (
default:
Maximum = 31;
break;
- }
+ }
EraseLen = 3;
EditValue = QuestionValue->Value.date.Day;
@@ -907,7 +907,7 @@ EnterCarriageReturn:
if (IntInput) {
//
// After user input Enter, need to check whether the input value.
- // If input a negative value, should compare with maximum value.
+ // If input a negative value, should compare with maximum value.
// else compare with the minimum value.
//
if (Negative) {
@@ -977,7 +977,7 @@ EnterCarriageReturn:
// Sample like: 2012.02.29 -> 2013.02.29 -> 2013.02.01
// 2013.03.29 -> 2013.02.29 -> 2013.02.28
//
- if (Question->OpCode->OpCode == EFI_IFR_DATE_OP &&
+ if (Question->OpCode->OpCode == EFI_IFR_DATE_OP &&
(MenuOption->Sequence == 0 || MenuOption->Sequence == 2)) {
AdjustQuestionValue (QuestionValue, (UINT8)MenuOption->Sequence);
}
@@ -1136,12 +1136,12 @@ AdjustOptionOrder (
break;
}
}
-
+
*PopUpMenuLines = Index;
-
+
//
// Prepare HiiValue array
- //
+ //
HiiValueArray = AllocateZeroPool (*PopUpMenuLines * sizeof (EFI_HII_VALUE));
ASSERT (HiiValueArray != NULL);
@@ -1149,21 +1149,21 @@ AdjustOptionOrder (
HiiValueArray[Index].Type = ValueType;
HiiValueArray[Index].Value.u64 = GetArrayData (ValueArray, ValueType, Index);
}
-
+
for (Index = 0; Index < *PopUpMenuLines; Index++) {
OneOfOption = ValueToOption (Question, &HiiValueArray[*PopUpMenuLines - Index - 1]);
if (OneOfOption == NULL) {
return EFI_NOT_FOUND;
}
-
+
RemoveEntryList (&OneOfOption->Link);
-
+
//
// Insert to head.
//
InsertHeadList (&Question->OptionListHead, &OneOfOption->Link);
}
-
+
FreePool (HiiValueArray);
return EFI_SUCCESS;
@@ -1191,13 +1191,13 @@ IsValuesEqual (
case EFI_IFR_TYPE_BOOLEAN:
case EFI_IFR_TYPE_NUM_SIZE_8:
return (BOOLEAN) (Value1->u8 == Value2->u8);
-
+
case EFI_IFR_TYPE_NUM_SIZE_16:
return (BOOLEAN) (Value1->u16 == Value2->u16);
-
+
case EFI_IFR_TYPE_NUM_SIZE_32:
return (BOOLEAN) (Value1->u32 == Value2->u32);
-
+
case EFI_IFR_TYPE_NUM_SIZE_64:
return (BOOLEAN) (Value1->u64 == Value2->u64);
@@ -1660,7 +1660,7 @@ TheKey:
gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute);
return EFI_SUCCESS;
-
+
default:
break;
}