Commit 3645c1c1 authored by Lev Walkin's avatar Lev Walkin

removed order dependency in DEFAULT references

parent 78269183
0.9.8: 2004-Oct-26 0.9.8: 2004-Oct-30
* [NEW PLATFORM] Compiled and tested on Linux @ alpha64 (LP64). * [NEW PLATFORM] Compiled and tested on Linux @ alpha64 (LP64).
Some code needed to be fixed regarding int-long conversions Some code needed to be fixed regarding int-long conversions
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* Empty SEQUENCE and SET clauses are now allowed. * Empty SEQUENCE and SET clauses are now allowed.
* Removed confusion between &xNN; and &#xNN; in enber and unber. * Removed confusion between &xNN; and &#xNN; in enber and unber.
* ber_dec_rval_t renamed into asn_dec_rval_t: more generality. * ber_dec_rval_t renamed into asn_dec_rval_t: more generality.
* Removed order dependency in DEFAULT references to ENUMERATED
identifiers (./tests/68-*-OK.asn1).
0.9.7.1: 2004-Oct-12 0.9.7.1: 2004-Oct-12
......
...@@ -261,6 +261,12 @@ asn1f_fix_module__phase_2(arg_t *arg) { ...@@ -261,6 +261,12 @@ asn1f_fix_module__phase_2(arg_t *arg) {
/* Do not process the parametrized types here */ /* Do not process the parametrized types here */
continue; continue;
/*
* Dereference DEFAULT values.
*/
ret = asn1f_recurse_expr(arg, asn1f_fix_dereference_defaults);
RET2RVAL(ret, rvalue);
/* /*
* Check semantic validity of constraints. * Check semantic validity of constraints.
*/ */
......
...@@ -15,6 +15,18 @@ asn1f_fix_dereference_values(arg_t *arg) { ...@@ -15,6 +15,18 @@ asn1f_fix_dereference_values(arg_t *arg) {
} }
} }
return r_value;
}
/*
* Dereference DEFAULT values
*/
int
asn1f_fix_dereference_defaults(arg_t *arg) {
asn1p_expr_t *expr = arg->expr;
int r_value = 0;
if(expr->marker.default_value) { if(expr->marker.default_value) {
arg_t tmparg = *arg; arg_t tmparg = *arg;
asn1p_expr_t tmpexpr = *expr; asn1p_expr_t tmpexpr = *expr;
......
...@@ -3,4 +3,6 @@ ...@@ -3,4 +3,6 @@
int asn1f_fix_dereference_values(arg_t *); int asn1f_fix_dereference_values(arg_t *);
int asn1f_fix_dereference_defaults(arg_t *);
#endif /* _ASN1FIX_DEREFV_H_ */ #endif /* _ASN1FIX_DEREFV_H_ */
-- OK: Everything is Fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .68
ModuleTestEnumeratedDefault
{ iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 68 }
DEFINITIONS ::=
BEGIN
Type ::= SEQUENCE {
reportAmount ReportAmount DEFAULT ra-default,
reportInterval INTEGER
}
ReportAmount ::= ENUMERATED { a, b, c, ra-default }
END
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