tony2001 Fri Aug 12 15:27:50 2005 EDT
Modified files:
/php-src/ext/standard file.c
Log:
fix fgetc() & compile warnings
http://cvs.php.net/diff.php/php-src/ext/standard/file.c?r1=1.410&r2=1.411&ty=u
Index: php-src/ext/standard/file.c
diff -u php-src/ext/standard/file.c:1.410 php-src/ext/standard/file.c:1.411
--- php-src/ext/standard/file.c:1.410 Thu Aug 11 19:35:57 2005
+++ php-src/ext/standard/file.c Fri Aug 12 15:27:45 2005
@@ -21,7 +21,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: file.c,v 1.410 2005/08/11 23:35:57 andrei Exp $ */
+/* $Id: file.c,v 1.411 2005/08/12 19:27:45 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */
@@ -1109,13 +1109,13 @@
RETVAL_FALSE;
} else {
if (is_unicode) {
- UChar *ubuf = buf;
+ UChar *ubuf = (UChar *)buf;
int32_t num_u16 = num_bytes >> 1;
ubuf[num_u16] = 0;
- RETURN_UNICODEL(ubuf, num_u16, 0);
+ RETURN_UNICODEL(ubuf, num_u16, 1);
} else {
buf[1] = 0;
- RETURN_STRINGL(buf, 1, 0);
+ RETURN_STRINGL(buf, 1, 1);
}
}
}
@@ -1868,7 +1868,7 @@
buf[num_bytes] = 0;
buf[num_bytes + 1] = 0;
- RETURN_UNICODEL(buf, num_bytes >> 1, 0);
+ RETURN_UNICODEL((UChar *)buf, num_bytes >> 1, 0);
} else {
buf[num_bytes] = 0;
if (PG(magic_quotes_runtime)) {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php