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
1dec5805
Commit
1dec5805
authored
Mar 04, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unique index for maintaining dependencies
parent
b59d94c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
0 deletions
+27
-0
libasn1fix/asn1fix.c
libasn1fix/asn1fix.c
+27
-0
No files found.
libasn1fix/asn1fix.c
View file @
1dec5805
...
@@ -14,6 +14,7 @@ static int asn1f_fix_constructed(arg_t *arg); /* For SEQUENCE/SET/CHOICE */
...
@@ -14,6 +14,7 @@ static int asn1f_fix_constructed(arg_t *arg); /* For SEQUENCE/SET/CHOICE */
static
int
asn1f_resolve_constraints
(
arg_t
*
arg
);
/* For subtype constraints */
static
int
asn1f_resolve_constraints
(
arg_t
*
arg
);
/* For subtype constraints */
static
int
asn1f_check_constraints
(
arg_t
*
arg
);
/* For subtype constraints */
static
int
asn1f_check_constraints
(
arg_t
*
arg
);
/* For subtype constraints */
static
int
asn1f_check_duplicate
(
arg_t
*
arg
);
static
int
asn1f_check_duplicate
(
arg_t
*
arg
);
static
int
asn1f_apply_unique_index
(
arg_t
*
arg
);
arg_t
a1f_replace_me_with_proper_interface_arg
;
arg_t
a1f_replace_me_with_proper_interface_arg
;
...
@@ -274,6 +275,13 @@ asn1f_fix_module__phase_2(arg_t *arg) {
...
@@ -274,6 +275,13 @@ asn1f_fix_module__phase_2(arg_t *arg) {
ret
=
asn1f_recurse_expr
(
arg
,
asn1f_check_constraints
);
ret
=
asn1f_recurse_expr
(
arg
,
asn1f_check_constraints
);
RET2RVAL
(
ret
,
rvalue
);
RET2RVAL
(
ret
,
rvalue
);
/*
* Uniquely tag each inner type.
*/
asn1f_apply_unique_index
(
0
);
ret
=
asn1f_recurse_expr
(
arg
,
asn1f_apply_unique_index
);
RET2RVAL
(
ret
,
rvalue
);
assert
(
arg
->
expr
==
expr
);
assert
(
arg
->
expr
==
expr
);
}
}
...
@@ -429,6 +437,25 @@ asn1f_check_duplicate(arg_t *arg) {
...
@@ -429,6 +437,25 @@ asn1f_check_duplicate(arg_t *arg) {
return
0
;
return
0
;
}
}
static
int
asn1f_apply_unique_index
(
arg_t
*
arg
)
{
static
int
unique_index
;
if
(
!
arg
)
{
unique_index
=
0
;
return
0
;
}
switch
(
arg
->
expr
->
expr_type
)
{
case
ASN_BASIC_ENUMERATED
:
break
;
default:
if
(
arg
->
expr
->
expr_type
&
ASN_CONSTR_MASK
)
break
;
return
0
;
}
arg
->
expr
->
_type_unique_index
=
++
unique_index
;
return
0
;
}
/*
/*
* Print everything to stderr
* Print everything to stderr
*/
*/
...
...
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