diff options
author | Shenglei Zhang <shenglei.zhang@intel.com> | 2019-01-30 16:34:57 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2019-01-31 20:19:20 +0800 |
commit | 3d086fed730e7958d1d9486749a72f0da1c08e91 (patch) | |
tree | a147c49ae943e9c73f8775abb08b4ef1009f46f7 /ShellPkg | |
parent | 3eaf5e8cf64c14d1371d6226d35d1afea5c98ca6 (diff) | |
download | edk2-3d086fed730e7958d1d9486749a72f0da1c08e91.tar.gz edk2-3d086fed730e7958d1d9486749a72f0da1c08e91.tar.bz2 edk2-3d086fed730e7958d1d9486749a72f0da1c08e91.zip |
ShellPkg/UefiShellLib: Use BaseLib api CharToUpper
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>
Diffstat (limited to 'ShellPkg')
-rw-r--r-- | ShellPkg/Library/UefiShellLib/UefiShellLib.c | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/ShellPkg/Library/UefiShellLib/UefiShellLib.c b/ShellPkg/Library/UefiShellLib/UefiShellLib.c index b17266d623..f3d6e42b20 100644 --- a/ShellPkg/Library/UefiShellLib/UefiShellLib.c +++ b/ShellPkg/Library/UefiShellLib/UefiShellLib.c @@ -3,7 +3,7 @@ (C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>
Copyright 2016-2018 Dell Technologies.<BR>
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -3741,33 +3741,6 @@ ShellFileExists( }
/**
- Convert a Unicode character to upper case only if
- it maps to a valid small-case ASCII character.
-
- This internal function only deal with Unicode character
- which maps to a valid small-case ASCII character, i.e.
- L'a' to L'z'. For other Unicode character, the input character
- is returned directly.
-
- @param Char The character to convert.
-
- @retval LowerCharacter If the Char is with range L'a' to L'z'.
- @retval Unchanged Otherwise.
-
-**/
-CHAR16
-InternalShellCharToUpper (
- IN CHAR16 Char
- )
-{
- if (Char >= L'a' && Char <= L'z') {
- return (CHAR16) (Char - (L'a' - L'A'));
- }
-
- return Char;
-}
-
-/**
Convert a Unicode character to numerical value.
This internal function only deal with Unicode character
@@ -3789,7 +3762,7 @@ InternalShellHexCharToUintn ( return Char - L'0';
}
- return (10 + InternalShellCharToUpper (Char) - L'A');
+ return (10 + CharToUpper (Char) - L'A');
}
/**
@@ -3849,7 +3822,7 @@ InternalShellStrHexToUint64 ( String++;
}
- if (InternalShellCharToUpper (*String) == L'X') {
+ if (CharToUpper (*String) == L'X') {
if (*(String - 1) != L'0') {
return 0;
}
|