vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 1 | #ifndef ASN1_COMPILER_H |
| 2 | #define ASN1_COMPILER_H |
| 3 | |
| 4 | #include <asn1parser.h> |
| 5 | |
| 6 | enum asn1c_flags { |
| 7 | A1C_NOFLAGS, |
| 8 | /* |
| 9 | * Debug the compiler. |
| 10 | */ |
| 11 | A1C_DEBUG = 0x0001, |
| 12 | /* |
| 13 | * Do not split the target output in several files, just print it. |
| 14 | * (Note: the output is not likely to be compilable in this case). |
| 15 | */ |
| 16 | A1C_PRINT_COMPILED = 0x0002, |
| 17 | /* |
| 18 | * Generate only the tables for ASN.1 types, |
| 19 | * do not emit ASN.1 parsing support code. |
| 20 | */ |
| 21 | A1C_OMIT_SUPPORT_CODE = 0x0004, |
| 22 | /* |
vlm | f9d178d | 2004-09-14 12:47:45 +0000 | [diff] [blame] | 23 | * Use native data types instead of INTEGER_t et al. |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 24 | */ |
vlm | f9d178d | 2004-09-14 12:47:45 +0000 | [diff] [blame] | 25 | A1C_USE_NATIVE_TYPES = 0x0008, |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 26 | /* |
| 27 | * Do not use C99 extensions. |
| 28 | */ |
| 29 | A1C_NO_C99 = 0x0010, |
| 30 | /* |
| 31 | * Enable use of unnamed unions (non-portable feature). |
| 32 | */ |
| 33 | A1C_UNNAMED_UNIONS = 0x0020, |
vlm | 12c8f69 | 2004-09-06 08:07:29 +0000 | [diff] [blame] | 34 | /* |
| 35 | * Don't make the asn1_DEF_'s of structure members "static". |
| 36 | */ |
| 37 | A1C_ALL_DEFS_GLOBAL = 0x0040, |
vlm | 86f5ed2 | 2004-09-26 13:11:31 +0000 | [diff] [blame] | 38 | /* |
| 39 | * Do not generate constraint checking code. |
| 40 | */ |
| 41 | A1C_NO_CONSTRAINTS = 0x0080, |
vlm | af84197 | 2005-01-28 12:18:50 +0000 | [diff] [blame] | 42 | /* |
| 43 | * Generate type_id_PR_member things identifiers of id_PR_member. |
| 44 | */ |
vlm | 9821860 | 2005-03-04 08:52:50 +0000 | [diff] [blame] | 45 | A1C_COMPOUND_NAMES = 0x0100, |
vlm | fa67ddc | 2004-06-03 03:38:44 +0000 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | /* |
| 49 | * Compile the ASN.1 specification. |
| 50 | */ |
| 51 | int asn1_compile(asn1p_t *asn, const char *datadir, enum asn1c_flags); |
| 52 | |
| 53 | #endif /* ASN1_COMPILER_H */ |