DEADSOFTWARE

add option -version
authorDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 22 Jul 2019 15:52:36 +0000 (18:52 +0300)
committerDeaDDooMER <deaddoomer@deadsoftware.ru>
Mon, 22 Jul 2019 15:52:36 +0000 (18:52 +0300)
src/generic/Dsw/Mod/Compiler486Main.cp
src/generic/Dsw/Mod/CompilerCPfrontMain.cp
src/generic/Dsw/Mod/Linker486Main.cp

index 5d1a68f85758850af00f8a5423956419fb3fc9db..071858292df5a6a35fe029d4685fa60aa6e8d728 100644 (file)
@@ -11,6 +11,8 @@ MODULE DswCompiler486Main;
     hint = 29; oberon = 30; errorTrap = 31;
     defopt = {checks, assert, obj, ref, allref, srcpos, signatures};
 
+    version = "0.2";
+
     emulong = 0;
     defopt2 = {};
 
@@ -166,6 +168,9 @@ MODULE DswCompiler486Main;
           INCL(opts2, emulong)
         ELSIF p = "-no-long-calls" THEN
           EXCL(opts2, emulong)
+        ELSIF p = "-version" THEN
+          Console.WriteStr(version); Console.WriteLn;
+          Kernel.Quit(0)
         ELSE
           Console.WriteStr("unknown option ");
           Console.WriteStr(p); Console.WriteLn;
index b5d4ec95769d797b5321f8efd3230b811f15b4c1..efbd6f7b0fab418960513297563485af9db7c486 100644 (file)
@@ -12,6 +12,8 @@ MODULE DswCompilerCPfrontMain;
     (* defopt = {checks, assert, obj, ref, allref, srcpos, signatures}; *)
     defopt = {checks, assert, obj};
 
+    version = "0.2";
+
     emulong = 0;
     defopt2 = {};
 
@@ -167,6 +169,9 @@ MODULE DswCompilerCPfrontMain;
           INCL(opts2, emulong)
         ELSIF p = "-no-long-calls" THEN
           EXCL(opts2, emulong)
+        ELSIF p = "-version" THEN
+          Console.WriteStr(version); Console.WriteLn;
+          Kernel.Quit(0)
         ELSE
           Console.WriteStr("unknown option ");
           Console.WriteStr(p); Console.WriteLn;
index 677681f61bf92aef3b403317581584d8cede96f0..9396d01dc304c264baf08104e11363dd25ebb386 100644 (file)
@@ -7,6 +7,8 @@ MODULE DswLinker486Main;
   CONST
     tgtElfStatic = 0; tgtElfExe = 1; tgtElfDll = 2; tgtPeExe = 3; tgtPeDll = 4;
 
+    version = "0.2";
+
   TYPE
     Elem = POINTER TO RECORD
       name: ARRAY 256 OF CHAR;
@@ -105,6 +107,9 @@ MODULE DswLinker486Main;
         ELSIF p = "-trap" THEN
           LB.trap := TRUE;
           Kernel.intTrap := TRUE
+        ELSIF p = "-version" THEN
+          Console.WriteStr(version); Console.WriteLn;
+          Kernel.Quit(0)
         ELSE
           Console.WriteStr("unknown option ");
           Console.WriteStr(p); Console.WriteLn;