-/*++\r
-\r
-Copyright (c) 2006, 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
-Module Name:\r
-\r
- Ui.c\r
-\r
-Abstract:\r
- \r
+/**@file\r
Implementation for UI.\r
\r
-Revision History\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
---*/\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
+**/\r
\r
#include "Setup.h"\r
#include "Ui.h"\r
Initialize Menu option list.\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
Initialize Menu option list.\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
Remove Menu option list.\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
(*PreviousSelection)->Handle = UiMenuList->Selection.Handle;\r
gEntryNumber = UiMenuList->FormerEntryNumber;\r
RemoveEntryList (&UiMenuList->MenuLink);\r
- gBS->FreePool (UiMenuList);\r
+ FreePool (UiMenuList);\r
}\r
}\r
\r
Free Menu option linked list.\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
while (!IsListEmpty (&gMenuList)) {\r
UiMenuList = CR (gMenuList.ForwardLink, UI_MENU_LIST, MenuLink, UI_MENU_LIST_SIGNATURE);\r
RemoveEntryList (&UiMenuList->MenuLink);\r
- gBS->FreePool (UiMenuList);\r
+ FreePool (UiMenuList);\r
}\r
}\r
\r
Add one menu entry to the linked lst\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
Free Menu option linked list.\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
//\r
// We allocated space for this description when we did a GetToken, free it here\r
//\r
- gBS->FreePool (MenuOption->Description);\r
- gBS->FreePool (MenuOption);\r
+ FreePool (MenuOption->Description);\r
+ FreePool (MenuOption);\r
}\r
}\r
\r
+STATIC\r
VOID\r
UpdateDateAndTime (\r
VOID\r
Refresh screen with current date and/or time based on screen context\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
}\r
\r
if (OptionString != NULL) {\r
- gBS->FreePool (OptionString);\r
+ FreePool (OptionString);\r
}\r
}\r
\r
//\r
// Create a timer event\r
//\r
- Status = gBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent);\r
+ Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);\r
if (!EFI_ERROR (Status)) {\r
//\r
// Set the timer event\r
Timeout = ONE_SECOND;\r
\r
do {\r
- Status = gBS->CreateEvent (EFI_EVENT_TIMER, 0, NULL, NULL, &TimerEvent);\r
+ Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, &TimerEvent);\r
\r
//\r
// Set the timer event\r
Arguments:\r
String - String description for this option.\r
Context - Context data for entry.\r
- \r
+\r
Returns:\r
\r
--*/\r
Arguments:\r
String - String description for this option.\r
Context - Context data for entry.\r
- \r
+\r
Returns:\r
\r
--*/\r
\r
Arguments:\r
NumberOfLines - The number of lines for the dialog box\r
- HotKey - Defines whether a single character is parsed (TRUE) and returned in KeyValue \r
+ HotKey - Defines whether a single character is parsed (TRUE) and returned in KeyValue\r
or a string is returned in StringBuffer. Two special characters are considered when entering a string, a SCAN_ESC and\r
an CHAR_CARRIAGE_RETURN. SCAN_ESC terminates string input and returns\r
MaximumStringSize - The maximum size in bytes of a typed in string (each character is a CHAR16) and the minimum string returned is two bytes\r
KeyValue - The EFI_KEY value returned if HotKey is TRUE..\r
String - Pointer to the first string in the list\r
... - A series of (quantity == NumberOfLines) text strings which will be used to construct the dialog box\r
- \r
+\r
Returns:\r
EFI_SUCCESS - Displayed dialog and received user interaction\r
EFI_INVALID_PARAMETER - One of the parameters was invalid (e.g. (StringBuffer == NULL) && (HotKey == FALSE))\r
UINTN Start;\r
UINTN Top;\r
UINTN Index;\r
- EFI_STATUS Status;\r
BOOLEAN SelectionComplete;\r
UINTN InputOffset;\r
UINTN CurrentAttribute;\r
// Take the first key typed and report it back?\r
//\r
if (HotKey) {\r
- Status = WaitForKeyStroke (&Key);\r
+ WaitForKeyStroke (&Key);\r
CopyMem (KeyValue, &Key, sizeof (EFI_INPUT_KEY));\r
\r
} else {\r
do {\r
- Status = WaitForKeyStroke (&Key);\r
+ WaitForKeyStroke (&Key);\r
\r
switch (Key.UnicodeChar) {\r
case CHAR_NULL:\r
switch (Key.ScanCode) {\r
case SCAN_ESC:\r
- gBS->FreePool (TempString);\r
- gBS->FreePool (BufferedString);\r
+ FreePool (TempString);\r
+ FreePool (BufferedString);\r
gST->ConOut->SetAttribute (gST->ConOut, CurrentAttribute);\r
gST->ConOut->EnableCursor (gST->ConOut, TRUE);\r
return EFI_DEVICE_ERROR;\r
\r
case CHAR_CARRIAGE_RETURN:\r
SelectionComplete = TRUE;\r
- gBS->FreePool (TempString);\r
- gBS->FreePool (BufferedString);\r
+ FreePool (TempString);\r
+ FreePool (BufferedString);\r
gST->ConOut->SetAttribute (gST->ConOut, CurrentAttribute);\r
gST->ConOut->EnableCursor (gST->ConOut, TRUE);\r
return EFI_SUCCESS;\r
break;\r
}\r
\r
- gBS->FreePool (InputErrorMessage);\r
- gBS->FreePool (NvUpdateMessage);\r
+ FreePool (InputErrorMessage);\r
+ FreePool (NvUpdateMessage);\r
return ;\r
}\r
\r
/*++\r
\r
Routine Description:\r
- \r
+\r
Used to remove the allocated data instances\r
\r
Arguments:\r
- \r
+\r
Returns:\r
\r
--*/\r
FileForm = FileFormTagsHead;\r
\r
if (FormattedString != NULL) {\r
- gBS->FreePool (FormattedString);\r
+ FreePool (FormattedString);\r
}\r
\r
if (OptionString != NULL) {\r
- gBS->FreePool (OptionString);\r
+ FreePool (OptionString);\r
}\r
\r
for (; FileForm != NULL;) {\r
}\r
\r
if (FormTags->Tags[Index].IntList != NULL) {\r
- gBS->FreePool (FormTags->Tags[Index].IntList);\r
+ FreePool (FormTags->Tags[Index].IntList);\r
}\r
}\r
\r
if (PreviousFormTags != NULL) {\r
- gBS->FreePool (FormTags->Tags);\r
+ FreePool (FormTags->Tags);\r
FormTags = PreviousFormTags;\r
- gBS->FreePool (FormTags->Next);\r
+ FreePool (FormTags->Next);\r
FormTags->Next = NULL;\r
} else {\r
- gBS->FreePool (FormTags->Tags);\r
+ FreePool (FormTags->Tags);\r
FormTags = NULL;\r
}\r
}\r
//\r
// Free the current entry\r
//\r
- gBS->FreePool (Inconsistent);\r
+ FreePool (Inconsistent);\r
\r
//\r
// Restore the Previous pointer\r
PreviousVariableDefinition = VariableDefinition;\r
}\r
\r
- gBS->FreePool (VariableDefinition->VariableName);\r
- gBS->FreePool (VariableDefinition->NvRamMap);\r
- gBS->FreePool (VariableDefinition->FakeNvRamMap);\r
+ FreePool (VariableDefinition->VariableName);\r
+\r
+ if (VariableDefinition->NvRamMap != NULL) {\r
+ FreePool (VariableDefinition->NvRamMap);\r
+ }\r
+\r
+ if (VariableDefinition->FakeNvRamMap != NULL) {\r
+ FreePool (VariableDefinition->FakeNvRamMap);\r
+ }\r
\r
if (PreviousVariableDefinition != NULL) {\r
VariableDefinition = PreviousVariableDefinition;\r
- gBS->FreePool (VariableDefinition->Next);\r
+ FreePool (VariableDefinition->Next);\r
VariableDefinition->Next = NULL;\r
} else {\r
- gBS->FreePool (VariableDefinition);\r
+ FreePool (VariableDefinition);\r
VariableDefinition = NULL;\r
}\r
}\r
\r
if (PreviousFileForm != NULL) {\r
FileForm = PreviousFileForm;\r
- gBS->FreePool (FileForm->NextFile);\r
+ FreePool (FileForm->NextFile);\r
FileForm->NextFile = NULL;\r
} else {\r
- gBS->FreePool (FileForm);\r
+ FreePool (FileForm);\r
FileForm = NULL;\r
}\r
}\r
PreviousIfrBinary = IfrBinary;\r
}\r
\r
- gBS->FreePool (IfrBinary->IfrPackage);\r
+ FreePool (IfrBinary->IfrPackage);\r
\r
if (PreviousIfrBinary != NULL) {\r
IfrBinary = PreviousIfrBinary;\r
- gBS->FreePool (IfrBinary->Next);\r
+ FreePool (IfrBinary->Next);\r
IfrBinary->Next = NULL;\r
} else {\r
- gBS->FreePool (IfrBinary);\r
+ FreePool (IfrBinary);\r
IfrBinary = NULL;\r
}\r
}\r
\r
- gBS->FreePool (gPreviousValue);\r
+ FreePool (gPreviousValue);\r
gPreviousValue = NULL;\r
\r
//\r
// Free Browser Strings\r
//\r
- gBS->FreePool (gPressEnter);\r
- gBS->FreePool (gConfirmError);\r
- gBS->FreePool (gConfirmPassword);\r
- gBS->FreePool (gPromptForNewPassword);\r
- gBS->FreePool (gPromptForPassword);\r
- gBS->FreePool (gToggleCheckBox);\r
- gBS->FreePool (gNumericInput);\r
- gBS->FreePool (gMakeSelection);\r
- gBS->FreePool (gMoveHighlight);\r
- gBS->FreePool (gEscapeString);\r
- gBS->FreePool (gEnterCommitString);\r
- gBS->FreePool (gEnterString);\r
- gBS->FreePool (gFunctionOneString);\r
- gBS->FreePool (gFunctionTwoString);\r
- gBS->FreePool (gFunctionNineString);\r
- gBS->FreePool (gFunctionTenString);\r
+ FreePool (gPressEnter);\r
+ FreePool (gConfirmError);\r
+ FreePool (gConfirmPassword);\r
+ FreePool (gPromptForNewPassword);\r
+ FreePool (gPromptForPassword);\r
+ FreePool (gToggleCheckBox);\r
+ FreePool (gNumericInput);\r
+ FreePool (gMakeSelection);\r
+ FreePool (gMoveHighlight);\r
+ FreePool (gEscapeString);\r
+ FreePool (gEnterCommitString);\r
+ FreePool (gEnterString);\r
+ FreePool (gFunctionOneString);\r
+ FreePool (gFunctionTwoString);\r
+ FreePool (gFunctionNineString);\r
+ FreePool (gFunctionTenString);\r
return ;\r
}\r
\r
+STATIC\r
BOOLEAN\r
SelectionsAreValid (\r
IN UI_MENU_OPTION *MenuOption,\r
/*++\r
\r
Routine Description:\r
- Initiate late consistency checks against the current page. \r
+ Initiate late consistency checks against the current page.\r
\r
Arguments:\r
None\r
- \r
+\r
Returns:\r
\r
--*/\r
EFI_FILE_FORM_TAGS *FileFormTags;\r
CHAR16 *StringPtr;\r
CHAR16 NullCharacter;\r
- EFI_STATUS Status;\r
UINTN Index;\r
UINT16 *NvRamMap;\r
STRING_REF PopUp;\r
CreatePopUp (GetStringWidth (StringPtr) / 2, 3, &NullCharacter, StringPtr, &NullCharacter);\r
\r
do {\r
- Status = WaitForKeyStroke (&Key);\r
+ WaitForKeyStroke (&Key);\r
\r
switch (Key.UnicodeChar) {\r
\r
// Since the value can be one byte long or two bytes long, do a CopyMem based on StorageWidth\r
//\r
CopyMem (NvRamMap, &Tag->OldValue, Tag->StorageWidth);\r
- gBS->FreePool (StringPtr);\r
+ FreePool (StringPtr);\r
break;\r
\r
default:\r
Arguments:\r
Tag - The Tag structure passed in.\r
Handle - The handle in the HII database being used\r
- \r
+\r
Returns:\r
Returns the number of CHAR16 characters that is support.\r
\r
if ((Tag->Operand == EFI_IFR_TEXT_OP) && (Tag->TextTwo != 0)) {\r
String = GetToken (Tag->TextTwo, Handle);\r
Size = StrLen (String);\r
- gBS->FreePool (String);\r
+ FreePool (String);\r
}\r
\r
if ((Tag->Operand == EFI_IFR_SUBTITLE_OP) ||\r
LineWidth - Width of the desired string to extract in CHAR16 characters\r
Index - Where in InputString to start the copy process\r
OutputString - Buffer to copy the string into\r
- \r
+\r
Returns:\r
Returns the number of CHAR16 characters that were copied into the OutputString buffer.\r
\r
// Ensure we have got a valid buffer\r
//\r
if (*OutputString != NULL) {\r
- \r
+\r
//\r
//NARROW_CHAR can not be printed in screen, so if a line only contain the two CHARs: 'NARROW_CHAR + CHAR_CARRIAGE_RETURN' , it is a empty line in Screen.\r
//To avoid displaying this empty line in screen, just skip the two CHARs here.\r
//\r
if ((InputString[*Index] == NARROW_CHAR) && (InputString[*Index + 1] == CHAR_CARRIAGE_RETURN)) {\r
*Index = *Index + 2;\r
- } \r
+ }\r
\r
//\r
// Fast-forward the string and see if there is a carriage-return in the string\r
}\r
}\r
\r
+STATIC\r
VOID\r
UpdateOptionSkipLines (\r
IN EFI_IFR_DATA_ARRAY *PageData,\r
)\r
{\r
UINTN Index;\r
- UINTN Loop;\r
UINT16 Width;\r
UINTN Row;\r
UINTN OriginalRow;\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++)\r
- ;\r
-\r
- for (Loop = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Loop] = OptionString[Index];\r
- Loop++;\r
- }\r
-\r
- OptionString[Loop] = CHAR_NULL;\r
-\r
Width = (UINT16) gOptionBlockWidth;\r
\r
OriginalRow = Row;\r
}\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
if (SkipValue != 0) {\r
SkipValue--;\r
}\r
SubMenu - Indicate is sub menu.\r
FileFormTagsHead - A pointer to the EFI_FILE_FORM_TAGS structure.\r
PageData - A pointer to the EFI_IFR_DATA_ARRAY.\r
- \r
+\r
Returns:\r
- Return the pointer of the menu which selected, \r
+ Return the pointer of the menu which selected,\r
otherwise return NULL.\r
\r
--*/\r
while (gMenuRefreshHead != NULL) {\r
OldMenuRefreshEntry = gMenuRefreshHead->Next;\r
\r
- gBS->FreePool (gMenuRefreshHead);\r
+ FreePool (gMenuRefreshHead);\r
\r
gMenuRefreshHead = OldMenuRefreshEntry;\r
}\r
}\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
if (Temp != 0) {\r
Temp--;\r
}\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++) {\r
- MenuOption->OptCol++;\r
- }\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP ||\r
+ MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP\r
+ ) {\r
+ //\r
+ // If leading spaces on OptionString - remove the spaces\r
+ //\r
+ for (Index = 0; OptionString[Index] == L' '; Index++) {\r
+ MenuOption->OptCol++;\r
+ }\r
\r
- for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Count] = OptionString[Index];\r
- Count++;\r
- }\r
+ for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
+ OptionString[Count] = OptionString[Index];\r
+ Count++;\r
+ }\r
\r
- OptionString[Count] = CHAR_NULL;\r
+ OptionString[Count] = CHAR_NULL;\r
+ }\r
\r
//\r
// If this is a date or time op-code and is used to reflect an RTC, register the op-code\r
}\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
if (Temp2 != 0) {\r
Temp2--;\r
}\r
}\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
if (Temp2 != 0) {\r
Temp2--;\r
}\r
}\r
\r
Row = OriginalRow;\r
- gBS->FreePool (StringPtr);\r
+ FreePool (StringPtr);\r
}\r
} else {\r
//\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
gST->ConOut->SetAttribute (gST->ConOut, FIELD_TEXT | FIELD_BACKGROUND);\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++)\r
- ;\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP ||\r
+ MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP\r
+ ) {\r
+ //\r
+ // If leading spaces on OptionString - remove the spaces\r
+ //\r
+ for (Index = 0; OptionString[Index] == L' '; Index++)\r
+ ;\r
\r
- for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Count] = OptionString[Index];\r
- Count++;\r
- }\r
+ for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
+ OptionString[Count] = OptionString[Index];\r
+ Count++;\r
+ }\r
\r
- OptionString[Count] = CHAR_NULL;\r
+ OptionString[Count] = CHAR_NULL;\r
+ }\r
\r
Width = (UINT16) gOptionBlockWidth;\r
\r
MenuOption->Row++;\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
}\r
\r
MenuOption->Row = OriginalRow;\r
MenuOption->Row++;\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
}\r
\r
MenuOption->Row = OriginalRow;\r
if (SubMenu) {\r
ProcessOptions (MenuOption, FALSE, FileFormTagsHead, PageData, &OptionString);\r
if (OptionString != NULL) {\r
- //\r
- // If leading spaces on OptionString - remove the spaces\r
- //\r
- for (Index = 0; OptionString[Index] == L' '; Index++)\r
- ;\r
-\r
- for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
- OptionString[Count] = OptionString[Index];\r
- Count++;\r
- }\r
+ if (MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP ||\r
+ MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP\r
+ ) {\r
+ //\r
+ // If leading spaces on OptionString - remove the spaces\r
+ //\r
+ for (Index = 0; OptionString[Index] == L' '; Index++)\r
+ ;\r
\r
- OptionString[Count] = CHAR_NULL;\r
+ for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) {\r
+ OptionString[Count] = OptionString[Index];\r
+ Count++;\r
+ }\r
\r
+ OptionString[Count] = CHAR_NULL;\r
+ }\r
Width = (UINT16) gOptionBlockWidth;\r
\r
OriginalRow = MenuOption->Row;\r
MenuOption->Row++;\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
}\r
\r
MenuOption->Row = OriginalRow;\r
MenuOption->Row++;\r
}\r
\r
- gBS->FreePool (OutputString);\r
+ FreePool (OutputString);\r
}\r
\r
MenuOption->Row = OriginalRow;\r
case CfUpdateHelpString:\r
ControlFlag = CfPrepareToReadKey;\r
\r
- if (SubMenu && \r
- (Repaint || NewLine || \r
+ if (SubMenu &&\r
+ (Repaint || NewLine ||\r
(MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP) ||\r
- (MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP)) && \r
+ (MenuOption->ThisTag->Operand == EFI_IFR_TIME_OP)) &&\r
!(gClassOfVfr == EFI_GENERAL_APPLICATION_SUBCLASS)) {\r
//\r
// Don't print anything if it is a NULL help token\r
//\r
// Pad String with spaces to simulate a clearing of the previous line\r
//\r
- for (; GetStringWidth (&FormattedString[Index * gHelpBlockWidth]) / 2 < gHelpBlockWidth;) {\r
- StrCat (&FormattedString[Index * gHelpBlockWidth], (CHAR16 *) L" ");\r
+ for (; GetStringWidth (&FormattedString[Index * gHelpBlockWidth * 2]) / 2 < gHelpBlockWidth;) {\r
+ StrCat (&FormattedString[Index * gHelpBlockWidth * 2], (CHAR16 *) L" ");\r
}\r
\r
PrintStringAt (\r
LocalScreen.RightColumn - gHelpBlockWidth,\r
Index + TopRow,\r
- &FormattedString[Index * gHelpBlockWidth]\r
+ &FormattedString[Index * gHelpBlockWidth * 2]\r
);\r
}\r
}\r
while (gMenuRefreshHead != NULL) {\r
OldMenuRefreshEntry = gMenuRefreshHead->Next;\r
\r
- gBS->FreePool (gMenuRefreshHead);\r
+ FreePool (gMenuRefreshHead);\r
\r
gMenuRefreshHead = OldMenuRefreshEntry;\r
}\r
ExtractRequestedNvMap (FileFormTags, MenuOption->ThisTag->VariableNumber, &VariableDefinition);\r
\r
if (SubMenu) {\r
- if ((MenuOption->ThisTag->Operand == EFI_IFR_TEXT_OP && \r
+ if ((MenuOption->ThisTag->Operand == EFI_IFR_TEXT_OP &&\r
!(MenuOption->ThisTag->Flags & EFI_IFR_FLAG_INTERACTIVE)) ||\r
(MenuOption->ThisTag->GrayOut) ||\r
(MenuOption->ThisTag->Operand == EFI_IFR_DATE_OP) ||\r
\r
if (!EFI_ERROR (Status)) {\r
ASSERT_EFI_ERROR (NULL != NvMapListHead);\r
- \r
+\r
NvMapListNode = NvMapListHead;\r
- \r
+\r
while (NULL != NvMapListNode) {\r
if (FileFormTags->VariableDefinitions->VariableId == NvMapListNode->VariablePack->VariableId) {\r
NvMap = (VOID *) ((CHAR8 *) NvMapListNode->VariablePack + sizeof (EFI_HII_VARIABLE_PACK) + NvMapListNode->VariablePack->VariableNameLength);\r
}\r
NvMapListNode = NvMapListNode->NextVariablePack;\r
}\r
- \r
+\r
//\r
// Free the buffer that was allocated.\r
//\r
- gBS->FreePool (FileFormTags->VariableDefinitions->NvRamMap);\r
- gBS->FreePool (FileFormTags->VariableDefinitions->FakeNvRamMap);\r
- \r
+ FreePool (FileFormTags->VariableDefinitions->NvRamMap);\r
+ FreePool (FileFormTags->VariableDefinitions->FakeNvRamMap);\r
+\r
//\r
// Allocate, copy the NvRamMap.\r
//\r
FileFormTags->VariableDefinitions->VariableFakeSize = (UINT16) (FileFormTags->VariableDefinitions->VariableFakeSize - FileFormTags->VariableDefinitions->VariableSize);\r
FileFormTags->VariableDefinitions->VariableSize = (UINT16) NvMapSize;\r
FileFormTags->VariableDefinitions->VariableFakeSize = (UINT16) (FileFormTags->VariableDefinitions->VariableFakeSize + FileFormTags->VariableDefinitions->VariableSize);\r
- \r
+\r
FileFormTags->VariableDefinitions->NvRamMap = AllocateZeroPool (FileFormTags->VariableDefinitions->VariableSize);\r
+ ASSERT (FileFormTags->VariableDefinitions->NvRamMap != NULL);\r
+\r
FileFormTags->VariableDefinitions->FakeNvRamMap = AllocateZeroPool (NvMapSize + FileFormTags->VariableDefinitions->VariableFakeSize);\r
+ ASSERT (FileFormTags->VariableDefinitions->FakeNvRamMap != NULL);\r
\r
CopyMem (FileFormTags->VariableDefinitions->NvRamMap, NvMap, NvMapSize);\r
- gBS->FreePool (NvMapListHead);\r
+ FreePool (NvMapListHead);\r
}\r
\r
UpdateStatusBar (NV_UPDATE_REQUIRED, MenuOption->ThisTag->Flags, TRUE);\r
while (gMenuRefreshHead != NULL) {\r
OldMenuRefreshEntry = gMenuRefreshHead->Next;\r
\r
- gBS->FreePool (gMenuRefreshHead);\r
+ FreePool (gMenuRefreshHead);\r
\r
gMenuRefreshHead = OldMenuRefreshEntry;\r
}\r
/*++\r
\r
Routine Description:\r
- Determine if the menu is the last menu that can be selected. \r
+ Determine if the menu is the last menu that can be selected.\r
\r
Arguments:\r
Direction - the scroll direction. False is down. True is up.\r
- \r
+\r
Returns:\r
FALSE -- the menu isn't the last menu that can be selected.\r
TRUE -- the menu is the last menu that can be selected.\r
Arguments:\r
Direction - the up or down direction. False is down. True is up.\r
CurrentPos - Current position.\r
- \r
+\r
Returns:\r
- Return line number to pad. It is possible that we stand on a zero-advance \r
+ Return line number to pad. It is possible that we stand on a zero-advance\r
data or time opcode, so pad one line when we judge if we are going to scroll outside.\r
--*/\r
{\r