]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Library/ShellLib.h
fixed license header / copyright date on all files.
[mirror_edk2.git] / ShellPkg / Include / Library / ShellLib.h
index 3d2fbe27af8b0264c432564048140df6cbd7f881..b774d0463d58a4f0e5fdd298f973ae1b7a719983 100644 (file)
@@ -1,8 +1,8 @@
 /** @file\r
   Provides interface to shell functionality for shell commands and applications.\r
 \r
-  Copyright (c) 2006 - 2010, Intel Corporation<BR>\r
-  All rights reserved. This program and the accompanying materials\r
+  Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+  This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   http://opensource.org/licenses/bsd-license.php\r
 #include <Protocol/EfiShellParameters.h>\r
 \r
 /**\r
-  This function will retrieve the information about the file for the handle \r
+  This function will retrieve the information about the file for the handle\r
   specified and store it in allocated pool memory.\r
 \r
-  This function allocates a buffer to store the file's information. It is the \r
+  This function allocates a buffer to store the file's information. It is the\r
   caller's responsibility to free the buffer.\r
 \r
-  @param[in] FileHandle         The file handle of the file for which information is \r
+  @param[in] FileHandle         The file handle of the file for which information is\r
                                 being requested.\r
 \r
   @retval NULL                  Information could not be retrieved.\r
@@ -45,10 +45,10 @@ ShellGetFileInfo (
   );\r
 \r
 /**\r
-  This function will set the information about the file for the opened handle \r
+  This function will set the information about the file for the opened handle\r
   specified.\r
 \r
-  @param[in]  FileHandle        The file handle of the file for which information \r
+  @param[in]  FileHandle        The file handle of the file for which information\r
                                 is being set.\r
 \r
   @param[in] FileInfo           The infotmation to set.\r
@@ -72,10 +72,10 @@ ShellSetFileInfo (
 /**\r
   This function will open a file or directory referenced by DevicePath.\r
 \r
-  This function opens a file with the open mode according to the file path. The \r
+  This function opens a file with the open mode according to the file path. The\r
   Attributes is valid only for EFI_FILE_MODE_CREATE.\r
 \r
-  @param[in]  FilePath                       On input the device path to the file.  On output \r
+  @param[in]  FilePath                       On input the device path to the file.  On output\r
                                 the remaining device path.\r
   @param[out]  DeviceHandle      Pointer to the system device handle.\r
   @param[out]  FileHandle                  Pointer to the file handle.\r
@@ -84,18 +84,18 @@ ShellSetFileInfo (
 \r
   @retval EFI_SUCCESS                  The information was set.\r
   @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED            Could not open the file path.     \r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the \r
-                                device or the file system could not be found on \r
+  @retval EFI_UNSUPPORTED            Could not open the file path.\r
+  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+                                device or the file system could not be found on\r
                                 the device.\r
   @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the \r
+  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the\r
                                 medium is no longer supported.\r
   @retval EFI_DEVICE_ERROR         The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED        The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the \r
+  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
                                 file.\r
   @retval EFI_VOLUME_FULL            The volume is full.\r
 **/\r
