]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Don't generate vector defs if the vector's name starts with a # because that's an...
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index d732ef9bd0d1c8175cd750ac0ca10a7839a6b622..838a26d3cc64301ae860966a68968906f1e36cb3 100644 (file)
--- a/main.c
+++ b/main.c
@@ -508,6 +508,11 @@ int main(int argc, char **argv) {
         return usage();
     }
 
+    if (OPTS_FLAG(TRUE_EMPTY_STRINGS) && OPTS_FLAG(FALSE_EMPTY_STRINGS)) {
+        con_err("-ftrue-empty-strings and -ffalse-empty-strings are mutually exclusive");
+        exit(1);
+    }
+
     /* the standard decides which set of operators to use */
     if (opts.standard == COMPILER_GMQCC) {
         operators      = c_operators;
@@ -531,7 +536,7 @@ int main(int argc, char **argv) {
                 exit(1);
             }
             operators_free = true;
-            newops = mem_a(sizeof(operators[0]) * operator_count);
+            newops = (oper_info*)mem_a(sizeof(operators[0]) * operator_count);
             memcpy(newops, operators, sizeof(operators[0]) * operator_count);
             memcpy(&newops[operator_count-2], &operators[operator_count-1], sizeof(newops[0]));
             memcpy(&newops[operator_count-1], &operators[operator_count-2], sizeof(newops[0]));
@@ -561,7 +566,7 @@ int main(int argc, char **argv) {
             }
         }
         else {
-         /* TODO: stdout without stdout .. */
+            outfile = con_default_out();
         }
     }
 
@@ -676,7 +681,7 @@ srcdone:
                     }
                     data = ftepp_get();
                     if (vec_size(data)) {
-                        if (!parser_compile_string_len(items[itr].filename, data, vec_size(data))) {
+                        if (!parser_compile_string(items[itr].filename, data, vec_size(data))) {
                             retval = 1;
                             goto cleanup;
                         }