summaryrefslogtreecommitdiff
path: root/ShellPkg/Include/Library/ShellCommandLib.h
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2016-07-18 18:06:33 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2016-07-20 10:27:51 +0800
commitc0bcd3433f33876c519bf5567e0ab69261b57fe9 (patch)
tree54535f574a388cd336cd5f1a80d01b5be9b69e3a /ShellPkg/Include/Library/ShellCommandLib.h
parentb464d7ed0f417fe37a9d998e377a144704273949 (diff)
downloadedk2-c0bcd3433f33876c519bf5567e0ab69261b57fe9.zip
edk2-c0bcd3433f33876c519bf5567e0ab69261b57fe9.tar.gz
edk2-c0bcd3433f33876c519bf5567e0ab69261b57fe9.tar.bz2
ShellPkg: Move FindFirstCharacter/GetNextParameter to ShellCommandLib
And add Shell prefix to the two library APIs. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Diffstat (limited to 'ShellPkg/Include/Library/ShellCommandLib.h')
-rw-r--r--ShellPkg/Include/Library/ShellCommandLib.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/ShellPkg/Include/Library/ShellCommandLib.h b/ShellPkg/Include/Library/ShellCommandLib.h
index 3ee8200..5c5e241 100644
--- a/ShellPkg/Include/Library/ShellCommandLib.h
+++ b/ShellPkg/Include/Library/ShellCommandLib.h
@@ -719,4 +719,49 @@ CatSDumpHex (
IN UINTN DataSize,
IN VOID *UserData
);
+
+/**
+ Return the pointer to the first occurrence of any character from a list of characters.
+
+ @param[in] String The string to parse
+ @param[in] CharacterList The list of character to look for
+ @param[in] IgnoreEscapedCharacter TRUE to ignore escaped characters
+
+ @return The location of the first character in the String.
+ @return Pointer to the ending NULL character of the String.
+**/
+CONST CHAR16*
+EFIAPI
+ShellFindFirstCharacter (
+ IN CONST CHAR16 *String,
+ IN CONST CHAR16 *CharacterList,
+ IN CONST BOOLEAN IgnoreEscapedCharacter
+ );
+
+/**
+ return the next parameter from a command line string;
+
+ This function moves the next parameter from Walker into NextParameter and moves
+ Walker up past that parameter for recursive calling. When the final parameter
+ is moved *Walker will be set to NULL;
+
+ @param[in, out] Walker pointer to string of command line. Adjusted to
+ reminaing command line on return
+ @param[in, out] NextParameter string of command line item extracted.
+ @param[in] Length Length of TempParameter in bytes
+ @param[in] StripQuotation if TRUE then strip the quotation marks surrounding
+ the parameters.
+
+ @return EFI_INALID_PARAMETER A required parameter was NULL or pointed to a NULL or empty string.
+ @return EFI_NOT_FOUND A closing " could not be found on the specified string
+**/
+EFI_STATUS
+EFIAPI
+ShellGetNextParameter(
+ IN OUT CHAR16 **Walker,
+ IN OUT CHAR16 *NextParameter,
+ IN CONST UINTN Length,
+ IN BOOLEAN StripQuotation
+ );
+
#endif //_SHELL_COMMAND_LIB_