NativeEnumerated.c vars NULL init and check
[com/asn1c.git] / libasn1compiler / asn1compiler.h
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         /*
23          * Use wide types by default (INTEGER_t etc) instead of native/long.
24          */
25         A1C_USE_WIDE_TYPES      = 0x0008,
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,
34         /*
35          * Don't make the asn1_DEF_'s of structure members "static".
36          */
37         A1C_ALL_DEFS_GLOBAL     = 0x0040,
38         /*
39          * Do not generate constraint checking code.
40          */
41         A1C_NO_CONSTRAINTS      = 0x0080,
42         /*
43          * Generate type_id_PR_member things identifiers of id_PR_member.
44          */
45         A1C_COMPOUND_NAMES      = 0x0100,
46         /*
47          * Do not generate courtesy #includes for external dependencies.
48          */
49         A1C_NO_INCLUDE_DEPS     = 0x0200,
50         /*
51          * Compile members of CHOICE as indirect pointers.
52          */
53         A1C_INDIRECT_CHOICE     = 0x0400,
54         /*
55          * -flink-skeletons
56          * Symlink support files rather than copy them.
57          */
58         A1C_LINK_SKELETONS      = 0x0800,
59
60         /*
61          * -pdu={all|auto|Type}
62          * Generate PDU table
63          */
64         A1C_PDU_ALL                     = 0x2000,
65         A1C_PDU_AUTO            = 0x4000,
66         A1C_PDU_TYPE            = 0x8000,
67         /*
68          * -fincludes-quoted
69          * Avoid generating #include <foo>, generate "foo" instead.
70          */
71         A1C_INCLUDES_QUOTED     = 0x10000,
72         /*
73          * -fline-refs
74          * Include ASN.1 module's line numbers in comments.
75          */
76         A1C_LINE_REFS       = 0x20000,
77         /*
78          * -gen-OER
79          * Generate Octet Encoding Rules support code
80          */
81         A1C_GEN_OER                     = 0x40000,
82         /*
83          * -gen-PER
84          * Generate Packed Encoding Rules support code
85          */
86         A1C_GEN_PER                     = 0x80000,
87         /*
88          * Generate converter-example.c and converter-example.mk
89          */
90         A1C_GEN_EXAMPLE                 = 0x100000,
91         /*
92          * Generate top-level configure.ac and Makefile.am
93          */
94         A1C_GEN_AUTOTOOLS_EXAMPLE       = 0x200000,
95         /*
96          * Print the source of generated lines.
97          * -debug-output-origin-lines
98          */
99         A1C_DEBUG_OUTPUT_ORIGIN_LINES = 0x400000,
100 };
101
102 /*
103  * Compile the ASN.1 specification.
104  */
105 int asn1_compile(asn1p_t *asn, const char *datadir, const char *destdir, enum asn1c_flags,
106         int argc, int optc, char **argv);
107
108 void asn1c_debug_type_naming(asn1p_t *asn, enum asn1c_flags,
109                              char **asn_type_names);
110
111 void asn1c__add_pdu_type(const char *typename);
112
113 int asn1c_attach_streams(asn1p_expr_t *expr);
114
115 #endif  /* ASN1_COMPILER_H */