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
adeec886
Commit
adeec886
authored
Jul 15, 2022
by
Pau Espin Pedrol
Committed by
Mouse
Jul 15, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
aper: Drop unsued old put/get_nsnnwn implementation
the code is in a version control system for this kind of reasons.
parent
d5e1eb39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
52 deletions
+0
-52
skeletons/aper_support.c
skeletons/aper_support.c
+0
-52
No files found.
skeletons/aper_support.c
View file @
adeec886
...
@@ -65,7 +65,6 @@ aper_get_nslength(asn_per_data_t *pd) {
...
@@ -65,7 +65,6 @@ aper_get_nslength(asn_per_data_t *pd) {
}
}
}
}
#if !defined(USE_OLDER_APER_NSNNWN)
ssize_t
ssize_t
aper_get_nsnnwn
(
asn_per_data_t
*
pd
,
int
range
)
{
aper_get_nsnnwn
(
asn_per_data_t
*
pd
,
int
range
)
{
ssize_t
value
;
ssize_t
value
;
...
@@ -117,31 +116,6 @@ aper_get_nsnnwn(asn_per_data_t *pd, int range) {
...
@@ -117,31 +116,6 @@ aper_get_nsnnwn(asn_per_data_t *pd, int range) {
value
=
per_get_few_bits
(
pd
,
8
*
bytes
);
value
=
per_get_few_bits
(
pd
,
8
*
bytes
);
return
value
;
return
value
;
}
}
#else
/* old APER codec */
ssize_t
aper_get_nsnnwn
(
asn_per_data_t
*
pd
,
int
dummy_range
)
{
ssize_t
value
;
ASN_DEBUG
(
"Get the normally small non-negative whole number APER"
);
value
=
per_get_few_bits
(
pd
,
7
);
if
(
value
&
64
)
{
/* implicit (value < 0) */
value
&=
63
;
value
<<=
2
;
value
|=
per_get_few_bits
(
pd
,
2
);
if
(
value
&
128
)
/* implicit (value < 0) */
return
-
1
;
if
(
value
==
0
)
return
0
;
if
(
value
>=
3
)
return
-
1
;
value
=
per_get_few_bits
(
pd
,
8
*
value
);
return
value
;
}
return
value
;
}
#endif
/* don't use old APER */
int
aper_put_align
(
asn_per_outp_t
*
po
)
{
int
aper_put_align
(
asn_per_outp_t
*
po
)
{
...
@@ -206,7 +180,6 @@ aper_put_nslength(asn_per_outp_t *po, size_t length) {
...
@@ -206,7 +180,6 @@ aper_put_nslength(asn_per_outp_t *po, size_t length) {
return
0
;
return
0
;
}
}
#if !defined(USE_OLDER_APER_NSNNWN)
int
int
aper_put_nsnnwn
(
asn_per_outp_t
*
po
,
int
range
,
int
number
)
{
aper_put_nsnnwn
(
asn_per_outp_t
*
po
,
int
range
,
int
number
)
{
int
bytes
;
int
bytes
;
...
@@ -256,28 +229,3 @@ aper_put_nsnnwn(asn_per_outp_t *po, int range, int number) {
...
@@ -256,28 +229,3 @@ aper_put_nsnnwn(asn_per_outp_t *po, int range, int number) {
*/
*/
return
per_put_few_bits
(
po
,
number
,
8
*
bytes
);
return
per_put_few_bits
(
po
,
number
,
8
*
bytes
);
}
}
#else
/* preserve old code base in case */
int
aper_put_nsnnwn
(
asn_per_outp_t
*
po
,
int
dummy_range
,
int
n
)
{
int
bytes
;
ASN_DEBUG
(
"aper_put_nsnnwn"
);
if
(
n
<=
63
)
{
if
(
n
<
0
)
return
-
1
;
return
per_put_few_bits
(
po
,
n
,
7
);
}
if
(
n
<
256
)
bytes
=
1
;
else
if
(
n
<
65536
)
bytes
=
2
;
else
if
(
n
<
256
*
65536
)
bytes
=
3
;
else
return
-
1
;
/* This is not a "normally small" value */
if
(
per_put_few_bits
(
po
,
bytes
,
8
))
return
-
1
;
return
per_put_few_bits
(
po
,
n
,
8
*
bytes
);
}
#endif
/* which aper_put_nsnnwn() */
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