diff options
author | Brian Gladman <brg@gladman.plus.com> | 2015-11-06 11:33:59 +0000 |
---|---|---|
committer | Brian Gladman <brg@gladman.plus.com> | 2015-11-06 11:33:59 +0000 |
commit | 0efd093199b725ede61737d19f4a411ed310a3aa (patch) | |
tree | 43c513cf7572f61924117c245b8f779783d23ca1 | |
parent | 86b96b21fa84101be286ead673fe5935c2099299 (diff) | |
parent | 19a29bfca1925953558967ae7406ba26d7a345a4 (diff) | |
download | yasm-0efd093199b725ede61737d19f4a411ed310a3aa.tar.gz |
Merge branch 'master' of github.com:yasm/yasm
-rw-r--r-- | frontends/tasm/tasm-options.c | 13 | ||||
-rw-r--r-- | modules/preprocs/nasm/nasm-pp.c | 5 | ||||
-rw-r--r-- | tools/re2c/code.c | 6 |
3 files changed, 15 insertions, 9 deletions
diff --git a/frontends/tasm/tasm-options.c b/frontends/tasm/tasm-options.c index 57c3bdfd..3d40f31b 100644 --- a/frontends/tasm/tasm-options.c +++ b/frontends/tasm/tasm-options.c @@ -65,15 +65,18 @@ parse_cmdline(int argc, char **argv, opt_option *options, size_t nopts, param = &argv[0][1+len]; if (options[i].takes_param) { - if (param[0] == '\0') { + if (param[0] != '\0') { + /* do nothing */ + } else if (argc > 1) { + param = argv[1]; + argc--; + argv++; + } else { print_error( - _("option `-%c' needs an argument!"), + _("option `-%s' needs an argument!"), options[i].opt); errors++; goto fail; - } else { - argc--; - argv++; } } else param = NULL; diff --git a/modules/preprocs/nasm/nasm-pp.c b/modules/preprocs/nasm/nasm-pp.c index 27a8cc6c..5ea650e3 100644 --- a/modules/preprocs/nasm/nasm-pp.c +++ b/modules/preprocs/nasm/nasm-pp.c @@ -2249,7 +2249,10 @@ if_condition(Token * tline, int i) case PP_ELIFNUM: case PP_IFNNUM: case PP_ELIFNNUM: - j = (t->type == TOK_NUMBER); + while (tok_is_(t, "+") || tok_is_(t, "-") || + tok_type_(t, TOK_WHITESPACE)) + t = t->next; + j = (t && t->type == TOK_NUMBER); break; case PP_IFSTR: case PP_ELIFSTR: diff --git a/tools/re2c/code.c b/tools/re2c/code.c index bd54baac..92e24d58 100644 --- a/tools/re2c/code.c +++ b/tools/re2c/code.c @@ -936,12 +936,12 @@ void DFA_emit(DFA *d, FILE *o){ oline++; useLabel(label); } else { - int i; + int j; fputs("\tswitch(YYGETSTATE()) {\n", o); fputs("\t\tcase -1: goto yy0;\n", o); - for (i=0; i<maxFillIndexes; ++i) - fprintf(o, "\t\tcase %u: goto yyFillLabel%u;\n", i, i); + for (j=0; j<maxFillIndexes; ++j) + fprintf(o, "\t\tcase %d: goto yyFillLabel%d;\n", j, j); fputs("\t\tdefault: /* abort() */;\n", o); fputs("\t}\n", o); |