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
33c16ba7
Commit
33c16ba7
authored
Sep 24, 2004
by
Lev Walkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PRIdASN instead of lld
parent
11c3e170
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
23 deletions
+22
-23
libasn1compiler/asn1c_C.c
libasn1compiler/asn1c_C.c
+2
-2
libasn1compiler/asn1c_constraint.c
libasn1compiler/asn1c_constraint.c
+9
-9
libasn1fix/asn1fix_crange.c
libasn1fix/asn1fix_crange.c
+3
-3
libasn1fix/asn1fix_enum.c
libasn1fix/asn1fix_enum.c
+2
-2
libasn1fix/asn1fix_misc.c
libasn1fix/asn1fix_misc.c
+2
-2
libasn1print/asn1print.c
libasn1print/asn1print.c
+4
-5
No files found.
libasn1compiler/asn1c_C.c
View file @
33c16ba7
...
...
@@ -98,7 +98,7 @@ asn1c_lang_C_type_common_INTEGER(arg_t *arg) {
TQ_FOR
(
v
,
&
(
expr
->
members
),
next
)
{
switch
(
v
->
expr_type
)
{
case
A1TC_UNIVERVAL
:
OUT
(
"
\t
%s
\t
= %
lld
,
\n
"
,
OUT
(
"
\t
%s
\t
= %
"
PRIdASN
"
,
\n
"
,
asn1c_make_identifier
(
0
,
expr
->
Identifier
,
v
->
Identifier
,
0
),
...
...
@@ -969,7 +969,7 @@ _print_tag(arg_t *arg, struct asn1p_type_tag_s *tag) {
case
TC_NOCLASS
:
break
;
}
OUT
(
" | (%
lld
<< 2))"
,
tag
->
tag_value
);
OUT
(
" | (%
"
PRIdASN
"
<< 2))"
,
tag
->
tag_value
);
return
0
;
}
...
...
libasn1compiler/asn1c_constraint.c
View file @
33c16ba7
...
...
@@ -470,20 +470,20 @@ emit_range_comparison_code(arg_t *arg, asn1cnst_range_t *range, const char *varn
}
if
(
ignore_left
)
{
OUT
(
"%s <= %
lld"
,
varname
,
(
long
long
)
r
->
right
.
value
);
OUT
(
"%s <= %
"
PRIdASN
,
varname
,
r
->
right
.
value
);
}
else
if
(
ignore_right
)
{
OUT
(
"%s >= %
lld"
,
varname
,
(
long
long
)
r
->
left
.
value
);
OUT
(
"%s >= %
"
PRIdASN
,
varname
,
r
->
left
.
value
);
}
else
if
(
r
->
left
.
value
==
r
->
right
.
value
)
{
OUT
(
"%s == %
lld"
,
varname
,
(
long
long
)
r
->
right
.
value
);
OUT
(
"%s == %
"
PRIdASN
,
varname
,
r
->
right
.
value
);
}
else
{
OUT
(
"%s >= %
lld && %s <= %lld"
,
OUT
(
"%s >= %
"
PRIdASN
" && %s <= %"
PRIdASN
,
varname
,
(
long
long
)
r
->
left
.
value
,
r
->
left
.
value
,
varname
,
(
long
long
)
r
->
right
.
value
);
r
->
right
.
value
);
}
if
(
r
!=
range
)
OUT
(
")"
);
generated_something
=
1
;
...
...
libasn1fix/asn1fix_crange.c
View file @
33c16ba7
...
...
@@ -157,7 +157,7 @@ _edge_value(const asn1cnst_edge_t *edge) {
case
ARE_MIN
:
strcpy
(
buf
,
"MIN"
);
break
;
case
ARE_MAX
:
strcpy
(
buf
,
"MAX"
);
break
;
case
ARE_VALUE
:
snprintf
(
buf
,
sizeof
(
buf
),
"%
lld"
,
(
long
long
)
edge
->
value
);
snprintf
(
buf
,
sizeof
(
buf
),
"%
"
PRIdASN
,
edge
->
value
);
}
return
buf
;
}
...
...
@@ -280,9 +280,9 @@ static int _range_fill(asn1p_value_t *val, const asn1cnst_range_t *minmax, asn1c
switch
(
val
->
type
)
{
case
ATV_INTEGER
:
if
(
type
!=
ACT_EL_RANGE
&&
type
!=
ACT_CT_SIZE
)
{
FATAL
(
"Integer %
lld
value invalid "
FATAL
(
"Integer %
"
PRIdASN
"
value invalid "
"for %s constraint at line %d"
,
(
long
long
)
val
->
value
.
v_integer
,
val
->
value
.
v_integer
,
asn1p_constraint_type2str
(
type
),
lineno
);
return
-
1
;
}
...
...
libasn1fix/asn1fix_enum.c
View file @
33c16ba7
...
...
@@ -102,9 +102,9 @@ asn1f_fix_enum(arg_t *arg) {
*/
FATAL
(
"Enumeration %s at line %d: "
"Explicit value
\"
%s(%
lld
)
\"
"
"Explicit value
\"
%s(%
"
PRIdASN
"
)
\"
"
"is not greater "
"than previous values (max %
lld
)"
,
"than previous values (max %
"
PRIdASN
"
)"
,
expr
->
Identifier
,
ev
->
_lineno
,
ev
->
Identifier
,
...
...
libasn1fix/asn1fix_misc.c
View file @
33c16ba7
...
...
@@ -51,8 +51,8 @@ asn1f_printable_value(asn1p_value_t *v) {
memcpy
(
buf
+
sizeof
(
buf
)
-
4
,
"..."
,
4
);
return
buf
;
case
ATV_INTEGER
:
ret
=
snprintf
(
buf
,
sizeof
(
buf
),
"%
lld"
,
(
long
long
)
v
->
value
.
v_integer
);
ret
=
snprintf
(
buf
,
sizeof
(
buf
),
"%
"
PRIdASN
,
v
->
value
.
v_integer
);
if
(
ret
>=
(
ssize_t
)
sizeof
(
buf
))
memcpy
(
buf
+
sizeof
(
buf
)
-
4
,
"..."
,
4
);
return
buf
;
...
...
libasn1print/asn1print.c
View file @
33c16ba7
...
...
@@ -102,8 +102,7 @@ asn1print_oid(asn1p_oid_t *oid, enum asn1print_flags flags) {
if
(
oid
->
arcs
[
ac
].
name
)
{
printf
(
"%s"
,
oid
->
arcs
[
ac
].
name
);
if
(
oid
->
arcs
[
ac
].
number
>=
0
)
{
printf
(
"(%lld)"
,
(
long
long
)
oid
->
arcs
[
ac
].
number
);
printf
(
"(%"
PRIdASN
")"
,
oid
->
arcs
[
ac
].
number
);
}
accum
+=
strlen
(
oid
->
arcs
[
ac
].
name
);
}
else
{
...
...
@@ -151,7 +150,7 @@ asn1print_tag(asn1p_expr_t *tc, enum asn1print_flags flags) {
case
TC_CONTEXT_SPECIFIC
:
break
;
}
printf
(
"%
lld]"
,
(
long
long
)
tag
->
tag_value
);
printf
(
"%
"
PRIdASN
"]"
,
tag
->
tag_value
);
switch
(
tag
->
tag_mode
)
{
case
TM_DEFAULT
:
break
;
...
...
@@ -178,7 +177,7 @@ asn1print_value(asn1p_value_t *val, enum asn1print_flags flags) {
printf
(
"%f"
,
val
->
value
.
v_double
);
return
0
;
case
ATV_INTEGER
:
printf
(
"%
lld"
,
(
long
long
)
val
->
value
.
v_integer
);
printf
(
"%
"
PRIdASN
,
val
->
value
.
v_integer
);
return
0
;
case
ATV_MIN
:
printf
(
"MIN"
);
return
0
;
case
ATV_MAX
:
printf
(
"MAX"
);
return
0
;
...
...
@@ -367,7 +366,7 @@ asn1print_crange_value(asn1cnst_edge_t *edge, int as_char) {
if
(
as_char
)
{
printf
(
"
\"
%c
\"
"
,
(
unsigned
char
)
edge
->
value
);
}
else
{
printf
(
"%
lld"
,
(
long
long
)
edge
->
value
);
printf
(
"%
"
PRIdASN
,
edge
->
value
);
}
}
return
0
;
...
...
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