2004-06-03 03:38:44 +00:00
|
|
|
/*
|
|
|
|
* Miscellaneous functions necessary for several other modules.
|
|
|
|
*/
|
2016-03-14 09:57:07 +00:00
|
|
|
#ifndef ASN1FIX_MISC_H
|
|
|
|
#define ASN1FIX_MISC_H
|
2004-06-03 03:38:44 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Recursively invoke a given function over the given expr and all its
|
|
|
|
* children.
|
|
|
|
*/
|
|
|
|
int asn1f_recurse_expr(arg_t *arg, int (*f)(arg_t *arg));
|
|
|
|
|
|
|
|
/*
|
2006-08-28 02:45:44 +00:00
|
|
|
* Check that every child of a given expr has unique identifier.
|
2004-06-03 03:38:44 +00:00
|
|
|
*/
|
2006-08-28 02:45:44 +00:00
|
|
|
int asn1f_check_unique_expr(arg_t *arg);
|
2004-06-03 03:38:44 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Check that every preceeding child of the given expr is not
|
|
|
|
* having the name of the given one.
|
|
|
|
* If opt_compare == NULL, the default comparison of the argument's
|
|
|
|
* names (identifiers) will be performed.
|
|
|
|
*/
|
|
|
|
int asn1f_check_unique_expr_child(arg_t *arg, asn1p_expr_t *child,
|
2006-08-28 02:45:44 +00:00
|
|
|
int (*opt_compare)(asn1p_expr_t *a, asn1p_expr_t *b),
|
|
|
|
const char *opt_property_name);
|
2004-06-03 03:38:44 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Return number of children.
|
|
|
|
*/
|
|
|
|
int asn1f_count_children(asn1p_expr_t *parent);
|
|
|
|
|
2004-06-28 21:21:24 +00:00
|
|
|
/*
|
|
|
|
* Check if type is explicitly known.
|
|
|
|
*/
|
|
|
|
int asn1f_check_known_external_type(const char *);
|
|
|
|
|
2016-03-14 09:57:07 +00:00
|
|
|
#endif /* ASN1FIX_MISC_H */
|