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
Snippets
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
qwebaby3
asn1c
Commits
fd151ce5
Commit
fd151ce5
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
pretty-printing COMPONENTS OF
parent
ffa71587
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libasn1print/asn1print.c
+12
-7
12 additions, 7 deletions
libasn1print/asn1print.c
with
12 additions
and
7 deletions
libasn1print/asn1print.c
+
12
−
7
View file @
fd151ce5
...
...
@@ -456,6 +456,10 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
asn1print_value
(
tc
->
value
,
flags
);
}
break
;
case
A1TC_COMPONENTS_OF
:
SEQ_OF
=
1
;
/* Equivalent to SET OF for printint purposes */
printf
(
" COMPONENTS OF"
);
break
;
case
A1TC_REFERENCE
:
case
A1TC_UNIVERVAL
:
case
A1TC_PARAMETRIZED
:
...
...
@@ -497,14 +501,13 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
*/
if
(
TQ_FIRST
(
&
(
tc
->
members
)))
{
asn1p_expr_t
*
se
;
/* SubExpression */
int
put_braces
=
!
SEQ_OF
;
/* Don't need 'em, if SET OF... */
if
(
!
SEQ_OF
||
TQ_FIRST
(
&
(
tc
->
members
))
->
expr_type
&
ASN_CONSTR_MASK
)
printf
(
" {
\n
"
);
if
(
put_braces
)
printf
(
" {
\n
"
);
TQ_FOR
(
se
,
&
(
tc
->
members
),
next
)
{
/*
* Print the expression as it were stand-alone type.
* Print the expression as it were
a
stand-alone type.
*/
asn1print_expr
(
asn
,
mod
,
se
,
flags
,
level
+
4
);
switch
(
se
->
marker
)
{
...
...
@@ -518,8 +521,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
}
}
if
(
!
SEQ_OF
||
TQ_FIRST
(
&
(
tc
->
members
))
->
expr_type
&
ASN_CONSTR_MASK
)
{
if
(
put_braces
)
{
printf
(
"
\n
"
);
INDENT
(
"}"
);
}
...
...
@@ -548,6 +550,9 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
printf
(
")"
);
}
/*
* The following section exists entirely for debugging only.
*/
if
(
flags
&
APF_DEBUG_CONSTRAINTS
&&
tc
->
expr_type
!=
A1TC_EXTENSIBLE
)
{
asn1p_expr_t
*
top_parent
;
...
...
@@ -557,7 +562,7 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri
asn1print_constraint
(
tc
->
combined_constraints
,
flags
);
}
top_parent
=
asn1f_find_terminal_type_ex
(
asn
,
mod
,
tc
,
NULL
);
top_parent
=
asn1f_find_terminal_type_ex
(
asn
,
mod
,
tc
);
if
(
top_parent
)
{
printf
(
"
\n
-- PER-visible constraints (%s): "
,
top_parent
->
Identifier
);
...
...
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