From 3d086fed730e7958d1d9486749a72f0da1c08e91 Mon Sep 17 00:00:00 2001 From: Shenglei Zhang Date: Wed, 30 Jan 2019 16:34:57 +0800 Subject: [PATCH] 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 Cc: Jaben Carsey Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Shenglei Zhang Reviewed-by: Jaben Carsey Reviewed-by: Liming Gao Reviewed-by: Ray Ni Reviewed-by: Jaben Carsey --- ShellPkg/Library/UefiShellLib/UefiShellLib.c | 33 ++------------------ 1 file 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
Copyright 2016-2018 Dell Technologies.
- Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2019, Intel Corporation. All rights reserved.
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 @@ -3740,33 +3740,6 @@ ShellFileExists( return (EFI_SUCCESS); } -/** - 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. @@ -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; } -- 2.39.2