FreeBSD/sys/contrib/dev/acpica/compiler/aslpld.c
/*******************************************************************************
 *
 * FUNCTION:    OpcFindName
 *
 * PARAMETERS:  List                - Array of char strings to be searched
 *              Name                - Char string to string for
 *              Index               - Index value to set if found
 *
 * RETURN:      TRUE if any names matched, FALSE otherwise
 *
 * DESCRIPTION: Match PLD name to value in lookup table. Sets Value to
 *              equivalent parameter value.
 *
 ******************************************************************************/
OpcFindName
PARAMETERS:  List                - Array of char strings to be searched
Name                - Char string to string for
Index               - Index value to set if found

TRUE if any names matched, FALSE otherwise

Match PLD name to value in lookup table. Sets Value to
equivalent parameter value.
OpcFindName PARAMETERS : List - Array of char strings to be searched Name - Char string to string for Index - Index value to set if found TRUE if any names matched FALSE otherwise Match PLD name to value in lookup table . Sets Value to equivalent parameter value .
static BOOLEAN
OpcFindName (
    const char              **List,
    char                    *Name,
    UINT32                  *Index)
{
    const char              *NameString;
    UINT32                  i;
    AcpiUtStrupr (Name);
    for (i = 0, NameString = List[0];
            NameString;
            i++, NameString = List[i])
    {
        if (!(strncmp (NameString, Name, strlen (Name))))
        {
            *Index = i;
            return (TRUE);
        }
    }
    return (FALSE);
}
static BOOLEAN OpcFindName ( const char * * List , char * Name , UINT32 * Index ) { const char * NameString ; UINT32 i ; AcpiUtStrupr ( Name ) ; for ( i = 0 , NameString = List [ 0 ] ; NameString ; i ++ , NameString = List [ i ] ) { if ( ! ( strncmp ( NameString , Name , strlen ( Name ) ) ) ) { * Index = i ; return ( TRUE ) ; } } return ( FALSE ) ; }
FUNCTION:    OpcFindName
 PARAMETERS:  List                - Array of char strings to be searched
              Name                - Char string to string for
              Index               - Index value to set if found
FUNCTION : OpcFindName PARAMETERS : List - Array of char strings to be searched Name - Char string to string for Index - Index value to set if found