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
0320d877
Commit
0320d877
authored
Jun 02, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
marked parametrized members
parent
4cd58bd2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
30 deletions
+50
-30
ChangeLog
ChangeLog
+1
-1
asn1c/enber.c
asn1c/enber.c
+3
-3
libasn1fix/asn1fix_param.c
libasn1fix/asn1fix_param.c
+46
-26
No files found.
ChangeLog
View file @
0320d877
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* Compiler now checks 64-bit overflows in constraints range handling
* Compiler now checks 64-bit overflows in constraints range handling
code. No effect on the code produced by the compiler.
code. No effect on the code produced by the compiler.
* Compiler support for tagged parametrized members.
* Compiler support for tagged
and marked
parametrized members.
* Empty tags to element map avoided.
* Empty tags to element map avoided.
0.9.14: 2005-Apr-29
0.9.14: 2005-Apr-29
...
...
asn1c/enber.c
View file @
0320d877
...
@@ -377,9 +377,9 @@ process_line(const char *fname, char *line, int lineno) {
...
@@ -377,9 +377,9 @@ process_line(const char *fname, char *line, int lineno) {
if
(
len
!=
tlv_len
)
{
if
(
len
!=
tlv_len
)
{
if
(
no_validation
)
fprintf
(
stderr
,
"Warning: "
);
if
(
no_validation
)
fprintf
(
stderr
,
"Warning: "
);
fprintf
(
stderr
,
fprintf
(
stderr
,
"%s: Could not encode value of %d chars "
"%s: Could not encode value of %
l
d chars "
"at line %d in %d bytes
\n
"
,
"at line %d in %
l
d bytes
\n
"
,
fname
,
len
,
lineno
,
tlv_len
);
fname
,
(
long
)
len
,
lineno
,
(
long
)
tlv_len
);
if
(
!
no_validation
)
exit
(
EX_DATAERR
);
if
(
!
no_validation
)
exit
(
EX_DATAERR
);
}
}
}
}
...
...
libasn1fix/asn1fix_param.c
View file @
0320d877
...
@@ -59,33 +59,53 @@ asn1f_fix_parametrized_assignment(arg_t *arg) {
...
@@ -59,33 +59,53 @@ asn1f_fix_parametrized_assignment(arg_t *arg) {
}
}
#define SUBSTITUTE(to, from) do { \
#define SUBSTITUTE(to, from) do { \
asn1p_expr_t tmp, *__v; \
asn1p_expr_t tmp, *__v; \
if((to)->tag.tag_class \
if((to)->tag.tag_class \
&& (from)->tag.tag_class) { \
&& (from)->tag.tag_class) { \
FATAL("Layered tagging " \
FATAL("Layered tagging in parametrization " \
"in parametrization " \
"is not yet supported, " \
"is not yet supported, " \
"contact asn1c author for assistance with"); \
"contact asn1c author for"); \
return -1; \
return -1; \
} \
/* This code shall not be invoked too early */
\
assert((to)->combined_constraints == NULL); \
assert((from)->combined_constraints == NULL); \
/* Copy stuff, and merge some parameters */
\
tmp = *(to); \
*(to) = *(from); \
TQ_MOVE(&(to)->members, &(from)->members); \
*(from) = tmp; \
(to)->next = tmp.next; \
(to)->parent_expr = tmp.parent_expr; \
assert((to)->marker.flags == EM_NOMARK); \
(to)->marker = tmp.marker; \
if(tmp.tag.tag_class) \
(to)->tag = tmp.tag; \
if(tmp.constraints) { \
if((to)->constraints) { \
asn1p_constraint_t *ct; \
ct = asn1p_constraint_new( \
(to)->constraints->_lineno); \
ct->type = ACT_CA_SET; \
asn1p_constraint_insert(ct, \
(to)->constraints); \
asn1p_constraint_insert(ct, \
tmp.constraints); \
(to)->constraints = ct; \
} else { \
(to)->constraints = tmp.constraints; \
} \
} \
tmp = *(to); \
} \
*(to) = *(from); \
(from)->constraints = 0; \
TQ_MOVE(&(to)->members, &(from)->members); \
(from)->marker.default_value = 0; \
*(from) = tmp; \
memset(&((from)->next), 0, sizeof((from)->next)); \
(to)->next = tmp.next; \
memset(&((from)->members), 0, sizeof((from)->members)); \
(to)->parent_expr = tmp.parent_expr; \
asn1p_expr_free(from); \
if(tmp.tag.tag_class) \
TQ_FOR(__v, &((to)->members), next) { \
(to)->tag = tmp.tag; \
assert(__v->parent_expr == (from)); \
memset(&((from)->next), 0, \
__v->parent_expr = (to); \
sizeof((from)->next)); \
} \
memset(&((from)->members), 0, \
} while(0)
sizeof((from)->members)); \
asn1p_expr_free(from); \
TQ_FOR(__v, &((to)->members), next) { \
assert(__v->parent_expr == (from)); \
__v->parent_expr = (to); \
} \
} while(0)
static
int
static
int
asn1f_parametrize
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
asn1p_expr_t
*
ptype
)
{
asn1f_parametrize
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
asn1p_expr_t
*
ptype
)
{
...
...
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