Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
asn1c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
asn1c
Commits
c74ea225
Commit
c74ea225
authored
Aug 25, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better ValueSet printing
parent
d35c8b56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
4 deletions
+19
-4
ChangeLog
ChangeLog
+1
-0
libasn1print/asn1print.c
libasn1print/asn1print.c
+17
-3
tests/07-int-OK.asn1.-EF
tests/07-int-OK.asn1.-EF
+1
-1
No files found.
ChangeLog
View file @
c74ea225
...
...
@@ -5,6 +5,7 @@
PER visibility rules for actual constraints checking code generator.
* Indirect references in constraints resolver code fixed.
* Avoided compilation warning on gcc 3.3.3 systems.
* Better ValueSet printing.
0.9.1: 2004-Aug-23
...
...
libasn1print/asn1print.c
View file @
c74ea225
...
...
@@ -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
&&
tc
->
meta_type
!=
AMT_VALUESET
&&
tc
->
expr_type
!=
A1TC_EXTENSIBLE
)
{
if
(
level
)
{
if
(
tc
->
Identifier
)
...
...
@@ -503,14 +504,27 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
asn1print_ref
(
tc
->
reference
,
flags
);
}
if
(
tc
->
meta_type
==
AMT_VALUESET
)
printf
(
" ::="
);
/*
* 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 */
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
)
{
/*
...
...
@@ -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
"
);
INDENT
(
"}"
);
}
...
...
tests/07-int-OK.asn1.-EF
View file @
c74ea225
...
...
@@ -9,7 +9,7 @@ int123456 INTEGER ::= 123456
Interval ::= INTEGER (1..123456)
SameInterval
::= INTEGER
SameInterval
INTEGER ::= { }
Reason ::= INTEGER {
no-reason(0),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment