summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/CustomizedDisplayLib
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/Library/CustomizedDisplayLib
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/Library/CustomizedDisplayLib')
-rw-r--r--MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c74
-rw-r--r--MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf8
-rw-r--r--MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c70
-rw-r--r--MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h22
-rw-r--r--MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni10
5 files changed, 92 insertions, 92 deletions
diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c
index e29892f..485815b 100644
--- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c
+++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c
@@ -2,13 +2,13 @@
This library class defines a set of interfaces to customize Display module
-Copyright (c) 2013 - 2014, 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 that accompanies this distribution.
+Copyright (c) 2013 - 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 that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
+http://opensource.org/licenses/bsd-license.php.
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -44,14 +44,14 @@ Statement
**/
/**
- This funtion defines Page Frame and Backgroud.
-
- Based on the above layout, it will be responsible for HeaderHeight, FooterHeight,
- StatusBarHeight and Backgroud. And, it will reserve Screen for Statement.
+ This funtion defines Page Frame and Backgroud.
+
+ Based on the above layout, it will be responsible for HeaderHeight, FooterHeight,
+ StatusBarHeight and Backgroud. And, it will reserve Screen for Statement.
@param[in] FormData Form Data to be shown in Page.
@param[out] ScreenForStatement Screen to be used for Statement. (Prompt, Value and Help)
-
+
@return Status
**/
EFI_STATUS
@@ -120,8 +120,8 @@ DisplayPageFrame (
This function updates customized key panel's help information.
The library will prepare those Strings for the basic key, ESC, Enter, Up/Down/Left/Right, +/-.
and arrange them in Footer panel.
-
- @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement.
+
+ @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement.
@param[in] Statement The statement current selected.
@param[in] Selected Whether or not a tag be selected. TRUE means Enter has hit this question.
**/
@@ -214,7 +214,7 @@ RefreshKeyHelp (
} else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) {
TimeOp = (EFI_IFR_TIME *) Statement->OpCode;
HexDisplay = (TimeOp->Flags & EFI_IFR_DISPLAY_UINT_HEX) == EFI_IFR_DISPLAY_UINT_HEX;
- }
+ }
switch (Statement->OpCode->OpCode) {
case EFI_IFR_ORDERED_LIST_OP:
case EFI_IFR_ONE_OF_OP:
@@ -232,7 +232,7 @@ RefreshKeyHelp (
if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) ||
(Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
PrintAt (
- ColumnWidth1,
+ ColumnWidth1,
StartColumnOfHelp,
BottomRowOfHelp,
L"%c%c%c%c%s",
@@ -259,7 +259,7 @@ RefreshKeyHelp (
//
// If it is a selected numeric with manual input, display different message
//
- if ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) ||
+ if ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) ||
(Statement->OpCode->OpCode == EFI_IFR_DATE_OP) ||
(Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) {
ColumnStr2 = HexDisplay ? gHexNumericInput : gDecNumericInput;
@@ -329,16 +329,16 @@ RefreshKeyHelp (
default:
break;
- }
+ }
}
/**
Update status bar.
- This function updates the status bar on the bottom of menu screen. It just shows StatusBar.
+ This function updates the status bar on the bottom of menu screen. It just shows StatusBar.
Original logic in this function should be splitted out.
- @param[in] MessageType The type of message to be shown. InputError or Configuration Changed.
+ @param[in] MessageType The type of message to be shown. InputError or Configuration Changed.
@param[in] State Show or Clear Message.
**/
VOID
@@ -395,17 +395,17 @@ UpdateStatusBar (
default:
break;
- }
+ }
}
/**
- Create popup window. It will replace CreateDialog().
+ Create popup window. It will replace CreateDialog().
This function draws OEM/Vendor specific pop up windows.
@param[out] Key User Input Key
@param ... String to be shown in Popup. The variable argument list is terminated by a NULL.
-
+
**/
VOID
EFIAPI
@@ -453,17 +453,17 @@ CreateDialog (
VA_START (Marker, Key);
while ((String = VA_ARG (Marker, CHAR16 *)) != NULL) {
LineNum ++;
-
+
if ((LibGetStringWidth (String) / 2) > LargestString) {
LargestString = (LibGetStringWidth (String) / 2);
}
- }
+ }
VA_END (Marker);
if ((LargestString + 2) > DimensionsWidth) {
LargestString = DimensionsWidth - 2;
}
-
+
CurrentAttribute = gST->ConOut->Mode->Attribute;
CursorVisible = gST->ConOut->Mode->CursorVisible;
gST->ConOut->EnableCursor (gST->ConOut, FALSE);
@@ -551,8 +551,8 @@ CreateDialog (
}
/**
- Confirm how to handle the changed data.
-
+ Confirm how to handle the changed data.
+
@return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values.
**/
UINTN
@@ -566,10 +566,10 @@ ConfirmDataChange (
EFI_INPUT_KEY Key;
gST->ConIn->ReadKeyStroke (gST->ConIn, &Key);
-
+
YesResponse = gYesResponse[0];
NoResponse = gNoResponse[0];
-
+
//
// If NV flag is up, prompt user
//
@@ -581,7 +581,7 @@ ConfirmDataChange (
((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (NoResponse | UPPER_LOWER_CASE_OFFSET)) &&
((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (YesResponse | UPPER_LOWER_CASE_OFFSET))
);
-
+
if (Key.ScanCode == SCAN_ESC) {
return BROWSER_ACTION_NONE;
} else if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (YesResponse | UPPER_LOWER_CASE_OFFSET)) {
@@ -594,7 +594,7 @@ ConfirmDataChange (
/**
OEM specifies whether Setup exits Page by ESC key.
- This function customized the behavior that whether Setup exits Page so that
+ This function customized the behavior that whether Setup exits Page so that
system able to boot when configuration is not changed.
@retval TRUE Exits FrontPage
@@ -610,14 +610,14 @@ FormExitPolicy (
}
/**
- Set Timeout value for a ceratain Form to get user response.
-
+ Set Timeout value for a ceratain Form to get user response.
+
This function allows to set timeout value on a ceratain form if necessary.
- If timeout is not zero, the form will exit if user has no response in timeout.
-
+ If timeout is not zero, the form will exit if user has no response in timeout.
+
@param[in] FormData Form Data to be shown in Page
- @return 0 No timeout for this form.
+ @return 0 No timeout for this form.
@return > 0 Timeout value in 100 ns units.
**/
UINT64
@@ -898,7 +898,7 @@ GetSubTitleTextColor (
Clear Screen to the initial state.
**/
VOID
-EFIAPI
+EFIAPI
ClearDisplayPage (
VOID
)
@@ -950,7 +950,7 @@ CustomizedDisplayLibDestructor (
)
{
HiiRemovePackages(mCDLStringPackHandle);
-
+
FreeLibStrings ();
return EFI_SUCCESS;
diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
index 2352894..4b1f6b4 100644
--- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
+++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf
@@ -1,7 +1,7 @@
## @file
# Customize display library used by display engine.
#
-# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2013 - 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
@@ -34,7 +34,7 @@
CustomizedDisplayLibInternal.h
CustomizedDisplayLibInternal.c
CustomizedDisplayLib.uni
-
+
[Packages]
MdePkg/MdePkg.dec
MdeModulePkg/MdeModulePkg.dec
@@ -54,7 +54,7 @@
[Guids]
gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## UNDEFINED
-
+
[Protocols]
[Pcd]
@@ -62,4 +62,4 @@
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES
gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES
- gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES \ No newline at end of file
+ gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES
diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
index bc14a9d..b162925 100644
--- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
+++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c
@@ -2,13 +2,13 @@
This library class defines a set of interfaces to customize Display module
-Copyright (c) 2013-2015, 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 that accompanies this distribution.
+Copyright (c) 2013-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 that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
+http://opensource.org/licenses/bsd-license.php.
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -47,10 +47,10 @@ CHAR16 *gInputErrorMessage;
Print banner info for front page.
@param[in] FormData Form Data to be shown in Page
-
+
**/
VOID
-PrintBannerInfo (
+PrintBannerInfo (
IN FORM_DISPLAY_ENGINE_FORM *FormData
)
{
@@ -84,15 +84,15 @@ PrintBannerInfo (
) {
RowIdx = (UINT8) (Line - (UINT8) gScreenDimensions.TopRow);
ColumnIdx = (UINT8) (Alignment - (UINT8) gScreenDimensions.LeftColumn);
-
+
ASSERT (RowIdx < BANNER_HEIGHT && ColumnIdx < BANNER_COLUMNS);
-
+
if (gBannerData!= NULL && gBannerData->Banner[RowIdx][ColumnIdx] != 0x0000) {
StrFrontPageBanner = LibGetToken (gBannerData->Banner[RowIdx][ColumnIdx], FormData->HiiHandle);
} else {
continue;
}
-
+
switch (Alignment - gScreenDimensions.LeftColumn) {
case 0:
//
@@ -100,7 +100,7 @@ PrintBannerInfo (
//
PrintStringAt (gScreenDimensions.LeftColumn + BANNER_LEFT_COLUMN_INDENT, Line, StrFrontPageBanner);
break;
-
+
case 1:
//
// Handle center column
@@ -111,7 +111,7 @@ PrintBannerInfo (
StrFrontPageBanner
);
break;
-
+
case 2:
//
// Handle right column
@@ -123,7 +123,7 @@ PrintBannerInfo (
);
break;
}
-
+
FreePool (StrFrontPageBanner);
}
}
@@ -159,7 +159,7 @@ PrintFramework (
);
return;
}
-
+
Buffer = AllocateZeroPool (0x10000);
ASSERT (Buffer != NULL);
Character = BOXDRAW_HORIZONTAL;
@@ -187,7 +187,7 @@ PrintFramework (
PrintCharAt (gScreenDimensions.LeftColumn, Row, Character);
PrintCharAt (gScreenDimensions.RightColumn - 1, Row, Character);
}
-
+
//
// Print Form Title
//
@@ -239,7 +239,7 @@ PrintFramework (
Character = BOXDRAW_UP_LEFT;
PrintCharAt ((UINTN) -1, (UINTN) -1, Character);
-
+
FreePool (Buffer);
}
@@ -282,7 +282,7 @@ ProcessUserOpcode(
}
break;
- case EFI_IFR_GUID_OP:
+ case EFI_IFR_GUID_OP:
if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) {
//
// Tiano specific GUIDed opcodes
@@ -306,7 +306,7 @@ ProcessUserOpcode(
gBannerData = AllocateZeroPool (sizeof (BANNER_DATA));
ASSERT (gBannerData != NULL);
}
-
+
CopyMem (
&gBannerData->Banner[((EFI_IFR_GUID_BANNER *) OpCodeData)->LineNumber][
((EFI_IFR_GUID_BANNER *) OpCodeData)->Alignment],
@@ -335,7 +335,7 @@ ProcessUserOpcode(
/**
Process some op codes which is out side of current form.
-
+
@param FormData Pointer to the form data.
@return EFI_SUCCESS Pass the statement success.
@@ -386,7 +386,7 @@ ProcessExternedOpcode (
@return EFI_INVALID_PARAMETER The input screen info is not acceptable.
**/
-EFI_STATUS
+EFI_STATUS
ScreenDiemensionInfoValidate (
IN FORM_DISPLAY_ENGINE_FORM *FormData
)
@@ -395,7 +395,7 @@ ScreenDiemensionInfoValidate (
UINTN Index;
//
- // Calculate total number of Register HotKeys.
+ // Calculate total number of Register HotKeys.
//
Index = 0;
if (!IsListEmpty (&FormData->HotKeyListHead)){
@@ -584,7 +584,7 @@ PrintHotKeyHelpString (
ColumnStr = gLibEmptyString;
//
- // Calculate total number of Register HotKeys.
+ // Calculate total number of Register HotKeys.
//
Index = 0;
Link = GetFirstNode (&FormData->HotKeyListHead);
@@ -607,7 +607,7 @@ PrintHotKeyHelpString (
CurrentRow = BottomRowOfHotKeyHelp - Index / 3;
//
- // Help string can't exceed ColumnWidth. One Row will show three Help information.
+ // Help string can't exceed ColumnWidth. One Row will show three Help information.
//
BakChar = L'\0';
if (StrLen (HotKey->HelpString) > ColumnIndexWidth) {
@@ -632,7 +632,7 @@ PrintHotKeyHelpString (
Link = GetNextNode (&FormData->HotKeyListHead, Link);
Index ++;
}
-
+
if (SetState) {
//
// Clear KeyHelp
@@ -651,13 +651,13 @@ PrintHotKeyHelpString (
PrintStringAtWithWidth (CurrentCol, CurrentRow, gLibEmptyString, ColumnIndexWidth);
}
}
-
+
return;
}
/**
Get step info from numeric opcode.
-
+
@param[in] OpCode The input numeric op code.
@return step info for this opcode.
@@ -671,24 +671,24 @@ LibGetFieldFromNum (
UINT64 Step;
NumericOp = (EFI_IFR_NUMERIC *) OpCode;
-
+
switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) {
case EFI_IFR_NUMERIC_SIZE_1:
Step = NumericOp->data.u8.Step;
break;
-
+
case EFI_IFR_NUMERIC_SIZE_2:
Step = NumericOp->data.u16.Step;
break;
-
+
case EFI_IFR_NUMERIC_SIZE_4:
Step = NumericOp->data.u32.Step;
break;
-
+
case EFI_IFR_NUMERIC_SIZE_8:
Step = NumericOp->data.u64.Step;
break;
-
+
default:
Step = 0;
break;
@@ -729,7 +729,7 @@ InitializeLibStrings (
gNvUpdateMessage = LibGetToken (STRING_TOKEN (NV_UPDATE_MESSAGE), mCDLStringPackHandle);
gInputErrorMessage = LibGetToken (STRING_TOKEN (INPUT_ERROR_MESSAGE), mCDLStringPackHandle);
-
+
//
// SpaceBuffer;
//
@@ -770,7 +770,7 @@ FreeLibStrings (
FreePool (gNvUpdateMessage);
FreePool (gInputErrorMessage);
-
+
FreePool (mSpaceBuffer);
}
@@ -799,7 +799,7 @@ WaitForKeyStroke (
if (Status != EFI_NOT_READY) {
continue;
}
-
+
gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index);
}
return Status;
@@ -845,7 +845,7 @@ LibSetUnicodeMem (
**/
UINTN
PrintInternal (
- IN UINTN Width,
+ IN UINTN Width,
IN UINTN Column,
IN UINTN Row,
IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Out,
diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h
index 7342b50..09a7885 100644
--- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h
+++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h
@@ -2,13 +2,13 @@
This library class defines a set of interfaces to customize Display module
-Copyright (c) 2013, 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 that accompanies this distribution.
+Copyright (c) 2013 - 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 that accompanies this distribution.
The full text of the license may be found at
-http://opensource.org/licenses/bsd-license.php.
+http://opensource.org/licenses/bsd-license.php.
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
@@ -121,10 +121,10 @@ extern CHAR16 *gInputErrorMessage;
Print banner info for front page.
@param[in] FormData Form Data to be shown in Page
-
+
**/
VOID
-PrintBannerInfo (
+PrintBannerInfo (
IN FORM_DISPLAY_ENGINE_FORM *FormData
);
@@ -147,7 +147,7 @@ PrintFramework (
@return EFI_INVALID_PARAMETER The input screen info is not acceptable.
**/
-EFI_STATUS
+EFI_STATUS
ScreenDiemensionInfoValidate (
IN FORM_DISPLAY_ENGINE_FORM *FormData
);
@@ -201,10 +201,10 @@ PrintHotKeyHelpString (
IN FORM_DISPLAY_ENGINE_FORM *FormData,
IN BOOLEAN SetState
);
-
+
/**
Get step info from numeric opcode.
-
+
@param[in] OpCode The input numeric op code.
@return step info for this opcode.
@@ -285,7 +285,7 @@ PrintAt (
/**
Process some op codes which is out side of current form.
-
+
@param FormData Pointer to the form data.
**/
diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni
index 4a58241..33db2eb 100644
--- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni
+++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni
@@ -1,7 +1,7 @@
// /** @file
// CustomizedDisplayLib Module Localized Abstract and Description Content
//
-// Copyright (c) 2014, Intel Corporation. All rights reserved.<BR>
+// Copyright (c) 2014 - 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
@@ -13,11 +13,11 @@
// **/
-#string STR_MODULE_ABSTRACT
-#language en-US
+#string STR_MODULE_ABSTRACT
+#language en-US
"Customize display library used by display engine."
-#string STR_MODULE_DESCRIPTION
-#language en-US
+#string STR_MODULE_DESCRIPTION
+#language en-US
"Customize display library used by display engine."