]> granicus.if.org Git - php/commitdiff
MFH
authorAntony Dovgal <tony2001@php.net>
Tue, 19 Dec 2006 13:15:39 +0000 (13:15 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 19 Dec 2006 13:15:39 +0000 (13:15 +0000)
ext/pcre/tests/002.phpt
main/snprintf.c

index a7f588397de804d19aa0f83b7cae92e55bfeae6b..726390c77e769de79ce8dd2ba76ed562a56a13bb 100644 (file)
@@ -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
index f3f6dae90bb92428150f91837768a53551ebc95e..c019d1a2fa04278ab23d7f24f4ca9d4ca8cf6f86 100644 (file)
@@ -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