From: MAEDA Shugo Date: 1997-04-12T04:29:51+09:00 Subject: [ruby-list:2786] Re: [BUG?] strip 前田です。 On Fri, 11 Apr 97 17:18:55 JST, Yukihiro Matsumoto wrote: |isspaceとisdigitに限れば問題はこことあと1箇所(pack.c)だけの 他にもちょっとあるみたいです。 一応パッチを。 # gnu-win32だとそのままではコンパイルできないんでしょうか? # configureの途中のバイトオーダーを調べるあたりで止まってしまう # のですが。 diff -u ruby-1.0-970411.orig/class.c ruby-1.0-970411/class.c --- ruby-1.0-970411.orig/class.c Sun Mar 30 00:59:14 1997 +++ ruby-1.0-970411/class.c Sat Apr 12 03:45:52 1997 @@ -367,7 +367,7 @@ return argc; } - if (isdigit(*p)) { + if (isdigit((unsigned char)*p)) { n = *p - '0'; if (n > argc) ArgError("Wrong # of arguments (%d for %d)", argc, n); @@ -381,7 +381,7 @@ goto error; } - if (isdigit(*p)) { + if (isdigit((unsigned char)*p)) { n = i + *p - '0'; for (; iptr; - while (isspace(*s++)) + while (isspace((unsigned char)*s++)) ; *s = '\0'; RSTRING(line)->ptr[RSTRING(line)->len-1] = '\0'; Common subdirectories: ruby-1.0-970411.orig/sample and ruby-1.0-970411/sample diff -u ruby-1.0-970411.orig/sprintf.c ruby-1.0-970411/sprintf.c --- ruby-1.0-970411.orig/sprintf.c Mon Mar 17 17:51:00 1997 +++ ruby-1.0-970411/sprintf.c Sat Apr 12 03:47:23 1997 @@ -194,7 +194,7 @@ case '5': case '6': case '7': case '8': case '9': flags |= FWIDTH; width = 0; - for (; p < end && isdigit(*p); p++) { + for (; p < end && isdigit((unsigned char)*p); p++) { width = 10 * width + (*p - '0'); } if (p >= end) { @@ -234,7 +234,7 @@ goto retry; } - for (; p < end && isdigit(*p); p++) { + for (; p < end && isdigit((unsigned char)*p); p++) { prec = 10 * prec + (*p - '0'); } if (p >= end) { diff -u ruby-1.0-970411.orig/string.c ruby-1.0-970411/string.c --- ruby-1.0-970411.orig/string.c Fri Apr 11 17:58:30 1997 +++ ruby-1.0-970411/string.c Sat Apr 12 03:26:59 1997 @@ -1724,7 +1724,7 @@ for (end = beg = 0; ptr