]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - exec.c
It's -config=file, not -config file
[xonotic/gmqcc.git] / exec.c
diff --git a/exec.c b/exec.c
index 3955371d5c5fa5f44a5129c87036bb159f7d0600..41c43660ef408531baa9b3fb2fd9968a7d0967f6 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -617,7 +617,7 @@ cleanup:
 #if defined(QCVM_EXECUTOR)
 #include <math.h>
 
-cmd_options opts;
+opts_cmd_t opts;
 
 const char *type_name[TYPE_COUNT] = {
     "void",
@@ -930,18 +930,20 @@ int main(int argc, char **argv)
     }
     if (opts_printdefs) {
         for (i = 0; i < vec_size(prog->defs); ++i) {
-            printf("Global: %8s %-16s at %u\n",
+            printf("Global: %8s %-16s at %u%s\n",
                    type_name[prog->defs[i].type & DEF_TYPEMASK],
                    prog_getstring(prog, prog->defs[i].name),
-                   (unsigned int)prog->defs[i].offset);
+                   (unsigned int)prog->defs[i].offset,
+                   ((prog->defs[i].type & DEF_SAVEGLOBAL) ? " [SAVE]" : ""));
         }
     }
     else if (opts_printfields) {
         for (i = 0; i < vec_size(prog->fields); ++i) {
-            printf("Field: %8s %-16s at %u\n",
+            printf("Field: %8s %-16s at %u%s\n",
                    type_name[prog->fields[i].type],
                    prog_getstring(prog, prog->fields[i].name),
-                   (unsigned int)prog->fields[i].offset);
+                   (unsigned int)prog->fields[i].offset,
+                   ((prog->fields[i].type & DEF_SAVEGLOBAL) ? " [SAVE]" : ""));
         }
     }
     else if (opts_printfuns) {
@@ -986,7 +988,7 @@ void prog_disasm_function(qc_program *prog, size_t id)
         printf("FUNCTION \"%s\"\n", prog_getstring(prog, fdef->name));
 
     st = prog->code + fdef->entry;
-    while (st->opcode != AINSTR_END) {
+    while (st->opcode != INSTR_DONE) {
         prog_print_statement(prog, st);
         ++st;
     }