aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-03-30 08:15:25 +0200
committerTristan Gingold <tgingold@free.fr>2022-03-30 08:15:25 +0200
commit6cb10e4d80e36697fea3517651915a7a8a0bc322 (patch)
treeb8bc4c137c0832f4e1b8e8053ecb0c0e05a613d3 /src/grt
parent79b5d8bf4597048600b62b10e9508ac326db6c19 (diff)
downloadghdl-6cb10e4d80e36697fea3517651915a7a8a0bc322.tar.gz
ghdl-6cb10e4d80e36697fea3517651915a7a8a0bc322.tar.bz2
ghdl-6cb10e4d80e36697fea3517651915a7a8a0bc322.zip
grt-readline.ads: use types from grt-types
Diffstat (limited to 'src/grt')
-rw-r--r--src/grt/grt-readline.ads21
1 files changed, 5 insertions, 16 deletions
diff --git a/src/grt/grt-readline.ads b/src/grt/grt-readline.ads
index 1a3083981..6d4903e02 100644
--- a/src/grt/grt-readline.ads
+++ b/src/grt/grt-readline.ads
@@ -2,29 +2,18 @@
-- it (for easier reuse).
with System; use System;
+with Grt.Types; use Grt.Types;
package Grt.Readline is
- subtype Fat_String is String (Positive);
- type Char_Ptr is access Fat_String;
- pragma Convention (C, Char_Ptr);
- -- A C string (which is NUL terminated) is represented as a (thin) access
- -- to a fat string (a string whose range is 1 .. integer'Last).
- -- The use of an access to a constrained array allows a representation
- -- compatible with C. Indexing of object of that type is safe only for
- -- indexes until the NUL character.
-
- function Readline (Prompt : Char_Ptr) return Char_Ptr;
- function Readline (Prompt : Address) return Char_Ptr;
+ function Readline (Prompt : Ghdl_C_String) return Ghdl_C_String;
+ function Readline (Prompt : Address) return Ghdl_C_String;
pragma Import (C, Readline);
- procedure Free (Buf : Char_Ptr);
+ procedure Free (Buf : Ghdl_C_String);
pragma Import (C, Free);
- procedure Add_History (Line : Char_Ptr);
+ procedure Add_History (Line : Ghdl_C_String);
pragma Import (C, Add_History);
- function Strlen (Str : Char_Ptr) return Natural;
- pragma Import (C, Strlen);
-
pragma Linker_Options ("-lreadline");
end Grt.Readline;