]> git.proxmox.com Git - mirror_edk2.git/commitdiff
ShellPkg/UefiShellLib: Use BaseLib api CharToUpper
authorShenglei Zhang <shenglei.zhang@intel.com>
Wed, 30 Jan 2019 08:34:57 +0000 (16:34 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 31 Jan 2019 12:19:20 +0000 (20:19 +0800)
Substitute InternalShellCharToUpper with CharToUpper which is a public
function with the same effect.
Remove the implement of InternalShellCharToUpper.
https://bugzilla.tianocore.org/show_bug.cgi?id=1369

Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Shenglei Zhang <shenglei.zhang@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
ShellPkg/Library/UefiShellLib/UefiShellLib.c

index b17266d623fe08b2c3c19fe97adaa2eb6c8070a3..f3d6e42b2082f83c8d8eec1f0a3951410a74f0a2 100644 (file)
@@ -3,7 +3,7 @@
 \r
   (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
   Copyright 2016-2018 Dell Technologies.<BR>\r
-  Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2006 - 2019, 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
@@ -3740,33 +3740,6 @@ ShellFileExists(
   return (EFI_SUCCESS);\r
 }\r
 \r
-/**\r
-  Convert a Unicode character to upper case only if\r
-  it maps to a valid small-case ASCII character.\r
-\r
-  This internal function only deal with Unicode character\r
-  which maps to a valid small-case ASCII character, i.e.\r
-  L'a' to L'z'. For other Unicode character, the input character\r
-  is returned directly.\r
-\r
-  @param  Char  The character to convert.\r
-\r
-  @retval LowerCharacter   If the Char is with range L'a' to L'z'.\r
-  @retval Unchanged        Otherwise.\r
-\r
-**/\r
-CHAR16\r
-InternalShellCharToUpper (\r
-  IN      CHAR16                    Char\r
-  )\r
-{\r
-  if (Char >= L'a' && Char <= L'z') {\r
-    return (CHAR16) (Char - (L'a' - L'A'));\r
-  }\r
-\r
-  return Char;\r
-}\r
-\r
 /**\r
   Convert a Unicode character to numerical value.\r
 \r
@@ -3789,7 +3762,7 @@ InternalShellHexCharToUintn (
     return Char - L'0';\r
   }\r
 \r
-  return (10 + InternalShellCharToUpper (Char) - L'A');\r
+  return (10 + CharToUpper (Char) - L'A');\r
 }\r
 \r
 /**\r
@@ -3849,7 +3822,7 @@ InternalShellStrHexToUint64 (
     String++;\r
   }\r
 \r
-  if (InternalShellCharToUpper (*String) == L'X') {\r
+  if (CharToUpper (*String) == L'X') {\r
     if (*(String - 1) != L'0') {\r
       return 0;\r
     }\r