]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Print out all the information parsed from the commandline
authorWolfgang Bumiller <wolfgang.linux@bumiller.com>
Sat, 28 Jul 2012 11:20:06 +0000 (13:20 +0200)
committerWolfgang Bumiller <wolfgang.linux@bumiller.com>
Sat, 28 Jul 2012 11:20:06 +0000 (13:20 +0200)
main.c

diff --git a/main.c b/main.c
index f48a7fb5411dfefc56038ac8a1b9813489a3698f..b9a23dfc5d755e3f117804c9dd8b2f6e136ae7f0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -248,12 +248,35 @@ static bool options_parse(int argc, char **argv) {
 }
 
 int main(int argc, char **argv) {
+    size_t itr;
     app_name = argv[0];
 
     if (!options_parse(argc, argv)) {
         return usage();
     }
 
+    for (itr = 0; itr < opt_flag_list_count; ++itr) {
+        printf("Flag %s = %i\n", opt_flag_list[itr].name, OPT_FLAG(itr));
+    }
+    printf("output = %s\n", opt_output);
+    printf("optimization level = %i\n", (int)opt_O);
+    printf("standard = %i\n", opt_standard);
+
+    if (items_elements) {
+        printf("Mode: manual\n");
+        printf("There are %i items to compile:\n", items_elements);
+        for (itr = 0; itr < items_elements; ++itr) {
+            printf("  item: %s (%s)\n",
+                   items_data[itr].filename,
+                   ( (items_data[itr].type == TYPE_QC ? "qc" :
+                     (items_data[itr].type == TYPE_ASM ? "asm" :
+                     (items_data[itr].type == TYPE_SRC ? "progs.src" :
+                     ("unknown"))))));
+        }
+    } else {
+        printf("Mode: progs.src\n");
+    }
+
     util_debug("COM", "starting ...\n");
 
     /* stuff */