if ((*Walker)[0] == L'\"') {\r
NextDelim = NULL;\r
for (TempLoc = *Walker + 1 ; TempLoc != NULL && *TempLoc != CHAR_NULL ; TempLoc++) {\r
- if (*TempLoc == L'^' && *(TempLoc+1) == L'^') {\r
- TempLoc++;\r
- } else if (*TempLoc == L'^' && *(TempLoc+1) == L'\"') {\r
+ if (*TempLoc == L'^' && *(TempLoc+1) == L'\"') {\r
TempLoc++;\r
} else if (*TempLoc == L'\"') {\r
NextDelim = TempLoc;\r
*Walker = NULL;\r
}\r
for (TempLoc = *TempParameter ; TempLoc != NULL && *TempLoc != CHAR_NULL ; TempLoc++) {\r
- if ((*TempLoc == L'^' && *(TempLoc+1) == L'^')\r
- || (*TempLoc == L'^' && *(TempLoc+1) == L'|')\r
- || (*TempLoc == L'^' && *(TempLoc+1) == L'\"')\r
- ){\r
+ if (*TempLoc == L'^' && *(TempLoc+1) == L'\"') {\r
CopyMem(TempLoc, TempLoc+1, StrSize(TempLoc) - sizeof(TempLoc[0]));\r
}\r
}\r
for (NextDelim = *TempParameter ; NextDelim != NULL && *NextDelim != CHAR_NULL ; NextDelim++) {\r
if (*NextDelim == L'^' && *(NextDelim+1) == L'^') {\r
CopyMem(NextDelim, NextDelim+1, StrSize(NextDelim) - sizeof(NextDelim[0]));\r
- }/* else if (*NextDelim == L'^') {\r
- *NextDelim = L' ';\r
- }*/\r
+ }\r
}\r
while ((*TempParameter)[StrLen(*TempParameter)-1] == L' ') {\r
(*TempParameter)[StrLen(*TempParameter)-1] = CHAR_NULL;\r
return (Status);\r
}\r
\r
+/**\r
+ Determin if a file name represents a unicode file.\r
+\r
+ @param[in] FileName Pointer to the filename to open.\r
+\r
+ @retval EFI_SUCCESS The file is a unicode file.\r
+ @return An error upon failure.\r
+**/\r
EFI_STATUS\r
EFIAPI\r
IsUnicodeFile(\r
Strips out quotes sections of a string.\r
\r
All of the characters between quotes is replaced with spaces.\r
+\r
+ @param[in,out] TheString A pointer to the string to update.\r
**/\r
VOID\r
EFIAPI\r
ErrAppend = FALSE;\r
OutAppend = FALSE;\r
CommandLineCopy = NULL;\r
- FirstLocation = (CHAR16*)(-1);\r
+ FirstLocation = NULL;\r
\r
if (ShellParameters == NULL || SystemTableInfo == NULL || OldStdIn == NULL || OldStdOut == NULL || OldStdErr == NULL) {\r
return (EFI_INVALID_PARAMETER);\r
CommandLineCopy = StrnCatGrow(&CommandLineCopy, NULL, NewCommandLine, 0);\r
Status = EFI_SUCCESS;\r
Split = NULL;\r
+ FirstLocation = CommandLineCopy + StrLen(CommandLineCopy);\r
\r
StripQuotes(CommandLineCopy);\r
\r
}\r
}\r
\r
- if (FirstLocation != (CHAR16*)(-1) \r
+ if (FirstLocation != CommandLineCopy + StrLen(CommandLineCopy)\r
&& ((UINTN)(FirstLocation - CommandLineCopy) < StrLen(NewCommandLine))\r
){\r
*(NewCommandLine + (UINTN)(FirstLocation - CommandLineCopy)) = CHAR_NULL;\r