]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ShellPkg/Library/UefiShellLib/UefiShellLib.h
add comments to function declarations and definitions and updated to match coding...
[mirror_edk2.git] / ShellPkg / Library / UefiShellLib / UefiShellLib.h
index 162064164872ed4d6f808ebd45e6256bb0f40fe3..32f1c6596d1d74307b8d7cb88f4148c6ddb4be86 100644 (file)
@@ -1,17 +1,44 @@
 /** @file\r
   Provides interface to shell functionality for shell commands and applications.\r
 \r
-Copyright (c) 2006 - 2009, Intel Corporation\r
-All rights reserved. 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
+  Copyright (c) 2006 - 2011, 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
 \r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
 \r
 **/\r
 \r
+#ifndef _UEFI_SHELL_LIB_INTERNAL_H_\r
+#define _UEFI_SHELL_LIB_INTERNAL_H_\r
+\r
+#include <Uefi.h>\r
+\r
+#include <Guid/FileInfo.h>\r
+\r
+#include <Protocol/SimpleFileSystem.h>\r
+#include <Protocol/LoadedImage.h>\r
+#include <Protocol/EfiShellInterface.h>\r
+#include <Protocol/EfiShellEnvironment2.h>\r
+#include <Protocol/EfiShell.h>\r
+#include <Protocol/EfiShellParameters.h>\r
+\r
+#include <Library/UefiBootServicesTableLib.h>\r
+#include <Library/BaseLib.h>\r
+#include <Library/BaseMemoryLib.h>\r
+#include <Library/DebugLib.h>\r
+#include <Library/MemoryAllocationLib.h>\r
+#include <Library/DevicePathLib.h>\r
+#include <Library/PcdLib.h>\r
+#include <Library/FileHandleLib.h>\r
+#include <Library/PrintLib.h>\r
+#include <Library/UefiLib.h>\r
+#include <Library/HiiLib.h>\r
+#include <Library/ShellLib.h>\r
+\r
 typedef struct  {\r
   EFI_SHELL_GET_FILE_INFO                   GetFileInfo;\r
   EFI_SHELL_SET_FILE_INFO                   SetFileInfo;\r
@@ -24,3 +51,26 @@ typedef struct  {
   EFI_SHELL_FLUSH_FILE                      FlushFile;\r
   EFI_SHELL_GET_FILE_SIZE                   GetFileSize;\r
 } FILE_HANDLE_FUNCTION_MAP;\r
+\r
+/**\r
+  Function to determin if an entire string is a valid number.\r
+\r
+  If Hex it must be preceeded with a 0x or has ForceHex, set TRUE.\r
+\r
+  @param[in] String       The string to evaluate.\r
+  @param[in] ForceHex     TRUE - always assume hex.\r
+  @param[in] StopAtSpace  TRUE to halt upon finding a space, FALSE to keep going.\r
+\r
+  @retval TRUE        It is all numeric (dec/hex) characters.\r
+  @retval FALSE       There is a non-numeric character.\r
+**/\r
+BOOLEAN\r
+EFIAPI\r
+InternalShellIsHexOrDecimalNumber (\r
+  IN CONST CHAR16   *String,\r
+  IN CONST BOOLEAN  ForceHex,\r
+  IN CONST BOOLEAN  StopAtSpace\r
+  );\r
+\r
+#endif\r
+\r