/****************************************************************************** * * FUNCTION: acpi_ut_stricmp (stricmp) * * PARAMETERS: string1 - first string to compare * string2 - second string to compare * * RETURN: int that signifies string relationship. Zero means strings * are equal. * * DESCRIPTION: Case-insensitive string compare. Implementation of the * non-ANSI stricmp function. *
******************************************************************************/
int acpi_ut_stricmp(char *string1, char *string2)
{ int c1; int c2;
do {
c1 = tolower((int)*string1);
c2 = tolower((int)*string2);
string1++;
string2++;
} while ((c1 == c2) && (c1));
return (c1 - c2);
}
#ifdefined (ACPI_DEBUGGER) || defined (ACPI_APPLICATION) || defined (ACPI_DEBUG_OUTPUT) /******************************************************************************* * * FUNCTION: acpi_ut_safe_strcpy, acpi_ut_safe_strcat, acpi_ut_safe_strncat * * PARAMETERS: Adds a "DestSize" parameter to each of the standard string * functions. This is the size of the Destination buffer. * * RETURN: TRUE if the operation would overflow the destination buffer. * * DESCRIPTION: Safe versions of standard Clib string functions. Ensure that * the result of the operation will not overflow the output string * buffer. * * NOTE: These functions are typically only helpful for processing * user input and command lines. For most ACPICA code, the * required buffer length is precisely calculated before buffer * allocation, so the use of these functions is unnecessary. *
******************************************************************************/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.