MdeModulePkg/EbcDxe: Make the comments align with EDKII coding style
Cc: Jiewen Yao <jiewen.yao@intel.com> Cc: Pete Batard <pete@akeo.ie> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Jiewen.yao@intel.com
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
/*++
|
||||
/** @file
|
||||
|
||||
Copyright (c) 2007 - 2016, Intel Corporation
|
||||
All rights reserved. This program and the accompanying materials
|
||||
Copyright (c) 2007 - 2016, 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
|
||||
http://opensource.org/licenses/bsd-license.php
|
||||
@ -9,35 +9,23 @@ http://opensource.org/licenses/bsd-license.php
|
||||
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
||||
|
||||
Module Name:
|
||||
|
||||
EdbSupportString.c
|
||||
|
||||
Abstract:
|
||||
|
||||
|
||||
--*/
|
||||
**/
|
||||
|
||||
#include "Edb.h"
|
||||
|
||||
/**
|
||||
|
||||
Convert hex string to uint.
|
||||
|
||||
@param str - The string
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
Xtoi (
|
||||
CHAR16 *str
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Convert hex string to uint
|
||||
|
||||
Arguments:
|
||||
|
||||
Str - The string
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN u;
|
||||
CHAR16 c;
|
||||
@ -90,24 +78,19 @@ Returns:
|
||||
return u;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Convert hex string to uint.
|
||||
|
||||
@param str - The string
|
||||
|
||||
**/
|
||||
|
||||
UINT64
|
||||
EFIAPI
|
||||
LXtoi (
|
||||
CHAR16 *str
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Convert hex string to uint
|
||||
|
||||
Arguments:
|
||||
|
||||
Str - The string
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
UINT64 u;
|
||||
CHAR16 c;
|
||||
@ -161,24 +144,18 @@ Returns:
|
||||
return u;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Convert hex string to uint.
|
||||
|
||||
@param str - The string
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
Atoi (
|
||||
CHAR16 *str
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Convert hex string to uint
|
||||
|
||||
Arguments:
|
||||
|
||||
Str - The string
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN u;
|
||||
CHAR16 c;
|
||||
@ -217,24 +194,18 @@ Returns:
|
||||
return u;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Convert hex string to uint.
|
||||
|
||||
@param str - The string
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiXtoi (
|
||||
CHAR8 *str
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Convert hex string to uint
|
||||
|
||||
Arguments:
|
||||
|
||||
Str - The string
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN u;
|
||||
CHAR8 c;
|
||||
@ -287,24 +258,18 @@ Returns:
|
||||
return u;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Convert hex string to uint.
|
||||
|
||||
@param str - The string
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiAtoi (
|
||||
CHAR8 *str
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Convert hex string to uint
|
||||
|
||||
Arguments:
|
||||
|
||||
Str - The string
|
||||
|
||||
Returns:
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN u;
|
||||
CHAR8 c;
|
||||
@ -361,28 +326,24 @@ AsciiToUpper (
|
||||
return (Chr >= 'a' && Chr <= 'z') ? Chr - ('a' - 'A') : Chr;
|
||||
}
|
||||
|
||||
/**
|
||||
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
|
||||
|
||||
@param String - Unicode String to process
|
||||
|
||||
@param String2 - Ascii string to process
|
||||
|
||||
@return Return a positive integer if String is lexicall greater than String2; Zero if
|
||||
the two strings are identical; and a negative interger if String is lexically
|
||||
less than String2.
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
StrCmpUnicodeAndAscii (
|
||||
IN CHAR16 *String,
|
||||
IN CHAR8 *String2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
|
||||
|
||||
Arguments:
|
||||
String - Unicode String to process
|
||||
|
||||
String2 - Ascii string to process
|
||||
|
||||
Returns:
|
||||
Return a positive integer if String is lexicall greater than String2; Zero if
|
||||
the two strings are identical; and a negative interger if String is lexically
|
||||
less than String2.
|
||||
|
||||
--*/
|
||||
{
|
||||
while (*String) {
|
||||
if (*String != (CHAR16)*String2) {
|
||||
@ -396,27 +357,24 @@ Returns:
|
||||
return (*String - (CHAR16)*String2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Compare the Unicode string pointed by String to the string pointed by String2.
|
||||
|
||||
@param String - Unicode String to process
|
||||
@param String2 - Unicode string to process
|
||||
|
||||
@return Return a positive integer if String is lexically greater than String2; Zero if
|
||||
the two strings are identical; and a negative integer if String is lexically
|
||||
less than String2.
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
StriCmp (
|
||||
IN CHAR16 *String,
|
||||
IN CHAR16 *String2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Compare the Unicode string pointed by String to the string pointed by String2.
|
||||
|
||||
Arguments:
|
||||
String - Unicode String to process
|
||||
String2 - Unicode string to process
|
||||
|
||||
Returns:
|
||||
Return a positive integer if String is lexically greater than String2; Zero if
|
||||
the two strings are identical; and a negative integer if String is lexically
|
||||
less than String2.
|
||||
|
||||
--*/
|
||||
{
|
||||
while ((*String != L'\0') &&
|
||||
(UnicodeToUpper (*String) == UnicodeToUpper (*String2))) {
|
||||
@ -427,28 +385,24 @@ Returns:
|
||||
return UnicodeToUpper (*String) - UnicodeToUpper (*String2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
|
||||
|
||||
@param String - Unicode String to process
|
||||
@param String2 - Ascii string to process
|
||||
|
||||
@return Return a positive integer if String is lexically greater than String2; Zero if
|
||||
the two strings are identical; and a negative integer if String is lexically
|
||||
less than String2.
|
||||
|
||||
**/
|
||||
INTN
|
||||
EFIAPI
|
||||
StriCmpUnicodeAndAscii (
|
||||
IN CHAR16 *String,
|
||||
IN CHAR8 *String2
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
Compare the Unicode and Ascii string pointed by String to the string pointed by String2.
|
||||
|
||||
Arguments:
|
||||
String - Unicode String to process
|
||||
|
||||
String2 - Ascii string to process
|
||||
|
||||
Returns:
|
||||
Return a positive integer if String is lexically greater than String2; Zero if
|
||||
the two strings are identical; and a negative integer if String is lexically
|
||||
less than String2.
|
||||
|
||||
--*/
|
||||
{
|
||||
while ((*String != L'\0') &&
|
||||
(UnicodeToUpper (*String) == (CHAR16)AsciiToUpper (*String2))) {
|
||||
@ -459,19 +413,20 @@ Returns:
|
||||
return UnicodeToUpper (*String) - (CHAR16)AsciiToUpper (*String2);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Verify if the string is end with the sub string.
|
||||
|
||||
@param Str - The string where to search the sub string
|
||||
@param SubStr - The substring.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
EFIAPI
|
||||
StrEndWith (
|
||||
IN CHAR16 *Str,
|
||||
IN CHAR16 *SubStr
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Verify if the string is end with the sub string.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR16 *Temp;
|
||||
|
||||
@ -491,12 +446,17 @@ Routine Description:
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Duplicate a string.
|
||||
|
||||
@param Src The string to be duplicated.
|
||||
|
||||
**/
|
||||
CHAR16 *
|
||||
EFIAPI
|
||||
StrDuplicate (
|
||||
IN CHAR16 *Src
|
||||
)
|
||||
// duplicate a string
|
||||
{
|
||||
CHAR16 *Dest;
|
||||
UINTN Size;
|
||||
@ -513,19 +473,20 @@ StrDuplicate (
|
||||
CHAR16 *mLineBuffer = NULL;
|
||||
CHAR16 *mFieldBuffer = NULL;
|
||||
|
||||
/**
|
||||
|
||||
Find the first substring.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
StrSpn (
|
||||
IN CHAR16 *String,
|
||||
IN CHAR16 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Find the first substring.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN Count;
|
||||
CHAR16 *Str1;
|
||||
@ -550,6 +511,15 @@ Routine Description:
|
||||
return Count;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Searches a string for the first occurrence of a character contained in a
|
||||
specified buffer.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
|
||||
CHAR16 *
|
||||
EFIAPI
|
||||
@ -557,14 +527,6 @@ StrBrk (
|
||||
IN CHAR16 *String,
|
||||
IN CHAR16 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Searches a string for the first occurrence of a character contained in a
|
||||
specified buffer.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR16 *Str1;
|
||||
CHAR16 *Str2;
|
||||
@ -580,19 +542,20 @@ Routine Description:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Find the next token after one or more specified characters.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
CHAR16 *
|
||||
EFIAPI
|
||||
StrTokenLine (
|
||||
IN CHAR16 *String OPTIONAL,
|
||||
IN CHAR16 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Find the next token after one or more specified characters.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR16 *Begin;
|
||||
CHAR16 *End;
|
||||
@ -618,6 +581,14 @@ Routine Description:
|
||||
return Begin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Find the next token after one specificed characters.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
|
||||
CHAR16 *
|
||||
EFIAPI
|
||||
@ -625,13 +596,6 @@ StrTokenField (
|
||||
IN CHAR16 *String OPTIONAL,
|
||||
IN CHAR16 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Find the next token after one specificed characters.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR16 *Begin;
|
||||
CHAR16 *End;
|
||||
@ -753,19 +717,20 @@ PatchForStrTokenBefore (
|
||||
CHAR8 *mAsciiLineBuffer = NULL;
|
||||
CHAR8 *mAsciiFieldBuffer = NULL;
|
||||
|
||||
/**
|
||||
|
||||
Find the first substring.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
UINTN
|
||||
EFIAPI
|
||||
AsciiStrSpn (
|
||||
IN CHAR8 *String,
|
||||
IN CHAR8 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Find the first substring.
|
||||
|
||||
--*/
|
||||
{
|
||||
UINTN Count;
|
||||
CHAR8 *Str1;
|
||||
@ -790,21 +755,20 @@ Routine Description:
|
||||
return Count;
|
||||
}
|
||||
|
||||
/**
|
||||
Searches a string for the first occurrence of a character contained in a
|
||||
specified buffer.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
CHAR8 *
|
||||
EFIAPI
|
||||
AsciiStrBrk (
|
||||
IN CHAR8 *String,
|
||||
IN CHAR8 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Searches a string for the first occurrence of a character contained in a
|
||||
specified buffer.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR8 *Str1;
|
||||
CHAR8 *Str2;
|
||||
@ -820,19 +784,20 @@ Routine Description:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Find the next token after one or more specified characters.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
CHAR8 *
|
||||
EFIAPI
|
||||
AsciiStrTokenLine (
|
||||
IN CHAR8 *String OPTIONAL,
|
||||
IN CHAR8 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Find the next token after one or more specified characters.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR8 *Begin;
|
||||
CHAR8 *End;
|
||||
@ -858,6 +823,14 @@ Routine Description:
|
||||
return Begin;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Find the next token after one specificed characters.
|
||||
|
||||
@param String Point to the string where to find the substring.
|
||||
@param CharSet Point to the string to be found.
|
||||
|
||||
**/
|
||||
|
||||
CHAR8 *
|
||||
EFIAPI
|
||||
@ -865,13 +838,6 @@ AsciiStrTokenField (
|
||||
IN CHAR8 *String OPTIONAL,
|
||||
IN CHAR8 *CharSet
|
||||
)
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
Find the next token after one specificed characters.
|
||||
|
||||
--*/
|
||||
{
|
||||
CHAR8 *Begin;
|
||||
CHAR8 *End;
|
||||
|
Reference in New Issue
Block a user