diff --git a/check.t b/check.t index dd70371..54468a4 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.741 2016/07/25 00:04:37 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.742 2016/07/25 20:36:24 tg Exp $ # -*- mode: sh -*- #- # Copyright © 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, @@ -359,6 +359,18 @@ stdin: expected-stdout: 20 --- +name: arith-prec-1 +description: + Prove arithmetic expressions with embedded parameter + substitutions cannot be parsed ahead of time +stdin: + a='3 + 4' + print 1 $((2 * a)) . + print 2 $((2 * $a)) . +expected-stdout: + 1 14 . + 2 10 . +--- name: arith-div-assoc-1 description: Check associativity of division operator diff --git a/main.c b/main.c index e26be95..f907f85 100644 --- a/main.c +++ b/main.c @@ -34,7 +34,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/main.c,v 1.312 2016/07/25 00:04:45 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/main.c,v 1.313 2016/07/25 20:36:27 tg Exp $"); extern char **environ; @@ -317,7 +317,7 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp) #endif /* * this is uniform across all OSes unless it - * breaks somewhere; don't try to optimise, + * breaks somewhere hard; don't try to optimise, * e.g. add stuff for Interix or remove /usr * for HURD, because e.g. Debian GNU/HURD is * "keeping a regular /usr"; this is supposed diff --git a/misc.c b/misc.c index be01652..e9c735e 100644 --- a/misc.c +++ b/misc.c @@ -30,7 +30,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.243 2016/07/25 00:04:45 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.244 2016/07/25 20:36:28 tg Exp $"); #define KSH_CHVT_FLAG #ifdef MKSH_SMALL @@ -354,7 +354,7 @@ change_xtrace(unsigned char newval, bool dosnapshot) */ int parse_args(const char **argv, - /* OF_CMDLINE or OF_SET */ + /* OF_FIRSTTIME, OF_CMDLINE, or OF_SET */ int what, bool *setargsp) {