From: Antony Dovgal Date: Tue, 19 Dec 2006 13:15:39 +0000 (+0000) Subject: MFH X-Git-Tag: php-5.2.1RC2~152 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c34d863d3e2e0db9d83a80164f6b1e8b82c0a031;p=php MFH --- diff --git a/ext/pcre/tests/002.phpt b/ext/pcre/tests/002.phpt index a7f588397d..726390c77e 100644 --- a/ext/pcre/tests/002.phpt +++ b/ext/pcre/tests/002.phpt @@ -34,7 +34,7 @@ string(12) "a${1b${1c${1" Warning: preg_replace(): Compilation failed: missing terminating ] for character class at offset 8 in %s002.php on line 11 NULL -Parse error: %s, unexpected T_FOR in %s002.php(12) : regexp code on line 1 +Parse error: %s in %s002.php(12) : regexp code on line 1 Fatal error: preg_replace(): Failed evaluating code: for ($ in %s002.php on line 12 diff --git a/main/snprintf.c b/main/snprintf.c index f3f6dae90b..c019d1a2fa 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -93,7 +93,7 @@ static char * __cvt(double value, int ndigit, int *decpt, int *sign, int fmode, *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 @@ PHPAPI char *php_gcvt(double value, int ndigit, char dec_point, char exponent, c * 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 @@ static int format_converter(register buffy * odp, const char *fmt, } 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