blob: 2f82b0b65557b26f7cf52e2440929376915a9df9 [file] [log] [blame]
Lev Walkinf15320b2004-06-03 03:38:44 +00001#ifndef _ASN1_COMPILER_MISC_H_
2#define _ASN1_COMPILER_MISC_H_
3
4/*
5 * Make the target language identifier out of one or more names.
6 * The function will concatenate the names and replace unsafe characters
7 * with safe ones.
8 */
9char *asn1c_make_identifier(int unsafe_only_spaces, char *arg1, ...);
10
11/*
12 * Return the type name of the specified expression.
13 */
14enum tnfmt {
15 TNF_UNMODIFIED, /* Return unmodified type name */
16 TNF_INCLUDE, /* Format for #include <> */
17 TNF_CTYPE, /* Format as normal C-ish type (append "_t") */
18 TNF_SAFE, /* Replace unsafe characters with _ */
19 TNF_RSAFE, /* Recursion-safe C type format */
20};
21char *asn1c_type_name(arg_t *arg, asn1p_expr_t *expr, enum tnfmt _format);
22
23/*
24 * Open the arbitrary file by its base name and extension.
25 */
26FILE *asn1c_open_file(arg_t *arg, const char *base_part, const char *extension);
27
28#endif /* _ASN1_COMPILER_MISC_H_ */