FreeBSD/sys/contrib/dev/acpica/compiler/aslprepkg.c
/*******************************************************************************
 *
 * FUNCTION:    ApCheckPackageElements
 *
 * PARAMETERS:  PredefinedName      - Name of the predefined object
 *              Op                  - Parser op for the package
 *              Type1               - Object type for first group
 *              Count1              - Count for first group
 *              Type2               - Object type for second group
 *              Count2              - Count for second group
 *
 * RETURN:      Next Op peer in the parse tree, after all specified elements
 *              have been validated. Used for multiple validations (calls
 *              to this function).
 *
 * DESCRIPTION: Validate all elements of a package. Works with packages that
 *              are defined to contain up to two groups of different object
 *              types.
 *
 ******************************************************************************/


Next Op peer in the parse tree, after all specified elements
have been validated. Used for multiple validations (calls
to this function).

Validate all elements of a package. Works with packages that
are defined to contain up to two groups of different object
types.
Next Op peer in the parse tree after all specified elements have been validated . Used for multiple validations ( calls to this function ) . Validate all elements of a package . Works with packages that are defined to contain up to two groups of different object types .
static ACPI_PARSE_OBJECT *
ApCheckPackageElements (
    const char              *PredefinedName,
    ACPI_PARSE_OBJECT       *Op,
    UINT8                   Type1,
    UINT32                  Count1,
    UINT8                   Type2,
    UINT32                  Count2)
{
    UINT32                  i;
    for (i = 0; (i < Count1) && Op; i++)
    {
        ApCheckObjectType (PredefinedName, Op, Type1, i);
        Op = Op->Asl.Next;
    }
    for (i = 0; (i < Count2) && Op; i++)
    {
        ApCheckObjectType (PredefinedName, Op, Type2, (i + Count1));
        Op = Op->Asl.Next;
    }
    return (Op);
}
static ACPI_PARSE_OBJECT * ApCheckPackageElements ( const char * PredefinedName , ACPI_PARSE_OBJECT * Op , UINT8 Type1 , UINT32 Count1 , UINT8 Type2 , UINT32 Count2 ) { UINT32 i ; for ( i = 0 ; ( i < Count1 ) && Op ; i ++ ) { ApCheckObjectType ( PredefinedName , Op , Type1 , i ) ; Op = Op -> Asl . Next ; } for ( i = 0 ; ( i < Count2 ) && Op ; i ++ ) { ApCheckObjectType ( PredefinedName , Op , Type2 , ( i + Count1 ) ) ; Op = Op -> Asl . Next ; } return ( Op ) ; }
FUNCTION:    ApCheckPackageElements
 PARAMETERS:  PredefinedName      - Name of the predefined object
              Op                  - Parser op for the package
              Type1               - Object type for first group
              Count1              - Count for first group
              Type2               - Object type for second group
              Count2              - Count for second group
FUNCTION : ApCheckPackageElements PARAMETERS : PredefinedName - Name of the predefined object Op - Parser op for the package Type1 - Object type for first group Count1 - Count for first group Type2 - Object type for second group Count2 - Count for second group
/*
     * Up to two groups of package elements are supported by the data
     * structure. All elements in each group must be of the same type.
     * The second group can have a count of zero.
     *
     * Aborts check upon a NULL package element, as this means (at compile
     * time) that the remainder of the package elements are also NULL
     * (This is the only way to create NULL package elements.)
     */