From 811f14380a09f7c1d17f5cc117282882a420b6e7 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Tue, 10 Mar 2020 18:19:56 +0100 Subject: ghdlmain: minor refactoring. --- src/ghdldrv/ghdlmain.adb | 13 ++----------- src/ghdldrv/ghdlmain.ads | 7 ------- 2 files changed, 2 insertions(+), 18 deletions(-) (limited to 'src') 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, -- cgit v1.2.3