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
d24c62de
Commit
d24c62de
authored
20 years ago
by
Lev Walkin
Browse files
Options
Downloads
Patches
Plain Diff
fixing all in module before checking constraints
parent
a13e73fe
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
libasn1fix/asn1fix.c
+20
-4
20 additions, 4 deletions
libasn1fix/asn1fix.c
with
20 additions
and
4 deletions
libasn1fix/asn1fix.c
+
20
−
4
View file @
d24c62de
...
...
@@ -12,7 +12,8 @@ static void _default_error_logger(int _severity, const char *fmt, ...);
/*
* Internal check functions.
*/
static
int
asn1f_fix_module
(
arg_t
*
arg
);
static
int
asn1f_fix_module__phase_1
(
arg_t
*
arg
);
static
int
asn1f_fix_module__phase_2
(
arg_t
*
arg
);
static
int
asn1f_fix_simple
(
arg_t
*
arg
);
/* For INTEGER/ENUMERATED */
static
int
asn1f_fix_constructed
(
arg_t
*
arg
);
/* For SEQUENCE/SET/CHOICE */
static
int
asn1f_resolve_constraints
(
arg_t
*
arg
);
/* For subtype constraints */
...
...
@@ -79,7 +80,7 @@ asn1f_process(asn1p_t *asn, enum asn1f_flags flags,
* Process each module in the list.
*/
TQ_FOR
(
arg
.
mod
,
&
(
asn
->
modules
),
mod_next
)
{
int
ret
=
asn1f_fix_module
(
&
arg
);
int
ret
=
asn1f_fix_module
__phase_1
(
&
arg
);
/*
* These lines are used for illustration purposes.
* RET2RVAL() is used everywhere else.
...
...
@@ -87,6 +88,13 @@ asn1f_process(asn1p_t *asn, enum asn1f_flags flags,
if
(
ret
==
-
1
)
fatals
++
;
if
(
ret
==
1
)
warnings
++
;
}
TQ_FOR
(
arg
.
mod
,
&
(
asn
->
modules
),
mod_next
)
{
int
ret
=
asn1f_fix_module__phase_2
(
&
arg
);
if
(
ret
==
-
1
)
fatals
++
;
if
(
ret
==
1
)
warnings
++
;
}
memset
(
&
a1f_replace_me_with_proper_interface_arg
,
0
,
sizeof
(
arg_t
));
memset
(
&
a1f_replace_me_with_proper_interface_arg
,
0
,
sizeof
(
arg_t
));
...
...
@@ -100,7 +108,7 @@ asn1f_process(asn1p_t *asn, enum asn1f_flags flags,
* Check the internals of a single module.
*/
static
int
asn1f_fix_module
(
arg_t
*
arg
)
{
asn1f_fix_module
__phase_1
(
arg_t
*
arg
)
{
asn1p_expr_t
*
expr
;
int
rvalue
=
0
;
int
ret
;
...
...
@@ -239,6 +247,15 @@ asn1f_fix_module(arg_t *arg) {
assert
(
arg
->
expr
==
expr
);
}
return
rvalue
;
}
static
int
asn1f_fix_module__phase_2
(
arg_t
*
arg
)
{
asn1p_expr_t
*
expr
;
int
rvalue
=
0
;
int
ret
;
/*
* Check semantic validity of constraints.
*/
...
...
@@ -258,7 +275,6 @@ asn1f_fix_module(arg_t *arg) {
return
rvalue
;
}
static
int
asn1f_fix_simple
(
arg_t
*
arg
)
{
int
rvalue
=
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