]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Include/Library/ShellLib.h
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8633 6f19259b...
[mirror_edk2.git] / ShellPkg / Include / Library / ShellLib.h
index 5614d7174f59063620b081aad3bbe57cc7d9a3ef..37c85e94dcc771da4fdb3a644f215b75d0d31718 100644 (file)
@@ -22,8 +22,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   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\92s information. It is the \r
-  caller\92s responsibility to free the buffer\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  FileHandle  The file handle of the file for which information is \r
                       being requested.\r
@@ -106,7 +106,7 @@ 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\92s handle; \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
@@ -179,11 +179,11 @@ ShellCreateDirectory(
   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\92s current position and returns them in Buffer. \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\92s current position is increased by the number of bytes \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\92s current position and returns the entry in Buffer. If the Buffer \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
@@ -220,7 +220,7 @@ ShellReadFile(
   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 \93volume space full\94). \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
@@ -245,13 +245,13 @@ EFIAPI
 ShellWriteFile(\r
   IN EFI_FILE_HANDLE            FileHandle,\r
   IN OUT UINTN                  *BufferSize,\r
-  IN CONST VOID                 *Buffer\r
+  IN VOID                       *Buffer\r
   );\r
 \r
 /** \r
   Close an open file handle.\r
 \r
-  This function closes a specified file handle. All \93dirty\94 cached file data 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
@@ -411,7 +411,7 @@ ShellFindNextFile(
 /**\r
   Retrieve the size of a file.\r
 \r
-  This function extracts the file size info from the FileHandle\92s EFI_FILE_INFO \r
+  This function extracts the file size info from the FileHandle's EFI_FILE_INFO \r
   data.\r
 \r
   @param FileHandle             file handle from which size is retrieved\r
@@ -455,7 +455,7 @@ ShellGetExecutionBreakFlag(
 CONST CHAR16*\r
 EFIAPI\r
 ShellGetEnvironmentVariable (\r
-  IN CHAR16                     *EnvKey\r
+  IN CONST CHAR16                *EnvKey\r
   );\r
 \r
 /**\r
@@ -527,7 +527,7 @@ ShellExecute (
 /**\r
   Retreives the current directory path\r
 \r
-  If the DeviceName is NULL, it returns the current device\92s current directory \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
@@ -566,7 +566,7 @@ ShellSetPageBreakMode (
   and will process '?' and '*' as such.  the list must be freed with a call to \r
   ShellCloseFileMetaArg().\r
 \r
-  This function will fail if called sequentially without freeing the list in the middle.\r
+  If you are NOT appending to an existing list *ListHead must be NULL.\r
 \r
   @param Arg                    pointer to path string\r
   @param OpenMode               mode to open files with\r
@@ -749,4 +749,42 @@ EFIAPI
 ShellInitialize (\r
   );\r
 \r
+/**\r
+  Print at a specific location on the screen.\r
+\r
+  This function will move the cursor to a given screen location, print the specified string, \r
+  and return the cursor to the original locaiton.  \r
+  \r
+  If -1 is specified for either the Row or Col the current screen location for BOTH \r
+  will be used and the cursor's position will not be moved back to an original location.\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
+  the following additional flags:\r
+    %N       -   Set output attribute to normal\r
+    %H       -   Set output attribute to highlight\r
+    %E       -   Set output attribute to error\r
+    %B       -   Set output attribute to blue color\r
+    %V       -   Set output attribute to green color\r
+\r
+  Note: The background color is controlled by the shell command cls.\r
+\r
+  @param[in] Row        the row to print at\r
+  @param[in] Col        the column to print at\r
+  @param[in] Format     the format string\r
+\r
+  @return the number of characters printed to the screen\r
+**/\r
+\r
+UINTN\r
+EFIAPI\r
+ShellPrintEx(\r
+  IN INT32                Col OPTIONAL,\r
+  IN INT32                Row OPTIONAL,\r
+  IN CONST CHAR16         *Format,\r
+  ...\r
+  );\r
+\r
 #endif // __SHELL_LIB__
\ No newline at end of file