diff options
author | Tristan Gingold <tgingold@free.fr> | 2016-11-26 06:38:30 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2016-12-12 04:16:56 +0100 |
commit | 76a1dfecb69c240201ae5c0359d7cb9c0125da87 (patch) | |
tree | f7889320583d18c2f8e6c1f80e94004d959481d7 /src/ghdldrv | |
parent | 0897f0c90d65995da152e1a15ad7a1bca6651cc7 (diff) | |
download | ghdl-76a1dfecb69c240201ae5c0359d7cb9c0125da87.tar.gz ghdl-76a1dfecb69c240201ae5c0359d7cb9c0125da87.tar.bz2 ghdl-76a1dfecb69c240201ae5c0359d7cb9c0125da87.zip |
ghdlcomp: extract disp_config as a procedure.
Diffstat (limited to 'src/ghdldrv')
-rw-r--r-- | src/ghdldrv/ghdlcomp.adb | 25 | ||||
-rw-r--r-- | src/ghdldrv/ghdlcomp.ads | 3 |
2 files changed, 19 insertions, 9 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb index 18ed69380..49674b927 100644 --- a/src/ghdldrv/ghdlcomp.adb +++ b/src/ghdldrv/ghdlcomp.adb @@ -489,26 +489,33 @@ package body Ghdlcomp is return "--disp-config Disp tools path"; end Get_Short_Help; - procedure Perform_Action (Cmd : in out Command_Dispconfig; - Args : Argument_List) + procedure Disp_Config is use Ada.Text_IO; use Libraries; - pragma Unreferenced (Cmd); begin - if Args'Length /= 0 then - Error ("--disp-config does not accept any argument"); - raise Errorout.Option_Error; - end if; - Disp_Config_Prefixes; - Put_Line ("command_name: " & Ada.Command_Line.Command_Name); Put_Line ("default library pathes:"); for I in 2 .. Get_Nbr_Pathes loop Put (' '); Put_Line (Name_Table.Image (Get_Path (I))); end loop; + end Disp_Config; + + procedure Perform_Action (Cmd : in out Command_Dispconfig; + Args : Argument_List) + is + pragma Unreferenced (Cmd); + use Ada.Text_IO; + begin + if Args'Length /= 0 then + Error ("--disp-config does not accept any argument"); + raise Errorout.Option_Error; + end if; + Put_Line ("command_name: " & Ada.Command_Line.Command_Name); + + Disp_Config; end Perform_Action; -- Command Make. diff --git a/src/ghdldrv/ghdlcomp.ads b/src/ghdldrv/ghdlcomp.ads index 383d9b92d..88e8af20f 100644 --- a/src/ghdldrv/ghdlcomp.ads +++ b/src/ghdldrv/ghdlcomp.ads @@ -65,6 +65,9 @@ package Ghdlcomp is -- Register commands. procedure Register_Commands; + -- Output of --disp-config. + procedure Disp_Config; + -- Functionnal interface. -- Must be first initialized by Compile_Init procedure Compile_Analyze_Init (Load_Work : Boolean := True); |