aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-09-20 09:04:40 +0200
committerTristan Gingold <tgingold@free.fr>2020-09-20 09:04:40 +0200
commita039d22a3cfeebb5bcda0be4244a1d0d507d30e2 (patch)
tree42754a1816a2f6b9703bb7b9f50ce77fd0a9cc90
parent84649d6666d13452025ee693d16e752a63846fc1 (diff)
downloadghdl-a039d22a3cfeebb5bcda0be4244a1d0d507d30e2.tar.gz
ghdl-a039d22a3cfeebb5bcda0be4244a1d0d507d30e2.tar.bz2
ghdl-a039d22a3cfeebb5bcda0be4244a1d0d507d30e2.zip
ghdldrv: adjust style and some error messages.
-rw-r--r--src/ghdldrv/ghdlcomp.adb45
-rw-r--r--src/ghdldrv/ghdldrv.adb71
-rw-r--r--src/ghdldrv/ghdllocal.adb70
-rw-r--r--src/ghdldrv/ghdlprint.adb37
-rw-r--r--src/ghdldrv/ghdlrun.adb7
-rw-r--r--src/ghdldrv/ghdlsynth.adb5
-rw-r--r--src/ghdldrv/ghdlxml.adb5
7 files changed, 99 insertions, 141 deletions
diff --git a/src/ghdldrv/ghdlcomp.adb b/src/ghdldrv/ghdlcomp.adb
index f3a38ca89..3a91136ce 100644
--- a/src/ghdldrv/ghdlcomp.adb
+++ b/src/ghdldrv/ghdlcomp.adb
@@ -116,11 +116,10 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "elab-run" or else
- Name = "--elab-run" or else
- Name = "-r" or else
- Name = "run";
+ return Name = "elab-run"
+ or else Name = "--elab-run"
+ or else Name = "-r"
+ or else Name = "run";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Run) return String
@@ -177,9 +176,8 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "compile" or else
- Name = "-c";
+ return Name = "compile"
+ or else Name = "-c";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Compile) return String
@@ -436,10 +434,9 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "analyze" or else
- Name = "-a" or else
- Name = "analyse";
+ return Name = "analyze"
+ or else Name = "-a"
+ or else Name = "analyse";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Analyze) return String
@@ -578,9 +575,8 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "elaborate" or else
- Name = "-e";
+ return Name = "elaborate"
+ or else Name = "-e";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Elab) return String
@@ -657,11 +653,10 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "disp-config" or else
- Name = "--disp-config" or else
- Name = "dispconfig" or else
- Name = "--dispconfig";
+ return Name = "disp-config"
+ or else Name = "--disp-config"
+ or else Name = "dispconfig"
+ or else Name = "--dispconfig";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Dispconfig) return String
@@ -715,9 +710,8 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "make" or else
- Name = "-m";
+ return Name = "make"
+ or else Name = "-m";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Make) return String
@@ -846,9 +840,8 @@ package body Ghdlcomp is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "gen-makefile" or else
- Name = "--gen-makefile";
+ return Name = "gen-makefile"
+ or else Name = "--gen-makefile";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Gen_Makefile) return String
diff --git a/src/ghdldrv/ghdldrv.adb b/src/ghdldrv/ghdldrv.adb
index d88e80826..648ef9a0e 100644
--- a/src/ghdldrv/ghdldrv.adb
+++ b/src/ghdldrv/ghdldrv.adb
@@ -788,11 +788,10 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "disp-config" or else
- Name = "--disp-config" or else
- Name = "dispconfig" or else
- Name = "--dispconfig";
+ return Name = "disp-config"
+ or else Name = "--disp-config"
+ or else Name = "dispconfig"
+ or else Name = "--dispconfig";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Dispconfig) return String
@@ -878,9 +877,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "bootstrap-std" or else
- Name = "--bootstrap-standard";
+ return Name = "bootstrap-std"
+ or else Name = "--bootstrap-standard";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Bootstrap) return String
@@ -921,10 +919,9 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "analyze" or else
- Name = "-a" or else
- Name = "analyse";
+ return Name = "analyze"
+ or else Name = "-a"
+ or else Name = "analyse";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Analyze) return String
@@ -1163,9 +1160,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "elaborate" or else
- Name = "-e";
+ return Name = "elaborate"
+ or else Name = "-e";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Elab) return String
@@ -1205,9 +1201,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "run" or else
- Name = "-r";
+ return Name = "run"
+ or else Name = "-r";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Run) return String
@@ -1269,9 +1264,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "elab-run" or else
- Name = "--elab-run";
+ return Name = "elab-run"
+ or else Name = "--elab-run";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Elab_Run) return String
@@ -1315,9 +1309,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "bind" or else
- Name = "--bind";
+ return Name = "bind"
+ or else Name = "--bind";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Bind) return String
@@ -1350,9 +1343,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "link" or else
- Name = "--link";
+ return Name = "link"
+ or else Name = "--link";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Link) return String
@@ -1388,9 +1380,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "list-link" or else
- Name = "--list-link";
+ return Name = "list-link"
+ or else Name = "--list-link";
end Decode_Command;
function Get_Short_Help (Cmd : Command_List_Link) return String
@@ -1431,9 +1422,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "compile" or else
- Name = "-c";
+ return Name = "compile"
+ or else Name = "-c";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Anaelab) return String
@@ -1518,9 +1508,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "make" or else
- Name = "-m";
+ return Name = "make"
+ or else Name = "-m";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Make) return String
@@ -1810,9 +1799,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "gen-makefile" or else
- Name = "--gen-makefile";
+ return Name = "gen-makefile"
+ or else Name = "--gen-makefile";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Gen_Makefile) return String
@@ -1851,9 +1839,8 @@ package body Ghdldrv is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "gen-depends" or else
- Name = "--gen-depends";
+ return Name = "gen-depends"
+ or else Name = "--gen-depends";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Gen_Depends) return String
diff --git a/src/ghdldrv/ghdllocal.adb b/src/ghdldrv/ghdllocal.adb
index ecec830d4..0e99d7233 100644
--- a/src/ghdldrv/ghdllocal.adb
+++ b/src/ghdldrv/ghdllocal.adb
@@ -619,11 +619,9 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "dir" or else
- Name = "--dir" or else
- -- '-d' is for compatibility.
- Name = "-d";
+ return Name = "dir"
+ or else Name = "--dir"
+ or else Name = "-d"; -- '-d' is for compatibility.
end Decode_Command;
function Get_Short_Help (Cmd : Command_Dir) return String
@@ -660,9 +658,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "files" or else
- Name = "-f";
+ return Name = "files"
+ or else Name = "-f";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Find) return String
@@ -744,9 +741,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "import" or else
- Name = "-i";
+ return Name = "import"
+ or else Name = "-i";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Import) return String
@@ -844,9 +840,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "syntax" or else
- Name = "-s";
+ return Name = "syntax"
+ or else Name = "-s";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Check_Syntax) return String
@@ -956,9 +951,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "clean" or else
- Name = "--clean";
+ return Name = "clean"
+ or else Name = "--clean";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Clean) return String
@@ -1015,7 +1009,7 @@ package body Ghdllocal is
Str : String_Access;
begin
if Args'Length /= 0 then
- Error ("command '--clean' does not accept any argument");
+ Error ("command 'clean' does not accept any argument");
raise Option_Error;
end if;
@@ -1065,9 +1059,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "remove" or else
- Name = "--remove";
+ return Name = "remove"
+ or else Name = "--remove";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Remove) return String
@@ -1084,7 +1077,7 @@ package body Ghdllocal is
use Name_Table;
begin
if Args'Length /= 0 then
- Error ("command '--remove' does not accept any argument");
+ Error ("command 'remove' does not accept any argument");
raise Option_Error;
end if;
Perform_Action (Command_Clean (Cmd), Args);
@@ -1103,9 +1096,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "copy" or else
- Name = "--copy";
+ return Name = "copy"
+ or else Name = "--copy";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Copy) return String
@@ -1127,7 +1119,7 @@ package body Ghdllocal is
Dir : Name_Id;
begin
if Args'Length /= 0 then
- Error ("command '--copy' does not accept any argument");
+ Error ("command 'copy' does not accept any argument");
raise Option_Error;
end if;
@@ -1185,16 +1177,15 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "disp-std" or else
- Name = "--disp-standard";
+ return Name = "disp-standard"
+ or else Name = "--disp-standard";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Disp_Standard) return String
is
pragma Unreferenced (Cmd);
begin
- return "disp-std"
+ return "disp-standard"
& ASCII.LF & " Disp std.standard in pseudo-vhdl"
& ASCII.LF & " alias: --disp-standard";
end Get_Short_Help;
@@ -1205,7 +1196,7 @@ package body Ghdllocal is
pragma Unreferenced (Cmd);
begin
if Args'Length /= 0 then
- Error ("command '--disp-standard' does not accept any argument");
+ Error ("command 'disp-standard' does not accept any argument");
raise Option_Error;
end if;
Flags.Bootstrap := True;
@@ -1226,9 +1217,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "find-top" or else
- Name = "--find-top";
+ return Name = "find-top"
+ or else Name = "--find-top";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Find_Top) return String
@@ -1260,7 +1250,7 @@ package body Ghdllocal is
raise Option_Error;
end if;
else
- Error ("command '--find-top' accepts at most one argument");
+ Error ("command 'find-top' accepts at most one argument");
raise Option_Error;
end if;
@@ -1287,9 +1277,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "bug-box" or else
- Name = "--bug-box";
+ return Name = "bug-box"
+ or else Name = "--bug-box";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Bug_Box) return String
@@ -1784,9 +1773,8 @@ package body Ghdllocal is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "elab-order" or else
- Name = "--elab-order";
+ return Name = "elab-order"
+ or else Name = "--elab-order";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Elab_Order) return String
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index 2b5ac8d13..2ddc74e75 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -560,9 +560,8 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "chop" or else
- Name = "--chop";
+ return Name = "chop"
+ or else Name = "--chop";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Chop) return String
@@ -862,9 +861,8 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "lines" or else
- Name = "--lines";
+ return Name = "lines"
+ or else Name = "--lines";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Lines) return String
@@ -996,9 +994,8 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "reprint" or else
- Name = "--reprint";
+ return Name = "reprint"
+ or else Name = "--reprint";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Reprint) return String
@@ -1146,16 +1143,15 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "cmp-tokens" or else
- Name = "--compare-tokens";
+ return Name = "compare-tokens"
+ or else Name = "--compare-tokens";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Compare_Tokens) return String
is
pragma Unreferenced (Cmd);
begin
- return "cmp-tokens [OPTS] REF FILEs"
+ return "compare-tokens [OPTS] REF FILEs"
& ASCII.LF & " Compare FILEs with REF"
& ASCII.LF & " alias: --compare-tokens";
end Get_Short_Help;
@@ -1277,9 +1273,8 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "pp-html" or else
- Name = "--pp-html";
+ return Name = "pp-html"
+ or else Name = "--pp-html";
end Decode_Command;
function Get_Short_Help (Cmd : Command_PP_Html) return String
@@ -1352,9 +1347,8 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "xref-html" or else
- Name = "--xref-html";
+ return Name = "xref-html"
+ or else Name = "--xref-html";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Xref_Html) return String
@@ -1664,9 +1658,8 @@ package body Ghdlprint is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "xref" or else
- Name = "--xref";
+ return Name = "xref"
+ or else Name = "--xref";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Xref) return String
diff --git a/src/ghdldrv/ghdlrun.adb b/src/ghdldrv/ghdlrun.adb
index a1a3f2505..e19216fff 100644
--- a/src/ghdldrv/ghdlrun.adb
+++ b/src/ghdldrv/ghdlrun.adb
@@ -793,9 +793,8 @@ package body Ghdlrun is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "run-help" or else
- Name = "--run-help";
+ return Name = "run-help"
+ or else Name = "--run-help";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Run_Help) return String
@@ -813,7 +812,7 @@ package body Ghdlrun is
pragma Unreferenced (Cmd);
begin
if Args'Length /= 0 then
- Error ("warning: command '--run-help' does not accept any argument");
+ Error ("warning: command 'run-help' does not accept any argument");
end if;
Put_Line ("These options can only be placed at [RUNOPTS]");
-- Register modules, since they add commands.
diff --git a/src/ghdldrv/ghdlsynth.adb b/src/ghdldrv/ghdlsynth.adb
index 8474dd77c..09c9f1494 100644
--- a/src/ghdldrv/ghdlsynth.adb
+++ b/src/ghdldrv/ghdlsynth.adb
@@ -95,9 +95,8 @@ package body Ghdlsynth is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "synth" or else
- Name = "--synth";
+ return Name = "synth"
+ or else Name = "--synth";
end Decode_Command;
function Get_Short_Help (Cmd : Command_Synth) return String
diff --git a/src/ghdldrv/ghdlxml.adb b/src/ghdldrv/ghdlxml.adb
index 80fb1d557..15a8a2940 100644
--- a/src/ghdldrv/ghdlxml.adb
+++ b/src/ghdldrv/ghdlxml.adb
@@ -523,9 +523,8 @@ package body Ghdlxml is
is
pragma Unreferenced (Cmd);
begin
- return
- Name = "file-to-xml" or else
- Name = "--file-to-xml";
+ return Name = "file-to-xml"
+ or else Name = "--file-to-xml";
end Decode_Command;
function Get_Short_Help (Cmd : Command_File_To_Xml) return String