aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2015-05-30 14:05:20 +0200
committerTristan Gingold <tgingold@free.fr>2015-05-30 14:05:20 +0200
commitf6d8e786a1ca3165b41cea7de05b8f2151ac31ff (patch)
treee2b35ee3b32f87c5afdbd0eb25673d008cf216a3
parent825a5354da3274f069ccc02a75b8998dc0479ac3 (diff)
downloadghdl-f6d8e786a1ca3165b41cea7de05b8f2151ac31ff.tar.gz
ghdl-f6d8e786a1ca3165b41cea7de05b8f2151ac31ff.tar.bz2
ghdl-f6d8e786a1ca3165b41cea7de05b8f2151ac31ff.zip
write: do not implicitely append LF.
-rw-r--r--libraries/std/textio_body.vhdl18
-rw-r--r--src/grt/grt-files.adb2
2 files changed, 8 insertions, 12 deletions
diff --git a/libraries/std/textio_body.vhdl b/libraries/std/textio_body.vhdl
index e74fcc6c0..4c49670b3 100644
--- a/libraries/std/textio_body.vhdl
+++ b/libraries/std/textio_body.vhdl
@@ -90,7 +90,7 @@ package body textio is
-- LRM93 14.3
-- If parameter L contains a null access value at the start of the call,
-- the a null string is written to the file.
- write (f, "");
+ null;
else
-- LRM93 14.3
-- Procedure WRITELINE causes the current line designated by parameter L
@@ -100,27 +100,25 @@ package body textio is
deallocate (l);
l := new string'("");
end if;
+ write (f, (1 => LF));
end writeline;
--START-V08
procedure Tee (file f : Text; L : inout LINE) is
begin
+ -- LRM08 16.4 Package TEXTIO
+ -- The procedure TEE additionally causes the current line to be written
+ -- to the file OUTPUT.
if l = null then
- -- LRM93 14.3
- -- If parameter L contains a null access value at the start of the call,
- -- the a null string is written to the file.
- write (f, "");
- write (Output, "");
+ null;
else
- -- LRM93 14.3
- -- Procedure WRITELINE causes the current line designated by parameter L
- -- to be written to the file and returns with the value of parameter L
- -- designating a null string.
write (f, l.all);
write (Output, l.all);
deallocate (l);
l := new string'("");
end if;
+ write (f, (1 => LF));
+ write (output, (1 => LF));
end Tee;
--END-V08
diff --git a/src/grt/grt-files.adb b/src/grt/grt-files.adb
index 30d51cf43..14dde9702 100644
--- a/src/grt/grt-files.adb
+++ b/src/grt/grt-files.adb
@@ -307,8 +307,6 @@ package body Grt.Files is
R := fwrite (Str.Base (0)'Address,
size_t (Str.Bounds.Dim_1.Length), 1, Res);
-- FIXME: check r
- -- Write '\n'.
- R1 := fputc (Character'Pos (Nl), Res);
if Auto_Flush then
fflush (Res);
end if;