2 Main file for endfor and for shell level 1 functions.
4 Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.<BR>
5 This program and the accompanying materials
6 are licensed and made available under the terms and conditions of the BSD License
7 which accompanies this distribution. The full text of the license may be found at
8 http://opensource.org/licenses/bsd-license.php
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
15 #include "UefiShellLevel1CommandsLib.h"
16 #include <Library/PrintLib.h>
19 Determine if a valid string is a valid number for the 'for' command.
21 @param[in] Number The pointer to the string representation of the number to test.
23 @retval TRUE The number is valid.
24 @retval FALSE The number is not valid.
28 ShellIsValidForNumber (
29 IN CONST CHAR16
*Number
32 if (Number
== NULL
|| *Number
== CHAR_NULL
) {
36 if (*Number
== L
'-') {
40 if (StrLen(Number
) == 0) {
44 if (StrLen(Number
) >= 7) {
45 if (StrStr(Number
, L
" ") != NULL
&& (StrStr(Number
, L
" ") - Number
) >= 7) {
50 if (!ShellIsDecimalDigitCharacter(*Number
)) {
58 Function for 'endfor' command.
60 @param[in] ImageHandle Handle to the Image (NULL if Internal).
61 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
65 ShellCommandRunEndFor (
66 IN EFI_HANDLE ImageHandle
,
67 IN EFI_SYSTEM_TABLE
*SystemTable
73 Status
= CommandInit();
74 ASSERT_EFI_ERROR(Status
);
76 if (!gEfiShellProtocol
->BatchIsActive()) {
77 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_NO_SCRIPT
), gShellLevel1HiiHandle
, L
"EndFor");
78 return (SHELL_UNSUPPORTED
);
81 if (gEfiShellParametersProtocol
->Argc
> 1) {
82 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_TOO_MANY
), gShellLevel1HiiHandle
);
83 return (SHELL_INVALID_PARAMETER
);
86 Found
= MoveToTag(GetPreviousNode
, L
"for", L
"endfor", NULL
, ShellCommandGetCurrentScriptFile(), FALSE
, FALSE
, FALSE
);
89 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_SYNTAX_NO_MATCHING
), gShellLevel1HiiHandle
, L
"For", L
"EndFor", ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
90 return (SHELL_NOT_FOUND
);
92 return (SHELL_SUCCESS
);
100 CHAR16
*ReplacementName
;
101 CHAR16
*CurrentValue
;
102 BOOLEAN RemoveSubstAlias
;
105 #define SIZE_OF_SHELL_FOR_INFO OFFSET_OF (SHELL_FOR_INFO, Set)
106 #define SHELL_FOR_INFO_SIGNATURE SIGNATURE_32 ('S', 'F', 'I', 's')
109 Update the value of a given alias on the list. If the alias is not there then add it.
111 @param[in] Alias The alias to test for.
112 @param[in] CommandString The updated command string.
113 @param[in,out] List The list to search.
115 @retval EFI_SUCCESS The operation was completed successfully.
116 @retval EFI_OUT_OF_RESOURCES There was not enough free memory.
120 InternalUpdateAliasOnList(
121 IN CONST CHAR16
*Alias
,
122 IN CONST CHAR16
*CommandString
,
123 IN OUT LIST_ENTRY
*List
130 // assert for NULL parameter
132 ASSERT(Alias
!= NULL
);
135 // check for the Alias
137 for ( Node
= (ALIAS_LIST
*)GetFirstNode(List
), Found
= FALSE
138 ; !IsNull(List
, &Node
->Link
)
139 ; Node
= (ALIAS_LIST
*)GetNextNode(List
, &Node
->Link
)
141 ASSERT(Node
->CommandString
!= NULL
);
142 ASSERT(Node
->Alias
!= NULL
);
143 if (StrCmp(Node
->Alias
, Alias
)==0) {
144 FreePool(Node
->CommandString
);
145 Node
->CommandString
= NULL
;
146 Node
->CommandString
= StrnCatGrow(&Node
->CommandString
, NULL
, CommandString
, 0);
152 Node
= AllocateZeroPool(sizeof(ALIAS_LIST
));
154 return (EFI_OUT_OF_RESOURCES
);
156 ASSERT(Node
->Alias
== NULL
);
157 Node
->Alias
= StrnCatGrow(&Node
->Alias
, NULL
, Alias
, 0);
158 ASSERT(Node
->CommandString
== NULL
);
159 Node
->CommandString
= StrnCatGrow(&Node
->CommandString
, NULL
, CommandString
, 0);
160 InsertTailList(List
, &Node
->Link
);
162 return (EFI_SUCCESS
);
166 Find out if an alias is on the given list.
168 @param[in] Alias The alias to test for.
169 @param[in] List The list to search.
171 @retval TRUE The alias is on the list.
172 @retval FALSE The alias is not on the list.
176 InternalIsAliasOnList(
177 IN CONST CHAR16
*Alias
,
178 IN CONST LIST_ENTRY
*List
184 // assert for NULL parameter
186 ASSERT(Alias
!= NULL
);
189 // check for the Alias
191 for ( Node
= (ALIAS_LIST
*)GetFirstNode(List
)
192 ; !IsNull(List
, &Node
->Link
)
193 ; Node
= (ALIAS_LIST
*)GetNextNode(List
, &Node
->Link
)
195 ASSERT(Node
->CommandString
!= NULL
);
196 ASSERT(Node
->Alias
!= NULL
);
197 if (StrCmp(Node
->Alias
, Alias
)==0) {
205 Remove an alias from the given list.
207 @param[in] Alias The alias to remove.
208 @param[in,out] List The list to search.
212 InternalRemoveAliasFromList(
213 IN CONST CHAR16
*Alias
,
214 IN OUT LIST_ENTRY
*List
220 // assert for NULL parameter
222 ASSERT(Alias
!= NULL
);
225 // check for the Alias
227 for ( Node
= (ALIAS_LIST
*)GetFirstNode(List
)
228 ; !IsNull(List
, &Node
->Link
)
229 ; Node
= (ALIAS_LIST
*)GetNextNode(List
, &Node
->Link
)
231 ASSERT(Node
->CommandString
!= NULL
);
232 ASSERT(Node
->Alias
!= NULL
);
233 if (StrCmp(Node
->Alias
, Alias
)==0) {
234 RemoveEntryList(&Node
->Link
);
235 FreePool(Node
->Alias
);
236 FreePool(Node
->CommandString
);
245 Function for 'for' command.
247 @param[in] ImageHandle Handle to the Image (NULL if Internal).
248 @param[in] SystemTable Pointer to the System Table (NULL if Internal).
253 IN EFI_HANDLE ImageHandle
,
254 IN EFI_SYSTEM_TABLE
*SystemTable
258 SHELL_STATUS ShellStatus
;
259 SCRIPT_FILE
*CurrentScriptFile
;
261 CHAR16
*ArgSetWalker
;
264 SHELL_FOR_INFO
*Info
;
268 EFI_SHELL_FILE_INFO
*Node
;
269 EFI_SHELL_FILE_INFO
*FileList
;
274 ShellStatus
= SHELL_SUCCESS
;
280 // initialize the shell lib (we must be in non-auto-init...)
282 Status
= ShellInitialize();
283 ASSERT_EFI_ERROR(Status
);
285 Status
= CommandInit();
286 ASSERT_EFI_ERROR(Status
);
288 if (!gEfiShellProtocol
->BatchIsActive()) {
289 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_NO_SCRIPT
), gShellLevel1HiiHandle
, L
"For");
290 return (SHELL_UNSUPPORTED
);
293 if (gEfiShellParametersProtocol
->Argc
< 4) {
294 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_TOO_FEW
), gShellLevel1HiiHandle
);
295 return (SHELL_INVALID_PARAMETER
);
298 CurrentScriptFile
= ShellCommandGetCurrentScriptFile();
299 ASSERT(CurrentScriptFile
!= NULL
);
301 if (CurrentScriptFile
->CurrentCommand
->Data
== NULL
) {
305 // Make sure that an End exists.
307 if (!MoveToTag(GetNextNode
, L
"endfor", L
"for", NULL
, CurrentScriptFile
, TRUE
, TRUE
, FALSE
)) {
308 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_SYNTAX_NO_MATCHING
), gShellLevel1HiiHandle
, L
"EndFor", L
"For", ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
309 return (SHELL_DEVICE_ERROR
);
315 if (gEfiShellParametersProtocol
->Argv
[1][0] != L
'%' || gEfiShellParametersProtocol
->Argv
[1][2] != CHAR_NULL
316 ||!((gEfiShellParametersProtocol
->Argv
[1][1] >= L
'a' && gEfiShellParametersProtocol
->Argv
[1][1] <= L
'z')
317 ||(gEfiShellParametersProtocol
->Argv
[1][1] >= L
'A' && gEfiShellParametersProtocol
->Argv
[1][1] <= L
'Z'))
319 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_INV_VAR
), gShellLevel1HiiHandle
, gEfiShellParametersProtocol
->Argv
[1]);
320 return (SHELL_INVALID_PARAMETER
);
323 if (gUnicodeCollation
->StriColl(
326 gEfiShellParametersProtocol
->Argv
[2]) == 0) {
327 for (LoopVar
= 0x3 ; LoopVar
< gEfiShellParametersProtocol
->Argc
; LoopVar
++) {
328 ASSERT((ArgSet
== NULL
&& ArgSize
== 0) || (ArgSet
!= NULL
));
329 if (ArgSet
== NULL
) {
330 // ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L"\"", 0);
332 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, L
" \"", 0);
334 if (StrStr(gEfiShellParametersProtocol
->Argv
[LoopVar
], L
"*") != NULL
335 ||StrStr(gEfiShellParametersProtocol
->Argv
[LoopVar
], L
"?") != NULL
336 ||StrStr(gEfiShellParametersProtocol
->Argv
[LoopVar
], L
"[") != NULL
337 ||StrStr(gEfiShellParametersProtocol
->Argv
[LoopVar
], L
"]") != NULL
) {
339 Status
= ShellOpenFileMetaArg ((CHAR16
*)gEfiShellParametersProtocol
->Argv
[LoopVar
], EFI_FILE_MODE_READ
, &FileList
);
340 if (EFI_ERROR(Status
) || FileList
== NULL
|| IsListEmpty(&FileList
->Link
)) {
341 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, gEfiShellParametersProtocol
->Argv
[LoopVar
], 0);
343 for (Node
= (EFI_SHELL_FILE_INFO
*)GetFirstNode(&FileList
->Link
)
344 ; !IsNull(&FileList
->Link
, &Node
->Link
)
345 ; Node
= (EFI_SHELL_FILE_INFO
*)GetNextNode(&FileList
->Link
, &Node
->Link
)
347 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, L
" \"", 0);
348 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, Node
->FullName
, 0);
349 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, L
"\"", 0);
351 ShellCloseFileMetaArg(&FileList
);
354 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, gEfiShellParametersProtocol
->Argv
[LoopVar
], 0);
356 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, L
"\"", 0);
359 // set up for an 'in' for loop
361 NewSize
= StrSize(ArgSet
);
362 NewSize
+= sizeof(SHELL_FOR_INFO
)+StrSize(gEfiShellParametersProtocol
->Argv
[1]);
363 Info
= AllocateZeroPool(NewSize
);
364 ASSERT(Info
!= NULL
);
365 Info
->Signature
= SHELL_FOR_INFO_SIGNATURE
;
366 CopyMem(Info
->Set
, ArgSet
, StrSize(ArgSet
));
367 NewSize
= StrSize(gEfiShellParametersProtocol
->Argv
[1]);
368 CopyMem(Info
->Set
+(StrSize(ArgSet
)/sizeof(Info
->Set
[0])), gEfiShellParametersProtocol
->Argv
[1], NewSize
);
369 Info
->ReplacementName
= Info
->Set
+StrSize(ArgSet
)/sizeof(Info
->Set
[0]);
370 Info
->CurrentValue
= (CHAR16
*)Info
->Set
;
375 if (InternalIsAliasOnList(Info
->ReplacementName
, &CurrentScriptFile
->SubstList
)) {
376 Info
->RemoveSubstAlias
= FALSE
;
378 Info
->RemoveSubstAlias
= TRUE
;
380 CurrentScriptFile
->CurrentCommand
->Data
= Info
;
381 } else if (gUnicodeCollation
->StriColl(
384 gEfiShellParametersProtocol
->Argv
[2]) == 0) {
385 for (LoopVar
= 0x3 ; LoopVar
< gEfiShellParametersProtocol
->Argc
; LoopVar
++) {
386 ASSERT((ArgSet
== NULL
&& ArgSize
== 0) || (ArgSet
!= NULL
));
387 if (ArgSet
== NULL
) {
388 // ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L"\"", 0);
390 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, L
" ", 0);
392 ArgSet
= StrnCatGrow(&ArgSet
, &ArgSize
, gEfiShellParametersProtocol
->Argv
[LoopVar
], 0);
393 // ArgSet = StrnCatGrow(&ArgSet, &ArgSize, L" ", 0);
396 // set up for a 'run' for loop
398 Info
= AllocateZeroPool(sizeof(SHELL_FOR_INFO
)+StrSize(gEfiShellParametersProtocol
->Argv
[1]));
399 ASSERT(Info
!= NULL
);
400 CopyMem(Info
->Set
, gEfiShellParametersProtocol
->Argv
[1], StrSize(gEfiShellParametersProtocol
->Argv
[1]));
401 Info
->ReplacementName
= Info
->Set
;
402 Info
->CurrentValue
= NULL
;
403 ArgSetWalker
= ArgSet
;
404 if (ArgSetWalker
[0] != L
'(') {
405 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
406 ShellStatus
= SHELL_INVALID_PARAMETER
;
408 TempSpot
= StrStr(ArgSetWalker
, L
")");
409 if (TempSpot
!= NULL
) {
410 TempString
= TempSpot
+1;
411 if (*(TempString
) != CHAR_NULL
) {
412 while(TempString
!= NULL
&& *TempString
== L
' ') {
415 if (StrLen(TempString
) > 0) {
420 if (TempSpot
== NULL
) {
421 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
422 ShellStatus
= SHELL_INVALID_PARAMETER
;
424 *TempSpot
= CHAR_NULL
;
426 while (ArgSetWalker
!= NULL
&& ArgSetWalker
[0] == L
' ') {
429 if (!ShellIsValidForNumber(ArgSetWalker
)) {
430 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
431 ShellStatus
= SHELL_INVALID_PARAMETER
;
433 if (ArgSetWalker
[0] == L
'-') {
434 Info
->Current
= 0 - (INTN
)ShellStrToUintn(ArgSetWalker
+1);
436 Info
->Current
= (INTN
)ShellStrToUintn(ArgSetWalker
);
438 ArgSetWalker
= StrStr(ArgSetWalker
, L
" ");
439 while (ArgSetWalker
!= NULL
&& ArgSetWalker
[0] == L
' ') {
442 if (ArgSetWalker
== NULL
|| *ArgSetWalker
== CHAR_NULL
|| !ShellIsValidForNumber(ArgSetWalker
)){
443 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
444 ShellStatus
= SHELL_INVALID_PARAMETER
;
446 if (ArgSetWalker
[0] == L
'-') {
447 Info
->End
= 0 - (INTN
)ShellStrToUintn(ArgSetWalker
+1);
449 Info
->End
= (INTN
)ShellStrToUintn(ArgSetWalker
);
451 if (Info
->Current
< Info
->End
) {
457 ArgSetWalker
= StrStr(ArgSetWalker
, L
" ");
458 while (ArgSetWalker
!= NULL
&& ArgSetWalker
[0] == L
' ') {
461 if (ArgSetWalker
!= NULL
&& *ArgSetWalker
!= CHAR_NULL
) {
462 if (ArgSetWalker
== NULL
|| *ArgSetWalker
== CHAR_NULL
|| !ShellIsValidForNumber(ArgSetWalker
)){
463 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
464 ShellStatus
= SHELL_INVALID_PARAMETER
;
466 if (*ArgSetWalker
== L
')') {
467 ASSERT(Info
->Step
== 1 || Info
->Step
== -1);
469 if (ArgSetWalker
[0] == L
'-') {
470 Info
->Step
= 0 - (INTN
)ShellStrToUintn(ArgSetWalker
+1);
472 Info
->Step
= (INTN
)ShellStrToUintn(ArgSetWalker
);
475 if (StrStr(ArgSetWalker
, L
" ") != NULL
) {
476 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
477 ShellStatus
= SHELL_INVALID_PARAMETER
;
487 if (ShellStatus
== SHELL_SUCCESS
) {
488 if (InternalIsAliasOnList(Info
->ReplacementName
, &CurrentScriptFile
->SubstList
)) {
489 Info
->RemoveSubstAlias
= FALSE
;
491 Info
->RemoveSubstAlias
= TRUE
;
494 CurrentScriptFile
->CurrentCommand
->Data
= Info
;
496 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_GEN_PROBLEM_SCRIPT
), gShellLevel1HiiHandle
, ArgSet
, ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
497 ShellStatus
= SHELL_INVALID_PARAMETER
;
501 // These need to be NULL since they are used to determine if this is the first pass later on...
503 ASSERT(ArgSetWalker
== NULL
);
504 ASSERT(ArgSet
== NULL
);
507 Info
= (SHELL_FOR_INFO
*)CurrentScriptFile
->CurrentCommand
->Data
;
508 if (CurrentScriptFile
->CurrentCommand
->Reset
) {
509 Info
->CurrentValue
= (CHAR16
*)Info
->Set
;
511 CurrentScriptFile
->CurrentCommand
->Reset
= FALSE
;
513 if (ShellStatus
== SHELL_SUCCESS
) {
514 ASSERT(Info
!= NULL
);
515 if (Info
->Step
!= 0) {
517 // only advance if not the first pass
521 // sequence version of for loop...
523 Info
->Current
+= Info
->Step
;
526 TempString
= AllocateZeroPool(50*sizeof(CHAR16
));
527 UnicodeSPrint(TempString
, 50*sizeof(CHAR16
), L
"%d", Info
->Current
);
528 InternalUpdateAliasOnList(Info
->ReplacementName
, TempString
, &CurrentScriptFile
->SubstList
);
529 FreePool(TempString
);
531 if ((Info
->Step
> 0 && Info
->Current
> Info
->End
) || (Info
->Step
< 0 && Info
->Current
< Info
->End
)) {
532 CurrentScriptFile
->CurrentCommand
->Data
= NULL
;
534 // find the matching endfor (we're done with the loop)
536 if (!MoveToTag(GetNextNode
, L
"endfor", L
"for", NULL
, CurrentScriptFile
, TRUE
, FALSE
, FALSE
)) {
537 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_SYNTAX_NO_MATCHING
), gShellLevel1HiiHandle
, L
"EndFor", L
"For", ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
538 ShellStatus
= SHELL_DEVICE_ERROR
;
540 if (Info
->RemoveSubstAlias
) {
542 // remove item from list
544 InternalRemoveAliasFromList(Info
->ReplacementName
, &CurrentScriptFile
->SubstList
);
550 // Must be in 'in' version of for loop...
552 ASSERT(Info
->Set
!= NULL
);
553 if (Info
->CurrentValue
!= NULL
&& *Info
->CurrentValue
!= CHAR_NULL
) {
554 if (Info
->CurrentValue
[0] == L
'\"') {
555 Info
->CurrentValue
++;
557 // while (Info->CurrentValue[0] == L' ') {
558 // Info->CurrentValue++;
560 if (Info
->CurrentValue
[0] == L
'\"') {
561 Info
->CurrentValue
++;
564 // do the next one of the set
566 ASSERT(TempString
== NULL
);
567 TempString
= StrnCatGrow(&TempString
, NULL
, Info
->CurrentValue
, 0);
568 TempSpot
= StrStr(TempString
, L
"\" \"");
569 if (TempSpot
!= NULL
) {
570 *TempSpot
= CHAR_NULL
;
572 while (TempString
[StrLen(TempString
)-1] == L
'\"') {
573 TempString
[StrLen(TempString
)-1] = CHAR_NULL
;
575 InternalUpdateAliasOnList(Info
->ReplacementName
, TempString
, &CurrentScriptFile
->SubstList
);
576 Info
->CurrentValue
+= StrLen(TempString
);
578 if (Info
->CurrentValue
[0] == L
'\"') {
579 Info
->CurrentValue
++;
581 while (Info
->CurrentValue
[0] == L
' ') {
582 Info
->CurrentValue
++;
584 if (Info
->CurrentValue
[0] == L
'\"') {
585 Info
->CurrentValue
++;
587 FreePool(TempString
);
590 CurrentScriptFile
->CurrentCommand
->Data
= NULL
;
592 // find the matching endfor (we're done with the loop)
594 if (!MoveToTag(GetNextNode
, L
"endfor", L
"for", NULL
, CurrentScriptFile
, TRUE
, FALSE
, FALSE
)) {
595 ShellPrintHiiEx(-1, -1, NULL
, STRING_TOKEN (STR_SYNTAX_NO_MATCHING
), gShellLevel1HiiHandle
, L
"EndFor", L
"For", ShellCommandGetCurrentScriptFile()->CurrentCommand
->Line
);
596 ShellStatus
= SHELL_DEVICE_ERROR
;
598 if (Info
->RemoveSubstAlias
) {
600 // remove item from list
602 InternalRemoveAliasFromList(Info
->ReplacementName
, &CurrentScriptFile
->SubstList
);
608 if (ArgSet
!= NULL
) {
611 return (ShellStatus
);