BaseTools: Source/C/Common: Fix doc block locations and convert to Doxygen
Move the documentation blocks from between the parameter list and function body to above the function. Convert all the documentation blocks to Doxygen format. Signed-off-by: Rebecca Cran <rebecca@bsdio.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
cf6a0a52b0
commit
b4e2cf092a
@ -20,6 +20,22 @@ extern "C" {
|
||||
//
|
||||
// Functions declarations
|
||||
//
|
||||
|
||||
/**
|
||||
This function reads a line, stripping any comments.
|
||||
The function reads a string from the input stream argument and stores it in
|
||||
the input string. ReadLine reads characters from the current file position
|
||||
to and including the first newline character, to the end of the stream, or
|
||||
until the number of characters read is equal to MaxLength - 1, whichever
|
||||
comes first. The newline character, if read, is replaced with a \0.
|
||||
|
||||
@param InputFile Memory file image.
|
||||
@param InputBuffer Buffer to read into, must be MaxLength size.
|
||||
@param MaxLength The maximum size of the input buffer.
|
||||
|
||||
@retval NULL if error or EOF
|
||||
@retval InputBuffer otherwise
|
||||
**/
|
||||
CHAR8 *
|
||||
ReadLine (
|
||||
IN MEMORY_FILE *InputFile,
|
||||
@ -28,29 +44,16 @@ ReadLine (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
/**
|
||||
This function parses a file from the beginning to find a section.
|
||||
The section string may be anywhere within a line.
|
||||
|
||||
Routine Description:
|
||||
@param InputFile Memory file image.
|
||||
@param Section Section to search for
|
||||
|
||||
This function reads a line, stripping any comments.
|
||||
The function reads a string from the input stream argument and stores it in
|
||||
the input string. ReadLine reads characters from the current file position
|
||||
to and including the first newline character, to the end of the stream, or
|
||||
until the number of characters read is equal to MaxLength - 1, whichever
|
||||
comes first. The newline character, if read, is replaced with a \0.
|
||||
|
||||
Arguments:
|
||||
|
||||
InputFile Memory file image.
|
||||
InputBuffer Buffer to read into, must be MaxLength size.
|
||||
MaxLength The maximum size of the input buffer.
|
||||
|
||||
Returns:
|
||||
|
||||
NULL if error or EOF
|
||||
InputBuffer otherwise
|
||||
|
||||
--*/
|
||||
@retval FALSE if error or EOF
|
||||
@retval TRUE if section found
|
||||
**/
|
||||
BOOLEAN
|
||||
FindSection (
|
||||
IN MEMORY_FILE *InputFile,
|
||||
@ -58,24 +61,21 @@ FindSection (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
/**
|
||||
Finds a token value given the section and token to search for.
|
||||
|
||||
Routine Description:
|
||||
@param InputFile Memory file image.
|
||||
@param Section The section to search for, a string within [].
|
||||
@param Token The token to search for, e.g. EFI_PEIM_RECOVERY, followed by an = in the INF file.
|
||||
@param Instance The instance of the token to search for. Zero is the first instance.
|
||||
@param Value The string that holds the value following the =. Must be MAX_LONG_FILE_PATH in size.
|
||||
|
||||
This function parses a file from the beginning to find a section.
|
||||
The section string may be anywhere within a line.
|
||||
|
||||
Arguments:
|
||||
|
||||
InputFile Memory file image.
|
||||
Section Section to search for
|
||||
|
||||
Returns:
|
||||
|
||||
FALSE if error or EOF
|
||||
TRUE if section found
|
||||
|
||||
--*/
|
||||
@retval EFI_SUCCESS Value found.
|
||||
@retval EFI_ABORTED Format error detected in INF file.
|
||||
@retval EFI_INVALID_PARAMETER Input argument was null.
|
||||
@retval EFI_LOAD_ERROR Error reading from the file.
|
||||
@retval EFI_NOT_FOUND Section/Token/Value not found.
|
||||
**/
|
||||
EFI_STATUS
|
||||
FindToken (
|
||||
IN MEMORY_FILE *InputFile,
|
||||
@ -86,29 +86,16 @@ FindToken (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
/**
|
||||
Converts a string to an EFI_GUID. The string must be in the
|
||||
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.
|
||||
|
||||
Routine Description:
|
||||
@param GuidBuffer pointer to destination Guid
|
||||
@param AsciiGuidBuffer pointer to ascii string
|
||||
|
||||
Finds a token value given the section and token to search for.
|
||||
|
||||
Arguments:
|
||||
|
||||
InputFile Memory file image.
|
||||
Section The section to search for, a string within [].
|
||||
Token The token to search for, e.g. EFI_PEIM_RECOVERY, followed by an = in the INF file.
|
||||
Instance The instance of the token to search for. Zero is the first instance.
|
||||
Value The string that holds the value following the =. Must be MAX_LONG_FILE_PATH in size.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS Value found.
|
||||
EFI_ABORTED Format error detected in INF file.
|
||||
EFI_INVALID_PARAMETER Input argument was null.
|
||||
EFI_LOAD_ERROR Error reading from the file.
|
||||
EFI_NOT_FOUND Section/Token/Value not found.
|
||||
|
||||
--*/
|
||||
@retval EFI_ABORTED Could not convert the string
|
||||
@retval EFI_SUCCESS The string was successfully converted
|
||||
**/
|
||||
EFI_STATUS
|
||||
StringToGuid (
|
||||
IN CHAR8 *AsciiGuidBuffer,
|
||||
@ -116,24 +103,19 @@ StringToGuid (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
/**
|
||||
Converts a null terminated ascii string that represents a number into a
|
||||
UINT64 value. A hex number may be preceded by a 0x, but may not be
|
||||
succeeded by an h. A number without 0x or 0X is considered to be base 10
|
||||
unless the IsHex input is true.
|
||||
|
||||
Routine Description:
|
||||
@param AsciiString The string to convert.
|
||||
@param IsHex Force the string to be treated as a hex number.
|
||||
@param ReturnValue The return value.
|
||||
|
||||
Converts a string to an EFI_GUID. The string must be in the
|
||||
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx format.
|
||||
|
||||
Arguments:
|
||||
|
||||
GuidBuffer - pointer to destination Guid
|
||||
AsciiGuidBuffer - pointer to ascii string
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_ABORTED Could not convert the string
|
||||
EFI_SUCCESS The string was successfully converted
|
||||
|
||||
--*/
|
||||
@retval EFI_SUCCESS Number successfully converted.
|
||||
@retval EFI_ABORTED Invalid character encountered.
|
||||
**/
|
||||
EFI_STATUS
|
||||
AsciiStringToUint64 (
|
||||
IN CONST CHAR8 *AsciiString,
|
||||
@ -142,27 +124,15 @@ AsciiStringToUint64 (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
/**
|
||||
This function reads a line, stripping any comments.
|
||||
|
||||
Routine Description:
|
||||
@param InputFile Stream pointer.
|
||||
@param InputBuffer Buffer to read into, must be MAX_LONG_FILE_PATH size.
|
||||
|
||||
Converts a null terminated ascii string that represents a number into a
|
||||
UINT64 value. A hex number may be preceded by a 0x, but may not be
|
||||
succeeded by an h. A number without 0x or 0X is considered to be base 10
|
||||
unless the IsHex input is true.
|
||||
|
||||
Arguments:
|
||||
|
||||
AsciiString The string to convert.
|
||||
IsHex Force the string to be treated as a hex number.
|
||||
ReturnValue The return value.
|
||||
|
||||
Returns:
|
||||
|
||||
EFI_SUCCESS Number successfully converted.
|
||||
EFI_ABORTED Invalid character encountered.
|
||||
|
||||
--*/
|
||||
@retval NULL if error or EOF
|
||||
@retval InputBuffer otherwise
|
||||
**/
|
||||
CHAR8 *
|
||||
ReadLineInStream (
|
||||
IN FILE *InputFile,
|
||||
@ -170,23 +140,16 @@ ReadLineInStream (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
/**
|
||||
This function parses a stream file from the beginning to find a section.
|
||||
The section string may be anywhere within a line.
|
||||
|
||||
Routine Description:
|
||||
@param InputFile Stream pointer.
|
||||
@param Section Section to search for
|
||||
|
||||
This function reads a line, stripping any comments.
|
||||
|
||||
Arguments:
|
||||
|
||||
InputFile Stream pointer.
|
||||
InputBuffer Buffer to read into, must be MAX_LONG_FILE_PATH size.
|
||||
|
||||
Returns:
|
||||
|
||||
NULL if error or EOF
|
||||
InputBuffer otherwise
|
||||
|
||||
--*/
|
||||
@retval FALSE if error or EOF
|
||||
@retval TRUE if section found
|
||||
**/
|
||||
BOOLEAN
|
||||
FindSectionInStream (
|
||||
IN FILE *InputFile,
|
||||
@ -194,25 +157,6 @@ FindSectionInStream (
|
||||
)
|
||||
;
|
||||
|
||||
/*++
|
||||
|
||||
Routine Description:
|
||||
|
||||
This function parses a stream file from the beginning to find a section.
|
||||
The section string may be anywhere within a line.
|
||||
|
||||
Arguments:
|
||||
|
||||
InputFile Stream pointer.
|
||||
Section Section to search for
|
||||
|
||||
Returns:
|
||||
|
||||
FALSE if error or EOF
|
||||
TRUE if section found
|
||||
|
||||
--*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user