tagging mode is implicit if automatic tags environment is used

git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@938 59561ff5-6e30-0410-9f3c-9617f08c8826
This commit is contained in:
vlm 2005-07-21 01:18:19 +00:00
parent 0e874795de
commit b012da8fa0
7 changed files with 59 additions and 5 deletions

View File

@ -1,5 +1,10 @@
0.9.16: 2005-July-04
0.9.17: 2005-July-20
* Tagging mode is implicitly IMPLICIT if AUTOMATIC TAGS is used, #30.6.
(Test cases 55, 86).
0.9.16: 2005-July-04
* GeneralizedTime API now supports fractions of seconds.
Thanks to Bent Nicolaisen <BN@JAI.com> for support.

2
configure vendored
View File

@ -1881,7 +1881,7 @@ fi
# Define the identity of the package.
PACKAGE=asn1c
VERSION=0.9.16
VERSION=0.9.17
cat >>confdefs.h <<_ACEOF

View File

@ -3,7 +3,7 @@ AC_INIT(libasn1parser/asn1p_y.y)
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
AC_PREREQ(2.53)
AM_INIT_AUTOMAKE(asn1c, 0.9.16)
AM_INIT_AUTOMAKE(asn1c, 0.9.17)
AM_MAINTAINER_MODE

View File

@ -252,7 +252,8 @@ asn1f_fix_constr_tag(arg_t *arg, int fix_top_level) {
static int
_asn1f_fix_type_tag(arg_t *arg, asn1p_expr_t *expr) {
int must_explicit = _asn1f_check_if_tag_must_be_explicit(arg, expr);
int module_impl_tags = (arg->mod->module_flags & MSF_IMPLICIT_TAGS);
int module_impl_tags = (arg->mod->module_flags
& (MSF_IMPLICIT_TAGS | MSF_AUTOMATIC_TAGS));
int r_value = 0;
if(expr->tag.tag_mode == TM_DEFAULT) {

View File

@ -5,7 +5,7 @@ BEGIN
OneType ::= SEQUENCE {
one-1 INTEGER,
one-2 [1] EXPLICIT BOOLEAN,
one-2 [1] IMPLICIT BOOLEAN,
one-3 SEQUENCE {
alpha [0] IMPLICIT INTEGER,
beta [1] IMPLICIT INTEGER,

20
tests/86-atags-OK.asn1 Normal file
View File

@ -0,0 +1,20 @@
-- OK: Everything is fine
-- iso.org.dod.internet.private.enterprise (1.3.6.1.4.1)
-- .spelio.software.asn1c.test (9363.1.5.1)
-- .86
ModuleAutoTags
{ iso org(3) dod(6) internet (1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 86 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
A ::= SEQUENCE { a INTEGER }
B ::= SEQUENCE { a [0] INTEGER }
C ::= SEQUENCE { a [0] IMPLICIT INTEGER }
D ::= SEQUENCE { a [0] EXPLICIT INTEGER }
E ::= SEQUENCE { a [0] CHOICE { b INTEGER } }
END

View File

@ -0,0 +1,28 @@
ModuleAutoTags { iso org(3) dod(6) internet(1) private(4) enterprise(1)
spelio(9363) software(1) asn1c(5) test(1) 86 }
DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
A ::= SEQUENCE {
a [0] IMPLICIT INTEGER
}
B ::= SEQUENCE {
a [0] IMPLICIT INTEGER
}
C ::= SEQUENCE {
a [0] IMPLICIT INTEGER
}
D ::= SEQUENCE {
a [0] EXPLICIT INTEGER
}
E ::= SEQUENCE {
a [0] EXPLICIT CHOICE {
b [0] IMPLICIT INTEGER
}
}
END