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
81d57419
Commit
81d57419
authored
Mar 24, 2005
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
printing charsdefn values
parent
d1b4ac38
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
libasn1fix/asn1fix_misc.c
libasn1fix/asn1fix_misc.c
+16
-0
No files found.
libasn1fix/asn1fix_misc.c
View file @
81d57419
...
...
@@ -60,6 +60,22 @@ asn1f_printable_value(asn1p_value_t *v) {
case
ATV_MAX
:
return
"MAX"
;
case
ATV_FALSE
:
return
"FALSE"
;
case
ATV_TRUE
:
return
"TRUE"
;
case
ATV_TUPLE
:
ret
=
snprintf
(
buf
,
sizeof
(
buf
),
"{%d, %d}"
,
(
int
)(
v
->
value
.
v_integer
>>
4
),
(
int
)(
v
->
value
.
v_integer
&
0xff
));
if
(
ret
>=
(
ssize_t
)
sizeof
(
buf
))
memcpy
(
buf
+
sizeof
(
buf
)
-
4
,
"..."
,
4
);
return
buf
;
case
ATV_QUADRUPLE
:
ret
=
snprintf
(
buf
,
sizeof
(
buf
),
"{%d, %d, %d, %d}"
,
(
int
)((
v
->
value
.
v_integer
>>
24
)
&
0xff
),
(
int
)((
v
->
value
.
v_integer
>>
16
)
&
0xff
),
(
int
)((
v
->
value
.
v_integer
>>
8
)
&
0xff
),
(
int
)(
v
->
value
.
v_integer
&
0xff
));
if
(
ret
>=
(
ssize_t
)
sizeof
(
buf
))
memcpy
(
buf
+
sizeof
(
buf
)
-
4
,
"..."
,
4
);
return
buf
;
case
ATV_STRING
:
case
ATV_UNPARSED
:
/* Buffer is guaranteed to be null-terminated */
...
...
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