diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-10 18:19:56 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-10 18:19:56 +0100 |
commit | 811f14380a09f7c1d17f5cc117282882a420b6e7 (patch) | |
tree | ed0a5e58dfbb5455fb134fb756a802f435ee14f9 /src | |
parent | 1f65e819edaa21227b7e428deca239beb9b38ce2 (diff) | |
download | ghdl-811f14380a09f7c1d17f5cc117282882a420b6e7.tar.gz ghdl-811f14380a09f7c1d17f5cc117282882a420b6e7.tar.bz2 ghdl-811f14380a09f7c1d17f5cc117282882a420b6e7.zip |
ghdlmain: minor refactoring.
Diffstat (limited to 'src')
-rw-r--r-- | src/ghdldrv/ghdlmain.adb | 13 | ||||
-rw-r--r-- | src/ghdldrv/ghdlmain.ads | 7 |
2 files changed, 2 insertions, 18 deletions
diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb index 3aa3e403f..8e363c6f8 100644 --- a/src/ghdldrv/ghdlmain.adb +++ b/src/ghdldrv/ghdlmain.adb @@ -370,15 +370,6 @@ package body Ghdlmain is end if; end Decode_Command_Options; - procedure Decode_Command_Options (Cmd_Name : String; - Cmd : out Command_Acc; - Args : Argument_List; - First_Arg : out Natural) is - begin - Cmd := Find_Command_With_Error (Cmd_Name); - Decode_Command_Options (Cmd.all, Args, First_Arg); - end Decode_Command_Options; - Is_Windows : constant Boolean := Default_Paths.Shared_Library_Extension = ".dll"; @@ -486,8 +477,8 @@ package body Ghdlmain is Cmd : Command_Acc; First_Arg : Natural; begin - Decode_Command_Options (Args (1).all, Cmd, - Args (2 .. Args'Last), First_Arg); + Cmd := Find_Command_With_Error (Args (1).all); + Decode_Command_Options (Cmd.all, Args (2 .. Args'Last), First_Arg); -- Set before running the action, so that it can be changed. Set_Exit_Status (Success); diff --git a/src/ghdldrv/ghdlmain.ads b/src/ghdldrv/ghdlmain.ads index b009d7a93..bf9b2ef17 100644 --- a/src/ghdldrv/ghdlmain.ads +++ b/src/ghdldrv/ghdlmain.ads @@ -90,13 +90,6 @@ package Ghdlmain is Args : Argument_List; First_Arg : out Natural); - -- Decode command CMD_NAME and options from ARGS. - -- Return the index of the first non-option argument. - procedure Decode_Command_Options (Cmd_Name : String; - Cmd : out Command_Acc; - Args : Argument_List; - First_Arg : out Natural); - procedure Main; -- Additionnal one-line message displayed by the --version command, |