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
4b5dae3d
Commit
4b5dae3d
authored
Oct 09, 2006
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
diffs
parent
725883b2
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
100 additions
and
100 deletions
+100
-100
libasn1compiler/asn1c_C.c
libasn1compiler/asn1c_C.c
+8
-8
tests/50-constraint-OK.asn1.-Pgen-PER
tests/50-constraint-OK.asn1.-Pgen-PER
+55
-55
tests/90-cond-int-type-OK.asn1.-Pgen-PER
tests/90-cond-int-type-OK.asn1.-Pgen-PER
+30
-30
tests/95-choice-per-order-OK.asn1.-Pgen-PER
tests/95-choice-per-order-OK.asn1.-Pgen-PER
+7
-7
No files found.
libasn1compiler/asn1c_C.c
View file @
4b5dae3d
...
...
@@ -41,7 +41,7 @@ static int expr_break_recursion(arg_t *arg, asn1p_expr_t *expr);
static
int
expr_as_xmlvaluelist
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
);
static
int
expr_elements_count
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
);
static
int
emit_single_member_PER_constraint
(
arg_t
*
arg
,
asn1cnst_range_t
*
range
,
int
juscountvalues
,
char
*
type
);
static
int
emit_member_PER_constraints
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
);
static
int
emit_member_PER_constraints
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
const
char
*
pfx
);
static
int
emit_member_table
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
);
static
int
emit_tag2member_map
(
arg_t
*
arg
,
tag2el_t
*
tag2el
,
int
tag2el_count
,
const
char
*
opt_modifier
);
static
int
emit_include_dependencies
(
arg_t
*
arg
);
...
...
@@ -1888,7 +1888,7 @@ emit_single_member_PER_constraint(arg_t *arg, asn1cnst_range_t *range, int alpha
}
static
int
emit_member_PER_constraints
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
)
{
emit_member_PER_constraints
(
arg_t
*
arg
,
asn1p_expr_t
*
expr
,
const
char
*
pfx
)
{
int
save_target
=
arg
->
target
->
target
;
asn1cnst_range_t
*
range
;
asn1p_expr_type_e
etype
;
...
...
@@ -1906,8 +1906,8 @@ emit_member_PER_constraints(arg_t *arg, asn1p_expr_t *expr) {
REDIR
(
OT_CTDEFS
);
OUT
(
"static asn_per_constraints_t "
"asn_PER_%s_constr_%d = {
\n
"
,
MKID
(
expr
),
expr
->
_type_unique_index
);
"asn_PER_%s_
%s_
constr_%d = {
\n
"
,
pfx
,
MKID
(
expr
),
expr
->
_type_unique_index
);
etype
=
expr_get_type
(
arg
,
expr
);
...
...
@@ -2196,7 +2196,7 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
if
(
expr
->
constraints
||
expr
->
expr_type
==
ASN_BASIC_ENUMERATED
||
expr
->
expr_type
==
ASN_CONSTR_CHOICE
)
{
OUT
(
"&asn_PER_%s_constr_%d,
\n
"
,
OUT
(
"&asn_PER_
memb_
%s_constr_%d,
\n
"
,
MKID
(
expr
),
expr
->
_type_unique_index
);
}
else
{
...
...
@@ -2249,7 +2249,7 @@ emit_member_table(arg_t *arg, asn1p_expr_t *expr) {
OUT
(
"}
\n
"
);
OUT
(
"
\n
"
);
if
(
emit_member_PER_constraints
(
arg
,
expr
))
if
(
emit_member_PER_constraints
(
arg
,
expr
,
"memb"
))
return
-
1
;
REDIR
(
save_target
);
...
...
@@ -2268,7 +2268,7 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
terminal
=
asn1f_find_terminal_type_ex
(
arg
->
asn
,
expr
);
if
(
emit_member_PER_constraints
(
arg
,
expr
))
if
(
emit_member_PER_constraints
(
arg
,
expr
,
"type"
))
return
-
1
;
if
(
HIDE_INNER_DEFS
)
...
...
@@ -2365,7 +2365,7 @@ emit_type_DEF(arg_t *arg, asn1p_expr_t *expr, enum tvm_compat tv_mode, int tags_
if
(
expr
->
constraints
||
expr
->
expr_type
==
ASN_BASIC_ENUMERATED
||
expr
->
expr_type
==
ASN_CONSTR_CHOICE
)
{
OUT
(
"&asn_PER_%s_constr_%d,
\n
"
,
OUT
(
"&asn_PER_
type_
%s_constr_%d,
\n
"
,
p
,
expr
->
_type_unique_index
);
}
else
{
OUT
(
"0,
\t
/* No PER visible constraints */
\n
"
);
...
...
tests/50-constraint-OK.asn1.-Pgen-PER
View file @
4b5dae3d
This diff is collapsed.
Click to expand it.
tests/90-cond-int-type-OK.asn1.-Pgen-PER
View file @
4b5dae3d
This diff is collapsed.
Click to expand it.
tests/95-choice-per-order-OK.asn1.-Pgen-PER
View file @
4b5dae3d
...
...
@@ -58,12 +58,12 @@ extern asn_TYPE_descriptor_t asn_DEF_Choice;
/*** <<< CTDEFS [Choice] >>> ***/
static asn_per_constraints_t asn_PER_ch_constr_4 = {
static asn_per_constraints_t asn_PER_
type_
ch_constr_4 = {
{ APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
};
static asn_per_constraints_t asn_PER_Choice_constr_1 = {
static asn_per_constraints_t asn_PER_
type_
Choice_constr_1 = {
{ APC_CONSTRAINED | APC_EXTENSIBLE, 2, 2, 0, 2 } /* (0..2,...) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
...
...
@@ -124,7 +124,7 @@ asn_TYPE_descriptor_t asn_DEF_ch_4 = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
&asn_PER_ch_constr_4,
&asn_PER_
type_
ch_constr_4,
asn_MBR_ch_4,
2, /* Elements count */
&asn_SPC_ch_specs_4 /* Additional specs */
...
...
@@ -154,7 +154,7 @@ static asn_TYPE_member_t asn_MBR_Choice_1[] = {
.tag_mode = 0,
.type = &asn_DEF_ch_4,
.memb_constraints = 0, /* Defer constraints checking to the member type */
.per_constraints = &asn_PER_ch_constr_4,
.per_constraints = &asn_PER_
memb_
ch_constr_4,
.default_value = 0,
.name = "ch"
},
...
...
@@ -203,7 +203,7 @@ asn_TYPE_descriptor_t asn_DEF_Choice = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
&asn_PER_Choice_constr_1,
&asn_PER_
type_
Choice_constr_1,
asn_MBR_Choice_1,
4, /* Elements count */
&asn_SPC_Choice_specs_1 /* Additional specs */
...
...
@@ -243,7 +243,7 @@ extern asn_TYPE_descriptor_t asn_DEF_Choice2;
/*** <<< CTDEFS [Choice2] >>> ***/
static asn_per_constraints_t asn_PER_Choice2_constr_1 = {
static asn_per_constraints_t asn_PER_
type_
Choice2_constr_1 = {
{ APC_CONSTRAINED, 1, 1, 0, 1 } /* (0..1) */,
{ APC_UNCONSTRAINED, -1, -1, 0, 0 },
0, 0 /* No PER value map */
...
...
@@ -302,7 +302,7 @@ asn_TYPE_descriptor_t asn_DEF_Choice2 = {
0, /* No effective tags (count) */
0, /* No tags (pointer) */
0, /* No tags (count) */
&asn_PER_Choice2_constr_1,
&asn_PER_
type_
Choice2_constr_1,
asn_MBR_Choice2_1,
2, /* Elements count */
&asn_SPC_Choice2_specs_1 /* Additional specs */
...
...
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