cvs: /php4/ext/standard var.c

From: Date: Sat, 06 Nov 1999 08:16:56 +0000
Subject: cvs: /php4/ext/standard var.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-5911@lists.php.net to get a copy of this message
thies Sat Nov 6 03:16:56 1999 EDT Modified files: /php4/ext/standard var.c Log: (PHP var_dump, serialize) now use php.ini's precision size when displying/serializing doubles Index: php4/ext/standard/var.c diff -u php4/ext/standard/var.c:1.33 php4/ext/standard/var.c:1.34 --- php4/ext/standard/var.c:1.33 Fri Oct 22 02:59:05 1999 +++ php4/ext/standard/var.c Sat Nov 6 03:16:25 1999 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c,v 1.33 1999/10/22 06:59:05 thies Exp $ */ +/* $Id: var.c,v 1.34 1999/11/06 08:16:25 thies Exp $ */ /* {{{ includes @@ -53,9 +53,11 @@ PHPWRITE(&buf[1], i - 1); break; - case IS_DOUBLE: - i = sprintf(buf, "%*cfloat(%g)\n", level, ' ', (*struc)->value.dval); - PHPWRITE(&buf[1], i - 1); + case IS_DOUBLE: { + ELS_FETCH(); + i = sprintf(buf, "%*cfloat(%.*G)\n", level, ' ', (int) EG(precision), (*struc)->value.dval); + PHPWRITE(&buf[1], i - 1); + } break; case IS_STRING: @@ -199,9 +201,11 @@ STR_CAT(buf, s, slen); return; - case IS_DOUBLE: - slen = sprintf(s, "d:%g;", (*struc)->value.dval); - STR_CAT(buf, s, slen); + case IS_DOUBLE: { + ELS_FETCH(); + slen = sprintf(s, "d:%.*G;",(int) EG(precision), (*struc)->value.dval); + STR_CAT(buf, s, slen); + } return; case IS_STRING:{

« previous php.version4 (#5911) next »