cvs: php-src(PHP_5_2) /main snprintf.c

From: Date: Tue, 19 Dec 2006 13:15:40 +0000
Subject: cvs: php-src(PHP_5_2) /main snprintf.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-42182@lists.php.net to get a copy of this message
tony2001 Tue Dec 19 13:15:40 2006 UTC Modified files: (Branch: PHP_5_2) /php-src/main snprintf.c Log: MFH http://cvs.php.net/viewvc.cgi/php-src/main/snprintf.c?r1=1.37.2.4.2.5&r2=1.37.2.4.2.6&diff_format=u Index: php-src/main/snprintf.c diff -u php-src/main/snprintf.c:1.37.2.4.2.5 php-src/main/snprintf.c:1.37.2.4.2.6 --- php-src/main/snprintf.c:1.37.2.4.2.5 Tue Dec 19 13:13:28 2006 +++ php-src/main/snprintf.c Tue Dec 19 13:15:39 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: snprintf.c,v 1.37.2.4.2.5 2006/12/19 13:13:28 dmitry Exp $ */ +/* $Id: snprintf.c,v 1.37.2.4.2.6 2006/12/19 13:15:39 tony2001 Exp $ */ #include "php.h" @@ -93,7 +93,7 @@ *decpt = 0; c = *p; zend_freedtoa(p); - return(c == 'I' ? "inf" : "nan"); + return(c == 'I' ? "INF" : "NAN"); } /* Make a local copy and adjust rve to be in terms of s */ if (pad && fmode) @@ -140,7 +140,7 @@ * We assume the buffer is at least ndigit long. */ snprintf(buf, ndigit + 1, "%s%s", sign ? "-" : "", - *digits == 'I' ? "inf" : "nan"); + *digits == 'I' ? "INF" : "NAN"); zend_freedtoa(digits); return (buf); } @@ -941,10 +941,10 @@ } if (zend_isnan(fp_num)) { - s = "nan"; + s = "NAN"; s_len = 3; } else if (zend_isinf(fp_num)) { - s = "inf"; + s = "INF"; s_len = 3; } else { #ifdef HAVE_LOCALE_H

« previous php.cvs (#42182) next »