aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler/asn1c_out.h
blob: 2267d5dbe3a364488525b0d0ad7ef56867402924 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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_ */