diff options
author | Lev Walkin <vlm@lionet.info> | 2004-10-23 15:07:45 +0000 |
---|---|---|
committer | Lev Walkin <vlm@lionet.info> | 2004-10-23 15:07:45 +0000 |
commit | 61b40d81b7cd8c5133a9bd16a7026c8f333f772b (patch) | |
tree | d1ce69b10b9571cba04230d8b766463556c26595 /libasn1compiler/asn1c_C.c | |
parent | da3ca411d2450d02de171f6964aab59a04204db9 (diff) |
CHOICE XER decoder
Diffstat (limited to 'libasn1compiler/asn1c_C.c')
-rw-r--r-- | libasn1compiler/asn1c_C.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c index 5b9eae69..2cbe258c 100644 --- a/libasn1compiler/asn1c_C.c +++ b/libasn1compiler/asn1c_C.c @@ -1508,11 +1508,15 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_ OUT("%s_constraint,\n", p); OUT("%s_decode_ber,\n", p); OUT("%s_encode_der,\n", p); - if(!(expr->expr_type & ASN_CONSTR_MASK) - && (expr->expr_type != ASN_CONSTR_SEQUENCE)) - OUT("%s_decode_xer,\n", p); - else - OUT("0,\t\t\t\t/* Not implemented yet */\n"); + switch(expr->expr_type) { + case ASN_CONSTR_SET: + case ASN_CONSTR_SET_OF: + case ASN_CONSTR_SEQUENCE_OF: + OUT("0,\t\t\t\t/* Not implemented yet */\n"); + break; + default: + OUT("%s_decode_xer,\n", p); + } OUT("%s_encode_xer,\n", p); p = MKID(expr->Identifier); |