cvs: php4 /ext/standard formatted_print.c

From: Date: Sun, 20 Aug 2000 06:08:14 +0000
Subject: cvs: php4 /ext/standard formatted_print.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-1247@lists.php.net to get a copy of this message
sas Sat Aug 19 23:08:14 2000 EDT Modified files: /php4/ext/standard formatted_print.c Log: Make use of zend_isinf and zend_isnan. Index: php4/ext/standard/formatted_print.c diff -u php4/ext/standard/formatted_print.c:1.26 php4/ext/standard/formatted_print.c:1.27 --- php4/ext/standard/formatted_print.c:1.26 Mon Aug 14 08:54:57 2000 +++ php4/ext/standard/formatted_print.c Sat Aug 19 23:08:14 2000 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c,v 1.26 2000/08/14 15:54:57 stas Exp $ */ +/* $Id: formatted_print.c,v 1.27 2000/08/20 06:08:14 sas Exp $ */ #include <math.h> /* modf() */ #include "php.h" @@ -253,32 +253,14 @@ precision = MAX_FLOAT_PRECISION; } - if( -#if defined(HAVE_ISNAN) - isnan(number) -#elif defined(NAN) - number == NAN -#else - 0 -#endif - ) { + if (zend_isnan(number)) { sign = (number<0); php_sprintf_appendstring(buffer, pos, size, "NaN", 3, 0, padding, alignment, precision, sign, 0); return; } - if( -#if defined(HAVE_ISISINF) - isinf(number) -#elif defined(HAVE_ISFINITE) - !isfinite(number) -#elif defined(HAVE_FINITE) - !finite(number) -#else - 0 -#endif - ) { + if (zend_isinf(number)) { sign = (number<0); php_sprintf_appendstring(buffer, pos, size, "INF", 3, 0, padding, alignment, precision, sign, 0);

« previous php.cvs (#1247) next »