Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asn1c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
oai
asn1c
Commits
c74ea225
Commit
c74ea225
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
better ValueSet printing
parent
d35c8b56
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
libasn1print/asn1print.c
+17
-3
17 additions, 3 deletions
libasn1print/asn1print.c
tests/07-int-OK.asn1.-EF
+1
-1
1 addition, 1 deletion
tests/07-int-OK.asn1.-EF
with
19 additions
and
4 deletions
ChangeLog
+
1
−
0
View file @
c74ea225
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
PER visibility rules for actual constraints checking code generator.
PER visibility rules for actual constraints checking code generator.
* Indirect references in constraints resolver code fixed.
* Indirect references in constraints resolver code fixed.
* Avoided compilation warning on gcc 3.3.3 systems.
* Avoided compilation warning on gcc 3.3.3 systems.
* Better ValueSet printing.
0.9.1: 2004-Aug-23
0.9.1: 2004-Aug-23
...
...
This diff is collapsed.
Click to expand it.
libasn1print/asn1print.c
+
17
−
3
View file @
c74ea225
...
@@ -442,6 +442,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
...
@@ -442,6 +442,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
}
}
if
(
tc
->
meta_type
!=
AMT_VALUE
if
(
tc
->
meta_type
!=
AMT_VALUE
&&
tc
->
meta_type
!=
AMT_VALUESET
&&
tc
->
expr_type
!=
A1TC_EXTENSIBLE
)
{
&&
tc
->
expr_type
!=
A1TC_EXTENSIBLE
)
{
if
(
level
)
{
if
(
level
)
{
if
(
tc
->
Identifier
)
if
(
tc
->
Identifier
)
...
@@ -503,14 +504,27 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
...
@@ -503,14 +504,27 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
asn1print_ref
(
tc
->
reference
,
flags
);
asn1print_ref
(
tc
->
reference
,
flags
);
}
}
if
(
tc
->
meta_type
==
AMT_VALUESET
)
printf
(
" ::="
);
/*
/*
* Display the descendants (children) of the current type.
* Display the descendants (children) of the current type.
*/
*/
if
(
TQ_FIRST
(
&
(
tc
->
members
)))
{
if
(
TQ_FIRST
(
&
(
tc
->
members
))
||
(
tc
->
expr_type
&
ASN_CONSTR_MASK
)
||
tc
->
meta_type
==
AMT_VALUESET
||
tc
->
meta_type
==
AMT_OBJECT
||
tc
->
meta_type
==
AMT_OBJECTSET
)
{
asn1p_expr_t
*
se
;
/* SubExpression */
asn1p_expr_t
*
se
;
/* SubExpression */
int
put_braces
=
!
SEQ_OF
;
/* Don't need 'em, if SET OF... */
int
put_braces
=
!
SEQ_OF
;
/* Don't need 'em, if SET OF... */
if
(
put_braces
)
printf
(
" {
\n
"
);
if
(
put_braces
)
{
printf
(
" {"
);
if
(
TQ_FIRST
(
&
tc
->
members
))
printf
(
"
\n
"
);
else
printf
(
" }"
);
}
TQ_FOR
(
se
,
&
(
tc
->
members
),
next
)
{
TQ_FOR
(
se
,
&
(
tc
->
members
),
next
)
{
/*
/*
...
@@ -528,7 +542,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
...
@@ -528,7 +542,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
}
}
}
}
if
(
put_braces
)
{
if
(
put_braces
&&
TQ_FIRST
(
&
tc
->
members
)
)
{
printf
(
"
\n
"
);
printf
(
"
\n
"
);
INDENT
(
"}"
);
INDENT
(
"}"
);
}
}
...
...
This diff is collapsed.
Click to expand it.
tests/07-int-OK.asn1.-EF
+
1
−
1
View file @
c74ea225
...
@@ -9,7 +9,7 @@ int123456 INTEGER ::= 123456
...
@@ -9,7 +9,7 @@ int123456 INTEGER ::= 123456
Interval ::= INTEGER (1..123456)
Interval ::= INTEGER (1..123456)
SameInterval
::=
INTEGER
SameInterval INTEGER
::= { }
Reason ::= INTEGER {
Reason ::= INTEGER {
no-reason(0),
no-reason(0),
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment