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
112d69e0
Commit
112d69e0
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
1. Finer support for BOOLEAN
2. Small refactoring
parent
72894034
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libasn1print/asn1print.c
+13
-10
13 additions, 10 deletions
libasn1print/asn1print.c
with
13 additions
and
10 deletions
libasn1print/asn1print.c
+
13
−
10
View file @
112d69e0
...
@@ -49,6 +49,12 @@ asn1print(asn1p_t *asn, enum asn1print_flags flags) {
...
@@ -49,6 +49,12 @@ asn1print(asn1p_t *asn, enum asn1print_flags flags) {
asn1print_module
(
asn
,
mod
,
flags
);
asn1print_module
(
asn
,
mod
,
flags
);
}
}
if
(
flags
&
APF_PRINT_XML_DTD
)
{
/* Values for BOOLEAN */
printf
(
"<!ELEMENT true EMPTY>
\n
"
);
printf
(
"<!ELEMENT false EMPTY>
\n
"
);
}
return
0
;
return
0
;
}
}
...
@@ -670,15 +676,6 @@ asn1print_expr_dtd(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, enum a
...
@@ -670,15 +676,6 @@ asn1print_expr_dtd(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, enum a
if
(
!
expr
->
Identifier
)
return
0
;
if
(
!
expr
->
Identifier
)
return
0
;
if
(
expr
->
expr_type
==
ASN_CONSTR_CHOICE
||
expr
->
expr_type
==
ASN_CONSTR_SEQUENCE_OF
||
expr
->
expr_type
==
ASN_CONSTR_SET_OF
||
expr
->
expr_type
==
ASN_CONSTR_SET
||
expr
->
expr_type
==
ASN_BASIC_INTEGER
||
expr
->
expr_type
==
ASN_BASIC_ENUMERATED
)
{
expr_unordered
=
1
;
}
if
(
flags
&
APF_LINE_COMMENTS
)
if
(
flags
&
APF_LINE_COMMENTS
)
INDENT
(
"<!-- #line %d -->
\n
"
,
expr
->
_lineno
);
INDENT
(
"<!-- #line %d -->
\n
"
,
expr
->
_lineno
);
INDENT
(
"<!ELEMENT %s"
,
expr
->
Identifier
);
INDENT
(
"<!ELEMENT %s"
,
expr
->
Identifier
);
...
@@ -693,6 +690,12 @@ asn1print_expr_dtd(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, enum a
...
@@ -693,6 +690,12 @@ asn1print_expr_dtd(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, enum a
dont_involve_children
=
1
;
dont_involve_children
=
1
;
}
}
if
((
expr
->
expr_type
&
ASN_CONSTR_MASK
)
||
expr
->
expr_type
==
ASN_BASIC_INTEGER
||
expr
->
expr_type
==
ASN_BASIC_ENUMERATED
)
{
expr_unordered
=
1
;
}
if
(
TQ_FIRST
(
&
expr
->
members
))
{
if
(
TQ_FIRST
(
&
expr
->
members
))
{
int
extensible
=
0
;
int
extensible
=
0
;
printf
(
" ("
);
printf
(
" ("
);
...
@@ -738,7 +741,7 @@ asn1print_expr_dtd(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, enum a
...
@@ -738,7 +741,7 @@ asn1print_expr_dtd(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *expr, enum a
}
else
switch
(
expr
->
expr_type
)
{
}
else
switch
(
expr
->
expr_type
)
{
case
ASN_BASIC_BOOLEAN
:
case
ASN_BASIC_BOOLEAN
:
printf
(
"(true|false)"
);
printf
(
"
(true|false)"
);
break
;
break
;
case
ASN_CONSTR_CHOICE
:
case
ASN_CONSTR_CHOICE
:
case
ASN_CONSTR_SET
:
case
ASN_CONSTR_SET
:
...
...
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