diff options
-rw-r--r-- | src/grt/grt-files_operations.adb | 4 | ||||
-rw-r--r-- | src/grt/grt-readline.ads | 5 | ||||
-rw-r--r-- | src/grt/grt-types.ads | 7 | ||||
-rw-r--r-- | src/grt/grt-waves.adb | 4 | ||||
-rw-r--r-- | src/synth/elab-debugger__on.adb | 10 |
5 files changed, 13 insertions, 17 deletions
diff --git a/src/grt/grt-files_operations.adb b/src/grt/grt-files_operations.adb index 86a1af1a6..f2b408398 100644 --- a/src/grt/grt-files_operations.adb +++ b/src/grt/grt-files_operations.adb @@ -293,13 +293,13 @@ package body Grt.Files_Operations is return; end case; - if Strcmp (Name, To_Ghdl_C_String (Std_Input_Name'Address)) = 0 then + if strcmp (Name, To_Ghdl_C_String (Std_Input_Name'Address)) = 0 then if Mode /= Read_Mode then Status := Op_Mode_Error; return; end if; F := stdin; - elsif Strcmp (Name, To_Ghdl_C_String (Std_Output_Name'Address)) = 0 then + elsif strcmp (Name, To_Ghdl_C_String (Std_Output_Name'Address)) = 0 then if Mode /= Write_Mode then Status := Op_Mode_Error; return; diff --git a/src/grt/grt-readline.ads b/src/grt/grt-readline.ads index 6d4903e02..5eb1b5c7f 100644 --- a/src/grt/grt-readline.ads +++ b/src/grt/grt-readline.ads @@ -1,17 +1,12 @@ -- Although being part of GRT, the readline binding should be independent of -- it (for easier reuse). -with System; use System; with Grt.Types; use Grt.Types; package Grt.Readline is 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 : Ghdl_C_String); - pragma Import (C, Free); - procedure Add_History (Line : Ghdl_C_String); pragma Import (C, Add_History); diff --git a/src/grt/grt-types.ads b/src/grt/grt-types.ads index 788840b21..d6c709da9 100644 --- a/src/grt/grt-types.ads +++ b/src/grt/grt-types.ads @@ -77,8 +77,11 @@ package Grt.Types is function strlen (Str : Ghdl_C_String) return Natural; pragma Import (C, strlen); - function Strcmp (L , R : Ghdl_C_String) return Integer; - pragma Import (C, Strcmp); + function strcmp (L , R : Ghdl_C_String) return Integer; + pragma Import (C, strcmp); + + procedure free (Buf : Ghdl_C_String); + pragma Import (C, free); function To_Ghdl_C_String is new Ada.Unchecked_Conversion (Source => Address, Target => Ghdl_C_String); diff --git a/src/grt/grt-waves.adb b/src/grt/grt-waves.adb index a513ef010..eb0f0a898 100644 --- a/src/grt/grt-waves.adb +++ b/src/grt/grt-waves.adb @@ -365,7 +365,7 @@ package body Grt.Waves is if L = R then return 0; end if; - return Strcmp (Ls, Rs); + return strcmp (Ls, Rs); end Str_Compare; procedure Disp_Str_Avl (N : AVL_Nid) is @@ -442,7 +442,7 @@ package body Grt.Waves is H := Str_Table.Last; loop M := (L + H) / 2; - Diff := Strcmp (Str, Str_Table.Table (M)); + Diff := strcmp (Str, Str_Table.Table (M)); if Diff = 0 then return M; elsif Diff < 0 then diff --git a/src/synth/elab-debugger__on.adb b/src/synth/elab-debugger__on.adb index 004ec8423..2b4831215 100644 --- a/src/synth/elab-debugger__on.adb +++ b/src/synth/elab-debugger__on.adb @@ -16,8 +16,6 @@ -- You should have received a copy of the GNU General Public License -- along with this program. If not, see <gnu.org/licenses>. -with System; - with Types; use Types; with Files_Map; with Tables; @@ -764,15 +762,15 @@ package body Elab.Debugger is is use Grt.Readline; Raw_Line : Ghdl_C_String; - Prompt : System.Address; + Prompt : Ghdl_C_String; begin - Prompt := Prompt_Debug'Address; + Prompt := To_Ghdl_C_String (Prompt_Debug'Address); case Reason is when Reason_Init => - Prompt := Prompt_Init'Address; + Prompt := To_Ghdl_C_String (Prompt_Init'Address); when Reason_Error => - Prompt := Prompt_Error'Address; + Prompt := To_Ghdl_C_String (Prompt_Error'Address); when Reason_Break => case Exec_State is when Exec_Run => |