[edk2] [PATCH v4 4/7] MdeModulePkg/EbcDebugger: Use AsciiToUpper and CharToUpper

Wu, Hao A hao.a.wu at intel.com
Tue Dec 25 00:43:40 PST 2018


Reviewed-by: Hao Wu <hao.a.wu at intel.com>

Best Regards,
Hao Wu


> -----Original Message-----
> From: Zhang, Shenglei
> Sent: Tuesday, December 25, 2018 4:17 PM
> To: edk2-devel at lists.01.org
> Cc: Wang, Jian J; Wu, Hao A; Ni, Ruiyu; Zeng, Star
> Subject: [PATCH v4 4/7] MdeModulePkg/EbcDebugger: Use AsciiToUpper
> and CharToUpper
> 
> InternalUnicodeToUpper and InternalAsciiToUpper are internal functions,
> so they are substituted by public functions AsciiToUpper and CharToUpper.
> And their implements are removed.
> https://bugzilla.tianocore.org/show_bug.cgi?id=1369
> 
> Cc: Jian J Wang <jian.j.wang at intel.com>
> Cc: Hao Wu <hao.a.wu at intel.com>
> Cc: Ruiyu Ni <ruiyu.ni at intel.com>
> Cc: Star Zeng <star.zeng at intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Shenglei Zhang <shenglei.zhang at intel.com>
> ---
>  .../EbcDxe/EbcDebugger/EdbSupportString.c     | 39 ++-----------------
>  1 file changed, 4 insertions(+), 35 deletions(-)
> 
> diff --git
> a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> index 02e1876ffa..c8d9fdcb2a 100644
> --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c
> @@ -307,37 +307,6 @@ AsciiAtoi (
>    return RetVal;
>  }
> 
> -/**
> -
> -  Convert the character to upper case.
> -
> -  @param  Chr    the character to be converted.
> -
> -**/
> -STATIC
> -CHAR16
> -InternalUnicodeToUpper (
> -  IN      CHAR16                    Chr
> -  )
> -{
> -  return (Chr >= L'a' && Chr <= L'z') ? Chr - (L'a' - L'A') : Chr;
> -}
> -
> -/**
> -
> -  Convert the character to upper case.
> -
> -  @param  Chr    the character to be converted.
> -
> -**/
> -STATIC
> -CHAR8
> -InternalAsciiToUpper (
> -  IN      CHAR8                     Chr
> -  )
> -{
> -  return (Chr >= 'a' && Chr <= 'z') ? Chr - ('a' - 'A') : Chr;
> -}
> 
>  /**
>    Compare the Unicode and Ascii string pointed by String to the string
> pointed by String2.
> @@ -390,12 +359,12 @@ StriCmp (
>    )
>  {
>    while ((*String != L'\0') &&
> -         (InternalUnicodeToUpper (*String) == InternalUnicodeToUpper
> (*String2))) {
> +         (CharToUpper (*String) == CharToUpper (*String2))) {
>      String++;
>      String2++;
>    }
> 
> -  return InternalUnicodeToUpper (*String) - InternalUnicodeToUpper
> (*String2);
> +  return CharToUpper (*String) - CharToUpper (*String2);
>  }
> 
>  /**
> @@ -418,12 +387,12 @@ StriCmpUnicodeAndAscii (
>    )
>  {
>    while ((*String != L'\0') &&
> -         (InternalUnicodeToUpper (*String) == (CHAR16)InternalAsciiToUpper
> (*String2))) {
> +         (CharToUpper (*String) == (CHAR16)AsciiToUpper (*String2))) {
>      String++;
>      String2++;
>    }
> 
> -  return InternalUnicodeToUpper (*String) - (CHAR16)InternalAsciiToUpper
> (*String2);
> +  return CharToUpper (*String) - (CHAR16)AsciiToUpper (*String2);
>  }
> 
>  /**
> --
> 2.18.0.windows.1



More information about the edk2-devel mailing list