vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | #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 | */ |
vlm | af84197 | 2005-01-28 12:18:50 +0000 | [diff] [blame] | 9 | enum ami_flags_e { |
| 10 | AMI_MASK_ONLY_SPACES = 1, /* Mask only spaces, everything else's safe */ |
| 11 | AMI_CHECK_RESERVED = 2, /* Check against reserved keywords */ |
| 12 | }; |
| 13 | char *asn1c_make_identifier(enum ami_flags_e, char *arg1, ...); |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 14 | |
| 15 | /* |
| 16 | * Return the type name of the specified expression. |
| 17 | */ |
| 18 | enum tnfmt { |
vlm | af84197 | 2005-01-28 12:18:50 +0000 | [diff] [blame] | 19 | TNF_NORCHECK = 0x00, |
| 20 | TNF_CHECK = 0x01, |
| 21 | TNF_UNMODIFIED = 0x10, /* Return unmodified type name */ |
| 22 | TNF_INCLUDE = 0x20, /* Format for #include <> */ |
| 23 | TNF_CTYPE = 0x30, /* Format as normal C-ish type (append "_t") */ |
| 24 | TNF_SAFE = 0x40, /* Replace unsafe characters with _ */ |
| 25 | TNF_RSAFE = 0x50, /* Recursion-safe C type format */ |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 26 | }; |
| 27 | char *asn1c_type_name(arg_t *arg, asn1p_expr_t *expr, enum tnfmt _format); |
| 28 | |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 29 | #endif /* _ASN1_COMPILER_MISC_H_ */ |