@@ -112,8 +112,8 @@ ShellOpenFileByDevicePath(
 /**\r
   This function will open a file or directory referenced by filename.\r
 \r
-  If return is EFI_SUCCESS, the Filehandle is the opened file's handle; \r
-  otherwise, the Filehandle is NULL. The Attributes is valid only for \r
+  If return is EFI_SUCCESS, the Filehandle is the opened file's handle;\r
+  otherwise, the Filehandle is NULL. The Attributes is valid only for\r
   EFI_FILE_MODE_CREATE.\r
 \r
   @param[in] FileName                Pointer to file name.\r
@@ -123,18 +123,18 @@ ShellOpenFileByDevicePath(
 \r
   @retval EFI_SUCCESS                  The information was set.\r
   @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED            Could not open the file path.     \r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the \r
-                                device or the file system could not be found \r
+  @retval EFI_UNSUPPORTED            Could not open the file path.\r
+  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+                                device or the file system could not be found\r
                                 on the device.\r
   @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the \r
+  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the\r
                                 medium is no longer supported.\r
   @retval EFI_DEVICE_ERROR         The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED        The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the \r
+  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
                                 file.\r
   @retval EFI_VOLUME_FULL            The volume is full.\r
 **/\r
@@ -150,8 +150,8 @@ ShellOpenFileByName(
 /**\r
   This function creates a directory.\r
 \r
-  If return is EFI_SUCCESS, the Filehandle is the opened directory's handle; \r
-  otherwise, the Filehandle is NULL. If the directory already existed, this \r
+  If return is EFI_SUCCESS, the Filehandle is the opened directory's handle;\r
+  otherwise, the Filehandle is NULL. If the directory already existed, this\r
   function opens the existing directory.\r
 \r
   @param[in]  DirectoryName     Pointer to Directory name.\r
@@ -159,18 +159,18 @@ ShellOpenFileByName(
 \r
   @retval EFI_SUCCESS                  The information was set.\r
   @retval EFI_INVALID_PARAMETER        One of the parameters has an invalid value.\r
-  @retval EFI_UNSUPPORTED            Could not open the file path.     \r
-  @retval EFI_NOT_FOUND                The specified file could not be found on the \r
-                                device or the file system could not be found \r
+  @retval EFI_UNSUPPORTED            Could not open the file path.\r
+  @retval EFI_NOT_FOUND                The specified file could not be found on the\r
+                                device or the file system could not be found\r
                                 on the device.\r
   @retval EFI_NO_MEDIA               The device has no medium.\r
-  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the \r
+  @retval EFI_MEDIA_CHANGED        The device has a different medium in it or the\r
                                 medium is no longer supported.\r
   @retval EFI_DEVICE_ERROR         The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
   @retval EFI_WRITE_PROTECTED    The file or medium is write protected.\r
   @retval EFI_ACCESS_DENIED        The file was opened read only.\r
-  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the \r
+  @retval EFI_OUT_OF_RESOURCES Not enough resources were available to open the\r
                                 file.\r
   @retval EFI_VOLUME_FULL            The volume is full.\r
 **/\r
@@ -184,21 +184,21 @@ ShellCreateDirectory(
 /**\r
   This function reads information from an opened file.\r
 \r
-  If FileHandle is not a directory, the function reads the requested number of \r
-  bytes from the file at the file's current position and returns them in Buffer. \r
+  If FileHandle is not a directory, the function reads the requested number of\r
+  bytes from the file at the file's current position and returns them in Buffer.\r
   If the read goes beyond the end of the file, the read length is truncated to the\r
-  end of the file. The file's current position is increased by the number of bytes \r
-  returned.  If FileHandle is a directory, the function reads the directory entry \r
-  at the file's current position and returns the entry in Buffer. If the Buffer \r
-  is not large enough to hold the current directory entry, then \r
-  EFI_BUFFER_TOO_SMALL is returned and the current file position is not updated. \r
-  BufferSize is set to be the size of the buffer needed to read the entry. On \r
-  success, the current position is updated to the next directory entry. If there \r
-  are no more directory entries, the read returns a zero-length buffer. \r
+  end of the file. The file's current position is increased by the number of bytes\r
+  returned.  If FileHandle is a directory, the function reads the directory entry\r
+  at the file's current position and returns the entry in Buffer. If the Buffer\r
+  is not large enough to hold the current directory entry, then\r
+  EFI_BUFFER_TOO_SMALL is returned and the current file position is not updated.\r
+  BufferSize is set to be the size of the buffer needed to read the entry. On\r
+  success, the current position is updated to the next directory entry. If there\r
+  are no more directory entries, the read returns a zero-length buffer.\r
   EFI_FILE_INFO is the structure returned as the directory entry.\r
 \r
   @param[in] FileHandle         The opened file handle.\r
-  @param[in] ReadSize           On input the size of buffer in bytes.  On return \r
+  @param[in] ReadSize           On input the size of buffer in bytes.  On return\r
                                 the number of bytes written.\r
   @param[out] Buffer            The buffer to put read data into.\r
 \r
@@ -206,7 +206,7 @@ ShellCreateDirectory(
   @retval EFI_NO_MEDIA         The device has no media.\r
   @retval EFI_DEVICE_ERROR         The device reported an error.\r
   @retval EFI_VOLUME_CORRUPTED The file system structures are corrupted.\r
-  @retval EFI_BUFFER_TO_SMALL    Buffer is too small. ReadSize contains required \r
+  @retval EFI_BUFFER_TO_SMALL    Buffer is too small. ReadSize contains required\r
                                 size.\r
 \r
 **/\r
@@ -221,11 +221,11 @@ ShellReadFile(
 /**\r
   Write data to a file.\r
 \r
-  This function writes the specified number of bytes to the file at the current \r
-  file position. The current file position is advanced the actual number of bytes \r
-  written, which is returned in BufferSize. Partial writes only occur when there \r
-  has been a data error during the write attempt (such as "volume space full"). \r
-  The file is automatically grown to hold the data if required. Direct writes to \r
+  This function writes the specified number of bytes to the file at the current\r
+  file position. The current file position is advanced the actual number of bytes\r
+  written, which is returned in BufferSize. Partial writes only occur when there\r
+  has been a data error during the write attempt (such as "volume space full").\r
+  The file is automatically grown to hold the data if required. Direct writes to\r
   opened directories are not supported.\r
 \r
   @param[in] FileHandle         The opened file for writing.\r
@@ -252,11 +252,11 @@ ShellWriteFile(
   IN VOID                       *Buffer\r
   );\r
 \r
-/** \r
+/**\r
   Close an open file handle.\r
 \r
-  This function closes a specified file handle. All "dirty" cached file data is \r
-  flushed to the device, and the file is closed. In all cases the handle is \r
+  This function closes a specified file handle. All "dirty" cached file data is\r
+  flushed to the device, and the file is closed. In all cases the handle is\r
   closed.\r
 \r
   @param[in] FileHandle           The file handle to close.\r
@@ -274,13 +274,13 @@ ShellCloseFile (
   Delete a file and close the handle\r
 \r
   This function closes and deletes a file. In all cases the file handle is closed.\r
-  If the file cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is \r
+  If the file cannot be deleted, the warning code EFI_WARN_DELETE_FAILURE is\r
   returned, but the handle is still closed.\r
 \r
   @param[in] FileHandle             The file handle to delete.\r
 \r
   @retval EFI_SUCCESS               The file was closed sucessfully.\r
-  @retval EFI_WARN_DELETE_FAILURE   The handle was closed, but the file was not \r
+  @retval EFI_WARN_DELETE_FAILURE   The handle was closed, but the file was not\r
                                     deleted.\r
   @retval INVALID_PARAMETER                One of the parameters has an invalid value.\r
 **/\r
@@ -293,12 +293,12 @@ ShellDeleteFile (
 /**\r
   Set the current position in a file.\r
 \r
-  This function sets the current file position for the handle to the position \r
+  This function sets the current file position for the handle to the position\r
   supplied. With the exception of seeking to position 0xFFFFFFFFFFFFFFFF, only\r
-  absolute positioning is supported, and seeking past the end of the file is \r
-  allowed (a subsequent write would grow the file). Seeking to position \r
+  absolute positioning is supported, and seeking past the end of the file is\r
+  allowed (a subsequent write would grow the file). Seeking to position\r
   0xFFFFFFFFFFFFFFFF causes the current position to be set to the end of the file.\r
-  If FileHandle is a directory, the only position that may be set is zero. This \r
+  If FileHandle is a directory, the only position that may be set is zero. This\r
   has the effect of starting the read process of the directory entries over.\r
 \r
   @param[in] FileHandle         The file handle on which the position is being set.\r
@@ -306,7 +306,7 @@ ShellDeleteFile (
   @param[in] Position           Byte position from begining of file.\r
 \r
   @retval EFI_SUCCESS           Operation completed sucessfully.\r
-  @retval EFI_UNSUPPORTED       The seek request for non-zero is not valid on \r
+  @retval EFI_UNSUPPORTED       The seek request for non-zero is not valid on\r
                                 directories.\r
   @retval INVALID_PARAMETER     One of the parameters has an invalid value.\r
 **/\r
@@ -317,11 +317,11 @@ ShellSetFilePosition (
   IN UINT64            Position\r
   );\r
 \r
-/** \r
+/**\r
   Gets a file's current position\r
 \r
-  This function retrieves the current file position for the file handle. For \r
-  directories, the current file position has no meaning outside of the file \r
+  This function retrieves the current file position for the file handle. For\r
+  directories, the current file position has no meaning outside of the file\r
   system driver and as such the operation is not supported. An error is returned\r
   if FileHandle is a directory.\r
 \r
@@ -341,7 +341,7 @@ ShellGetFilePosition (
 \r
 /**\r
   Flushes data on a file\r
-  \r
+\r
   This function flushes all modified data associated with a file to a device.\r
 \r
   @param[in] FileHandle         The file handle on which to flush data.\r
@@ -362,8 +362,8 @@ ShellFlushFile (
 /**\r
   Retrieves the first file from a directory\r
 \r
-  This function takes an open directory handle and gets the first file \r
-  in the directory's info. Caller can use ShellFindNextFile() to get \r
+  This function takes an open directory handle and gets the first file\r
+  in the directory's info. Caller can use ShellFindNextFile() to get\r
   subsequent files.\r
 \r
   Caller must use FreePool on *Buffer opon completion of all file searching.\r
@@ -388,12 +388,12 @@ ShellFindFirstFile (
 /**\r
   Retrieves the next file in a directory.\r
 \r
-  To use this function, caller must call the ShellFindFirstFile() to get the \r
-  first file, and then use this function get other files. This function can be \r
-  called for several times to get each file's information in the directory. If \r
-  the call of ShellFindNextFile() got the last file in the directory, the next \r
-  call of this function has no file to get. *NoFile will be set to TRUE and the \r
-  data in Buffer is meaningless. \r
+  To use this function, caller must call the ShellFindFirstFile() to get the\r
+  first file, and then use this function get other files. This function can be\r
+  called for several times to get each file's information in the directory. If\r
+  the call of ShellFindNextFile() got the last file in the directory, the next\r
+  call of this function has no file to get. *NoFile will be set to TRUE and the\r
+  data in Buffer is meaningless.\r
 \r
   @param[in] DirHandle          The file handle of the directory.\r
   @param[out] Buffer                         Pointer to buffer for file's information.\r
@@ -415,7 +415,7 @@ ShellFindNextFile(
 /**\r
   Retrieve the size of a file.\r
 \r
-  This function extracts the file size info from the FileHandle's EFI_FILE_INFO \r
+  This function extracts the file size info from the FileHandle's EFI_FILE_INFO\r
   data.\r
 \r
   @param[in] FileHandle         The file handle from which size is retrieved.\r
@@ -448,7 +448,7 @@ ShellGetExecutionBreakFlag(
 /**\r
   Return the value of an environment variable.\r
 \r
-  This function gets the value of the environment variable set by the \r
+  This function gets the value of the environment variable set by the\r
   ShellSetEnvironmentVariable function.\r
 \r
   @param[in] EnvKey             The key name of the environment variable.\r
@@ -506,7 +506,7 @@ ShellSetEnvironmentVariable (
   Output is only supported for pre-UEFI Shell 2.0\r
 \r
   @param[in] ImageHandle          Parent image that is starting the operation.\r
-  @param[in] CommandLine          Pointer to null terminated command line.\r
+  @param[in] CommandLine          Pointer to NULL terminated command line.\r
   @param[in] Output               True to display debug output.  False to hide it.\r
   @param[in] EnvironmentVariables Optional pointer to array of environment variables\r
                                   in the form "x=y".  If NULL current set is used.\r
@@ -531,8 +531,8 @@ ShellExecute (
 /**\r
   Retreives the current directory path.\r
 \r
-  If the DeviceName is NULL, it returns the current device's current directory \r
-  name. If the DeviceName is not NULL, it returns the current directory name \r
+  If the DeviceName is NULL, it returns the current device's current directory\r
+  name. If the DeviceName is not NULL, it returns the current directory name\r
   on specified drive.\r
 \r
   @param[in] DeviceName         The name of the file system to get directory on.\r
@@ -549,12 +549,12 @@ ShellGetCurrentDir (
 /**\r
   Sets (enabled or disabled) the page break mode.\r
 \r
-  When page break mode is enabled the screen will stop scrolling \r
+  When page break mode is enabled the screen will stop scrolling\r
   and wait for operator input before scrolling a subsequent screen.\r
 \r
   @param[in] CurrentState       TRUE to enable and FALSE to disable.\r
 **/\r
-VOID \r
+VOID\r
 EFIAPI\r
 ShellSetPageBreakMode (\r
   IN BOOLEAN                    CurrentState\r
@@ -563,21 +563,21 @@ ShellSetPageBreakMode (
 /**\r
   Opens a group of files based on a path.\r
 \r
-  This function uses the Arg to open all the matching files. Each matched \r
-  file has a SHELL_FILE_ARG structure to record the file information. These \r
-  structures are placed on the list ListHead. Users can get the SHELL_FILE_ARG \r
+  This function uses the Arg to open all the matching files. Each matched\r
+  file has a SHELL_FILE_ARG structure to record the file information. These\r
+  structures are placed on the list ListHead. Users can get the SHELL_FILE_ARG\r
   structures from ListHead to access each file. This function supports wildcards\r
-  and will process '?' and '*' as such.  The list must be freed with a call to \r
+  and will process '?' and '*' as such.  The list must be freed with a call to\r
   ShellCloseFileMetaArg().\r
 \r
-  If you are NOT appending to an existing list *ListHead must be NULL.  If \r
+  If you are NOT appending to an existing list *ListHead must be NULL.  If\r
   *ListHead is NULL then it must be callee freed.\r
 \r
   @param[in] Arg                Pointer to path string.\r
   @param[in] OpenMode           Mode to open files with.\r
   @param[in] ListHead           Head of linked list of results.\r
 \r
-  @retval EFI_SUCCESS           The operation was sucessful and the list head \r
+  @retval EFI_SUCCESS           The operation was sucessful and the list head\r
                                 contains the list of opened files.\r
   @retval != EFI_SUCCESS        The operation failed.\r
 \r
@@ -624,8 +624,8 @@ ShellFindFilePath (
   );\r
 \r
 /**\r
-  Find a file by searching the CWD and then the path with a variable set of file \r
-  extensions.  If the file is not found it will append each extension in the list \r
+  Find a file by searching the CWD and then the path with a variable set of file\r
+  extensions.  If the file is not found it will append each extension in the list\r
   in the order provided and return the first one that is successful.\r
 \r
   If FileName is NULL, then ASSERT.\r
@@ -666,14 +666,14 @@ typedef struct {
 extern SHELL_PARAM_ITEM EmptyParamList[];\r
 \r
 /**\r
-  Checks the command line arguments passed against the list of valid ones.  \r
+  Checks the command line arguments passed against the list of valid ones.\r
   Optionally removes NULL values first.\r
-  \r
+\r
   If no initialization is required, then return RETURN_SUCCESS.\r
-  \r
+\r
   @param[in] CheckList          Pointer to list of parameters to check.\r
   @param[out] CheckPackage      Package of checked values.\r
-  @param[out] ProblemParam      Optional pointer to pointer to unicode string for \r
+  @param[out] ProblemParam      Optional pointer to pointer to unicode string for\r
                                 the paramater that caused failure.\r
   @param[in] AutoPageBreak      Will automatically set PageBreakEnabled.\r
   @param[in] AlwaysAllowNumbers Will never fail for number based flags.\r
@@ -681,13 +681,13 @@ extern SHELL_PARAM_ITEM EmptyParamList[];
   @retval EFI_SUCCESS           The operation completed sucessfully.\r
   @retval EFI_OUT_OF_RESOURCES  A memory allocation failed.\r
   @retval EFI_INVALID_PARAMETER A parameter was invalid.\r
-  @retval EFI_VOLUME_CORRUPTED  The command line was corrupt.  An argument was \r
-                                duplicated.  The duplicated command line argument \r
+  @retval EFI_VOLUME_CORRUPTED  The command line was corrupt.  An argument was\r
+                                duplicated.  The duplicated command line argument\r
                                 was returned in ProblemParam if provided.\r
   @retval EFI_DEVICE_ERROR      The commands contained 2 opposing arguments.  One\r
-                                of the command line arguments was returned in \r
+                                of the command line arguments was returned in\r
                                 ProblemParam if provided.\r
-  @retval EFI_NOT_FOUND         A argument required a value that was missing.  \r
+  @retval EFI_NOT_FOUND         A argument required a value that was missing.\r
                                 The invalid command line argument was returned in\r
                                 ProblemParam if provided.\r
 **/\r
@@ -727,7 +727,7 @@ ShellCommandLineFreeVarList (
 \r
   If CheckPackage is NULL then return FALSE.\r
   If KeyString is NULL then ASSERT().\r
-  \r
+\r
   @param[in] CheckPackage       The package of parsed command line arguments.\r
   @param[in] KeyString          The Key of the command line argument to check for.\r
 \r
@@ -745,7 +745,7 @@ ShellCommandLineGetFlag (
   Returns value from command line argument.\r
 \r
   Value parameters are in the form of "-<Key> value" or "/<Key> value".\r
-  \r
+\r
   If CheckPackage is NULL, then return NULL.\r
 \r
   @param[in] CheckPackage       The package of parsed command line arguments.\r
@@ -765,7 +765,7 @@ ShellCommandLineGetValue (
   Returns raw value from command line argument.\r
 \r
   Raw value parameters are in the form of "value" in a specific position in the list.\r
-  \r
+\r
   If CheckPackage is NULL, then return NULL.\r
 \r
   @param[in] CheckPackage       The package of parsed command line arguments.\r
@@ -782,8 +782,8 @@ ShellCommandLineGetRawValue (
   );\r
 \r
 /**\r
-  Returns the number of command line value parameters that were parsed.  \r
-  \r
+  Returns the number of command line value parameters that were parsed.\r
+\r
   This will not include flags.\r
 \r
   @retval (UINTN)-1     No parsing has ocurred.\r
@@ -798,7 +798,7 @@ ShellCommandLineGetCount(
 /**\r
   Determins if a parameter is duplicated.\r
 \r
-  If Param is not NULL then it will point to a callee allocated string buffer \r
+  If Param is not NULL then it will point to a callee allocated string buffer\r
   with the parameter value if a duplicate is found.\r
 \r
   If CheckPackage is NULL, then ASSERT.\r
@@ -839,14 +839,14 @@ ShellInitialize (
   Print at a specific location on the screen.\r
 \r
   This function will move the cursor to a given screen location and print the specified string.\r
-  \r
-  If -1 is specified for either the Row or Col the current screen location for BOTH \r
+\r
+  If -1 is specified for either the Row or Col the current screen location for BOTH\r
   will be used.\r
 \r
   If either Row or Col is out of range for the current console, then ASSERT.\r
   If Format is NULL, then ASSERT.\r
 \r
-  In addition to the standard %-based flags as supported by UefiLib Print() this supports \r
+  In addition to the standard %-based flags as supported by UefiLib Print() this supports\r
   the following additional flags:\r
     %N       -   Set output attribute to normal\r
     %H       -   Set output attribute to highlight\r
@@ -876,14 +876,14 @@ ShellPrintEx(
   Print at a specific location on the screen.\r
 \r
   This function will move the cursor to a given screen location and print the specified string.\r
-  \r
-  If -1 is specified for either the Row or Col the current screen location for BOTH \r
+\r
+  If -1 is specified for either the Row or Col the current screen location for BOTH\r
   will be used.\r
 \r
   If either Row or Col is out of range for the current console, then ASSERT.\r
   If Format is NULL, then ASSERT.\r
 \r
-  In addition to the standard %-based flags as supported by UefiLib Print() this supports \r
+  In addition to the standard %-based flags as supported by UefiLib Print() this supports\r
   the following additional flags:\r
     %N       -   Set output attribute to normal.\r
     %H       -   Set output attribute to highlight.\r
@@ -895,6 +895,8 @@ ShellPrintEx(
 \r
   @param[in] Row                The row to print at.\r
   @param[in] Col                The column to print at.\r
+  @param[in] Language           The language of the string to retrieve.  If this parameter\r
+                                is NULL, then the current platform language is used.\r
   @param[in] HiiFormatStringId  The format string Id for getting from Hii.\r
   @param[in] HiiFormatHandle    The format string Handle for getting from Hii.\r
 \r
@@ -905,6 +907,7 @@ EFIAPI
 ShellPrintHiiEx(\r
   IN INT32                Col OPTIONAL,\r
   IN INT32                Row OPTIONAL,\r
+  IN CONST CHAR8          *Language OPTIONAL,\r
   IN CONST EFI_STRING_ID  HiiFormatStringId,\r
   IN CONST EFI_HANDLE     HiiFormatHandle,\r
   ...\r
@@ -966,7 +969,7 @@ ShellIsFileInPath(
   );\r
 \r
 /**\r
-  Function to determine whether a string is decimal or hex representation of a number \r
+  Function to determine whether a string is decimal or hex representation of a number\r
   and return the number converted from the string.\r
 \r
   @param[in] String   String representation of a number\r
@@ -980,38 +983,38 @@ ShellStrToUintn(
   );\r
 \r
 /**\r
-  Safely append with automatic string resizing given length of Destination and \r
+  Safely append with automatic string resizing given length of Destination and\r
   desired length of copy from Source.\r
 \r
-  Append the first D characters of Source to the end of Destination, where D is \r
-  the lesser of Count and the StrLen() of Source. If appending those D characters \r
-  will fit within Destination (whose Size is given as CurrentSize) and \r
-  still leave room for a null terminator, then those characters are appended, \r
-  starting at the original terminating null of Destination, and a new terminating \r
-  null is appended.\r
+  Append the first D characters of Source to the end of Destination, where D is\r
+  the lesser of Count and the StrLen() of Source. If appending those D characters\r
+  will fit within Destination (whose Size is given as CurrentSize) and\r
+  still leave room for a NULL terminator, then those characters are appended,\r
+  starting at the original terminating NULL of Destination, and a new terminating\r
+  NULL is appended.\r
 \r
   If appending D characters onto Destination will result in a overflow of the size\r
   given in CurrentSize the string will be grown such that the copy can be performed\r
   and CurrentSize will be updated to the new size.\r
 \r
-  If Source is NULL, there is nothing to append, just return the current buffer in \r
+  If Source is NULL, there is nothing to append, just return the current buffer in\r
   Destination.\r
 \r
   If Destination is NULL, then ASSERT().\r
-  If Destination's current length (including NULL terminator) is already more than \r
+  If Destination's current length (including NULL terminator) is already more than\r
   CurrentSize, then ASSERT().\r
 \r
   @param[in,out] Destination    The String to append onto.\r
-  @param[in,out] CurrentSize    On call the number of bytes in Destination.  On \r
+  @param[in,out] CurrentSize    On call the number of bytes in Destination.  On\r
                                 return possibly the new size (still in bytes).  If NULL\r
                                 then allocate whatever is needed.\r
   @param[in]     Source         The String to append from.\r
-  @param[in]     Count          Maximum number of characters to append.  If 0 then \r
+  @param[in]     Count          Maximum number of characters to append.  If 0 then\r
                                 all are appended.\r
 \r
   @return                       The Destination after apending the Source.\r
 **/\r
-CHAR16* \r
+CHAR16*\r
 EFIAPI\r
 StrnCatGrow (\r
   IN OUT CHAR16           **Destination,\r
@@ -1021,7 +1024,7 @@ StrnCatGrow (
   );\r
 \r
 /**\r
-  This is a find and replace function.  Upon successful return the NewString is a copy of \r
+  This is a find and replace function.  Upon successful return the NewString is a copy of\r
   SourceString with each instance of FindTarget replaced with ReplaceWith.\r
 \r
   If SourceString and NewString overlap the behavior is undefined.\r
@@ -1042,7 +1045,7 @@ StrnCatGrow (
   @retval EFI_INVALID_PARAMETER       ReplaceWith was NULL.\r
   @retval EFI_INVALID_PARAMETER       FindTarget had length < 1.\r
   @retval EFI_INVALID_PARAMETER       SourceString had length < 1.\r
-  @retval EFI_BUFFER_TOO_SMALL        NewSize was less than the minimum size to hold \r
+  @retval EFI_BUFFER_TOO_SMALL        NewSize was less than the minimum size to hold\r
                                       the new string (truncation occurred).\r
   @retval EFI_SUCCESS                 The string was sucessfully copied with replacement.\r
 **/\r
@@ -1066,8 +1069,8 @@ ShellCopySearchAndReplace2(
 /**\r
   Check if a Unicode character is a hexadecimal character.\r
 \r
-  This internal function checks if a Unicode character is a \r
-  decimal character.  The valid hexadecimal character is \r
+  This internal function checks if a Unicode character is a\r
+  decimal character.  The valid hexadecimal character is\r
   L'0' to L'9', L'a' to L'f', or L'A' to L'F'.\r
 \r
   @param[in]  Char  The character to check.\r