cvs: php4 /ext/standard string.c

From: Date: Thu, 25 Apr 2002 14:43:40 +0000
Subject: cvs: php4 /ext/standard string.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-11433@lists.php.net to get a copy of this message
hirokawa Thu Apr 25 10:43:40 2002 EDT Modified files: /php4/ext/standard string.c Log: fixed directory access problem when direcory name is encoded in japanese Shift_JIS encoding. Index: php4/ext/standard/string.c diff -u php4/ext/standard/string.c:1.269 php4/ext/standard/string.c:1.270 --- php4/ext/standard/string.c:1.269 Sun Apr 7 06:56:30 2002 +++ php4/ext/standard/string.c Thu Apr 25 10:43:40 2002 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.269 2002/04/07 10:56:30 wez Exp $ */ +/* $Id: string.c,v 1.270 2002/04/25 14:43:40 hirokawa Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -1051,7 +1051,7 @@ /* strip trailing slashes */ while (*c == '/' #ifdef PHP_WIN32 - || *c == '\\' + || (*c == '\\' && !IsDBCSLeadByte(*(c-1))) #endif ) c--; @@ -1063,7 +1063,7 @@ if ((c = strrchr(s, '/')) #ifdef PHP_WIN32 - || (c = strrchr(s, '\\')) + || ((c = strrchr(s, '\\')) && !IsDBCSLeadByte(*(c-1))) #endif ) { ret = estrdup(c + 1); @@ -1108,7 +1108,7 @@ } /* Strip trailing slashes */ - while (end >= path && IS_SLASH(*end)) { + while (end >= path && IS_SLASH_P(end)) { end--; } if (end < path) { @@ -1119,7 +1119,7 @@ } /* Strip filename */ - while (end >= path && !IS_SLASH(*end)) { + while (end >= path && !IS_SLASH_P(end)) { end--; } if (end < path) { @@ -1130,7 +1130,7 @@ } /* Strip slashes which came before the file name */ - while (end >= path && IS_SLASH(*end)) { + while (end >= path && IS_SLASH_P(end)) { end--; } if (end < path) {

« previous php.cvs (#11433) next »