iliaa Tue May 11 15:51:46 2004 EDT
Modified files:
/php-src/ext/standard formatted_print.c
Log:
Make vprintf() and printf() return the length of the string printed.
Make fprintf() and vfprints() return the correct length of the string
printed.
http://cvs.php.net/diff.php/php-src/ext/standard/formatted_print.c?r1=1.74&r2=1.75&ty=u
Index: php-src/ext/standard/formatted_print.c
diff -u php-src/ext/standard/formatted_print.c:1.74
php-src/ext/standard/formatted_print.c:1.75
--- php-src/ext/standard/formatted_print.c:1.74 Mon Feb 16 12:09:37 2004
+++ php-src/ext/standard/formatted_print.c Tue May 11 15:51:46 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: formatted_print.c,v 1.74 2004/02/16 17:09:37 iliaa Exp $ */
+/* $Id: formatted_print.c,v 1.75 2004/05/11 19:51:46 iliaa Exp $ */
#include <math.h> /* modf() */
#include "php.h"
@@ -781,6 +781,7 @@
}
PHPWRITE(result, len);
efree(result);
+ RETURN_LONG(len);
}
/* }}} */
@@ -796,6 +797,7 @@
}
PHPWRITE(result, len);
efree(result);
+ RETURN_LONG(len);
}
/* }}} */
@@ -826,7 +828,7 @@
efree(result);
- RETVAL_LONG(len - 1);
+ RETURN_LONG(len);
}
/* {{{ proto int vfprintf(resource stream, string format, array args)
@@ -856,7 +858,7 @@
efree(result);
- RETVAL_LONG(len - 1);
+ RETURN_LONG(len);
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php