ShellPkg/Shell: Use BaseLib api CharToUpper

Substitute InternalShellCharToUpper with a public function
CharToUpper which has the same function.
Remove the implement of InternalShellCharToUpper.

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>
This commit is contained in:
Shenglei Zhang
2019-01-30 16:34:50 +08:00
committed by Liming Gao
parent 62cdd1f5ab
commit 3eaf5e8cf6

View File

@ -1,7 +1,7 @@
/** @file /** @file
Provides interface to shell MAN file parser. Provides interface to shell MAN file parser.
Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.<BR> Copyright (c) 2009 - 2019, Intel Corporation. All rights reserved.<BR>
Copyright 2015 Dell Inc. Copyright 2015 Dell Inc.
This program and the accompanying materials This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License are licensed and made available under the terms and conditions of the BSD License
@ -46,27 +46,6 @@ SHELL_MAN_HII_VENDOR_DEVICE_PATH mShellManHiiDevicePath = {
} }
}; };
/**
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
);
/** /**
Verifies that the filename has .EFI on the end. Verifies that the filename has .EFI on the end.
@ -416,7 +395,7 @@ IsTitleHeader(
ReturnFound = TRUE; // This is the desired command's title header line. ReturnFound = TRUE; // This is the desired command's title header line.
State = (BriefDesc == NULL) ? Final : GetBriefDescription; State = (BriefDesc == NULL) ? Final : GetBriefDescription;
} }
else if (InternalShellCharToUpper (*Line) != InternalShellCharToUpper (*(Command + CommandIndex++))) { else if (CharToUpper (*Line) != CharToUpper (*(Command + CommandIndex++))) {
State = Final; State = Final;
} }
Line++; Line++;