diff options
author | Lev Walkin <vlm@lionet.info> | 2004-06-03 03:38:44 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2004-06-03 03:38:44 +0000 |
commit | f15320bf6b50a0c02636405561ac8323ae901abd (patch) | |
tree | 33461d45122896c6dde35f82f5c7d19b62004a6b /libasn1compiler/asn1c_misc.h | |
parent | 746cb60bbccf47019563665f4aec4b6c462c4163 (diff) |
Initial revision
Diffstat (limited to 'libasn1compiler/asn1c_misc.h')
-rw-r--r-- | libasn1compiler/asn1c_misc.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/libasn1compiler/asn1c_misc.h b/libasn1compiler/asn1c_misc.h new file mode 100644 index 00000000..2f82b0b6 --- /dev/null +++ b/libasn1compiler/asn1c_misc.h @@ -0,0 +1,28 @@ +#ifndef _ASN1_COMPILER_MISC_H_ +#define _ASN1_COMPILER_MISC_H_ + +/* + * Make the target language identifier out of one or more names. + * The function will concatenate the names and replace unsafe characters + * with safe ones. + */ +char *asn1c_make_identifier(int unsafe_only_spaces, char *arg1, ...); + +/* + * Return the type name of the specified expression. + */ +enum tnfmt { + TNF_UNMODIFIED, /* Return unmodified type name */ + TNF_INCLUDE, /* Format for #include <> */ + TNF_CTYPE, /* Format as normal C-ish type (append "_t") */ + TNF_SAFE, /* Replace unsafe characters with _ */ + TNF_RSAFE, /* Recursion-safe C type format */ +}; +char *asn1c_type_name(arg_t *arg, asn1p_expr_t *expr, enum tnfmt _format); + +/* + * Open the arbitrary file by its base name and extension. + */ +FILE *asn1c_open_file(arg_t *arg, const char *base_part, const char *extension); + +#endif /* _ASN1_COMPILER_MISC_H_ */ |