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
1c5351a4
Commit
1c5351a4
authored
Dec 11, 2023
by
v0-e
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jer: constr_ prettier formatting
parent
0c22536b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
8 deletions
+12
-8
skeletons/constr_CHOICE_jer.c
skeletons/constr_CHOICE_jer.c
+5
-1
skeletons/constr_SEQUENCE_OF_jer.c
skeletons/constr_SEQUENCE_OF_jer.c
+2
-1
skeletons/constr_SEQUENCE_jer.c
skeletons/constr_SEQUENCE_jer.c
+3
-3
skeletons/constr_SET_OF_jer.c
skeletons/constr_SET_OF_jer.c
+2
-3
No files found.
skeletons/constr_CHOICE_jer.c
View file @
1c5351a4
...
...
@@ -270,6 +270,7 @@ CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
(
const
asn_CHOICE_specifics_t
*
)
td
->
specifics
;
asn_enc_rval_t
er
=
{
0
,
0
,
0
};
unsigned
present
=
0
;
int
xcan
=
0
;
if
(
!
sptr
)
ASN__ENCODE_FAILED
;
...
...
@@ -298,13 +299,16 @@ CHOICE_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
er
.
encoded
=
0
;
ASN__CALLBACK3
(
"{
\n\"
"
,
3
,
mname
,
mlen
,
"
\"
: "
,
2
);
ASN__CALLBACK
(
"{"
,
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
+
1
);
ASN__CALLBACK3
(
"
\"
"
,
1
,
mname
,
mlen
,
"
\"
: "
,
3
);
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
flags
,
cb
,
app_key
);
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
er
.
encoded
+=
tmper
.
encoded
;
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK
(
"}"
,
1
);
}
...
...
skeletons/constr_SEQUENCE_OF_jer.c
View file @
1c5351a4
...
...
@@ -28,6 +28,7 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
void
*
memb_ptr
=
list
->
array
[
i
];
if
(
!
memb_ptr
)
continue
;
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
+
1
);
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
1
,
flags
,
cb
,
app_key
);
if
(
tmper
.
encoded
==
-
1
)
return
tmper
;
...
...
@@ -44,7 +45,7 @@ SEQUENCE_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr,
}
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK
(
"]"
,
1
);
ASN__ENCODED_OK
(
er
);
...
...
skeletons/constr_SEQUENCE_jer.c
View file @
1c5351a4
...
...
@@ -308,7 +308,7 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
er
.
encoded
=
0
;
int
bAddComma
=
0
;
ASN__CALLBACK
(
"{
\n
"
,
2
);
ASN__CALLBACK
(
"{
"
,
1
);
for
(
edx
=
0
;
edx
<
td
->
elements_count
;
edx
++
)
{
asn_enc_rval_t
tmper
=
{
0
,
0
,
0
};
asn_TYPE_member_t
*
elm
=
&
td
->
elements
[
edx
];
...
...
@@ -344,7 +344,7 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
bAddComma
=
0
;
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
+
1
);
ASN__CALLBACK3
(
"
\"
"
,
1
,
mname
,
mlen
,
"
\"
: "
,
3
);
/* Print the member itself */
...
...
@@ -360,9 +360,9 @@ asn_enc_rval_t SEQUENCE_encode_jer(const asn_TYPE_descriptor_t *td, const void *
bAddComma
=
1
;
}
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK
(
"}"
,
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
ASN__ENCODED_OK
(
er
);
cb_failed:
...
...
skeletons/constr_SET_OF_jer.c
View file @
1c5351a4
...
...
@@ -256,7 +256,6 @@ SET_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
encs_count
++
;
}
if
(
!
xcan
&&
specs
->
as_XMLValueList
==
1
)
ASN__TEXT_INDENT
(
1
,
ilevel
+
1
);
tmper
=
elm
->
type
->
op
->
jer_encoder
(
elm
->
type
,
memb_ptr
,
ilevel
+
(
specs
->
as_XMLValueList
!=
2
),
...
...
@@ -273,7 +272,7 @@ SET_OF_encode_jer(const asn_TYPE_descriptor_t *td, const void *sptr, int ilevel,
}
}
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
-
1
);
if
(
!
xcan
)
ASN__TEXT_INDENT
(
1
,
ilevel
);
ASN__CALLBACK
(
"]"
,
1
);
if
(
encs
)
{
...
...
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