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
8354f34b
Commit
8354f34b
authored
Aug 10, 2017
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
find terminal type for iocs
parent
cd2f48eb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
libasn1compiler/asn1c_ioc.c
libasn1compiler/asn1c_ioc.c
+14
-4
No files found.
libasn1compiler/asn1c_ioc.c
View file @
8354f34b
...
...
@@ -4,6 +4,8 @@
#include "asn1c_misc.h"
#include <asn1fix_export.h>
#define MKID(expr) asn1c_make_identifier(0, (expr), 0)
/*
* Given the table constraint or component relation constraint
* ({ObjectSetName}{...}) returns "ObjectSetName" as a reference.
...
...
@@ -51,6 +53,13 @@ asn1c_get_ioc_table(arg_t *arg) {
asn1c_ioc_table_and_objset_t
safe_ioc_tao
=
{
0
,
0
,
0
};
asn1c_ioc_table_and_objset_t
failed_ioc_tao
=
{
0
,
0
,
1
};
if
(
expr
->
lhs_params
)
{
if
(
0
)
WARNING
(
"Can not process Information Object Set on a parameterized type %s"
,
MKID
(
expr
));
return
safe_ioc_tao
;
}
TQ_FOR
(
memb
,
&
(
expr
->
members
),
next
)
{
const
asn1p_ref_t
*
tmpref
=
asn1c_get_information_object_set_reference_from_constraint
(
...
...
@@ -80,8 +89,6 @@ asn1c_get_ioc_table(arg_t *arg) {
return
asn1c_get_ioc_table_from_objset
(
arg
,
objset_ref
,
objset
);
}
#define MKID(expr) asn1c_make_identifier(0, (expr), 0)
static
int
emit_ioc_value
(
arg_t
*
arg
,
struct
asn1p_ioc_cell_s
*
cell
)
{
...
...
@@ -89,10 +96,13 @@ emit_ioc_value(arg_t *arg, struct asn1p_ioc_cell_s *cell) {
const
char
*
prim_type
=
NULL
;
int
primitive_representation
=
0
;
switch
(
cell
->
value
->
expr_type
)
{
asn1p_expr_t
*
cv_type
=
asn1f_find_terminal_type_ex
(
arg
->
asn
,
cell
->
value
);
switch
(
cv_type
->
expr_type
)
{
case
ASN_BASIC_INTEGER
:
case
ASN_BASIC_ENUMERATED
:
switch
(
asn1c_type_fits_long
(
arg
,
cell
->
value
))
{
switch
(
asn1c_type_fits_long
(
arg
,
cell
->
value
/* sic */
))
{
case
FL_NOTFIT
:
GEN_INCLUDE_STD
(
"INTEGER"
);
prim_type
=
"INTEGER_t"
;
...
...
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