aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler/asn1c_out.h
diff options
context:
space:
mode:
Diffstat (limited to 'libasn1compiler/asn1c_out.h')
-rw-r--r--libasn1compiler/asn1c_out.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libasn1compiler/asn1c_out.h b/libasn1compiler/asn1c_out.h
new file mode 100644
index 00000000..2267d5db
--- /dev/null
+++ b/libasn1compiler/asn1c_out.h
@@ -0,0 +1,31 @@
+#ifndef _ASN1_COMPILED_OUTPUT_H_
+#define _ASN1_COMPILED_OUTPUT_H_
+
+/*
+ * An elementary chunk of target language text.
+ */
+typedef struct out_chunk {
+ char *buf;
+ int len;
+
+ TQ_ENTRY(struct out_chunk) next;
+} out_chunk_t;
+
+typedef struct compiler_streams {
+ enum {
+ OT_DEPS, /* Dependencies */
+ OT_TYPE_DECLS, /* Type declarations */
+ OT_FUNC_DECLS, /* Function declarations */
+ OT_STAT_DEFS, /* Static definitions */
+ OT_CODE, /* Some code */
+ OT_MAX
+ } target;
+ TQ_HEAD(out_chunk_t) targets[OT_MAX];
+} compiler_streams_t;
+
+static char *_compiler_stream2str[] __attribute__ ((unused))
+ = { "DEPS", "TYPE-DECLS", "FUNC-DECLS", "STAT-DEFS", "CODE" };
+
+int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
+
+#endif /* _ASN1_COMPILED_OUTPUT_H_ */