Commit 64399727 authored by Lev Walkin's avatar Lev Walkin
Browse files

Win32 portability fixes

parent 2c962736
0.8.17: 2004-Aug-10
0.8.17: 2004-Aug-11
* Improved compiler output: duplicate #includes eliminated.
* Win32 portability fixes.
0.8.16: 2004-Jul-22
......
......@@ -23,7 +23,7 @@ static int asn1c_lang_C_type_CHOICE_def(arg_t *arg);
static int asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of);
static int _print_tag(arg_t *arg, asn1p_expr_t *expr, struct asn1p_type_tag_s *tag_p);
static int check_if_extensible(asn1p_expr_t *expr);
static int emit_tags_vector(arg_t *arg, asn1p_expr_t *expr, int*tags_impl_skip);
static int emit_tags_vector(arg_t *arg, asn1p_expr_t *expr, int *tags_impl_skip, int choice_mode);
static int emit_tag2member_map(arg_t *arg, tag2el_t *tag2el, int tag2el_count);
static int emit_constraint_checking_code(arg_t *arg);
static int emit_single_constraint_check(arg_t *arg, asn1p_constraint_t *ct, int mode);
......@@ -165,6 +165,7 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
int ext_stop = -1;
tag2el_t *tag2el = NULL;
int tag2el_count = 0;
int tags_count;
char *p;
/*
......@@ -239,7 +240,7 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
/*
* Print out asn1_DEF_<type>_tags[] vector.
*/
emit_tags_vector(arg, expr, &tags_impl_skip);
tags_count = emit_tags_vector(arg, expr, &tags_impl_skip, 0);
/*
* Tags to elements map.
......@@ -270,9 +271,15 @@ asn1c_lang_C_type_SEQUENCE_def(arg_t *arg) {
OUT("SEQUENCE_print,\n");
OUT("SEQUENCE_free,\n");
OUT("0,\t/* Use generic outmost tag fetcher */\n");
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]),\n", p);
if(tags_count) {
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]), /* %d */\n",
p, tags_count);
} else {
OUT("0,\t/* No explicit tags (pointer) */\n");
OUT("0,\t/* No explicit tags (count) */\n");
}
OUT("%d,\t/* Tags to skip */\n", tags_impl_skip);
OUT("%d,\t/* Whether CONSTRUCTED */\n", 1);
OUT("&asn1_DEF_%s_specs\t/* Additional specs */\n", p);
......@@ -330,7 +337,7 @@ asn1c_lang_C_type_SET(arg_t *arg) {
OUT(" * Method of determining the components presence\n");
OUT(" */\n");
mcount = 0;
OUT("enum %s_PR_e {\n", MKID(expr->Identifier));
OUT("typedef enum %s_PR {\n", MKID(expr->Identifier));
TQ_FOR(v, &(expr->members), next) {
if(v->expr_type == A1TC_EXTENSIBLE) continue;
INDENTED(
......@@ -342,14 +349,15 @@ asn1c_lang_C_type_SET(arg_t *arg) {
);
mcount++;
}
OUT("};\n");
id = MKID(expr->Identifier);
OUT("} %s_PR;\n", id);
REDIR(OT_TYPE_DECLS);
if(arg->embed) {
OUT("struct %s {\n", MKID(expr->Identifier));
OUT("struct %s {\n", id);
} else {
OUT("typedef struct %s {\n", MKID(expr->Identifier));
OUT("typedef struct %s {\n", id);
}
TQ_FOR(v, &(expr->members), next) {
......@@ -386,6 +394,7 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
int comp_mode = 0; /* {root,ext=1,root,root,...} */
tag2el_t *tag2el = NULL;
int tag2el_count = 0;
int tags_count;
char *p;
/*
......@@ -454,7 +463,7 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
/*
* Print out asn1_DEF_<type>_tags[] vector.
*/
emit_tags_vector(arg, expr, &tags_impl_skip);
tags_count = emit_tags_vector(arg, expr, &tags_impl_skip, 0);
/*
* Tags to elements map.
......@@ -515,9 +524,15 @@ asn1c_lang_C_type_SET_def(arg_t *arg) {
OUT("SET_print,\n");
OUT("SET_free,\n");
OUT("0,\t/* Use generic outmost tag fetcher */\n");
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]),\n", p);
if(tags_count) {
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]), /* %d */\n",
p, tags_count);
} else {
OUT("0,\t/* No explicit tags (pointer) */\n");
OUT("0,\t/* No explicit tags (count) */\n");
}
OUT("%d,\t/* Tags to skip */\n", tags_impl_skip);
OUT("%d,\t/* Whether CONSTRUCTED */\n", 1);
OUT("&asn1_DEF_%s_specs\t/* Additional specs */\n", p);
......@@ -564,6 +579,7 @@ asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of) {
asn1p_expr_t *expr = arg->expr;
asn1p_expr_t *v;
int tags_impl_skip = 0;
int tags_count;
char *p;
/*
......@@ -603,7 +619,7 @@ asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of) {
/*
* Print out asn1_DEF_<type>_tags[] vector.
*/
emit_tags_vector(arg, expr, &tags_impl_skip);
tags_count = emit_tags_vector(arg, expr, &tags_impl_skip, 0);
p = MKID(expr->Identifier);
OUT("static asn1_SET_OF_specifics_t asn1_DEF_%s_specs = {\n", p);
......@@ -630,9 +646,15 @@ asn1c_lang_C_type_SEx_OF_def(arg_t *arg, int seq_of) {
OUT("SET_OF_free,\n");
}
OUT("0,\t/* Use generic outmost tag fetcher */\n");
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]),\n", p);
if(tags_count) {
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]), /* %d */\n",
p, tags_count);
} else {
OUT("0,\t/* No explicit tags (pointer) */\n");
OUT("0,\t/* No explicit tags (count) */\n");
}
OUT("%d,\t/* Tags to skip */\n", tags_impl_skip);
OUT("%d,\t/* Whether CONSTRUCTED */\n", 1);
OUT("&asn1_DEF_%s_specs\t/* Additional specs */\n", p);
......@@ -673,7 +695,7 @@ asn1c_lang_C_type_CHOICE(arg_t *arg) {
}
);
p = MKID(expr->Identifier);
OUT("} %s_PR_e;\n", p);
OUT("} %s_PR;\n", p);
REDIR(OT_TYPE_DECLS);
......@@ -684,7 +706,7 @@ asn1c_lang_C_type_CHOICE(arg_t *arg) {
}
INDENTED(
OUT("%s_PR_e present;\n", p);
OUT("%s_PR present;\n", p);
OUT("union {\n", p);
TQ_FOR(v, &(expr->members), next) {
EMBED(v);
......@@ -709,6 +731,7 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
int comp_mode = 0; /* {root,ext=1,root,root,...} */
tag2el_t *tag2el = NULL;
int tag2el_count = 0;
int tags_count;
char *p;
/*
......@@ -775,29 +798,22 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
});
OUT("};\n");
p = MKID(expr->Identifier);
OUT("static ber_tlv_tag_t asn1_DEF_%s_tags[] = {\n", p);
if(arg->embed) {
/*
* Our parent structure has already taken this into account.
*/
tags_count = 0;
} else {
INDENTED(
if(expr->tag.tag_class) {
_print_tag(arg, expr, &expr->tag);
if(expr->tag.tag_mode != TM_EXPLICIT)
tags_impl_skip++;
}
OUT("\n");
);
tags_count = emit_tags_vector(arg, expr, &tags_impl_skip, 1);
}
OUT("};\n");
/*
* Tags to elements map.
*/
emit_tag2member_map(arg, tag2el, tag2el_count);
p = MKID(expr->Identifier);
OUT("static asn1_CHOICE_specifics_t asn1_DEF_%s_specs = {\n", p);
INDENTED(
OUT("sizeof(struct %s),\n", p);
......@@ -821,9 +837,15 @@ asn1c_lang_C_type_CHOICE_def(arg_t *arg) {
OUT("CHOICE_print,\n");
OUT("CHOICE_free,\n");
OUT("CHOICE_outmost_tag,\n");
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]),\n", p);
if(tags_count) {
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]), /* %d */\n",
p, tags_count);
} else {
OUT("0,\t/* No explicit tags (pointer) */\n");
OUT("0,\t/* No explicit tags (count) */\n");
}
OUT("%d,\t/* Tags to skip */\n", tags_impl_skip);
OUT("%d,\t/* Whether CONSTRUCTED */\n", 1);
OUT("&asn1_DEF_%s_specs\t/* Additional specs */\n", p);
......@@ -885,6 +907,7 @@ int
asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
asn1p_expr_t *expr = arg->expr;
int tags_impl_skip = 0;
int tags_count;
char *p;
if(arg->embed) {
......@@ -915,7 +938,7 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
/*
* Print out asn1_DEF_<type>_tags[] vector.
*/
emit_tags_vector(arg, expr, &tags_impl_skip);
tags_count = emit_tags_vector(arg, expr, &tags_impl_skip, 0);
p = MKID(expr->Identifier);
OUT("asn1_TYPE_descriptor_t asn1_DEF_%s = {\n", p);
......@@ -927,9 +950,15 @@ asn1c_lang_C_type_SIMPLE_TYPE(arg_t *arg) {
OUT("%s_print,\n", p);
OUT("%s_free,\n", p);
OUT("0,\t/* Use generic outmost tag fetcher */\n");
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]),\n", p);
if(tags_count) {
OUT("asn1_DEF_%s_tags,\n", p);
OUT("sizeof(asn1_DEF_%s_tags)\n", p);
OUT("\t/sizeof(asn1_DEF_%s_tags[0]), /* %d */\n",
p, tags_count);
} else {
OUT("0,\t/* No explicit tags (pointer) */\n");
OUT("0,\t/* No explicit tags (count) */\n");
}
OUT("%d,\t/* Tags to skip */\n", tags_impl_skip);
OUT("-0,\t/* Unknown yet */\n");
OUT("0\t/* No specifics */\n");
......@@ -1284,35 +1313,57 @@ emit_tag2member_map(arg_t *arg, tag2el_t *tag2el, int tag2el_count) {
}
static int
emit_tags_vector(arg_t *arg, asn1p_expr_t *expr, int *tags_impl_skip) {
emit_tags_vector(arg_t *arg, asn1p_expr_t *expr, int *tags_impl_skip, int choice_mode) {
int tags_count = 0;
int save_target = arg->target->target;
char *p;
if(save_target != OT_IGNORE) {
int save_impl_skip = *tags_impl_skip;
REDIR(OT_IGNORE);
tags_count = emit_tags_vector(arg, expr,
tags_impl_skip, choice_mode);
REDIR(save_target);
if(tags_count) {
*tags_impl_skip = save_impl_skip;
tags_count = 0;
} else {
return 0;
}
}
p = MKID(expr->Identifier);
OUT("static ber_tlv_tag_t asn1_DEF_%s_tags[] = {\n", p);
INDENTED(
if(expr->tag.tag_class) {
tags_count++;
_print_tag(arg, expr, &expr->tag);
if(expr->tag.tag_mode != TM_EXPLICIT)
(*tags_impl_skip)++;
} else {
(*tags_impl_skip)++;
if(!choice_mode)
(*tags_impl_skip)++;
}
if(!expr->tag.tag_class
|| (expr->meta_type == AMT_TYPE
&& expr->tag.tag_mode == TM_EXPLICIT)) {
struct asn1p_type_tag_s tag;
if(expr->tag.tag_class)
OUT(",\n");
tag.tag_class = TC_UNIVERSAL;
tag.tag_mode = TM_IMPLICIT;
tag.tag_value = expr_type2uclass_value[expr->expr_type];
_print_tag(arg, expr, &tag);
if(!choice_mode) {
if(!expr->tag.tag_class
|| (expr->meta_type == AMT_TYPE
&& expr->tag.tag_mode == TM_EXPLICIT)) {
struct asn1p_type_tag_s tag;
if(expr->tag.tag_class)
OUT(",\n");
tag.tag_class = TC_UNIVERSAL;
tag.tag_mode = TM_IMPLICIT;
tag.tag_value = expr_type2uclass_value[expr->expr_type];
_print_tag(arg, expr, &tag);
tags_count++;
}
}
OUT("\n");
);
OUT("};\n");
return 0;
return tags_count;
}
static int
......@@ -1923,12 +1974,17 @@ emit_value_determination_code(arg_t *arg) {
switch(etype) {
case ASN_BASIC_INTEGER:
case ASN_BASIC_ENUMERATED:
OUT("if(asn1_INTEGER2long(st, &value)) {\n");
INDENT(+1);
OUT("_ASN_ERRLOG(\"%%s: value too large\", td->name);\n");
OUT("return -1;\n");
INDENT(-1);
OUT("}\n");
if(arg->flags & A1C_USE_NATIVE_INTEGERS) {
OUT("value = *(int *)st;\n");
} else {
OUT("if(asn1_INTEGER2long(st, &value)) {\n");
INDENT(+1);
OUT("_ASN_ERRLOG(\"%%s: value too large\", "
"td->name);\n");
OUT("return -1;\n");
INDENT(-1);
OUT("}\n");
}
break;
case ASN_BASIC_BOOLEAN:
OUT("value = st->value;\n");
......
......@@ -13,6 +13,16 @@ asn1c_compiled_output(arg_t *arg, const char *fmt, ...) {
char *buf;
int ret;
switch(arg->target->target) {
case OT_IGNORE:
return 0;
case OT_ASSERT:
assert(arg->target->target != OT_ASSERT);
return -1;
default:
break;
}
/*
* Make sure the output has a single LF and only at the end.
*/
......
......@@ -13,6 +13,8 @@ typedef struct out_chunk {
typedef struct compiler_streams {
enum {
OT_IGNORE = -1,
OT_ASSERT = 0,
OT_INCLUDES, /* #include files */
OT_DEPS, /* Dependencies (other than #includes) */
OT_TYPE_DECLS, /* Type declarations */
......@@ -25,7 +27,7 @@ typedef struct compiler_streams {
} compiler_streams_t;
static char *_compiler_stream2str[] __attribute__ ((unused))
= { "INCLUDES", "DEPS", "TYPE-DECLS", "FUNC-DECLS", "STAT-DEFS", "CODE" };
= { "ASSERT", "INCLUDES", "DEPS", "TYPE-DECLS", "FUNC-DECLS", "STAT-DEFS", "CODE" };
int asn1c_compiled_output(arg_t *arg, const char *fmt, ...);
......
......@@ -106,7 +106,7 @@ asn1c_print_streams(arg_t *arg) {
asn1p_expr_t *expr = arg->expr;
int i;
for(i = 0; i < OT_MAX; i++) {
for(i = 1; i < OT_MAX; i++) {
out_chunk_t *ot;
if(TQ_FIRST(&cs->targets[i]) == NULL)
continue;
......@@ -202,7 +202,7 @@ asn1c_save_streams(arg_t *arg) {
TQ_FOR(ot, &(cs->targets[OT_CODE]), next)
fwrite(ot->buf, ot->len, 1, fp_c);
assert(OT_MAX == 6);
assert(OT_MAX == 7);
fclose(fp_c);
fclose(fp_h);
......
......@@ -9,6 +9,13 @@
#include <assert.h>
#endif /* __NO_ASSERT_H__ */
#ifdef WIN32
#define localtime_r(tlocp, tmp) (*tmp = localtime(&tlocp))
#warning PLEASE STOP AND READ!
#warning localtime_r is implemented via localtime(), which is not thread-safe. You must fix the code to insert appropriate locking if you want to use asn_GT2time() or asn_UT2time().
#warning PLEASE STOP AND READ!
#endif
#ifndef __NO_ASN_TABLE__
/*
......
......@@ -359,11 +359,15 @@ OBJECT_IDENTIFIER_set_single_arc(uint8_t *arcbuf, void *arcval, unsigned int arc
unsigned LE = 1;
unsigned isLittleEndian = *(char *)&LE;
#endif
uint8_t buffer[arcval_size];
uint8_t *tp, *tend;
unsigned int cache;
uint8_t *bp = arcbuf;
int bits;
#ifdef __GNUC__
uint8_t buffer[arcval_size];
#else
uint8_t *buffer = alloca(arcval_size);
#endif
if(isLittleEndian && !prepared_order) {
uint8_t *a = arcval + arcval_size - 1;
......
......@@ -13,10 +13,29 @@
#include <string.h> /* For memcpy(3) */
#include <sys/types.h> /* For size_t */
#include <stdarg.h> /* For va_start */
#include <inttypes.h> /* C99 Standard specifies this file, for uintXX_t */
#include <stddef.h> /* for offsetof and ptrdiff_t */
#if __STDC_VERSION__ < 199901L
#include <inttypes.h> /* C99 Standard specifies this file, for uintXX_t */
#else
typedef unsigned char uint8_t;
typedef unsigned short int uint16_t;
typedef unsigned int uint32_t;
typedef int ssize_t;
#endif
#ifdef WIN32
#define snprintf(str, size, format, args...) \
_snprintf(str, size, format, ##args)
#define vsnprintf(str, size, format, ap) \
_vsnprintf(str, size, format, ap)
#define alloca(size) _alloca(size)
#endif
#ifndef __GNUC__
#define __attribute__(ignore)
#endif
#ifndef offsetof
#ifndef offsetof /* If not defined by <stddef.h> */
#define offsetof(s, m) ((ptrdiff_t)&(((s *)0)->m) - (ptrdiff_t)((s *)0))
#endif /* offsetof */
......
......@@ -51,7 +51,7 @@ typedef struct T {
0, /* Use generic outmost tag fetcher */
asn1_DEF_collection_tags,
sizeof(asn1_DEF_collection_tags)
/sizeof(asn1_DEF_collection_tags[0]),
/sizeof(asn1_DEF_collection_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_collection_specs /* Additional specs */
......@@ -98,7 +98,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T = {
0, /* Use generic outmost tag fetcher */
asn1_DEF_T_tags,
sizeof(asn1_DEF_T_tags)
/sizeof(asn1_DEF_T_tags[0]),
/sizeof(asn1_DEF_T_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_T_specs /* Additional specs */
......@@ -169,7 +169,7 @@ asn1_TYPE_descriptor_t asn1_DEF_T2 = {
0, /* Use generic outmost tag fetcher */
asn1_DEF_T2_tags,
sizeof(asn1_DEF_T2_tags)
/sizeof(asn1_DEF_T2_tags[0]),
/sizeof(asn1_DEF_T2_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_T2_specs /* Additional specs */
......
......@@ -55,7 +55,7 @@ typedef struct LogLine {
0, /* Use generic outmost tag fetcher */
asn1_DEF_varsets_tags,
sizeof(asn1_DEF_varsets_tags)
/sizeof(asn1_DEF_varsets_tags[0]),
/sizeof(asn1_DEF_varsets_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_varsets_specs /* Additional specs */
......@@ -102,7 +102,7 @@ asn1_TYPE_descriptor_t asn1_DEF_LogLine = {
0, /* Use generic outmost tag fetcher */
asn1_DEF_LogLine_tags,
sizeof(asn1_DEF_LogLine_tags)
/sizeof(asn1_DEF_LogLine_tags[0]),
/sizeof(asn1_DEF_LogLine_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_LogLine_specs /* Additional specs */
......@@ -165,7 +165,7 @@ typedef struct VariablePartSet {
0, /* Use generic outmost tag fetcher */
asn1_DEF_vparts_tags,
sizeof(asn1_DEF_vparts_tags)
/sizeof(asn1_DEF_vparts_tags[0]),
/sizeof(asn1_DEF_vparts_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_vparts_specs /* Additional specs */
......@@ -212,7 +212,7 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePartSet = {
0, /* Use generic outmost tag fetcher */
asn1_DEF_VariablePartSet_tags,
sizeof(asn1_DEF_VariablePartSet_tags)
/sizeof(asn1_DEF_VariablePartSet_tags[0]),
/sizeof(asn1_DEF_VariablePartSet_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_VariablePartSet_specs /* Additional specs */
......@@ -234,14 +234,14 @@ typedef enum VariablePart_PR {
VariablePart_PR_vset,
VariablePart_PR_vrange,
/* Extensions may appear below */
} VariablePart_PR_e;
} VariablePart_PR;
extern asn1_TYPE_descriptor_t asn1_DEF_VariablePart;
/*** <<< TYPE-DECLS [VariablePart] >>> ***/
typedef struct VariablePart {
VariablePart_PR_e present;
VariablePart_PR present;
union {
struct vset {
A_SET_OF(VisibleString_t) list;
......@@ -294,7 +294,7 @@ typedef struct VariablePart {
0, /* Use generic outmost tag fetcher */
asn1_DEF_vset_tags,
sizeof(asn1_DEF_vset_tags)
/sizeof(asn1_DEF_vset_tags[0]),
/sizeof(asn1_DEF_vset_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_vset_specs /* Additional specs */
......@@ -341,7 +341,7 @@ typedef struct VariablePart {
0, /* Use generic outmost tag fetcher */
asn1_DEF_vrange_tags,
sizeof(asn1_DEF_vrange_tags)
/sizeof(asn1_DEF_vrange_tags[0]),
/sizeof(asn1_DEF_vrange_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_vrange_specs /* Additional specs */
......@@ -360,9 +360,6 @@ static asn1_CHOICE_element_t asn1_DEF_VariablePart_elements[] = {
(void *)&asn1_DEF_vrange,
"vrange"
},
};
static ber_tlv_tag_t asn1_DEF_VariablePart_tags[] = {
};
static asn1_TYPE_tag2member_t asn1_DEF_VariablePart_tag2el[] = {
{ (ASN_TAG_CLASS_UNIVERSAL | (16 << 2)), 1, 0, 0 }, /* vrange at 45 */
......@@ -387,9 +384,8 @@ asn1_TYPE_descriptor_t asn1_DEF_VariablePart = {
CHOICE_print,
CHOICE_free,
CHOICE_outmost_tag,
asn1_DEF_VariablePart_tags,
sizeof(asn1_DEF_VariablePart_tags)
/sizeof(asn1_DEF_VariablePart_tags[0]),
0, /* No explicit tags (pointer) */
0, /* No explicit tags (count) */
0, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_VariablePart_specs /* Additional specs */
......@@ -471,7 +467,7 @@ typedef struct ActionItem {
0, /* Use generic outmost tag fetcher */
asn1_DEF_email_tags,
sizeof(asn1_DEF_email_tags)
/sizeof(asn1_DEF_email_tags[0]),
/sizeof(asn1_DEF_email_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_email_specs /* Additional specs */
......@@ -518,7 +514,7 @@ typedef struct ActionItem {
0, /* Use generic outmost tag fetcher */
asn1_DEF_notify_tags,
sizeof(asn1_DEF_notify_tags)
/sizeof(asn1_DEF_notify_tags[0]),
/sizeof(asn1_DEF_notify_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_notify_specs /* Additional specs */
......@@ -565,7 +561,7 @@ asn1_TYPE_descriptor_t asn1_DEF_ActionItem = {
0, /* Use generic outmost tag fetcher */
asn1_DEF_ActionItem_tags,
sizeof(asn1_DEF_ActionItem_tags)
/sizeof(asn1_DEF_ActionItem_tags[0]),
/sizeof(asn1_DEF_ActionItem_tags[0]), /* 1 */
1, /* Tags to skip */
1, /* Whether CONSTRUCTED */
&asn1_DEF_ActionItem_specs /* Additional specs */
......
......@@ -13,17 +13,17 @@
b_PR_d,
b_PR_e,
b_PR_h,
} b_PR_e;
} b_PR;
typedef enum e_PR {
e_PR_NOTHING, /* No components present */
e_PR_f,
e_PR_g,
} e_PR_e;
} e_PR;