]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
JS stuff
authorDale Weiler <killfieldengine@gmail.com>
Mon, 12 Nov 2012 02:59:10 +0000 (02:59 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Mon, 12 Nov 2012 02:59:10 +0000 (02:59 +0000)
main.c

diff --git a/main.c b/main.c
index dddc9eb3d51a3fa5ff8ee306ff641aa8c2e3fe21..03e077de495a0a3bfa03a52db528f396e924e3f0 100644 (file)
--- a/main.c
+++ b/main.c
@@ -453,14 +453,21 @@ int main(int argc, char **argv) {
         printf("Mode: manual\n");
         printf("There are %lu items to compile:\n", (unsigned long)items_elements);
         for (itr = 0; itr < items_elements; ++itr) {
+            #ifndef JS
             printf("  item: %s (%s)\n",
                    items_data[itr].filename,
                    ( (items_data[itr].type == TYPE_QC ? "qc" :
                      (items_data[itr].type == TYPE_ASM ? "asm" :
                      (items_data[itr].type == TYPE_SRC ? "progs.src" :
                      ("unknown"))))));
+            #endif
 
-            if (!parser_compile_file(items_data[itr].filename)) {
+        #ifdef JS
+            if (!parser_compile_string("js.qc", items_data[itr].filename))
+        #else
+            if (!parser_compile_file(items_data[itr].filename))
+        #endif
+        {
                 retval = 1;
                 goto cleanup;
             }