0114d4938abfc0dda8ebca47c5db285afcb554cf
[com/asn1c.git] / libasn1fix / asn1fix_misc.h
1 /*
2  * Miscellaneous functions necessary for several other modules.
3  */
4 #ifndef ASN1FIX_MISC_H
5 #define ASN1FIX_MISC_H
6
7 /*
8  * Recursively invoke a given function over the given expr and all its
9  * children.
10  */
11 int asn1f_recurse_expr(arg_t *arg, int (*f)(arg_t *arg));
12
13 /*
14  * Check that every child of a given expr has unique identifier.
15  */
16 int asn1f_check_unique_expr(arg_t *arg);
17
18 /*
19  * Check that every preceeding child of the given expr is not
20  * having the name of the given one.
21  * If opt_compare == NULL, the default comparison of the argument's
22  * names (identifiers) will be performed.
23  */
24 int asn1f_check_unique_expr_child(arg_t *arg, asn1p_expr_t *child,
25                 int (*opt_compare)(asn1p_expr_t *a, asn1p_expr_t *b),
26                 const char *opt_property_name);
27
28 /*
29  * Return number of children.
30  */
31 int asn1f_count_children(asn1p_expr_t *parent);
32
33 /*
34  * Check if type is explicitly known.
35  */
36 int asn1f_check_known_external_type(const char *);
37
38 #endif  /* ASN1FIX_MISC_H */