blob: a90c5bedb413647a00c6dfa09fbc25c07039a832 [file] [log] [blame]
vlmfa67ddc2004-06-03 03:38:44 +00001/*
2 * Miscellaneous functions necessary for several other modules.
3 */
4#ifndef _ASN1FIX_MISC_H_
5#define _ASN1FIX_MISC_H_
6
7/*
vlmfa67ddc2004-06-03 03:38:44 +00008 * Recursively invoke a given function over the given expr and all its
9 * children.
10 */
11int asn1f_recurse_expr(arg_t *arg, int (*f)(arg_t *arg));
12
13/*
14 * Check that every child of a given expr has unique name or does not have any.
15 * If opt_compare == NULL, the default comparison of the argument's
16 * names (identifiers) will be performed.
17 */
18int asn1f_check_unique_expr(arg_t *arg,
19 int (*opt_compare)(asn1p_expr_t *a, asn1p_expr_t *b));
20
21/*
22 * Check that every preceeding child of the given expr is not
23 * having the name of the given one.
24 * If opt_compare == NULL, the default comparison of the argument's
25 * names (identifiers) will be performed.
26 */
27int asn1f_check_unique_expr_child(arg_t *arg, asn1p_expr_t *child,
28 int (*opt_compare)(asn1p_expr_t *a, asn1p_expr_t *b));
29
30/*
31 * Return number of children.
32 */
33int asn1f_count_children(asn1p_expr_t *parent);
34
vlmd9cd3f92004-06-28 21:21:24 +000035/*
36 * Check if type is explicitly known.
37 */
38int asn1f_check_known_external_type(const char *);
39
vlmfa67ddc2004-06-03 03:38:44 +000040#endif /* _ASN1FIX_MISC_H_ */