summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingold2005-12-11 14:04:48 +0000
committergingold2005-12-11 14:04:48 +0000
commite7e0d55f0c8ab261859a3d57c7119bc30d8e5148 (patch)
tree9c5c8b7a13eb26c28c8e2021ddd0573e5e299d65
parentd0201686739bb5376afdcd4e4dfe14f189406979 (diff)
downloadghdl-e7e0d55f0c8ab261859a3d57c7119bc30d8e5148.tar.gz
ghdl-e7e0d55f0c8ab261859a3d57c7119bc30d8e5148.tar.bz2
ghdl-e7e0d55f0c8ab261859a3d57c7119bc30d8e5148.zip
do not use varags C calls
-rw-r--r--translate/grt/grt-astdio.adb11
-rw-r--r--translate/grt/grt-cbinding.c4
2 files changed, 6 insertions, 9 deletions
diff --git a/translate/grt/grt-astdio.adb b/translate/grt/grt-astdio.adb
index ea1b471..ee264cf 100644
--- a/translate/grt/grt-astdio.adb
+++ b/translate/grt/grt-astdio.adb
@@ -159,14 +159,11 @@ package body Grt.Astdio is
procedure Put_F64 (Stream : FILEs; F64 : Ghdl_F64)
is
- procedure fprintf (Stream : FILEs;
- Template : System.Address;
- Arg : Ghdl_F64);
- pragma Import (C, fprintf);
-
- Str : constant String := "%g" & Character'Val (0);
+ procedure Fprintf_G (Stream : FILEs;
+ Arg : Ghdl_F64);
+ pragma Import (C, Fprintf_G, "__ghdl_fprintf_g");
begin
- fprintf (Stream, Str'Address, F64);
+ Fprintf_G (Stream, F64);
end Put_F64;
Hex_Map : constant array (0 .. 15) of Character := "0123456789ABCDEF";
diff --git a/translate/grt/grt-cbinding.c b/translate/grt/grt-cbinding.c
index 61e474d..1f37d29 100644
--- a/translate/grt/grt-cbinding.c
+++ b/translate/grt/grt-cbinding.c
@@ -39,9 +39,9 @@ __ghdl_get_stderr (void)
}
void
-__ghdl_snprintf_g (char *buf, int len, double val)
+__ghdl_fprintf_g (FILE *stream, double val)
{
- snprintf (buf, len, "%g", val);
+ fprintf (stream, "%g", val);
}
static int run_env_en;