Temp = StrStr(SourceString, FindString);\r
\r
//\r
- // If nothing found, or we dont care about escape characters\r
+ // If nothing found, or we don't care about escape characters\r
//\r
if (Temp == NULL || !CheckForEscapeCharacter) {\r
return (Temp);\r
}\r
\r
/**\r
- Check whether the string between a pair of % is a valid envifronment variable name.\r
+ Check whether the string between a pair of % is a valid environment variable name.\r
\r
@param[in] BeginPercent pointer to the first percent.\r
@param[in] EndPercent pointer to the last percent.\r
feature's enabled state was not known when the shell initially launched.\r
\r
@retval EFI_SUCCESS The feature is enabled.\r
- @retval EFI_OUT_OF_RESOURCES There is not enough mnemory available.\r
+ @retval EFI_OUT_OF_RESOURCES There is not enough memory available.\r
**/\r
EFI_STATUS\r
EFIAPI\r
/**\r
Sets all the alias' that were registered with the ShellCommandLib library.\r
\r
- @retval EFI_SUCCESS all init commands were run sucessfully.\r
+ @retval EFI_SUCCESS all init commands were run successfully.\r
**/\r
EFI_STATUS\r
EFIAPI\r
loaded image protocol installed on it. The FilePath will point to the device path\r
for the file that was loaded.\r
\r
- @param[in, out] DevPath On a sucessful return the device path to the loaded image.\r
- @param[in, out] FilePath On a sucessful return the device path to the file.\r
+ @param[in, out] DevPath On a successful return the device path to the loaded image.\r
+ @param[in, out] FilePath On a successful return the device path to the file.\r
\r
- @retval EFI_SUCCESS The 2 device paths were sucessfully returned.\r
+ @retval EFI_SUCCESS The 2 device paths were successfully returned.\r
@retval other A error from gBS->HandleProtocol.\r
\r
@sa HandleProtocol\r
) == 0) {\r
ShellInfoObject.ShellInitSettings.BitUnion.Bits.Exit = TRUE;\r
} else if (StrnCmp (L"-", CurrentArg, 1) == 0) {\r
- // Unrecognised option\r
+ // Unrecognized option\r
ShellPrintHiiEx(-1, -1, NULL,\r
STRING_TOKEN (STR_GEN_PROBLEM),\r
ShellInfoObject.HiiHandle,\r
FileStringPath = ShellFindFilePath(mStartupScript);\r
if (FileStringPath == NULL) {\r
//\r
- // we return success since we dont need to have a startup script\r
+ // we return success since we don't need to have a startup script\r
//\r
Status = EFI_SUCCESS;\r
ASSERT(FileHandle == NULL);\r
SecondPercent = FirstPercent!=NULL?FindNextInstance(FirstPercent+1, L"%", TRUE):NULL;\r
if (FirstPercent == NULL || SecondPercent == NULL) {\r
//\r
- // If we ever dont have 2 % we are done.\r
+ // If we ever don't have 2 % we are done.\r
//\r
break;\r
}\r
//\r
CopyMem(FirstPercent, SecondPercent + 1, StrSize(SecondPercent + 1));\r
//\r
- // dont need to update the locator. both % characters are gone.\r
+ // don't need to update the locator. both % characters are gone.\r
//\r
} else {\r
CurrentLocator = SecondPercent + 1;\r
\r
@param[in] OriginalCommandLine The original command line\r
\r
- @retval NULL An error ocurred.\r
+ @retval NULL An error occurred.\r
@return The new command line with no environment variables present.\r
**/\r
CHAR16*\r
; Temp = StrStr(Temp+1, AliasListNode->Alias)\r
){\r
//\r
- // we need a preceeding and if there is space no ^ preceeding (if no space ignore)\r
+ // we need a preceding and if there is space no ^ preceding (if no space ignore)\r
//\r
if ((((Temp-OriginalCommandLine)>2) && *(Temp-2) != L'^') || ((Temp-OriginalCommandLine)<=2)) {\r
NewSize += StrSize(AliasListNode->CommandString);\r
; Temp = StrStr(Temp+1, MasterEnvList)\r
){\r
//\r
- // we need a preceeding and following % and if there is space no ^ preceeding (if no space ignore)\r
+ // we need a preceding and following % and if there is space no ^ preceding (if no space ignore)\r
//\r
if (*(Temp-1) == L'%' && *(Temp+StrLen(MasterEnvList)) == L'%' &&\r
((((Temp-OriginalCommandLine)>2) && *(Temp-2) != L'^') || ((Temp-OriginalCommandLine)<=2))) {\r
}\r
\r
//\r
- // Remove non-existant environment variables\r
+ // Remove non-existent environment variables\r
//\r
StripUnreplacedEnvironmentVariables(NewCommandLine1);\r
\r
@param[in] CmdLine pointer to the command line to process\r
\r
@retval EFI_SUCCESS The operation was successful\r
- @return an error occured.\r
+ @return an error occurred.\r
**/\r
EFI_STATUS\r
EFIAPI\r
\r
@retval EFI_SUCCESS The operation was successful\r
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
- @return some other error occured\r
+ @return some other error occurred\r
**/\r
EFI_STATUS\r
EFIAPI\r
/**\r
Run an internal shell command.\r
\r
- This API will upadate the shell's environment since these commands are libraries.\r
+ This API will update the shell's environment since these commands are libraries.\r
\r
@param[in] CmdLine the command line to run.\r
@param[in] FirstParameter the first parameter on the command line\r
}\r
\r
//\r
- // This is guarenteed to be called after UpdateArgcArgv no matter what else happened.\r
+ // This is guaranteed to be called after UpdateArgcArgv no matter what else happened.\r
// This is safe even if the update API failed. In this case, it may be a no-op.\r
//\r
RestoreArgcArgv(ParamProtocol, &Argv, &Argc);\r
\r
//\r
- // If a script is running and the command is not a scipt only command, then\r
+ // If a script is running and the command is not a script only command, then\r
// change return value to success so the script won't halt (unless aborted).\r
//\r
// Script only commands have to be able halt the script since the script will\r
// NULL out comments (leveraged from RunScriptFileHandle() ).\r
// The # character on a line is used to denote that all characters on the same line\r
// and to the right of the # are to be ignored by the shell.\r
- // Afterward, again remove spaces, in case any were between the last command-parameter and '#'.\r
+ // Afterwards, again remove spaces, in case any were between the last command-parameter and '#'.\r
//\r
for (TempWalker = CleanOriginal; TempWalker != NULL && *TempWalker != CHAR_NULL; TempWalker++) {\r
if (*TempWalker == L'^') {\r
}\r
\r
//\r
- // We dont do normal processing with a split command line (output from one command input to another)\r
+ // We don't do normal processing with a split command line (output from one command input to another)\r
//\r
if (ContainsSplit(CleanOriginal)) {\r
Status = ProcessNewSplitCommandLine(CleanOriginal);\r
\r
STATIC CONST UINT16 InvalidChars[] = {L'*', L'?', L'<', L'>', L'\\', L'/', L'\"', 0x0001, 0x0002};\r
/**\r
- Function determins if the CommandName COULD be a valid command. It does not determine whether\r
+ Function determines if the CommandName COULD be a valid command. It does not determine whether\r
this is a valid command. It only checks for invalid characters.\r
\r
@param[in] CommandName The name to check\r
@param[in] Handle The handle to the already opened file.\r
@param[in] Name The name of the script file.\r
\r
- @retval EFI_SUCCESS the script completed sucessfully\r
+ @retval EFI_SUCCESS the script completed successfully\r
**/\r
EFI_STATUS\r
EFIAPI\r
@param[in] CmdLine the command line to run.\r
@param[in] ParamProtocol the shell parameters protocol pointer\r
\r
- @retval EFI_SUCCESS the script completed sucessfully\r
+ @retval EFI_SUCCESS the script completed successfully\r
**/\r
EFI_STATUS\r
EFIAPI\r
}\r
\r
//\r
- // This is guarenteed to be called after UpdateArgcArgv no matter what else happened.\r
+ // This is guaranteed to be called after UpdateArgcArgv no matter what else happened.\r
// This is safe even if the update API failed. In this case, it may be a no-op.\r
//\r
RestoreArgcArgv(ParamProtocol, &Argv, &Argc);\r
}\r
\r
/**\r
- Return the pointer to the first occurance of any character from a list of characters.\r
+ Return the pointer to the first occurrence of any character from a list of characters.\r
\r
@param[in] String the string to parse\r
@param[in] CharacterList the list of character to look for\r
\r
@retval EFI_SUCCESS The operation was successful\r
@retval EFI_OUT_OF_RESOURCES A memory allocation failed.\r
- @return some other error occured\r
+ @return some other error occurred\r
**/\r
EFI_STATUS\r
EFIAPI\r
/**\r
Sets all the alias' that were registered with the ShellCommandLib library.\r
\r
- @retval EFI_SUCCESS all init commands were run sucessfully.\r
+ @retval EFI_SUCCESS all init commands were run successfully.\r
**/\r
EFI_STATUS\r
EFIAPI\r
loaded image protocol installed on it. the FilePath will point to the device path\r
for the file that was loaded.\r
\r
- @param[in, out] DevPath on a sucessful return the device path to the loaded image\r
- @param[in, out] FilePath on a sucessful return the device path to the file\r
+ @param[in, out] DevPath on a successful return the device path to the loaded image\r
+ @param[in, out] FilePath on a successful return the device path to the file\r
\r
- @retval EFI_SUCCESS the 2 device paths were sucessfully returned.\r
+ @retval EFI_SUCCESS the 2 device paths were successfully returned.\r
@return other a error from gBS->HandleProtocol\r
\r
@sa HandleProtocol\r
);\r
\r
/**\r
- Function determins if the CommandName COULD be a valid command. It does not determine whether\r
+ Function determines if the CommandName COULD be a valid command. It does not determine whether\r
this is a valid command. It only checks for invalid characters.\r
\r
@param[in] CommandName The name to check\r
@param[in] Handle The handle to the already opened file.\r
@param[in] Name The name of the script file.\r
\r
- @retval EFI_SUCCESS the script completed sucessfully\r
+ @retval EFI_SUCCESS the script completed successfully\r
**/\r
EFI_STATUS\r
EFIAPI\r
@param[in] CmdLine the command line to run.\r
@param[in] ParamProtocol the shell parameters protocol pointer\r
\r
- @retval EFI_SUCCESS the script completed sucessfully\r
+ @retval EFI_SUCCESS the script completed successfully\r
**/\r
EFI_STATUS\r
EFIAPI\r
);\r
\r
/**\r
- Return the pointer to the first occurance of any character from a list of characters.\r
+ Return the pointer to the first occurrence of any character from a list of characters.\r
\r
@param[in] String the string to parse\r
@param[in] CharacterList the list of character to look for\r