cvs: php-src(PHP_4_3) /ext/standard file.c /ext/standard/tests/file bug26634.phpt test4.csv

From: Date: Mon, 15 Dec 2003 18:53:27 +0000
Subject: cvs: php-src(PHP_4_3) /ext/standard file.c /ext/standard/tests/file bug26634.phpt test4.csv
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-25196@lists.php.net to get a copy of this message
iliaa Mon Dec 15 13:53:27 2003 EDT Added files: (Branch: PHP_4_3) /php-src/ext/standard/tests/file bug26634.phpt test4.csv Modified files: /php-src/ext/standard file.c Log: Fixed bug #26634 & added test case. Index: php-src/ext/standard/file.c diff -u php-src/ext/standard/file.c:1.279.2.45 php-src/ext/standard/file.c:1.279.2.46 --- php-src/ext/standard/file.c:1.279.2.45 Fri Dec 12 20:44:24 2003 +++ php-src/ext/standard/file.c Mon Dec 15 13:53:25 2003 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c,v 1.279.2.45 2003/12/13 01:44:24 iliaa Exp $ */ +/* $Id: file.c,v 1.279.2.46 2003/12/15 18:53:25 iliaa Exp $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -2266,16 +2266,17 @@ array_init(return_value); -#define CSV_ADD_ENTRY(s, es, st) { \ - int len = es - st; \ - if (len) { \ - while (isspace((int)*(unsigned char *)s)) { \ - s++; \ - len--; \ +#define CSV_ADD_ENTRY(os, es, st) { \ + int tmp_sl = es - st; \ + char *tmp_s=os; \ + if (tmp_sl) { \ + while (isspace((int)*(unsigned char *)tmp_s)) { \ + tmp_s++; \ + tmp_sl--; \ } \ } \ - if (len) { \ - add_next_index_stringl(return_value, s, len, 1); \ + if (tmp_sl) { \ + add_next_index_stringl(return_value, tmp_s, tmp_sl, 1); \ } else { \ add_next_index_string(return_value, "", 1); \ } \ Index: php-src/ext/standard/tests/file/bug26634.phpt +++ php-src/ext/standard/tests/file/bug26634.phpt Index: php-src/ext/standard/tests/file/test4.csv +++ php-src/ext/standard/tests/file/test4.csv

« previous php.cvs (#25196) next »