BOOLEAN CurrentValue;\r
END_TAG_TYPE Ending;\r
END_TAG_TYPE PreviousEnding;\r
-\r
+ SCRIPT_FILE *CurrentScriptFile;\r
\r
Status = CommandInit();\r
ASSERT_EFI_ERROR(Status);\r
//\r
// Make sure that an End exists.\r
//\r
- if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, ShellCommandGetCurrentScriptFile(), TRUE, TRUE, FALSE)) {\r
+ CurrentScriptFile = ShellCommandGetCurrentScriptFile();\r
+ if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, TRUE, TRUE, FALSE)) {\r
ShellPrintHiiEx(\r
-1, \r
-1, \r
gShellLevel1HiiHandle, \r
L"EnfIf", \r
L"If", \r
- ShellCommandGetCurrentScriptFile()!=NULL\r
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL\r
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
return (SHELL_DEVICE_ERROR);\r
}\r
\r
// build up the next statement for analysis\r
//\r
if (!BuildNextStatement(CurrentParameter, &EndParameter, &Ending)) {\r
- ShellPrintHiiEx(-1, -1, NULL, STRING_TOKEN (STR_SYNTAX_NO_MATCHING), gShellLevel1HiiHandle, L"Then", L"If", ShellCommandGetCurrentScriptFile()->CurrentCommand->Line);\r
+ CurrentScriptFile = ShellCommandGetCurrentScriptFile();\r
+ ShellPrintHiiEx(\r
+ -1, \r
+ -1, \r
+ NULL, \r
+ STRING_TOKEN (STR_SYNTAX_NO_MATCHING), \r
+ gShellLevel1HiiHandle, \r
+ L"Then", \r
+ L"If",\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
ShellStatus = SHELL_INVALID_PARAMETER;\r
} else {\r
//\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
+ SCRIPT_FILE *CurrentScriptFile;\r
ASSERT_EFI_ERROR(CommandInit());\r
\r
if (gEfiShellParametersProtocol->Argc > 1) {\r
return (SHELL_UNSUPPORTED);\r
}\r
\r
+ CurrentScriptFile = ShellCommandGetCurrentScriptFile();\r
\r
- if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, ShellCommandGetCurrentScriptFile(), FALSE, TRUE, FALSE)) {\r
+ if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {\r
ShellPrintHiiEx(\r
-1, \r
-1, \r
gShellLevel1HiiHandle, \r
L"If", \r
L"Else", \r
- ShellCommandGetCurrentScriptFile()!=NULL\r
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL\r
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
return (SHELL_DEVICE_ERROR);\r
}\r
- if (!MoveToTag(GetPreviousNode, L"if", L"else", NULL, ShellCommandGetCurrentScriptFile(), FALSE, TRUE, FALSE)) {\r
+ if (!MoveToTag(GetPreviousNode, L"if", L"else", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {\r
ShellPrintHiiEx(\r
-1, \r
-1, \r
gShellLevel1HiiHandle, \r
L"If", \r
L"Else", \r
- ShellCommandGetCurrentScriptFile()!=NULL\r
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL\r
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
return (SHELL_DEVICE_ERROR);\r
}\r
\r
- if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, ShellCommandGetCurrentScriptFile(), FALSE, FALSE, FALSE)) {\r
+ if (!MoveToTag(GetNextNode, L"endif", L"if", NULL, CurrentScriptFile, FALSE, FALSE, FALSE)) {\r
ShellPrintHiiEx(\r
-1, \r
-1, \r
gShellLevel1HiiHandle, \r
L"EndIf", \r
"Else", \r
- ShellCommandGetCurrentScriptFile()!=NULL\r
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL\r
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
return (SHELL_DEVICE_ERROR);\r
}\r
\r
IN EFI_SYSTEM_TABLE *SystemTable\r
)\r
{\r
+ SCRIPT_FILE *CurrentScriptFile;\r
ASSERT_EFI_ERROR(CommandInit());\r
\r
if (gEfiShellParametersProtocol->Argc > 1) {\r
return (SHELL_UNSUPPORTED);\r
}\r
\r
- if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, ShellCommandGetCurrentScriptFile(), FALSE, TRUE, FALSE)) {\r
+ CurrentScriptFile = ShellCommandGetCurrentScriptFile();\r
+ if (!MoveToTag(GetPreviousNode, L"if", L"endif", NULL, CurrentScriptFile, FALSE, TRUE, FALSE)) {\r
ShellPrintHiiEx(\r
-1, \r
-1, \r
gShellLevel1HiiHandle, \r
L"If", \r
L"EndIf", \r
- ShellCommandGetCurrentScriptFile()!=NULL\r
- &&ShellCommandGetCurrentScriptFile()->CurrentCommand!=NULL\r
- ?ShellCommandGetCurrentScriptFile()->CurrentCommand->Line:0);\r
+ CurrentScriptFile!=NULL \r
+ && CurrentScriptFile->CurrentCommand!=NULL\r
+ ? CurrentScriptFile->CurrentCommand->Line:0);\r
return (SHELL_DEVICE_ERROR);\r
}\r
\r