From a7556a720e6ad04b7cb16a75727ad61c83cd5d3d Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 14 Aug 2019 10:18:48 +0200 Subject: ghdldrv: move command_str_disp from ghdlvpi to ghdlmain --- src/ghdldrv/ghdlmain.adb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'src/ghdldrv/ghdlmain.adb') diff --git a/src/ghdldrv/ghdlmain.adb b/src/ghdldrv/ghdlmain.adb index 4c8a3c956..e082a8c4e 100644 --- a/src/ghdldrv/ghdlmain.adb +++ b/src/ghdldrv/ghdlmain.adb @@ -81,6 +81,25 @@ package body Ghdlmain is return null; end Find_Command; + function Decode_Command (Cmd : Command_Str_Type; Name : String) + return Boolean is + begin + return Name = Cmd.Cmd_Str.all; + end Decode_Command; + + function Get_Short_Help (Cmd : Command_Str_Type) return String is + begin + return Cmd.Help_Str.all; + end Get_Short_Help; + + procedure Perform_Action (Cmd : Command_Str_Disp; Args : Argument_List) + is + pragma Unreferenced (Args); + begin + Simple_IO.Put_Line (Cmd.Disp.all); + end Perform_Action; + + -- Command help. type Command_Help is new Command_Type with null record; function Decode_Command (Cmd : Command_Help; Name : String) return Boolean; -- cgit v1.2.3