vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Miscellaneous functions necessary for several other modules. |
| 3 | */ |
| 4 | #ifndef _ASN1FIX_MISC_H_ |
| 5 | #define _ASN1FIX_MISC_H_ |
| 6 | |
| 7 | /* |
| 8 | * Return a pointer to the locally held string with human-readable |
| 9 | * definition of the value. |
| 10 | */ |
| 11 | char const *asn1f_printable_value(asn1p_value_t *); |
| 12 | |
| 13 | /* |
| 14 | * Return a pointer to the locally held string with human-readable |
| 15 | * definition of the reference. |
| 16 | */ |
| 17 | char const *asn1f_printable_reference(asn1p_ref_t *); |
| 18 | |
| 19 | /* |
| 20 | * Recursively invoke a given function over the given expr and all its |
| 21 | * children. |
| 22 | */ |
| 23 | int asn1f_recurse_expr(arg_t *arg, int (*f)(arg_t *arg)); |
| 24 | |
| 25 | /* |
| 26 | * Check that every child of a given expr has unique name or does not have any. |
| 27 | * If opt_compare == NULL, the default comparison of the argument's |
| 28 | * names (identifiers) will be performed. |
| 29 | */ |
| 30 | int asn1f_check_unique_expr(arg_t *arg, |
| 31 | int (*opt_compare)(asn1p_expr_t *a, asn1p_expr_t *b)); |
| 32 | |
| 33 | /* |
| 34 | * Check that every preceeding child of the given expr is not |
| 35 | * having the name of the given one. |
| 36 | * If opt_compare == NULL, the default comparison of the argument's |
| 37 | * names (identifiers) will be performed. |
| 38 | */ |
| 39 | int asn1f_check_unique_expr_child(arg_t *arg, asn1p_expr_t *child, |
| 40 | int (*opt_compare)(asn1p_expr_t *a, asn1p_expr_t *b)); |
| 41 | |
| 42 | /* |
| 43 | * Return number of children. |
| 44 | */ |
| 45 | int asn1f_count_children(asn1p_expr_t *parent); |
| 46 | |
vlm | d9cd3f9 | 2004-06-28 21:21:24 +0000 | [diff] [blame] | 47 | /* |
| 48 | * Check if type is explicitly known. |
| 49 | */ |
| 50 | int asn1f_check_known_external_type(const char *); |
| 51 | |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 52 | #endif /* _ASN1FIX_MISC_H_ */ |