]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
Revert "Actually works now"
authorDale Weiler <killfieldengine@gmail.com>
Thu, 13 Jun 2013 22:23:07 +0000 (22:23 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 13 Jun 2013 22:23:07 +0000 (22:23 +0000)
This reverts commit daa1487aefbb31359c532a19e01819f0d00f6716.

gmqcc.h
main.c
parser.c

diff --git a/gmqcc.h b/gmqcc.h
index dc691046294917e35cde7b31d40b09f1ad4c824b..d6055dbeedf2d27ac8e8a9061744302027fcb515 100644 (file)
--- a/gmqcc.h
+++ b/gmqcc.h
@@ -1129,7 +1129,6 @@ typedef enum {
     COMPILER_QCC,     /* circa  QuakeC */
     COMPILER_FTEQCC,  /* fteqcc QuakeC */
     COMPILER_QCCX,    /* qccx   QuakeC */
-    COMPILER_HCODE,   /* hcode  QuakeC */
     COMPILER_GMQCC    /* this   QuakeC */
 } opts_std_t;
 
diff --git a/main.c b/main.c
index ce3025ac10a0052740e03460cca7f3ff58eafe30..37638e92ae4fb8b0202116f596d48e3d1d27e127 100644 (file)
--- a/main.c
+++ b/main.c
@@ -74,7 +74,6 @@ static int usage(void) {
     con_out("  -std=standard          select one of the following standards\n"
             "       -std=qcc          original QuakeC\n"
             "       -std=fteqcc       fteqcc QuakeC\n"
-            "       -std=hcode        hexgen2 QuakeC\n"
             "       -std=gmqcc        this compiler (default)\n");
     con_out("  -f<flag>               enable a flag\n"
             "  -fno-<flag>            disable a flag\n"
@@ -205,12 +204,6 @@ static bool options_parse(int argc, char **argv) {
                     opts_set(opts.flags, ADJUST_VECTOR_FIELDS,  false);
                     OPTS_OPTION_U32(OPTION_STANDARD) = COMPILER_QCCX;
 
-                } else if (!strcmp(argarg, "hcode")) {
-
-                    opts_set(opts.flags, ADJUST_VECTOR_FIELDS,  false);
-                    opts_set(opts.flags, ASSIGN_FUNCTION_TYPES, true);
-
-                    OPTS_OPTION_U32(OPTION_STANDARD) = COMPILER_HCODE;
                 } else {
                     con_out("Unknown standard: %s\n", argarg);
                     return false;
index 06aca6bf3acd3d2eb7ac6f1e81066f5d0a14f00e..5b4ed658f96f5236ed04f7db1aed7d1a4dabd534 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -5770,29 +5770,22 @@ skipvar:
             }
         }
 
-        if ((OPTS_OPTION_U32(OPTION_STANDARD) == COMPILER_HCODE)
-                ? parser->tok != ':'
-                : true
-        ){
-            if (parser->tok != '{' || var->expression.vtype != TYPE_FUNCTION) {
-                if (parser->tok != '=') {
-                    parseerror(parser, "missing semicolon or initializer, got: `%s`", parser_tokval(parser));
-                    break;
-                }
-
-                if (!parser_next(parser)) {
-                    parseerror(parser, "error parsing initializer");
-                    break;
-                }
+        if (parser->tok != '{' || var->expression.vtype != TYPE_FUNCTION) {
+            if (parser->tok != '=') {
+                parseerror(parser, "missing semicolon or initializer, got: `%s`", parser_tokval(parser));
+                break;
             }
-            else if (OPTS_OPTION_U32(OPTION_STANDARD) == COMPILER_QCC) {
-                parseerror(parser, "expected '=' before function body in this standard");
+
+            if (!parser_next(parser)) {
+                parseerror(parser, "error parsing initializer");
+                break;
             }
         }
+        else if (OPTS_OPTION_U32(OPTION_STANDARD) == COMPILER_QCC) {
+            parseerror(parser, "expected '=' before function body in this standard");
+        }
 
-        if (parser->tok == '#' ||
-            (OPTS_OPTION_U32(OPTION_STANDARD) == COMPILER_HCODE && parser->tok == ':'))
-        {
+        if (parser->tok == '#') {
             ast_function *func   = NULL;
             ast_value    *number = NULL;
             float         fractional;