From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id EF14181FE4 for ; Sun, 4 Dec 2016 21:27:53 -0800 (PST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP; 04 Dec 2016 21:27:53 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,303,1477983600"; d="scan'208";a="13634158" Received: from shwdeopenpsi114.ccr.corp.intel.com ([10.239.157.135]) by orsmga002.jf.intel.com with ESMTP; 04 Dec 2016 21:27:52 -0800 From: Dandan Bi To: edk2-devel@lists.01.org Cc: Jiewen Yao , Pete Batard Date: Mon, 5 Dec 2016 13:27:19 +0800 Message-Id: <1480915641-59136-4-git-send-email-dandan.bi@intel.com> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1480915641-59136-1-git-send-email-dandan.bi@intel.com> References: <1480915641-59136-1-git-send-email-dandan.bi@intel.com> Subject: [patch 3/5] MdeModulePkg/EbcDxe: Make the variable name follow rules X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Dec 2016 05:27:54 -0000 Cc: Jiewen Yao Cc: Pete Batard Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi --- .../Universal/EbcDxe/EbcDebugger/EdbSupport.h | 10 +- .../EbcDxe/EbcDebugger/EdbSupportString.c | 216 ++++++++++----------- 2 files changed, 113 insertions(+), 113 deletions(-) diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupport.h b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupport.h index ed1abe6..8908718 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupport.h +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupport.h @@ -26,35 +26,35 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EFI_DEBUG_MAX_PRINT_BUFFER (80 * 4) UINTN EFIAPI Xtoi ( - CHAR16 *str + CHAR16 *Str ); UINT64 EFIAPI LXtoi ( - CHAR16 *str + CHAR16 *Str ); UINTN EFIAPI Atoi ( - CHAR16 *str + CHAR16 *Str ); UINTN EFIAPI AsciiXtoi ( - CHAR8 *str + CHAR8 *Str ); UINTN EFIAPI AsciiAtoi ( - CHAR8 *str + CHAR8 *Str ); INTN EFIAPI StrCmpUnicodeAndAscii ( diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c index f564124..1a396a4 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcDebugger/EdbSupportString.c @@ -16,298 +16,298 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Convert hex string to uint. - @param str - The string + @param Str - The string **/ UINTN EFIAPI Xtoi ( - CHAR16 *str + CHAR16 *Str ) { - UINTN u; - CHAR16 c; - UINTN m; + UINTN RetVal; + CHAR16 TempChar; + UINTN MaxVal; - ASSERT (str != NULL); + ASSERT (Str != NULL); - m = (UINTN) -1 >> 4; + MaxVal = (UINTN) -1 >> 4; // // skip preceeding white space // - while (*str && *str == ' ') { - str += 1; + while (*Str && *Str == ' ') { + Str += 1; } // // skip preceeding zeros // - while (*str && *str == '0') { - str += 1; + while (*Str && *Str == '0') { + Str += 1; } // // skip preceeding white space // - if (*str && (*str == 'x' || *str == 'X')) { - str += 1; + if (*Str && (*Str == 'x' || *Str == 'X')) { + Str += 1; } // // convert hex digits // - u = 0; - c = *(str++); - while (c) { - if (c >= 'a' && c <= 'f') { - c -= 'a' - 'A'; + RetVal = 0; + TempChar = *(Str++); + while (TempChar) { + if (TempChar >= 'a' && TempChar <= 'f') { + TempChar -= 'a' - 'A'; } - if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) { - if (u > m) { + if ((TempChar >= '0' && TempChar <= '9') || (TempChar >= 'A' && TempChar <= 'F')) { + if (RetVal > MaxVal) { return (UINTN) -1; } - u = (u << 4) | (c - (c >= 'A' ? 'A' - 10 : '0')); + RetVal = (RetVal << 4) | (TempChar - (TempChar >= 'A' ? 'A' - 10 : '0')); } else { break; } - c = *(str++); + TempChar = *(Str++); } - return u; + return RetVal; } /** Convert hex string to uint. - @param str - The string + @param Str - The string **/ UINT64 EFIAPI LXtoi ( - CHAR16 *str + CHAR16 *Str ) { - UINT64 u; - CHAR16 c; - UINT64 m; + UINT64 RetVal; + CHAR16 TempChar; + UINT64 MaxVal; - ASSERT (str != NULL); + ASSERT (Str != NULL); - m = RShiftU64 ((UINT64) -1, 4); + MaxVal = RShiftU64 ((UINT64) -1, 4); // // skip preceeding white space // - while (*str && *str == ' ') { - str += 1; + while (*Str && *Str == ' ') { + Str += 1; } // // skip preceeding zeros // - while (*str && *str == '0') { - str += 1; + while (*Str && *Str == '0') { + Str += 1; } // // skip preceeding white space // - if (*str && (*str == 'x' || *str == 'X')) { - str += 1; + if (*Str && (*Str == 'x' || *Str == 'X')) { + Str += 1; } // // convert hex digits // - u = 0; - c = *(str++); - while (c) { - if (c >= 'a' && c <= 'f') { - c -= 'a' - 'A'; + RetVal = 0; + TempChar = *(Str++); + while (TempChar) { + if (TempChar >= 'a' && TempChar <= 'f') { + TempChar -= 'a' - 'A'; } - if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) { - if (u > m) { + if ((TempChar >= '0' && TempChar <= '9') || (TempChar >= 'A' && TempChar <= 'F')) { + if (RetVal > MaxVal) { return (UINT64) -1; } - u = LShiftU64 (u, 4); - u = u + (c - (c >= 'A' ? 'A' - 10 : '0')); + RetVal = LShiftU64 (RetVal, 4); + RetVal = RetVal + (TempChar - (TempChar >= 'A' ? 'A' - 10 : '0')); } else { break; } - c = *(str++); + TempChar = *(Str++); } - return u; + return RetVal; } /** Convert hex string to uint. - @param str - The string + @param Str - The string **/ UINTN EFIAPI Atoi ( - CHAR16 *str + CHAR16 *Str ) { - UINTN u; - CHAR16 c; - UINTN m; - UINTN n; + UINTN RetVal; + CHAR16 TempChar; + UINTN MaxVal; + UINTN ResteVal; - ASSERT (str != NULL); + ASSERT (Str != NULL); - m = (UINTN) -1 / 10; - n = (UINTN) -1 % 10; + MaxVal = (UINTN) -1 / 10; + ResteVal = (UINTN) -1 % 10; // // skip preceeding white space // - while (*str && *str == ' ') { - str += 1; + while (*Str && *Str == ' ') { + Str += 1; } // // convert digits // - u = 0; - c = *(str++); - while (c) { - if (c >= '0' && c <= '9') { - if (u > m || (u == m && c - '0' > (INTN) n)) { + RetVal = 0; + TempChar = *(Str++); + while (TempChar) { + if (TempChar >= '0' && TempChar <= '9') { + if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) { return (UINTN) -1; } - u = (u * 10) + c - '0'; + RetVal = (RetVal * 10) + TempChar - '0'; } else { break; } - c = *(str++); + TempChar = *(Str++); } - return u; + return RetVal; } /** Convert hex string to uint. - @param str - The string + @param Str - The string **/ UINTN EFIAPI AsciiXtoi ( - CHAR8 *str + CHAR8 *Str ) { - UINTN u; - CHAR8 c; - UINTN m; + UINTN RetVal; + CHAR8 TempChar; + UINTN MaxVal; - ASSERT (str != NULL); + ASSERT (Str != NULL); - m = (UINTN) -1 >> 4; + MaxVal = (UINTN) -1 >> 4; // // skip preceeding white space // - while (*str && *str == ' ') { - str += 1; + while (*Str && *Str == ' ') { + Str += 1; } // // skip preceeding zeros // - while (*str && *str == '0') { - str += 1; + while (*Str && *Str == '0') { + Str += 1; } // // skip preceeding white space // - if (*str && (*str == 'x' || *str == 'X')) { - str += 1; + if (*Str && (*Str == 'x' || *Str == 'X')) { + Str += 1; } // // convert hex digits // - u = 0; - c = *(str++); - while (c) { - if (c >= 'a' && c <= 'f') { - c -= 'a' - 'A'; + RetVal = 0; + TempChar = *(Str++); + while (TempChar) { + if (TempChar >= 'a' && TempChar <= 'f') { + TempChar -= 'a' - 'A'; } - if ((c >= '0' && c <= '9') || (c >= 'A' && c <= 'F')) { - if (u > m) { + if ((TempChar >= '0' && TempChar <= '9') || (TempChar >= 'A' && TempChar <= 'F')) { + if (RetVal > MaxVal) { return (UINTN) -1; } - u = (u << 4) | (c - (c >= 'A' ? 'A' - 10 : '0')); + RetVal = (RetVal << 4) | (TempChar - (TempChar >= 'A' ? 'A' - 10 : '0')); } else { break; } - c = *(str++); + TempChar = *(Str++); } - return u; + return RetVal; } /** Convert hex string to uint. - @param str - The string + @param Str - The string **/ UINTN EFIAPI AsciiAtoi ( - CHAR8 *str + CHAR8 *Str ) { - UINTN u; - CHAR8 c; - UINTN m; - UINTN n; + UINTN RetVal; + CHAR8 TempChar; + UINTN MaxVal; + UINTN ResteVal; - ASSERT (str != NULL); + ASSERT (Str != NULL); - m = (UINTN) -1 / 10; - n = (UINTN) -1 % 10; + MaxVal = (UINTN) -1 / 10; + ResteVal = (UINTN) -1 % 10; // // skip preceeding white space // - while (*str && *str == ' ') { - str += 1; + while (*Str && *Str == ' ') { + Str += 1; } // // convert digits // - u = 0; - c = *(str++); - while (c) { - if (c >= '0' && c <= '9') { - if (u > m || (u == m && c - '0' > (INTN) n)) { + RetVal = 0; + TempChar = *(Str++); + while (TempChar) { + if (TempChar >= '0' && TempChar <= '9') { + if (RetVal > MaxVal || (RetVal == MaxVal && TempChar - '0' > (INTN) ResteVal)) { return (UINTN) -1; } - u = (u * 10) + c - '0'; + RetVal = (RetVal * 10) + TempChar - '0'; } else { break; } - c = *(str++); + TempChar = *(Str++); } - return u; + return RetVal; } STATIC CHAR16 UnicodeToUpper ( -- 1.9.5.msysgit.1