ecp,ecc,ecs; added printing out given arguments on invalid syntax when in debug.
authorRejean Loyer <rejean.loyer@gmail.com>
Sun, 5 May 2013 14:56:48 +0000 (10:56 -0400)
committerRejean Loyer <rejean.loyer@gmail.com>
Mon, 20 May 2013 18:54:39 +0000 (14:54 -0400)
compiler/ecc/ecc.ec
compiler/ecp/ecp.ec
compiler/ecs/ecs.ec

index 8498246..513293b 100644 (file)
@@ -430,7 +430,14 @@ class CompilerApp : Application
       }
 
       if(!valid)
+      {
          printf($"Syntax:\n   ecc [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n");
+#ifdef _DEBUG
+         printf($"\nArguments given:");
+         for(c = 1; c<argc; c++)
+            printf(" %s", argv[c]);
+#endif
+      }
       else
       {
          DualPipe cppOutput;
index 9a7b233..1d6f2bd 100644 (file)
@@ -1457,7 +1457,14 @@ class PrecompApp : Application
       }
       
       if(!valid)
+      {
          printf($"Syntax:\n   ecp [-t <target platform>] [-cpp <c preprocessor>] [-o <output>] [-symbols <outputdir>] [-I<includedir>]* [-isystem <sysincludedir>]* [-D<definition>]* -c <input>\n");
+#ifdef _DEBUG
+         printf($"\nArguments given:");
+         for(c = 1; c<argc; c++)
+            printf(" %s", argv[c]);
+#endif
+      }
       else
       {
          // TODO: Improve this
index a98be8e..dfe0145 100644 (file)
@@ -1707,7 +1707,14 @@ class SymbolgenApp : Application
          valid = false;
      
       if(!valid)
+      {
          printf($"Syntax:\n   ecs [-t <target platform>] <input>[, <input>]* -o <output>\n");
+#ifdef _DEBUG
+         printf($"\nArguments given:");
+         for(c = 1; c<argc; c++)
+            printf(" %s", argv[c]);
+#endif
+      }
       else
       {
          int c;