From bc46c647a48f84d75f4fd9adcf9673cb1d581b5f Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 29 Nov 2015 07:36:36 +0100 Subject: Rework --dir command so that it could display ieee content. Adjust doc. --- src/ghdldrv/ghdllocal.adb | 28 ++++++++++------------------ 1 file changed, 10 insertions(+), 18 deletions(-) (limited to 'src/ghdldrv') diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb index b79a06f..0072b37 100644 --- a/src/ghdldrv/ghdllocal.adb +++ b/src/ghdldrv/ghdllocal.adb @@ -596,6 +596,7 @@ package body Ghdllocal is is pragma Unreferenced (Cmd); begin + -- '-d' is for compatibility. return Name = "-d" or else Name = "--dir"; end Decode_Command; @@ -603,31 +604,22 @@ package body Ghdllocal is is pragma Unreferenced (Cmd); begin - return "-d or --dir Disp contents of the work library"; + return "--dir [LIBs] Disp contents of the libraries"; end Get_Short_Help; procedure Perform_Action (Cmd : in out Command_Dir; Args : Argument_List) is pragma Unreferenced (Cmd); begin - if Args'Length /= 0 then - Error ("command '-d' does not accept any argument"); - raise Option_Error; - end if; - - Flags.Bootstrap := True; - -- Load word library. - Libraries.Load_Std_Library; - Libraries.Load_Work_Library; - - Disp_Library (Std_Names.Name_Work); + Setup_Libraries (True); --- else --- for L in Libs'Range loop --- Id := Get_Identifier (Libs (L).all); --- Disp_Library (Id); --- end loop; --- end if; + if Args'Length = 0 then + Disp_Library (Std_Names.Name_Work); + else + for I in Args'Range loop + Disp_Library (Name_Table.Get_Identifier (Args (I).all)); + end loop; + end if; end Perform_Action; -- Command Find. -- cgit