]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - exec.c
Mask out the math constant precedence stuff unless -fftepp-mathdefs
[xonotic/gmqcc.git] / exec.c
diff --git a/exec.c b/exec.c
index 57b47318fab3211a8d269db944933ad26eeb95ee..43d1980ed1a12895b516a2c29cbf776def1ff710 100644 (file)
--- a/exec.c
+++ b/exec.c
@@ -587,7 +587,6 @@ cleanup:
  * main for when building the standalone executor
  */
 
-#if defined(QCVM_EXECUTOR)
 #include <math.h>
 
 const char *type_name[TYPE_COUNT] = {
@@ -915,7 +914,7 @@ int main(int argc, char **argv) {
 
     if (argc < 2) {
         usage();
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     while (argc > 1) {
@@ -924,7 +923,7 @@ int main(int argc, char **argv) {
             !strcmp(argv[1], "--help"))
         {
             usage();
-            exit(0);
+            exit(EXIT_SUCCESS);
         }
         else if (!strcmp(argv[1], "-v")) {
             ++opts_v;
@@ -938,7 +937,7 @@ int main(int argc, char **argv) {
                     ++opts_v;
                 else {
                     usage();
-                    exit(1);
+                    exit(EXIT_FAILURE);
                 }
             }
             --argc;
@@ -948,7 +947,7 @@ int main(int argc, char **argv) {
                  !strcmp(argv[1], "--version"))
         {
             version();
-            exit(0);
+            exit(EXIT_SUCCESS);
         }
         else if (!strcmp(argv[1], "-trace")) {
             --argc;
@@ -977,7 +976,7 @@ int main(int argc, char **argv) {
             ++argv;
             if (argc <= 1) {
                 usage();
-                exit(1);
+                exit(EXIT_FAILURE);
             }
             vec_push(dis_list, argv[1]);
             --argc;
@@ -1020,7 +1019,7 @@ int main(int argc, char **argv) {
             ++argv;
             if (argc < 2) {
                 usage();
-                exit(1);
+                exit(EXIT_FAILURE);
             }
             p.value = argv[1];
 
@@ -1037,7 +1036,7 @@ int main(int argc, char **argv) {
             if (progsfile) {
                 fprintf(stderr, "only 1 program file may be specified\n");
                 usage();
-                exit(1);
+                exit(EXIT_FAILURE);
             }
             progsfile = argv[1];
             --argc;
@@ -1047,7 +1046,7 @@ int main(int argc, char **argv) {
         {
             fprintf(stderr, "unknown parameter: %s\n", argv[1]);
             usage();
-            exit(1);
+            exit(EXIT_FAILURE);
         }
     }
 
@@ -1060,13 +1059,13 @@ int main(int argc, char **argv) {
     if (!progsfile) {
         fprintf(stderr, "must specify a program to execute\n");
         usage();
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     prog = prog_load(progsfile, noexec);
     if (!prog) {
         fprintf(stderr, "failed to load program '%s'\n", progsfile);
-        exit(1);
+        exit(EXIT_FAILURE);
     }
 
     prog->builtins       = qc_builtins;
@@ -1156,7 +1155,7 @@ int main(int argc, char **argv) {
     if (opts_printfuns) {
         for (i = 0; i < vec_size(prog->functions); ++i) {
             int32_t a;
-            printf("Function: %-16s taking %i parameters:(",
+            printf("Function: %-16s taking %u parameters:(",
                    prog_getstring(prog, prog->functions[i].name),
                    (unsigned int)prog->functions[i].nargs);
             for (a = 0; a < prog->functions[i].nargs; ++a) {
@@ -1226,7 +1225,6 @@ void prog_disasm_function(qc_program_t *prog, size_t id) {
         ++st;
     }
 }
-#endif
 #else /* !QCVM_LOOP */
 /*
  * Everything from here on is not including into the compilation of the