From 76a1dfecb69c240201ae5c0359d7cb9c0125da87 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 26 Nov 2016 06:38:30 +0100 Subject: ghdlcomp: extract disp_config as a procedure. --- src/ghdldrv/ghdlcomp.adb | 25 ++++++++++++++++--------- src/ghdldrv/ghdlcomp.ads | 3 +++ 2 files changed, 19 insertions(+), 9 deletions(-) (limited to 'src/ghdldrv') 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); -- cgit v1.2.3