X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fexpr.c;fp=src%2Fexpr.c;h=124dc17f1172ac6b513b885f35ecdc1843fe314e;hb=a3c3f96fb829bbed2d01b359890bf8b729fa5c54;hp=f259b0c521cb6faab1bcea17926996fa65631739;hpb=2ad363850629e23dea64c16a4583746bc77e780f;p=android-x86%2Fexternal-mksh.git diff --git a/src/expr.c b/src/expr.c index f259b0c..124dc17 100644 --- a/src/expr.c +++ b/src/expr.c @@ -2,7 +2,7 @@ /*- * Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, - * 2011, 2012, 2013, 2014, 2016 + * 2011, 2012, 2013, 2014, 2016, 2017 * mirabilos * * Provided that these terms and disclaimer and all copyright notices @@ -23,7 +23,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.90 2016/11/07 16:58:48 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/expr.c,v 1.93 2017/04/02 16:47:41 tg Exp $"); #define EXPRTOK_DEFNS #include "exprtok.h" @@ -203,7 +203,7 @@ evalerr(Expr_state *es, enum error_type type, const char *str) case ET_BADLIT: warningf(true, Tf_sD_s_qs, es->expression, - "bad number", str); + Tbadnum, str); break; case ET_RECURSIVE: @@ -572,8 +572,9 @@ exprtoken(Expr_state *es) if (c == '\0') es->tok = END; else if (ksh_isalphx(c)) { - for (; ksh_isalnux(c); c = *cp) - cp++; + do { + c = *++cp; + } while (ksh_isalnux(c)); if (c == '[') { size_t len; @@ -856,6 +857,9 @@ utf_wctomb(char *dst, unsigned int wc) int ksh_access(const char *fn, int mode) { +#ifdef __OS2__ + return (access_ex(access, fn, mode)); +#else int rv; struct stat sb; @@ -865,6 +869,7 @@ ksh_access(const char *fn, int mode) rv = -1; return (rv); +#endif } #ifndef MIRBSD_BOOTFLOPPY