diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-06-01 21:44:05 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-06-02 17:44:47 +0200 |
commit | fff5baf66a4e17d1913ee6e6bc807a049fc0af1f (patch) | |
tree | 4264c2e201ea9696dd53225a07c1d8a975e95b4b /src/grt/grt-vstrings.adb | |
parent | 2318615ede87be1f27e8d776d5fc30b814d8e505 (diff) | |
download | ghdl-fff5baf66a4e17d1913ee6e6bc807a049fc0af1f.tar.gz ghdl-fff5baf66a4e17d1913ee6e6bc807a049fc0af1f.tar.bz2 ghdl-fff5baf66a4e17d1913ee6e6bc807a049fc0af1f.zip |
grt: extract grt-vstrings_io from grt-vstrings.
Diffstat (limited to 'src/grt/grt-vstrings.adb')
-rw-r--r-- | src/grt/grt-vstrings.adb | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/grt/grt-vstrings.adb b/src/grt/grt-vstrings.adb index af982a50c..818701fa0 100644 --- a/src/grt/grt-vstrings.adb +++ b/src/grt/grt-vstrings.adb @@ -24,7 +24,6 @@ -- covered by the GNU Public License. with Grt.Errors; use Grt.Errors; -with Grt.C; use Grt.C; package body Grt.Vstrings is procedure Free (Fs : Fat_String_Acc); @@ -112,15 +111,10 @@ package body Grt.Vstrings is Vstr.Len := Len; end Truncate; - procedure Put (Stream : FILEs; Vstr : Vstring) - is - S : size_t; + function Get_Address (Vstr : Vstring) return Address is begin - S := size_t (Vstr.Len); - if S > 0 then - S := fwrite (Vstr.Str (1)'Address, S, 1, Stream); - end if; - end Put; + return Vstr.Str.all'Address; + end Get_Address; function Get_C_String (Vstr : Vstring) return Ghdl_C_String is begin @@ -212,13 +206,4 @@ package body Grt.Vstrings is Rstr.Str (Rstr.First .. Rstr.First + Len - 1); end if; end Copy; - - procedure Put (Stream : FILEs; Rstr : Rstring) - is - S : size_t; - pragma Unreferenced (S); - begin - S := fwrite (Get_Address (Rstr), size_t (Length (Rstr)), 1, Stream); - end Put; - end Grt.Vstrings; |