]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - main.c
the -std=qcc set of operators, still have to verify if it's the original
[xonotic/gmqcc.git] / main.c
diff --git a/main.c b/main.c
index 853941debb97d6bb1f0c0c2b9f6079860dd8a30f..544530380b519118f1d2acee4bc99acb8525b084 100644 (file)
--- a/main.c
+++ b/main.c
@@ -39,6 +39,10 @@ uint16_t    opts_forced_crc;
 
 static bool opts_output_wasset = false;
 
+/* set by the standard */
+const oper_info *operators      = NULL;
+size_t           operator_count = 0;
+
 typedef struct { char *filename; int type; } argitem;
 VECTOR_MAKE(argitem, items);
 
@@ -401,6 +405,15 @@ int main(int argc, char **argv) {
         return usage();
     }
 
+    /* the standard decides which set of operators to use */
+    if (opts_standard == COMPILER_GMQCC) {
+        operators = c_operators;
+        operator_count = c_operator_count;
+    } else {
+        operators = qcc_operators;
+        operator_count = qcc_operator_count;
+    }
+
     if (opts_dump) {
         for (itr = 0; itr < COUNT_FLAGS; ++itr) {
             printf("Flag %s = %i\n", opts_flag_list[itr].name, OPTS_FLAG(itr));