Commit 61c7069b authored by Lev Walkin's avatar Lev Walkin

removed assert state

parent 1004aa94
...@@ -18,9 +18,6 @@ asn1c_compiled_output(arg_t *arg, const char *fmt, ...) { ...@@ -18,9 +18,6 @@ asn1c_compiled_output(arg_t *arg, const char *fmt, ...) {
switch(arg->target->target) { switch(arg->target->target) {
case OT_IGNORE: case OT_IGNORE:
return 0; return 0;
case OT_ASSERT:
assert(arg->target->target != OT_ASSERT);
return -1;
default: default:
dst = &arg->target->destination[arg->target->target]; dst = &arg->target->destination[arg->target->target];
break; break;
......
...@@ -13,8 +13,7 @@ typedef struct out_chunk { ...@@ -13,8 +13,7 @@ typedef struct out_chunk {
typedef struct compiler_streams { typedef struct compiler_streams {
enum { enum {
OT_IGNORE = -1, OT_IGNORE, /* Ignore this output */
OT_ASSERT = 0,
OT_INCLUDES, /* #include files */ OT_INCLUDES, /* #include files */
OT_DEPS, /* Dependencies (other than #includes) */ OT_DEPS, /* Dependencies (other than #includes) */
OT_TYPE_DECLS, /* Type declarations */ OT_TYPE_DECLS, /* Type declarations */
...@@ -33,7 +32,7 @@ typedef struct compiler_streams { ...@@ -33,7 +32,7 @@ typedef struct compiler_streams {
} compiler_streams_t; } compiler_streams_t;
static char *_compiler_stream2str[] __attribute__ ((unused)) static char *_compiler_stream2str[] __attribute__ ((unused))
= { "ASSERT", "INCLUDES", "DEPS", "TYPE-DECLS", "FUNC-DECLS", "CTABLES", "CODE", "STAT-DEFS" }; = { "IGNORE", "INCLUDES", "DEPS", "TYPE-DECLS", "FUNC-DECLS", "CTABLES", "CODE", "STAT-DEFS" };
int asn1c_compiled_output(arg_t *arg, const char *fmt, ...); int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
...@@ -53,13 +52,6 @@ int asn1c_compiled_output(arg_t *arg, const char *fmt, ...); ...@@ -53,13 +52,6 @@ int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
INDENT(-1); \ INDENT(-1); \
} while(0) } while(0)
#define FLAT(code) do { \
int _il = INDENT_LEVEL; \
INDENT_LEVEL = 0; \
do { code; } while(0); \
INDENT_LEVEL = _il; \
} while(0)
#define EMBED(ev) do { \ #define EMBED(ev) do { \
int saved_target = arg->target->target; \ int saved_target = arg->target->target; \
REDIR(OT_TYPE_DECLS); \ REDIR(OT_TYPE_DECLS); \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment