cvs: php3 /functions formatted_print.c

From: Date: Fri, 21 Jul 2000 02:58:17 +0000
Subject: cvs: php3 /functions formatted_print.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-827@lists.php.net to get a copy of this message
coar Thu Jul 20 19:58:17 2000 EDT Modified files: /php3/functions formatted_print.c Log: Okey, this fixes the problem I introduced with the printf() functions. The specific problem I was after (%.0s) is fixed, and numerical display is back to the way it was. Which is still broken relative to libc printf(), but at least it isn't a regression. We now fail 29 of 197 of my test cases; before I started this, we were failing 42. The 29 that fail now were failing before I started. Index: php3/functions/formatted_print.c diff -u php3/functions/formatted_print.c:1.54 php3/functions/formatted_print.c:1.55 --- php3/functions/formatted_print.c:1.54 Fri Jul 14 08:39:51 2000 +++ php3/functions/formatted_print.c Thu Jul 20 19:58:17 2000 @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c,v 1.54 2000/07/14 15:39:51 coar Exp $ */ +/* $Id: formatted_print.c,v 1.55 2000/07/21 02:58:17 coar Exp $ */ #include "php.h" #include "internal_functions.h" @@ -205,7 +205,7 @@ inline static void _php3_sprintf_appendint(char **buffer, int *pos, int *size, int number, - int width, char padding, int alignment, int expprec) + int width, char padding, int alignment) { char numbuf[NUM_BUF_SIZE]; register unsigned int magn, nmagn, i = NUM_BUF_SIZE - 1, neg = 0; @@ -238,7 +238,7 @@ number, &numbuf[i], i)); _php3_sprintf_appendstring(buffer, pos, size, &numbuf[i], width, 0, padding, alignment, (NUM_BUF_SIZE - 1) - i, - neg, expprec); + neg, 0); } @@ -247,7 +247,7 @@ int *size, double number, int width, char padding, int alignment, int precision, - int adjust, char fmt, int expprec) + int adjust, char fmt) { char numbuf[NUM_BUF_SIZE]; char *cvt; @@ -299,7 +299,7 @@ width += (precision + 1); } _php3_sprintf_appendstring(buffer, pos, size, numbuf, width, 0, padding, - alignment, i, sign, expprec); + alignment, i, sign, 0); } @@ -502,8 +502,7 @@ convert_to_long(args[currarg]); _php3_sprintf_appendint(&result, &outpos, &size, args[currarg]->value.lval, - width, padding, alignment, - expprec); + width, padding, alignment); break; case 'e': @@ -514,7 +513,7 @@ args[currarg]->value.dval, width, padding, alignment, precision, adjusting, - format[inpos], expprec); + format[inpos]); break; case 'c':

« previous php.cvs (#827) next »