From: Dale Weiler Date: Mon, 12 Nov 2012 02:59:10 +0000 (+0000) Subject: JS stuff X-Git-Tag: 0.1~29 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fgmqcc.git;a=commitdiff_plain;h=01b619d53d3aef62234a6c56ee7fedd294ee7820 JS stuff --- diff --git a/main.c b/main.c index dddc9eb..03e077d 100644 --- 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; }