Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
Ocarina
Commits
73f41259
Commit
73f41259
authored
Jun 20, 2018
by
yoogx
Browse files
* Correctly handle hexa and octal cases
parent
1525534e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/backends/ast_c/ocarina-backends-c_values.adb
View file @
73f41259
...
...
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
6
ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-201
8
ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
...
...
@@ -332,17 +332,13 @@ package body Ocarina.Backends.C_Values is
if
V
.
Sign
<
0
then
Add_Char_To_Name_Buffer
(
'-'
);
elsif
V
.
Base
=
16
then
Add_Str_To_Name_Buffer
(
"
16#
"
);
Add_Str_To_Name_Buffer
(
"
0x
"
);
elsif
V
.
Base
=
8
then
Add_Str_To_Name_Buffer
(
"
8#
"
);
Add_Str_To_Name_Buffer
(
"
0
"
);
end
if
;
Add_ULL_To_Name_Buffer
(
V
.
IVal
,
ULL
(
V
.
Base
));
if
V
.
Base
=
16
or
else
V
.
Base
=
8
then
Add_Char_To_Name_Buffer
(
'#'
);
end
if
;
when
K_Float
=>
Add_Str_To_Name_Buffer
(
Long_Double
'
Image
(
V
.
FVal
));
declare
...
...
Write
Preview
Supports
Markdown
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