]> de.git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
Let's #define GMQCC by default
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index ce09f357b91bf3aad074b9b86bfd472852131fd6..a73f3f1df3f7e29f6d4c4992e6e94a1598355ca4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -458,6 +458,9 @@ int main(int argc, char **argv) {
     if (opts_standard == COMPILER_GMQCC) {
         operators = c_operators;
         operator_count = c_operator_count;
+    } else if (opts_standard == COMPILER_FTEQCC) {
+        operators = fte_operators;
+        operator_count = fte_operator_count;
     } else {
         operators = qcc_operators;
         operator_count = qcc_operator_count;
@@ -564,11 +567,14 @@ srcdone:
             }
 
             if (opts_pp_only) {
+                const char *out;
                 if (!ftepp_preprocess_file(items[itr].filename)) {
                     retval = 1;
                     goto cleanup;
                 }
-                fprintf(outfile, "%s", ftepp_get());
+                out = ftepp_get();
+                if (out)
+                    fprintf(outfile, "%s", out);
                 ftepp_flush();
             }
             else {