/*++\r
\r
-Copyright (c) 2006, Intel Corporation \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
)\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
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
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
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