diff options
| author | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2012-01-11 15:43:42 +0100 |
| commit | 8f1428d29ef91d74b4d272af171675f2971eb15b (patch) | |
| tree | a1f4f4d7dc5bfe8096806dd5c5266634e19fa07a /ext | |
| parent | c6e4182351e0173fe58de141e143aac2eacf5efe (diff) | |
| download | php-upstream/5.3.9.tar.gz | |
Imported Upstream version 5.3.9upstream/5.3.9
Diffstat (limited to 'ext')
1009 files changed, 11974 insertions, 34105 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index d14a7a270..4060750cb 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bcmath.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: bcmath.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -560,7 +560,7 @@ PHP_FUNCTION(bcscale) return; } - BCG(bc_precision) = (new_scale < 0) ? 0 : new_scale; + BCG(bc_precision) = ((int)new_scale < 0) ? 0 : new_scale; RETURN_TRUE; } diff --git a/ext/bcmath/php_bcmath.h b/ext/bcmath/php_bcmath.h index 2b78ca9fb..6c6ec4afa 100644 --- a/ext/bcmath/php_bcmath.h +++ b/ext/bcmath/php_bcmath.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_bcmath.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_bcmath.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_BCMATH_H #define PHP_BCMATH_H diff --git a/ext/bcmath/tests/bug60377.phpt b/ext/bcmath/tests/bug60377.phpt new file mode 100644 index 000000000..7c4200291 --- /dev/null +++ b/ext/bcmath/tests/bug60377.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcscale related problem on 64bits platforms +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--FILE-- +<?php +$var48 = bcscale(634314234334311); +$var67 = bcsqrt(false); +$var414 = bcadd(false,null,10); +die('ALIVE'); +?> +--EXPECTF-- +ALIVE diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index b8a6d7cd3..157a56bb0 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: bz2.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/bz2/bz2_filter.c b/ext/bz2/bz2_filter.c index e76e33385..0d7a79642 100644 --- a/ext/bz2/bz2_filter.c +++ b/ext/bz2/bz2_filter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2_filter.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: bz2_filter.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/bz2/php_bz2.h b/ext/bz2/php_bz2.h index a35ba79b9..f30760cf0 100644 --- a/ext/bz2/php_bz2.h +++ b/ext/bz2/php_bz2.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_bz2.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_bz2.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_BZ2_H #define PHP_BZ2_H diff --git a/ext/calendar/cal_unix.c b/ext/calendar/cal_unix.c index 0b7b9e852..ad0a79747 100644 --- a/ext/calendar/cal_unix.c +++ b/ext/calendar/cal_unix.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/calendar/calendar.c b/ext/calendar/calendar.c index d802b5b69..a0c858d0c 100644 --- a/ext/calendar/calendar.c +++ b/ext/calendar/calendar.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ | Wez Furlong <wez@thebrainroom.com> | +----------------------------------------------------------------------+ */ -/* $Id: calendar.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: calendar.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/calendar/easter.c b/ext/calendar/easter.c index 703d08b16..f1b76c2ac 100644 --- a/ext/calendar/easter.c +++ b/ext/calendar/easter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/calendar/gregor.c b/ext/calendar/gregor.c index c9c0bf761..ebb743fdd 100644 --- a/ext/calendar/gregor.c +++ b/ext/calendar/gregor.c @@ -127,6 +127,7 @@ **************************************************************************/ #include "sdncal.h" +#include <limits.h> #define GREGOR_SDN_OFFSET 32045 #define DAYS_PER_5_MONTHS 153 @@ -146,21 +147,12 @@ void SdnToGregorian( long int temp; int dayOfYear; - if (sdn <= 0) { - *pYear = 0; - *pMonth = 0; - *pDay = 0; - return; + if (sdn <= 0 || + sdn > (LONG_MAX - 4 * GREGOR_SDN_OFFSET) / 4) { + goto fail; } temp = (sdn + GREGOR_SDN_OFFSET) * 4 - 1; - if (temp < 0) { - *pYear = 0; - *pMonth = 0; - *pDay = 0; - return; - } - /* Calculate the century (year/100). */ century = temp / DAYS_PER_400_YEARS; @@ -190,6 +182,12 @@ void SdnToGregorian( *pYear = year; *pMonth = month; *pDay = day; + return; + +fail: + *pYear = 0; + *pMonth = 0; + *pDay = 0; } long int GregorianToSdn( diff --git a/ext/calendar/tests/bug53574_1.phpt b/ext/calendar/tests/bug53574_1.phpt new file mode 100644 index 000000000..51f9b4266 --- /dev/null +++ b/ext/calendar/tests/bug53574_1.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #53574 (Integer overflow in SdnToJulian; leads to segfault) +--SKIPIF-- +<?php +include 'skipif.inc'; +if (PHP_INT_SIZE != 4) { + die("skip this test is for 32bit platform only"); +} +?> +--FILE-- +<?php +$x = 882858043; + +var_dump(cal_from_jd($x, CAL_JULIAN)); +--EXPECT-- +array(9) { + ["date"]=> + string(5) "0/0/0" + ["month"]=> + int(0) + ["day"]=> + int(0) + ["year"]=> + int(0) + ["dow"]=> + int(5) + ["abbrevdayname"]=> + string(3) "Fri" + ["dayname"]=> + string(6) "Friday" + ["abbrevmonth"]=> + string(0) "" + ["monthname"]=> + string(0) "" +} + diff --git a/ext/calendar/tests/bug53574.phpt b/ext/calendar/tests/bug53574_2.phpt index e42699135..45e15cb39 100644 --- a/ext/calendar/tests/bug53574.phpt +++ b/ext/calendar/tests/bug53574_2.phpt @@ -1,14 +1,15 @@ --TEST-- Bug #53574 (Integer overflow in SdnToJulian; leads to segfault) --SKIPIF-- -<?php include 'skipif.inc'; ?> +<?php +include 'skipif.inc'; +if (PHP_INT_SIZE == 4) { + die("skip this test is for 64bit platform only"); +} +?> --FILE-- <?php -if (PHP_INT_MAX == 0x7FFFFFFF) { - $x = 882858043; -} else { - $x = 3315881921229094912; -} +$x = 3315881921229094912; var_dump(cal_from_jd($x, CAL_JULIAN)); --EXPECT-- diff --git a/ext/calendar/tests/bug55797_1.phpt b/ext/calendar/tests/bug55797_1.phpt new file mode 100644 index 000000000..ffd617dfb --- /dev/null +++ b/ext/calendar/tests/bug55797_1.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #55797: Integer overflow in SdnToGregorian leads to segfault (in optimized builds) +--SKIPIF-- +<?php +include 'skipif.inc'; +if (PHP_INT_SIZE != 4) { + die("skip this test is for 32bit platform only"); +} +?> +--FILE-- +<?php +$x = 882858030; + +var_dump(cal_from_jd($x, CAL_GREGORIAN)); +--EXPECTF-- +array(9) { + ["date"]=> + string(5) "0/0/0" + ["month"]=> + int(0) + ["day"]=> + int(0) + ["year"]=> + int(0) + ["dow"]=> + int(%d) + ["abbrevdayname"]=> + string(%d) "%s" + ["dayname"]=> + string(%d) "%s" + ["abbrevmonth"]=> + string(0) "" + ["monthname"]=> + string(0) "" +} + diff --git a/ext/calendar/tests/bug55797_2.phpt b/ext/calendar/tests/bug55797_2.phpt new file mode 100644 index 000000000..2a9183dd8 --- /dev/null +++ b/ext/calendar/tests/bug55797_2.phpt @@ -0,0 +1,36 @@ +--TEST-- +Bug #55797: Integer overflow in SdnToGregorian leads to segfault (in optimized builds) +--SKIPIF-- +<?php +include 'skipif.inc'; +if (PHP_INT_SIZE == 4) { + die("skip this test is for 64bit platform only"); +} +?> +--FILE-- +<?php +$x = 9223372036854743639; + +var_dump(cal_from_jd($x, CAL_GREGORIAN)); +--EXPECTF-- +array(9) { + ["date"]=> + string(5) "0/0/0" + ["month"]=> + int(0) + ["day"]=> + int(0) + ["year"]=> + int(0) + ["dow"]=> + int(%d) + ["abbrevdayname"]=> + string(%d) "%s" + ["dayname"]=> + string(%d) "%s" + ["abbrevmonth"]=> + string(0) "" + ["monthname"]=> + string(0) "" +} + diff --git a/ext/calendar/tests/easter_date.phpt b/ext/calendar/tests/easter_date.phpt index 1adff6929..9222d3c27 100644 --- a/ext/calendar/tests/easter_date.phpt +++ b/ext/calendar/tests/easter_date.phpt @@ -6,6 +6,7 @@ date.timezone=UTC <?php include 'skipif.inc'; ?> --FILE-- <?php +putenv('TZ=UTC'); echo date("Y-m-d", easter_date(2000))."\n"; echo date("Y-m-d", easter_date(2001))."\n"; echo date("Y-m-d", easter_date(2002))."\n"; diff --git a/ext/calendar/tests/jdtomonthname.phpt b/ext/calendar/tests/jdtomonthname.phpt index 76d127d6b..5dc330742 100644 --- a/ext/calendar/tests/jdtomonthname.phpt +++ b/ext/calendar/tests/jdtomonthname.phpt @@ -14,30 +14,37 @@ $jd_days = Array( ); foreach ($jd_days as $jd_day) { + echo "=== ", $jd_day, "\n"; var_dump(jdmonthname($jd_day,0)); var_dump(jdmonthname($jd_day,1)); var_dump(jdmonthname($jd_day,2)); var_dump(jdmonthname($jd_day,3)); var_dump(jdmonthname($jd_day,4)); var_dump(jdmonthname($jd_day,5)); + echo "\n"; } echo "Done\n"; ?> --EXPECTF-- +=== 2453396 string(3) "Jan" string(7) "January" string(3) "Jan" string(7) "January" string(6) "Shevat" string(0) "" + +=== 2440588 string(3) "Jan" string(7) "January" string(3) "Dec" string(8) "December" string(5) "Tevet" string(0) "" + +=== -1 string(0) "" string(0) "" string(0) "" @@ -45,6 +52,8 @@ string(0) "" string(0) "" string(0) "" +=== Array + Warning: jdmonthname() expects parameter 1 to be long, array given in %s on line %d bool(false) @@ -62,10 +71,13 @@ bool(false) Warning: jdmonthname() expects parameter 1 to be long, array given in %s on line %d bool(false) + +=== 10000000 string(3) "Dec" string(8) "December" string(3) "Jul" string(4) "July" string(6) "Tishri" string(0) "" + Done diff --git a/ext/calendar/tests/unixtojd.phpt b/ext/calendar/tests/unixtojd.phpt index e8e953c37..11edde5f2 100644 --- a/ext/calendar/tests/unixtojd.phpt +++ b/ext/calendar/tests/unixtojd.phpt @@ -4,11 +4,12 @@ unixtojd() <?php include 'skipif.inc'; ?> --FILE-- <?php +putenv('TZ=UTC'); echo unixtojd(40000). "\n"; echo unixtojd(1000000000). "\n"; echo unixtojd(1152459009). "\n"; ?> --EXPECT-- 2440588 -2452161 +2452162 2453926 diff --git a/ext/com_dotnet/com_com.c b/ext/com_dotnet/com_com.c index 1584036e1..bf54525a1 100644 --- a/ext/com_dotnet/com_com.c +++ b/ext/com_dotnet/com_com.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_com.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: com_com.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 546e8750c..21e9b9777 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_dotnet.c 313827 2011-07-28 10:34:16Z pajoye $ */ +/* $Id: com_dotnet.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_extension.c b/ext/com_dotnet/com_extension.c index 9cbb5d1b8..e166bc9a3 100644 --- a/ext/com_dotnet/com_extension.c +++ b/ext/com_dotnet/com_extension.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_extension.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: com_extension.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_handlers.c b/ext/com_dotnet/com_handlers.c index 33e1fcd48..a15c79d4d 100644 --- a/ext/com_dotnet/com_handlers.c +++ b/ext/com_dotnet/com_handlers.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_handlers.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: com_handlers.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_iterator.c b/ext/com_dotnet/com_iterator.c index a7f432e7a..113f5436b 100644 --- a/ext/com_dotnet/com_iterator.c +++ b/ext/com_dotnet/com_iterator.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_iterator.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: com_iterator.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_misc.c b/ext/com_dotnet/com_misc.c index 2dc9530bf..496997a62 100644 --- a/ext/com_dotnet/com_misc.c +++ b/ext/com_dotnet/com_misc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_misc.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: com_misc.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_olechar.c b/ext/com_dotnet/com_olechar.c index 129b347fb..77251594d 100644 --- a/ext/com_dotnet/com_olechar.c +++ b/ext/com_dotnet/com_olechar.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_olechar.c 307626 2011-01-20 13:57:40Z pajoye $ */ +/* $Id: com_olechar.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_persist.c b/ext/com_dotnet/com_persist.c index a4b01b422..326627c2d 100755 --- a/ext/com_dotnet/com_persist.c +++ b/ext/com_dotnet/com_persist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_persist.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: com_persist.c 321634 2012-01-01 13:15:04Z felipe $ */ /* Infrastructure for working with persistent COM objects. * Implements: IStream* wrapper for PHP streams. diff --git a/ext/com_dotnet/com_saproxy.c b/ext/com_dotnet/com_saproxy.c index e4f6e72ef..219d4a540 100644 --- a/ext/com_dotnet/com_saproxy.c +++ b/ext/com_dotnet/com_saproxy.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_saproxy.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: com_saproxy.c 321634 2012-01-01 13:15:04Z felipe $ */ /* This module implements a SafeArray proxy which is used internally * by the engine when resolving multi-dimensional array accesses on diff --git a/ext/com_dotnet/com_typeinfo.c b/ext/com_dotnet/com_typeinfo.c index a2c3d6978..f70f5328e 100644 --- a/ext/com_dotnet/com_typeinfo.c +++ b/ext/com_dotnet/com_typeinfo.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_typeinfo.c 307614 2011-01-20 06:49:17Z pajoye $ */ +/* $Id: com_typeinfo.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_variant.c b/ext/com_dotnet/com_variant.c index 4d00feeb4..faed69b0d 100644 --- a/ext/com_dotnet/com_variant.c +++ b/ext/com_dotnet/com_variant.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_variant.c 307617 2011-01-20 06:58:04Z pajoye $ */ +/* $Id: com_variant.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/com_dotnet/com_wrapper.c b/ext/com_dotnet/com_wrapper.c index 6cff4b969..e244ef620 100644 --- a/ext/com_dotnet/com_wrapper.c +++ b/ext/com_dotnet/com_wrapper.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: com_wrapper.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: com_wrapper.c 321634 2012-01-01 13:15:04Z felipe $ */ /* This module exports a PHP object as a COM object by wrapping it * using IDispatchEx */ diff --git a/ext/com_dotnet/php_com_dotnet.h b/ext/com_dotnet/php_com_dotnet.h index f2243a020..3c3768eaa 100644 --- a/ext/com_dotnet/php_com_dotnet.h +++ b/ext/com_dotnet/php_com_dotnet.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_com_dotnet.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_com_dotnet.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_COM_DOTNET_H #define PHP_COM_DOTNET_H diff --git a/ext/com_dotnet/php_com_dotnet_internal.h b/ext/com_dotnet/php_com_dotnet_internal.h index a8837b693..ace4fcdfe 100644 --- a/ext/com_dotnet/php_com_dotnet_internal.h +++ b/ext/com_dotnet/php_com_dotnet_internal.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_com_dotnet_internal.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_com_dotnet_internal.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_COM_DOTNET_INTERNAL_H #define PHP_COM_DOTNET_INTERNAL_H diff --git a/ext/ctype/ctype.c b/ext/ctype/ctype.c index b80e1df6e..64cbf1579 100644 --- a/ext/ctype/ctype.c +++ b/ext/ctype/ctype.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/ctype/php_ctype.h b/ext/ctype/php_ctype.h index 0036702d9..484b34739 100644 --- a/ext/ctype/php_ctype.h +++ b/ext/ctype/php_ctype.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 23bd2edce..02f7fdf76 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interface.c 313826 2011-07-28 10:31:34Z pajoye $ */ +/* $Id: interface.c 321634 2012-01-01 13:15:04Z felipe $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -150,6 +150,7 @@ static struct gcry_thread_cbs php_curl_gnutls_tsl = { static void _php_curl_close_ex(php_curl *ch TSRMLS_DC); static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC); + #define SAVE_CURL_ERROR(__handle, __err) (__handle)->err.no = (int) __err; #define CAAL(s, v) add_assoc_long_ex(return_value, s, sizeof(s), (long) v); @@ -197,13 +198,79 @@ static int php_curl_option_url(php_curl *ch, const char *url, const int len) /* #else copystr = estrndup(url, len); error = curl_easy_setopt(ch->cp, CURLOPT_URL, copystr); - zend_llist_add_element(&ch->to_free.str, ©str); + zend_llist_add_element(&ch->to_free->str, ©str); #endif return (error == CURLE_OK ? 1 : 0); } /* }}} */ +int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC) /* {{{ */ +{ + php_stream *stream; + if (!ch || !ch->handlers) { + return 0; + } + + if (ch->handlers->std_err) { + stream = (php_stream *) zend_fetch_resource(&ch->handlers->std_err TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); + if (stream == NULL) { + if (reporterror) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_STDERR resource has gone away, resetting to stderr"); + } + zval_ptr_dtor(&ch->handlers->std_err); + ch->handlers->std_err = NULL; + + curl_easy_setopt(ch->cp, CURLOPT_STDERR, stderr); + } + } + if (ch->handlers->read && ch->handlers->read->stream) { + stream = (php_stream *) zend_fetch_resource(&ch->handlers->read->stream TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); + if (stream == NULL) { + if (reporterror) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_INFILE resource has gone away, resetting to default"); + } + zval_ptr_dtor(&ch->handlers->read->stream); + ch->handlers->read->fd = 0; + ch->handlers->read->fp = 0; + ch->handlers->read->stream = NULL; + + curl_easy_setopt(ch->cp, CURLOPT_INFILE, (void *) ch); + } + } + if (ch->handlers->write_header && ch->handlers->write_header->stream) { + stream = (php_stream *) zend_fetch_resource(&ch->handlers->write_header->stream TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); + if (stream == NULL) { + if (reporterror) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_WRITEHEADER resource has gone away, resetting to default"); + } + zval_ptr_dtor(&ch->handlers->write_header->stream); + ch->handlers->write_header->fp = 0; + ch->handlers->write_header->stream = NULL; + + ch->handlers->write_header->method = PHP_CURL_IGNORE; + curl_easy_setopt(ch->cp, CURLOPT_WRITEHEADER, (void *) ch); + } + } + if (ch->handlers->write && ch->handlers->write->stream) { + stream = (php_stream *) zend_fetch_resource(&ch->handlers->write->stream TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); + if (stream == NULL) { + if (reporterror) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FILE resource has gone away, resetting to default"); + } + zval_ptr_dtor(&ch->handlers->write->stream); + ch->handlers->write->fp = 0; + ch->handlers->write->stream = NULL; + + ch->handlers->write->method = PHP_CURL_STDOUT; + ch->handlers->write->type = PHP_CURL_ASCII; + curl_easy_setopt(ch->cp, CURLOPT_FILE, (void *) ch); + } + } + return 1; +} +/* }}} */ + /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO_EX(arginfo_curl_version, 0, 0, 0) ZEND_ARG_INFO(0, version) @@ -337,7 +404,6 @@ PHP_INI_BEGIN() PHP_INI_END() /* }}} */ -/* }}} */ /* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(curl) @@ -1346,6 +1412,7 @@ PHP_FUNCTION(curl_version) static void alloc_curl_handle(php_curl **ch) { *ch = emalloc(sizeof(php_curl)); + (*ch)->to_free = ecalloc(1, sizeof(struct _php_curl_free)); (*ch)->handlers = ecalloc(1, sizeof(php_curl_handlers)); (*ch)->handlers->write = ecalloc(1, sizeof(php_curl_write)); (*ch)->handlers->write_header = ecalloc(1, sizeof(php_curl_write)); @@ -1356,10 +1423,13 @@ static void alloc_curl_handle(php_curl **ch) (*ch)->header.str_len = 0; memset(&(*ch)->err, 0, sizeof((*ch)->err)); + (*ch)->handlers->write->stream = NULL; + (*ch)->handlers->write_header->stream = NULL; + (*ch)->handlers->read->stream = NULL; - zend_llist_init(&(*ch)->to_free.str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0); - zend_llist_init(&(*ch)->to_free.slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0); - zend_llist_init(&(*ch)->to_free.post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0); + zend_llist_init(&(*ch)->to_free->str, sizeof(char *), (llist_dtor_func_t) curl_free_string, 0); + zend_llist_init(&(*ch)->to_free->slist, sizeof(struct curl_slist), (llist_dtor_func_t) curl_free_slist, 0); + zend_llist_init(&(*ch)->to_free->post, sizeof(struct HttpPost), (llist_dtor_func_t) curl_free_post, 0); } /* }}} */ @@ -1394,6 +1464,7 @@ static void split_certinfo(char *string, zval *hash) efree(org); } } +/* }}} */ /* {{{ create_certinfo */ @@ -1537,6 +1608,7 @@ PHP_FUNCTION(curl_copy_handle) dupch->cp = cp; dupch->uses = 0; + ch->uses++; if (ch->handlers->write->stream) { Z_ADDREF_P(dupch->handlers->write->stream); dupch->handlers->write->stream = ch->handlers->write->stream; @@ -1577,18 +1649,21 @@ PHP_FUNCTION(curl_copy_handle) zval_add_ref(&ch->handlers->write_header->func_name); dupch->handlers->write_header->func_name = ch->handlers->write_header->func_name; } + + if (ch->handlers->progress->func_name) { + zval_add_ref(&ch->handlers->progress->func_name); + dupch->handlers->progress->func_name = ch->handlers->progress->func_name; + } + dupch->handlers->progress->method = ch->handlers->progress->method; curl_easy_setopt(dupch->cp, CURLOPT_ERRORBUFFER, dupch->err.str); curl_easy_setopt(dupch->cp, CURLOPT_FILE, (void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_INFILE, (void *) dupch); curl_easy_setopt(dupch->cp, CURLOPT_WRITEHEADER, (void *) dupch); + curl_easy_setopt(dupch->cp, CURLOPT_PROGRESSDATA, (void *) dupch); - zend_llist_copy(&dupch->to_free.str, &ch->to_free.str); - /* Don't try to free copied strings, they're free'd when the original handle is destroyed */ - dupch->to_free.str.dtor = NULL; - - zend_llist_copy(&dupch->to_free.slist, &ch->to_free.slist); - zend_llist_copy(&dupch->to_free.post, &ch->to_free.post); + efree(dupch->to_free); + dupch->to_free = ch->to_free; /* Keep track of cloned copies to avoid invoking curl destructors for every clone */ Z_ADDREF_P(ch->clone); @@ -1782,7 +1857,7 @@ string_copy: #endif copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue)); error = curl_easy_setopt(ch->cp, option, copystr); - zend_llist_add_element(&ch->to_free.str, ©str); + zend_llist_add_element(&ch->to_free->str, ©str); } else { #if LIBCURL_VERSION_NUM >= 0x071100 /* Strings passed to libcurl as ’char *’ arguments, are copied by the library... NOTE: before 7.17.0 strings were not copied. */ @@ -1822,6 +1897,9 @@ string_copy: switch (option) { case CURLOPT_FILE: if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') { + if (ch->handlers->write->stream) { + Z_DELREF_P(ch->handlers->write->stream); + } Z_ADDREF_PP(zvalue); ch->handlers->write->fp = fp; ch->handlers->write->method = PHP_CURL_FILE; @@ -1834,6 +1912,9 @@ string_copy: break; case CURLOPT_WRITEHEADER: if (((php_stream *) what)->mode[0] != 'r' || ((php_stream *) what)->mode[1] == '+') { + if (ch->handlers->write_header->stream) { + Z_DELREF_P(ch->handlers->write_header->stream); + } Z_ADDREF_PP(zvalue); ch->handlers->write_header->fp = fp; ch->handlers->write_header->method = PHP_CURL_FILE; @@ -1845,6 +1926,9 @@ string_copy: } break; case CURLOPT_INFILE: + if (ch->handlers->read->stream) { + Z_DELREF_P(ch->handlers->read->stream); + } Z_ADDREF_PP(zvalue); ch->handlers->read->fp = fp; ch->handlers->read->fd = Z_LVAL_PP(zvalue); @@ -2014,7 +2098,7 @@ string_copy: return 1; } - zend_llist_add_element(&ch->to_free.post, &first); + zend_llist_add_element(&ch->to_free->post, &first); error = curl_easy_setopt(ch->cp, CURLOPT_HTTPPOST, first); } else { @@ -2028,7 +2112,7 @@ string_copy: convert_to_string_ex(zvalue); post = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue)); - zend_llist_add_element(&ch->to_free.str, &post); + zend_llist_add_element(&ch->to_free->str, &post); error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDS, post); error = curl_easy_setopt(ch->cp, CURLOPT_POSTFIELDSIZE, Z_STRLEN_PP(zvalue)); @@ -2064,7 +2148,7 @@ string_copy: return 1; } } - zend_llist_add_element(&ch->to_free.slist, &slist); + zend_llist_add_element(&ch->to_free->slist, &slist); error = curl_easy_setopt(ch->cp, option, slist); @@ -2094,7 +2178,7 @@ string_copy: copystr = estrndup(Z_STRVAL_PP(zvalue), Z_STRLEN_PP(zvalue)); error = curl_easy_setopt(ch->cp, option, copystr); - zend_llist_add_element(&ch->to_free.str, ©str); + zend_llist_add_element(&ch->to_free->str, ©str); #endif break; } @@ -2211,6 +2295,8 @@ PHP_FUNCTION(curl_exec) ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl); + _php_curl_verify_handlers(ch, 1 TSRMLS_CC); + _php_curl_cleanup_handle(ch); error = curl_easy_perform(ch->cp); @@ -2223,6 +2309,14 @@ PHP_FUNCTION(curl_exec) RETURN_FALSE; } + if (ch->handlers->std_err) { + php_stream *stream; + stream = (php_stream*)zend_fetch_resource(&ch->handlers->std_err TSRMLS_CC, -1, NULL, NULL, 2, php_file_le_stream(), php_file_le_pstream()); + if (stream) { + php_stream_flush(stream); + } + } + if (ch->handlers->write->method == PHP_CURL_RETURN && ch->handlers->write->buf.len > 0) { smart_str_0(&ch->handlers->write->buf); RETURN_STRINGL(ch->handlers->write->buf.c, ch->handlers->write->buf.len, 1); @@ -2500,25 +2594,18 @@ static void _php_curl_close_ex(php_curl *ch TSRMLS_DC) fprintf(stderr, "DTOR CALLED, ch = %x\n", ch); #endif - /* Prevent crash inside cURL if passed file has already been closed */ - if (ch->handlers->std_err && Z_REFCOUNT_P(ch->handlers->std_err) <= 0) { - curl_easy_setopt(ch->cp, CURLOPT_STDERR, stderr); - } - + _php_curl_verify_handlers(ch, 0 TSRMLS_CC); curl_easy_cleanup(ch->cp); - zend_llist_clean(&ch->to_free.str); /* cURL destructors should be invoked only by last curl handle */ if (Z_REFCOUNT_P(ch->clone) <= 1) { - zend_llist_clean(&ch->to_free.slist); - zend_llist_clean(&ch->to_free.post); + zend_llist_clean(&ch->to_free->str); + zend_llist_clean(&ch->to_free->slist); + zend_llist_clean(&ch->to_free->post); + efree(ch->to_free); FREE_ZVAL(ch->clone); } else { Z_DELREF_P(ch->clone); - ch->to_free.slist.dtor = NULL; - ch->to_free.post.dtor = NULL; - zend_llist_clean(&ch->to_free.slist); - zend_llist_clean(&ch->to_free.post); } if (ch->handlers->write->buf.len > 0) { diff --git a/ext/curl/multi.c b/ext/curl/multi.c index 98a08159e..8679797aa 100644 --- a/ext/curl/multi.c +++ b/ext/curl/multi.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: multi.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: multi.c 321634 2012-01-01 13:15:04Z felipe $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -211,6 +211,19 @@ PHP_FUNCTION(curl_multi_exec) ZEND_FETCH_RESOURCE(mh, php_curlm *, &z_mh, -1, le_curl_multi_handle_name, le_curl_multi_handle); + { + zend_llist_position pos; + php_curl *ch; + zval *pz_ch; + + for(pz_ch = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch; + pz_ch = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) { + + ZEND_FETCH_RESOURCE(ch, php_curl *, &pz_ch, -1, le_curl_name, le_curl); + _php_curl_verify_handlers(ch, 1 TSRMLS_CC); + } + } + convert_to_long_ex(&z_still_running); still_running = Z_LVAL_P(z_still_running); result = curl_multi_perform(mh->multi, &still_running); @@ -324,6 +337,17 @@ void _php_curl_multi_close(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */ { php_curlm *mh = (php_curlm *) rsrc->ptr; if (mh) { + zend_llist_position pos; + php_curl *ch; + zval *pz_ch; + + for(pz_ch = (zval *)zend_llist_get_first_ex(&mh->easyh, &pos); pz_ch; + pz_ch = (zval *)zend_llist_get_next_ex(&mh->easyh, &pos)) { + + ch = (php_curl *) zend_fetch_resource(&pz_ch TSRMLS_CC, -1, le_curl_name, NULL, 1, le_curl); + _php_curl_verify_handlers(ch, 0 TSRMLS_CC); + } + curl_multi_cleanup(mh->multi); zend_llist_clean(&mh->easyh); efree(mh); diff --git a/ext/curl/php_curl.h b/ext/curl/php_curl.h index 844cc0ab3..88cd4686a 100644 --- a/ext/curl/php_curl.h +++ b/ext/curl/php_curl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_curl.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_curl.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef _PHP_CURL_H #define _PHP_CURL_H @@ -131,7 +131,7 @@ struct _php_curl_free { typedef struct { struct _php_curl_error err; - struct _php_curl_free to_free; + struct _php_curl_free *to_free; struct _php_curl_send_headers header; void ***thread_ctx; CURL *cp; @@ -150,6 +150,7 @@ typedef struct { void _php_curl_cleanup_handle(php_curl *); void _php_curl_multi_cleanup_list(void *data); +int _php_curl_verify_handlers(php_curl *ch, int reporterror TSRMLS_DC); /* streams support */ diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 264f33d26..525a351c3 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: streams.c 321634 2012-01-01 13:15:04Z felipe $ */ /* This file implements cURL based wrappers. * NOTE: If you are implementing your own streams that are intended to diff --git a/ext/curl/tests/bug27023.phpt b/ext/curl/tests/bug27023.phpt new file mode 100644 index 000000000..b738c956e --- /dev/null +++ b/ext/curl/tests/bug27023.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #27023 (CURLOPT_POSTFIELDS does not parse content types for files) +--SKIPIF-- +<?php +if (!extension_loaded("curl")) { + exit("skip curl extension not loaded"); +} +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined"); +} +?> +--FILE-- +<?php + +$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); +$ch = curl_init(); +curl_setopt($ch, CURLOPT_URL, "{$host}/get.php?test=file"); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;type=text/plain;filename=foo.txt'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + +$params = array('file' => '@' . __DIR__ . '/curl_testdata1.txt;filename=foo.txt;type=text/plain'); +curl_setopt($ch, CURLOPT_POSTFIELDS, $params); +var_dump(curl_exec($ch)); + + +curl_close($ch); +?> +--EXPECTF-- +string(%d) "curl_testdata1.txt|application/octet-stream" +string(%d) "curl_testdata1.txt|text/plain" +string(%d) "foo.txt|application/octet-stream" +string(%d) "foo.txt|text/plain" +string(%d) "foo.txt|text/plain" diff --git a/ext/curl/tests/bug48203.phpt b/ext/curl/tests/bug48203.phpt index 84fcf83a0..d8f4d2269 100644 --- a/ext/curl/tests/bug48203.phpt +++ b/ext/curl/tests/bug48203.phpt @@ -18,16 +18,19 @@ $ch = curl_init(); curl_setopt($ch, CURLOPT_VERBOSE, 1); curl_setopt($ch, CURLOPT_STDERR, $fp); -curl_setopt($ch, CURLOPT_URL, ""); +curl_setopt($ch, CURLOPT_URL, getenv('PHP_CURL_HTTP_REMOTE_SERVER')); fclose($fp); // <-- premature close of $fp caused a crash! curl_exec($ch); +curl_close($ch); echo "Ok\n"; ?> --CLEAN-- <?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> ---EXPECT-- +--EXPECTF-- +Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203.php on line %d +%A Ok diff --git a/ext/curl/tests/bug48203_multi.phpt b/ext/curl/tests/bug48203_multi.phpt new file mode 100644 index 000000000..7d4ee4769 --- /dev/null +++ b/ext/curl/tests/bug48203_multi.phpt @@ -0,0 +1,90 @@ +--TEST-- +Variation of bug #48203 with curl_multi_exec (Crash when file pointers passed to curl are closed before calling curl_multi_exec) +--SKIPIF-- +<?php +if (!extension_loaded("curl")) { + exit("skip curl extension not loaded"); +} +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined"); +} +?> +--FILE-- +<?php + +function checkForClosedFilePointer($curl_option, $description) { + $fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w'); + + $ch1 = curl_init(); + $ch2 = curl_init(); + + $options = array( + CURLOPT_RETURNTRANSFER => 1, + $curl_option => $fp, + CURLOPT_URL => getenv("PHP_CURL_HTTP_REMOTE_SERVER") + ); + + // we also need to set CURLOPT_VERBOSE to test CURLOPT_STDERR properly + if (CURLOPT_STDERR == $curl_option) { + $options[CURLOPT_VERBOSE] = 1; + } + + if (CURLOPT_INFILE == $curl_option) { + $options[CURLOPT_UPLOAD] = 1; + } + + curl_setopt_array($ch1, $options); + curl_setopt_array($ch2, $options); + + fclose($fp); // <-- premature close of $fp caused a crash! + + $mh = curl_multi_init(); + + curl_multi_add_handle($mh, $ch1); + curl_multi_add_handle($mh, $ch2); + + $active = 0; + do { + curl_multi_exec($mh, $active); + } while ($active > 0); + + curl_multi_remove_handle($mh, $ch1); + curl_multi_remove_handle($mh, $ch2); + curl_multi_close($mh); + + echo "Ok for $description\n"; +} + +$options_to_check = array( + "CURLOPT_STDERR", "CURLOPT_WRITEHEADER", "CURLOPT_FILE", "CURLOPT_INFILE" +); + +foreach($options_to_check as $option) { + checkForClosedFilePointer(constant($option), $option); +} + +?> +--CLEAN-- +<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?> +--EXPECTF-- +Warning: curl_multi_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_multi.php on line 36 + +Warning: curl_multi_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203_multi.php on line 36 +%A +Ok for CURLOPT_STDERR +%A +Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 + +Warning: curl_multi_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug48203_multi.php on line 36 +Ok for CURLOPT_WRITEHEADER + +Warning: curl_multi_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36 + +Warning: curl_multi_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36 +%A +Ok for CURLOPT_FILE + +Warning: curl_multi_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36 + +Warning: curl_multi_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug48203_multi.php on line 36 +Ok for CURLOPT_INFILE diff --git a/ext/curl/tests/bug54798.phpt b/ext/curl/tests/bug54798.phpt new file mode 100644 index 000000000..7ec84adda --- /dev/null +++ b/ext/curl/tests/bug54798.phpt @@ -0,0 +1,72 @@ +--TEST-- +Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec) +--SKIPIF-- +<?php +if (!extension_loaded("curl")) { + exit("skip curl extension not loaded"); +} +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined"); +} +?> +--FILE-- +<?php + +function checkForClosedFilePointer($host, $curl_option, $description) { + $fp = fopen(dirname(__FILE__) . '/bug54798.tmp', 'w+'); + + $ch = curl_init(); + + // we also need CURLOPT_VERBOSE to be set to test CURLOPT_STDERR properly + if (CURLOPT_STDERR == $curl_option) { + curl_setopt($ch, CURLOPT_VERBOSE, 1); + } + + if (CURLOPT_INFILE == $curl_option) { + curl_setopt($ch, CURLOPT_UPLOAD, 1); + } + + curl_setopt($ch, $curl_option, $fp); + + curl_setopt($ch, CURLOPT_URL, $host); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + + fclose($fp); // <-- premature close of $fp caused a crash! + + curl_exec($ch); + + curl_close($ch); + + echo "Ok for $description\n"; +} + +$options_to_check = array( + "CURLOPT_STDERR", + "CURLOPT_WRITEHEADER", + "CURLOPT_FILE", + "CURLOPT_INFILE" +); + +$host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); +foreach($options_to_check as $option) { + checkForClosedFilePointer($host, constant($option), $option); +} + +?> +--CLEAN-- +<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?> +--EXPECTF-- +Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug54798.php on line %d +* About to connect() %a +* Closing connection #%d +Ok for CURLOPT_STDERR + +Warning: curl_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %sbug54798.php on line 24 +Ok for CURLOPT_WRITEHEADER + +Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %sbug54798.php on line 24 +%a +Ok for CURLOPT_FILE + +Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %sbug54798.php on line %d +Ok for CURLOPT_INFILE diff --git a/ext/curl/tests/curl_CURLOPT_READDATA.phpt b/ext/curl/tests/curl_CURLOPT_READDATA.phpt index 00f3ea95a..ea63d445a 100644 --- a/ext/curl/tests/curl_CURLOPT_READDATA.phpt +++ b/ext/curl/tests/curl_CURLOPT_READDATA.phpt @@ -4,7 +4,7 @@ Test CURLOPT_READDATA without a callback function Mattijs Hoitink mattijshoitink@gmail.com #Testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php diff --git a/ext/curl/tests/curl_basic_008.phpt b/ext/curl/tests/curl_basic_008.phpt index 32de4d0f5..29e334370 100755 --- a/ext/curl/tests/curl_basic_008.phpt +++ b/ext/curl/tests/curl_basic_008.phpt @@ -3,7 +3,13 @@ Test curl_error() & curl_errno() function with problematic host --CREDITS-- TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net> --SKIPIF-- -<?php if (!extension_loaded("curl")) print "skip"; ?> +<?php + if (!extension_loaded("curl")) print "skip"; + $addr = "www.".uniqid().".".uniqid(); + if (gethostbyname($addr) != $addr) { + print "skip catch all dns"; + } +?> --FILE-- <?php diff --git a/ext/curl/tests/curl_basic_010.phpt b/ext/curl/tests/curl_basic_010.phpt index 9a595b3c0..7da64d39b 100644 --- a/ext/curl/tests/curl_basic_010.phpt +++ b/ext/curl/tests/curl_basic_010.phpt @@ -3,7 +3,13 @@ Test curl_error() & curl_errno() function with problematic proxy --CREDITS-- TestFest 2009 - AFUP - Perrick Penet <perrick@noparking.net> --SKIPIF-- -<?php if (!extension_loaded("curl")) print "skip"; ?> +<?php + if (!extension_loaded("curl")) print "skip"; + $addr = "www.".uniqid().".".uniqid(); + if (gethostbyname($addr) != $addr) { + print "skip catch all dns"; + } +?> --FILE-- <?php diff --git a/ext/curl/tests/curl_basic_011.phpt b/ext/curl/tests/curl_basic_011.phpt index dfdc8f9e0..10c90b123 100644 --- a/ext/curl/tests/curl_basic_011.phpt +++ b/ext/curl/tests/curl_basic_011.phpt @@ -3,7 +3,7 @@ Test curl_opt() function with COOKIE --CREDITS-- TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com> --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv(b'PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php /* Prototype : bool curl_setopt(resource ch, int option, mixed value) @@ -35,4 +35,4 @@ TestFest 2009 - AFUP - Xavier Gorse <xgorse@elao.com> *** Testing curl with cookie *** string(3) "bar" ===DONE=== -
\ No newline at end of file + diff --git a/ext/curl/tests/curl_copy_handle_basic_001.phpt b/ext/curl/tests/curl_copy_handle_basic_001.phpt index db4bf0233..f1b4db3ce 100644 --- a/ext/curl/tests/curl_copy_handle_basic_001.phpt +++ b/ext/curl/tests/curl_copy_handle_basic_001.phpt @@ -4,7 +4,7 @@ Test curl_copy_handle() with simple get Rick Buitenman <rick@meritos.nl> #testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php @@ -39,4 +39,4 @@ string(106) "array(2) { array(0) { } " -===DONE===
\ No newline at end of file +===DONE=== diff --git a/ext/curl/tests/curl_copy_handle_basic_002.phpt b/ext/curl/tests/curl_copy_handle_basic_002.phpt index 8a3582384..9ab33635f 100644 --- a/ext/curl/tests/curl_copy_handle_basic_002.phpt +++ b/ext/curl/tests/curl_copy_handle_basic_002.phpt @@ -4,7 +4,7 @@ Test curl_copy_handle() with simple POST Rick Buitenman <rick@meritos.nl> #testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); @@ -29,8 +29,6 @@ Rick Buitenman <rick@meritos.nl> var_dump( $curl_content ); ?> ===DONE=== ---XFAIL-- -This test fails, the copy seems to be missing the CURLOPT_POSTFIELDS after the original is closed --EXPECTF-- *** Testing curl copy handle with simple POST *** string(163) "array(1) { diff --git a/ext/curl/tests/curl_copy_handle_basic_004.phpt b/ext/curl/tests/curl_copy_handle_basic_004.phpt index 2b75eb6a4..9b794e91b 100644 --- a/ext/curl/tests/curl_copy_handle_basic_004.phpt +++ b/ext/curl/tests/curl_copy_handle_basic_004.phpt @@ -4,7 +4,7 @@ Test curl_copy_handle() after exec() Rick Buitenman <rick@meritos.nl> #testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php @@ -41,4 +41,4 @@ string(106) "array(2) { array(0) { } " -===DONE===
\ No newline at end of file +===DONE=== diff --git a/ext/curl/tests/curl_copy_handle_basic_005.phpt b/ext/curl/tests/curl_copy_handle_basic_005.phpt index dcc7e47af..aa9e2fa99 100644 --- a/ext/curl/tests/curl_copy_handle_basic_005.phpt +++ b/ext/curl/tests/curl_copy_handle_basic_005.phpt @@ -4,7 +4,7 @@ Test curl_copy_handle() after exec() with POST Rick Buitenman <rick@meritos.nl> #testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php @@ -32,8 +32,6 @@ Rick Buitenman <rick@meritos.nl> var_dump( $curl_content_copy ); ?> ===DONE=== ---XFAIL-- -This test fails, the output of the copy seems to be corrupted if the original is closed after exec() --EXPECTF-- *** Test curl_copy_handle() after exec() with POST *** string(163) "array(1) { diff --git a/ext/curl/tests/curl_copy_handle_basic_006.phpt b/ext/curl/tests/curl_copy_handle_basic_006.phpt index d2374c721..defc0f232 100644 --- a/ext/curl/tests/curl_copy_handle_basic_006.phpt +++ b/ext/curl/tests/curl_copy_handle_basic_006.phpt @@ -4,7 +4,7 @@ Test curl_copy_handle() with User Agent Rick Buitenman <rick@meritos.nl> #testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php diff --git a/ext/curl/tests/curl_copy_handle_basic_007.phpt b/ext/curl/tests/curl_copy_handle_basic_007.phpt index a51d9f6df..aa7306c1c 100644 --- a/ext/curl/tests/curl_copy_handle_basic_007.phpt +++ b/ext/curl/tests/curl_copy_handle_basic_007.phpt @@ -1,7 +1,7 @@ --TEST-- Test curl_copy_handle() with simple POST --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); diff --git a/ext/curl/tests/curl_copy_handle_basic_008.phpt b/ext/curl/tests/curl_copy_handle_basic_008.phpt new file mode 100644 index 000000000..692c2df19 --- /dev/null +++ b/ext/curl/tests/curl_copy_handle_basic_008.phpt @@ -0,0 +1,25 @@ +--TEST-- +Test curl_copy_handle() with CURLOPT_PROGRESSFUNCTION +--SKIPIF-- +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> +--FILE-- +<?php + $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); + + $url = "{$host}/get.php"; + $ch = curl_init($url); + + curl_setopt($ch, CURLOPT_NOPROGRESS, 0); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_PROGRESSFUNCTION, function() { }); + $ch2 = curl_copy_handle($ch); + echo curl_exec($ch), PHP_EOL; + unset($ch); + echo curl_exec($ch2); + +?> +--EXPECTF-- +Hello World! +Hello World! +Hello World! +Hello World! diff --git a/ext/curl/tests/curl_error_basic.phpt b/ext/curl/tests/curl_error_basic.phpt index c9aa9ef8a..bd01847f0 100644 --- a/ext/curl/tests/curl_error_basic.phpt +++ b/ext/curl/tests/curl_error_basic.phpt @@ -4,7 +4,15 @@ curl_error() function - basic test for curl_error using a fake url Mattijs Hoitink mattijshoitink@gmail.com #Testfest Utrecht 2009 --SKIPIF-- -<?php if (!extension_loaded("curl")) print "skip"; ?> +<?php + +if (!extension_loaded("curl")) die("skip\n"); + +$url = "fakeURL"; +$ip = gethostbyname($url); +if ($ip != $url) die("skip 'fakeURL' resolves to $ip\n"); + +?> --FILE-- <?php /* @@ -21,13 +29,13 @@ echo "== Testing curl_error with a fake URL ==\n"; // cURL handler $ch = curl_init($url); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); -ob_start(); // start output buffering curl_exec($ch); -echo "Error: " . curl_error($ch); +var_dump(curl_error($ch)); curl_close($ch); ?> ---EXPECT-- +--EXPECTF-- == Testing curl_error with a fake URL == -Error: Couldn't resolve host 'fakeURL' +string(%d) "%sfakeURL%s" diff --git a/ext/curl/tests/curl_file_deleted_before_curl_close.phpt b/ext/curl/tests/curl_file_deleted_before_curl_close.phpt new file mode 100644 index 000000000..592f110fb --- /dev/null +++ b/ext/curl/tests/curl_file_deleted_before_curl_close.phpt @@ -0,0 +1,38 @@ +--TEST-- +Memory corruption error if fp of just created file is closed before curl_close. +--CREDITS-- +Alexey Shein <confik@gmail.com> +--SKIPIF-- +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +--FILE-- +<?php + +$ch = curl_init(getenv('PHP_CURL_HTTP_REMOTE_SERVER')); + +$temp_file = dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp'; +if (file_exists($temp_file)) { + unlink($temp_file); // file should not exist before test +} + +$handle = fopen($temp_file, 'w'); + +curl_setopt($ch, CURLOPT_STDERR, $handle); +curl_setopt($ch, CURLOPT_VERBOSE, 1); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + +curl_exec($ch); + +fclose($handle); // causes glibc memory error + +//unlink($temp_file); // uncomment to test segfault (file not found on iowrite.c) + +curl_close($ch); +echo "Closed correctly\n"; +?> +--CLEAN-- +<?php +unlink(dirname(__FILE__) . '/curl_file_deleted_before_curl_close.tmp'); +?> +--EXPECTF-- +* Closing connection #%d +Closed correctly diff --git a/ext/curl/tests/curl_multi_getcontent_basic3.phpt b/ext/curl/tests/curl_multi_getcontent_basic3.phpt index bf17ab6b6..ac2a37172 100644 --- a/ext/curl/tests/curl_multi_getcontent_basic3.phpt +++ b/ext/curl/tests/curl_multi_getcontent_basic3.phpt @@ -5,7 +5,10 @@ Rein Velt (rein@velt.org) #TestFest Utrecht 20090509 --SKIPIF-- <?php -if (!extension_loaded('curl')) print 'skip'; +if (!extension_loaded('curl')) print 'skip need ext/curl'; +if (false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + exit("skip PHP_CURL_HTTP_REMOTE_SERVER env variable is not defined"); +} ?> --FILE-- <?php @@ -16,7 +19,8 @@ if (!extension_loaded('curl')) print 'skip'; $ch2=curl_init(); //SET URL AND OTHER OPTIONS - curl_setopt($ch1, CURLOPT_URL, "http://php.net/robots.txt"); + $host = getenv('PHP_CURL_HTTP_REMOTE_SERVER'); + curl_setopt($ch1, CURLOPT_URL, "{$host}/get.php?test=getpost&get_param=Hello%20World"); curl_setopt($ch2, CURLOPT_URL, "file://".dirname(__FILE__). DIRECTORY_SEPARATOR . "curl_testdata2.txt"); curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch2, CURLOPT_RETURNTRANSFER, true); @@ -46,19 +50,13 @@ if (!extension_loaded('curl')) print 'skip'; echo $results2; ?> ---EXPECT-- -User-agent: * -Disallow: /backend/ -Disallow: /distributions/ -Disallow: /stats/ -Disallow: /source.php -Disallow: /search.php -Disallow: /mod.php -Disallow: /manual/add-note.php - -Disallow: /harming/humans -Disallow: /ignoring/human/orders -Disallow: /harm/to/self - +--EXPECTF-- +array(2) { + ["test"]=> + string(7) "getpost" + ["get_param"]=> + string(11) "Hello World" +} +array(0) { +} CURL2 - diff --git a/ext/curl/tests/curl_setopt_array_basic.phpt b/ext/curl/tests/curl_setopt_array_basic.phpt index 877079bca..427de7fc7 100644 --- a/ext/curl/tests/curl_setopt_array_basic.phpt +++ b/ext/curl/tests/curl_setopt_array_basic.phpt @@ -46,6 +46,7 @@ $returnContent = curl_exec($ch); curl_close($ch); var_dump($returnContent); +isset($tempname) and is_file($tempname) and @unlink($tempname); ?> --EXPECT-- diff --git a/ext/curl/tests/curl_setopt_basic002.phpt b/ext/curl/tests/curl_setopt_basic002.phpt index 051703fb0..d90ecb7bd 100644 --- a/ext/curl/tests/curl_setopt_basic002.phpt +++ b/ext/curl/tests/curl_setopt_basic002.phpt @@ -4,7 +4,7 @@ curl_setopt basic tests with CURLOPT_STDERR. Paul Sohier #phptestfest utrecht --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php @@ -26,7 +26,7 @@ $curl_content = curl_exec($ch); fclose($handle); unset($handle); -var_dump( file_get_contents($temp_file) ); +var_dump(preg_replace('/[\r\n]/', ' ', file_get_contents($temp_file))); @unlink($temp_file); ob_start(); // start output buffering @@ -38,7 +38,7 @@ ob_end_clean(); fclose($handle); unset($handle); -var_dump( file_get_contents($temp_file) ); +var_dump(preg_replace('/[\r\n]/', ' ', file_get_contents($temp_file))); @unlink($temp_file); curl_close($ch); @@ -48,3 +48,5 @@ curl_close($ch); *** Testing curl_setopt with CURLOPT_STDERR string(%d) "%S" string(%d) "%S" +* Closing connection #%d + diff --git a/ext/curl/tests/curl_setopt_basic003.phpt b/ext/curl/tests/curl_setopt_basic003.phpt index 47ae0f773..784914076 100644 --- a/ext/curl/tests/curl_setopt_basic003.phpt +++ b/ext/curl/tests/curl_setopt_basic003.phpt @@ -4,7 +4,7 @@ curl_setopt() call with CURLOPT_HTTPHEADER Paul Sohier #phptestfest utrecht --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php diff --git a/ext/curl/tests/curl_setopt_basic004.phpt b/ext/curl/tests/curl_setopt_basic004.phpt index 63f956162..97b4115e3 100644 --- a/ext/curl/tests/curl_setopt_basic004.phpt +++ b/ext/curl/tests/curl_setopt_basic004.phpt @@ -4,7 +4,7 @@ curl_setopt() call with CURLOPT_RETURNTRANSFER Paul Sohier #phptestfest utrecht --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; ?> --FILE-- <?php diff --git a/ext/curl/tests/curl_version_error.phpt b/ext/curl/tests/curl_version_error.phpt index f9de8dd32..fb4793af1 100644 --- a/ext/curl/tests/curl_version_error.phpt +++ b/ext/curl/tests/curl_version_error.phpt @@ -2,9 +2,12 @@ Test curl_version() function : error conditions
--SKIPIF--
<?php
-if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+if (!extension_loaded("curl")) {
die('skip - curl extension not available in this build');
}
+if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
+}
?>
--FILE--
<?php
diff --git a/ext/curl/tests/curl_version_variation1.phpt b/ext/curl/tests/curl_version_variation1.phpt index 4b8676099..cd912c480 100644 --- a/ext/curl/tests/curl_version_variation1.phpt +++ b/ext/curl/tests/curl_version_variation1.phpt @@ -2,8 +2,11 @@ Test curl_version() function : usage variations - test values for $ascii argument
--SKIPIF--
<?php
-if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
- die('skip - curl extension not available in this build');
+if (!extension_loaded("curl")) {
+ echo "skip - curl extension not available in this build";
+}
+if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) {
+ echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable";
}
?>
--FILE--
diff --git a/ext/curl/tests/curl_writeheader_callback.phpt b/ext/curl/tests/curl_writeheader_callback.phpt index ae0075c84..fa27363a4 100644 --- a/ext/curl/tests/curl_writeheader_callback.phpt +++ b/ext/curl/tests/curl_writeheader_callback.phpt @@ -6,7 +6,14 @@ Dutch UG, TestFest 2009, Utrecht --DESCRIPTION-- Hit the host identified by PHP_CURL_HTTP_REMOTE_SERVER and determine that the headers are sent to the callback specified for CURLOPT_HEADERFUNCTION. Different test servers specified for PHP_CURL_HTTP_REMOTE_SERVER might return different sets of headers. Just test for HTTP/1.1 200 OK. --SKIPIF-- -<?php if (!extension_loaded("curl") || false === getenv('PHP_CURL_HTTP_REMOTE_SERVER')) print "skip"; ?> +<?php +if (!extension_loaded("curl")) { + echo "skip - curl extension not available in this build"; +} +if (!getenv('PHP_CURL_HTTP_REMOTE_SERVER')) { + echo "skip need PHP_CURL_HTTP_REMOTE_SERVER environment variable"; +} +?> --FILE-- <?php diff --git a/ext/curl/tests/responder/get.php b/ext/curl/tests/responder/get.php index e77faa57d..9e13d6a74 100644 --- a/ext/curl/tests/responder/get.php +++ b/ext/curl/tests/responder/get.php @@ -1,5 +1,6 @@ <?php - switch($_GET['test']) { + $test = isset($_GET['test']) ? $_GET['test'] : null; + switch($test) { case 'post': var_dump($_POST); break; @@ -25,6 +26,11 @@ case 'contenttype': header('Content-Type: text/plain;charset=utf-8'); break; + case 'file': + if (isset($_FILES['file'])) { + echo $_FILES['file']['name'] . '|' . $_FILES['file']['type']; + } + break; default: echo "Hello World!\n"; echo "Hello World!"; diff --git a/ext/date/lib/interval.c b/ext/date/lib/interval.c index 6558d5a8c..edd8fd88c 100644 --- a/ext/date/lib/interval.c +++ b/ext/date/lib/interval.c @@ -16,9 +16,10 @@ +----------------------------------------------------------------------+ */ -/* $Id: interval.c 312235 2011-06-17 16:38:23Z derick $ */ +/* $Id: interval.c 320563 2011-12-07 08:39:43Z pajoye $ */ #include "timelib.h" +#include <math.h> timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two) { diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 0539fa80f..467279a3b 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Sun Jun 5 15:26:42 2011 */ +/* Generated by re2c 0.13.5 on Mon Dec 5 22:02:41 2011 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.c 311831 2011-06-05 13:30:01Z bjori $ */ +/* $Id: parse_date.c 320481 2011-12-06 06:21:08Z derick $ */ #include "timelib.h" @@ -120,8 +120,8 @@ typedef unsigned char uchar; #define TIMELIB_DEINIT timelib_string_free(str) #define TIMELIB_ADJUST_RELATIVE_WEEKDAY() if (in->time.have_weekday_relative && (in.rel.d > 0)) { in.rel.d -= 7; } -#define TIMELIB_PROCESS_YEAR(x) { \ - if ((x) == TIMELIB_UNSET) { \ +#define TIMELIB_PROCESS_YEAR(x, l) { \ + if (((x) == TIMELIB_UNSET) || ((l) >= 4)) { \ /* (x) = 0; */ \ } else if ((x) < 100) { \ if ((x) < 70) { \ @@ -439,7 +439,7 @@ static char *timelib_string(Scanner *s) return tmp; } -static timelib_sll timelib_get_nr(char **ptr, int max_length) +static timelib_sll timelib_get_nr_ex(char **ptr, int max_length, int *scanned_length) { char *begin, *end, *str; timelib_sll tmp_nr = TIMELIB_UNSET; @@ -457,6 +457,9 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) ++len; } end = *ptr; + if (scanned_length) { + *scanned_length = end - begin; + } str = calloc(1, end - begin + 1); memcpy(str, begin, end - begin); tmp_nr = strtoll(str, NULL, 10); @@ -464,6 +467,11 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) return tmp_nr; } +static timelib_sll timelib_get_nr(char **ptr, int max_length) +{ + return timelib_get_nr_ex(ptr, max_length, NULL); +} + static void timelib_skip_day_suffix(char **ptr) { if (isspace(**ptr)) { @@ -776,7 +784,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found return value; } -static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb) +static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper) { timelib_tzinfo *res; long retval = 0; @@ -825,7 +833,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_ #endif /* If we have a TimeZone identifier to start with, use it */ if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) { - if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) { + if ((res = tz_wrapper(tz_abbr, tzdb)) != NULL) { t->tz_info = res; t->zone_type = TIMELIB_ZONETYPE_ID; found++; @@ -854,7 +862,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_ } \ } -static int scan(Scanner *s) +static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) { uchar *cursor = s->cur; char *str, *ptr = NULL; @@ -1026,7 +1034,7 @@ yy4: DEBUG_OUTPUT("tzcorrection | tz"); TIMELIB_INIT; TIMELIB_HAVE_TZ(); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -4173,13 +4181,14 @@ yy198: yy199: YYDEBUG(199, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("datetextual | datenoyear"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } @@ -4471,7 +4480,7 @@ yy223: } if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -5376,13 +5385,14 @@ yy294: yy295: YYDEBUG(295, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("datenoday"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } @@ -6606,13 +6616,14 @@ yy362: yy364: YYDEBUG(364, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("pgtextshort"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } @@ -9783,7 +9794,7 @@ yy491: } if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -10224,14 +10235,15 @@ yy534: yy535: YYDEBUG(535, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("datefull"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->d = timelib_get_nr((char **) &ptr, 2); timelib_skip_day_suffix((char **) &ptr); s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } @@ -11017,13 +11029,14 @@ yy611: yy612: YYDEBUG(612, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("pointed date YY"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->d = timelib_get_nr((char **) &ptr, 2); s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 2, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } @@ -11668,13 +11681,14 @@ yy656: yy657: YYDEBUG(657, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("gnudateshort"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } @@ -11784,14 +11798,15 @@ yy666: yy667: YYDEBUG(667, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("americanshort | american"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); if (*ptr == '/') { - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); } TIMELIB_DEINIT; return TIMELIB_AMERICAN; @@ -12040,7 +12055,7 @@ yy701: s->time->h = timelib_get_nr((char **) &ptr, 2); s->time->i = timelib_get_nr((char **) &ptr, 2); s->time->s = timelib_get_nr((char **) &ptr, 2); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -12599,13 +12614,14 @@ yy763: yy764: YYDEBUG(764, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("iso8601date2"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } @@ -12648,13 +12664,14 @@ yy771: ++YYCURSOR; YYDEBUG(772, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("pgtextreverse"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } @@ -12953,13 +12970,14 @@ yy793: yy794: YYDEBUG(794, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("datenodayrev"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_month((char **) &ptr); s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } @@ -13284,13 +13302,14 @@ yy821: yy822: YYDEBUG(822, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("pgydotd"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->d = timelib_get_nr((char **) &ptr, 3); s->time->m = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } @@ -13411,7 +13430,7 @@ yy843: if (*ptr == '.') { s->time->f = timelib_get_frac_nr((char **) &ptr, 9); if (*ptr) { /* timezone is optional */ - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -14611,13 +14630,14 @@ yy973: yy974: YYDEBUG(974, *YYCURSOR); { + int length = 0; DEBUG_OUTPUT("gnudateshorter"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } @@ -15751,7 +15771,7 @@ yy1076: s->time->s = timelib_get_nr((char **) &ptr, 2); if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -24652,7 +24672,7 @@ yy1537: #define YYMAXFILL 31 -timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb) +timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper) { Scanner in; int t; @@ -24707,7 +24727,7 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container in.time->zone_type = 0; do { - t = scan(&in); + t = scan(&in, tz_get_wrapper); #ifdef DEBUG_PARSER printf("%d\n", t); #endif @@ -24762,7 +24782,7 @@ static void timelib_time_reset_unset_fields(timelib_time *time) if (time->f == TIMELIB_UNSET ) time->f = 0.0; } -timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb) +timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper) { char *fptr = format; char *ptr = string; @@ -24770,6 +24790,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim timelib_sll tmp; Scanner in; Scanner *s = ∈ + int allow_extra = 0; memset(&in, 0, sizeof(in)); in.errors = malloc(sizeof(struct timelib_error_container)); @@ -24798,8 +24819,19 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim switch (*fptr) { case 'D': /* three letter day */ case 'l': /* full day */ - if (!timelib_lookup_relunit((char **) &ptr)) { - add_pbf_error(s, "A textual day could not be found", string, begin); + { + const timelib_relunit* tmprel = 0; + + tmprel = timelib_lookup_relunit((char **) &ptr); + if (!tmprel) { + add_pbf_error(s, "A textual day could not be found", string, begin); + break; + } else { + in.time->have_relative = 1; + in.time->relative.have_weekday_relative = 1; + in.time->relative.weekday = tmprel->multiplier; + in.time->relative.weekday_behavior = 1; + } } break; case 'd': /* two digit day, with leading zero */ @@ -24812,13 +24844,14 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim case 'S': /* day suffix, ignored, nor checked */ timelib_skip_day_suffix((char **) &ptr); break; - case 'z': /* day of year - resets month (0 based) */ + case 'z': /* day of year - resets month (0 based) - also initializes everything else to !TIMELIB_UNSET */ TIMELIB_CHECK_NUMBER; if ((tmp = timelib_get_nr((char **) &ptr, 3)) == TIMELIB_UNSET) { add_pbf_error(s, "A three digit day-of-year could not be found", string, begin); } else { s->time->m = 1; s->time->d = tmp + 1; + timelib_do_normalize(s->time); } break; @@ -24839,11 +24872,14 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim } break; case 'y': /* two digit year */ - TIMELIB_CHECK_NUMBER; - if ((s->time->y = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit year could not be found", string, begin); + { + int length = 0; + TIMELIB_CHECK_NUMBER; + if ((s->time->y = timelib_get_nr_ex((char **) &ptr, 2, &length)) == TIMELIB_UNSET) { + add_pbf_error(s, "A two digit year could not be found", string, begin); + } + TIMELIB_PROCESS_YEAR(s->time->y, length); } - TIMELIB_PROCESS_YEAR(s->time->y); break; case 'Y': /* four digit year */ TIMELIB_CHECK_NUMBER; @@ -24879,15 +24915,31 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim } break; case 'i': /* two digit minute, with leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->i = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit minute could not be found", string, begin); + { + int length; + timelib_sll min; + + TIMELIB_CHECK_NUMBER; + min = timelib_get_nr_ex((char **) &ptr, 2, &length); + if (min == TIMELIB_UNSET || length != 2) { + add_pbf_error(s, "A two digit minute could not be found", string, begin); + } else { + s->time->i = min; + } } break; case 's': /* two digit second, with leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->s = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit second could not be found", string, begin); + { + int length; + timelib_sll sec; + + TIMELIB_CHECK_NUMBER; + sec = timelib_get_nr_ex((char **) &ptr, 2, &length); + if (sec == TIMELIB_UNSET || length != 2) { + add_pbf_error(s, "A two second minute could not be found", string, begin); + } else { + s->time->s = sec; + } } break; case 'u': /* up to six digit millisecond */ @@ -24928,7 +24980,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim case 'O': /* timezone */ { int tz_not_found; - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_pbf_error(s, "The timezone could not be found in the database", string, begin); } @@ -24983,6 +25035,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim timelib_eat_until_separator((char **) &ptr); break; + case '+': /* allow extra chars in the format */ + allow_extra = 1; + break; + default: if (*fptr != *ptr) { add_pbf_error(s, "The format separator does not match", string, begin); @@ -24992,11 +25048,20 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim fptr++; } if (*ptr) { - add_pbf_error(s, "Trailing data", string, ptr); + if (allow_extra) { + add_pbf_warning(s, "Trailing data", string, ptr); + } else { + add_pbf_error(s, "Trailing data", string, ptr); + } + } + /* ignore trailing +'s */ + while (*fptr == '+') { + fptr++; } if (*fptr) { /* Trailing | and ! specifiers are valid. */ - while (*fptr) { + int done = 0; + while (*fptr && !done) { switch (*fptr++) { case '!': /* reset all fields to default */ timelib_time_reset_fields(s->time); @@ -25008,6 +25073,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim default: add_pbf_error(s, "Data missing", string, ptr); + done = 1; } } } diff --git a/ext/date/lib/parse_date.c.orig b/ext/date/lib/parse_date.c.orig deleted file mode 100644 index 9d7cca772..000000000 --- a/ext/date/lib/parse_date.c.orig +++ /dev/null @@ -1,25222 +0,0 @@ -/* Generated by re2c 0.13.5 on Sun Jun 5 15:26:42 2011 */ -#line 1 "ext/date/lib/parse_date.re" -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2010 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Authors: Derick Rethans <derick@derickrethans.nl> | - +----------------------------------------------------------------------+ - */ - -/* $Id: parse_date.c 311831 2011-06-05 13:30:01Z bjori $ */ - -#include "timelib.h" - -#include <stdio.h> -#include <ctype.h> -#include <math.h> -#include <assert.h> - -#ifdef HAVE_STDLIB_H -#include <stdlib.h> -#endif -#ifdef HAVE_STRING_H -#include <string.h> -#else -#include <strings.h> -#endif - -#if defined(_MSC_VER) -# define strtoll(s, f, b) _atoi64(s) -#elif !defined(HAVE_STRTOLL) -# if defined(HAVE_ATOLL) -# define strtoll(s, f, b) atoll(s) -# else -# define strtoll(s, f, b) strtol(s, f, b) -# endif -#endif - -#define TIMELIB_UNSET -99999 - -#define TIMELIB_SECOND 1 -#define TIMELIB_MINUTE 2 -#define TIMELIB_HOUR 3 -#define TIMELIB_DAY 4 -#define TIMELIB_MONTH 5 -#define TIMELIB_YEAR 6 -#define TIMELIB_WEEKDAY 7 -#define TIMELIB_SPECIAL 8 - -#define EOI 257 -#define TIME 258 -#define DATE 259 - -#define TIMELIB_XMLRPC_SOAP 260 -#define TIMELIB_TIME12 261 -#define TIMELIB_TIME24 262 -#define TIMELIB_GNU_NOCOLON 263 -#define TIMELIB_GNU_NOCOLON_TZ 264 -#define TIMELIB_ISO_NOCOLON 265 - -#define TIMELIB_AMERICAN 266 -#define TIMELIB_ISO_DATE 267 -#define TIMELIB_DATE_FULL 268 -#define TIMELIB_DATE_TEXT 269 -#define TIMELIB_DATE_NOCOLON 270 -#define TIMELIB_PG_YEARDAY 271 -#define TIMELIB_PG_TEXT 272 -#define TIMELIB_PG_REVERSE 273 -#define TIMELIB_CLF 274 -#define TIMELIB_DATE_NO_DAY 275 -#define TIMELIB_SHORTDATE_WITH_TIME 276 -#define TIMELIB_DATE_FULL_POINTED 277 -#define TIMELIB_TIME24_WITH_ZONE 278 -#define TIMELIB_ISO_WEEK 279 -#define TIMELIB_LF_DAY_OF_MONTH 280 -#define TIMELIB_WEEK_DAY_OF_MONTH 281 - -#define TIMELIB_TIMEZONE 300 -#define TIMELIB_AGO 301 - -#define TIMELIB_RELATIVE 310 - -#define TIMELIB_ERROR 999 - -/* Some compilers like AIX, defines uchar in sys/types.h */ -#undef uchar -typedef unsigned char uchar; - -#define BSIZE 8192 - -#define YYCTYPE uchar -#define YYCURSOR cursor -#define YYLIMIT s->lim -#define YYMARKER s->ptr -#define YYFILL(n) return EOI; - -#define RET(i) {s->cur = cursor; return i;} - -#define timelib_string_free free - -#define TIMELIB_HAVE_TIME() { if (s->time->have_time) { add_error(s, "Double time specification"); timelib_string_free(str); return TIMELIB_ERROR; } else { s->time->have_time = 1; s->time->h = 0; s->time->i = 0; s->time->s = 0; s->time->f = 0; } } -#define TIMELIB_UNHAVE_TIME() { s->time->have_time = 0; s->time->h = 0; s->time->i = 0; s->time->s = 0; s->time->f = 0; } -#define TIMELIB_HAVE_DATE() { if (s->time->have_date) { add_error(s, "Double date specification"); timelib_string_free(str); return TIMELIB_ERROR; } else { s->time->have_date = 1; } } -#define TIMELIB_UNHAVE_DATE() { s->time->have_date = 0; s->time->d = 0; s->time->m = 0; s->time->y = 0; } -#define TIMELIB_HAVE_RELATIVE() { s->time->have_relative = 1; } -#define TIMELIB_HAVE_WEEKDAY_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_weekday_relative = 1; } -#define TIMELIB_HAVE_SPECIAL_RELATIVE() { s->time->have_relative = 1; s->time->relative.have_special_relative = 1; } -#define TIMELIB_HAVE_TZ() { s->cur = cursor; if (s->time->have_zone) { s->time->have_zone > 1 ? add_error(s, "Double timezone specification") : add_warning(s, "Double timezone specification"); timelib_string_free(str); s->time->have_zone++; return TIMELIB_ERROR; } else { s->time->have_zone++; } } - -#define TIMELIB_INIT s->cur = cursor; str = timelib_string(s); ptr = str -#define TIMELIB_DEINIT timelib_string_free(str) -#define TIMELIB_ADJUST_RELATIVE_WEEKDAY() if (in->time.have_weekday_relative && (in.rel.d > 0)) { in.rel.d -= 7; } - -#define TIMELIB_PROCESS_YEAR(x) { \ - if ((x) == TIMELIB_UNSET) { \ - /* (x) = 0; */ \ - } else if ((x) < 100) { \ - if ((x) < 70) { \ - (x) += 2000; \ - } else { \ - (x) += 1900; \ - } \ - } \ -} - -#ifdef DEBUG_PARSER -#define DEBUG_OUTPUT(s) printf("%s\n", s); -#define YYDEBUG(s,c) { if (s != -1) { printf("state: %d ", s); printf("[%c]\n", c); } } -#else -#define DEBUG_OUTPUT(s) -#define YYDEBUG(s,c) -#endif - -#include "timelib_structs.h" - -typedef struct timelib_elems { - unsigned int c; /* Number of elements */ - char **v; /* Values */ -} timelib_elems; - -typedef struct Scanner { - int fd; - uchar *lim, *str, *ptr, *cur, *tok, *pos; - unsigned int line, len; - struct timelib_error_container *errors; - - struct timelib_time *time; - const timelib_tzdb *tzdb; -} Scanner; - -typedef struct _timelib_lookup_table { - const char *name; - int type; - int value; -} timelib_lookup_table; - -typedef struct _timelib_relunit { - const char *name; - int unit; - int multiplier; -} timelib_relunit; - -#define HOUR(a) (int)(a * 60) - -/* The timezone table. */ -const static timelib_tz_lookup_table timelib_timezone_lookup[] = { -#include "timezonemap.h" - { NULL, 0, 0, NULL }, -}; - -const static timelib_tz_lookup_table timelib_timezone_fallbackmap[] = { -#include "fallbackmap.h" - { NULL, 0, 0, NULL }, -}; - -const static timelib_tz_lookup_table timelib_timezone_utc[] = { - { "utc", 0, 0, "UTC" }, -}; - -static timelib_relunit const timelib_relunit_lookup[] = { - { "sec", TIMELIB_SECOND, 1 }, - { "secs", TIMELIB_SECOND, 1 }, - { "second", TIMELIB_SECOND, 1 }, - { "seconds", TIMELIB_SECOND, 1 }, - { "min", TIMELIB_MINUTE, 1 }, - { "mins", TIMELIB_MINUTE, 1 }, - { "minute", TIMELIB_MINUTE, 1 }, - { "minutes", TIMELIB_MINUTE, 1 }, - { "hour", TIMELIB_HOUR, 1 }, - { "hours", TIMELIB_HOUR, 1 }, - { "day", TIMELIB_DAY, 1 }, - { "days", TIMELIB_DAY, 1 }, - { "week", TIMELIB_DAY, 7 }, - { "weeks", TIMELIB_DAY, 7 }, - { "fortnight", TIMELIB_DAY, 14 }, - { "fortnights", TIMELIB_DAY, 14 }, - { "forthnight", TIMELIB_DAY, 14 }, - { "forthnights", TIMELIB_DAY, 14 }, - { "month", TIMELIB_MONTH, 1 }, - { "months", TIMELIB_MONTH, 1 }, - { "year", TIMELIB_YEAR, 1 }, - { "years", TIMELIB_YEAR, 1 }, - - { "monday", TIMELIB_WEEKDAY, 1 }, - { "mon", TIMELIB_WEEKDAY, 1 }, - { "tuesday", TIMELIB_WEEKDAY, 2 }, - { "tue", TIMELIB_WEEKDAY, 2 }, - { "wednesday", TIMELIB_WEEKDAY, 3 }, - { "wed", TIMELIB_WEEKDAY, 3 }, - { "thursday", TIMELIB_WEEKDAY, 4 }, - { "thu", TIMELIB_WEEKDAY, 4 }, - { "friday", TIMELIB_WEEKDAY, 5 }, - { "fri", TIMELIB_WEEKDAY, 5 }, - { "saturday", TIMELIB_WEEKDAY, 6 }, - { "sat", TIMELIB_WEEKDAY, 6 }, - { "sunday", TIMELIB_WEEKDAY, 0 }, - { "sun", TIMELIB_WEEKDAY, 0 }, - - { "weekday", TIMELIB_SPECIAL, TIMELIB_SPECIAL_WEEKDAY }, - { "weekdays", TIMELIB_SPECIAL, TIMELIB_SPECIAL_WEEKDAY }, - { NULL, 0, 0 } -}; - -/* The relative text table. */ -static timelib_lookup_table const timelib_reltext_lookup[] = { - { "first", 0, 1 }, - { "next", 0, 1 }, - { "second", 0, 2 }, - { "third", 0, 3 }, - { "fourth", 0, 4 }, - { "fifth", 0, 5 }, - { "sixth", 0, 6 }, - { "seventh", 0, 7 }, - { "eight", 0, 8 }, - { "eighth", 0, 8 }, - { "ninth", 0, 9 }, - { "tenth", 0, 10 }, - { "eleventh", 0, 11 }, - { "twelfth", 0, 12 }, - { "last", 0, -1 }, - { "previous", 0, -1 }, - { "this", 1, 0 }, - { NULL, 1, 0 } -}; - -/* The month table. */ -static timelib_lookup_table const timelib_month_lookup[] = { - { "jan", 0, 1 }, - { "feb", 0, 2 }, - { "mar", 0, 3 }, - { "apr", 0, 4 }, - { "may", 0, 5 }, - { "jun", 0, 6 }, - { "jul", 0, 7 }, - { "aug", 0, 8 }, - { "sep", 0, 9 }, - { "sept", 0, 9 }, - { "oct", 0, 10 }, - { "nov", 0, 11 }, - { "dec", 0, 12 }, - { "i", 0, 1 }, - { "ii", 0, 2 }, - { "iii", 0, 3 }, - { "iv", 0, 4 }, - { "v", 0, 5 }, - { "vi", 0, 6 }, - { "vii", 0, 7 }, - { "viii", 0, 8 }, - { "ix", 0, 9 }, - { "x", 0, 10 }, - { "xi", 0, 11 }, - { "xii", 0, 12 }, - - { "january", 0, 1 }, - { "february", 0, 2 }, - { "march", 0, 3 }, - { "april", 0, 4 }, - { "may", 0, 5 }, - { "june", 0, 6 }, - { "july", 0, 7 }, - { "august", 0, 8 }, - { "september", 0, 9 }, - { "october", 0, 10 }, - { "november", 0, 11 }, - { "december", 0, 12 }, - { NULL, 0, 0 } -}; - -#if 0 -static char* timelib_ltrim(char *s) -{ - char *ptr = s; - while (ptr[0] == ' ' || ptr[0] == '\t') { - ptr++; - } - return ptr; -} -#endif - -#if 0 -uchar *fill(Scanner *s, uchar *cursor){ - if(!s->eof){ - unsigned int cnt = s->tok - s->bot; - if(cnt){ - memcpy(s->bot, s->tok, s->lim - s->tok); - s->tok = s->bot; - s->ptr -= cnt; - cursor -= cnt; - s->pos -= cnt; - s->lim -= cnt; - } - if((s->top - s->lim) < BSIZE){ - uchar *buf = (uchar*) malloc(((s->lim - s->bot) + BSIZE)*sizeof(uchar)); - memcpy(buf, s->tok, s->lim - s->tok); - s->tok = buf; - s->ptr = &buf[s->ptr - s->bot]; - cursor = &buf[cursor - s->bot]; - s->pos = &buf[s->pos - s->bot]; - s->lim = &buf[s->lim - s->bot]; - s->top = &s->lim[BSIZE]; - free(s->bot); - s->bot = buf; - } - if((cnt = read(s->fd, (char*) s->lim, BSIZE)) != BSIZE){ - s->eof = &s->lim[cnt]; *(s->eof)++ = '\n'; - } - s->lim += cnt; - } - return cursor; -} -#endif - -static void add_warning(Scanner *s, char *error) -{ - s->errors->warning_count++; - s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message)); - s->errors->warning_messages[s->errors->warning_count - 1].position = s->tok ? s->tok - s->str : 0; - s->errors->warning_messages[s->errors->warning_count - 1].character = s->tok ? *s->tok : 0; - s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error); -} - -static void add_error(Scanner *s, char *error) -{ - s->errors->error_count++; - s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message)); - s->errors->error_messages[s->errors->error_count - 1].position = s->tok ? s->tok - s->str : 0; - s->errors->error_messages[s->errors->error_count - 1].character = s->tok ? *s->tok : 0; - s->errors->error_messages[s->errors->error_count - 1].message = strdup(error); -} - -static void add_pbf_warning(Scanner *s, char *error, char *sptr, char *cptr) -{ - s->errors->warning_count++; - s->errors->warning_messages = realloc(s->errors->warning_messages, s->errors->warning_count * sizeof(timelib_error_message)); - s->errors->warning_messages[s->errors->warning_count - 1].position = cptr - sptr; - s->errors->warning_messages[s->errors->warning_count - 1].character = *cptr; - s->errors->warning_messages[s->errors->warning_count - 1].message = strdup(error); -} - -static void add_pbf_error(Scanner *s, char *error, char *sptr, char *cptr) -{ - s->errors->error_count++; - s->errors->error_messages = realloc(s->errors->error_messages, s->errors->error_count * sizeof(timelib_error_message)); - s->errors->error_messages[s->errors->error_count - 1].position = cptr - sptr; - s->errors->error_messages[s->errors->error_count - 1].character = *cptr; - s->errors->error_messages[s->errors->error_count - 1].message = strdup(error); -} - -static timelib_sll timelib_meridian(char **ptr, timelib_sll h) -{ - timelib_sll retval = 0; - - while (!strchr("AaPp", **ptr)) { - ++*ptr; - } - if (**ptr == 'a' || **ptr == 'A') { - if (h == 12) { - retval = -12; - } - } else if (h != 12) { - retval = 12; - } - ++*ptr; - if (**ptr == '.') { - *ptr += 3; - } else { - ++*ptr; - } - return retval; -} - -static timelib_sll timelib_meridian_with_check(char **ptr, timelib_sll h) -{ - timelib_sll retval = 0; - - while (!strchr("AaPp", **ptr)) { - ++*ptr; - } - if (**ptr == 'a' || **ptr == 'A') { - if (h == 12) { - retval = -12; - } - } else if (h != 12) { - retval = 12; - } - ++*ptr; - if (**ptr == '.') { - ++*ptr; - if (**ptr != 'm' && **ptr != 'M') { - return TIMELIB_UNSET; - } - ++*ptr; - if (**ptr != '.' ) { - return TIMELIB_UNSET; - } - ++*ptr; - } else if (**ptr == 'm' || **ptr == 'M') { - ++*ptr; - } else { - return TIMELIB_UNSET; - } - return retval; -} - -static char *timelib_string(Scanner *s) -{ - char *tmp = calloc(1, s->cur - s->tok + 1); - memcpy(tmp, s->tok, s->cur - s->tok); - - return tmp; -} - -static timelib_sll timelib_get_nr(char **ptr, int max_length) -{ - char *begin, *end, *str; - timelib_sll tmp_nr = TIMELIB_UNSET; - int len = 0; - - while ((**ptr < '0') || (**ptr > '9')) { - if (**ptr == '\0') { - return TIMELIB_UNSET; - } - ++*ptr; - } - begin = *ptr; - while ((**ptr >= '0') && (**ptr <= '9') && len < max_length) { - ++*ptr; - ++len; - } - end = *ptr; - str = calloc(1, end - begin + 1); - memcpy(str, begin, end - begin); - tmp_nr = strtoll(str, NULL, 10); - free(str); - return tmp_nr; -} - -static void timelib_skip_day_suffix(char **ptr) -{ - if (isspace(**ptr)) { - return; - } - if (!strncasecmp(*ptr, "nd", 2) || !strncasecmp(*ptr, "rd", 2) ||!strncasecmp(*ptr, "st", 2) || !strncasecmp(*ptr, "th", 2)) { - *ptr += 2; - } -} - -static double timelib_get_frac_nr(char **ptr, int max_length) -{ - char *begin, *end, *str; - double tmp_nr = TIMELIB_UNSET; - int len = 0; - - while ((**ptr != '.') && (**ptr != ':') && ((**ptr < '0') || (**ptr > '9'))) { - if (**ptr == '\0') { - return TIMELIB_UNSET; - } - ++*ptr; - } - begin = *ptr; - while (((**ptr == '.') || (**ptr == ':') || ((**ptr >= '0') && (**ptr <= '9'))) && len < max_length) { - ++*ptr; - ++len; - } - end = *ptr; - str = calloc(1, end - begin + 1); - memcpy(str, begin, end - begin); - if (str[0] == ':') { - str[0] = '.'; - } - tmp_nr = strtod(str, NULL); - free(str); - return tmp_nr; -} - -static timelib_ull timelib_get_unsigned_nr(char **ptr, int max_length) -{ - timelib_ull dir = 1; - - while (((**ptr < '0') || (**ptr > '9')) && (**ptr != '+') && (**ptr != '-')) { - if (**ptr == '\0') { - return TIMELIB_UNSET; - } - ++*ptr; - } - - while (**ptr == '+' || **ptr == '-') - { - if (**ptr == '-') { - dir *= -1; - } - ++*ptr; - } - return dir * timelib_get_nr(ptr, max_length); -} - -static long timelib_parse_tz_cor(char **ptr) -{ - char *begin = *ptr, *end; - long tmp; - - while (isdigit(**ptr) || **ptr == ':') { - ++*ptr; - } - end = *ptr; - switch (end - begin) { - case 1: - case 2: - return HOUR(strtol(begin, NULL, 10)); - break; - case 3: - case 4: - if (begin[1] == ':') { - tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 2, NULL, 10); - return tmp; - } else if (begin[2] == ':') { - tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); - return tmp; - } else { - tmp = strtol(begin, NULL, 10); - return HOUR(tmp / 100) + tmp % 100; - } - case 5: - tmp = HOUR(strtol(begin, NULL, 10)) + strtol(begin + 3, NULL, 10); - return tmp; - } - return 0; -} - -static timelib_sll timelib_lookup_relative_text(char **ptr, int *behavior) -{ - char *word; - char *begin = *ptr, *end; - timelib_sll value = 0; - const timelib_lookup_table *tp; - - while ((**ptr >= 'A' && **ptr <= 'Z') || (**ptr >= 'a' && **ptr <= 'z')) { - ++*ptr; - } - end = *ptr; - word = calloc(1, end - begin + 1); - memcpy(word, begin, end - begin); - - for (tp = timelib_reltext_lookup; tp->name; tp++) { - if (strcasecmp(word, tp->name) == 0) { - value = tp->value; - *behavior = tp->type; - } - } - - free(word); - return value; -} - -static timelib_sll timelib_get_relative_text(char **ptr, int *behavior) -{ - while (**ptr == ' ' || **ptr == '\t' || **ptr == '-' || **ptr == '/') { - ++*ptr; - } - return timelib_lookup_relative_text(ptr, behavior); -} - -static long timelib_lookup_month(char **ptr) -{ - char *word; - char *begin = *ptr, *end; - long value = 0; - const timelib_lookup_table *tp; - - while ((**ptr >= 'A' && **ptr <= 'Z') || (**ptr >= 'a' && **ptr <= 'z')) { - ++*ptr; - } - end = *ptr; - word = calloc(1, end - begin + 1); - memcpy(word, begin, end - begin); - - for (tp = timelib_month_lookup; tp->name; tp++) { - if (strcasecmp(word, tp->name) == 0) { - value = tp->value; - } - } - - free(word); - return value; -} - -static long timelib_get_month(char **ptr) -{ - while (**ptr == ' ' || **ptr == '\t' || **ptr == '-' || **ptr == '.' || **ptr == '/') { - ++*ptr; - } - return timelib_lookup_month(ptr); -} - -static void timelib_eat_spaces(char **ptr) -{ - while (**ptr == ' ' || **ptr == '\t') { - ++*ptr; - } -} - -static void timelib_eat_until_separator(char **ptr) -{ - ++*ptr; - while (strchr(" \t.,:;/-0123456789", **ptr) == NULL) { - ++*ptr; - } -} - -static const timelib_relunit* timelib_lookup_relunit(char **ptr) -{ - char *word; - char *begin = *ptr, *end; - const timelib_relunit *tp, *value = NULL; - - while (**ptr != '\0' && **ptr != ' ' && **ptr != ',' && **ptr != '\t') { - ++*ptr; - } - end = *ptr; - word = calloc(1, end - begin + 1); - memcpy(word, begin, end - begin); - - for (tp = timelib_relunit_lookup; tp->name; tp++) { - if (strcasecmp(word, tp->name) == 0) { - value = tp; - break; - } - } - - free(word); - return value; -} - -static void timelib_set_relative(char **ptr, timelib_sll amount, int behavior, Scanner *s) -{ - const timelib_relunit* relunit; - - if (!(relunit = timelib_lookup_relunit(ptr))) { - return; - } - - switch (relunit->unit) { - case TIMELIB_SECOND: s->time->relative.s += amount * relunit->multiplier; break; - case TIMELIB_MINUTE: s->time->relative.i += amount * relunit->multiplier; break; - case TIMELIB_HOUR: s->time->relative.h += amount * relunit->multiplier; break; - case TIMELIB_DAY: s->time->relative.d += amount * relunit->multiplier; break; - case TIMELIB_MONTH: s->time->relative.m += amount * relunit->multiplier; break; - case TIMELIB_YEAR: s->time->relative.y += amount * relunit->multiplier; break; - - case TIMELIB_WEEKDAY: - TIMELIB_HAVE_WEEKDAY_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - s->time->relative.d += (amount > 0 ? amount - 1 : amount) * 7; - s->time->relative.weekday = relunit->multiplier; - s->time->relative.weekday_behavior = behavior; - break; - - case TIMELIB_SPECIAL: - TIMELIB_HAVE_SPECIAL_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - s->time->relative.special.type = relunit->multiplier; - s->time->relative.special.amount = amount; - } -} - -const static timelib_tz_lookup_table* zone_search(const char *word, long gmtoffset, int isdst) -{ - int first_found = 0; - const timelib_tz_lookup_table *tp, *first_found_elem = NULL; - const timelib_tz_lookup_table *fmp; - - if (strcasecmp("utc", word) == 0 || strcasecmp("gmt", word) == 0) { - return timelib_timezone_utc; - } - - for (tp = timelib_timezone_lookup; tp->name; tp++) { - if (strcasecmp(word, tp->name) == 0) { - if (!first_found) { - first_found = 1; - first_found_elem = tp; - if (gmtoffset == -1) { - return tp; - } - } - if (tp->gmtoffset == gmtoffset) { - return tp; - } - } - } - if (first_found) { - return first_found_elem; - } - - for (tp = timelib_timezone_lookup; tp->name; tp++) { - if (tp->full_tz_name && strcasecmp(word, tp->full_tz_name) == 0) { - if (!first_found) { - first_found = 1; - first_found_elem = tp; - if (gmtoffset == -1) { - return tp; - } - } - if (tp->gmtoffset == gmtoffset) { - return tp; - } - } - } - if (first_found) { - return first_found_elem; - } - - - /* Still didn't find anything, let's find the zone solely based on - * offset/isdst then */ - for (fmp = timelib_timezone_fallbackmap; fmp->name; fmp++) { - if ((fmp->gmtoffset * 3600) == gmtoffset && fmp->type == isdst) { - return fmp; - } - } - return NULL; -} - -static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found) -{ - char *word; - char *begin = *ptr, *end; - long value = 0; - const timelib_tz_lookup_table *tp; - - while (**ptr != '\0' && **ptr != ')' && **ptr != ' ') { - ++*ptr; - } - end = *ptr; - word = calloc(1, end - begin + 1); - memcpy(word, begin, end - begin); - - if ((tp = zone_search(word, -1, 0))) { - value = -tp->gmtoffset / 60; - *dst = tp->type; - value += tp->type * 60; - *found = 1; - } else { - *found = 0; - } - - *tz_abbr = word; - return value; -} - -static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb) -{ - timelib_tzinfo *res; - long retval = 0; - - *tz_not_found = 0; - - while (**ptr == ' ' || **ptr == '\t' || **ptr == '(') { - ++*ptr; - } - if ((*ptr)[0] == 'G' && (*ptr)[1] == 'M' && (*ptr)[2] == 'T' && ((*ptr)[3] == '+' || (*ptr)[3] == '-')) { - *ptr += 3; - } - if (**ptr == '+') { - ++*ptr; - t->is_localtime = 1; - t->zone_type = TIMELIB_ZONETYPE_OFFSET; - *tz_not_found = 0; - t->dst = 0; - - retval = -1 * timelib_parse_tz_cor(ptr); - } else if (**ptr == '-') { - ++*ptr; - t->is_localtime = 1; - t->zone_type = TIMELIB_ZONETYPE_OFFSET; - *tz_not_found = 0; - t->dst = 0; - - retval = timelib_parse_tz_cor(ptr); - } else { - int found = 0; - long offset; - char *tz_abbr; - - t->is_localtime = 1; - - offset = timelib_lookup_zone(ptr, dst, &tz_abbr, &found); - if (found) { - t->zone_type = TIMELIB_ZONETYPE_ABBR; - } -#if 0 - /* If we found a TimeZone identifier, use it */ - if (tz_name) { - t->tz_info = timelib_parse_tzfile(tz_name); - t->zone_type = TIMELIB_ZONETYPE_ID; - } -#endif - /* If we have a TimeZone identifier to start with, use it */ - if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) { - if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) { - t->tz_info = res; - t->zone_type = TIMELIB_ZONETYPE_ID; - found++; - } - } - if (found && t->zone_type != TIMELIB_ZONETYPE_ID) { - timelib_time_tz_abbr_update(t, tz_abbr); - } - free(tz_abbr); - *tz_not_found = (found == 0); - retval = offset; - } - while (**ptr == ')') { - ++*ptr; - } - return retval; -} - -#define timelib_split_free(arg) { \ - int i; \ - for (i = 0; i < arg.c; i++) { \ - free(arg.v[i]); \ - } \ - if (arg.v) { \ - free(arg.v); \ - } \ -} - -static int scan(Scanner *s) -{ - uchar *cursor = s->cur; - char *str, *ptr = NULL; - -std: - s->tok = cursor; - s->len = 0; -#line 989 "ext/date/lib/parse_date.re" - - - -#line 871 "ext/date/lib/parse_date.c" -{ - YYCTYPE yych; - unsigned int yyaccept = 0; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 100, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 100, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 128, 64, 160, 96, 0, - 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 0, 0, 0, 0, 0, 0, - 0, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 0, 0, 0, 0, 0, - 0, 24, 24, 24, 88, 24, 24, 24, - 88, 24, 24, 24, 24, 24, 88, 24, - 24, 24, 88, 88, 88, 24, 24, 24, - 24, 24, 24, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - - YYDEBUG(0, *YYCURSOR); - if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31); - yych = *YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case 0x00: - case '\n': goto yy52; - case '\t': - case ' ': goto yy49; - case '(': goto yy46; - case '+': - case '-': goto yy31; - case ',': - case '.': goto yy51; - case '0': goto yy26; - case '1': goto yy27; - case '2': goto yy28; - case '3': goto yy29; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy30; - case '@': goto yy12; - case 'A': goto yy37; - case 'B': goto yy18; - case 'C': - case 'H': - case 'K': - case 'Q': - case 'R': - case 'U': - case 'Z': goto yy47; - case 'D': goto yy41; - case 'E': goto yy22; - case 'F': goto yy14; - case 'G': goto yy45; - case 'I': goto yy32; - case 'J': goto yy35; - case 'L': goto yy16; - case 'M': goto yy8; - case 'N': goto yy6; - case 'O': goto yy39; - case 'P': goto yy24; - case 'S': goto yy20; - case 'T': goto yy10; - case 'V': goto yy33; - case 'W': goto yy43; - case 'X': goto yy34; - case 'Y': goto yy3; - case 'a': goto yy38; - case 'b': goto yy19; - case 'c': - case 'g': - case 'h': - case 'i': - case 'k': - case 'q': - case 'r': - case 'u': - case 'v': - case 'x': - case 'z': goto yy48; - case 'd': goto yy42; - case 'e': goto yy23; - case 'f': goto yy15; - case 'j': goto yy36; - case 'l': goto yy17; - case 'm': goto yy9; - case 'n': goto yy7; - case 'o': goto yy40; - case 'p': goto yy25; - case 's': goto yy21; - case 't': goto yy11; - case 'w': goto yy44; - case 'y': goto yy5; - default: goto yy54; - } -yy2: - YYDEBUG(2, *YYCURSOR); -#line 1074 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("firstdayof | lastdayof"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - /* skip "last day of" or "first day of" */ - if (*ptr == 'l') { - s->time->relative.first_last_day_of = 2; - } else { - s->time->relative.first_last_day_of = 1; - } - - TIMELIB_DEINIT; - return TIMELIB_LF_DAY_OF_MONTH; - } -#line 1007 "ext/date/lib/parse_date.c" -yy3: - YYDEBUG(3, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= 'E') { - if (yych <= ')') { - if (yych >= ')') goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy1523; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych >= 'a') goto yy146; - } else { - if (yych <= 'e') goto yy1532; - if (yych <= 'z') goto yy146; - } - } -yy4: - YYDEBUG(4, *YYCURSOR); -#line 1656 "ext/date/lib/parse_date.re" - { - int tz_not_found; - DEBUG_OUTPUT("tzcorrection | tz"); - TIMELIB_INIT; - TIMELIB_HAVE_TZ(); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_error(s, "The timezone could not be found in the database"); - } - TIMELIB_DEINIT; - return TIMELIB_TIMEZONE; - } -#line 1043 "ext/date/lib/parse_date.c" -yy5: - YYDEBUG(5, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy1523; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy141; - } else { - if (yych <= 'e') goto yy1523; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy6: - YYDEBUG(6, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= 'D') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'H') { - if (yych <= 'E') goto yy1494; - goto yy141; - } else { - if (yych <= 'I') goto yy1495; - if (yych <= 'N') goto yy141; - goto yy1493; - } - } - } else { - if (yych <= 'h') { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych == 'e') goto yy1510; - goto yy146; - } - } else { - if (yych <= 'n') { - if (yych <= 'i') goto yy1511; - goto yy146; - } else { - if (yych <= 'o') goto yy1509; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy7: - YYDEBUG(7, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= 'D') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'H') { - if (yych <= 'E') goto yy1494; - goto yy141; - } else { - if (yych <= 'I') goto yy1495; - if (yych <= 'N') goto yy141; - goto yy1493; - } - } - } else { - if (yych <= 'h') { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych == 'e') goto yy1494; - goto yy141; - } - } else { - if (yych <= 'n') { - if (yych <= 'i') goto yy1495; - goto yy141; - } else { - if (yych <= 'o') goto yy1493; - if (yych <= 'z') goto yy141; - goto yy4; - } - } - } -yy8: - YYDEBUG(8, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1463; - } else { - if (yych == 'I') goto yy1464; - if (yych <= 'N') goto yy141; - goto yy1465; - } - } else { - if (yych <= 'h') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1478; - goto yy146; - } else { - if (yych <= 'n') { - if (yych <= 'i') goto yy1479; - goto yy146; - } else { - if (yych <= 'o') goto yy1480; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy9: - YYDEBUG(9, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1463; - } else { - if (yych == 'I') goto yy1464; - if (yych <= 'N') goto yy141; - goto yy1465; - } - } else { - if (yych <= 'h') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1463; - goto yy141; - } else { - if (yych <= 'n') { - if (yych <= 'i') goto yy1464; - goto yy141; - } else { - if (yych <= 'o') goto yy1465; - if (yych <= 'z') goto yy141; - goto yy4; - } - } - } -yy10: - YYDEBUG(10, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case ')': goto yy140; - case '0': - case '1': goto yy1393; - case '2': goto yy1394; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1395; - case 'A': - case 'B': - case 'C': - case 'D': - case 'F': - case 'G': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'V': - case 'X': - case 'Y': - case 'Z': goto yy141; - case 'E': goto yy1388; - case 'H': goto yy1389; - case 'O': goto yy1390; - case 'U': goto yy1391; - case 'W': goto yy1392; - case 'a': - case 'b': - case 'c': - case 'd': - case 'f': - case 'g': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'v': - case 'x': - case 'y': - case 'z': goto yy146; - case 'e': goto yy1431; - case 'h': goto yy1432; - case 'o': goto yy1433; - case 'u': goto yy1434; - case 'w': goto yy1435; - default: goto yy4; - } -yy11: - YYDEBUG(11, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case ')': goto yy140; - case '0': - case '1': goto yy1393; - case '2': goto yy1394; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1395; - case 'A': - case 'B': - case 'C': - case 'D': - case 'F': - case 'G': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'V': - case 'X': - case 'Y': - case 'Z': - case 'a': - case 'b': - case 'c': - case 'd': - case 'f': - case 'g': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'v': - case 'x': - case 'y': - case 'z': goto yy141; - case 'E': - case 'e': goto yy1388; - case 'H': - case 'h': goto yy1389; - case 'O': - case 'o': goto yy1390; - case 'U': - case 'u': goto yy1391; - case 'W': - case 'w': goto yy1392; - default: goto yy4; - } -yy12: - YYDEBUG(12, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy1384; - if (yych <= '/') goto yy13; - if (yych <= '9') goto yy1385; -yy13: - YYDEBUG(13, *YYCURSOR); -#line 1751 "ext/date/lib/parse_date.re" - { - add_error(s, "Unexpected character"); - goto std; - } -#line 1359 "ext/date/lib/parse_date.c" -yy14: - YYDEBUG(14, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy1320; - } - } else { - if (yych <= 'N') { - if (yych == 'I') goto yy1321; - goto yy141; - } else { - if (yych <= 'O') goto yy1322; - if (yych <= 'Q') goto yy141; - goto yy1323; - } - } - } else { - if (yych <= 'i') { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy146; - } else { - if (yych <= 'e') goto yy1361; - if (yych <= 'h') goto yy146; - goto yy1362; - } - } else { - if (yych <= 'q') { - if (yych == 'o') goto yy1363; - goto yy146; - } else { - if (yych <= 'r') goto yy1364; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy15: - YYDEBUG(15, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy1320; - } - } else { - if (yych <= 'N') { - if (yych == 'I') goto yy1321; - goto yy141; - } else { - if (yych <= 'O') goto yy1322; - if (yych <= 'Q') goto yy141; - goto yy1323; - } - } - } else { - if (yych <= 'i') { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy141; - } else { - if (yych <= 'e') goto yy1320; - if (yych <= 'h') goto yy141; - goto yy1321; - } - } else { - if (yych <= 'q') { - if (yych == 'o') goto yy1322; - goto yy141; - } else { - if (yych <= 'r') goto yy1323; - if (yych <= 'z') goto yy141; - goto yy4; - } - } - } -yy16: - YYDEBUG(16, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1307; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych <= 'a') goto yy1317; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy17: - YYDEBUG(17, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1307; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych <= 'a') goto yy1307; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy18: - YYDEBUG(18, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1287; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych <= 'a') goto yy1304; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy19: - YYDEBUG(19, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1287; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych <= 'a') goto yy1287; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy20: - YYDEBUG(20, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'A') goto yy1230; - goto yy141; - } - } else { - if (yych <= 'H') { - if (yych <= 'E') goto yy1229; - goto yy141; - } else { - if (yych <= 'I') goto yy1231; - if (yych <= 'T') goto yy141; - goto yy1232; - } - } - } else { - if (yych <= 'e') { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych <= 'a') goto yy1259; - if (yych <= 'd') goto yy146; - goto yy1258; - } - } else { - if (yych <= 't') { - if (yych == 'i') goto yy1260; - goto yy146; - } else { - if (yych <= 'u') goto yy1261; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy21: - YYDEBUG(21, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'A') goto yy1230; - goto yy141; - } - } else { - if (yych <= 'H') { - if (yych <= 'E') goto yy1229; - goto yy141; - } else { - if (yych <= 'I') goto yy1231; - if (yych <= 'T') goto yy141; - goto yy1232; - } - } - } else { - if (yych <= 'e') { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych <= 'a') goto yy1230; - if (yych <= 'd') goto yy141; - goto yy1229; - } - } else { - if (yych <= 't') { - if (yych == 'i') goto yy1231; - goto yy141; - } else { - if (yych <= 'u') goto yy1232; - if (yych <= 'z') goto yy141; - goto yy4; - } - } - } -yy22: - YYDEBUG(22, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'I') goto yy1199; - if (yych <= 'K') goto yy141; - goto yy1200; - } - } else { - if (yych <= 'i') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'h') goto yy146; - goto yy1217; - } else { - if (yych == 'l') goto yy1218; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy23: - YYDEBUG(23, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'I') goto yy1199; - if (yych <= 'K') goto yy141; - goto yy1200; - } - } else { - if (yych <= 'i') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'h') goto yy141; - goto yy1199; - } else { - if (yych == 'l') goto yy1200; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy24: - YYDEBUG(24, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy141; - goto yy1098; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy146; - } else { - if (yych <= 'r') goto yy1192; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy25: - YYDEBUG(25, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy141; - goto yy1098; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy141; - } else { - if (yych <= 'r') goto yy1098; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy26: - YYDEBUG(26, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': goto yy1052; - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'S': - case 'T': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'o': - case 'w': - case 'y': goto yy1054; - case '-': goto yy473; - case '.': goto yy1064; - case '/': goto yy472; - case '0': goto yy1097; - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1096; - case ':': goto yy1065; - case 'n': goto yy470; - case 'r': goto yy471; - case 's': goto yy464; - case 't': goto yy468; - default: goto yy13; - } -yy27: - YYDEBUG(27, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': goto yy460; - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'P': - case 'S': - case 'T': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'o': - case 'p': - case 'w': - case 'y': goto yy462; - case '-': goto yy473; - case '.': goto yy474; - case '/': goto yy472; - case '0': - case '1': - case '2': goto yy1096; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1063; - case ':': goto yy483; - case 'n': goto yy470; - case 'r': goto yy471; - case 's': goto yy464; - case 't': goto yy468; - default: goto yy13; - } -yy28: - YYDEBUG(28, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': goto yy460; - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'P': - case 'S': - case 'T': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'o': - case 'p': - case 'w': - case 'y': goto yy462; - case '-': goto yy473; - case '.': goto yy474; - case '/': goto yy472; - case '0': - case '1': - case '2': - case '3': - case '4': goto yy1063; - case '5': - case '6': - case '7': - case '8': - case '9': goto yy1050; - case ':': goto yy483; - case 'n': goto yy470; - case 'r': goto yy471; - case 's': goto yy464; - case 't': goto yy468; - default: goto yy13; - } -yy29: - YYDEBUG(29, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': goto yy460; - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'P': - case 'S': - case 'T': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'o': - case 'p': - case 'w': - case 'y': goto yy462; - case '-': goto yy473; - case '.': goto yy474; - case '/': goto yy472; - case '0': - case '1': goto yy1050; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy469; - case ':': goto yy483; - case 'n': goto yy470; - case 'r': goto yy471; - case 's': goto yy464; - case 't': goto yy468; - default: goto yy13; - } -yy30: - YYDEBUG(30, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': goto yy460; - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'P': - case 'S': - case 'T': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'o': - case 'p': - case 'w': - case 'y': goto yy462; - case '-': goto yy473; - case '.': goto yy474; - case '/': goto yy472; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy469; - case ':': goto yy483; - case 'n': goto yy470; - case 'r': goto yy471; - case 's': goto yy464; - case 't': goto yy468; - default: goto yy13; - } -yy31: - YYDEBUG(31, *YYCURSOR); - yyaccept = 1; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy58; - } - YYDEBUG(-1, yych); - switch (yych) { - case '+': - case '-': goto yy440; - case '0': - case '1': goto yy437; - case '2': goto yy438; - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy439; - default: goto yy13; - } -yy32: - YYDEBUG(32, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy4; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy4; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy4; - } else { - if (yych == '/') goto yy4; - goto yy196; - } - } - } else { - if (yych <= 'V') { - if (yych <= 'H') { - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'I') goto yy436; - if (yych <= 'U') goto yy141; - goto yy435; - } - } else { - if (yych <= 'Z') { - if (yych == 'X') goto yy435; - goto yy141; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy33: - YYDEBUG(33, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy4; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy196; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'Z') { - if (yych <= 'I') goto yy432; - goto yy141; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy34: - YYDEBUG(34, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy4; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy196; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'Z') { - if (yych <= 'I') goto yy430; - goto yy141; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy35: - YYDEBUG(35, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'A') goto yy413; - if (yych <= 'T') goto yy141; - goto yy412; - } - } else { - if (yych <= 'a') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy422; - } else { - if (yych == 'u') goto yy421; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy36: - YYDEBUG(36, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'A') goto yy413; - if (yych <= 'T') goto yy141; - goto yy412; - } - } else { - if (yych <= 'a') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy413; - } else { - if (yych == 'u') goto yy412; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy37: - YYDEBUG(37, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'F') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'O') { - if (yych <= 'G') goto yy391; - goto yy141; - } else { - if (yych <= 'P') goto yy390; - if (yych <= 'T') goto yy141; - goto yy389; - } - } - } else { - if (yych <= 'o') { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych == 'g') goto yy403; - goto yy146; - } - } else { - if (yych <= 't') { - if (yych <= 'p') goto yy402; - goto yy146; - } else { - if (yych <= 'u') goto yy401; - if (yych <= 'z') goto yy146; - goto yy4; - } - } - } -yy38: - YYDEBUG(38, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'F') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'O') { - if (yych <= 'G') goto yy391; - goto yy141; - } else { - if (yych <= 'P') goto yy390; - if (yych <= 'T') goto yy141; - goto yy389; - } - } - } else { - if (yych <= 'o') { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy4; - } else { - if (yych == 'g') goto yy391; - goto yy141; - } - } else { - if (yych <= 't') { - if (yych <= 'p') goto yy390; - goto yy141; - } else { - if (yych <= 'u') goto yy389; - if (yych <= 'z') goto yy141; - goto yy4; - } - } - } -yy39: - YYDEBUG(39, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'C') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'B') goto yy141; - goto yy379; - } - } else { - if (yych <= 'b') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy146; - } else { - if (yych <= 'c') goto yy384; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy40: - YYDEBUG(40, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'C') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'B') goto yy141; - goto yy379; - } - } else { - if (yych <= 'b') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy141; - } else { - if (yych <= 'c') goto yy379; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy41: - YYDEBUG(41, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy192; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy146; - } else { - if (yych <= 'e') goto yy370; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy42: - YYDEBUG(42, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy192; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy141; - } else { - if (yych <= 'e') goto yy192; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy43: - YYDEBUG(43, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy165; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy146; - } else { - if (yych <= 'e') goto yy179; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy44: - YYDEBUG(44, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy141; - goto yy165; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - goto yy141; - } else { - if (yych <= 'e') goto yy165; - if (yych <= 'z') goto yy141; - goto yy4; - } - } -yy45: - YYDEBUG(45, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy141; - } else { - if (yych <= 'Z') { - if (yych <= 'M') goto yy157; - goto yy141; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy146; - goto yy4; - } - } -yy46: - YYDEBUG(46, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') goto yy13; - if (yych <= 'Z') goto yy156; - if (yych <= '`') goto yy13; - if (yych <= 'z') goto yy156; - goto yy13; -yy47: - YYDEBUG(47, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy146; - goto yy4; - } -yy48: - YYDEBUG(48, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy141; - goto yy4; - } -yy49: - YYDEBUG(49, *YYCURSOR); - yyaccept = 2; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy58; - } - if (yych <= '/') goto yy50; - if (yych <= '9') goto yy55; -yy50: - YYDEBUG(50, *YYCURSOR); -#line 1740 "ext/date/lib/parse_date.re" - { - goto std; - } -#line 2420 "ext/date/lib/parse_date.c" -yy51: - YYDEBUG(51, *YYCURSOR); - yych = *++YYCURSOR; - goto yy50; -yy52: - YYDEBUG(52, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(53, *YYCURSOR); -#line 1745 "ext/date/lib/parse_date.re" - { - s->pos = cursor; s->line++; - goto std; - } -#line 2434 "ext/date/lib/parse_date.c" -yy54: - YYDEBUG(54, *YYCURSOR); - yych = *++YYCURSOR; - goto yy13; -yy55: - YYDEBUG(55, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 11) YYFILL(11); - yych = *YYCURSOR; - YYDEBUG(56, *YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy55; - } - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych >= ' ') goto yy60; - } else { - if (yych == 'D') goto yy65; - if (yych >= 'F') goto yy66; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy64; - if (yych >= 'M') goto yy63; - } else { - if (yych <= 'S') { - if (yych >= 'S') goto yy62; - } else { - if (yych <= 'T') goto yy69; - if (yych >= 'W') goto yy68; - } - } - } - } else { - if (yych <= 'l') { - if (yych <= 'd') { - if (yych == 'Y') goto yy67; - if (yych >= 'd') goto yy65; - } else { - if (yych <= 'f') { - if (yych >= 'f') goto yy66; - } else { - if (yych == 'h') goto yy64; - } - } - } else { - if (yych <= 't') { - if (yych <= 'm') goto yy63; - if (yych <= 'r') goto yy57; - if (yych <= 's') goto yy62; - goto yy69; - } else { - if (yych <= 'w') { - if (yych >= 'w') goto yy68; - } else { - if (yych == 'y') goto yy67; - } - } - } - } -yy57: - YYDEBUG(57, *YYCURSOR); - YYCURSOR = YYMARKER; - if (yyaccept <= 16) { - if (yyaccept <= 8) { - if (yyaccept <= 4) { - if (yyaccept <= 2) { - if (yyaccept <= 1) { - if (yyaccept <= 0) { - goto yy4; - } else { - goto yy13; - } - } else { - goto yy50; - } - } else { - if (yyaccept <= 3) { - goto yy73; - } else { - goto yy167; - } - } - } else { - if (yyaccept <= 6) { - if (yyaccept <= 5) { - goto yy194; - } else { - goto yy199; - } - } else { - if (yyaccept <= 7) { - goto yy223; - } else { - goto yy295; - } - } - } - } else { - if (yyaccept <= 12) { - if (yyaccept <= 10) { - if (yyaccept <= 9) { - goto yy393; - } else { - goto yy476; - } - } else { - if (yyaccept <= 11) { - goto yy491; - } else { - goto yy612; - } - } - } else { - if (yyaccept <= 14) { - if (yyaccept <= 13) { - goto yy657; - } else { - goto yy667; - } - } else { - if (yyaccept <= 15) { - goto yy764; - } else { - goto yy784; - } - } - } - } - } else { - if (yyaccept <= 25) { - if (yyaccept <= 21) { - if (yyaccept <= 19) { - if (yyaccept <= 18) { - if (yyaccept <= 17) { - goto yy815; - } else { - goto yy822; - } - } else { - goto yy849; - } - } else { - if (yyaccept <= 20) { - goto yy794; - } else { - goto yy455; - } - } - } else { - if (yyaccept <= 23) { - if (yyaccept <= 22) { - goto yy974; - } else { - goto yy843; - } - } else { - if (yyaccept <= 24) { - goto yy1068; - } else { - goto yy1076; - } - } - } - } else { - if (yyaccept <= 29) { - if (yyaccept <= 27) { - if (yyaccept <= 26) { - goto yy1118; - } else { - goto yy1142; - } - } else { - if (yyaccept <= 28) { - goto yy1295; - } else { - goto yy1417; - } - } - } else { - if (yyaccept <= 31) { - if (yyaccept <= 30) { - goto yy1420; - } else { - goto yy1500; - } - } else { - if (yyaccept <= 32) { - goto yy1508; - } else { - goto yy1531; - } - } - } - } - } -yy58: - YYDEBUG(58, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(59, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy58; - } - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy55; - goto yy57; -yy60: - YYDEBUG(60, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 11) YYFILL(11); - yych = *YYCURSOR; -yy61: - YYDEBUG(61, *YYCURSOR); - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy57; - goto yy60; - } else { - if (yych == 'D') goto yy65; - if (yych <= 'E') goto yy57; - goto yy66; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy64; - if (yych <= 'L') goto yy57; - goto yy63; - } else { - if (yych <= 'S') { - if (yych <= 'R') goto yy57; - } else { - if (yych <= 'T') goto yy69; - if (yych <= 'V') goto yy57; - goto yy68; - } - } - } - } else { - if (yych <= 'l') { - if (yych <= 'd') { - if (yych == 'Y') goto yy67; - if (yych <= 'c') goto yy57; - goto yy65; - } else { - if (yych <= 'f') { - if (yych <= 'e') goto yy57; - goto yy66; - } else { - if (yych == 'h') goto yy64; - goto yy57; - } - } - } else { - if (yych <= 't') { - if (yych <= 'm') goto yy63; - if (yych <= 'r') goto yy57; - if (yych >= 't') goto yy69; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy57; - goto yy68; - } else { - if (yych == 'y') goto yy67; - goto yy57; - } - } - } - } -yy62: - YYDEBUG(62, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'D') { - if (yych == 'A') goto yy127; - goto yy57; - } else { - if (yych <= 'E') goto yy128; - if (yych <= 'T') goto yy57; - goto yy126; - } - } else { - if (yych <= 'd') { - if (yych == 'a') goto yy127; - goto yy57; - } else { - if (yych <= 'e') goto yy128; - if (yych == 'u') goto yy126; - goto yy57; - } - } -yy63: - YYDEBUG(63, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych == 'I') goto yy118; - if (yych <= 'N') goto yy57; - goto yy117; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy57; - goto yy118; - } else { - if (yych == 'o') goto yy117; - goto yy57; - } - } -yy64: - YYDEBUG(64, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy115; - if (yych == 'o') goto yy115; - goto yy57; -yy65: - YYDEBUG(65, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy114; - if (yych == 'a') goto yy114; - goto yy57; -yy66: - YYDEBUG(66, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych == 'O') goto yy99; - if (yych <= 'Q') goto yy57; - goto yy98; - } else { - if (yych <= 'o') { - if (yych <= 'n') goto yy57; - goto yy99; - } else { - if (yych == 'r') goto yy98; - goto yy57; - } - } -yy67: - YYDEBUG(67, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy95; - if (yych == 'e') goto yy95; - goto yy57; -yy68: - YYDEBUG(68, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy83; - if (yych == 'e') goto yy83; - goto yy57; -yy69: - YYDEBUG(69, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'H') goto yy70; - if (yych <= 'T') goto yy57; - goto yy71; - } else { - if (yych <= 'h') { - if (yych <= 'g') goto yy57; - } else { - if (yych == 'u') goto yy71; - goto yy57; - } - } -yy70: - YYDEBUG(70, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy78; - if (yych == 'u') goto yy78; - goto yy57; -yy71: - YYDEBUG(71, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy72; - if (yych != 'e') goto yy57; -yy72: - YYDEBUG(72, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy74; - if (yych == 's') goto yy74; -yy73: - YYDEBUG(73, *YYCURSOR); -#line 1724 "ext/date/lib/parse_date.re" - { - timelib_ull i; - DEBUG_OUTPUT("relative"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_unsigned_nr((char **) &ptr, 24); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, 1, s); - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 2836 "ext/date/lib/parse_date.c" -yy74: - YYDEBUG(74, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy75; - if (yych != 'd') goto yy57; -yy75: - YYDEBUG(75, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy76; - if (yych != 'a') goto yy57; -yy76: - YYDEBUG(76, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych != 'y') goto yy57; -yy77: - YYDEBUG(77, *YYCURSOR); - yych = *++YYCURSOR; - goto yy73; -yy78: - YYDEBUG(78, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy79; - if (yych != 'r') goto yy73; -yy79: - YYDEBUG(79, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy80; - if (yych != 's') goto yy57; -yy80: - YYDEBUG(80, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy81; - if (yych != 'd') goto yy57; -yy81: - YYDEBUG(81, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy82; - if (yych != 'a') goto yy57; -yy82: - YYDEBUG(82, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych == 'y') goto yy77; - goto yy57; -yy83: - YYDEBUG(83, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= 'C') goto yy57; - if (yych <= 'D') goto yy85; - } else { - if (yych <= 'c') goto yy57; - if (yych <= 'd') goto yy85; - if (yych >= 'f') goto yy57; - } - YYDEBUG(84, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy91; - if (yych == 'k') goto yy91; - goto yy57; -yy85: - YYDEBUG(85, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'N') goto yy86; - if (yych != 'n') goto yy73; -yy86: - YYDEBUG(86, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy87; - if (yych != 'e') goto yy57; -yy87: - YYDEBUG(87, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy88; - if (yych != 's') goto yy57; -yy88: - YYDEBUG(88, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy89; - if (yych != 'd') goto yy57; -yy89: - YYDEBUG(89, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy90; - if (yych != 'a') goto yy57; -yy90: - YYDEBUG(90, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych == 'y') goto yy77; - goto yy57; -yy91: - YYDEBUG(91, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych == 'D') goto yy92; - if (yych <= 'R') goto yy73; - goto yy77; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy73; - } else { - if (yych == 's') goto yy77; - goto yy73; - } - } -yy92: - YYDEBUG(92, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy93; - if (yych != 'a') goto yy57; -yy93: - YYDEBUG(93, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy94; - if (yych != 'y') goto yy57; -yy94: - YYDEBUG(94, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy77; - if (yych == 's') goto yy77; - goto yy73; -yy95: - YYDEBUG(95, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy96; - if (yych != 'a') goto yy57; -yy96: - YYDEBUG(96, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy97; - if (yych != 'r') goto yy57; -yy97: - YYDEBUG(97, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy77; - if (yych == 's') goto yy77; - goto yy73; -yy98: - YYDEBUG(98, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy111; - if (yych == 'i') goto yy111; - goto yy57; -yy99: - YYDEBUG(99, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy100; - if (yych != 'r') goto yy57; -yy100: - YYDEBUG(100, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy101; - if (yych != 't') goto yy57; -yy101: - YYDEBUG(101, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'H') goto yy103; - if (yych <= 'M') goto yy57; - } else { - if (yych <= 'h') { - if (yych <= 'g') goto yy57; - goto yy103; - } else { - if (yych != 'n') goto yy57; - } - } - YYDEBUG(102, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy108; - if (yych == 'i') goto yy108; - goto yy57; -yy103: - YYDEBUG(103, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy104; - if (yych != 'n') goto yy57; -yy104: - YYDEBUG(104, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy105; - if (yych != 'i') goto yy57; -yy105: - YYDEBUG(105, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy106; - if (yych != 'g') goto yy57; -yy106: - YYDEBUG(106, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy107; - if (yych != 'h') goto yy57; -yy107: - YYDEBUG(107, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy97; - if (yych == 't') goto yy97; - goto yy57; -yy108: - YYDEBUG(108, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy109; - if (yych != 'g') goto yy57; -yy109: - YYDEBUG(109, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy110; - if (yych != 'h') goto yy57; -yy110: - YYDEBUG(110, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy97; - if (yych == 't') goto yy97; - goto yy57; -yy111: - YYDEBUG(111, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy112; - if (yych != 'd') goto yy73; -yy112: - YYDEBUG(112, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy113; - if (yych != 'a') goto yy57; -yy113: - YYDEBUG(113, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych == 'y') goto yy77; - goto yy57; -yy114: - YYDEBUG(114, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy97; - if (yych == 'y') goto yy97; - goto yy57; -yy115: - YYDEBUG(115, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy116; - if (yych != 'u') goto yy57; -yy116: - YYDEBUG(116, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy97; - if (yych == 'r') goto yy97; - goto yy57; -yy117: - YYDEBUG(117, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy122; - if (yych == 'n') goto yy122; - goto yy57; -yy118: - YYDEBUG(118, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy119; - if (yych != 'n') goto yy57; -yy119: - YYDEBUG(119, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych == 'S') goto yy77; - if (yych <= 'T') goto yy73; - } else { - if (yych <= 's') { - if (yych <= 'r') goto yy73; - goto yy77; - } else { - if (yych != 'u') goto yy73; - } - } - YYDEBUG(120, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy121; - if (yych != 't') goto yy57; -yy121: - YYDEBUG(121, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy97; - if (yych == 'e') goto yy97; - goto yy57; -yy122: - YYDEBUG(122, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych == 'D') goto yy123; - if (yych <= 'S') goto yy73; - goto yy124; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy73; - } else { - if (yych == 't') goto yy124; - goto yy73; - } - } -yy123: - YYDEBUG(123, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy125; - if (yych == 'a') goto yy125; - goto yy57; -yy124: - YYDEBUG(124, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy97; - if (yych == 'h') goto yy97; - goto yy57; -yy125: - YYDEBUG(125, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych == 'y') goto yy77; - goto yy57; -yy126: - YYDEBUG(126, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy137; - if (yych == 'n') goto yy137; - goto yy57; -yy127: - YYDEBUG(127, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy132; - if (yych == 't') goto yy132; - goto yy57; -yy128: - YYDEBUG(128, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy129; - if (yych != 'c') goto yy57; -yy129: - YYDEBUG(129, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych == 'O') goto yy130; - if (yych <= 'R') goto yy73; - goto yy77; - } else { - if (yych <= 'o') { - if (yych <= 'n') goto yy73; - } else { - if (yych == 's') goto yy77; - goto yy73; - } - } -yy130: - YYDEBUG(130, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy131; - if (yych != 'n') goto yy57; -yy131: - YYDEBUG(131, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy97; - if (yych == 'd') goto yy97; - goto yy57; -yy132: - YYDEBUG(132, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy133; - if (yych != 'u') goto yy73; -yy133: - YYDEBUG(133, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy134; - if (yych != 'r') goto yy57; -yy134: - YYDEBUG(134, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy135; - if (yych != 'd') goto yy57; -yy135: - YYDEBUG(135, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy136; - if (yych != 'a') goto yy57; -yy136: - YYDEBUG(136, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych == 'y') goto yy77; - goto yy57; -yy137: - YYDEBUG(137, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy138; - if (yych != 'd') goto yy73; -yy138: - YYDEBUG(138, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy139; - if (yych != 'a') goto yy57; -yy139: - YYDEBUG(139, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy77; - if (yych == 'y') goto yy77; - goto yy57; -yy140: - YYDEBUG(140, *YYCURSOR); - yych = *++YYCURSOR; - goto yy4; -yy141: - YYDEBUG(141, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } -yy142: - YYDEBUG(142, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } -yy143: - YYDEBUG(143, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } -yy144: - YYDEBUG(144, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } -yy145: - YYDEBUG(145, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == ')') goto yy140; - goto yy4; -yy146: - YYDEBUG(146, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy4; - if (yych <= 'Z') goto yy142; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } - } -yy147: - YYDEBUG(147, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy4; - if (yych <= 'Z') goto yy143; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy151; - goto yy4; - } - } -yy148: - YYDEBUG(148, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 8) { - goto yy149; - } - goto yy57; -yy149: - YYDEBUG(149, *YYCURSOR); - yyaccept = 0; - YYMARKER = ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(150, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy149; - } - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy4; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy4; - } -yy151: - YYDEBUG(151, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy4; - if (yych <= 'Z') goto yy144; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } - } -yy152: - YYDEBUG(152, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy4; - if (yych <= 'Z') goto yy145; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - if (yych >= '{') goto yy4; - } - } -yy153: - YYDEBUG(153, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy4; - goto yy148; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } -yy154: - YYDEBUG(154, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy155: - YYDEBUG(155, *YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy57; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy57; - } -yy156: - YYDEBUG(156, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy141; - goto yy4; - } -yy157: - YYDEBUG(157, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'Z') { - if (yych >= 'U') goto yy142; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy142; - goto yy4; - } - } - YYDEBUG(158, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych != '+') goto yy4; - } - } else { - if (yych <= 'Z') { - if (yych <= '-') goto yy159; - if (yych <= '@') goto yy4; - goto yy143; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy159: - YYDEBUG(159, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy160; - if (yych <= '2') goto yy161; - if (yych <= '9') goto yy162; - goto yy57; -yy160: - YYDEBUG(160, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy162; - if (yych <= ':') goto yy163; - goto yy4; -yy161: - YYDEBUG(161, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy4; - if (yych >= '5') goto yy164; - } else { - if (yych <= '9') goto yy140; - if (yych <= ':') goto yy163; - goto yy4; - } -yy162: - YYDEBUG(162, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy4; - if (yych <= '5') goto yy164; - if (yych <= '9') goto yy140; - if (yych >= ';') goto yy4; -yy163: - YYDEBUG(163, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy4; - if (yych <= '5') goto yy164; - if (yych <= '9') goto yy140; - goto yy4; -yy164: - YYDEBUG(164, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy140; - goto yy4; -yy165: - YYDEBUG(165, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'C') goto yy142; - if (yych >= 'E') goto yy168; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'd') goto yy166; - if (yych <= 'e') goto yy168; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy166: - YYDEBUG(166, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= 'N') { - if (yych <= ')') { - if (yych >= ')') goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'M') goto yy143; - goto yy174; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych >= 'a') goto yy143; - } else { - if (yych <= 'n') goto yy174; - if (yych <= 'z') goto yy143; - } - } -yy167: - YYDEBUG(167, *YYCURSOR); -#line 1587 "ext/date/lib/parse_date.re" - { - const timelib_relunit* relunit; - DEBUG_OUTPUT("daytext"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_HAVE_WEEKDAY_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - relunit = timelib_lookup_relunit((char**) &ptr); - s->time->relative.weekday = relunit->multiplier; - if (s->time->relative.weekday_behavior != 2) { - s->time->relative.weekday_behavior = 1; - } - - TIMELIB_DEINIT; - return TIMELIB_WEEKDAY; - } -#line 3615 "ext/date/lib/parse_date.c" -yy168: - YYDEBUG(168, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'K') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'J') goto yy143; - } - } else { - if (yych <= 'j') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'k') goto yy169; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy169: - YYDEBUG(169, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy144; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'd') goto yy170; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy170: - YYDEBUG(170, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy145; - goto yy4; - } else { - if (yych <= 'a') goto yy171; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy171: - YYDEBUG(171, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'X') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Y') goto yy172; - if (yych != 'y') goto yy4; - } -yy172: - YYDEBUG(172, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy173; - if (yych != 's') goto yy167; -yy173: - YYDEBUG(173, *YYCURSOR); - yych = *++YYCURSOR; - goto yy167; -yy174: - YYDEBUG(174, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy144; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'e') goto yy175; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy175: - YYDEBUG(175, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'R') goto yy145; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 's') goto yy176; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy176: - YYDEBUG(176, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'D') goto yy177; - if (yych != 'd') goto yy4; - } -yy177: - YYDEBUG(177, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy178; - if (yych != 'a') goto yy57; -yy178: - YYDEBUG(178, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy173; - goto yy57; -yy179: - YYDEBUG(179, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy4; - goto yy148; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy142; - goto yy166; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'E') goto yy168; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy147; - } else { - if (yych <= 'e') goto yy181; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } - YYDEBUG(180, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy174; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 'n') goto yy187; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy181: - YYDEBUG(181, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'J') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'K') goto yy169; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'j') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'k') goto yy182; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy182: - YYDEBUG(182, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy170; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'd') goto yy183; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy183: - YYDEBUG(183, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy171; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy184; - if (yych <= 'z') goto yy153; - goto yy4; - } - } -yy184: - YYDEBUG(184, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'Y') goto yy172; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'y') goto yy185; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy185: - YYDEBUG(185, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy167; - } else { - if (yych <= '/') goto yy148; - if (yych <= 'R') goto yy167; - goto yy173; - } - } else { - if (yych <= '`') { - if (yych == '_') goto yy148; - goto yy167; - } else { - if (yych == 's') goto yy186; - if (yych <= 'z') goto yy154; - goto yy167; - } - } -yy186: - YYDEBUG(186, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy167; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy167; - } -yy187: - YYDEBUG(187, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy175; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'e') goto yy188; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy188: - YYDEBUG(188, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy176; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 's') goto yy189; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy189: - YYDEBUG(189, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'D') goto yy177; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'd') goto yy190; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy190: - YYDEBUG(190, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy178; - if (yych != 'a') goto yy155; - YYDEBUG(191, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy186; - goto yy155; -yy192: - YYDEBUG(192, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'C') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'B') goto yy142; - } - } else { - if (yych <= 'b') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'c') goto yy193; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy193: - YYDEBUG(193, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych >= '\t') goto yy196; - } else { - if (yych == ' ') goto yy196; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - } else { - if (yych == 'E') goto yy202; - goto yy143; - } - } else { - if (yych <= 'd') { - if (yych >= 'a') goto yy143; - } else { - if (yych <= 'e') goto yy202; - if (yych <= 'z') goto yy143; - } - } - } -yy194: - YYDEBUG(194, *YYCURSOR); -#line 1646 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("monthtext"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_lookup_month((char **) &ptr); - TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; - } -#line 4144 "ext/date/lib/parse_date.c" -yy195: - YYDEBUG(195, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 21) YYFILL(21); - yych = *YYCURSOR; -yy196: - YYDEBUG(196, *YYCURSOR); - if (yybm[0+yych] & 32) { - goto yy195; - } - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy198; - if (yych <= '3') goto yy200; - if (yych <= '9') goto yy201; - goto yy57; -yy197: - YYDEBUG(197, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy196; - if (yych <= '0') goto yy357; - if (yych <= '2') goto yy358; - if (yych <= '3') goto yy359; - goto yy196; -yy198: - YYDEBUG(198, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy298; - goto yy299; - } else { - if (yych <= '2') goto yy355; - if (yych <= '9') goto yy356; - goto yy216; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy212; - if (yych <= 'q') goto yy216; - goto yy213; - } else { - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy199: - YYDEBUG(199, *YYCURSOR); -#line 1396 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("datetextual | datenoyear"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; - } -#line 4207 "ext/date/lib/parse_date.c" -yy200: - YYDEBUG(200, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy298; - goto yy299; - } else { - if (yych <= '2') goto yy209; - if (yych <= '9') goto yy210; - goto yy216; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy212; - if (yych <= 'q') goto yy216; - goto yy213; - } else { - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy201: - YYDEBUG(201, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy207; - goto yy208; - } else { - if (yych <= '2') goto yy209; - if (yych <= '9') goto yy210; - goto yy216; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy212; - if (yych <= 'q') goto yy216; - goto yy213; - } else { - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy202: - YYDEBUG(202, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'M') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'L') goto yy144; - } - } else { - if (yych <= 'l') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'm') goto yy203; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy203: - YYDEBUG(203, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'B') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'A') goto yy145; - } - } else { - if (yych <= 'a') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'b') goto yy204; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy204: - YYDEBUG(204, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'E') goto yy205; - if (yych != 'e') goto yy4; - } -yy205: - YYDEBUG(205, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych != 'r') goto yy57; -yy206: - YYDEBUG(206, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy194; - goto yy196; - } else { - if (yych <= '.') { - if (yych <= ',') goto yy194; - goto yy196; - } else { - if (yych <= '/') goto yy194; - if (yych <= '9') goto yy196; - goto yy194; - } - } -yy207: - YYDEBUG(207, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy57; - } else { - if (yych <= '0') goto yy296; - if (yych <= '9') goto yy297; - if (yych <= ':') goto yy221; - goto yy57; - } -yy208: - YYDEBUG(208, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '2') goto yy297; - if (yych <= '9') goto yy296; - if (yych <= ':') goto yy264; - goto yy57; - } -yy209: - YYDEBUG(209, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '4') goto yy296; - if (yych <= '9') goto yy293; - if (yych <= ':') goto yy264; - goto yy57; - } -yy210: - YYDEBUG(210, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '9') goto yy293; - if (yych <= ':') goto yy264; - goto yy57; - } -yy211: - YYDEBUG(211, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - goto yy216; -yy212: - YYDEBUG(212, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - goto yy216; -yy213: - YYDEBUG(213, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - goto yy216; -yy214: - YYDEBUG(214, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - goto yy216; -yy215: - YYDEBUG(215, *YYCURSOR); - yyaccept = 6; - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 18) YYFILL(18); - yych = *YYCURSOR; -yy216: - YYDEBUG(216, *YYCURSOR); - if (yybm[0+yych] & 64) { - goto yy215; - } - if (yych <= '2') { - if (yych <= '/') goto yy199; - if (yych <= '0') goto yy259; - if (yych <= '1') goto yy260; - goto yy261; - } else { - if (yych <= '9') goto yy262; - if (yych != 'T') goto yy199; - } - YYDEBUG(217, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy218; - if (yych <= '2') goto yy219; - if (yych <= '9') goto yy220; - goto yy57; -yy218: - YYDEBUG(218, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy57; - } else { - if (yych <= '9') goto yy220; - if (yych <= ':') goto yy221; - goto yy57; - } -yy219: - YYDEBUG(219, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy57; - } else { - if (yych <= '4') goto yy220; - if (yych == ':') goto yy221; - goto yy57; - } -yy220: - YYDEBUG(220, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy221; - if (yych != ':') goto yy57; -yy221: - YYDEBUG(221, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy222; - if (yych <= '9') goto yy224; - goto yy57; -yy222: - YYDEBUG(222, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy225; - } else { - if (yych <= '9') goto yy224; - if (yych <= ':') goto yy225; - } -yy223: - YYDEBUG(223, *YYCURSOR); -#line 1694 "ext/date/lib/parse_date.re" - { - int tz_not_found; - DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_error(s, "The timezone could not be found in the database"); - } - } - TIMELIB_DEINIT; - return TIMELIB_SHORTDATE_WITH_TIME; - } -#line 4505 "ext/date/lib/parse_date.c" -yy224: - YYDEBUG(224, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy225; - if (yych != ':') goto yy223; -yy225: - YYDEBUG(225, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy226; - if (yych <= '6') goto yy227; - if (yych <= '9') goto yy228; - goto yy57; -yy226: - YYDEBUG(226, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy229; - goto yy223; -yy227: - YYDEBUG(227, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '0') goto yy229; - goto yy223; -yy228: - YYDEBUG(228, *YYCURSOR); - yych = *++YYCURSOR; - goto yy223; -yy229: - YYDEBUG(229, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '*') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy231; - goto yy223; - } else { - if (yych <= ' ') goto yy231; - if (yych == '(') goto yy231; - goto yy223; - } - } else { - if (yych <= '@') { - if (yych == ',') goto yy223; - if (yych <= '-') goto yy231; - goto yy223; - } else { - if (yych <= 'Z') goto yy231; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy231; - goto yy223; - } - } -yy230: - YYDEBUG(230, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; -yy231: - YYDEBUG(231, *YYCURSOR); - if (yych <= '+') { - if (yych <= ' ') { - if (yych == '\t') goto yy230; - if (yych <= 0x1F) goto yy57; - goto yy230; - } else { - if (yych == '(') goto yy234; - if (yych <= '*') goto yy57; - goto yy233; - } - } else { - if (yych <= 'F') { - if (yych == '-') goto yy233; - if (yych <= '@') goto yy57; - goto yy235; - } else { - if (yych <= 'Z') { - if (yych >= 'H') goto yy235; - } else { - if (yych <= '`') goto yy57; - if (yych <= 'z') goto yy236; - goto yy57; - } - } - } -yy232: - YYDEBUG(232, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych == ')') goto yy228; - if (yych <= '@') goto yy223; - goto yy237; - } else { - if (yych <= 'Z') { - if (yych <= 'M') goto yy257; - goto yy237; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy242; - goto yy223; - } - } -yy233: - YYDEBUG(233, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy252; - if (yych <= '2') goto yy253; - if (yych <= '9') goto yy254; - goto yy57; -yy234: - YYDEBUG(234, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') goto yy57; - if (yych <= 'Z') goto yy236; - if (yych <= '`') goto yy57; - if (yych <= 'z') goto yy236; - goto yy57; -yy235: - YYDEBUG(235, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= 'Z') goto yy237; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy242; - goto yy223; - } -yy236: - YYDEBUG(236, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= 'Z') goto yy237; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } -yy237: - YYDEBUG(237, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= 'Z') goto yy238; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } -yy238: - YYDEBUG(238, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= 'Z') goto yy239; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } -yy239: - YYDEBUG(239, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= 'Z') goto yy240; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } -yy240: - YYDEBUG(240, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= 'Z') goto yy241; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } -yy241: - YYDEBUG(241, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == ')') goto yy228; - goto yy223; -yy242: - YYDEBUG(242, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych == '.') goto yy223; - goto yy244; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy223; - if (yych <= 'Z') goto yy238; - goto yy223; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } - } -yy243: - YYDEBUG(243, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych == '.') goto yy223; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy223; - if (yych <= 'Z') goto yy239; - goto yy223; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy247; - goto yy223; - } - } -yy244: - YYDEBUG(244, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '@') goto yy57; - if (yych <= 'Z') goto yy245; - if (yych <= '`') goto yy57; - if (yych >= '{') goto yy57; -yy245: - YYDEBUG(245, *YYCURSOR); - yyaccept = 7; - YYMARKER = ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(246, *YYCURSOR); - if (yych <= '@') { - if (yych <= '-') { - if (yych <= ',') goto yy223; - goto yy244; - } else { - if (yych == '/') goto yy244; - goto yy223; - } - } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy245; - if (yych <= '^') goto yy223; - goto yy244; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy245; - goto yy223; - } - } -yy247: - YYDEBUG(247, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych == '.') goto yy223; - goto yy244; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy223; - if (yych <= 'Z') goto yy240; - goto yy223; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } - } - YYDEBUG(248, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych == '.') goto yy223; - goto yy244; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy223; - if (yych <= 'Z') goto yy241; - goto yy223; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } - } - YYDEBUG(249, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; - } else { - if (yych == '-') goto yy244; - goto yy223; - } - } else { - if (yych <= '_') { - if (yych <= '/') goto yy244; - if (yych <= '^') goto yy223; - goto yy244; - } else { - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; - } - } -yy250: - YYDEBUG(250, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(251, *YYCURSOR); - if (yych <= '/') { - if (yych == '-') goto yy244; - if (yych <= '.') goto yy57; - goto yy244; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy57; - goto yy244; - } else { - if (yych <= '`') goto yy57; - if (yych <= 'z') goto yy250; - goto yy57; - } - } -yy252: - YYDEBUG(252, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy254; - if (yych <= ':') goto yy255; - goto yy223; -yy253: - YYDEBUG(253, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy223; - if (yych >= '5') goto yy256; - } else { - if (yych <= '9') goto yy228; - if (yych <= ':') goto yy255; - goto yy223; - } -yy254: - YYDEBUG(254, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '5') goto yy256; - if (yych <= '9') goto yy228; - if (yych >= ';') goto yy223; -yy255: - YYDEBUG(255, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '5') goto yy256; - if (yych <= '9') goto yy228; - goto yy223; -yy256: - YYDEBUG(256, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy228; - goto yy223; -yy257: - YYDEBUG(257, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == ')') goto yy228; - if (yych <= '@') goto yy223; - goto yy238; - } else { - if (yych <= 'Z') { - if (yych >= 'U') goto yy238; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy238; - goto yy223; - } - } - YYDEBUG(258, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; - } else { - if (yych == '+') goto yy233; - goto yy223; - } - } else { - if (yych <= 'Z') { - if (yych <= '-') goto yy233; - if (yych <= '@') goto yy223; - goto yy239; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy239; - goto yy223; - } - } -yy259: - YYDEBUG(259, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy199; - } else { - if (yych <= '0') goto yy291; - if (yych <= '9') goto yy292; - if (yych <= ':') goto yy221; - goto yy199; - } -yy260: - YYDEBUG(260, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy199; - } else { - if (yych <= '2') goto yy292; - if (yych <= '9') goto yy291; - if (yych <= ':') goto yy264; - goto yy199; - } -yy261: - YYDEBUG(261, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy199; - } else { - if (yych <= '4') goto yy291; - if (yych <= '9') goto yy263; - if (yych <= ':') goto yy264; - goto yy199; - } -yy262: - YYDEBUG(262, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy199; - } else { - if (yych <= '9') goto yy263; - if (yych <= ':') goto yy264; - goto yy199; - } -yy263: - YYDEBUG(263, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy199; - if (yych <= '9') goto yy289; - goto yy199; -yy264: - YYDEBUG(264, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy265; - if (yych <= '9') goto yy266; - goto yy57; -yy265: - YYDEBUG(265, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy267; - goto yy223; - } else { - if (yych <= '9') goto yy282; - if (yych <= ':') goto yy267; - goto yy223; - } -yy266: - YYDEBUG(266, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy267; - if (yych != ':') goto yy223; -yy267: - YYDEBUG(267, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy268; - if (yych <= '6') goto yy269; - if (yych <= '9') goto yy228; - goto yy57; -yy268: - YYDEBUG(268, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy270; - goto yy223; -yy269: - YYDEBUG(269, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy223; -yy270: - YYDEBUG(270, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '*') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy272; - goto yy223; - } else { - if (yych <= ' ') goto yy272; - if (yych == '(') goto yy272; - goto yy223; - } - } else { - if (yych <= '@') { - if (yych == ',') goto yy223; - if (yych <= '-') goto yy272; - goto yy223; - } else { - if (yych <= 'Z') goto yy272; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy272; - goto yy223; - } - } -yy271: - YYDEBUG(271, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; -yy272: - YYDEBUG(272, *YYCURSOR); - if (yych <= '@') { - if (yych <= '\'') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy57; - goto yy271; - } else { - if (yych == ' ') goto yy271; - goto yy57; - } - } else { - if (yych <= '+') { - if (yych <= '(') goto yy234; - if (yych <= '*') goto yy57; - goto yy233; - } else { - if (yych == '-') goto yy233; - goto yy57; - } - } - } else { - if (yych <= 'Z') { - if (yych <= 'G') { - if (yych <= 'A') goto yy273; - if (yych <= 'F') goto yy235; - goto yy232; - } else { - if (yych != 'P') goto yy235; - } - } else { - if (yych <= 'o') { - if (yych <= '`') goto yy57; - if (yych <= 'a') goto yy274; - goto yy236; - } else { - if (yych <= 'p') goto yy274; - if (yych <= 'z') goto yy236; - goto yy57; - } - } - } -yy273: - YYDEBUG(273, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= '.') goto yy275; - if (yych <= '@') goto yy223; - goto yy237; - } - } else { - if (yych <= '`') { - if (yych <= 'M') goto yy276; - if (yych <= 'Z') goto yy237; - goto yy223; - } else { - if (yych == 'm') goto yy281; - if (yych <= 'z') goto yy242; - goto yy223; - } - } -yy274: - YYDEBUG(274, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= '.') goto yy275; - if (yych <= '@') goto yy223; - goto yy237; - } - } else { - if (yych <= '`') { - if (yych <= 'M') goto yy276; - if (yych <= 'Z') goto yy237; - goto yy223; - } else { - if (yych == 'm') goto yy276; - if (yych <= 'z') goto yy237; - goto yy223; - } - } -yy275: - YYDEBUG(275, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy280; - if (yych == 'm') goto yy280; - goto yy57; -yy276: - YYDEBUG(276, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy278; - if (yych <= 0x08) goto yy223; - goto yy278; - } else { - if (yych == ' ') goto yy278; - if (yych <= '(') goto yy223; - goto yy228; - } - } else { - if (yych <= '@') { - if (yych != '.') goto yy223; - } else { - if (yych <= 'Z') goto yy238; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy238; - goto yy223; - } - } -yy277: - YYDEBUG(277, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy278; - if (yych <= 0x08) goto yy57; - } else { - if (yych != ' ') goto yy57; - } -yy278: - YYDEBUG(278, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(279, *YYCURSOR); -#line 1670 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - - s->time->h += timelib_meridian((char **) &ptr, s->time->h); - TIMELIB_DEINIT; - return TIMELIB_SHORTDATE_WITH_TIME; - } -#line 5226 "ext/date/lib/parse_date.c" -yy280: - YYDEBUG(280, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy278; - if (yych == '\t') goto yy278; - goto yy57; - } else { - if (yych <= ' ') goto yy278; - if (yych == '.') goto yy277; - goto yy57; - } -yy281: - YYDEBUG(281, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy278; - if (yych == '\t') goto yy278; - goto yy223; - } else { - if (yych <= '(') { - if (yych <= ' ') goto yy278; - goto yy223; - } else { - if (yych <= ')') goto yy228; - if (yych <= ',') goto yy223; - goto yy244; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '.') goto yy277; - if (yych <= '/') goto yy244; - if (yych <= '@') goto yy223; - goto yy238; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy223; - goto yy244; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy243; - goto yy223; - } - } - } -yy282: - YYDEBUG(282, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy283; - if (yych <= 0x1F) goto yy223; - } else { - if (yych == '.') goto yy267; - if (yych <= '9') goto yy223; - goto yy267; - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy285; - if (yych <= 'O') goto yy223; - goto yy285; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy223; - goto yy285; - } else { - if (yych == 'p') goto yy285; - goto yy223; - } - } - } -yy283: - YYDEBUG(283, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; - YYDEBUG(284, *YYCURSOR); - if (yych <= 'A') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy283; - goto yy57; - } else { - if (yych <= ' ') goto yy283; - if (yych <= '@') goto yy57; - } - } else { - if (yych <= '`') { - if (yych != 'P') goto yy57; - } else { - if (yych <= 'a') goto yy285; - if (yych != 'p') goto yy57; - } - } -yy285: - YYDEBUG(285, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy57; - } else { - if (yych <= 'M') goto yy287; - if (yych == 'm') goto yy287; - goto yy57; - } -yy286: - YYDEBUG(286, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy287; - if (yych != 'm') goto yy57; -yy287: - YYDEBUG(287, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy278; - if (yych == '\t') goto yy278; - goto yy57; - } else { - if (yych <= ' ') goto yy278; - if (yych != '.') goto yy57; - } -yy288: - YYDEBUG(288, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy278; - if (yych <= 0x08) goto yy57; - goto yy278; - } else { - if (yych == ' ') goto yy278; - goto yy57; - } -yy289: - YYDEBUG(289, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy199; - if (yych >= ':') goto yy199; - YYDEBUG(290, *YYCURSOR); - yych = *++YYCURSOR; - goto yy199; -yy291: - YYDEBUG(291, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy199; - } else { - if (yych <= '9') goto yy289; - if (yych <= ':') goto yy221; - goto yy199; - } -yy292: - YYDEBUG(292, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy199; - } else { - if (yych <= '9') goto yy289; - if (yych <= ':') goto yy264; - goto yy199; - } -yy293: - YYDEBUG(293, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy294: - YYDEBUG(294, *YYCURSOR); - ++YYCURSOR; -yy295: - YYDEBUG(295, *YYCURSOR); -#line 1370 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("datenoday"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_NO_DAY; - } -#line 5416 "ext/date/lib/parse_date.c" -yy296: - YYDEBUG(296, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy57; - } else { - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy221; - goto yy57; - } -yy297: - YYDEBUG(297, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy264; - goto yy57; - } -yy298: - YYDEBUG(298, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych == '.') goto yy331; - goto yy216; - } else { - if (yych <= '0') goto yy332; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy221; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy299: - YYDEBUG(299, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych != '.') goto yy216; - } else { - if (yych <= '0') goto yy301; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy264; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy300: - YYDEBUG(300, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy306; - goto yy307; - } else { - if (yych <= '2') goto yy308; - if (yych <= '5') goto yy309; - if (yych <= '9') goto yy310; - goto yy216; - } -yy301: - YYDEBUG(301, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '0') goto yy304; - if (yych <= '9') goto yy305; - if (yych <= ':') goto yy264; - goto yy57; - } -yy302: - YYDEBUG(302, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '2') goto yy305; - if (yych <= '9') goto yy304; - if (yych <= ':') goto yy264; - goto yy57; - } -yy303: - YYDEBUG(303, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy264; - goto yy57; - } else { - if (yych <= '4') goto yy304; - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy264; - goto yy57; - } -yy304: - YYDEBUG(304, *YYCURSOR); - yyaccept = 8; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy221; - if (yych == ':') goto yy221; - goto yy295; -yy305: - YYDEBUG(305, *YYCURSOR); - yyaccept = 8; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy264; - if (yych == ':') goto yy264; - goto yy295; -yy306: - YYDEBUG(306, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy326; - goto yy199; - } else { - if (yych <= '0') goto yy325; - if (yych <= '9') goto yy330; - if (yych <= ':') goto yy326; - goto yy199; - } -yy307: - YYDEBUG(307, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy311; - goto yy199; - } else { - if (yych <= '2') goto yy330; - if (yych <= '9') goto yy325; - if (yych <= ':') goto yy311; - goto yy199; - } -yy308: - YYDEBUG(308, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy311; - goto yy199; - } else { - if (yych <= '4') goto yy325; - if (yych <= '9') goto yy324; - if (yych <= ':') goto yy311; - goto yy199; - } -yy309: - YYDEBUG(309, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy311; - goto yy199; - } else { - if (yych <= '9') goto yy324; - if (yych <= ':') goto yy311; - goto yy199; - } -yy310: - YYDEBUG(310, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych != '.') goto yy199; - } else { - if (yych <= '9') goto yy263; - if (yych >= ';') goto yy199; - } -yy311: - YYDEBUG(311, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy312; - if (yych <= '6') goto yy313; - if (yych <= '9') goto yy266; - goto yy57; -yy312: - YYDEBUG(312, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy267; - goto yy223; - } else { - if (yych <= '9') goto yy314; - if (yych <= ':') goto yy267; - goto yy223; - } -yy313: - YYDEBUG(313, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy267; - goto yy223; - } else { - if (yych <= '0') goto yy270; - if (yych == ':') goto yy267; - goto yy223; - } -yy314: - YYDEBUG(314, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= ' ') { - if (yych == '\t') goto yy316; - if (yych <= 0x1F) goto yy223; - goto yy316; - } else { - if (yych <= '(') { - if (yych <= '\'') goto yy223; - goto yy316; - } else { - if (yych == '+') goto yy316; - goto yy223; - } - } - } else { - if (yych <= ':') { - if (yych <= '-') goto yy316; - if (yych <= '.') goto yy267; - if (yych <= '9') goto yy223; - goto yy267; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy223; - goto yy316; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy316; - goto yy223; - } - } - } -yy315: - YYDEBUG(315, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; -yy316: - YYDEBUG(316, *YYCURSOR); - if (yych <= '@') { - if (yych <= '\'') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy57; - goto yy315; - } else { - if (yych == ' ') goto yy315; - goto yy57; - } - } else { - if (yych <= '+') { - if (yych <= '(') goto yy234; - if (yych <= '*') goto yy57; - goto yy233; - } else { - if (yych == '-') goto yy233; - goto yy57; - } - } - } else { - if (yych <= 'Z') { - if (yych <= 'G') { - if (yych <= 'A') goto yy317; - if (yych <= 'F') goto yy235; - goto yy232; - } else { - if (yych != 'P') goto yy235; - } - } else { - if (yych <= 'o') { - if (yych <= '`') goto yy57; - if (yych <= 'a') goto yy318; - goto yy236; - } else { - if (yych <= 'p') goto yy318; - if (yych <= 'z') goto yy236; - goto yy57; - } - } - } -yy317: - YYDEBUG(317, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= '.') goto yy320; - if (yych <= '@') goto yy223; - goto yy237; - } - } else { - if (yych <= '`') { - if (yych <= 'M') goto yy319; - if (yych <= 'Z') goto yy237; - goto yy223; - } else { - if (yych == 'm') goto yy323; - if (yych <= 'z') goto yy242; - goto yy223; - } - } -yy318: - YYDEBUG(318, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= '.') goto yy320; - if (yych <= '@') goto yy223; - goto yy237; - } - } else { - if (yych <= '`') { - if (yych <= 'M') goto yy319; - if (yych <= 'Z') goto yy237; - goto yy223; - } else { - if (yych == 'm') goto yy319; - if (yych <= 'z') goto yy237; - goto yy223; - } - } -yy319: - YYDEBUG(319, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy278; - if (yych <= 0x08) goto yy223; - goto yy278; - } else { - if (yych == ' ') goto yy278; - if (yych <= '(') goto yy223; - goto yy228; - } - } else { - if (yych <= '@') { - if (yych == '.') goto yy322; - goto yy223; - } else { - if (yych <= 'Z') goto yy238; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy238; - goto yy223; - } - } -yy320: - YYDEBUG(320, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy321; - if (yych != 'm') goto yy57; -yy321: - YYDEBUG(321, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy278; - if (yych == '\t') goto yy278; - goto yy57; - } else { - if (yych <= ' ') goto yy278; - if (yych != '.') goto yy57; - } -yy322: - YYDEBUG(322, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy278; - if (yych <= 0x08) goto yy57; - goto yy278; - } else { - if (yych == ' ') goto yy278; - goto yy57; - } -yy323: - YYDEBUG(323, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy278; - if (yych == '\t') goto yy278; - goto yy223; - } else { - if (yych <= '(') { - if (yych <= ' ') goto yy278; - goto yy223; - } else { - if (yych <= ')') goto yy228; - if (yych <= ',') goto yy223; - goto yy244; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '.') goto yy322; - if (yych <= '/') goto yy244; - if (yych <= '@') goto yy223; - goto yy238; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy223; - goto yy244; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy243; - goto yy223; - } - } - } -yy324: - YYDEBUG(324, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy283; - if (yych <= 0x1F) goto yy199; - goto yy283; - } else { - if (yych <= '.') { - if (yych <= '-') goto yy199; - goto yy267; - } else { - if (yych <= '/') goto yy199; - if (yych <= '9') goto yy289; - goto yy267; - } - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy285; - if (yych <= 'O') goto yy199; - goto yy285; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy199; - goto yy285; - } else { - if (yych == 'p') goto yy285; - goto yy199; - } - } - } -yy325: - YYDEBUG(325, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy283; - if (yych <= 0x1F) goto yy199; - goto yy283; - } else { - if (yych <= '.') { - if (yych <= '-') goto yy199; - } else { - if (yych <= '/') goto yy199; - if (yych <= '9') goto yy289; - } - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy285; - if (yych <= 'O') goto yy199; - goto yy285; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy199; - goto yy285; - } else { - if (yych == 'p') goto yy285; - goto yy199; - } - } - } -yy326: - YYDEBUG(326, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy327; - if (yych <= '6') goto yy328; - if (yych <= '9') goto yy224; - goto yy57; -yy327: - YYDEBUG(327, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy225; - goto yy223; - } else { - if (yych <= '9') goto yy329; - if (yych <= ':') goto yy225; - goto yy223; - } -yy328: - YYDEBUG(328, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy225; - goto yy223; - } else { - if (yych <= '0') goto yy270; - if (yych == ':') goto yy225; - goto yy223; - } -yy329: - YYDEBUG(329, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= ' ') { - if (yych == '\t') goto yy272; - if (yych <= 0x1F) goto yy223; - goto yy272; - } else { - if (yych <= '(') { - if (yych <= '\'') goto yy223; - goto yy272; - } else { - if (yych == '+') goto yy272; - goto yy223; - } - } - } else { - if (yych <= ':') { - if (yych <= '-') goto yy272; - if (yych <= '.') goto yy225; - if (yych <= '9') goto yy223; - goto yy225; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy223; - goto yy272; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy272; - goto yy223; - } - } - } -yy330: - YYDEBUG(330, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy283; - if (yych <= 0x1F) goto yy199; - goto yy283; - } else { - if (yych <= '.') { - if (yych <= '-') goto yy199; - goto yy311; - } else { - if (yych <= '/') goto yy199; - if (yych <= '9') goto yy289; - goto yy311; - } - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy285; - if (yych <= 'O') goto yy199; - goto yy285; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy199; - goto yy285; - } else { - if (yych == 'p') goto yy285; - goto yy199; - } - } - } -yy331: - YYDEBUG(331, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy333; - goto yy334; - } else { - if (yych <= '2') goto yy335; - if (yych <= '5') goto yy336; - if (yych <= '9') goto yy337; - goto yy216; - } -yy332: - YYDEBUG(332, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy221; - goto yy57; - } else { - if (yych <= '0') goto yy304; - if (yych <= '9') goto yy305; - if (yych <= ':') goto yy221; - goto yy57; - } -yy333: - YYDEBUG(333, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy350; - goto yy199; - } else { - if (yych <= '0') goto yy349; - if (yych <= '9') goto yy354; - if (yych <= ':') goto yy350; - goto yy199; - } -yy334: - YYDEBUG(334, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy338; - goto yy199; - } else { - if (yych <= '2') goto yy354; - if (yych <= '9') goto yy349; - if (yych <= ':') goto yy338; - goto yy199; - } -yy335: - YYDEBUG(335, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy338; - goto yy199; - } else { - if (yych <= '4') goto yy349; - if (yych <= '9') goto yy348; - if (yych <= ':') goto yy338; - goto yy199; - } -yy336: - YYDEBUG(336, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy338; - goto yy199; - } else { - if (yych <= '9') goto yy348; - if (yych <= ':') goto yy338; - goto yy199; - } -yy337: - YYDEBUG(337, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych != '.') goto yy199; - } else { - if (yych <= '9') goto yy263; - if (yych >= ';') goto yy199; - } -yy338: - YYDEBUG(338, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy339; - if (yych <= '6') goto yy340; - if (yych <= '9') goto yy266; - goto yy57; -yy339: - YYDEBUG(339, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy267; - goto yy223; - } else { - if (yych <= '9') goto yy341; - if (yych <= ':') goto yy267; - goto yy223; - } -yy340: - YYDEBUG(340, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy267; - goto yy223; - } else { - if (yych <= '0') goto yy229; - if (yych == ':') goto yy267; - goto yy223; - } -yy341: - YYDEBUG(341, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= ' ') { - if (yych == '\t') goto yy343; - if (yych <= 0x1F) goto yy223; - goto yy343; - } else { - if (yych <= '(') { - if (yych <= '\'') goto yy223; - goto yy343; - } else { - if (yych == '+') goto yy343; - goto yy223; - } - } - } else { - if (yych <= ':') { - if (yych <= '-') goto yy343; - if (yych <= '.') goto yy267; - if (yych <= '9') goto yy223; - goto yy267; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy223; - goto yy343; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy343; - goto yy223; - } - } - } -yy342: - YYDEBUG(342, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; -yy343: - YYDEBUG(343, *YYCURSOR); - if (yych <= '@') { - if (yych <= '\'') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy57; - goto yy342; - } else { - if (yych == ' ') goto yy342; - goto yy57; - } - } else { - if (yych <= '+') { - if (yych <= '(') goto yy234; - if (yych <= '*') goto yy57; - goto yy233; - } else { - if (yych == '-') goto yy233; - goto yy57; - } - } - } else { - if (yych <= 'Z') { - if (yych <= 'G') { - if (yych <= 'A') goto yy344; - if (yych <= 'F') goto yy235; - goto yy232; - } else { - if (yych != 'P') goto yy235; - } - } else { - if (yych <= 'o') { - if (yych <= '`') goto yy57; - if (yych <= 'a') goto yy345; - goto yy236; - } else { - if (yych <= 'p') goto yy345; - if (yych <= 'z') goto yy236; - goto yy57; - } - } - } -yy344: - YYDEBUG(344, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= '.') goto yy286; - if (yych <= '@') goto yy223; - goto yy237; - } - } else { - if (yych <= '`') { - if (yych <= 'M') goto yy346; - if (yych <= 'Z') goto yy237; - goto yy223; - } else { - if (yych == 'm') goto yy347; - if (yych <= 'z') goto yy242; - goto yy223; - } - } -yy345: - YYDEBUG(345, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy228; - goto yy223; - } else { - if (yych <= '.') goto yy286; - if (yych <= '@') goto yy223; - goto yy237; - } - } else { - if (yych <= '`') { - if (yych <= 'M') goto yy346; - if (yych <= 'Z') goto yy237; - goto yy223; - } else { - if (yych == 'm') goto yy346; - if (yych <= 'z') goto yy237; - goto yy223; - } - } -yy346: - YYDEBUG(346, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych <= '\t') { - if (yych <= 0x00) goto yy278; - if (yych <= 0x08) goto yy223; - goto yy278; - } else { - if (yych == ' ') goto yy278; - if (yych <= '(') goto yy223; - goto yy228; - } - } else { - if (yych <= '@') { - if (yych == '.') goto yy288; - goto yy223; - } else { - if (yych <= 'Z') goto yy238; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy238; - goto yy223; - } - } -yy347: - YYDEBUG(347, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy278; - if (yych == '\t') goto yy278; - goto yy223; - } else { - if (yych <= '(') { - if (yych <= ' ') goto yy278; - goto yy223; - } else { - if (yych <= ')') goto yy228; - if (yych <= ',') goto yy223; - goto yy244; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '.') goto yy288; - if (yych <= '/') goto yy244; - if (yych <= '@') goto yy223; - goto yy238; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy223; - goto yy244; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy243; - goto yy223; - } - } - } -yy348: - YYDEBUG(348, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy225; - goto yy199; - } else { - if (yych <= '9') goto yy289; - if (yych <= ':') goto yy225; - goto yy199; - } -yy349: - YYDEBUG(349, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych != '.') goto yy199; - } else { - if (yych <= '9') goto yy289; - if (yych >= ';') goto yy199; - } -yy350: - YYDEBUG(350, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy351; - if (yych <= '6') goto yy352; - if (yych <= '9') goto yy224; - goto yy57; -yy351: - YYDEBUG(351, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy225; - goto yy223; - } else { - if (yych <= '9') goto yy353; - if (yych <= ':') goto yy225; - goto yy223; - } -yy352: - YYDEBUG(352, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy225; - goto yy223; - } else { - if (yych <= '0') goto yy229; - if (yych == ':') goto yy225; - goto yy223; - } -yy353: - YYDEBUG(353, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= ' ') { - if (yych == '\t') goto yy231; - if (yych <= 0x1F) goto yy223; - goto yy231; - } else { - if (yych <= '(') { - if (yych <= '\'') goto yy223; - goto yy231; - } else { - if (yych == '+') goto yy231; - goto yy223; - } - } - } else { - if (yych <= ':') { - if (yych <= '-') goto yy231; - if (yych <= '.') goto yy225; - if (yych <= '9') goto yy223; - goto yy225; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy223; - goto yy231; - } else { - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy231; - goto yy223; - } - } - } -yy354: - YYDEBUG(354, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy338; - goto yy199; - } else { - if (yych <= '9') goto yy289; - if (yych <= ':') goto yy338; - goto yy199; - } -yy355: - YYDEBUG(355, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych == '.') goto yy300; - goto yy216; - } else { - if (yych <= '0') goto yy332; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy264; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy356: - YYDEBUG(356, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych == '.') goto yy300; - goto yy216; - } else { - if (yych <= '0') goto yy332; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy264; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy357: - YYDEBUG(357, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy360; - goto yy361; - } else { - if (yych <= '2') goto yy368; - if (yych <= '9') goto yy369; - goto yy216; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy212; - if (yych <= 'q') goto yy216; - goto yy213; - } else { - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy358: - YYDEBUG(358, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych <= '0') goto yy360; - goto yy361; - } else { - if (yych <= '2') goto yy368; - if (yych <= '9') goto yy369; - goto yy216; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy212; - if (yych <= 'q') goto yy216; - goto yy213; - } else { - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy359: - YYDEBUG(359, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy216; - if (yych >= '1') goto yy361; - } else { - if (yych <= '2') goto yy209; - if (yych <= '9') goto yy210; - goto yy216; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy212; - if (yych <= 'q') goto yy216; - goto yy213; - } else { - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy360: - YYDEBUG(360, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych <= ',') goto yy216; - if (yych <= '-') goto yy362; - if (yych <= '.') goto yy331; - goto yy216; - } else { - if (yych <= '0') goto yy332; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy221; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy361: - YYDEBUG(361, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych <= ',') goto yy216; - if (yych <= '-') goto yy362; - if (yych <= '.') goto yy300; - goto yy216; - } else { - if (yych <= '0') goto yy301; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy264; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy362: - YYDEBUG(362, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(363, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy364; - if (yych <= '9') goto yy365; -yy364: - YYDEBUG(364, *YYCURSOR); -#line 1510 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("pgtextshort"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_TEXT; - } -#line 6648 "ext/date/lib/parse_date.c" -yy365: - YYDEBUG(365, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy364; - if (yych >= ':') goto yy364; - YYDEBUG(366, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy364; - if (yych >= ':') goto yy364; - YYDEBUG(367, *YYCURSOR); - yych = *++YYCURSOR; - goto yy364; -yy368: - YYDEBUG(368, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych <= ',') goto yy216; - if (yych <= '-') goto yy362; - if (yych <= '.') goto yy300; - goto yy216; - } else { - if (yych <= '0') goto yy332; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy264; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy369: - YYDEBUG(369, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '/') { - if (yych <= ',') goto yy216; - if (yych <= '-') goto yy362; - if (yych <= '.') goto yy300; - goto yy216; - } else { - if (yych <= '0') goto yy332; - if (yych <= '1') goto yy302; - if (yych <= '2') goto yy303; - goto yy297; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy264; - if (yych == 'n') goto yy212; - goto yy216; - } else { - if (yych <= 'r') goto yy213; - if (yych <= 's') goto yy211; - if (yych <= 't') goto yy214; - goto yy216; - } - } -yy370: - YYDEBUG(370, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'C') goto yy193; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'b') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'c') goto yy371; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy371: - YYDEBUG(371, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'D') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'E') goto yy202; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'd') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'e') goto yy373; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy372: - YYDEBUG(372, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 8) { - goto yy149; - } - if (yych <= '/') goto yy196; - if (yych <= '0') goto yy357; - if (yych <= '2') goto yy358; - if (yych <= '3') goto yy359; - goto yy196; -yy373: - YYDEBUG(373, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'M') goto yy203; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'l') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'm') goto yy374; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy374: - YYDEBUG(374, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'B') goto yy204; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'b') goto yy375; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy375: - YYDEBUG(375, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'E') goto yy205; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'e') goto yy376; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy376: - YYDEBUG(376, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych != 'r') goto yy155; -yy377: - YYDEBUG(377, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '-') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy194; - } else { - if (yych <= ' ') goto yy196; - if (yych <= ',') goto yy194; - } - } else { - if (yych <= '9') { - if (yych == '/') goto yy148; - goto yy196; - } else { - if (yych == '_') goto yy148; - goto yy194; - } - } -yy378: - YYDEBUG(378, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 8) { - goto yy149; - } - goto yy196; -yy379: - YYDEBUG(379, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy142; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 't') goto yy380; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy380: - YYDEBUG(380, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'O') goto yy143; - } - } else { - if (yych <= 'n') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'o') goto yy381; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy381: - YYDEBUG(381, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'B') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'A') goto yy144; - } - } else { - if (yych <= 'a') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'b') goto yy382; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy382: - YYDEBUG(382, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy145; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'e') goto yy383; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy383: - YYDEBUG(383, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Q') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'R') goto yy206; - if (yych == 'r') goto yy206; - goto yy4; - } -yy384: - YYDEBUG(384, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy380; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 't') goto yy385; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy385: - YYDEBUG(385, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'N') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'O') goto yy381; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'n') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'o') goto yy386; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy386: - YYDEBUG(386, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'B') goto yy382; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'b') goto yy387; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy387: - YYDEBUG(387, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy383; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'e') goto yy388; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy388: - YYDEBUG(388, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'R') goto yy206; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'r') goto yy377; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy389: - YYDEBUG(389, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'G') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'F') goto yy142; - goto yy397; - } - } else { - if (yych <= 'f') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'g') goto yy397; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy390: - YYDEBUG(390, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy142; - goto yy394; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'r') goto yy394; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy391: - YYDEBUG(391, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'N') goto yy142; - } - } else { - if (yych <= 'n') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'o') goto yy392; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy392: - YYDEBUG(392, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy140; - } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy393; - if (yych <= 'z') goto yy143; - } -yy393: - YYDEBUG(393, *YYCURSOR); -#line 1566 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("ago"); - TIMELIB_INIT; - s->time->relative.y = 0 - s->time->relative.y; - s->time->relative.m = 0 - s->time->relative.m; - s->time->relative.d = 0 - s->time->relative.d; - s->time->relative.h = 0 - s->time->relative.h; - s->time->relative.i = 0 - s->time->relative.i; - s->time->relative.s = 0 - s->time->relative.s; - s->time->relative.weekday = 0 - s->time->relative.weekday; - if (s->time->relative.weekday == 0) { - s->time->relative.weekday = -7; - } - if (s->time->relative.have_special_relative && s->time->relative.special.type == TIMELIB_SPECIAL_WEEKDAY) { - s->time->relative.special.amount = 0 - s->time->relative.special.amount; - } - TIMELIB_DEINIT; - return TIMELIB_AGO; - } -#line 7306 "ext/date/lib/parse_date.c" -yy394: - YYDEBUG(394, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'I') goto yy143; - } - } else { - if (yych <= 'h') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'i') goto yy395; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy395: - YYDEBUG(395, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'K') goto yy144; - } - } else { - if (yych <= 'k') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'l') goto yy396; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy396: - YYDEBUG(396, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy194; - } else { - if (yych <= ' ') goto yy196; - if (yych == ')') goto yy140; - goto yy194; - } - } else { - if (yych <= '@') { - if (yych == '/') goto yy194; - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy145; - goto yy194; - } - } -yy397: - YYDEBUG(397, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'U') goto yy143; - } - } else { - if (yych <= 't') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'u') goto yy398; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy398: - YYDEBUG(398, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'R') goto yy144; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 's') goto yy399; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy399: - YYDEBUG(399, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy145; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 't') goto yy400; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy400: - YYDEBUG(400, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '.') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy196; - } else { - if (yych <= '/') goto yy194; - if (yych <= '9') goto yy196; - goto yy194; - } - } -yy401: - YYDEBUG(401, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'F') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'G') goto yy397; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'f') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'g') goto yy408; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy402: - YYDEBUG(402, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy394; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'r') goto yy405; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy403: - YYDEBUG(403, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'O') goto yy392; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'n') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'o') goto yy404; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy404: - YYDEBUG(404, *YYCURSOR); - yyaccept = 9; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy393; - } else { - if (yych == '.') goto yy393; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy393; - if (yych <= 'Z') goto yy143; - goto yy393; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy393; - if (yych <= 'z') goto yy151; - goto yy393; - } - } -yy405: - YYDEBUG(405, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'H') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'I') goto yy395; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'h') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'i') goto yy406; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy406: - YYDEBUG(406, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'K') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'L') goto yy396; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'k') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'l') goto yy407; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy407: - YYDEBUG(407, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy194; - goto yy196; - } else { - if (yych <= ')') { - if (yych <= '(') goto yy194; - goto yy140; - } else { - if (yych <= ',') goto yy194; - if (yych <= '-') goto yy378; - goto yy196; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '/') goto yy148; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy194; - goto yy145; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy194; - goto yy148; - } else { - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy153; - goto yy194; - } - } - } -yy408: - YYDEBUG(408, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'T') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'U') goto yy398; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 't') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'u') goto yy409; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy409: - YYDEBUG(409, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy399; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 's') goto yy410; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy410: - YYDEBUG(410, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy400; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 't') goto yy411; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy411: - YYDEBUG(411, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= ',') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy194; - } else { - if (yych <= ' ') goto yy196; - if (yych == ')') goto yy140; - goto yy194; - } - } else { - if (yych <= '/') { - if (yych <= '-') goto yy378; - if (yych <= '.') goto yy196; - goto yy148; - } else { - if (yych <= '9') goto yy196; - if (yych == '_') goto yy148; - goto yy194; - } - } -yy412: - YYDEBUG(412, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'L') goto yy419; - if (yych <= 'M') goto yy142; - goto yy418; - } - } else { - if (yych <= 'l') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'k') goto yy142; - goto yy419; - } else { - if (yych == 'n') goto yy418; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy413: - YYDEBUG(413, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy142; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'n') goto yy414; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy414: - YYDEBUG(414, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'U') goto yy143; - } - } else { - if (yych <= 't') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'u') goto yy415; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy415: - YYDEBUG(415, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy4; - } else { - if (yych <= 'a') goto yy416; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy416: - YYDEBUG(416, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy145; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'r') goto yy417; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy417: - YYDEBUG(417, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'X') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Y') goto yy206; - if (yych == 'y') goto yy206; - goto yy4; - } -yy418: - YYDEBUG(418, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych == 'E') goto yy420; - goto yy143; - } - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'e') goto yy420; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy419: - YYDEBUG(419, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'Y') goto yy143; - } - } else { - if (yych <= 'x') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'y') goto yy420; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy420: - YYDEBUG(420, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy194; - } else { - if (yych <= ' ') goto yy196; - if (yych == ')') goto yy140; - goto yy194; - } - } else { - if (yych <= '@') { - if (yych == '/') goto yy194; - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy144; - goto yy194; - } - } -yy421: - YYDEBUG(421, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych <= '/') goto yy148; - goto yy4; - } else { - if (yych == 'L') goto yy419; - goto yy142; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'N') goto yy418; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'm') { - if (yych == 'l') goto yy428; - goto yy147; - } else { - if (yych <= 'n') goto yy427; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy422: - YYDEBUG(422, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy414; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'n') goto yy423; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy423: - YYDEBUG(423, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'T') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'U') goto yy415; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 't') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'u') goto yy424; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy424: - YYDEBUG(424, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy416; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy425; - if (yych <= 'z') goto yy152; - goto yy4; - } - } -yy425: - YYDEBUG(425, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy417; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'r') goto yy426; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy426: - YYDEBUG(426, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'Y') goto yy206; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'y') goto yy377; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy427: - YYDEBUG(427, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'D') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'E') goto yy420; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'd') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'e') goto yy429; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy428: - YYDEBUG(428, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'X') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'Y') goto yy420; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'x') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'y') goto yy429; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy429: - YYDEBUG(429, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy194; - goto yy196; - } else { - if (yych <= ')') { - if (yych <= '(') goto yy194; - goto yy140; - } else { - if (yych <= ',') goto yy194; - if (yych <= '-') goto yy378; - goto yy196; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '/') goto yy148; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy194; - goto yy144; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy194; - goto yy148; - } else { - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy152; - goto yy194; - } - } - } -yy430: - YYDEBUG(430, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy4; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy196; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'Z') { - if (yych >= 'J') goto yy142; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy142; - goto yy4; - } - } - } -yy431: - YYDEBUG(431, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy4; - } else { - if (yych <= ' ') goto yy196; - if (yych == ')') goto yy140; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych == '/') goto yy4; - if (yych <= '9') goto yy196; - goto yy4; - } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy432: - YYDEBUG(432, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy4; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy196; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'Z') { - if (yych >= 'J') goto yy142; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy142; - goto yy4; - } - } - } - YYDEBUG(433, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy4; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy196; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy4; - goto yy143; - } else { - if (yych <= 'Z') { - if (yych >= 'J') goto yy143; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy143; - goto yy4; - } - } - } - YYDEBUG(434, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy4; - } else { - if (yych <= ' ') goto yy196; - if (yych == ')') goto yy140; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych == '/') goto yy4; - if (yych <= '9') goto yy196; - goto yy4; - } else { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy435: - YYDEBUG(435, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy196; - goto yy4; - } else { - if (yych <= ' ') goto yy196; - if (yych == ')') goto yy140; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych == '/') goto yy4; - if (yych <= '9') goto yy196; - goto yy4; - } else { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy436: - YYDEBUG(436, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy4; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy196; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'Z') { - if (yych <= 'I') goto yy431; - goto yy142; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy142; - goto yy4; - } - } - } -yy437: - YYDEBUG(437, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '9') { - if (yych <= '/') goto yy4; - goto yy457; - } else { - if (yych <= ':') goto yy163; - if (yych <= 'C') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy4; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy4; - goto yy61; - } else { - if (yych <= 'R') goto yy4; - if (yych <= 'T') goto yy61; - goto yy4; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy4; - if (yych <= 'Y') goto yy61; - goto yy4; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy4; - } else { - if (yych == 'g') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy438: - YYDEBUG(438, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '4') { - if (yych <= '/') goto yy4; - goto yy457; - } else { - if (yych <= '5') goto yy442; - if (yych <= '9') goto yy443; - goto yy163; - } - } - } else { - if (yych <= 'G') { - if (yych <= 'D') { - if (yych <= 'C') goto yy4; - goto yy61; - } else { - if (yych == 'F') goto yy61; - goto yy4; - } - } else { - if (yych <= 'L') { - if (yych <= 'H') goto yy61; - goto yy4; - } else { - if (yych <= 'M') goto yy61; - if (yych <= 'R') goto yy4; - goto yy61; - } - } - } - } else { - if (yych <= 'g') { - if (yych <= 'Y') { - if (yych == 'W') goto yy61; - if (yych <= 'X') goto yy4; - goto yy61; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy4; - goto yy61; - } else { - if (yych == 'f') goto yy61; - goto yy4; - } - } - } else { - if (yych <= 't') { - if (yych <= 'l') { - if (yych <= 'h') goto yy61; - goto yy4; - } else { - if (yych <= 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy439: - YYDEBUG(439, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= 'C') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '5') { - if (yych <= '/') goto yy4; - goto yy442; - } else { - if (yych <= '9') goto yy443; - if (yych <= ':') goto yy163; - goto yy4; - } - } - } else { - if (yych <= 'G') { - if (yych == 'E') goto yy4; - if (yych <= 'F') goto yy61; - goto yy4; - } else { - if (yych <= 'L') { - if (yych <= 'H') goto yy61; - goto yy4; - } else { - if (yych <= 'M') goto yy61; - if (yych <= 'R') goto yy4; - goto yy61; - } - } - } - } else { - if (yych <= 'g') { - if (yych <= 'Y') { - if (yych == 'W') goto yy61; - if (yych <= 'X') goto yy4; - goto yy61; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy4; - goto yy61; - } else { - if (yych == 'f') goto yy61; - goto yy4; - } - } - } else { - if (yych <= 't') { - if (yych <= 'l') { - if (yych <= 'h') goto yy61; - goto yy4; - } else { - if (yych <= 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy440: - YYDEBUG(440, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(441, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy58; - } - if (yych <= ',') { - if (yych == '+') goto yy440; - goto yy57; - } else { - if (yych <= '-') goto yy440; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy55; - goto yy57; - } -yy442: - YYDEBUG(442, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy456; - if (yych <= 'C') goto yy4; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy4; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy4; - goto yy61; - } else { - if (yych <= 'R') goto yy4; - if (yych <= 'T') goto yy61; - goto yy4; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy4; - if (yych <= 'Y') goto yy61; - goto yy4; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy4; - } else { - if (yych == 'g') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy443: - YYDEBUG(443, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy444; - if (yych <= 'C') goto yy4; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy4; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy4; - goto yy61; - } else { - if (yych <= 'R') goto yy4; - if (yych <= 'T') goto yy61; - goto yy4; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy4; - if (yych <= 'Y') goto yy61; - goto yy4; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy4; - } else { - if (yych == 'g') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy444: - YYDEBUG(444, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych >= ':') goto yy61; -yy445: - YYDEBUG(445, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 2) { - goto yy55; - } - if (yych != '-') goto yy61; -yy446: - YYDEBUG(446, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy447; - if (yych <= '1') goto yy448; - goto yy57; -yy447: - YYDEBUG(447, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy449; - goto yy57; -yy448: - YYDEBUG(448, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '3') goto yy57; -yy449: - YYDEBUG(449, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '-') goto yy57; - YYDEBUG(450, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy451; - if (yych <= '2') goto yy452; - if (yych <= '3') goto yy453; - goto yy57; -yy451: - YYDEBUG(451, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy454; - goto yy57; -yy452: - YYDEBUG(452, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy454; - goto yy57; -yy453: - YYDEBUG(453, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '2') goto yy57; -yy454: - YYDEBUG(454, *YYCURSOR); - ++YYCURSOR; -yy455: - YYDEBUG(455, *YYCURSOR); -#line 1280 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_unsigned_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; - } -#line 9067 "ext/date/lib/parse_date.c" -yy456: - YYDEBUG(456, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy445; - if (yych <= 'C') goto yy4; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy4; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy4; - goto yy61; - } else { - if (yych <= 'R') goto yy4; - if (yych <= 'T') goto yy61; - goto yy4; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy4; - if (yych <= 'Y') goto yy61; - goto yy4; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy4; - } else { - if (yych == 'g') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy457: - YYDEBUG(457, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= 'C') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '5') { - if (yych <= '/') goto yy4; - } else { - if (yych <= '9') goto yy456; - if (yych <= ':') goto yy163; - goto yy4; - } - } - } else { - if (yych <= 'G') { - if (yych == 'E') goto yy4; - if (yych <= 'F') goto yy61; - goto yy4; - } else { - if (yych <= 'L') { - if (yych <= 'H') goto yy61; - goto yy4; - } else { - if (yych <= 'M') goto yy61; - if (yych <= 'R') goto yy4; - goto yy61; - } - } - } - } else { - if (yych <= 'g') { - if (yych <= 'Y') { - if (yych == 'W') goto yy61; - if (yych <= 'X') goto yy4; - goto yy61; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy4; - goto yy61; - } else { - if (yych == 'f') goto yy61; - goto yy4; - } - } - } else { - if (yych <= 't') { - if (yych <= 'l') { - if (yych <= 'h') goto yy61; - goto yy4; - } else { - if (yych <= 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } - YYDEBUG(458, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych <= '/') goto yy4; - if (yych <= '9') goto yy459; - if (yych <= 'C') goto yy4; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy4; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy4; - goto yy61; - } else { - if (yych <= 'R') goto yy4; - if (yych <= 'T') goto yy61; - goto yy4; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy4; - if (yych <= 'Y') goto yy61; - goto yy4; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy4; - } else { - if (yych == 'g') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy459: - YYDEBUG(459, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy55; - } - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy4; - goto yy61; - } else { - if (yych == '-') goto yy446; - if (yych <= 'C') goto yy4; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy4; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy4; - goto yy61; - } else { - if (yych <= 'R') goto yy4; - if (yych <= 'T') goto yy61; - goto yy4; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy4; - if (yych <= 'Y') goto yy61; - goto yy4; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy4; - } else { - if (yych == 'g') goto yy4; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy4; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy4; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy4; - } - } - } - } -yy460: - YYDEBUG(460, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy462; - if (yych <= '0') goto yy736; - if (yych <= '1') goto yy737; - if (yych <= '9') goto yy738; - goto yy462; -yy461: - YYDEBUG(461, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; -yy462: - YYDEBUG(462, *YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': goto yy461; - case '-': - case '.': goto yy577; - case 'A': - case 'a': goto yy480; - case 'D': - case 'd': goto yy466; - case 'F': - case 'f': goto yy467; - case 'H': - case 'h': goto yy64; - case 'I': goto yy475; - case 'J': - case 'j': goto yy479; - case 'M': - case 'm': goto yy465; - case 'N': - case 'n': goto yy482; - case 'O': - case 'o': goto yy481; - case 'P': - case 'p': goto yy484; - case 'S': - case 's': goto yy463; - case 'T': - case 't': goto yy69; - case 'V': goto yy477; - case 'W': - case 'w': goto yy68; - case 'X': goto yy478; - case 'Y': - case 'y': goto yy67; - default: goto yy57; - } -yy463: - YYDEBUG(463, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'D') { - if (yych == 'A') goto yy127; - goto yy57; - } else { - if (yych <= 'E') goto yy1049; - if (yych <= 'T') goto yy57; - goto yy126; - } - } else { - if (yych <= 'd') { - if (yych == 'a') goto yy127; - goto yy57; - } else { - if (yych <= 'e') goto yy1049; - if (yych == 'u') goto yy126; - goto yy57; - } - } -yy464: - YYDEBUG(464, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '`') { - if (yych <= 'D') { - if (yych == 'A') goto yy127; - goto yy57; - } else { - if (yych <= 'E') goto yy1049; - if (yych == 'U') goto yy126; - goto yy57; - } - } else { - if (yych <= 'e') { - if (yych <= 'a') goto yy127; - if (yych <= 'd') goto yy57; - goto yy1049; - } else { - if (yych <= 's') goto yy57; - if (yych <= 't') goto yy729; - if (yych <= 'u') goto yy126; - goto yy57; - } - } -yy465: - YYDEBUG(465, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= 'H') { - if (yych == 'A') goto yy592; - goto yy57; - } else { - if (yych <= 'I') goto yy118; - if (yych <= 'N') goto yy57; - goto yy117; - } - } else { - if (yych <= 'h') { - if (yych == 'a') goto yy592; - goto yy57; - } else { - if (yych <= 'i') goto yy118; - if (yych == 'o') goto yy117; - goto yy57; - } - } -yy466: - YYDEBUG(466, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych == 'A') goto yy114; - if (yych <= 'D') goto yy57; - goto yy579; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy114; - } else { - if (yych == 'e') goto yy579; - goto yy57; - } - } -yy467: - YYDEBUG(467, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= 'N') { - if (yych == 'E') goto yy595; - goto yy57; - } else { - if (yych <= 'O') goto yy99; - if (yych <= 'Q') goto yy57; - goto yy98; - } - } else { - if (yych <= 'n') { - if (yych == 'e') goto yy595; - goto yy57; - } else { - if (yych <= 'o') goto yy99; - if (yych == 'r') goto yy98; - goto yy57; - } - } -yy468: - YYDEBUG(468, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'H') goto yy70; - if (yych <= 'T') goto yy57; - goto yy71; - } else { - if (yych <= 'h') { - if (yych <= 'g') goto yy57; - goto yy1048; - } else { - if (yych == 'u') goto yy71; - goto yy57; - } - } -yy469: - YYDEBUG(469, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy742; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy741; - goto yy61; -yy470: - YYDEBUG(470, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'c') { - if (yych == 'O') goto yy530; - goto yy57; - } else { - if (yych <= 'd') goto yy729; - if (yych == 'o') goto yy530; - goto yy57; - } -yy471: - YYDEBUG(471, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy729; - goto yy57; -yy472: - YYDEBUG(472, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case '0': - case '1': - case '2': goto yy666; - case '3': goto yy668; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy669; - case 'A': - case 'a': goto yy673; - case 'D': - case 'd': goto yy677; - case 'F': - case 'f': goto yy671; - case 'J': - case 'j': goto yy670; - case 'M': - case 'm': goto yy672; - case 'N': - case 'n': goto yy676; - case 'O': - case 'o': goto yy675; - case 'S': - case 's': goto yy674; - default: goto yy57; - } -yy473: - YYDEBUG(473, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case '0': goto yy616; - case '1': goto yy617; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy618; - case 'A': - case 'a': goto yy622; - case 'D': - case 'd': goto yy626; - case 'F': - case 'f': goto yy620; - case 'J': - case 'j': goto yy619; - case 'M': - case 'm': goto yy621; - case 'N': - case 'n': goto yy625; - case 'O': - case 'o': goto yy624; - case 'S': - case 's': goto yy623; - default: goto yy578; - } -yy474: - YYDEBUG(474, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '1') { - if (yych <= '/') goto yy578; - if (yych <= '0') goto yy568; - goto yy569; - } else { - if (yych <= '5') goto yy570; - if (yych <= '9') goto yy571; - goto yy578; - } -yy475: - YYDEBUG(475, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '.') goto yy532; - } - } else { - if (yych <= 'U') { - if (yych <= '9') goto yy534; - if (yych == 'I') goto yy567; - } else { - if (yych == 'W') goto yy476; - if (yych <= 'X') goto yy540; - } - } -yy476: - YYDEBUG(476, *YYCURSOR); -#line 1409 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("datenoyearrev"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - timelib_skip_day_suffix((char **) &ptr); - s->time->m = timelib_get_month((char **) &ptr); - TIMELIB_DEINIT; - return TIMELIB_DATE_TEXT; - } -#line 9638 "ext/date/lib/parse_date.c" -yy477: - YYDEBUG(477, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '9') { - if (yych <= '.') goto yy532; - if (yych <= '/') goto yy476; - goto yy534; - } else { - if (yych == 'I') goto yy565; - goto yy476; - } - } -yy478: - YYDEBUG(478, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '9') { - if (yych <= '.') goto yy532; - if (yych <= '/') goto yy476; - goto yy534; - } else { - if (yych == 'I') goto yy564; - goto yy476; - } - } -yy479: - YYDEBUG(479, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'A') goto yy557; - if (yych <= 'T') goto yy57; - goto yy556; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy557; - } else { - if (yych == 'u') goto yy556; - goto yy57; - } - } -yy480: - YYDEBUG(480, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= 'L') { - if (yych == '.') goto yy485; - goto yy57; - } else { - if (yych <= 'M') goto yy486; - if (yych == 'P') goto yy550; - goto yy57; - } - } else { - if (yych <= 'o') { - if (yych <= 'U') goto yy549; - if (yych == 'm') goto yy486; - goto yy57; - } else { - if (yych <= 'p') goto yy550; - if (yych == 'u') goto yy549; - goto yy57; - } - } -yy481: - YYDEBUG(481, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy544; - if (yych == 'c') goto yy544; - goto yy57; -yy482: - YYDEBUG(482, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy530; - if (yych == 'o') goto yy530; - goto yy57; -yy483: - YYDEBUG(483, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy490; - if (yych <= '9') goto yy492; - goto yy57; -yy484: - YYDEBUG(484, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy57; - } else { - if (yych <= 'M') goto yy486; - if (yych == 'm') goto yy486; - goto yy57; - } -yy485: - YYDEBUG(485, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy486; - if (yych != 'm') goto yy57; -yy486: - YYDEBUG(486, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy488; - if (yych == '\t') goto yy488; - goto yy57; - } else { - if (yych <= ' ') goto yy488; - if (yych != '.') goto yy57; - } - YYDEBUG(487, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy488; - if (yych <= 0x08) goto yy57; - } else { - if (yych != ' ') goto yy57; - } -yy488: - YYDEBUG(488, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(489, *YYCURSOR); -#line 1136 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - } - } - s->time->h += timelib_meridian((char **) &ptr, s->time->h); - TIMELIB_DEINIT; - return TIMELIB_TIME12; - } -#line 9795 "ext/date/lib/parse_date.c" -yy490: - YYDEBUG(490, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy493; - } else { - if (yych <= '9') goto yy507; - if (yych <= ':') goto yy493; - } -yy491: - YYDEBUG(491, *YYCURSOR); -#line 1173 "ext/date/lib/parse_date.re" - { - int tz_not_found; - DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_error(s, "The timezone could not be found in the database"); - } - } - TIMELIB_DEINIT; - return TIMELIB_TIME24_WITH_ZONE; - } -#line 9833 "ext/date/lib/parse_date.c" -yy492: - YYDEBUG(492, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy493; - if (yych != ':') goto yy491; -yy493: - YYDEBUG(493, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy494; - if (yych <= '6') goto yy495; - if (yych <= '9') goto yy496; - goto yy57; -yy494: - YYDEBUG(494, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy500; - goto yy491; -yy495: - YYDEBUG(495, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych == '0') goto yy500; - goto yy491; -yy496: - YYDEBUG(496, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != '.') goto yy491; -yy497: - YYDEBUG(497, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy498: - YYDEBUG(498, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(499, *YYCURSOR); - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy498; - goto yy491; -yy500: - YYDEBUG(500, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= 0x1F) { - if (yych != '\t') goto yy491; - } else { - if (yych <= ' ') goto yy501; - if (yych == '.') goto yy497; - goto yy491; - } - } else { - if (yych <= '`') { - if (yych <= 'A') goto yy503; - if (yych == 'P') goto yy503; - goto yy491; - } else { - if (yych <= 'a') goto yy503; - if (yych == 'p') goto yy503; - goto yy491; - } - } -yy501: - YYDEBUG(501, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; - YYDEBUG(502, *YYCURSOR); - if (yych <= 'A') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy501; - goto yy57; - } else { - if (yych <= ' ') goto yy501; - if (yych <= '@') goto yy57; - } - } else { - if (yych <= '`') { - if (yych != 'P') goto yy57; - } else { - if (yych <= 'a') goto yy503; - if (yych != 'p') goto yy57; - } - } -yy503: - YYDEBUG(503, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy57; - } else { - if (yych <= 'M') goto yy505; - if (yych == 'm') goto yy505; - goto yy57; - } - YYDEBUG(504, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy505; - if (yych != 'm') goto yy57; -yy505: - YYDEBUG(505, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy488; - if (yych == '\t') goto yy488; - goto yy57; - } else { - if (yych <= ' ') goto yy488; - if (yych != '.') goto yy57; - } - YYDEBUG(506, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy488; - if (yych <= 0x08) goto yy57; - goto yy488; - } else { - if (yych == ' ') goto yy488; - goto yy57; - } -yy507: - YYDEBUG(507, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy508; - if (yych <= 0x1F) goto yy491; - } else { - if (yych == '.') goto yy493; - if (yych <= '9') goto yy491; - goto yy511; - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy510; - if (yych <= 'O') goto yy491; - goto yy510; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy491; - goto yy510; - } else { - if (yych == 'p') goto yy510; - goto yy491; - } - } - } -yy508: - YYDEBUG(508, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; - YYDEBUG(509, *YYCURSOR); - if (yych <= 'A') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy508; - goto yy57; - } else { - if (yych <= ' ') goto yy508; - if (yych <= '@') goto yy57; - } - } else { - if (yych <= '`') { - if (yych != 'P') goto yy57; - } else { - if (yych <= 'a') goto yy510; - if (yych != 'p') goto yy57; - } - } -yy510: - YYDEBUG(510, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych == '.') goto yy527; - goto yy57; - } else { - if (yych <= 'M') goto yy528; - if (yych == 'm') goto yy528; - goto yy57; - } -yy511: - YYDEBUG(511, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy512; - if (yych <= '6') goto yy513; - if (yych <= '9') goto yy496; - goto yy57; -yy512: - YYDEBUG(512, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy514; - goto yy491; -yy513: - YYDEBUG(513, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych != '0') goto yy491; -yy514: - YYDEBUG(514, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy501; - if (yych <= 0x1F) goto yy491; - goto yy501; - } else { - if (yych == '.') goto yy515; - if (yych <= '9') goto yy491; - goto yy516; - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy503; - if (yych <= 'O') goto yy491; - goto yy503; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy491; - goto yy503; - } else { - if (yych == 'p') goto yy503; - goto yy491; - } - } - } -yy515: - YYDEBUG(515, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy525; - goto yy57; -yy516: - YYDEBUG(516, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy517: - YYDEBUG(517, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; - YYDEBUG(518, *YYCURSOR); - if (yych <= 'O') { - if (yych <= '9') { - if (yych <= '/') goto yy57; - goto yy517; - } else { - if (yych != 'A') goto yy57; - } - } else { - if (yych <= 'a') { - if (yych <= 'P') goto yy519; - if (yych <= '`') goto yy57; - } else { - if (yych != 'p') goto yy57; - } - } -yy519: - YYDEBUG(519, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy57; - } else { - if (yych <= 'M') goto yy521; - if (yych == 'm') goto yy521; - goto yy57; - } - YYDEBUG(520, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy521; - if (yych != 'm') goto yy57; -yy521: - YYDEBUG(521, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy523; - if (yych == '\t') goto yy523; - goto yy57; - } else { - if (yych <= ' ') goto yy523; - if (yych != '.') goto yy57; - } - YYDEBUG(522, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy523; - if (yych <= 0x08) goto yy57; - } else { - if (yych != ' ') goto yy57; - } -yy523: - YYDEBUG(523, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(524, *YYCURSOR); -#line 1153 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("mssqltime"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - if (*ptr == ':' || *ptr == '.') { - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr == ':' || *ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 8); - } - } - timelib_eat_spaces((char **) &ptr); - s->time->h += timelib_meridian((char **) &ptr, s->time->h); - TIMELIB_DEINIT; - return TIMELIB_TIME24_WITH_ZONE; - } -#line 10162 "ext/date/lib/parse_date.c" -yy525: - YYDEBUG(525, *YYCURSOR); - yyaccept = 11; - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; - YYDEBUG(526, *YYCURSOR); - if (yych <= 'O') { - if (yych <= '9') { - if (yych <= '/') goto yy491; - goto yy525; - } else { - if (yych == 'A') goto yy519; - goto yy491; - } - } else { - if (yych <= 'a') { - if (yych <= 'P') goto yy519; - if (yych <= '`') goto yy491; - goto yy519; - } else { - if (yych == 'p') goto yy519; - goto yy491; - } - } -yy527: - YYDEBUG(527, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy528; - if (yych != 'm') goto yy57; -yy528: - YYDEBUG(528, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy488; - if (yych == '\t') goto yy488; - goto yy57; - } else { - if (yych <= ' ') goto yy488; - if (yych != '.') goto yy57; - } - YYDEBUG(529, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy488; - if (yych <= 0x08) goto yy57; - goto yy488; - } else { - if (yych == ' ') goto yy488; - goto yy57; - } -yy530: - YYDEBUG(530, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy531; - if (yych != 'v') goto yy57; -yy531: - YYDEBUG(531, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych != '\t') goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy536; - if (yych == 'e') goto yy536; - goto yy476; - } - } -yy532: - YYDEBUG(532, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; -yy533: - YYDEBUG(533, *YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy532; - if (yych <= 0x1F) goto yy57; - goto yy532; - } else { - if (yych <= '.') { - if (yych <= ',') goto yy57; - goto yy532; - } else { - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - } - } -yy534: - YYDEBUG(534, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy535; - if (yych <= '9') goto yy541; -yy535: - YYDEBUG(535, *YYCURSOR); -#line 1331 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("datefull"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - timelib_skip_day_suffix((char **) &ptr); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL; - } -#line 10281 "ext/date/lib/parse_date.c" -yy536: - YYDEBUG(536, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy537; - if (yych != 'm') goto yy57; -yy537: - YYDEBUG(537, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy538; - if (yych != 'b') goto yy57; -yy538: - YYDEBUG(538, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy539; - if (yych != 'e') goto yy57; -yy539: - YYDEBUG(539, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy540; - if (yych != 'r') goto yy57; -yy540: - YYDEBUG(540, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy532; - if (yych <= 0x1F) goto yy476; - goto yy532; - } else { - if (yych <= '.') { - if (yych <= ',') goto yy476; - goto yy532; - } else { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } - } -yy541: - YYDEBUG(541, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy535; - if (yych >= ':') goto yy535; -yy542: - YYDEBUG(542, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy535; - if (yych >= ':') goto yy535; - YYDEBUG(543, *YYCURSOR); - yych = *++YYCURSOR; - goto yy535; -yy544: - YYDEBUG(544, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy545; - if (yych != 't') goto yy57; -yy545: - YYDEBUG(545, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'N') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'O') goto yy546; - if (yych != 'o') goto yy476; - } - } -yy546: - YYDEBUG(546, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy547; - if (yych != 'b') goto yy57; -yy547: - YYDEBUG(547, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy548; - if (yych != 'e') goto yy57; -yy548: - YYDEBUG(548, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy540; - if (yych == 'r') goto yy540; - goto yy57; -yy549: - YYDEBUG(549, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy553; - if (yych == 'g') goto yy553; - goto yy57; -yy550: - YYDEBUG(550, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy551; - if (yych != 'r') goto yy57; -yy551: - YYDEBUG(551, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'I') goto yy552; - if (yych != 'i') goto yy476; - } - } -yy552: - YYDEBUG(552, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy540; - if (yych == 'l') goto yy540; - goto yy57; -yy553: - YYDEBUG(553, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'T') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'U') goto yy554; - if (yych != 'u') goto yy476; - } - } -yy554: - YYDEBUG(554, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy555; - if (yych != 's') goto yy57; -yy555: - YYDEBUG(555, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy540; - if (yych == 't') goto yy540; - goto yy57; -yy556: - YYDEBUG(556, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'L') goto yy563; - if (yych <= 'M') goto yy57; - goto yy562; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy57; - goto yy563; - } else { - if (yych == 'n') goto yy562; - goto yy57; - } - } -yy557: - YYDEBUG(557, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy558; - if (yych != 'n') goto yy57; -yy558: - YYDEBUG(558, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'T') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'U') goto yy559; - if (yych != 'u') goto yy476; - } - } -yy559: - YYDEBUG(559, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy560; - if (yych != 'a') goto yy57; -yy560: - YYDEBUG(560, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy561; - if (yych != 'r') goto yy57; -yy561: - YYDEBUG(561, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy540; - if (yych == 'y') goto yy540; - goto yy57; -yy562: - YYDEBUG(562, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy540; - if (yych == 'e') goto yy540; - goto yy476; - } - } -yy563: - YYDEBUG(563, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'X') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'Y') goto yy540; - if (yych == 'y') goto yy540; - goto yy476; - } - } -yy564: - YYDEBUG(564, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '9') { - if (yych <= '.') goto yy532; - if (yych <= '/') goto yy476; - goto yy534; - } else { - if (yych == 'I') goto yy540; - goto yy476; - } - } -yy565: - YYDEBUG(565, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '9') { - if (yych <= '.') goto yy532; - if (yych <= '/') goto yy476; - goto yy534; - } else { - if (yych != 'I') goto yy476; - } - } - YYDEBUG(566, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '9') { - if (yych <= '.') goto yy532; - if (yych <= '/') goto yy476; - goto yy534; - } else { - if (yych == 'I') goto yy540; - goto yy476; - } - } -yy567: - YYDEBUG(567, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '9') { - if (yych <= '.') goto yy532; - if (yych <= '/') goto yy476; - goto yy534; - } else { - if (yych == 'I') goto yy540; - goto yy476; - } - } -yy568: - YYDEBUG(568, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - goto yy601; - } else { - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy615; - if (yych <= ':') goto yy493; - goto yy491; - } -yy569: - YYDEBUG(569, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - if (yych <= '.') goto yy601; - goto yy491; - } else { - if (yych <= '2') goto yy615; - if (yych <= '9') goto yy614; - if (yych <= ':') goto yy493; - goto yy491; - } -yy570: - YYDEBUG(570, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - goto yy601; - } else { - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy614; - if (yych <= ':') goto yy493; - goto yy491; - } -yy571: - YYDEBUG(571, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - goto yy601; - } else { - if (yych == ':') goto yy493; - goto yy491; - } -yy572: - YYDEBUG(572, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy595; - if (yych == 'e') goto yy595; - goto yy57; -yy573: - YYDEBUG(573, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy592; - if (yych == 'a') goto yy592; - goto yy57; -yy574: - YYDEBUG(574, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'P') goto yy550; - if (yych <= 'T') goto yy57; - goto yy549; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy57; - goto yy550; - } else { - if (yych == 'u') goto yy549; - goto yy57; - } - } -yy575: - YYDEBUG(575, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy585; - if (yych == 'e') goto yy585; - goto yy57; -yy576: - YYDEBUG(576, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy579; - if (yych == 'e') goto yy579; - goto yy57; -yy577: - YYDEBUG(577, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; -yy578: - YYDEBUG(578, *YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': - case '-': - case '.': goto yy577; - case 'A': - case 'a': goto yy574; - case 'D': - case 'd': goto yy576; - case 'F': - case 'f': goto yy572; - case 'I': goto yy475; - case 'J': - case 'j': goto yy479; - case 'M': - case 'm': goto yy573; - case 'N': - case 'n': goto yy482; - case 'O': - case 'o': goto yy481; - case 'S': - case 's': goto yy575; - case 'V': goto yy477; - case 'X': goto yy478; - default: goto yy57; - } -yy579: - YYDEBUG(579, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy580; - if (yych != 'c') goto yy57; -yy580: - YYDEBUG(580, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy581; - if (yych != 'e') goto yy476; - } - } -yy581: - YYDEBUG(581, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy582; - if (yych != 'm') goto yy57; -yy582: - YYDEBUG(582, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy583; - if (yych != 'b') goto yy57; -yy583: - YYDEBUG(583, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy584; - if (yych != 'e') goto yy57; -yy584: - YYDEBUG(584, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy540; - if (yych == 'r') goto yy540; - goto yy57; -yy585: - YYDEBUG(585, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy586; - if (yych != 'p') goto yy57; -yy586: - YYDEBUG(586, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'S') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'T') goto yy587; - if (yych != 't') goto yy476; - } - } -yy587: - YYDEBUG(587, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy588; - if (yych != 'e') goto yy476; - } - } -yy588: - YYDEBUG(588, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy589; - if (yych != 'm') goto yy57; -yy589: - YYDEBUG(589, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy590; - if (yych != 'b') goto yy57; -yy590: - YYDEBUG(590, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy591; - if (yych != 'e') goto yy57; -yy591: - YYDEBUG(591, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy540; - if (yych == 'r') goto yy540; - goto yy57; -yy592: - YYDEBUG(592, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'R') goto yy593; - if (yych <= 'X') goto yy57; - goto yy540; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy57; - } else { - if (yych == 'y') goto yy540; - goto yy57; - } - } -yy593: - YYDEBUG(593, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'B') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'C') goto yy594; - if (yych != 'c') goto yy476; - } - } -yy594: - YYDEBUG(594, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy540; - if (yych == 'h') goto yy540; - goto yy57; -yy595: - YYDEBUG(595, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy596; - if (yych != 'b') goto yy57; -yy596: - YYDEBUG(596, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - goto yy532; - } - } else { - if (yych <= 'Q') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'R') goto yy597; - if (yych != 'r') goto yy476; - } - } -yy597: - YYDEBUG(597, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy598; - if (yych != 'u') goto yy57; -yy598: - YYDEBUG(598, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy599; - if (yych != 'a') goto yy57; -yy599: - YYDEBUG(599, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy600; - if (yych != 'r') goto yy57; -yy600: - YYDEBUG(600, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy540; - if (yych == 'y') goto yy540; - goto yy57; -yy601: - YYDEBUG(601, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy608; - if (yych <= '6') goto yy609; - if (yych <= '9') goto yy610; - goto yy57; -yy602: - YYDEBUG(602, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(603, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy604: - YYDEBUG(604, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy605: - YYDEBUG(605, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(606, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(607, *YYCURSOR); -#line 1345 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("pointed date YYYY"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL_POINTED; - } -#line 11029 "ext/date/lib/parse_date.c" -yy608: - YYDEBUG(608, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy613; - goto yy491; -yy609: - YYDEBUG(609, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy497; - goto yy491; - } else { - if (yych <= '0') goto yy613; - if (yych <= '9') goto yy611; - goto yy491; - } -yy610: - YYDEBUG(610, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych >= ':') goto yy491; -yy611: - YYDEBUG(611, *YYCURSOR); - yyaccept = 12; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy612; - if (yych <= '9') goto yy605; -yy612: - YYDEBUG(612, *YYCURSOR); -#line 1357 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("pointed date YY"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_FULL_POINTED; - } -#line 11077 "ext/date/lib/parse_date.c" -yy613: - YYDEBUG(613, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= ' ') { - if (yych == '\t') goto yy501; - if (yych <= 0x1F) goto yy491; - goto yy501; - } else { - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - goto yy605; - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy503; - if (yych <= 'O') goto yy491; - goto yy503; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy491; - goto yy503; - } else { - if (yych == 'p') goto yy503; - goto yy491; - } - } - } -yy614: - YYDEBUG(614, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy508; - if (yych <= 0x1F) goto yy491; - goto yy508; - } else { - if (yych == '.') goto yy493; - if (yych <= '9') goto yy491; - goto yy493; - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy510; - if (yych <= 'O') goto yy491; - goto yy510; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy491; - goto yy510; - } else { - if (yych == 'p') goto yy510; - goto yy491; - } - } - } -yy615: - YYDEBUG(615, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ':') { - if (yych <= ' ') { - if (yych == '\t') goto yy508; - if (yych <= 0x1F) goto yy491; - goto yy508; - } else { - if (yych <= '-') { - if (yych <= ',') goto yy491; - goto yy602; - } else { - if (yych <= '.') goto yy601; - if (yych <= '9') goto yy491; - goto yy493; - } - } - } else { - if (yych <= 'P') { - if (yych == 'A') goto yy510; - if (yych <= 'O') goto yy491; - goto yy510; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy491; - goto yy510; - } else { - if (yych == 'p') goto yy510; - goto yy491; - } - } - } -yy616: - YYDEBUG(616, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy655; - goto yy602; - } else { - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy618; - goto yy57; - } -yy617: - YYDEBUG(617, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy655; - goto yy602; - } else { - if (yych <= '/') goto yy57; - if (yych >= '3') goto yy57; - } -yy618: - YYDEBUG(618, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy655; - if (yych <= '.') goto yy602; - goto yy57; -yy619: - YYDEBUG(619, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'A') goto yy651; - if (yych <= 'T') goto yy57; - goto yy650; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy651; - } else { - if (yych == 'u') goto yy650; - goto yy57; - } - } -yy620: - YYDEBUG(620, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy648; - if (yych == 'e') goto yy648; - goto yy57; -yy621: - YYDEBUG(621, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy645; - if (yych == 'a') goto yy645; - goto yy57; -yy622: - YYDEBUG(622, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'P') goto yy642; - if (yych <= 'T') goto yy57; - goto yy641; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy57; - goto yy642; - } else { - if (yych == 'u') goto yy641; - goto yy57; - } - } -yy623: - YYDEBUG(623, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy638; - if (yych == 'e') goto yy638; - goto yy57; -yy624: - YYDEBUG(624, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy636; - if (yych == 'c') goto yy636; - goto yy57; -yy625: - YYDEBUG(625, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy634; - if (yych == 'o') goto yy634; - goto yy57; -yy626: - YYDEBUG(626, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy627; - if (yych != 'e') goto yy57; -yy627: - YYDEBUG(627, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy628; - if (yych != 'c') goto yy57; -yy628: - YYDEBUG(628, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych >= '.') goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy581; - if (yych == 'e') goto yy581; - goto yy476; - } - } -yy629: - YYDEBUG(629, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy533; - if (yych <= '0') goto yy630; - if (yych <= '2') goto yy631; - if (yych <= '3') goto yy632; - goto yy533; -yy630: - YYDEBUG(630, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy535; - if (yych <= '9') goto yy633; - goto yy535; -yy631: - YYDEBUG(631, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy535; - if (yych <= '9') goto yy633; - goto yy535; -yy632: - YYDEBUG(632, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy535; - if (yych <= '1') goto yy633; - if (yych <= '9') goto yy541; - goto yy535; -yy633: - YYDEBUG(633, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy535; - if (yych <= '9') goto yy542; - goto yy535; -yy634: - YYDEBUG(634, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy635; - if (yych != 'v') goto yy57; -yy635: - YYDEBUG(635, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy536; - if (yych == 'e') goto yy536; - goto yy476; - } - } -yy636: - YYDEBUG(636, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy637; - if (yych != 't') goto yy57; -yy637: - YYDEBUG(637, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'N') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'O') goto yy546; - if (yych == 'o') goto yy546; - goto yy476; - } - } -yy638: - YYDEBUG(638, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy639; - if (yych != 'p') goto yy57; -yy639: - YYDEBUG(639, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'S') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'T') goto yy640; - if (yych != 't') goto yy476; - } - } -yy640: - YYDEBUG(640, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy588; - if (yych == 'e') goto yy588; - goto yy476; - } - } -yy641: - YYDEBUG(641, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy644; - if (yych == 'g') goto yy644; - goto yy57; -yy642: - YYDEBUG(642, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy643; - if (yych != 'r') goto yy57; -yy643: - YYDEBUG(643, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'H') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'I') goto yy552; - if (yych == 'i') goto yy552; - goto yy476; - } - } -yy644: - YYDEBUG(644, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'T') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'U') goto yy554; - if (yych == 'u') goto yy554; - goto yy476; - } - } -yy645: - YYDEBUG(645, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'R') goto yy646; - if (yych <= 'X') goto yy57; - goto yy647; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy57; - } else { - if (yych == 'y') goto yy647; - goto yy57; - } - } -yy646: - YYDEBUG(646, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'B') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'C') goto yy594; - if (yych == 'c') goto yy594; - goto yy476; - } - } -yy647: - YYDEBUG(647, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy476; - goto yy532; - } else { - if (yych == ' ') goto yy532; - goto yy476; - } - } else { - if (yych <= '.') { - if (yych <= '-') goto yy629; - goto yy532; - } else { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } - } -yy648: - YYDEBUG(648, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy649; - if (yych != 'b') goto yy57; -yy649: - YYDEBUG(649, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'Q') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'R') goto yy597; - if (yych == 'r') goto yy597; - goto yy476; - } - } -yy650: - YYDEBUG(650, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'L') goto yy654; - if (yych <= 'M') goto yy57; - goto yy653; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy57; - goto yy654; - } else { - if (yych == 'n') goto yy653; - goto yy57; - } - } -yy651: - YYDEBUG(651, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy652; - if (yych != 'n') goto yy57; -yy652: - YYDEBUG(652, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'T') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'U') goto yy559; - if (yych == 'u') goto yy559; - goto yy476; - } - } -yy653: - YYDEBUG(653, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'D') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'E') goto yy540; - if (yych == 'e') goto yy540; - goto yy476; - } - } -yy654: - YYDEBUG(654, *YYCURSOR); - yyaccept = 10; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy532; - goto yy476; - } else { - if (yych <= ' ') goto yy532; - if (yych <= ',') goto yy476; - if (yych <= '-') goto yy629; - goto yy532; - } - } else { - if (yych <= 'X') { - if (yych <= '/') goto yy476; - if (yych <= '9') goto yy534; - goto yy476; - } else { - if (yych <= 'Y') goto yy540; - if (yych == 'y') goto yy540; - goto yy476; - } - } -yy655: - YYDEBUG(655, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy656; - if (yych <= '3') goto yy658; - if (yych <= '9') goto yy659; - goto yy57; -yy656: - YYDEBUG(656, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy665; - if (yych >= 'n') goto yy661; - } else { - if (yych <= 'r') { - if (yych >= 'r') goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - } - } -yy657: - YYDEBUG(657, *YYCURSOR); -#line 1318 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("gnudateshort"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; - } -#line 11730 "ext/date/lib/parse_date.c" -yy658: - YYDEBUG(658, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '1') { - if (yych <= '/') goto yy657; - goto yy665; - } else { - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy657; - goto yy661; - } - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy659: - YYDEBUG(659, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy660: - YYDEBUG(660, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy664; - goto yy57; -yy661: - YYDEBUG(661, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy664; - goto yy57; -yy662: - YYDEBUG(662, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy664; - goto yy57; -yy663: - YYDEBUG(663, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != 'h') goto yy57; -yy664: - YYDEBUG(664, *YYCURSOR); - yych = *++YYCURSOR; - goto yy657; -yy665: - YYDEBUG(665, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy605; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy666: - YYDEBUG(666, *YYCURSOR); - yyaccept = 14; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') { - if (yych >= '/') goto yy723; - } else { - if (yych <= '9') goto yy669; - if (yych >= 'n') goto yy720; - } - } else { - if (yych <= 'r') { - if (yych >= 'r') goto yy721; - } else { - if (yych <= 's') goto yy719; - if (yych <= 't') goto yy722; - } - } -yy667: - YYDEBUG(667, *YYCURSOR); -#line 1265 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("americanshort | american"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - if (*ptr == '/') { - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); - } - TIMELIB_DEINIT; - return TIMELIB_AMERICAN; - } -#line 11850 "ext/date/lib/parse_date.c" -yy668: - YYDEBUG(668, *YYCURSOR); - yyaccept = 14; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') { - if (yych <= '.') goto yy667; - goto yy723; - } else { - if (yych <= '1') goto yy669; - if (yych <= 'm') goto yy667; - goto yy720; - } - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy667; - goto yy721; - } else { - if (yych <= 's') goto yy719; - if (yych <= 't') goto yy722; - goto yy667; - } - } -yy669: - YYDEBUG(669, *YYCURSOR); - yyaccept = 14; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych == '/') goto yy723; - if (yych <= 'm') goto yy667; - goto yy720; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy667; - goto yy721; - } else { - if (yych <= 's') goto yy719; - if (yych <= 't') goto yy722; - goto yy667; - } - } -yy670: - YYDEBUG(670, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'A') goto yy718; - if (yych <= 'T') goto yy57; - goto yy717; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy718; - } else { - if (yych == 'u') goto yy717; - goto yy57; - } - } -yy671: - YYDEBUG(671, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy716; - if (yych == 'e') goto yy716; - goto yy57; -yy672: - YYDEBUG(672, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy715; - if (yych == 'a') goto yy715; - goto yy57; -yy673: - YYDEBUG(673, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'P') goto yy714; - if (yych <= 'T') goto yy57; - goto yy713; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy57; - goto yy714; - } else { - if (yych == 'u') goto yy713; - goto yy57; - } - } -yy674: - YYDEBUG(674, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy711; - if (yych == 'e') goto yy711; - goto yy57; -yy675: - YYDEBUG(675, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy710; - if (yych == 'c') goto yy710; - goto yy57; -yy676: - YYDEBUG(676, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy709; - if (yych == 'o') goto yy709; - goto yy57; -yy677: - YYDEBUG(677, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy678; - if (yych != 'e') goto yy57; -yy678: - YYDEBUG(678, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy679; - if (yych != 'c') goto yy57; -yy679: - YYDEBUG(679, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '/') goto yy57; -yy680: - YYDEBUG(680, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(681, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(682, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(683, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(684, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(685, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy686; - if (yych <= '2') goto yy687; - goto yy57; -yy686: - YYDEBUG(686, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy688; - goto yy57; -yy687: - YYDEBUG(687, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '5') goto yy57; -yy688: - YYDEBUG(688, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(689, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '6') goto yy57; - YYDEBUG(690, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(691, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(692, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy693; - if (yych <= '6') goto yy694; - goto yy57; -yy693: - YYDEBUG(693, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy695; - goto yy57; -yy694: - YYDEBUG(694, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy57; -yy695: - YYDEBUG(695, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\t') goto yy696; - if (yych != ' ') goto yy57; -yy696: - YYDEBUG(696, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; - YYDEBUG(697, *YYCURSOR); - if (yych <= '*') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy57; - goto yy696; - } else { - if (yych == ' ') goto yy696; - goto yy57; - } - } else { - if (yych <= '-') { - if (yych == ',') goto yy57; - goto yy699; - } else { - if (yych != 'G') goto yy57; - } - } - YYDEBUG(698, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy707; - goto yy57; -yy699: - YYDEBUG(699, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy700; - if (yych <= '2') goto yy702; - if (yych <= '9') goto yy703; - goto yy57; -yy700: - YYDEBUG(700, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy701; - if (yych <= '9') goto yy703; - if (yych <= ':') goto yy704; -yy701: - YYDEBUG(701, *YYCURSOR); -#line 1536 "ext/date/lib/parse_date.re" - { - int tz_not_found; - DEBUG_OUTPUT("clf"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - TIMELIB_HAVE_DATE(); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_error(s, "The timezone could not be found in the database"); - } - TIMELIB_DEINIT; - return TIMELIB_CLF; - } -#line 12103 "ext/date/lib/parse_date.c" -yy702: - YYDEBUG(702, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy701; - if (yych >= '5') goto yy705; - } else { - if (yych <= '9') goto yy706; - if (yych <= ':') goto yy704; - goto yy701; - } -yy703: - YYDEBUG(703, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy701; - if (yych <= '5') goto yy705; - if (yych <= '9') goto yy706; - if (yych >= ';') goto yy701; -yy704: - YYDEBUG(704, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy701; - if (yych <= '5') goto yy705; - if (yych <= '9') goto yy706; - goto yy701; -yy705: - YYDEBUG(705, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy701; - if (yych >= ':') goto yy701; -yy706: - YYDEBUG(706, *YYCURSOR); - yych = *++YYCURSOR; - goto yy701; -yy707: - YYDEBUG(707, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != 'T') goto yy57; - YYDEBUG(708, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '+') goto yy699; - if (yych == '-') goto yy699; - goto yy57; -yy709: - YYDEBUG(709, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy679; - if (yych == 'v') goto yy679; - goto yy57; -yy710: - YYDEBUG(710, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy679; - if (yych == 't') goto yy679; - goto yy57; -yy711: - YYDEBUG(711, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy712; - if (yych != 'p') goto yy57; -yy712: - YYDEBUG(712, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == '/') goto yy680; - goto yy57; - } else { - if (yych <= 'T') goto yy679; - if (yych == 't') goto yy679; - goto yy57; - } -yy713: - YYDEBUG(713, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy679; - if (yych == 'g') goto yy679; - goto yy57; -yy714: - YYDEBUG(714, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy679; - if (yych == 'r') goto yy679; - goto yy57; -yy715: - YYDEBUG(715, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'R') goto yy679; - if (yych <= 'X') goto yy57; - goto yy679; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy57; - goto yy679; - } else { - if (yych == 'y') goto yy679; - goto yy57; - } - } -yy716: - YYDEBUG(716, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy679; - if (yych == 'b') goto yy679; - goto yy57; -yy717: - YYDEBUG(717, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'L') goto yy679; - if (yych <= 'M') goto yy57; - goto yy679; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy57; - goto yy679; - } else { - if (yych == 'n') goto yy679; - goto yy57; - } - } -yy718: - YYDEBUG(718, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy679; - if (yych == 'n') goto yy679; - goto yy57; -yy719: - YYDEBUG(719, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy728; - goto yy57; -yy720: - YYDEBUG(720, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy728; - goto yy57; -yy721: - YYDEBUG(721, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy728; - goto yy57; -yy722: - YYDEBUG(722, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'h') goto yy728; - goto yy57; -yy723: - YYDEBUG(723, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(724, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy667; - if (yych >= ':') goto yy667; - YYDEBUG(725, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy667; - if (yych >= ':') goto yy667; - YYDEBUG(726, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy667; - if (yych >= ':') goto yy667; - YYDEBUG(727, *YYCURSOR); - yych = *++YYCURSOR; - goto yy667; -yy728: - YYDEBUG(728, *YYCURSOR); - yyaccept = 14; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '/') goto yy723; - goto yy667; -yy729: - YYDEBUG(729, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych == '\t') goto yy731; - goto yy578; - } else { - if (yych <= '-') goto yy732; - if (yych <= '.') goto yy731; - if (yych >= '0') goto yy578; - } -yy730: - YYDEBUG(730, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case 'A': - case 'a': goto yy673; - case 'D': - case 'd': goto yy677; - case 'F': - case 'f': goto yy671; - case 'J': - case 'j': goto yy670; - case 'M': - case 'm': goto yy672; - case 'N': - case 'n': goto yy676; - case 'O': - case 'o': goto yy675; - case 'S': - case 's': goto yy674; - default: goto yy57; - } -yy731: - YYDEBUG(731, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy578; - if (yych <= '0') goto yy736; - if (yych <= '1') goto yy737; - if (yych <= '9') goto yy738; - goto yy578; -yy732: - YYDEBUG(732, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy578; - if (yych <= '0') goto yy733; - if (yych <= '1') goto yy734; - if (yych <= '9') goto yy735; - goto yy578; -yy733: - YYDEBUG(733, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') goto yy57; - if (yych <= '.') goto yy602; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy735; - goto yy57; -yy734: - YYDEBUG(734, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') goto yy57; - if (yych <= '.') goto yy602; - if (yych <= '/') goto yy57; - if (yych >= '3') goto yy57; -yy735: - YYDEBUG(735, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') goto yy57; - if (yych <= '.') goto yy602; - goto yy57; -yy736: - YYDEBUG(736, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy602; - goto yy739; - } else { - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy738; - goto yy57; - } -yy737: - YYDEBUG(737, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy602; - goto yy739; - } else { - if (yych <= '/') goto yy57; - if (yych >= '3') goto yy57; - } -yy738: - YYDEBUG(738, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy602; - if (yych >= '/') goto yy57; -yy739: - YYDEBUG(739, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(740, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy611; - goto yy57; -yy741: - YYDEBUG(741, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy785; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy783; - goto yy61; -yy742: - YYDEBUG(742, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case '0': goto yy751; - case '1': goto yy752; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy753; - case 'A': - case 'a': goto yy746; - case 'D': - case 'd': goto yy750; - case 'F': - case 'f': goto yy744; - case 'J': - case 'j': goto yy743; - case 'M': - case 'm': goto yy745; - case 'N': - case 'n': goto yy749; - case 'O': - case 'o': goto yy748; - case 'S': - case 's': goto yy747; - default: goto yy57; - } -yy743: - YYDEBUG(743, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'A') goto yy782; - if (yych <= 'T') goto yy57; - goto yy781; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy782; - } else { - if (yych == 'u') goto yy781; - goto yy57; - } - } -yy744: - YYDEBUG(744, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy780; - if (yych == 'e') goto yy780; - goto yy57; -yy745: - YYDEBUG(745, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy779; - if (yych == 'a') goto yy779; - goto yy57; -yy746: - YYDEBUG(746, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'P') goto yy778; - if (yych <= 'T') goto yy57; - goto yy777; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy57; - goto yy778; - } else { - if (yych == 'u') goto yy777; - goto yy57; - } - } -yy747: - YYDEBUG(747, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy775; - if (yych == 'e') goto yy775; - goto yy57; -yy748: - YYDEBUG(748, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy774; - if (yych == 'c') goto yy774; - goto yy57; -yy749: - YYDEBUG(749, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy773; - if (yych == 'o') goto yy773; - goto yy57; -yy750: - YYDEBUG(750, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy765; - if (yych == 'e') goto yy765; - goto yy57; -yy751: - YYDEBUG(751, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy754; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy758; - goto yy57; -yy752: - YYDEBUG(752, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy754; - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy758; - goto yy57; -yy753: - YYDEBUG(753, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '-') goto yy57; -yy754: - YYDEBUG(754, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy755; - if (yych <= '3') goto yy756; - if (yych <= '9') goto yy757; - goto yy57; -yy755: - YYDEBUG(755, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy757; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy756: - YYDEBUG(756, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '1') goto yy757; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy757: - YYDEBUG(757, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'q') { - if (yych == 'n') goto yy661; - goto yy657; - } else { - if (yych <= 'r') goto yy662; - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } -yy758: - YYDEBUG(758, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '-') goto yy57; - YYDEBUG(759, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy57; - if (yych >= '1') goto yy761; - } else { - if (yych <= '3') goto yy762; - if (yych <= '9') goto yy757; - goto yy57; - } - YYDEBUG(760, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy763; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy761: - YYDEBUG(761, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy763; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy762: - YYDEBUG(762, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '1') goto yy763; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy763: - YYDEBUG(763, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'q') { - if (yych == 'n') goto yy661; - } else { - if (yych <= 'r') goto yy662; - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - } -yy764: - YYDEBUG(764, *YYCURSOR); -#line 1292 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("iso8601date2"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; - } -#line 12667 "ext/date/lib/parse_date.c" -yy765: - YYDEBUG(765, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy766; - if (yych != 'c') goto yy57; -yy766: - YYDEBUG(766, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '-') goto yy57; -yy767: - YYDEBUG(767, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy768; - if (yych <= '2') goto yy769; - if (yych <= '3') goto yy770; - goto yy57; -yy768: - YYDEBUG(768, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy771; - goto yy57; -yy769: - YYDEBUG(769, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy771; - goto yy57; -yy770: - YYDEBUG(770, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '2') goto yy57; -yy771: - YYDEBUG(771, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(772, *YYCURSOR); -#line 1523 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("pgtextreverse"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_TEXT; - } -#line 12718 "ext/date/lib/parse_date.c" -yy773: - YYDEBUG(773, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy766; - if (yych == 'v') goto yy766; - goto yy57; -yy774: - YYDEBUG(774, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy766; - if (yych == 't') goto yy766; - goto yy57; -yy775: - YYDEBUG(775, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy776; - if (yych != 'p') goto yy57; -yy776: - YYDEBUG(776, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == '-') goto yy767; - goto yy57; - } else { - if (yych <= 'T') goto yy766; - if (yych == 't') goto yy766; - goto yy57; - } -yy777: - YYDEBUG(777, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy766; - if (yych == 'g') goto yy766; - goto yy57; -yy778: - YYDEBUG(778, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy766; - if (yych == 'r') goto yy766; - goto yy57; -yy779: - YYDEBUG(779, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'R') goto yy766; - if (yych <= 'X') goto yy57; - goto yy766; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy57; - goto yy766; - } else { - if (yych == 'y') goto yy766; - goto yy57; - } - } -yy780: - YYDEBUG(780, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy766; - if (yych == 'b') goto yy766; - goto yy57; -yy781: - YYDEBUG(781, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'L') goto yy766; - if (yych <= 'M') goto yy57; - goto yy766; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy57; - goto yy766; - } else { - if (yych == 'n') goto yy766; - goto yy57; - } - } -yy782: - YYDEBUG(782, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy766; - if (yych == 'n') goto yy766; - goto yy57; -yy783: - YYDEBUG(783, *YYCURSOR); - yyaccept = 16; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'S': - case 'T': - case 'V': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'n': - case 'o': - case 's': - case 't': - case 'w': - case 'y': goto yy791; - case '-': goto yy788; - case '.': goto yy792; - case '/': goto yy789; - case '0': goto yy805; - case '1': goto yy806; - case '2': goto yy808; - case '3': goto yy809; - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy55; - case ':': goto yy807; - case 'W': goto yy810; - default: goto yy784; - } -yy784: - YYDEBUG(784, *YYCURSOR); -#line 1557 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("year4"); - TIMELIB_INIT; - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_DEINIT; - return TIMELIB_CLF; - } -#line 12864 "ext/date/lib/parse_date.c" -yy785: - YYDEBUG(785, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case '0': goto yy786; - case '1': goto yy787; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy753; - case 'A': - case 'a': goto yy746; - case 'D': - case 'd': goto yy750; - case 'F': - case 'f': goto yy744; - case 'J': - case 'j': goto yy743; - case 'M': - case 'm': goto yy745; - case 'N': - case 'n': goto yy749; - case 'O': - case 'o': goto yy748; - case 'S': - case 's': goto yy747; - default: goto yy57; - } -yy786: - YYDEBUG(786, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy754; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy753; - goto yy57; -yy787: - YYDEBUG(787, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy754; - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy753; - goto yy57; -yy788: - YYDEBUG(788, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case '0': goto yy973; - case '1': goto yy975; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy976; - case 'A': - case 'a': goto yy967; - case 'D': - case 'd': goto yy971; - case 'F': - case 'f': goto yy965; - case 'J': - case 'j': goto yy964; - case 'M': - case 'm': goto yy966; - case 'N': - case 'n': goto yy970; - case 'O': - case 'o': goto yy969; - case 'S': - case 's': goto yy968; - case 'W': goto yy972; - default: goto yy939; - } -yy789: - YYDEBUG(789, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy947; - if (yych <= '1') goto yy948; - if (yych <= '9') goto yy949; - goto yy57; -yy790: - YYDEBUG(790, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 11) YYFILL(11); - yych = *YYCURSOR; -yy791: - YYDEBUG(791, *YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': goto yy790; - case '-': - case '.': goto yy938; - case 'A': - case 'a': goto yy800; - case 'D': - case 'd': goto yy804; - case 'F': - case 'f': goto yy798; - case 'H': - case 'h': goto yy64; - case 'I': goto yy793; - case 'J': - case 'j': goto yy797; - case 'M': - case 'm': goto yy799; - case 'N': - case 'n': goto yy803; - case 'O': - case 'o': goto yy802; - case 'S': - case 's': goto yy801; - case 'T': - case 't': goto yy69; - case 'V': goto yy795; - case 'W': - case 'w': goto yy68; - case 'X': goto yy796; - case 'Y': - case 'y': goto yy67; - default: goto yy57; - } -yy792: - YYDEBUG(792, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy939; - if (yych <= '0') goto yy931; - if (yych <= '2') goto yy932; - if (yych <= '3') goto yy933; - goto yy939; -yy793: - YYDEBUG(793, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= 'U') { - if (yych == 'I') goto yy930; - } else { - if (yych == 'W') goto yy794; - if (yych <= 'X') goto yy884; - } -yy794: - YYDEBUG(794, *YYCURSOR); -#line 1383 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("datenodayrev"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_month((char **) &ptr); - s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_DATE_NO_DAY; - } -#line 13027 "ext/date/lib/parse_date.c" -yy795: - YYDEBUG(795, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy928; - goto yy794; -yy796: - YYDEBUG(796, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy927; - goto yy794; -yy797: - YYDEBUG(797, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'A') goto yy920; - if (yych <= 'T') goto yy57; - goto yy919; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy920; - } else { - if (yych == 'u') goto yy919; - goto yy57; - } - } -yy798: - YYDEBUG(798, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= 'N') { - if (yych == 'E') goto yy913; - goto yy57; - } else { - if (yych <= 'O') goto yy99; - if (yych <= 'Q') goto yy57; - goto yy98; - } - } else { - if (yych <= 'n') { - if (yych == 'e') goto yy913; - goto yy57; - } else { - if (yych <= 'o') goto yy99; - if (yych == 'r') goto yy98; - goto yy57; - } - } -yy799: - YYDEBUG(799, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= 'H') { - if (yych == 'A') goto yy910; - goto yy57; - } else { - if (yych <= 'I') goto yy118; - if (yych <= 'N') goto yy57; - goto yy117; - } - } else { - if (yych <= 'h') { - if (yych == 'a') goto yy910; - goto yy57; - } else { - if (yych <= 'i') goto yy118; - if (yych == 'o') goto yy117; - goto yy57; - } - } -yy800: - YYDEBUG(800, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'P') goto yy904; - if (yych <= 'T') goto yy57; - goto yy903; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy57; - goto yy904; - } else { - if (yych == 'u') goto yy903; - goto yy57; - } - } -yy801: - YYDEBUG(801, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'D') { - if (yych == 'A') goto yy127; - goto yy57; - } else { - if (yych <= 'E') goto yy896; - if (yych <= 'T') goto yy57; - goto yy126; - } - } else { - if (yych <= 'd') { - if (yych == 'a') goto yy127; - goto yy57; - } else { - if (yych <= 'e') goto yy896; - if (yych == 'u') goto yy126; - goto yy57; - } - } -yy802: - YYDEBUG(802, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy891; - if (yych == 'c') goto yy891; - goto yy57; -yy803: - YYDEBUG(803, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy885; - if (yych == 'o') goto yy885; - goto yy57; -yy804: - YYDEBUG(804, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych == 'A') goto yy114; - if (yych <= 'D') goto yy57; - goto yy878; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy114; - } else { - if (yych == 'e') goto yy878; - goto yy57; - } - } -yy805: - YYDEBUG(805, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '0') goto yy875; - if (yych <= '9') goto yy876; - goto yy61; -yy806: - YYDEBUG(806, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '2') goto yy844; - if (yych <= '9') goto yy823; - goto yy61; -yy807: - YYDEBUG(807, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy824; - if (yych <= '1') goto yy825; - goto yy57; -yy808: - YYDEBUG(808, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy823; - goto yy61; -yy809: - YYDEBUG(809, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '5') goto yy819; - if (yych <= '6') goto yy820; - if (yych <= '9') goto yy55; - goto yy61; -yy810: - YYDEBUG(810, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy811; - if (yych <= '4') goto yy812; - goto yy813; - } else { - if (yych <= 'E') { - if (yych <= 'D') goto yy57; - goto yy83; - } else { - if (yych == 'e') goto yy83; - goto yy57; - } - } -yy811: - YYDEBUG(811, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '0') goto yy57; - if (yych <= '9') goto yy814; - goto yy57; -yy812: - YYDEBUG(812, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy814; - goto yy57; -yy813: - YYDEBUG(813, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '4') goto yy57; -yy814: - YYDEBUG(814, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy816; - if (yych <= '/') goto yy815; - if (yych <= '7') goto yy817; -yy815: - YYDEBUG(815, *YYCURSOR); -#line 1491 "ext/date/lib/parse_date.re" - { - timelib_sll w, d; - DEBUG_OUTPUT("isoweek"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - TIMELIB_HAVE_RELATIVE(); - - s->time->y = timelib_get_nr((char **) &ptr, 4); - w = timelib_get_nr((char **) &ptr, 2); - d = 1; - s->time->m = 1; - s->time->d = 1; - s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); - - TIMELIB_DEINIT; - return TIMELIB_ISO_WEEK; - } -#line 13260 "ext/date/lib/parse_date.c" -yy816: - YYDEBUG(816, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '8') goto yy57; -yy817: - YYDEBUG(817, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(818, *YYCURSOR); -#line 1472 "ext/date/lib/parse_date.re" - { - timelib_sll w, d; - DEBUG_OUTPUT("isoweekday"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - TIMELIB_HAVE_RELATIVE(); - - s->time->y = timelib_get_nr((char **) &ptr, 4); - w = timelib_get_nr((char **) &ptr, 2); - d = timelib_get_nr((char **) &ptr, 1); - s->time->m = 1; - s->time->d = 1; - s->time->relative.d = timelib_daynr_from_weeknr(s->time->y, w, d); - - TIMELIB_DEINIT; - return TIMELIB_ISO_WEEK; - } -#line 13288 "ext/date/lib/parse_date.c" -yy819: - YYDEBUG(819, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy821; - goto yy61; -yy820: - YYDEBUG(820, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '6') goto yy821; - if (yych <= '9') goto yy55; - goto yy61; -yy821: - YYDEBUG(821, *YYCURSOR); - yyaccept = 18; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy55; - } - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych >= ' ') goto yy61; - } else { - if (yych == 'D') goto yy61; - if (yych >= 'F') goto yy61; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy61; - if (yych >= 'M') goto yy61; - } else { - if (yych <= 'R') goto yy822; - if (yych <= 'T') goto yy61; - if (yych >= 'W') goto yy61; - } - } - } else { - if (yych <= 'h') { - if (yych <= 'd') { - if (yych == 'Y') goto yy61; - if (yych >= 'd') goto yy61; - } else { - if (yych == 'f') goto yy61; - if (yych >= 'h') goto yy61; - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych >= 's') goto yy61; - } else { - if (yych <= 'w') { - if (yych >= 'w') goto yy61; - } else { - if (yych == 'y') goto yy61; - } - } - } - } -yy822: - YYDEBUG(822, *YYCURSOR); -#line 1459 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("pgydotd"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->d = timelib_get_nr((char **) &ptr, 3); - s->time->m = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_PG_YEARDAY; - } -#line 13364 "ext/date/lib/parse_date.c" -yy823: - YYDEBUG(823, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy821; - goto yy61; -yy824: - YYDEBUG(824, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy826; - goto yy57; -yy825: - YYDEBUG(825, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '3') goto yy57; -yy826: - YYDEBUG(826, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(827, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy828; - if (yych <= '2') goto yy829; - if (yych <= '3') goto yy830; - goto yy57; -yy828: - YYDEBUG(828, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy831; - goto yy57; -yy829: - YYDEBUG(829, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy831; - goto yy57; -yy830: - YYDEBUG(830, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '2') goto yy57; -yy831: - YYDEBUG(831, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ' ') goto yy57; - YYDEBUG(832, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy833; - if (yych <= '2') goto yy834; - goto yy57; -yy833: - YYDEBUG(833, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy835; - goto yy57; -yy834: - YYDEBUG(834, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '5') goto yy57; -yy835: - YYDEBUG(835, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(836, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '6') goto yy57; - YYDEBUG(837, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(838, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(839, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy840; - if (yych <= '6') goto yy841; - goto yy57; -yy840: - YYDEBUG(840, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy842; - goto yy57; -yy841: - YYDEBUG(841, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy57; -yy842: - YYDEBUG(842, *YYCURSOR); - ++YYCURSOR; -yy843: - YYDEBUG(843, *YYCURSOR); -#line 1433 "ext/date/lib/parse_date.re" - { - int tz_not_found; - DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - if (*ptr == '.') { - s->time->f = timelib_get_frac_nr((char **) &ptr, 9); - if (*ptr) { /* timezone is optional */ - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_error(s, "The timezone could not be found in the database"); - } - } - } - TIMELIB_DEINIT; - return TIMELIB_XMLRPC_SOAP; - } -#line 13492 "ext/date/lib/parse_date.c" -yy844: - YYDEBUG(844, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy61; - if (yych >= '1') goto yy846; - } else { - if (yych <= '3') goto yy847; - if (yych <= '9') goto yy821; - goto yy61; - } -yy845: - YYDEBUG(845, *YYCURSOR); - yyaccept = 18; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy822; - goto yy61; - } else { - if (yych <= '/') goto yy822; - if (yych <= '9') goto yy848; - if (yych <= 'C') goto yy822; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy822; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy822; - goto yy61; - } else { - if (yych <= 'R') goto yy822; - if (yych <= 'T') goto yy61; - goto yy822; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy822; - if (yych <= 'Y') goto yy61; - goto yy822; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy822; - } else { - if (yych == 'g') goto yy822; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy822; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy822; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy822; - } - } - } - } -yy846: - YYDEBUG(846, *YYCURSOR); - yyaccept = 18; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy822; - goto yy61; - } else { - if (yych <= '/') goto yy822; - if (yych <= '9') goto yy848; - if (yych <= 'C') goto yy822; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy822; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy822; - goto yy61; - } else { - if (yych <= 'R') goto yy822; - if (yych <= 'T') goto yy61; - goto yy822; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy822; - if (yych <= 'Y') goto yy61; - goto yy822; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy822; - } else { - if (yych == 'g') goto yy822; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy822; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy822; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy822; - } - } - } - } -yy847: - YYDEBUG(847, *YYCURSOR); - yyaccept = 18; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy822; - goto yy61; - } else { - if (yych <= '1') { - if (yych <= '/') goto yy822; - } else { - if (yych <= '9') goto yy55; - if (yych <= 'C') goto yy822; - goto yy61; - } - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy822; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy822; - goto yy61; - } else { - if (yych <= 'R') goto yy822; - if (yych <= 'T') goto yy61; - goto yy822; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy822; - if (yych <= 'Y') goto yy61; - goto yy822; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy822; - } else { - if (yych == 'g') goto yy822; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy822; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy822; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy822; - } - } - } - } -yy848: - YYDEBUG(848, *YYCURSOR); - yyaccept = 19; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy55; - } - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych >= ' ') goto yy60; - } else { - if (yych == 'D') goto yy65; - if (yych >= 'F') goto yy66; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy64; - if (yych >= 'M') goto yy63; - } else { - if (yych <= 'S') { - if (yych >= 'S') goto yy62; - } else { - if (yych <= 'T') goto yy850; - if (yych >= 'W') goto yy68; - } - } - } - } else { - if (yych <= 'l') { - if (yych <= 'd') { - if (yych == 'Y') goto yy67; - if (yych >= 'd') goto yy65; - } else { - if (yych <= 'f') { - if (yych >= 'f') goto yy66; - } else { - if (yych == 'h') goto yy64; - } - } - } else { - if (yych <= 't') { - if (yych <= 'm') goto yy63; - if (yych <= 'r') goto yy849; - if (yych <= 's') goto yy62; - goto yy851; - } else { - if (yych <= 'w') { - if (yych >= 'w') goto yy68; - } else { - if (yych == 'y') goto yy67; - } - } - } - } -yy849: - YYDEBUG(849, *YYCURSOR); -#line 1421 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("datenocolon"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_DEINIT; - return TIMELIB_DATE_NOCOLON; - } -#line 13765 "ext/date/lib/parse_date.c" -yy850: - YYDEBUG(850, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= '2') { - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy865; - goto yy866; - } else { - if (yych <= '9') goto yy867; - if (yych <= 'G') goto yy57; - goto yy70; - } - } else { - if (yych <= 'g') { - if (yych == 'U') goto yy71; - goto yy57; - } else { - if (yych <= 'h') goto yy70; - if (yych == 'u') goto yy71; - goto yy57; - } - } -yy851: - YYDEBUG(851, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= '2') { - if (yych <= '/') goto yy57; - if (yych >= '2') goto yy853; - } else { - if (yych <= '9') goto yy854; - if (yych <= 'G') goto yy57; - goto yy70; - } - } else { - if (yych <= 'g') { - if (yych == 'U') goto yy71; - goto yy57; - } else { - if (yych <= 'h') goto yy70; - if (yych == 'u') goto yy71; - goto yy57; - } - } - YYDEBUG(852, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy859; - if (yych <= '9') goto yy854; - goto yy57; -yy853: - YYDEBUG(853, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '4') goto yy859; - if (yych <= '5') goto yy855; - goto yy57; -yy854: - YYDEBUG(854, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '6') goto yy57; -yy855: - YYDEBUG(855, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy856: - YYDEBUG(856, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy857; - if (yych <= '6') goto yy858; - goto yy57; -yy857: - YYDEBUG(857, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy842; - goto yy57; -yy858: - YYDEBUG(858, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '0') goto yy842; - goto yy57; -yy859: - YYDEBUG(859, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy860; - if (yych <= '9') goto yy856; - goto yy57; -yy860: - YYDEBUG(860, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy861; - if (yych <= '6') goto yy862; - if (yych <= '9') goto yy856; - goto yy57; -yy861: - YYDEBUG(861, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy863; - if (yych <= '6') goto yy864; - if (yych <= '9') goto yy842; - goto yy57; -yy862: - YYDEBUG(862, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy863; - if (yych <= '5') goto yy857; - if (yych <= '6') goto yy858; - goto yy57; -yy863: - YYDEBUG(863, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '9') goto yy842; - goto yy843; -yy864: - YYDEBUG(864, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '0') goto yy842; - goto yy843; -yy865: - YYDEBUG(865, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy874; - if (yych <= '9') goto yy867; - if (yych <= ':') goto yy868; - goto yy57; -yy866: - YYDEBUG(866, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy57; - if (yych <= '4') goto yy874; - goto yy855; - } else { - if (yych == ':') goto yy868; - goto yy57; - } -yy867: - YYDEBUG(867, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy855; - if (yych != ':') goto yy57; -yy868: - YYDEBUG(868, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= '6') goto yy57; - YYDEBUG(869, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(870, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(871, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy872; - if (yych <= '6') goto yy873; - goto yy57; -yy872: - YYDEBUG(872, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy842; - goto yy57; -yy873: - YYDEBUG(873, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '0') goto yy842; - goto yy57; -yy874: - YYDEBUG(874, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy860; - if (yych <= '9') goto yy856; - if (yych <= ':') goto yy868; - goto yy57; -yy875: - YYDEBUG(875, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy61; - if (yych <= '0') goto yy877; - goto yy846; - } else { - if (yych <= '3') goto yy847; - if (yych <= '9') goto yy821; - goto yy61; - } -yy876: - YYDEBUG(876, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy61; - if (yych <= '0') goto yy845; - goto yy846; - } else { - if (yych <= '3') goto yy847; - if (yych <= '9') goto yy821; - goto yy61; - } -yy877: - YYDEBUG(877, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy848; - goto yy61; -yy878: - YYDEBUG(878, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy879; - if (yych != 'c') goto yy57; -yy879: - YYDEBUG(879, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy880; - if (yych != 'e') goto yy794; -yy880: - YYDEBUG(880, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy881; - if (yych != 'm') goto yy57; -yy881: - YYDEBUG(881, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy882; - if (yych != 'b') goto yy57; -yy882: - YYDEBUG(882, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy883; - if (yych != 'e') goto yy57; -yy883: - YYDEBUG(883, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy884; - if (yych != 'r') goto yy57; -yy884: - YYDEBUG(884, *YYCURSOR); - yych = *++YYCURSOR; - goto yy794; -yy885: - YYDEBUG(885, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy886; - if (yych != 'v') goto yy57; -yy886: - YYDEBUG(886, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy887; - if (yych != 'e') goto yy794; -yy887: - YYDEBUG(887, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy888; - if (yych != 'm') goto yy57; -yy888: - YYDEBUG(888, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy889; - if (yych != 'b') goto yy57; -yy889: - YYDEBUG(889, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy890; - if (yych != 'e') goto yy57; -yy890: - YYDEBUG(890, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy884; - if (yych == 'r') goto yy884; - goto yy57; -yy891: - YYDEBUG(891, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy892; - if (yych != 't') goto yy57; -yy892: - YYDEBUG(892, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'O') goto yy893; - if (yych != 'o') goto yy794; -yy893: - YYDEBUG(893, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy894; - if (yych != 'b') goto yy57; -yy894: - YYDEBUG(894, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy895; - if (yych != 'e') goto yy57; -yy895: - YYDEBUG(895, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy884; - if (yych == 'r') goto yy884; - goto yy57; -yy896: - YYDEBUG(896, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'P') { - if (yych == 'C') goto yy129; - if (yych <= 'O') goto yy57; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy57; - goto yy129; - } else { - if (yych != 'p') goto yy57; - } - } -yy897: - YYDEBUG(897, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy898; - if (yych != 't') goto yy794; -yy898: - YYDEBUG(898, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy899; - if (yych != 'e') goto yy794; -yy899: - YYDEBUG(899, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy900; - if (yych != 'm') goto yy57; -yy900: - YYDEBUG(900, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy901; - if (yych != 'b') goto yy57; -yy901: - YYDEBUG(901, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy902; - if (yych != 'e') goto yy57; -yy902: - YYDEBUG(902, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy884; - if (yych == 'r') goto yy884; - goto yy57; -yy903: - YYDEBUG(903, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy907; - if (yych == 'g') goto yy907; - goto yy57; -yy904: - YYDEBUG(904, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy905; - if (yych != 'r') goto yy57; -yy905: - YYDEBUG(905, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'I') goto yy906; - if (yych != 'i') goto yy794; -yy906: - YYDEBUG(906, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy884; - if (yych == 'l') goto yy884; - goto yy57; -yy907: - YYDEBUG(907, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy908; - if (yych != 'u') goto yy794; -yy908: - YYDEBUG(908, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy909; - if (yych != 's') goto yy57; -yy909: - YYDEBUG(909, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy884; - if (yych == 't') goto yy884; - goto yy57; -yy910: - YYDEBUG(910, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'R') goto yy911; - if (yych <= 'X') goto yy57; - goto yy884; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy57; - } else { - if (yych == 'y') goto yy884; - goto yy57; - } - } -yy911: - YYDEBUG(911, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'C') goto yy912; - if (yych != 'c') goto yy794; -yy912: - YYDEBUG(912, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy884; - if (yych == 'h') goto yy884; - goto yy57; -yy913: - YYDEBUG(913, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy914; - if (yych != 'b') goto yy57; -yy914: - YYDEBUG(914, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy915; - if (yych != 'r') goto yy794; -yy915: - YYDEBUG(915, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy916; - if (yych != 'u') goto yy57; -yy916: - YYDEBUG(916, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy917; - if (yych != 'a') goto yy57; -yy917: - YYDEBUG(917, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy918; - if (yych != 'r') goto yy57; -yy918: - YYDEBUG(918, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy884; - if (yych == 'y') goto yy884; - goto yy57; -yy919: - YYDEBUG(919, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'L') goto yy926; - if (yych <= 'M') goto yy57; - goto yy925; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy57; - goto yy926; - } else { - if (yych == 'n') goto yy925; - goto yy57; - } - } -yy920: - YYDEBUG(920, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy921; - if (yych != 'n') goto yy57; -yy921: - YYDEBUG(921, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy922; - if (yych != 'u') goto yy794; -yy922: - YYDEBUG(922, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy923; - if (yych != 'a') goto yy57; -yy923: - YYDEBUG(923, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy924; - if (yych != 'r') goto yy57; -yy924: - YYDEBUG(924, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy884; - if (yych == 'y') goto yy884; - goto yy57; -yy925: - YYDEBUG(925, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy884; - if (yych == 'e') goto yy884; - goto yy794; -yy926: - YYDEBUG(926, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy884; - if (yych == 'y') goto yy884; - goto yy794; -yy927: - YYDEBUG(927, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy884; - goto yy794; -yy928: - YYDEBUG(928, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != 'I') goto yy794; - YYDEBUG(929, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy884; - goto yy794; -yy930: - YYDEBUG(930, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy884; - goto yy794; -yy931: - YYDEBUG(931, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy946; - if (yych <= '9') goto yy945; - goto yy57; -yy932: - YYDEBUG(932, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy944; - goto yy57; -yy933: - YYDEBUG(933, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy942; - if (yych <= '6') goto yy941; - goto yy57; -yy934: - YYDEBUG(934, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy913; - if (yych == 'e') goto yy913; - goto yy57; -yy935: - YYDEBUG(935, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy910; - if (yych == 'a') goto yy910; - goto yy57; -yy936: - YYDEBUG(936, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy940; - if (yych == 'e') goto yy940; - goto yy57; -yy937: - YYDEBUG(937, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy878; - if (yych == 'e') goto yy878; - goto yy57; -yy938: - YYDEBUG(938, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; -yy939: - YYDEBUG(939, *YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': - case '-': - case '.': goto yy938; - case 'A': - case 'a': goto yy800; - case 'D': - case 'd': goto yy937; - case 'F': - case 'f': goto yy934; - case 'I': goto yy793; - case 'J': - case 'j': goto yy797; - case 'M': - case 'm': goto yy935; - case 'N': - case 'n': goto yy803; - case 'O': - case 'o': goto yy802; - case 'S': - case 's': goto yy936; - case 'V': goto yy795; - case 'X': goto yy796; - default: goto yy57; - } -yy940: - YYDEBUG(940, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy897; - if (yych == 'p') goto yy897; - goto yy57; -yy941: - YYDEBUG(941, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '6') goto yy943; - goto yy57; -yy942: - YYDEBUG(942, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy943: - YYDEBUG(943, *YYCURSOR); - yych = *++YYCURSOR; - goto yy822; -yy944: - YYDEBUG(944, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy943; - goto yy57; -yy945: - YYDEBUG(945, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy943; - goto yy57; -yy946: - YYDEBUG(946, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '0') goto yy57; - if (yych <= '9') goto yy943; - goto yy57; -yy947: - YYDEBUG(947, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') goto yy57; - if (yych <= '/') goto yy950; - if (yych <= '9') goto yy958; - goto yy57; -yy948: - YYDEBUG(948, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') goto yy57; - if (yych <= '/') goto yy950; - if (yych <= '2') goto yy958; - goto yy57; -yy949: - YYDEBUG(949, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '/') goto yy57; -yy950: - YYDEBUG(950, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy951; - if (yych <= '3') goto yy952; - if (yych <= '9') goto yy953; - goto yy57; -yy951: - YYDEBUG(951, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy455; - if (yych <= '9') goto yy953; - if (yych <= 'm') goto yy455; - goto yy955; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy956; - } else { - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } - } -yy952: - YYDEBUG(952, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy455; - if (yych <= '1') goto yy953; - if (yych <= 'm') goto yy455; - goto yy955; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy956; - } else { - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } - } -yy953: - YYDEBUG(953, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'q') { - if (yych == 'n') goto yy955; - goto yy455; - } else { - if (yych <= 'r') goto yy956; - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } -yy954: - YYDEBUG(954, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy454; - goto yy57; -yy955: - YYDEBUG(955, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy454; - goto yy57; -yy956: - YYDEBUG(956, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy454; - goto yy57; -yy957: - YYDEBUG(957, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'h') goto yy454; - goto yy57; -yy958: - YYDEBUG(958, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '/') goto yy57; - YYDEBUG(959, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy57; - if (yych >= '1') goto yy961; - } else { - if (yych <= '3') goto yy962; - if (yych <= '9') goto yy953; - goto yy57; - } - YYDEBUG(960, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy455; - if (yych <= '9') goto yy963; - if (yych <= 'm') goto yy455; - goto yy955; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy956; - } else { - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } - } -yy961: - YYDEBUG(961, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy455; - if (yych <= '9') goto yy963; - if (yych <= 'm') goto yy455; - goto yy955; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy956; - } else { - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } - } -yy962: - YYDEBUG(962, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy455; - if (yych <= '1') goto yy963; - if (yych <= 'm') goto yy455; - goto yy955; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy956; - } else { - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } - } -yy963: - YYDEBUG(963, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych == '/') goto yy454; - if (yych <= 'm') goto yy455; - goto yy955; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy956; - } else { - if (yych <= 's') goto yy954; - if (yych <= 't') goto yy957; - goto yy455; - } - } -yy964: - YYDEBUG(964, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'A') goto yy1044; - if (yych <= 'T') goto yy57; - goto yy1043; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy57; - goto yy1044; - } else { - if (yych == 'u') goto yy1043; - goto yy57; - } - } -yy965: - YYDEBUG(965, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1041; - if (yych == 'e') goto yy1041; - goto yy57; -yy966: - YYDEBUG(966, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1038; - if (yych == 'a') goto yy1038; - goto yy57; -yy967: - YYDEBUG(967, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'P') goto yy1035; - if (yych <= 'T') goto yy57; - goto yy1034; - } else { - if (yych <= 'p') { - if (yych <= 'o') goto yy57; - goto yy1035; - } else { - if (yych == 'u') goto yy1034; - goto yy57; - } - } -yy968: - YYDEBUG(968, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1031; - if (yych == 'e') goto yy1031; - goto yy57; -yy969: - YYDEBUG(969, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy1029; - if (yych == 'c') goto yy1029; - goto yy57; -yy970: - YYDEBUG(970, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1027; - if (yych == 'o') goto yy1027; - goto yy57; -yy971: - YYDEBUG(971, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1025; - if (yych == 'e') goto yy1025; - goto yy57; -yy972: - YYDEBUG(972, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '0') goto yy811; - if (yych <= '4') goto yy812; - if (yych <= '5') goto yy813; - goto yy57; -yy973: - YYDEBUG(973, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy977; - if (yych <= '/') goto yy974; - if (yych <= '9') goto yy996; -yy974: - YYDEBUG(974, *YYCURSOR); -#line 1305 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("gnudateshorter"); - TIMELIB_INIT; - TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); - s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); - TIMELIB_DEINIT; - return TIMELIB_ISO_DATE; - } -#line 14697 "ext/date/lib/parse_date.c" -yy975: - YYDEBUG(975, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy977; - if (yych <= '/') goto yy974; - if (yych <= '2') goto yy996; - goto yy974; -yy976: - YYDEBUG(976, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != '-') goto yy974; -yy977: - YYDEBUG(977, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '2') goto yy978; - if (yych <= '3') goto yy979; - if (yych <= '9') goto yy980; - goto yy57; -yy978: - YYDEBUG(978, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '9') { - if (yych <= '/') goto yy657; - goto yy980; - } else { - if (yych == 'T') goto yy985; - goto yy657; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy982; - if (yych <= 'q') goto yy657; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy657; - } - } -yy979: - YYDEBUG(979, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy657; - } else { - if (yych == 'T') goto yy985; - goto yy657; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy982; - if (yych <= 'q') goto yy657; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy657; - } - } -yy980: - YYDEBUG(980, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych == 'T') goto yy985; - if (yych <= 'm') goto yy657; - goto yy982; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy657; - } - } -yy981: - YYDEBUG(981, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy995; - goto yy57; -yy982: - YYDEBUG(982, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy995; - goto yy57; -yy983: - YYDEBUG(983, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'd') goto yy995; - goto yy57; -yy984: - YYDEBUG(984, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'h') goto yy995; - goto yy57; -yy985: - YYDEBUG(985, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy986; - if (yych <= '2') goto yy987; - if (yych <= '9') goto yy988; - goto yy57; -yy986: - YYDEBUG(986, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy988; - if (yych <= ':') goto yy989; - goto yy57; -yy987: - YYDEBUG(987, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '4') goto yy988; - if (yych == ':') goto yy989; - goto yy57; -yy988: - YYDEBUG(988, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; -yy989: - YYDEBUG(989, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy990; - if (yych <= '9') goto yy991; - goto yy57; -yy990: - YYDEBUG(990, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy991; - if (yych <= ':') goto yy992; - goto yy57; -yy991: - YYDEBUG(991, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; -yy992: - YYDEBUG(992, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy993; - if (yych <= '6') goto yy994; - if (yych <= '9') goto yy842; - goto yy57; -yy993: - YYDEBUG(993, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '9') goto yy842; - goto yy843; -yy994: - YYDEBUG(994, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '0') goto yy842; - goto yy843; -yy995: - YYDEBUG(995, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'T') goto yy985; - goto yy657; -yy996: - YYDEBUG(996, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != '-') goto yy974; - YYDEBUG(997, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy57; - if (yych >= '1') goto yy999; - } else { - if (yych <= '3') goto yy1000; - if (yych <= '9') goto yy980; - goto yy57; - } - YYDEBUG(998, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '9') { - if (yych <= '/') goto yy657; - goto yy1001; - } else { - if (yych == 'T') goto yy985; - goto yy657; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy982; - if (yych <= 'q') goto yy657; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy657; - } - } -yy999: - YYDEBUG(999, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '9') { - if (yych <= '/') goto yy657; - goto yy1001; - } else { - if (yych == 'T') goto yy985; - goto yy657; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy982; - if (yych <= 'q') goto yy657; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy657; - } - } -yy1000: - YYDEBUG(1000, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'm') { - if (yych <= '1') { - if (yych <= '/') goto yy657; - } else { - if (yych == 'T') goto yy985; - goto yy657; - } - } else { - if (yych <= 'r') { - if (yych <= 'n') goto yy982; - if (yych <= 'q') goto yy657; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy657; - } - } -yy1001: - YYDEBUG(1001, *YYCURSOR); - yyaccept = 21; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych == 'T') goto yy1002; - if (yych <= 'm') goto yy455; - goto yy982; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy455; - goto yy983; - } else { - if (yych <= 's') goto yy981; - if (yych <= 't') goto yy984; - goto yy455; - } - } -yy1002: - YYDEBUG(1002, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy1003; - if (yych <= '2') goto yy1004; - if (yych <= '9') goto yy988; - goto yy57; -yy1003: - YYDEBUG(1003, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy1005; - if (yych <= ':') goto yy989; - goto yy57; -yy1004: - YYDEBUG(1004, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '4') goto yy1005; - if (yych == ':') goto yy989; - goto yy57; -yy1005: - YYDEBUG(1005, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(1006, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy1007; - if (yych <= '9') goto yy991; - goto yy57; -yy1007: - YYDEBUG(1007, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy1008; - if (yych <= ':') goto yy992; - goto yy57; -yy1008: - YYDEBUG(1008, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ':') goto yy57; - YYDEBUG(1009, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy1010; - if (yych <= '6') goto yy1011; - if (yych <= '9') goto yy842; - goto yy57; -yy1010: - YYDEBUG(1010, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '9') goto yy1012; - goto yy843; -yy1011: - YYDEBUG(1011, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy843; -yy1012: - YYDEBUG(1012, *YYCURSOR); - yyaccept = 23; - yych = *(YYMARKER = ++YYCURSOR); - if (yych != '.') goto yy843; - YYDEBUG(1013, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy1014: - YYDEBUG(1014, *YYCURSOR); - yyaccept = 23; - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); - yych = *YYCURSOR; - YYDEBUG(1015, *YYCURSOR); - if (yych <= '-') { - if (yych == '+') goto yy1017; - if (yych <= ',') goto yy843; - goto yy1017; - } else { - if (yych <= '9') { - if (yych <= '/') goto yy843; - goto yy1014; - } else { - if (yych != 'G') goto yy843; - } - } - YYDEBUG(1016, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1023; - goto yy57; -yy1017: - YYDEBUG(1017, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy1018; - if (yych <= '2') goto yy1019; - if (yych <= '9') goto yy1020; - goto yy57; -yy1018: - YYDEBUG(1018, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '9') goto yy1020; - if (yych <= ':') goto yy1021; - goto yy843; -yy1019: - YYDEBUG(1019, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy843; - if (yych >= '5') goto yy1022; - } else { - if (yych <= '9') goto yy842; - if (yych <= ':') goto yy1021; - goto yy843; - } -yy1020: - YYDEBUG(1020, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '5') goto yy1022; - if (yych <= '9') goto yy842; - if (yych >= ';') goto yy843; -yy1021: - YYDEBUG(1021, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '5') goto yy1022; - if (yych <= '9') goto yy842; - goto yy843; -yy1022: - YYDEBUG(1022, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy843; - if (yych <= '9') goto yy842; - goto yy843; -yy1023: - YYDEBUG(1023, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != 'T') goto yy57; - YYDEBUG(1024, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '+') goto yy1017; - if (yych == '-') goto yy1017; - goto yy57; -yy1025: - YYDEBUG(1025, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy1026; - if (yych != 'c') goto yy57; -yy1026: - YYDEBUG(1026, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'E') goto yy880; - if (yych == 'e') goto yy880; - goto yy794; - } -yy1027: - YYDEBUG(1027, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy1028; - if (yych != 'v') goto yy57; -yy1028: - YYDEBUG(1028, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'E') goto yy887; - if (yych == 'e') goto yy887; - goto yy794; - } -yy1029: - YYDEBUG(1029, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1030; - if (yych != 't') goto yy57; -yy1030: - YYDEBUG(1030, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'O') goto yy893; - if (yych == 'o') goto yy893; - goto yy794; - } -yy1031: - YYDEBUG(1031, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy1032; - if (yych != 'p') goto yy57; -yy1032: - YYDEBUG(1032, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'T') goto yy1033; - if (yych != 't') goto yy794; - } -yy1033: - YYDEBUG(1033, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'E') goto yy899; - if (yych == 'e') goto yy899; - goto yy794; - } -yy1034: - YYDEBUG(1034, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy1037; - if (yych == 'g') goto yy1037; - goto yy57; -yy1035: - YYDEBUG(1035, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1036; - if (yych != 'r') goto yy57; -yy1036: - YYDEBUG(1036, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'I') goto yy906; - if (yych == 'i') goto yy906; - goto yy794; - } -yy1037: - YYDEBUG(1037, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'U') goto yy908; - if (yych == 'u') goto yy908; - goto yy794; - } -yy1038: - YYDEBUG(1038, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych == 'R') goto yy1039; - if (yych <= 'X') goto yy57; - goto yy1040; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy57; - } else { - if (yych == 'y') goto yy1040; - goto yy57; - } - } -yy1039: - YYDEBUG(1039, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'C') goto yy912; - if (yych == 'c') goto yy912; - goto yy794; - } -yy1040: - YYDEBUG(1040, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy767; - goto yy794; -yy1041: - YYDEBUG(1041, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy1042; - if (yych != 'b') goto yy57; -yy1042: - YYDEBUG(1042, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'R') goto yy915; - if (yych == 'r') goto yy915; - goto yy794; - } -yy1043: - YYDEBUG(1043, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'L') goto yy1047; - if (yych <= 'M') goto yy57; - goto yy1046; - } else { - if (yych <= 'l') { - if (yych <= 'k') goto yy57; - goto yy1047; - } else { - if (yych == 'n') goto yy1046; - goto yy57; - } - } -yy1044: - YYDEBUG(1044, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1045; - if (yych != 'n') goto yy57; -yy1045: - YYDEBUG(1045, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'U') goto yy922; - if (yych == 'u') goto yy922; - goto yy794; - } -yy1046: - YYDEBUG(1046, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'E') goto yy884; - if (yych == 'e') goto yy884; - goto yy794; - } -yy1047: - YYDEBUG(1047, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych == '-') goto yy767; - goto yy794; - } else { - if (yych <= 'Y') goto yy884; - if (yych == 'y') goto yy884; - goto yy794; - } -yy1048: - YYDEBUG(1048, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy578; - goto yy731; - } else { - if (yych <= ',') goto yy578; - if (yych <= '-') goto yy732; - goto yy731; - } - } else { - if (yych <= 'U') { - if (yych <= '/') goto yy730; - if (yych <= 'T') goto yy578; - goto yy78; - } else { - if (yych == 'u') goto yy78; - goto yy578; - } - } -yy1049: - YYDEBUG(1049, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'P') { - if (yych == 'C') goto yy129; - if (yych <= 'O') goto yy57; - goto yy586; - } else { - if (yych <= 'c') { - if (yych <= 'b') goto yy57; - goto yy129; - } else { - if (yych == 'p') goto yy586; - goto yy57; - } - } -yy1050: - YYDEBUG(1050, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '9') { - if (yych <= ',') { - if (yych == '\t') goto yy1052; - goto yy1054; - } else { - if (yych <= '-') goto yy1051; - if (yych <= '.') goto yy731; - if (yych <= '/') goto yy730; - goto yy741; - } - } else { - if (yych <= 'q') { - if (yych == 'n') goto yy470; - goto yy1054; - } else { - if (yych <= 'r') goto yy471; - if (yych <= 's') goto yy464; - if (yych <= 't') goto yy468; - goto yy1054; - } - } -yy1051: - YYDEBUG(1051, *YYCURSOR); - yych = *++YYCURSOR; - YYDEBUG(-1, yych); - switch (yych) { - case '0': goto yy1055; - case '1': goto yy1056; - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy618; - case 'A': - case 'a': goto yy622; - case 'D': - case 'd': goto yy626; - case 'F': - case 'f': goto yy620; - case 'J': - case 'j': goto yy619; - case 'M': - case 'm': goto yy621; - case 'N': - case 'n': goto yy625; - case 'O': - case 'o': goto yy624; - case 'S': - case 's': goto yy623; - default: goto yy578; - } -yy1052: - YYDEBUG(1052, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy1054; - if (yych <= '0') goto yy736; - if (yych <= '1') goto yy737; - if (yych <= '9') goto yy738; - goto yy1054; -yy1053: - YYDEBUG(1053, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 13) YYFILL(13); - yych = *YYCURSOR; -yy1054: - YYDEBUG(1054, *YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': goto yy1053; - case '-': - case '.': goto yy577; - case 'A': - case 'a': goto yy574; - case 'D': - case 'd': goto yy466; - case 'F': - case 'f': goto yy467; - case 'H': - case 'h': goto yy64; - case 'I': goto yy475; - case 'J': - case 'j': goto yy479; - case 'M': - case 'm': goto yy465; - case 'N': - case 'n': goto yy482; - case 'O': - case 'o': goto yy481; - case 'S': - case 's': goto yy463; - case 'T': - case 't': goto yy69; - case 'V': goto yy477; - case 'W': - case 'w': goto yy68; - case 'X': goto yy478; - case 'Y': - case 'y': goto yy67; - default: goto yy57; - } -yy1055: - YYDEBUG(1055, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy655; - goto yy602; - } else { - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy1057; - goto yy57; - } -yy1056: - YYDEBUG(1056, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy655; - goto yy602; - } else { - if (yych <= '/') goto yy57; - if (yych >= '3') goto yy57; - } -yy1057: - YYDEBUG(1057, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= ',') goto yy57; - if (yych <= '-') goto yy1058; - if (yych <= '.') goto yy602; - goto yy57; -yy1058: - YYDEBUG(1058, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy57; - if (yych >= '1') goto yy1060; - } else { - if (yych <= '3') goto yy1061; - if (yych <= '9') goto yy659; - goto yy57; - } - YYDEBUG(1059, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy1062; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy1060: - YYDEBUG(1060, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy657; - if (yych <= '9') goto yy1062; - if (yych <= 'm') goto yy657; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy1061: - YYDEBUG(1061, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '1') { - if (yych <= '/') goto yy657; - } else { - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy657; - goto yy661; - } - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy657; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy657; - } - } -yy1062: - YYDEBUG(1062, *YYCURSOR); - yyaccept = 15; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'n') { - if (yych <= '/') goto yy764; - if (yych <= '9') goto yy605; - if (yych <= 'm') goto yy764; - goto yy661; - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy764; - goto yy662; - } else { - if (yych <= 's') goto yy660; - if (yych <= 't') goto yy663; - goto yy764; - } - } -yy1063: - YYDEBUG(1063, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '9') { - if (yych <= '-') { - if (yych == '\t') goto yy1052; - if (yych <= ',') goto yy1054; - goto yy1051; - } else { - if (yych <= '.') goto yy1064; - if (yych <= '/') goto yy730; - if (yych <= '5') goto yy1066; - goto yy741; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy1065; - if (yych == 'n') goto yy470; - goto yy1054; - } else { - if (yych <= 'r') goto yy471; - if (yych <= 's') goto yy464; - if (yych <= 't') goto yy468; - goto yy1054; - } - } -yy1064: - YYDEBUG(1064, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '1') { - if (yych <= '/') goto yy578; - if (yych <= '0') goto yy1088; - goto yy1089; - } else { - if (yych <= '5') goto yy1090; - if (yych <= '9') goto yy1091; - goto yy578; - } -yy1065: - YYDEBUG(1065, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy1083; - if (yych <= '9') goto yy1084; - goto yy57; -yy1066: - YYDEBUG(1066, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy785; - if (yych <= '/') goto yy61; - if (yych >= ':') goto yy61; - YYDEBUG(1067, *YYCURSOR); - yyaccept = 24; - yych = *(YYMARKER = ++YYCURSOR); - YYDEBUG(-1, yych); - switch (yych) { - case '\t': - case ' ': - case 'A': - case 'D': - case 'F': - case 'H': - case 'I': - case 'J': - case 'M': - case 'N': - case 'O': - case 'S': - case 'T': - case 'V': - case 'X': - case 'Y': - case 'a': - case 'd': - case 'f': - case 'h': - case 'j': - case 'm': - case 'n': - case 'o': - case 's': - case 't': - case 'w': - case 'y': goto yy791; - case '-': goto yy788; - case '.': goto yy792; - case '/': goto yy789; - case '0': goto yy1069; - case '1': goto yy1070; - case '2': goto yy1071; - case '3': goto yy1072; - case '4': - case '5': goto yy1073; - case '6': goto yy1074; - case '7': - case '8': - case '9': goto yy55; - case ':': goto yy807; - case 'W': goto yy810; - default: goto yy1068; - } -yy1068: - YYDEBUG(1068, *YYCURSOR); -#line 1199 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("gnunocolon"); - TIMELIB_INIT; - switch (s->time->have_time) { - case 0: - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = 0; - break; - case 1: - s->time->y = timelib_get_nr((char **) &ptr, 4); - break; - default: - TIMELIB_DEINIT; - add_error(s, "Double time specification"); - return TIMELIB_ERROR; - } - s->time->have_time++; - TIMELIB_DEINIT; - return TIMELIB_GNU_NOCOLON; - } -#line 15728 "ext/date/lib/parse_date.c" -yy1069: - YYDEBUG(1069, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '0') goto yy1081; - if (yych <= '9') goto yy1082; - goto yy61; -yy1070: - YYDEBUG(1070, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '2') goto yy1080; - if (yych <= '9') goto yy1079; - goto yy61; -yy1071: - YYDEBUG(1071, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy1079; - goto yy61; -yy1072: - YYDEBUG(1072, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '5') goto yy1077; - if (yych <= '6') goto yy1078; - if (yych <= '9') goto yy1075; - goto yy61; -yy1073: - YYDEBUG(1073, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '9') goto yy1075; - goto yy61; -yy1074: - YYDEBUG(1074, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy61; - if (yych <= '0') goto yy1075; - if (yych <= '9') goto yy55; - goto yy61; -yy1075: - YYDEBUG(1075, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 2) { - goto yy55; - } - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych >= ' ') goto yy61; - } else { - if (yych == 'D') goto yy61; - if (yych >= 'F') goto yy61; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy61; - if (yych >= 'M') goto yy61; - } else { - if (yych <= 'R') goto yy1076; - if (yych <= 'T') goto yy61; - if (yych >= 'W') goto yy61; - } - } - } else { - if (yych <= 'h') { - if (yych <= 'd') { - if (yych == 'Y') goto yy61; - if (yych >= 'd') goto yy61; - } else { - if (yych == 'f') goto yy61; - if (yych >= 'h') goto yy61; - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych >= 's') goto yy61; - } else { - if (yych <= 'w') { - if (yych >= 'w') goto yy61; - } else { - if (yych == 'y') goto yy61; - } - } - } - } -yy1076: - YYDEBUG(1076, *YYCURSOR); -#line 1245 "ext/date/lib/parse_date.re" - { - int tz_not_found; - DEBUG_OUTPUT("iso8601nocolon"); - TIMELIB_INIT; - TIMELIB_HAVE_TIME(); - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = timelib_get_nr((char **) &ptr, 2); - s->time->s = timelib_get_nr((char **) &ptr, 2); - - if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_error(s, "The timezone could not be found in the database"); - } - } - TIMELIB_DEINIT; - return TIMELIB_ISO_NOCOLON; - } -#line 15839 "ext/date/lib/parse_date.c" -yy1077: - YYDEBUG(1077, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy1076; - goto yy61; - } else { - if (yych <= '/') goto yy1076; - if (yych <= '9') goto yy821; - if (yych <= 'C') goto yy1076; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy1076; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy1076; - goto yy61; - } else { - if (yych <= 'R') goto yy1076; - if (yych <= 'T') goto yy61; - goto yy1076; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy1076; - if (yych <= 'Y') goto yy61; - goto yy1076; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy1076; - } else { - if (yych == 'g') goto yy1076; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy1076; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy1076; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy1076; - } - } - } - } -yy1078: - YYDEBUG(1078, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy1076; - goto yy61; - } else { - if (yych <= '6') { - if (yych <= '/') goto yy1076; - goto yy821; - } else { - if (yych <= '9') goto yy55; - if (yych <= 'C') goto yy1076; - goto yy61; - } - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy1076; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy1076; - goto yy61; - } else { - if (yych <= 'R') goto yy1076; - if (yych <= 'T') goto yy61; - goto yy1076; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy1076; - if (yych <= 'Y') goto yy61; - goto yy1076; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy1076; - } else { - if (yych == 'g') goto yy1076; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy1076; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy1076; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy1076; - } - } - } - } -yy1079: - YYDEBUG(1079, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= 'D') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy1076; - goto yy61; - } else { - if (yych <= '/') goto yy1076; - if (yych <= '9') goto yy821; - if (yych <= 'C') goto yy1076; - goto yy61; - } - } else { - if (yych <= 'H') { - if (yych == 'F') goto yy61; - if (yych <= 'G') goto yy1076; - goto yy61; - } else { - if (yych <= 'M') { - if (yych <= 'L') goto yy1076; - goto yy61; - } else { - if (yych <= 'R') goto yy1076; - if (yych <= 'T') goto yy61; - goto yy1076; - } - } - } - } else { - if (yych <= 'h') { - if (yych <= 'c') { - if (yych == 'X') goto yy1076; - if (yych <= 'Y') goto yy61; - goto yy1076; - } else { - if (yych <= 'e') { - if (yych <= 'd') goto yy61; - goto yy1076; - } else { - if (yych == 'g') goto yy1076; - goto yy61; - } - } - } else { - if (yych <= 't') { - if (yych == 'm') goto yy61; - if (yych <= 'r') goto yy1076; - goto yy61; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy1076; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy1076; - } - } - } - } -yy1080: - YYDEBUG(1080, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '9') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy1076; - goto yy61; - } else { - if (yych <= '0') { - if (yych <= '/') goto yy1076; - goto yy845; - } else { - if (yych <= '2') goto yy846; - if (yych <= '3') goto yy847; - goto yy821; - } - } - } else { - if (yych <= 'G') { - if (yych <= 'D') { - if (yych <= 'C') goto yy1076; - goto yy61; - } else { - if (yych == 'F') goto yy61; - goto yy1076; - } - } else { - if (yych <= 'L') { - if (yych <= 'H') goto yy61; - goto yy1076; - } else { - if (yych <= 'M') goto yy61; - if (yych <= 'R') goto yy1076; - goto yy61; - } - } - } - } else { - if (yych <= 'g') { - if (yych <= 'Y') { - if (yych == 'W') goto yy61; - if (yych <= 'X') goto yy1076; - goto yy61; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy1076; - goto yy61; - } else { - if (yych == 'f') goto yy61; - goto yy1076; - } - } - } else { - if (yych <= 't') { - if (yych <= 'l') { - if (yych <= 'h') goto yy61; - goto yy1076; - } else { - if (yych <= 'm') goto yy61; - if (yych <= 'r') goto yy1076; - goto yy61; - } - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy1076; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy1076; - } - } - } - } -yy1081: - YYDEBUG(1081, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '9') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy1076; - goto yy61; - } else { - if (yych <= '0') { - if (yych <= '/') goto yy1076; - goto yy877; - } else { - if (yych <= '2') goto yy846; - if (yych <= '3') goto yy847; - goto yy821; - } - } - } else { - if (yych <= 'G') { - if (yych <= 'D') { - if (yych <= 'C') goto yy1076; - goto yy61; - } else { - if (yych == 'F') goto yy61; - goto yy1076; - } - } else { - if (yych <= 'L') { - if (yych <= 'H') goto yy61; - goto yy1076; - } else { - if (yych <= 'M') goto yy61; - if (yych <= 'R') goto yy1076; - goto yy61; - } - } - } - } else { - if (yych <= 'g') { - if (yych <= 'Y') { - if (yych == 'W') goto yy61; - if (yych <= 'X') goto yy1076; - goto yy61; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy1076; - goto yy61; - } else { - if (yych == 'f') goto yy61; - goto yy1076; - } - } - } else { - if (yych <= 't') { - if (yych <= 'l') { - if (yych <= 'h') goto yy61; - goto yy1076; - } else { - if (yych <= 'm') goto yy61; - if (yych <= 'r') goto yy1076; - goto yy61; - } - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy1076; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy1076; - } - } - } - } -yy1082: - YYDEBUG(1082, *YYCURSOR); - yyaccept = 25; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '9') { - if (yych <= ' ') { - if (yych == '\t') goto yy61; - if (yych <= 0x1F) goto yy1076; - goto yy61; - } else { - if (yych <= '0') { - if (yych <= '/') goto yy1076; - goto yy845; - } else { - if (yych <= '2') goto yy846; - if (yych <= '3') goto yy847; - goto yy821; - } - } - } else { - if (yych <= 'G') { - if (yych <= 'D') { - if (yych <= 'C') goto yy1076; - goto yy61; - } else { - if (yych == 'F') goto yy61; - goto yy1076; - } - } else { - if (yych <= 'L') { - if (yych <= 'H') goto yy61; - goto yy1076; - } else { - if (yych <= 'M') goto yy61; - if (yych <= 'R') goto yy1076; - goto yy61; - } - } - } - } else { - if (yych <= 'g') { - if (yych <= 'Y') { - if (yych == 'W') goto yy61; - if (yych <= 'X') goto yy1076; - goto yy61; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy1076; - goto yy61; - } else { - if (yych == 'f') goto yy61; - goto yy1076; - } - } - } else { - if (yych <= 't') { - if (yych <= 'l') { - if (yych <= 'h') goto yy61; - goto yy1076; - } else { - if (yych <= 'm') goto yy61; - if (yych <= 'r') goto yy1076; - goto yy61; - } - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy1076; - goto yy61; - } else { - if (yych == 'y') goto yy61; - goto yy1076; - } - } - } - } -yy1083: - YYDEBUG(1083, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy1085; - goto yy491; - } else { - if (yych <= '9') goto yy1084; - if (yych <= ':') goto yy1085; - goto yy491; - } -yy1084: - YYDEBUG(1084, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy1085; - if (yych != ':') goto yy491; -yy1085: - YYDEBUG(1085, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy1086; - if (yych <= '6') goto yy1087; - if (yych <= '9') goto yy496; - goto yy57; -yy1086: - YYDEBUG(1086, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy496; - goto yy491; -yy1087: - YYDEBUG(1087, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych == '0') goto yy496; - goto yy491; -yy1088: - YYDEBUG(1088, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - goto yy1092; - } else { - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy1091; - if (yych <= ':') goto yy1085; - goto yy491; - } -yy1089: - YYDEBUG(1089, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - if (yych <= '.') goto yy1092; - goto yy491; - } else { - if (yych <= '2') goto yy1091; - if (yych <= '9') goto yy1084; - if (yych <= ':') goto yy1085; - goto yy491; - } -yy1090: - YYDEBUG(1090, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - goto yy1092; - } else { - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy1084; - if (yych <= ':') goto yy1085; - goto yy491; - } -yy1091: - YYDEBUG(1091, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy491; - if (yych <= '-') goto yy602; - } else { - if (yych == ':') goto yy1085; - goto yy491; - } -yy1092: - YYDEBUG(1092, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '5') goto yy1093; - if (yych <= '6') goto yy1094; - if (yych <= '9') goto yy610; - goto yy57; -yy1093: - YYDEBUG(1093, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy1095; - goto yy491; -yy1094: - YYDEBUG(1094, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy497; - goto yy491; - } else { - if (yych <= '0') goto yy1095; - if (yych <= '9') goto yy611; - goto yy491; - } -yy1095: - YYDEBUG(1095, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy497; - if (yych <= '/') goto yy491; - if (yych <= '9') goto yy605; - goto yy491; -yy1096: - YYDEBUG(1096, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '9') { - if (yych <= '-') { - if (yych == '\t') goto yy460; - if (yych <= ',') goto yy462; - goto yy1051; - } else { - if (yych <= '.') goto yy474; - if (yych <= '/') goto yy472; - if (yych <= '5') goto yy1066; - goto yy741; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy483; - if (yych == 'n') goto yy470; - goto yy462; - } else { - if (yych <= 'r') goto yy471; - if (yych <= 's') goto yy464; - if (yych <= 't') goto yy468; - goto yy462; - } - } -yy1097: - YYDEBUG(1097, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '9') { - if (yych <= '-') { - if (yych == '\t') goto yy1052; - if (yych <= ',') goto yy1054; - goto yy1051; - } else { - if (yych <= '.') goto yy1064; - if (yych <= '/') goto yy472; - if (yych <= '5') goto yy1066; - goto yy741; - } - } else { - if (yych <= 'q') { - if (yych <= ':') goto yy1065; - if (yych == 'n') goto yy470; - goto yy1054; - } else { - if (yych <= 'r') goto yy471; - if (yych <= 's') goto yy464; - if (yych <= 't') goto yy468; - goto yy1054; - } - } -yy1098: - YYDEBUG(1098, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy142; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'e') goto yy1099; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1099: - YYDEBUG(1099, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'V') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'U') goto yy143; - } - } else { - if (yych <= 'u') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'v') goto yy1100; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1100: - YYDEBUG(1100, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'I') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'H') goto yy144; - } - } else { - if (yych <= 'h') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'i') goto yy1101; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1101: - YYDEBUG(1101, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'N') goto yy145; - } - } else { - if (yych <= 'n') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'o') goto yy1102; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1102: - YYDEBUG(1102, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'U') goto yy1103; - if (yych != 'u') goto yy4; - } -yy1103: - YYDEBUG(1103, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1104; - if (yych != 's') goto yy57; -yy1104: - YYDEBUG(1104, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\t') goto yy1105; - if (yych != ' ') goto yy57; -yy1105: - YYDEBUG(1105, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 11) YYFILL(11); - yych = *YYCURSOR; -yy1106: - YYDEBUG(1106, *YYCURSOR); - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy1105; - if (yych <= 0x1F) goto yy57; - goto yy1105; - } else { - if (yych == 'D') goto yy1110; - if (yych <= 'E') goto yy57; - goto yy1111; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy1109; - if (yych <= 'L') goto yy57; - goto yy1108; - } else { - if (yych <= 'S') { - if (yych <= 'R') goto yy57; - } else { - if (yych <= 'T') goto yy1114; - if (yych <= 'V') goto yy57; - goto yy1113; - } - } - } - } else { - if (yych <= 'l') { - if (yych <= 'd') { - if (yych == 'Y') goto yy1112; - if (yych <= 'c') goto yy57; - goto yy1110; - } else { - if (yych <= 'f') { - if (yych <= 'e') goto yy57; - goto yy1111; - } else { - if (yych == 'h') goto yy1109; - goto yy57; - } - } - } else { - if (yych <= 't') { - if (yych <= 'm') goto yy1108; - if (yych <= 'r') goto yy57; - if (yych >= 't') goto yy1114; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy57; - goto yy1113; - } else { - if (yych == 'y') goto yy1112; - goto yy57; - } - } - } - } -yy1107: - YYDEBUG(1107, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= 'D') { - if (yych == 'A') goto yy1179; - goto yy57; - } else { - if (yych <= 'E') goto yy1180; - if (yych <= 'T') goto yy57; - goto yy1178; - } - } else { - if (yych <= 'd') { - if (yych == 'a') goto yy1179; - goto yy57; - } else { - if (yych <= 'e') goto yy1180; - if (yych == 'u') goto yy1178; - goto yy57; - } - } -yy1108: - YYDEBUG(1108, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych == 'I') goto yy1170; - if (yych <= 'N') goto yy57; - goto yy1169; - } else { - if (yych <= 'i') { - if (yych <= 'h') goto yy57; - goto yy1170; - } else { - if (yych == 'o') goto yy1169; - goto yy57; - } - } -yy1109: - YYDEBUG(1109, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1167; - if (yych == 'o') goto yy1167; - goto yy57; -yy1110: - YYDEBUG(1110, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1166; - if (yych == 'a') goto yy1166; - goto yy57; -yy1111: - YYDEBUG(1111, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych == 'O') goto yy1151; - if (yych <= 'Q') goto yy57; - goto yy1150; - } else { - if (yych <= 'o') { - if (yych <= 'n') goto yy57; - goto yy1151; - } else { - if (yych == 'r') goto yy1150; - goto yy57; - } - } -yy1112: - YYDEBUG(1112, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1147; - if (yych == 'e') goto yy1147; - goto yy57; -yy1113: - YYDEBUG(1113, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1133; - if (yych == 'e') goto yy1133; - goto yy57; -yy1114: - YYDEBUG(1114, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych == 'H') goto yy1115; - if (yych <= 'T') goto yy57; - goto yy1116; - } else { - if (yych <= 'h') { - if (yych <= 'g') goto yy57; - } else { - if (yych == 'u') goto yy1116; - goto yy57; - } - } -yy1115: - YYDEBUG(1115, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy1128; - if (yych == 'u') goto yy1128; - goto yy57; -yy1116: - YYDEBUG(1116, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1117; - if (yych != 'e') goto yy57; -yy1117: - YYDEBUG(1117, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych >= ' ') goto yy1119; - } else { - if (yych <= 'S') { - if (yych >= 'S') goto yy1121; - } else { - if (yych == 's') goto yy1121; - } - } -yy1118: - YYDEBUG(1118, *YYCURSOR); -#line 1629 "ext/date/lib/parse_date.re" - { - timelib_sll i; - int behavior = 0; - DEBUG_OUTPUT("relativetext"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_relative_text((char **) &ptr, &behavior); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, behavior, s); - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 16753 "ext/date/lib/parse_date.c" -yy1119: - YYDEBUG(1119, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - YYDEBUG(1120, *YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych <= 0x1F) goto yy57; - goto yy1119; - } else { - if (yych <= 'O') { - if (yych <= 'N') goto yy57; - goto yy1125; - } else { - if (yych == 'o') goto yy1125; - goto yy57; - } - } -yy1121: - YYDEBUG(1121, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1122; - if (yych != 'd') goto yy57; -yy1122: - YYDEBUG(1122, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1123; - if (yych != 'a') goto yy57; -yy1123: - YYDEBUG(1123, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych != 'y') goto yy57; -yy1124: - YYDEBUG(1124, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '\t') goto yy1119; - if (yych == ' ') goto yy1119; - goto yy1118; -yy1125: - YYDEBUG(1125, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1126; - if (yych != 'f') goto yy57; -yy1126: - YYDEBUG(1126, *YYCURSOR); - ++YYCURSOR; - YYDEBUG(1127, *YYCURSOR); -#line 1114 "ext/date/lib/parse_date.re" - { - timelib_sll i; - int behavior = 0; - DEBUG_OUTPUT("weekdayof"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_HAVE_SPECIAL_RELATIVE(); - - i = timelib_get_relative_text((char **) &ptr, &behavior); - timelib_eat_spaces((char **) &ptr); - if (i > 0) { /* first, second... etc */ - s->time->relative.special.type = TIMELIB_SPECIAL_DAY_OF_WEEK_IN_MONTH; - timelib_set_relative((char **) &ptr, i, 1, s); - } else { /* last */ - s->time->relative.special.type = TIMELIB_SPECIAL_LAST_DAY_OF_WEEK_IN_MONTH; - timelib_set_relative((char **) &ptr, i, behavior, s); - } - TIMELIB_DEINIT; - return TIMELIB_WEEK_DAY_OF_MONTH; - } -#line 16825 "ext/date/lib/parse_date.c" -yy1128: - YYDEBUG(1128, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych <= 0x1F) goto yy1118; - goto yy1119; - } else { - if (yych <= 'R') { - if (yych <= 'Q') goto yy1118; - } else { - if (yych != 'r') goto yy1118; - } - } - YYDEBUG(1129, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1130; - if (yych != 's') goto yy57; -yy1130: - YYDEBUG(1130, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1131; - if (yych != 'd') goto yy57; -yy1131: - YYDEBUG(1131, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1132; - if (yych != 'a') goto yy57; -yy1132: - YYDEBUG(1132, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych == 'y') goto yy1124; - goto yy57; -yy1133: - YYDEBUG(1133, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= 'C') goto yy57; - if (yych <= 'D') goto yy1135; - } else { - if (yych <= 'c') goto yy57; - if (yych <= 'd') goto yy1135; - if (yych >= 'f') goto yy57; - } - YYDEBUG(1134, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy1141; - if (yych == 'k') goto yy1141; - goto yy57; -yy1135: - YYDEBUG(1135, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych <= 0x1F) goto yy1118; - goto yy1119; - } else { - if (yych <= 'N') { - if (yych <= 'M') goto yy1118; - } else { - if (yych != 'n') goto yy1118; - } - } - YYDEBUG(1136, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1137; - if (yych != 'e') goto yy57; -yy1137: - YYDEBUG(1137, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1138; - if (yych != 's') goto yy57; -yy1138: - YYDEBUG(1138, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1139; - if (yych != 'd') goto yy57; -yy1139: - YYDEBUG(1139, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1140; - if (yych != 'a') goto yy57; -yy1140: - YYDEBUG(1140, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych == 'y') goto yy1124; - goto yy57; -yy1141: - YYDEBUG(1141, *YYCURSOR); - yyaccept = 27; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych == 'D') goto yy1144; - if (yych >= 'S') goto yy1143; - } else { - if (yych <= 'd') { - if (yych >= 'd') goto yy1144; - } else { - if (yych == 's') goto yy1143; - } - } -yy1142: - YYDEBUG(1142, *YYCURSOR); -#line 1605 "ext/date/lib/parse_date.re" - { - timelib_sll i; - int behavior = 0; - DEBUG_OUTPUT("relativetextweek"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - - while(*ptr) { - i = timelib_get_relative_text((char **) &ptr, &behavior); - timelib_eat_spaces((char **) &ptr); - timelib_set_relative((char **) &ptr, i, behavior, s); - s->time->relative.weekday_behavior = 2; - - /* to handle the format weekday + last/this/next week */ - if (s->time->relative.have_weekday_relative == 0) { - TIMELIB_HAVE_WEEKDAY_RELATIVE(); - s->time->relative.weekday = 1; - } - } - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 16956 "ext/date/lib/parse_date.c" -yy1143: - YYDEBUG(1143, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1118; -yy1144: - YYDEBUG(1144, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1145; - if (yych != 'a') goto yy57; -yy1145: - YYDEBUG(1145, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1146; - if (yych != 'y') goto yy57; -yy1146: - YYDEBUG(1146, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1143; - if (yych == 's') goto yy1143; - goto yy1118; -yy1147: - YYDEBUG(1147, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1148; - if (yych != 'a') goto yy57; -yy1148: - YYDEBUG(1148, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1149; - if (yych != 'r') goto yy57; -yy1149: - YYDEBUG(1149, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1143; - if (yych == 's') goto yy1143; - goto yy1118; -yy1150: - YYDEBUG(1150, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy1163; - if (yych == 'i') goto yy1163; - goto yy57; -yy1151: - YYDEBUG(1151, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1152; - if (yych != 'r') goto yy57; -yy1152: - YYDEBUG(1152, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1153; - if (yych != 't') goto yy57; -yy1153: - YYDEBUG(1153, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych == 'H') goto yy1155; - if (yych <= 'M') goto yy57; - } else { - if (yych <= 'h') { - if (yych <= 'g') goto yy57; - goto yy1155; - } else { - if (yych != 'n') goto yy57; - } - } - YYDEBUG(1154, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy1160; - if (yych == 'i') goto yy1160; - goto yy57; -yy1155: - YYDEBUG(1155, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1156; - if (yych != 'n') goto yy57; -yy1156: - YYDEBUG(1156, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy1157; - if (yych != 'i') goto yy57; -yy1157: - YYDEBUG(1157, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy1158; - if (yych != 'g') goto yy57; -yy1158: - YYDEBUG(1158, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1159; - if (yych != 'h') goto yy57; -yy1159: - YYDEBUG(1159, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1149; - if (yych == 't') goto yy1149; - goto yy57; -yy1160: - YYDEBUG(1160, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy1161; - if (yych != 'g') goto yy57; -yy1161: - YYDEBUG(1161, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1162; - if (yych != 'h') goto yy57; -yy1162: - YYDEBUG(1162, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1149; - if (yych == 't') goto yy1149; - goto yy57; -yy1163: - YYDEBUG(1163, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych <= 0x1F) goto yy1118; - goto yy1119; - } else { - if (yych <= 'D') { - if (yych <= 'C') goto yy1118; - } else { - if (yych != 'd') goto yy1118; - } - } - YYDEBUG(1164, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1165; - if (yych != 'a') goto yy57; -yy1165: - YYDEBUG(1165, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych == 'y') goto yy1124; - goto yy57; -yy1166: - YYDEBUG(1166, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1149; - if (yych == 'y') goto yy1149; - goto yy57; -yy1167: - YYDEBUG(1167, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy1168; - if (yych != 'u') goto yy57; -yy1168: - YYDEBUG(1168, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1149; - if (yych == 'r') goto yy1149; - goto yy57; -yy1169: - YYDEBUG(1169, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1174; - if (yych == 'n') goto yy1174; - goto yy57; -yy1170: - YYDEBUG(1170, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1171; - if (yych != 'n') goto yy57; -yy1171: - YYDEBUG(1171, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych == 'S') goto yy1143; - if (yych <= 'T') goto yy1118; - } else { - if (yych <= 's') { - if (yych <= 'r') goto yy1118; - goto yy1143; - } else { - if (yych != 'u') goto yy1118; - } - } - YYDEBUG(1172, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1173; - if (yych != 't') goto yy57; -yy1173: - YYDEBUG(1173, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1149; - if (yych == 'e') goto yy1149; - goto yy57; -yy1174: - YYDEBUG(1174, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1119; - goto yy1118; - } else { - if (yych <= ' ') goto yy1119; - if (yych <= 'C') goto yy1118; - } - } else { - if (yych <= 'c') { - if (yych == 'T') goto yy1176; - goto yy1118; - } else { - if (yych <= 'd') goto yy1175; - if (yych == 't') goto yy1176; - goto yy1118; - } - } -yy1175: - YYDEBUG(1175, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1177; - if (yych == 'a') goto yy1177; - goto yy57; -yy1176: - YYDEBUG(1176, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1149; - if (yych == 'h') goto yy1149; - goto yy57; -yy1177: - YYDEBUG(1177, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych == 'y') goto yy1124; - goto yy57; -yy1178: - YYDEBUG(1178, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1189; - if (yych == 'n') goto yy1189; - goto yy57; -yy1179: - YYDEBUG(1179, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1184; - if (yych == 't') goto yy1184; - goto yy57; -yy1180: - YYDEBUG(1180, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy1181; - if (yych != 'c') goto yy57; -yy1181: - YYDEBUG(1181, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych == 'O') goto yy1182; - if (yych <= 'R') goto yy1118; - goto yy1143; - } else { - if (yych <= 'o') { - if (yych <= 'n') goto yy1118; - } else { - if (yych == 's') goto yy1143; - goto yy1118; - } - } -yy1182: - YYDEBUG(1182, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1183; - if (yych != 'n') goto yy57; -yy1183: - YYDEBUG(1183, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1149; - if (yych == 'd') goto yy1149; - goto yy57; -yy1184: - YYDEBUG(1184, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych <= 0x1F) goto yy1118; - goto yy1119; - } else { - if (yych <= 'U') { - if (yych <= 'T') goto yy1118; - } else { - if (yych != 'u') goto yy1118; - } - } - YYDEBUG(1185, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1186; - if (yych != 'r') goto yy57; -yy1186: - YYDEBUG(1186, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1187; - if (yych != 'd') goto yy57; -yy1187: - YYDEBUG(1187, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1188; - if (yych != 'a') goto yy57; -yy1188: - YYDEBUG(1188, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych == 'y') goto yy1124; - goto yy57; -yy1189: - YYDEBUG(1189, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ' ') { - if (yych == '\t') goto yy1119; - if (yych <= 0x1F) goto yy1118; - goto yy1119; - } else { - if (yych <= 'D') { - if (yych <= 'C') goto yy1118; - } else { - if (yych != 'd') goto yy1118; - } - } - YYDEBUG(1190, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1191; - if (yych != 'a') goto yy57; -yy1191: - YYDEBUG(1191, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1124; - if (yych == 'y') goto yy1124; - goto yy57; -yy1192: - YYDEBUG(1192, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1099; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'e') goto yy1193; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1193: - YYDEBUG(1193, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'V') goto yy1100; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'u') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'v') goto yy1194; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1194: - YYDEBUG(1194, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'I') goto yy1101; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'h') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'i') goto yy1195; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1195: - YYDEBUG(1195, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'O') goto yy1102; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'n') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'o') goto yy1196; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1196: - YYDEBUG(1196, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'U') goto yy1103; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'u') goto yy1197; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1197: - YYDEBUG(1197, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1104; - if (yych != 's') goto yy155; - YYDEBUG(1198, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy57; - goto yy1105; - } else { - if (yych == ' ') goto yy1105; - goto yy57; - } - } else { - if (yych <= '/') { - if (yych == '.') goto yy57; - goto yy148; - } else { - if (yych == '_') goto yy148; - goto yy57; - } - } -yy1199: - YYDEBUG(1199, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'G') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'F') goto yy142; - goto yy1213; - } - } else { - if (yych <= 'f') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'g') goto yy1213; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1200: - YYDEBUG(1200, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy142; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'e') goto yy1201; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1201: - YYDEBUG(1201, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'V') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'U') goto yy143; - } - } else { - if (yych <= 'u') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'v') goto yy1202; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1202: - YYDEBUG(1202, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy144; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'e') goto yy1203; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1203: - YYDEBUG(1203, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy145; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'n') goto yy1204; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1204: - YYDEBUG(1204, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'T') goto yy1205; - if (yych != 't') goto yy4; - } -yy1205: - YYDEBUG(1205, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1206; - if (yych != 'h') goto yy57; -yy1206: - YYDEBUG(1206, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '\t') goto yy1207; - if (yych != ' ') goto yy57; -yy1207: - YYDEBUG(1207, *YYCURSOR); - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 11) YYFILL(11); - yych = *YYCURSOR; -yy1208: - YYDEBUG(1208, *YYCURSOR); - if (yych <= 'W') { - if (yych <= 'F') { - if (yych <= ' ') { - if (yych == '\t') goto yy1207; - if (yych <= 0x1F) goto yy57; - goto yy1207; - } else { - if (yych == 'D') goto yy1110; - if (yych <= 'E') goto yy57; - goto yy1111; - } - } else { - if (yych <= 'M') { - if (yych == 'H') goto yy1109; - if (yych <= 'L') goto yy57; - goto yy1108; - } else { - if (yych <= 'S') { - if (yych <= 'R') goto yy57; - goto yy1107; - } else { - if (yych <= 'T') goto yy1114; - if (yych <= 'V') goto yy57; - } - } - } - } else { - if (yych <= 'l') { - if (yych <= 'd') { - if (yych == 'Y') goto yy1112; - if (yych <= 'c') goto yy57; - goto yy1110; - } else { - if (yych <= 'f') { - if (yych <= 'e') goto yy57; - goto yy1111; - } else { - if (yych == 'h') goto yy1109; - goto yy57; - } - } - } else { - if (yych <= 't') { - if (yych <= 'm') goto yy1108; - if (yych <= 'r') goto yy57; - if (yych <= 's') goto yy1107; - goto yy1114; - } else { - if (yych <= 'w') { - if (yych <= 'v') goto yy57; - } else { - if (yych == 'y') goto yy1112; - goto yy57; - } - } - } - } - YYDEBUG(1209, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1210; - if (yych != 'e') goto yy57; -yy1210: - YYDEBUG(1210, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= 'C') goto yy57; - if (yych <= 'D') goto yy1135; - } else { - if (yych <= 'c') goto yy57; - if (yych <= 'd') goto yy1135; - if (yych >= 'f') goto yy57; - } - YYDEBUG(1211, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy1212; - if (yych != 'k') goto yy57; -yy1212: - YYDEBUG(1212, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == 'D') goto yy1144; - if (yych <= 'R') goto yy57; - goto yy1143; - } else { - if (yych <= 'd') { - if (yych <= 'c') goto yy57; - goto yy1144; - } else { - if (yych == 's') goto yy1143; - goto yy57; - } - } -yy1213: - YYDEBUG(1213, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy143; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'h') goto yy1214; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1214: - YYDEBUG(1214, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy144; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 't') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1215: - YYDEBUG(1215, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1207; - goto yy4; - } else { - if (yych <= ' ') goto yy1207; - if (yych == ')') goto yy140; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych == 'H') goto yy1216; - if (yych <= 'Z') goto yy145; - goto yy4; - } else { - if (yych == 'h') goto yy1216; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1216: - YYDEBUG(1216, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy1207; - goto yy4; - } else { - if (yych <= ' ') goto yy1207; - if (yych == ')') goto yy140; - goto yy4; - } -yy1217: - YYDEBUG(1217, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'F') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'G') goto yy1213; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'f') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'g') goto yy1225; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1218: - YYDEBUG(1218, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1201; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'e') goto yy1219; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1219: - YYDEBUG(1219, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'V') goto yy1202; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'u') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'v') goto yy1220; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1220: - YYDEBUG(1220, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1203; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'e') goto yy1221; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1221: - YYDEBUG(1221, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1204; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'n') goto yy1222; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1222: - YYDEBUG(1222, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'T') goto yy1205; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 't') goto yy1223; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1223: - YYDEBUG(1223, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1206; - if (yych != 'h') goto yy155; -yy1224: - YYDEBUG(1224, *YYCURSOR); - yych = *++YYCURSOR; - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= ',') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy57; - goto yy1207; - } else { - if (yych == ' ') goto yy1207; - goto yy57; - } - } else { - if (yych <= '/') { - if (yych == '.') goto yy57; - goto yy148; - } else { - if (yych == '_') goto yy148; - goto yy57; - } - } -yy1225: - YYDEBUG(1225, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy1214; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'h') goto yy1226; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1226: - YYDEBUG(1226, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1215; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 't') goto yy1227; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1227: - YYDEBUG(1227, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy4; - goto yy1207; - } else { - if (yych == ' ') goto yy1207; - goto yy4; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - goto yy148; - } - } - } else { - if (yych <= '^') { - if (yych <= 'G') { - if (yych <= '@') goto yy4; - goto yy145; - } else { - if (yych <= 'H') goto yy1216; - if (yych <= 'Z') goto yy145; - goto yy4; - } - } else { - if (yych <= 'g') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'h') goto yy1228; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1228: - YYDEBUG(1228, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= ')') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1207; - goto yy4; - } else { - if (yych <= ' ') goto yy1207; - if (yych <= '(') goto yy4; - goto yy140; - } - } else { - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy4; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy4; - } - } -yy1229: - YYDEBUG(1229, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'V') { - if (yych <= 'B') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'O') { - if (yych <= 'C') goto yy1245; - goto yy142; - } else { - if (yych <= 'P') goto yy1247; - if (yych <= 'U') goto yy142; - goto yy1246; - } - } - } else { - if (yych <= 'o') { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - goto yy4; - } else { - if (yych == 'c') goto yy1245; - goto yy142; - } - } else { - if (yych <= 'u') { - if (yych <= 'p') goto yy1247; - goto yy142; - } else { - if (yych <= 'v') goto yy1246; - if (yych <= 'z') goto yy142; - goto yy4; - } - } - } -yy1230: - YYDEBUG(1230, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy142; - goto yy1240; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 't') goto yy1240; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1231: - YYDEBUG(1231, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'X') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'W') goto yy142; - goto yy1237; - } - } else { - if (yych <= 'w') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'x') goto yy1237; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1232: - YYDEBUG(1232, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy142; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'n') goto yy1233; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1233: - YYDEBUG(1233, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy167; - goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy143; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy167; - goto yy143; - } else { - if (yych <= 'd') goto yy1234; - if (yych <= 'z') goto yy143; - goto yy167; - } - } -yy1234: - YYDEBUG(1234, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy4; - } else { - if (yych <= 'a') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1235: - YYDEBUG(1235, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'X') goto yy145; - } - } else { - if (yych <= 'x') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'y') goto yy1236; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1236: - YYDEBUG(1236, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == ')') goto yy140; - goto yy167; -yy1237: - YYDEBUG(1237, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1238: - YYDEBUG(1238, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy144; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'h') goto yy1239; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1239: - YYDEBUG(1239, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy4; - goto yy1207; - } else { - if (yych == ' ') goto yy1207; - goto yy4; - } - } else { - if (yych <= 'Z') { - if (yych <= ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy145; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1240: - YYDEBUG(1240, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= ')') { - if (yych <= '(') goto yy167; - goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'T') goto yy143; - } - } else { - if (yych <= 't') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy167; - goto yy143; - } else { - if (yych <= 'u') goto yy1241; - if (yych <= 'z') goto yy143; - goto yy167; - } - } -yy1241: - YYDEBUG(1241, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy144; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'r') goto yy1242; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1242: - YYDEBUG(1242, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy145; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'd') goto yy1243; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1243: - YYDEBUG(1243, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'A') goto yy1244; - if (yych != 'a') goto yy4; - } -yy1244: - YYDEBUG(1244, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy173; - goto yy57; -yy1245: - YYDEBUG(1245, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'N') goto yy143; - goto yy1256; - } - } else { - if (yych <= 'n') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'o') goto yy1256; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1246: - YYDEBUG(1246, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy143; - goto yy1253; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'e') goto yy1253; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1247: - YYDEBUG(1247, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'T') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 't') goto yy1248; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy1248: - YYDEBUG(1248, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'E') goto yy144; - } - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy194; - goto yy144; - } else { - if (yych <= 'e') goto yy1249; - if (yych <= 'z') goto yy144; - goto yy194; - } - } - } -yy1249: - YYDEBUG(1249, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'M') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'L') goto yy145; - } - } else { - if (yych <= 'l') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'm') goto yy1250; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1250: - YYDEBUG(1250, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'B') goto yy1251; - if (yych != 'b') goto yy4; - } -yy1251: - YYDEBUG(1251, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1252; - if (yych != 'e') goto yy57; -yy1252: - YYDEBUG(1252, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych == 'r') goto yy206; - goto yy57; -yy1253: - YYDEBUG(1253, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy144; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'n') goto yy1254; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1254: - YYDEBUG(1254, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy145; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 't') goto yy1255; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1255: - YYDEBUG(1255, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'H') goto yy1206; - if (yych == 'h') goto yy1206; - goto yy4; - } -yy1256: - YYDEBUG(1256, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy144; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'n') goto yy1257; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1257: - YYDEBUG(1257, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy145; - goto yy1216; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'd') goto yy1216; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1258: - YYDEBUG(1258, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - goto yy148; - } - } else { - if (yych <= 'C') { - if (yych <= '@') goto yy4; - if (yych <= 'B') goto yy142; - goto yy1245; - } else { - if (yych == 'P') goto yy1247; - goto yy142; - } - } - } else { - if (yych <= 'b') { - if (yych <= '^') { - if (yych <= 'V') goto yy1246; - if (yych <= 'Z') goto yy142; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - goto yy147; - } - } else { - if (yych <= 'p') { - if (yych <= 'c') goto yy1274; - if (yych <= 'o') goto yy147; - goto yy1276; - } else { - if (yych == 'v') goto yy1275; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1259: - YYDEBUG(1259, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1240; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 't') goto yy1269; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1260: - YYDEBUG(1260, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'W') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'X') goto yy1237; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'w') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'x') goto yy1266; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1261: - YYDEBUG(1261, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1233; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'n') goto yy1262; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1262: - YYDEBUG(1262, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1234; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 'd') goto yy1263; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy1263: - YYDEBUG(1263, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1235; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1264; - if (yych <= 'z') goto yy152; - goto yy4; - } - } -yy1264: - YYDEBUG(1264, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'Y') goto yy1236; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'x') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'y') goto yy1265; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1265: - YYDEBUG(1265, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy167; - goto yy148; - } else { - if (yych == '_') goto yy148; - goto yy167; - } - } -yy1266: - YYDEBUG(1266, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1238; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1267; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1267: - YYDEBUG(1267, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy1239; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'h') goto yy1268; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1268: - YYDEBUG(1268, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= ' ') { - if (yych == '\t') goto yy1207; - if (yych <= 0x1F) goto yy4; - goto yy1207; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } - } else { - if (yych <= 'Z') { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1269: - YYDEBUG(1269, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'U') goto yy1241; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 't') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 'u') goto yy1270; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy1270: - YYDEBUG(1270, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy1242; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'r') goto yy1271; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1271: - YYDEBUG(1271, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1243; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'd') goto yy1272; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1272: - YYDEBUG(1272, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1244; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1273; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1273: - YYDEBUG(1273, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy186; - goto yy155; -yy1274: - YYDEBUG(1274, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'O') goto yy1256; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'n') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'o') goto yy1285; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1275: - YYDEBUG(1275, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1253; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'e') goto yy1282; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1276: - YYDEBUG(1276, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'S') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'T') goto yy1248; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 's') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 't') goto yy1277; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy1277: - YYDEBUG(1277, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'D') { - if (yych <= '@') goto yy194; - goto yy144; - } else { - if (yych <= 'E') goto yy1249; - if (yych <= 'Z') goto yy144; - goto yy194; - } - } else { - if (yych <= 'd') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy152; - } else { - if (yych <= 'e') goto yy1278; - if (yych <= 'z') goto yy152; - goto yy194; - } - } - } -yy1278: - YYDEBUG(1278, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'M') goto yy1250; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'l') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'm') goto yy1279; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1279: - YYDEBUG(1279, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'B') goto yy1251; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'b') goto yy1280; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1280: - YYDEBUG(1280, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1252; - if (yych != 'e') goto yy155; - YYDEBUG(1281, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych == 'r') goto yy377; - goto yy155; -yy1282: - YYDEBUG(1282, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1254; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'n') goto yy1283; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1283: - YYDEBUG(1283, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1255; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 't') goto yy1284; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1284: - YYDEBUG(1284, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'H') goto yy1206; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'h') goto yy1224; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1285: - YYDEBUG(1285, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1257; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'n') goto yy1286; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1286: - YYDEBUG(1286, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1216; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'd') goto yy1228; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1287: - YYDEBUG(1287, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'C') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'B') goto yy142; - } - } else { - if (yych <= 'b') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'c') goto yy1288; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1288: - YYDEBUG(1288, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'K') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'J') goto yy143; - } - } else { - if (yych <= 'j') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'k') goto yy1289; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1289: - YYDEBUG(1289, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych == ' ') goto yy1290; - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy4; - goto yy144; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1290: - YYDEBUG(1290, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1291; - if (yych != 'o') goto yy57; -yy1291: - YYDEBUG(1291, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1292; - if (yych != 'f') goto yy57; -yy1292: - YYDEBUG(1292, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ' ') goto yy57; - YYDEBUG(1293, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy1294; - if (yych <= '2') goto yy1296; - if (yych <= '9') goto yy1297; - goto yy57; -yy1294: - YYDEBUG(1294, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1298; - if (yych <= '9') goto yy1297; - goto yy1298; -yy1295: - YYDEBUG(1295, *YYCURSOR); -#line 1091 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("backof | frontof"); - TIMELIB_INIT; - TIMELIB_UNHAVE_TIME(); - TIMELIB_HAVE_TIME(); - - if (*ptr == 'b') { - s->time->h = timelib_get_nr((char **) &ptr, 2); - s->time->i = 15; - } else { - s->time->h = timelib_get_nr((char **) &ptr, 2) - 1; - s->time->i = 45; - } - if (*ptr != '\0' ) { - timelib_eat_spaces((char **) &ptr); - s->time->h += timelib_meridian((char **) &ptr, s->time->h); - } - - TIMELIB_DEINIT; - return TIMELIB_LF_DAY_OF_MONTH; - } -#line 19655 "ext/date/lib/parse_date.c" -yy1296: - YYDEBUG(1296, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1298; - if (yych >= '5') goto yy1298; -yy1297: - YYDEBUG(1297, *YYCURSOR); - yyaccept = 28; - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; -yy1298: - YYDEBUG(1298, *YYCURSOR); - if (yych <= 'A') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1297; - goto yy1295; - } else { - if (yych <= ' ') goto yy1297; - if (yych <= '@') goto yy1295; - } - } else { - if (yych <= '`') { - if (yych != 'P') goto yy1295; - } else { - if (yych <= 'a') goto yy1299; - if (yych != 'p') goto yy1295; - } - } -yy1299: - YYDEBUG(1299, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy57; - } else { - if (yych <= 'M') goto yy1301; - if (yych == 'm') goto yy1301; - goto yy57; - } - YYDEBUG(1300, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1301; - if (yych != 'm') goto yy57; -yy1301: - YYDEBUG(1301, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy1303; - if (yych == '\t') goto yy1303; - goto yy57; - } else { - if (yych <= ' ') goto yy1303; - if (yych != '.') goto yy57; - } - YYDEBUG(1302, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy1303; - if (yych <= 0x08) goto yy57; - } else { - if (yych != ' ') goto yy57; - } -yy1303: - YYDEBUG(1303, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1295; -yy1304: - YYDEBUG(1304, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'C') goto yy1288; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'b') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'c') goto yy1305; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1305: - YYDEBUG(1305, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'J') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'K') goto yy1289; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'j') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'k') goto yy1306; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1306: - YYDEBUG(1306, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= '(') { - if (yych == ' ') goto yy1290; - goto yy4; - } else { - if (yych <= ')') goto yy140; - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '^') { - if (yych <= '/') goto yy148; - if (yych <= '@') goto yy4; - if (yych <= 'Z') goto yy144; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy152; - goto yy4; - } - } -yy1307: - YYDEBUG(1307, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'R') goto yy142; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 's') goto yy1308; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1308: - YYDEBUG(1308, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1309; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1309: - YYDEBUG(1309, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy4; - goto yy1105; - } else { - if (yych != ' ') goto yy4; - } - } else { - if (yych <= 'Z') { - if (yych <= ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy144; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1310: - YYDEBUG(1310, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1311; - if (yych != 'd') goto yy1106; -yy1311: - YYDEBUG(1311, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1312; - if (yych != 'a') goto yy57; -yy1312: - YYDEBUG(1312, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1313; - if (yych != 'y') goto yy57; -yy1313: - YYDEBUG(1313, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych != ' ') goto yy1118; - } else { - if (yych <= 'S') goto yy1143; - if (yych == 's') goto yy1143; - goto yy1118; - } - YYDEBUG(1314, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1315; - if (yych != 'o') goto yy57; -yy1315: - YYDEBUG(1315, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1316; - if (yych != 'f') goto yy57; -yy1316: - YYDEBUG(1316, *YYCURSOR); - yych = *++YYCURSOR; - goto yy2; -yy1317: - YYDEBUG(1317, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy1308; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 's') goto yy1318; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1318: - YYDEBUG(1318, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1309; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1319; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1319: - YYDEBUG(1319, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= ' ') { - if (yych == '\t') goto yy1105; - if (yych <= 0x1F) goto yy4; - goto yy1310; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } - } else { - if (yych <= 'Z') { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1320: - YYDEBUG(1320, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'B') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'A') goto yy142; - goto yy1356; - } - } else { - if (yych <= 'a') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'b') goto yy1356; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1321: - YYDEBUG(1321, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'F') goto yy1346; - if (yych <= 'Q') goto yy142; - goto yy1345; - } - } else { - if (yych <= 'f') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'e') goto yy142; - goto yy1346; - } else { - if (yych == 'r') goto yy1345; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1322: - YYDEBUG(1322, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'T') goto yy142; - goto yy1342; - } - } else { - if (yych <= 't') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'u') goto yy1342; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1323: - YYDEBUG(1323, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'I') goto yy1325; - if (yych <= 'N') goto yy142; - } - } else { - if (yych <= 'i') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'h') goto yy142; - goto yy1325; - } else { - if (yych == 'o') goto yy1324; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1324: - YYDEBUG(1324, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy143; - goto yy1328; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'n') goto yy1328; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1325: - YYDEBUG(1325, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy167; - goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy143; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy167; - goto yy143; - } else { - if (yych <= 'd') goto yy1326; - if (yych <= 'z') goto yy143; - goto yy167; - } - } -yy1326: - YYDEBUG(1326, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy4; - } else { - if (yych <= 'a') goto yy1327; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1327: - YYDEBUG(1327, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'X') goto yy145; - goto yy1236; - } - } else { - if (yych <= 'x') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'y') goto yy1236; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1328: - YYDEBUG(1328, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy144; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 't') goto yy1329; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1329: - YYDEBUG(1329, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych == ' ') goto yy1330; - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= 'Z') { - if (yych <= '@') goto yy4; - goto yy145; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1330: - YYDEBUG(1330, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1331; - if (yych != 'o') goto yy57; -yy1331: - YYDEBUG(1331, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1332; - if (yych != 'f') goto yy57; -yy1332: - YYDEBUG(1332, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != ' ') goto yy57; - YYDEBUG(1333, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '1') goto yy1334; - if (yych <= '2') goto yy1335; - if (yych <= '9') goto yy1336; - goto yy57; -yy1334: - YYDEBUG(1334, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1337; - if (yych <= '9') goto yy1336; - goto yy1337; -yy1335: - YYDEBUG(1335, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1337; - if (yych >= '5') goto yy1337; -yy1336: - YYDEBUG(1336, *YYCURSOR); - yyaccept = 28; - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); - yych = *YYCURSOR; -yy1337: - YYDEBUG(1337, *YYCURSOR); - if (yych <= 'A') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1336; - goto yy1295; - } else { - if (yych <= ' ') goto yy1336; - if (yych <= '@') goto yy1295; - } - } else { - if (yych <= '`') { - if (yych != 'P') goto yy1295; - } else { - if (yych <= 'a') goto yy1338; - if (yych != 'p') goto yy1295; - } - } -yy1338: - YYDEBUG(1338, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy57; - } else { - if (yych <= 'M') goto yy1340; - if (yych == 'm') goto yy1340; - goto yy57; - } - YYDEBUG(1339, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1340; - if (yych != 'm') goto yy57; -yy1340: - YYDEBUG(1340, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 0x1F) { - if (yych <= 0x00) goto yy1303; - if (yych == '\t') goto yy1303; - goto yy57; - } else { - if (yych <= ' ') goto yy1303; - if (yych != '.') goto yy57; - } - YYDEBUG(1341, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '\t') { - if (yych <= 0x00) goto yy1303; - if (yych <= 0x08) goto yy57; - goto yy1303; - } else { - if (yych == ' ') goto yy1303; - goto yy57; - } -yy1342: - YYDEBUG(1342, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy143; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'r') goto yy1343; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1343: - YYDEBUG(1343, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy144; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 't') goto yy1344; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1344: - YYDEBUG(1344, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy145; - goto yy1216; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'h') goto yy1216; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1345: - YYDEBUG(1345, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'R') goto yy143; - goto yy1348; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 's') goto yy1348; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1346: - YYDEBUG(1346, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1347; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1347: - YYDEBUG(1347, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy144; - goto yy1239; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'h') goto yy1239; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1348: - YYDEBUG(1348, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy144; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 't') goto yy1349; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1349: - YYDEBUG(1349, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy4; - goto yy1207; - } else { - if (yych != ' ') goto yy4; - } - } else { - if (yych <= 'Z') { - if (yych <= ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy145; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1350: - YYDEBUG(1350, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1351; - if (yych != 'd') goto yy1208; -yy1351: - YYDEBUG(1351, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1352; - if (yych != 'a') goto yy57; -yy1352: - YYDEBUG(1352, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1353; - if (yych != 'y') goto yy57; -yy1353: - YYDEBUG(1353, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych != ' ') goto yy1118; - } else { - if (yych <= 'S') goto yy1143; - if (yych == 's') goto yy1143; - goto yy1118; - } - YYDEBUG(1354, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1355; - if (yych != 'o') goto yy57; -yy1355: - YYDEBUG(1355, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1316; - if (yych == 'f') goto yy1316; - goto yy57; -yy1356: - YYDEBUG(1356, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'R') goto yy143; - } - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'r') goto yy1357; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy1357: - YYDEBUG(1357, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'T') goto yy144; - } - } else { - if (yych <= 't') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'u') goto yy1358; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1358: - YYDEBUG(1358, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy145; - goto yy4; - } else { - if (yych <= 'a') goto yy1359; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1359: - YYDEBUG(1359, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'R') goto yy1360; - if (yych != 'r') goto yy4; - } -yy1360: - YYDEBUG(1360, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy206; - if (yych == 'y') goto yy206; - goto yy57; -yy1361: - YYDEBUG(1361, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'B') goto yy1356; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'b') goto yy1379; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1362: - YYDEBUG(1362, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych <= '/') goto yy148; - goto yy4; - } else { - if (yych == 'F') goto yy1346; - goto yy142; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'R') goto yy1345; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'q') { - if (yych == 'f') goto yy1375; - goto yy147; - } else { - if (yych <= 'r') goto yy1374; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1363: - YYDEBUG(1363, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'U') goto yy1342; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 't') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'u') goto yy1371; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1364: - YYDEBUG(1364, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych <= '/') goto yy148; - goto yy4; - } else { - if (yych == 'I') goto yy1325; - goto yy142; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'O') goto yy1324; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'n') { - if (yych == 'i') goto yy1366; - goto yy147; - } else { - if (yych <= 'o') goto yy1365; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1365: - YYDEBUG(1365, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1328; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'n') goto yy1369; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1366: - YYDEBUG(1366, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1326; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 'd') goto yy1367; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy1367: - YYDEBUG(1367, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1327; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1368; - if (yych <= 'z') goto yy152; - goto yy4; - } - } -yy1368: - YYDEBUG(1368, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'Y') goto yy1236; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'x') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'y') goto yy1265; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1369: - YYDEBUG(1369, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1329; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 't') goto yy1370; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1370: - YYDEBUG(1370, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= '(') { - if (yych == ' ') goto yy1330; - goto yy4; - } else { - if (yych <= ')') goto yy140; - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '^') { - if (yych <= '/') goto yy148; - if (yych <= '@') goto yy4; - if (yych <= 'Z') goto yy145; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy153; - goto yy4; - } - } -yy1371: - YYDEBUG(1371, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy1343; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'r') goto yy1372; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1372: - YYDEBUG(1372, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1344; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 't') goto yy1373; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1373: - YYDEBUG(1373, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy1216; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'h') goto yy1228; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1374: - YYDEBUG(1374, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy1348; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 's') goto yy1377; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1375: - YYDEBUG(1375, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1347; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1376; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1376: - YYDEBUG(1376, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy1239; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'h') goto yy1268; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1377: - YYDEBUG(1377, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1349; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 't') goto yy1378; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1378: - YYDEBUG(1378, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= ' ') { - if (yych == '\t') goto yy1207; - if (yych <= 0x1F) goto yy4; - goto yy1350; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } - } else { - if (yych <= 'Z') { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1379: - YYDEBUG(1379, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'Q') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'R') goto yy1357; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'q') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'r') goto yy1380; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy1380: - YYDEBUG(1380, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'U') goto yy1358; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 't') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'u') goto yy1381; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1381: - YYDEBUG(1381, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1359; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1382; - if (yych <= 'z') goto yy153; - goto yy4; - } - } -yy1382: - YYDEBUG(1382, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'R') goto yy1360; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'r') goto yy1383; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1383: - YYDEBUG(1383, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy206; - if (yych == 'y') goto yy377; - goto yy155; -yy1384: - YYDEBUG(1384, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; -yy1385: - YYDEBUG(1385, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - YYDEBUG(1386, *YYCURSOR); - if (yych <= '/') goto yy1387; - if (yych <= '9') goto yy1385; -yy1387: - YYDEBUG(1387, *YYCURSOR); -#line 1049 "ext/date/lib/parse_date.re" - { - timelib_ull i; - - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_DATE(); - TIMELIB_UNHAVE_TIME(); - TIMELIB_HAVE_TZ(); - - i = timelib_get_unsigned_nr((char **) &ptr, 24); - s->time->y = 1970; - s->time->m = 1; - s->time->d = 1; - s->time->h = s->time->i = s->time->s = 0; - s->time->f = 0.0; - s->time->relative.s += i; - s->time->is_localtime = 1; - s->time->zone_type = TIMELIB_ZONETYPE_OFFSET; - s->time->z = 0; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 21370 "ext/date/lib/parse_date.c" -yy1388: - YYDEBUG(1388, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy142; - goto yy1429; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'n') goto yy1429; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1389: - YYDEBUG(1389, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'U') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'I') goto yy1421; - if (yych <= 'T') goto yy142; - goto yy1422; - } - } else { - if (yych <= 'i') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'h') goto yy142; - goto yy1421; - } else { - if (yych == 'u') goto yy1422; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1390: - YYDEBUG(1390, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'M') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'D') goto yy1410; - if (yych <= 'L') goto yy142; - goto yy1411; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'c') goto yy142; - goto yy1410; - } else { - if (yych == 'm') goto yy1411; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1391: - YYDEBUG(1391, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy142; - goto yy1406; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'e') goto yy1406; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1392: - YYDEBUG(1392, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy142; - goto yy1402; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'e') goto yy1402; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1393: - YYDEBUG(1393, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy1065; - goto yy57; - } else { - if (yych <= '9') goto yy1396; - if (yych <= ':') goto yy1065; - goto yy57; - } -yy1394: - YYDEBUG(1394, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy1065; - goto yy57; - } else { - if (yych <= '4') goto yy1396; - if (yych == ':') goto yy1065; - goto yy57; - } -yy1395: - YYDEBUG(1395, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '.') goto yy1065; - if (yych == ':') goto yy1065; - goto yy57; -yy1396: - YYDEBUG(1396, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy1065; - goto yy57; - } else { - if (yych <= '5') goto yy1397; - if (yych == ':') goto yy1065; - goto yy57; - } -yy1397: - YYDEBUG(1397, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych >= ':') goto yy57; - YYDEBUG(1398, *YYCURSOR); - yyaccept = 24; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1068; - if (yych <= '5') goto yy1399; - if (yych <= '6') goto yy1400; - goto yy1068; -yy1399: - YYDEBUG(1399, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy57; - if (yych <= '9') goto yy1401; - goto yy57; -yy1400: - YYDEBUG(1400, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy57; -yy1401: - YYDEBUG(1401, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1076; -yy1402: - YYDEBUG(1402, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'K') goto yy143; - } - } else { - if (yych <= 'k') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'l') goto yy1403; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1403: - YYDEBUG(1403, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'F') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'E') goto yy144; - } - } else { - if (yych <= 'e') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'f') goto yy1404; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1404: - YYDEBUG(1404, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy145; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 't') goto yy1405; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1405: - YYDEBUG(1405, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'H') goto yy1206; - if (yych == 'h') goto yy1206; - goto yy4; - } -yy1406: - YYDEBUG(1406, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy167; - goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'R') goto yy143; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy167; - goto yy143; - } else { - if (yych <= 's') goto yy1407; - if (yych <= 'z') goto yy143; - goto yy167; - } - } -yy1407: - YYDEBUG(1407, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy144; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'd') goto yy1408; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1408: - YYDEBUG(1408, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy145; - goto yy4; - } else { - if (yych <= 'a') goto yy1409; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1409: - YYDEBUG(1409, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'X') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Y') goto yy173; - if (yych == 'y') goto yy173; - goto yy4; - } -yy1410: - YYDEBUG(1410, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy1418; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy4; - } else { - if (yych <= 'a') goto yy1418; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1411: - YYDEBUG(1411, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'O') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'N') goto yy143; - } - } else { - if (yych <= 'n') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'o') goto yy1412; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1412: - YYDEBUG(1412, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy144; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'r') goto yy1413; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1413: - YYDEBUG(1413, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy145; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'r') goto yy1414; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1414: - YYDEBUG(1414, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'O') goto yy1415; - if (yych != 'o') goto yy4; - } -yy1415: - YYDEBUG(1415, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'W') goto yy1416; - if (yych != 'w') goto yy57; -yy1416: - YYDEBUG(1416, *YYCURSOR); - ++YYCURSOR; -yy1417: - YYDEBUG(1417, *YYCURSOR); -#line 1037 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("tomorrow"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - s->time->relative.d = 1; - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 21817 "ext/date/lib/parse_date.c" -yy1418: - YYDEBUG(1418, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'X') goto yy144; - } - } else { - if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'y') goto yy1419; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1419: - YYDEBUG(1419, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy140; - } else { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy1420; - if (yych <= 'z') goto yy145; - } -yy1420: - YYDEBUG(1420, *YYCURSOR); -#line 1027 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("midnight | today"); - TIMELIB_INIT; - TIMELIB_UNHAVE_TIME(); - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 21861 "ext/date/lib/parse_date.c" -yy1421: - YYDEBUG(1421, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'Q') goto yy143; - if (yych <= 'R') goto yy1427; - goto yy1428; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'r') goto yy1427; - if (yych <= 's') goto yy1428; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1422: - YYDEBUG(1422, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy167; - goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'Q') goto yy143; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy167; - goto yy143; - } else { - if (yych <= 'r') goto yy1423; - if (yych <= 'z') goto yy143; - goto yy167; - } - } -yy1423: - YYDEBUG(1423, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'R') goto yy144; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 's') goto yy1424; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1424: - YYDEBUG(1424, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy145; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'd') goto yy1425; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1425: - YYDEBUG(1425, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'A') goto yy1426; - if (yych != 'a') goto yy4; - } -yy1426: - YYDEBUG(1426, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy173; - goto yy57; -yy1427: - YYDEBUG(1427, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy144; - goto yy1239; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'd') goto yy1239; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1428: - YYDEBUG(1428, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy4; - goto yy1105; - } else { - if (yych == ' ') goto yy1105; - goto yy4; - } - } else { - if (yych <= 'Z') { - if (yych <= ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy144; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1429: - YYDEBUG(1429, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1430; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1430: - YYDEBUG(1430, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy144; - goto yy1239; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'h') goto yy1239; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1431: - YYDEBUG(1431, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1429; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'n') goto yy1461; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1432: - YYDEBUG(1432, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych <= '/') goto yy148; - goto yy4; - } else { - if (yych == 'I') goto yy1421; - goto yy142; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'U') goto yy1422; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 't') { - if (yych == 'i') goto yy1453; - goto yy147; - } else { - if (yych <= 'u') goto yy1454; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1433: - YYDEBUG(1433, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych <= '/') goto yy148; - goto yy4; - } else { - if (yych == 'D') goto yy1410; - goto yy142; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'M') goto yy1411; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'l') { - if (yych == 'd') goto yy1444; - goto yy147; - } else { - if (yych <= 'm') goto yy1445; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1434: - YYDEBUG(1434, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1406; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'e') goto yy1440; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1435: - YYDEBUG(1435, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1402; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'e') goto yy1436; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1436: - YYDEBUG(1436, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'K') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'L') goto yy1403; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'k') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'l') goto yy1437; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1437: - YYDEBUG(1437, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'F') goto yy1404; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'e') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'f') goto yy1438; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1438: - YYDEBUG(1438, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1405; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 't') goto yy1439; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1439: - YYDEBUG(1439, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'H') goto yy1206; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'h') goto yy1224; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1440: - YYDEBUG(1440, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy1407; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 's') goto yy1441; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy1441: - YYDEBUG(1441, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1408; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'd') goto yy1442; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1442: - YYDEBUG(1442, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1409; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1443; - if (yych <= 'z') goto yy153; - goto yy4; - } - } -yy1443: - YYDEBUG(1443, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'Y') goto yy173; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'y') goto yy186; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1444: - YYDEBUG(1444, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1418; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1451; - if (yych <= 'z') goto yy151; - goto yy4; - } - } -yy1445: - YYDEBUG(1445, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'O') goto yy1412; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'n') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'o') goto yy1446; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1446: - YYDEBUG(1446, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy1413; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'r') goto yy1447; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1447: - YYDEBUG(1447, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy1414; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'r') goto yy1448; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1448: - YYDEBUG(1448, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'O') goto yy1415; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'o') goto yy1449; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1449: - YYDEBUG(1449, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'W') goto yy1416; - if (yych != 'w') goto yy155; - YYDEBUG(1450, *YYCURSOR); - yyaccept = 29; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy1417; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy1417; - } -yy1451: - YYDEBUG(1451, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'Y') goto yy1419; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'x') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'y') goto yy1452; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1452: - YYDEBUG(1452, *YYCURSOR); - yyaccept = 30; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy1420; - } else { - if (yych == '.') goto yy1420; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy1420; - if (yych <= 'Z') goto yy145; - goto yy1420; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy1420; - if (yych <= 'z') goto yy153; - goto yy1420; - } - } -yy1453: - YYDEBUG(1453, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych <= '/') { - if (yych <= '.') goto yy4; - goto yy148; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy143; - goto yy1427; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'S') goto yy1428; - goto yy143; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'r') { - if (yych <= 'q') goto yy151; - goto yy1459; - } else { - if (yych <= 's') goto yy1460; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1454: - YYDEBUG(1454, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy1423; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 'r') goto yy1455; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy1455: - YYDEBUG(1455, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy1424; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 's') goto yy1456; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1456: - YYDEBUG(1456, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1425; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'd') goto yy1457; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1457: - YYDEBUG(1457, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1426; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1458; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1458: - YYDEBUG(1458, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy186; - goto yy155; -yy1459: - YYDEBUG(1459, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1239; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'd') goto yy1268; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1460: - YYDEBUG(1460, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= ' ') { - if (yych == '\t') goto yy1105; - if (yych <= 0x1F) goto yy4; - goto yy1105; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } - } else { - if (yych <= 'Z') { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1461: - YYDEBUG(1461, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1430; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1462; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1462: - YYDEBUG(1462, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy1239; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'h') goto yy1268; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1463: - YYDEBUG(1463, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych <= '@') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == 'R') goto yy1475; - if (yych <= 'X') goto yy142; - goto yy1476; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'q') goto yy142; - goto yy1475; - } else { - if (yych == 'y') goto yy1476; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1464: - YYDEBUG(1464, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'C') goto yy142; - goto yy1469; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'd') goto yy1469; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1465: - YYDEBUG(1465, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy142; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'n') goto yy1466; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1466: - YYDEBUG(1466, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'D') { - if (yych <= ')') { - if (yych <= '(') goto yy167; - goto yy140; - } else { - if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy143; - } - } else { - if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy167; - goto yy143; - } else { - if (yych <= 'd') goto yy1467; - if (yych <= 'z') goto yy143; - goto yy167; - } - } -yy1467: - YYDEBUG(1467, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy4; - } else { - if (yych <= 'a') goto yy1468; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1468: - YYDEBUG(1468, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'Y') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'X') goto yy145; - goto yy1236; - } - } else { - if (yych <= 'x') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'y') goto yy1236; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1469: - YYDEBUG(1469, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy143; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'n') goto yy1470; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1470: - YYDEBUG(1470, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'I') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'H') goto yy144; - } - } else { - if (yych <= 'h') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'i') goto yy1471; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1471: - YYDEBUG(1471, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'G') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'F') goto yy145; - } - } else { - if (yych <= 'f') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'g') goto yy1472; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1472: - YYDEBUG(1472, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'H') goto yy1473; - if (yych != 'h') goto yy4; - } -yy1473: - YYDEBUG(1473, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1474; - if (yych != 't') goto yy57; -yy1474: - YYDEBUG(1474, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1420; -yy1475: - YYDEBUG(1475, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych == 'C') goto yy1477; - goto yy143; - } - } else { - if (yych <= 'b') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'c') goto yy1477; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy1476: - YYDEBUG(1476, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '-') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy194; - goto yy196; - } else { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy197; - } - } else { - if (yych <= '@') { - if (yych == '/') goto yy194; - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy143; - goto yy194; - } - } -yy1477: - YYDEBUG(1477, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy144; - goto yy396; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'h') goto yy396; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1478: - YYDEBUG(1478, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= '@') { - if (yych <= '/') goto yy148; - goto yy4; - } else { - if (yych == 'R') goto yy1475; - goto yy142; - } - } - } else { - if (yych <= '`') { - if (yych <= 'Z') { - if (yych <= 'Y') goto yy1476; - goto yy142; - } else { - if (yych == '_') goto yy148; - goto yy4; - } - } else { - if (yych <= 'x') { - if (yych == 'r') goto yy1490; - goto yy147; - } else { - if (yych <= 'y') goto yy1491; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1479: - YYDEBUG(1479, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1469; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'd') goto yy1484; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1480: - YYDEBUG(1480, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1466; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'n') goto yy1481; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1481: - YYDEBUG(1481, *YYCURSOR); - yyaccept = 4; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy167; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy167; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'D') goto yy1467; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy167; - goto yy148; - } else { - if (yych <= 'c') { - if (yych <= '`') goto yy167; - goto yy151; - } else { - if (yych <= 'd') goto yy1482; - if (yych <= 'z') goto yy151; - goto yy167; - } - } - } -yy1482: - YYDEBUG(1482, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '_') { - if (yych <= 'A') goto yy1468; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= '`') goto yy4; - if (yych <= 'a') goto yy1483; - if (yych <= 'z') goto yy152; - goto yy4; - } - } -yy1483: - YYDEBUG(1483, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'Y') goto yy1236; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'x') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'y') goto yy1265; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1484: - YYDEBUG(1484, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1470; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'n') goto yy1485; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1485: - YYDEBUG(1485, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'I') goto yy1471; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'h') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'i') goto yy1486; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1486: - YYDEBUG(1486, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'F') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'G') goto yy1472; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'f') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'g') goto yy1487; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1487: - YYDEBUG(1487, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'H') goto yy1473; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'h') goto yy1488; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1488: - YYDEBUG(1488, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1474; - if (yych != 't') goto yy155; - YYDEBUG(1489, *YYCURSOR); - yyaccept = 30; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy1420; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy1420; - } -yy1490: - YYDEBUG(1490, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'B') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'C') goto yy1477; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'b') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'c') goto yy1492; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy1491: - YYDEBUG(1491, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ' ') { - if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy194; - goto yy196; - } else { - if (yych <= ')') { - if (yych <= '(') goto yy194; - goto yy140; - } else { - if (yych <= ',') goto yy194; - if (yych <= '-') goto yy372; - goto yy196; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '/') goto yy148; - if (yych <= '9') goto yy196; - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= '_') { - if (yych <= '^') goto yy194; - goto yy148; - } else { - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy1492: - YYDEBUG(1492, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy396; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'h') goto yy407; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1493: - YYDEBUG(1493, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'W') { - if (yych <= 'N') { - if (yych == ')') goto yy140; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'O') goto yy1501; - if (yych <= 'U') goto yy142; - if (yych <= 'V') goto yy1502; - goto yy1499; - } - } else { - if (yych <= 'o') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - if (yych <= 'n') goto yy142; - goto yy1501; - } else { - if (yych <= 'v') { - if (yych <= 'u') goto yy142; - goto yy1502; - } else { - if (yych <= 'w') goto yy1499; - if (yych <= 'z') goto yy142; - goto yy4; - } - } - } -yy1494: - YYDEBUG(1494, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'X') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'W') goto yy142; - goto yy1498; - } - } else { - if (yych <= 'w') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'x') goto yy1498; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1495: - YYDEBUG(1495, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy142; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 'n') goto yy1496; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1496: - YYDEBUG(1496, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1497; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1497: - YYDEBUG(1497, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'H') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'G') goto yy144; - goto yy1239; - } - } else { - if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'h') goto yy1239; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1498: - YYDEBUG(1498, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - goto yy1428; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1428; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1499: - YYDEBUG(1499, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy140; - } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy1500; - if (yych <= 'z') goto yy143; - } -yy1500: - YYDEBUG(1500, *YYCURSOR); -#line 1006 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("now"); - TIMELIB_INIT; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 23881 "ext/date/lib/parse_date.c" -yy1501: - YYDEBUG(1501, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'N') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'M') goto yy143; - goto yy1507; - } - } else { - if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 'n') goto yy1507; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1502: - YYDEBUG(1502, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= ',') { - if (yych <= ')') goto yy140; - goto yy194; - } else { - if (yych <= '-') goto yy197; - if (yych <= '.') goto yy196; - goto yy194; - } - } - } else { - if (yych <= 'Z') { - if (yych <= '@') { - if (yych <= '9') goto yy196; - goto yy194; - } else { - if (yych != 'E') goto yy143; - } - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy194; - goto yy143; - } else { - if (yych <= 'e') goto yy1503; - if (yych <= 'z') goto yy143; - goto yy194; - } - } - } -yy1503: - YYDEBUG(1503, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'M') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'L') goto yy144; - } - } else { - if (yych <= 'l') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'm') goto yy1504; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1504: - YYDEBUG(1504, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'B') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'A') goto yy145; - } - } else { - if (yych <= 'a') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'b') goto yy1505; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1505: - YYDEBUG(1505, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'E') goto yy1506; - if (yych != 'e') goto yy4; - } -yy1506: - YYDEBUG(1506, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych == 'r') goto yy206; - goto yy57; -yy1507: - YYDEBUG(1507, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy140; - } else { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy1508; - if (yych <= 'z') goto yy144; - } -yy1508: - YYDEBUG(1508, *YYCURSOR); -#line 1015 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("noon"); - TIMELIB_INIT; - TIMELIB_UNHAVE_TIME(); - TIMELIB_HAVE_TIME(); - s->time->h = 12; - - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 24031 "ext/date/lib/parse_date.c" -yy1509: - YYDEBUG(1509, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= '.') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych == '-') goto yy148; - goto yy4; - } - } else { - if (yych <= 'N') { - if (yych <= '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } else { - if (yych <= 'O') goto yy1501; - if (yych <= 'U') goto yy142; - goto yy1502; - } - } - } else { - if (yych <= 'n') { - if (yych <= '^') { - if (yych <= 'W') goto yy1499; - if (yych <= 'Z') goto yy142; - goto yy4; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy4; - goto yy147; - } - } else { - if (yych <= 'v') { - if (yych <= 'o') goto yy1516; - if (yych <= 'u') goto yy147; - goto yy1517; - } else { - if (yych <= 'w') goto yy1515; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1510: - YYDEBUG(1510, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'W') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'X') goto yy1498; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'w') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'x') goto yy1514; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1511: - YYDEBUG(1511, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1496; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 'n') goto yy1512; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1512: - YYDEBUG(1512, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1497; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1513; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1513: - YYDEBUG(1513, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'H') goto yy1239; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'g') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'h') goto yy1268; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1514: - YYDEBUG(1514, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1428; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1460; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1515: - YYDEBUG(1515, *YYCURSOR); - yyaccept = 31; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy1500; - } else { - if (yych == '.') goto yy1500; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy1500; - if (yych <= 'Z') goto yy143; - goto yy1500; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy1500; - if (yych <= 'z') goto yy151; - goto yy1500; - } - } -yy1516: - YYDEBUG(1516, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'N') goto yy1507; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'm') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 'n') goto yy1522; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1517: - YYDEBUG(1517, *YYCURSOR); - yyaccept = 5; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '9') { - if (yych <= '(') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy194; - goto yy196; - } else { - if (yych == ' ') goto yy196; - goto yy194; - } - } else { - if (yych <= '-') { - if (yych <= ')') goto yy140; - if (yych <= ',') goto yy194; - goto yy372; - } else { - if (yych == '/') goto yy148; - goto yy196; - } - } - } else { - if (yych <= '^') { - if (yych <= 'D') { - if (yych <= '@') goto yy194; - goto yy143; - } else { - if (yych <= 'E') goto yy1503; - if (yych <= 'Z') goto yy143; - goto yy194; - } - } else { - if (yych <= 'd') { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy194; - goto yy151; - } else { - if (yych <= 'e') goto yy1518; - if (yych <= 'z') goto yy151; - goto yy194; - } - } - } -yy1518: - YYDEBUG(1518, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'M') goto yy1504; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'l') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'm') goto yy1519; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1519: - YYDEBUG(1519, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'B') goto yy1505; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'a') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'b') goto yy1520; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1520: - YYDEBUG(1520, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'E') goto yy1506; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'e') goto yy1521; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1521: - YYDEBUG(1521, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych == 'r') goto yy377; - goto yy155; -yy1522: - YYDEBUG(1522, *YYCURSOR); - yyaccept = 32; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy1508; - } else { - if (yych == '.') goto yy1508; - goto yy148; - } - } else { - if (yych <= '^') { - if (yych <= '@') goto yy1508; - if (yych <= 'Z') goto yy144; - goto yy1508; - } else { - if (yych <= '_') goto yy148; - if (yych <= '`') goto yy1508; - if (yych <= 'z') goto yy152; - goto yy1508; - } - } -yy1523: - YYDEBUG(1523, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'R') goto yy142; - } - } else { - if (yych <= 'r') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy4; - goto yy142; - } else { - if (yych <= 's') goto yy1524; - if (yych <= 'z') goto yy142; - goto yy4; - } - } -yy1524: - YYDEBUG(1524, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'T') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'S') goto yy143; - } - } else { - if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy4; - goto yy143; - } else { - if (yych <= 't') goto yy1525; - if (yych <= 'z') goto yy143; - goto yy4; - } - } -yy1525: - YYDEBUG(1525, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'D') goto yy144; - } - } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy4; - goto yy144; - } else { - if (yych <= 'e') goto yy1526; - if (yych <= 'z') goto yy144; - goto yy4; - } - } -yy1526: - YYDEBUG(1526, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'R') { - if (yych <= ')') { - if (yych <= '(') goto yy4; - goto yy140; - } else { - if (yych <= '@') goto yy4; - if (yych <= 'Q') goto yy145; - } - } else { - if (yych <= 'q') { - if (yych <= 'Z') goto yy145; - if (yych <= '`') goto yy4; - goto yy145; - } else { - if (yych <= 'r') goto yy1527; - if (yych <= 'z') goto yy145; - goto yy4; - } - } -yy1527: - YYDEBUG(1527, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych <= 'D') goto yy1528; - if (yych != 'd') goto yy4; - } -yy1528: - YYDEBUG(1528, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1529; - if (yych != 'a') goto yy57; -yy1529: - YYDEBUG(1529, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1530; - if (yych != 'y') goto yy57; -yy1530: - YYDEBUG(1530, *YYCURSOR); - ++YYCURSOR; -yy1531: - YYDEBUG(1531, *YYCURSOR); -#line 994 "ext/date/lib/parse_date.re" - { - DEBUG_OUTPUT("yesterday"); - TIMELIB_INIT; - TIMELIB_HAVE_RELATIVE(); - TIMELIB_UNHAVE_TIME(); - - s->time->relative.d = -1; - TIMELIB_DEINIT; - return TIMELIB_RELATIVE; - } -#line 24575 "ext/date/lib/parse_date.c" -yy1532: - YYDEBUG(1532, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy142; - } - } else { - if (yych <= '_') { - if (yych <= 'S') goto yy1524; - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'r') { - if (yych <= '`') goto yy4; - goto yy147; - } else { - if (yych <= 's') goto yy1533; - if (yych <= 'z') goto yy147; - goto yy4; - } - } - } -yy1533: - YYDEBUG(1533, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy143; - } - } else { - if (yych <= '_') { - if (yych <= 'T') goto yy1525; - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 's') { - if (yych <= '`') goto yy4; - goto yy151; - } else { - if (yych <= 't') goto yy1534; - if (yych <= 'z') goto yy151; - goto yy4; - } - } - } -yy1534: - YYDEBUG(1534, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy144; - } - } else { - if (yych <= '_') { - if (yych <= 'E') goto yy1526; - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'd') { - if (yych <= '`') goto yy4; - goto yy152; - } else { - if (yych <= 'e') goto yy1535; - if (yych <= 'z') goto yy152; - goto yy4; - } - } - } -yy1535: - YYDEBUG(1535, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Q') { - if (yych <= '-') { - if (yych == ')') goto yy140; - if (yych <= ',') goto yy4; - goto yy148; - } else { - if (yych == '/') goto yy148; - if (yych <= '@') goto yy4; - goto yy145; - } - } else { - if (yych <= '_') { - if (yych <= 'R') goto yy1527; - if (yych <= 'Z') goto yy145; - if (yych <= '^') goto yy4; - goto yy148; - } else { - if (yych <= 'q') { - if (yych <= '`') goto yy4; - goto yy153; - } else { - if (yych <= 'r') goto yy1536; - if (yych <= 'z') goto yy153; - goto yy4; - } - } - } -yy1536: - YYDEBUG(1536, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= ',') { - if (yych == ')') goto yy140; - goto yy4; - } else { - if (yych == '.') goto yy4; - if (yych <= '/') goto yy148; - goto yy4; - } - } else { - if (yych <= '`') { - if (yych <= 'D') goto yy1528; - if (yych == '_') goto yy148; - goto yy4; - } else { - if (yych == 'd') goto yy1537; - if (yych <= 'z') goto yy154; - goto yy4; - } - } -yy1537: - YYDEBUG(1537, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1529; - if (yych != 'a') goto yy155; - YYDEBUG(1538, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy1530; - if (yych != 'y') goto yy155; - YYDEBUG(1539, *YYCURSOR); - yyaccept = 33; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 16) { - goto yy154; - } - if (yych <= '.') { - if (yych == '-') goto yy148; - goto yy1531; - } else { - if (yych <= '/') goto yy148; - if (yych == '_') goto yy148; - goto yy1531; - } -} -#line 1755 "ext/date/lib/parse_date.re" - -} - -#define YYMAXFILL 31 - -timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb) -{ - Scanner in; - int t; - char *e = s + len - 1; - - memset(&in, 0, sizeof(in)); - in.errors = malloc(sizeof(struct timelib_error_container)); - in.errors->warning_count = 0; - in.errors->warning_messages = NULL; - in.errors->error_count = 0; - in.errors->error_messages = NULL; - - if (len > 0) { - while (isspace(*s) && s < e) { - s++; - } - while (isspace(*e) && e > s) { - e--; - } - } - if (e - s < 0) { - in.time = timelib_time_ctor(); - add_error(&in, "Empty string"); - if (errors) { - *errors = in.errors; - } else { - timelib_error_container_dtor(in.errors); - } - in.time->y = in.time->d = in.time->m = in.time->h = in.time->i = in.time->s = in.time->f = in.time->dst = in.time->z = TIMELIB_UNSET; - in.time->is_localtime = in.time->zone_type = 0; - return in.time; - } - e++; - - in.str = malloc((e - s) + YYMAXFILL); - memset(in.str, 0, (e - s) + YYMAXFILL); - memcpy(in.str, s, (e - s)); - in.lim = in.str + (e - s) + YYMAXFILL; - in.cur = in.str; - in.time = timelib_time_ctor(); - in.time->y = TIMELIB_UNSET; - in.time->d = TIMELIB_UNSET; - in.time->m = TIMELIB_UNSET; - in.time->h = TIMELIB_UNSET; - in.time->i = TIMELIB_UNSET; - in.time->s = TIMELIB_UNSET; - in.time->f = TIMELIB_UNSET; - in.time->z = TIMELIB_UNSET; - in.time->dst = TIMELIB_UNSET; - in.tzdb = tzdb; - in.time->is_localtime = 0; - in.time->zone_type = 0; - - do { - t = scan(&in); -#ifdef DEBUG_PARSER - printf("%d\n", t); -#endif - } while(t != EOI); - - /* do funky checking whether the parsed time was valid time */ - if (in.time->have_time && !timelib_valid_time( in.time->h, in.time->i, in.time->s)) { - add_warning(&in, "The parsed time was invalid"); - } - /* do funky checking whether the parsed date was valid date */ - if (in.time->have_date && !timelib_valid_date( in.time->y, in.time->m, in.time->d)) { - add_warning(&in, "The parsed date was invalid"); - } - - free(in.str); - if (errors) { - *errors = in.errors; - } else { - timelib_error_container_dtor(in.errors); - } - return in.time; -} - -#define TIMELIB_CHECK_NUMBER \ - if (strchr("0123456789", *ptr) == NULL) \ - { \ - add_pbf_error(s, "Unexpected data found.", string, begin); \ - } - -static void timelib_time_reset_fields(timelib_time *time) -{ - assert(time != NULL); - - time->y = 1970; - time->m = 1; - time->d = 1; - time->h = time->i = time->s = 0; - time->f = 0.0; - time->tz_info = NULL; -} - -static void timelib_time_reset_unset_fields(timelib_time *time) -{ - assert(time != NULL); - - if (time->y == TIMELIB_UNSET ) time->y = 1970; - if (time->m == TIMELIB_UNSET ) time->m = 1; - if (time->d == TIMELIB_UNSET ) time->d = 1; - if (time->h == TIMELIB_UNSET ) time->h = 0; - if (time->i == TIMELIB_UNSET ) time->i = 0; - if (time->s == TIMELIB_UNSET ) time->s = 0; - if (time->f == TIMELIB_UNSET ) time->f = 0.0; -} - -timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb) -{ - char *fptr = format; - char *ptr = string; - char *begin; - timelib_sll tmp; - Scanner in; - Scanner *s = ∈ - - memset(&in, 0, sizeof(in)); - in.errors = malloc(sizeof(struct timelib_error_container)); - in.errors->warning_count = 0; - in.errors->warning_messages = NULL; - in.errors->error_count = 0; - in.errors->error_messages = NULL; - - in.time = timelib_time_ctor(); - in.time->y = TIMELIB_UNSET; - in.time->d = TIMELIB_UNSET; - in.time->m = TIMELIB_UNSET; - in.time->h = TIMELIB_UNSET; - in.time->i = TIMELIB_UNSET; - in.time->s = TIMELIB_UNSET; - in.time->f = TIMELIB_UNSET; - in.time->z = TIMELIB_UNSET; - in.time->dst = TIMELIB_UNSET; - in.tzdb = tzdb; - in.time->is_localtime = 0; - in.time->zone_type = 0; - - /* Loop over the format string */ - while (*fptr && *ptr) { - begin = ptr; - switch (*fptr) { - case 'D': /* three letter day */ - case 'l': /* full day */ - if (!timelib_lookup_relunit((char **) &ptr)) { - add_pbf_error(s, "A textual day could not be found", string, begin); - } - break; - case 'd': /* two digit day, with leading zero */ - case 'j': /* two digit day, without leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->d = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit day could not be found", string, begin); - } - break; - case 'S': /* day suffix, ignored, nor checked */ - timelib_skip_day_suffix((char **) &ptr); - break; - case 'z': /* day of year - resets month (0 based) */ - TIMELIB_CHECK_NUMBER; - if ((tmp = timelib_get_nr((char **) &ptr, 3)) == TIMELIB_UNSET) { - add_pbf_error(s, "A three digit day-of-year could not be found", string, begin); - } else { - s->time->m = 1; - s->time->d = tmp + 1; - } - break; - - case 'm': /* two digit month, with leading zero */ - case 'n': /* two digit month, without leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->m = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit month could not be found", string, begin); - } - break; - case 'M': /* three letter month */ - case 'F': /* full month */ - tmp = timelib_lookup_month((char **) &ptr); - if (!tmp) { - add_pbf_error(s, "A textual month could not be found", string, begin); - } else { - s->time->m = tmp; - } - break; - case 'y': /* two digit year */ - TIMELIB_CHECK_NUMBER; - if ((s->time->y = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit year could not be found", string, begin); - } - TIMELIB_PROCESS_YEAR(s->time->y); - break; - case 'Y': /* four digit year */ - TIMELIB_CHECK_NUMBER; - if ((s->time->y = timelib_get_nr((char **) &ptr, 4)) == TIMELIB_UNSET) { - add_pbf_error(s, "A four digit year could not be found", string, begin); - } - break; - case 'g': /* two digit hour, with leading zero */ - case 'h': /* two digit hour, without leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->h = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit hour could not be found", string, begin); - } - if (s->time->h > 12) { - add_pbf_error(s, "Hour can not be higher than 12", string, begin); - } - break; - case 'G': /* two digit hour, with leading zero */ - case 'H': /* two digit hour, without leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->h = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit hour could not be found", string, begin); - } - break; - case 'a': /* am/pm/a.m./p.m. */ - case 'A': /* AM/PM/A.M./P.M. */ - if (s->time->h == TIMELIB_UNSET) { - add_pbf_error(s, "Meridian can only come after an hour has been found", string, begin); - } else if ((tmp = timelib_meridian_with_check((char **) &ptr, s->time->h)) == TIMELIB_UNSET) { - add_pbf_error(s, "A meridian could not be found", string, begin); - } else { - s->time->h += tmp; - } - break; - case 'i': /* two digit minute, with leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->i = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit minute could not be found", string, begin); - } - break; - case 's': /* two digit second, with leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->s = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit second could not be found", string, begin); - } - break; - case 'u': /* up to six digit millisecond */ - { - double f; - char *tptr; - - TIMELIB_CHECK_NUMBER; - tptr = ptr; - if ((f = timelib_get_nr((char **) &ptr, 6)) == TIMELIB_UNSET || (ptr - tptr < 1)) { - add_pbf_error(s, "A six digit millisecond could not be found", string, begin); - } else { - s->time->f = (f / pow(10, (ptr - tptr))); - } - } - break; - case ' ': /* any sort of whitespace (' ' and \t) */ - timelib_eat_spaces((char **) &ptr); - break; - case 'U': /* epoch seconds */ - TIMELIB_CHECK_NUMBER; - TIMELIB_HAVE_RELATIVE(); - tmp = timelib_get_unsigned_nr((char **) &ptr, 24); - s->time->y = 1970; - s->time->m = 1; - s->time->d = 1; - s->time->h = s->time->i = s->time->s = 0; - s->time->f = 0.0; - s->time->relative.s += tmp; - s->time->is_localtime = 1; - s->time->zone_type = TIMELIB_ZONETYPE_OFFSET; - s->time->z = 0; - break; - - case 'e': /* timezone */ - case 'P': /* timezone */ - case 'T': /* timezone */ - case 'O': /* timezone */ - { - int tz_not_found; - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); - if (tz_not_found) { - add_pbf_error(s, "The timezone could not be found in the database", string, begin); - } - } - break; - - case '#': /* separation symbol */ - if (*ptr == ';' || *ptr == ':' || *ptr == '/' || *ptr == '.' || *ptr == ',' || *ptr == '-' || *ptr == '(' || *ptr == ')') { - ++ptr; - } else { - add_pbf_error(s, "The separation symbol ([;:/.,-]) could not be found", string, begin); - } - break; - - case ';': - case ':': - case '/': - case '.': - case ',': - case '-': - case '(': - case ')': - if (*ptr == *fptr) { - ++ptr; - } else { - add_pbf_error(s, "The separation symbol could not be found", string, begin); - } - break; - - case '!': /* reset all fields to default */ - timelib_time_reset_fields(s->time); - break; /* break intentionally not missing */ - - case '|': /* reset all fields to default when not set */ - timelib_time_reset_unset_fields(s->time); - break; /* break intentionally not missing */ - - case '?': /* random char */ - ++ptr; - break; - - case '\\': /* escaped char */ - *fptr++; - if (*ptr == *fptr) { - ++ptr; - } else { - add_pbf_error(s, "The escaped character could not be found", string, begin); - } - break; - - case '*': /* random chars until a separator or number ([ \t.,:;/-0123456789]) */ - timelib_eat_until_separator((char **) &ptr); - break; - - default: - if (*fptr != *ptr) { - add_pbf_error(s, "The format separator does not match", string, begin); - } - ptr++; - } - fptr++; - } - if (*ptr) { - add_pbf_error(s, "Trailing data", string, ptr); - } - if (*fptr) { - /* Trailing | and ! specifiers are valid. */ - while (*fptr) { - switch (*fptr++) { - case '!': /* reset all fields to default */ - timelib_time_reset_fields(s->time); - break; - - case '|': /* reset all fields to default when not set */ - timelib_time_reset_unset_fields(s->time); - break; - - default: - add_pbf_error(s, "Data missing", string, ptr); - } - } - } - - /* clean up a bit */ - if (s->time->h != TIMELIB_UNSET || s->time->i != TIMELIB_UNSET || s->time->s != TIMELIB_UNSET) { - if (s->time->h == TIMELIB_UNSET ) { - s->time->h = 0; - } - if (s->time->i == TIMELIB_UNSET ) { - s->time->i = 0; - } - if (s->time->s == TIMELIB_UNSET ) { - s->time->s = 0; - } - } - - /* do funky checking whether the parsed time was valid time */ - if (s->time->h != TIMELIB_UNSET && s->time->i != TIMELIB_UNSET && - s->time->s != TIMELIB_UNSET && - !timelib_valid_time( s->time->h, s->time->i, s->time->s)) { - add_pbf_warning(s, "The parsed time was invalid", string, ptr); - } - /* do funky checking whether the parsed date was valid date */ - if (s->time->y != TIMELIB_UNSET && s->time->m != TIMELIB_UNSET && - s->time->d != TIMELIB_UNSET && - !timelib_valid_date( s->time->y, s->time->m, s->time->d)) { - add_pbf_warning(s, "The parsed date was invalid", string, ptr); - } - - if (errors) { - *errors = in.errors; - } else { - timelib_error_container_dtor(in.errors); - } - return in.time; -} - -void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options) -{ - if (!(options & TIMELIB_OVERRIDE_TIME) && parsed->have_date && !parsed->have_time) { - parsed->h = 0; - parsed->i = 0; - parsed->s = 0; - parsed->f = 0; - } - if (parsed->y == TIMELIB_UNSET) parsed->y = now->y != TIMELIB_UNSET ? now->y : 0; - if (parsed->d == TIMELIB_UNSET) parsed->d = now->d != TIMELIB_UNSET ? now->d : 0; - if (parsed->m == TIMELIB_UNSET) parsed->m = now->m != TIMELIB_UNSET ? now->m : 0; - if (parsed->h == TIMELIB_UNSET) parsed->h = now->h != TIMELIB_UNSET ? now->h : 0; - if (parsed->i == TIMELIB_UNSET) parsed->i = now->i != TIMELIB_UNSET ? now->i : 0; - if (parsed->s == TIMELIB_UNSET) parsed->s = now->s != TIMELIB_UNSET ? now->s : 0; - if (parsed->f == TIMELIB_UNSET) parsed->f = now->f != TIMELIB_UNSET ? now->f : 0; - if (parsed->z == TIMELIB_UNSET) parsed->z = now->z != TIMELIB_UNSET ? now->z : 0; - if (parsed->dst == TIMELIB_UNSET) parsed->dst = now->dst != TIMELIB_UNSET ? now->dst : 0; - - if (!parsed->tz_abbr) { - parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL; - } - if (!parsed->tz_info) { - parsed->tz_info = now->tz_info ? (!(options & TIMELIB_NO_CLONE) ? timelib_tzinfo_clone(now->tz_info) : now->tz_info) : NULL; - } - if (parsed->zone_type == 0 && now->zone_type != 0) { - parsed->zone_type = now->zone_type; -/* parsed->tz_abbr = now->tz_abbr ? strdup(now->tz_abbr) : NULL; - parsed->tz_info = now->tz_info ? timelib_tzinfo_clone(now->tz_info) : NULL; -*/ parsed->is_localtime = 1; - } -/* timelib_dump_date(parsed, 2); - timelib_dump_date(now, 2); -*/ -} - -char *timelib_timezone_id_from_abbr(const char *abbr, long gmtoffset, int isdst) -{ - const timelib_tz_lookup_table *tp; - - tp = zone_search(abbr, gmtoffset, isdst); - if (tp) { - return (tp->full_tz_name); - } else { - return NULL; - } -} - -const timelib_tz_lookup_table *timelib_timezone_abbreviations_list(void) -{ - return timelib_timezone_lookup; -} - -#ifdef DEBUG_PARSER_STUB -int main(void) -{ - timelib_time time = timelib_strtotime("May 12"); - - printf ("%04d-%02d-%02d %02d:%02d:%02d.%-5d %+04d %1d", - time.y, time.m, time.d, time.h, time.i, time.s, time.f, time.z, time.dst); - if (time.have_relative) { - printf ("%3dY %3dM %3dD / %3dH %3dM %3dS", - time.relative.y, time.relative.m, time.relative.d, time.relative.h, time.relative.i, time.relative.s); - } - if (time.have_weekday_relative) { - printf (" / %d", time.relative.weekday); - } - if (time.have_weeknr_day) { - printf(" / %dW%d", time.relative.weeknr_day.weeknr, time.relative.weeknr_day.dayofweek); - } - return 0; -} -#endif - -/* - * vim: syntax=c - */ diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index 89bf2d697..5e1d31367 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.re 311831 2011-06-05 13:30:01Z bjori $ */ +/* $Id: parse_date.re 320481 2011-12-06 06:21:08Z derick $ */ #include "timelib.h" @@ -119,8 +119,8 @@ typedef unsigned char uchar; #define TIMELIB_DEINIT timelib_string_free(str) #define TIMELIB_ADJUST_RELATIVE_WEEKDAY() if (in->time.have_weekday_relative && (in.rel.d > 0)) { in.rel.d -= 7; } -#define TIMELIB_PROCESS_YEAR(x) { \ - if ((x) == TIMELIB_UNSET) { \ +#define TIMELIB_PROCESS_YEAR(x, l) { \ + if (((x) == TIMELIB_UNSET) || ((l) >= 4)) { \ /* (x) = 0; */ \ } else if ((x) < 100) { \ if ((x) < 70) { \ @@ -438,7 +438,7 @@ static char *timelib_string(Scanner *s) return tmp; } -static timelib_sll timelib_get_nr(char **ptr, int max_length) +static timelib_sll timelib_get_nr_ex(char **ptr, int max_length, int *scanned_length) { char *begin, *end, *str; timelib_sll tmp_nr = TIMELIB_UNSET; @@ -456,6 +456,9 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) ++len; } end = *ptr; + if (scanned_length) { + *scanned_length = end - begin; + } str = calloc(1, end - begin + 1); memcpy(str, begin, end - begin); tmp_nr = strtoll(str, NULL, 10); @@ -463,6 +466,11 @@ static timelib_sll timelib_get_nr(char **ptr, int max_length) return tmp_nr; } +static timelib_sll timelib_get_nr(char **ptr, int max_length) +{ + return timelib_get_nr_ex(ptr, max_length, NULL); +} + static void timelib_skip_day_suffix(char **ptr) { if (isspace(**ptr)) { @@ -775,7 +783,7 @@ static long timelib_lookup_zone(char **ptr, int *dst, char **tz_abbr, int *found return value; } -static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb) +static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_found, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_wrapper) { timelib_tzinfo *res; long retval = 0; @@ -824,7 +832,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_ #endif /* If we have a TimeZone identifier to start with, use it */ if (strstr(tz_abbr, "/") || strcmp(tz_abbr, "UTC") == 0) { - if ((res = timelib_parse_tzfile(tz_abbr, tzdb)) != NULL) { + if ((res = tz_wrapper(tz_abbr, tzdb)) != NULL) { t->tz_info = res; t->zone_type = TIMELIB_ZONETYPE_ID; found++; @@ -853,7 +861,7 @@ static long timelib_get_zone(char **ptr, int *dst, timelib_time *t, int *tz_not_ } \ } -static int scan(Scanner *s) +static int scan(Scanner *s, timelib_tz_get_wrapper tz_get_wrapper) { uchar *cursor = s->cur; char *str, *ptr = NULL; @@ -1186,7 +1194,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of } if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -1227,7 +1235,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of s->time->h = timelib_get_nr((char **) &ptr, 2); s->time->i = timelib_get_nr((char **) &ptr, 2); s->time->s = 0; - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, s->tzdb, tz_get_wrapper); break; case 1: s->time->y = timelib_get_nr((char **) &ptr, 4); @@ -1252,7 +1260,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of s->time->s = timelib_get_nr((char **) &ptr, 2); if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -1263,14 +1271,15 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of americanshort | american { + int length = 0; DEBUG_OUTPUT("americanshort | american"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); if (*ptr == '/') { - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); } TIMELIB_DEINIT; return TIMELIB_AMERICAN; @@ -1290,53 +1299,57 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of iso8601date2 { + int length = 0; DEBUG_OUTPUT("iso8601date2"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } gnudateshorter { + int length = 0; DEBUG_OUTPUT("gnudateshorter"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } gnudateshort { + int length = 0; DEBUG_OUTPUT("gnudateshort"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_nr((char **) &ptr, 2); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } datefull { + int length = 0; DEBUG_OUTPUT("datefull"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->d = timelib_get_nr((char **) &ptr, 2); timelib_skip_day_suffix((char **) &ptr); s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } @@ -1355,52 +1368,56 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of pointeddate2 { + int length = 0; DEBUG_OUTPUT("pointed date YY"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->d = timelib_get_nr((char **) &ptr, 2); s->time->m = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 2, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } datenoday { + int length = 0; DEBUG_OUTPUT("datenoday"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_month((char **) &ptr); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } datenodayrev { + int length = 0; DEBUG_OUTPUT("datenodayrev"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_month((char **) &ptr); s->time->d = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } datetextual | datenoyear { + int length = 0; DEBUG_OUTPUT("datetextual | datenoyear"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } @@ -1445,7 +1462,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of if (*ptr == '.') { s->time->f = timelib_get_frac_nr((char **) &ptr, 9); if (*ptr) { /* timezone is optional */ - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -1457,13 +1474,14 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of pgydotd { + int length = 0; DEBUG_OUTPUT("pgydotd"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->d = timelib_get_nr((char **) &ptr, 3); s->time->m = 1; - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } @@ -1508,26 +1526,28 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of pgtextshort { + int length = 0; DEBUG_OUTPUT("pgtextshort"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); - s->time->y = timelib_get_nr((char **) &ptr, 4); - TIMELIB_PROCESS_YEAR(s->time->y); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } pgtextreverse { + int length = 0; DEBUG_OUTPUT("pgtextreverse"); TIMELIB_INIT; TIMELIB_HAVE_DATE(); - s->time->y = timelib_get_nr((char **) &ptr, 4); + s->time->y = timelib_get_nr_ex((char **) &ptr, 4, &length); s->time->m = timelib_get_month((char **) &ptr); s->time->d = timelib_get_nr((char **) &ptr, 2); - TIMELIB_PROCESS_YEAR(s->time->y); + TIMELIB_PROCESS_YEAR(s->time->y, length); TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } @@ -1545,7 +1565,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of s->time->h = timelib_get_nr((char **) &ptr, 2); s->time->i = timelib_get_nr((char **) &ptr, 2); s->time->s = timelib_get_nr((char **) &ptr, 2); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -1658,7 +1678,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of DEBUG_OUTPUT("tzcorrection | tz"); TIMELIB_INIT; TIMELIB_HAVE_TZ(); - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -1711,7 +1731,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of } if (*ptr != '\0') { - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_error(s, "The timezone could not be found in the database"); } @@ -1757,7 +1777,7 @@ weekdayof = (reltextnumber|reltexttext) space (dayfull|dayabbr) space 'of /*!max:re2c */ -timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb) +timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper) { Scanner in; int t; @@ -1812,7 +1832,7 @@ timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container in.time->zone_type = 0; do { - t = scan(&in); + t = scan(&in, tz_get_wrapper); #ifdef DEBUG_PARSER printf("%d\n", t); #endif @@ -1867,7 +1887,7 @@ static void timelib_time_reset_unset_fields(timelib_time *time) if (time->f == TIMELIB_UNSET ) time->f = 0.0; } -timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb) +timelib_time *timelib_parse_from_format(char *format, char *string, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper) { char *fptr = format; char *ptr = string; @@ -1875,6 +1895,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim timelib_sll tmp; Scanner in; Scanner *s = ∈ + int allow_extra = 0; memset(&in, 0, sizeof(in)); in.errors = malloc(sizeof(struct timelib_error_container)); @@ -1903,8 +1924,19 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim switch (*fptr) { case 'D': /* three letter day */ case 'l': /* full day */ - if (!timelib_lookup_relunit((char **) &ptr)) { - add_pbf_error(s, "A textual day could not be found", string, begin); + { + const timelib_relunit* tmprel = 0; + + tmprel = timelib_lookup_relunit((char **) &ptr); + if (!tmprel) { + add_pbf_error(s, "A textual day could not be found", string, begin); + break; + } else { + in.time->have_relative = 1; + in.time->relative.have_weekday_relative = 1; + in.time->relative.weekday = tmprel->multiplier; + in.time->relative.weekday_behavior = 1; + } } break; case 'd': /* two digit day, with leading zero */ @@ -1917,13 +1949,14 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim case 'S': /* day suffix, ignored, nor checked */ timelib_skip_day_suffix((char **) &ptr); break; - case 'z': /* day of year - resets month (0 based) */ + case 'z': /* day of year - resets month (0 based) - also initializes everything else to !TIMELIB_UNSET */ TIMELIB_CHECK_NUMBER; if ((tmp = timelib_get_nr((char **) &ptr, 3)) == TIMELIB_UNSET) { add_pbf_error(s, "A three digit day-of-year could not be found", string, begin); } else { s->time->m = 1; s->time->d = tmp + 1; + timelib_do_normalize(s->time); } break; @@ -1944,11 +1977,14 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim } break; case 'y': /* two digit year */ - TIMELIB_CHECK_NUMBER; - if ((s->time->y = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit year could not be found", string, begin); + { + int length = 0; + TIMELIB_CHECK_NUMBER; + if ((s->time->y = timelib_get_nr_ex((char **) &ptr, 2, &length)) == TIMELIB_UNSET) { + add_pbf_error(s, "A two digit year could not be found", string, begin); + } + TIMELIB_PROCESS_YEAR(s->time->y, length); } - TIMELIB_PROCESS_YEAR(s->time->y); break; case 'Y': /* four digit year */ TIMELIB_CHECK_NUMBER; @@ -1984,15 +2020,31 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim } break; case 'i': /* two digit minute, with leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->i = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit minute could not be found", string, begin); + { + int length; + timelib_sll min; + + TIMELIB_CHECK_NUMBER; + min = timelib_get_nr_ex((char **) &ptr, 2, &length); + if (min == TIMELIB_UNSET || length != 2) { + add_pbf_error(s, "A two digit minute could not be found", string, begin); + } else { + s->time->i = min; + } } break; case 's': /* two digit second, with leading zero */ - TIMELIB_CHECK_NUMBER; - if ((s->time->s = timelib_get_nr((char **) &ptr, 2)) == TIMELIB_UNSET) { - add_pbf_error(s, "A two digit second could not be found", string, begin); + { + int length; + timelib_sll sec; + + TIMELIB_CHECK_NUMBER; + sec = timelib_get_nr_ex((char **) &ptr, 2, &length); + if (sec == TIMELIB_UNSET || length != 2) { + add_pbf_error(s, "A two second minute could not be found", string, begin); + } else { + s->time->s = sec; + } } break; case 'u': /* up to six digit millisecond */ @@ -2033,7 +2085,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim case 'O': /* timezone */ { int tz_not_found; - s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb); + s->time->z = timelib_get_zone((char **) &ptr, &s->time->dst, s->time, &tz_not_found, s->tzdb, tz_get_wrapper); if (tz_not_found) { add_pbf_error(s, "The timezone could not be found in the database", string, begin); } @@ -2088,6 +2140,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim timelib_eat_until_separator((char **) &ptr); break; + case '+': /* allow extra chars in the format */ + allow_extra = 1; + break; + default: if (*fptr != *ptr) { add_pbf_error(s, "The format separator does not match", string, begin); @@ -2097,11 +2153,20 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim fptr++; } if (*ptr) { - add_pbf_error(s, "Trailing data", string, ptr); + if (allow_extra) { + add_pbf_warning(s, "Trailing data", string, ptr); + } else { + add_pbf_error(s, "Trailing data", string, ptr); + } + } + /* ignore trailing +'s */ + while (*fptr == '+') { + fptr++; } if (*fptr) { /* Trailing | and ! specifiers are valid. */ - while (*fptr) { + int done = 0; + while (*fptr && !done) { switch (*fptr++) { case '!': /* reset all fields to default */ timelib_time_reset_fields(s->time); @@ -2113,6 +2178,7 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim default: add_pbf_error(s, "Data missing", string, ptr); + done = 1; } } } diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c index bb267127e..4baa01387 100644 --- a/ext/date/lib/parse_iso_intervals.c +++ b/ext/date/lib/parse_iso_intervals.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Sat Nov 13 14:57:59 2010 */ +/* Generated by re2c 0.13.5 on Mon Dec 5 22:02:31 2011 */ #line 1 "ext/date/lib/parse_iso_intervals.re" /* +----------------------------------------------------------------------+ @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_iso_intervals.c 305316 2010-11-13 15:01:48Z derick $ */ +/* $Id: parse_iso_intervals.c 320478 2011-12-06 06:04:24Z derick $ */ #include "timelib.h" @@ -396,7 +396,7 @@ yy6: break; } - nr = timelib_get_unsigned_nr((char **) &ptr, 9); + nr = timelib_get_unsigned_nr((char **) &ptr, 12); switch (*ptr) { case 'Y': s->period->y = nr; break; case 'W': s->period->d = nr * 7; break; diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re index 3fb47107c..a44276d46 100644 --- a/ext/date/lib/parse_iso_intervals.re +++ b/ext/date/lib/parse_iso_intervals.re @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_iso_intervals.re 296828 2010-03-26 04:31:26Z aharvey $ */ +/* $Id: parse_iso_intervals.re 320478 2011-12-06 06:04:24Z derick $ */ #include "timelib.h" @@ -364,7 +364,7 @@ isoweek = year4 "-"? "W" weekofyear; break; } - nr = timelib_get_unsigned_nr((char **) &ptr, 9); + nr = timelib_get_unsigned_nr((char **) &ptr, 12); switch (*ptr) { case 'Y': s->period->y = nr; break; case 'W': s->period->d = nr * 7; break; diff --git a/ext/date/lib/timelib.h b/ext/date/lib/timelib.h index 67a57d875..53a861487 100644 --- a/ext/date/lib/timelib.h +++ b/ext/date/lib/timelib.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: timelib.h 309055 2011-03-09 20:06:52Z scottmac $ */ +/* $Id: timelib.h 320481 2011-12-06 06:21:08Z derick $ */ #ifndef __TIMELIB_H__ #define __TIMELIB_H__ @@ -26,12 +26,14 @@ #include <limits.h> #endif -#define TIMELIB_VERSION 201101 +#define TIMELIB_VERSION 201102 #define TIMELIB_NONE 0x00 #define TIMELIB_OVERRIDE_TIME 0x01 #define TIMELIB_NO_CLONE 0x02 +#define TIMELIB_UNSET -99999 + #define TIMELIB_SPECIAL_WEEKDAY 0x01 #define TIMELIB_SPECIAL_DAY_OF_WEEK_IN_MONTH 0x02 #define TIMELIB_SPECIAL_LAST_DAY_OF_WEEK_IN_MONTH 0x03 @@ -52,6 +54,9 @@ #define strncasecmp strnicmp #endif +/* Function pointers */ +typedef timelib_tzinfo* (*timelib_tz_get_wrapper)(char *tzname, const timelib_tzdb *tzdb); + /* From dow.c */ timelib_sll timelib_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d); timelib_sll timelib_iso_day_of_week(timelib_sll y, timelib_sll m, timelib_sll d); @@ -63,8 +68,8 @@ int timelib_valid_time(timelib_sll h, timelib_sll i, timelib_sll s); int timelib_valid_date(timelib_sll y, timelib_sll m, timelib_sll d); /* From parse_date.re */ -timelib_time *timelib_strtotime(char *s, int len, timelib_error_container **errors, const timelib_tzdb *tzdb); -timelib_time *timelib_parse_from_format(char *format, char *s, int len, timelib_error_container **errors, const timelib_tzdb *tzdb); +timelib_time *timelib_strtotime(char *s, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper); +timelib_time *timelib_parse_from_format(char *format, char *s, int len, timelib_error_container **errors, const timelib_tzdb *tzdb, timelib_tz_get_wrapper tz_get_wrapper); void timelib_fill_holes(timelib_time *parsed, timelib_time *now, int options); char *timelib_timezone_id_from_abbr(const char *abbr, long gmtoffset, int isdst); const timelib_tz_lookup_table *timelib_timezone_abbreviations_list(void); @@ -78,6 +83,7 @@ void timelib_strtointerval(char *s, int len, /* From tm2unixtime.c */ void timelib_update_ts(timelib_time* time, timelib_tzinfo* tzi); +void timelib_do_normalize(timelib_time *base); void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt); /* From unixtime2tm.c */ diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 7f2a3a0c6..16164d453 100644 --- a/ext/date/lib/timezonedb.h +++ b/ext/date/lib/timezonedb.h @@ -1,4 +1,4 @@ -const timelib_tzdb_index_entry timezonedb_idx_builtin[573] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[575] = { { "Africa/Abidjan" , 0x000000 }, { "Africa/Accra" , 0x000055 }, { "Africa/Addis_Ababa" , 0x0000FD }, @@ -25,556 +25,558 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[573] = { { "Africa/Gaborone" , 0x000FCC }, { "Africa/Harare" , 0x001027 }, { "Africa/Johannesburg" , 0x00107C }, - { "Africa/Kampala" , 0x0010EA }, - { "Africa/Khartoum" , 0x001169 }, - { "Africa/Kigali" , 0x00127C }, - { "Africa/Kinshasa" , 0x0012D1 }, - { "Africa/Lagos" , 0x00132C }, - { "Africa/Libreville" , 0x001381 }, - { "Africa/Lome" , 0x0013D6 }, - { "Africa/Luanda" , 0x00141A }, - { "Africa/Lubumbashi" , 0x00146F }, - { "Africa/Lusaka" , 0x0014CA }, - { "Africa/Malabo" , 0x00151F }, - { "Africa/Maputo" , 0x001585 }, - { "Africa/Maseru" , 0x0015DA }, - { "Africa/Mbabane" , 0x001642 }, - { "Africa/Mogadishu" , 0x001698 }, - { "Africa/Monrovia" , 0x0016F3 }, - { "Africa/Nairobi" , 0x001759 }, - { "Africa/Ndjamena" , 0x0017D8 }, - { "Africa/Niamey" , 0x001844 }, - { "Africa/Nouakchott" , 0x0018B7 }, - { "Africa/Ouagadougou" , 0x001922 }, - { "Africa/Porto-Novo" , 0x001977 }, - { "Africa/Sao_Tome" , 0x0019DD }, - { "Africa/Timbuktu" , 0x001A32 }, - { "Africa/Tripoli" , 0x001A9D }, - { "Africa/Tunis" , 0x001B97 }, - { "Africa/Windhoek" , 0x001CA9 }, - { "America/Adak" , 0x001EF0 }, - { "America/Anchorage" , 0x002266 }, - { "America/Anguilla" , 0x0025DA }, - { "America/Antigua" , 0x00262F }, - { "America/Araguaina" , 0x002695 }, - { "America/Argentina/Buenos_Aires" , 0x0027F0 }, - { "America/Argentina/Catamarca" , 0x00299E }, - { "America/Argentina/ComodRivadavia" , 0x002B5F }, - { "America/Argentina/Cordoba" , 0x002D05 }, - { "America/Argentina/Jujuy" , 0x002EDA }, - { "America/Argentina/La_Rioja" , 0x00308E }, - { "America/Argentina/Mendoza" , 0x003246 }, - { "America/Argentina/Rio_Gallegos" , 0x003406 }, - { "America/Argentina/Salta" , 0x0035BB }, - { "America/Argentina/San_Juan" , 0x003767 }, - { "America/Argentina/San_Luis" , 0x00391F }, - { "America/Argentina/Tucuman" , 0x003AE5 }, - { "America/Argentina/Ushuaia" , 0x003CA1 }, - { "America/Aruba" , 0x003E5C }, - { "America/Asuncion" , 0x003EC2 }, - { "America/Atikokan" , 0x0041A7 }, - { "America/Atka" , 0x00427D }, - { "America/Bahia" , 0x0045E3 }, - { "America/Bahia_Banderas" , 0x00476C }, - { "America/Barbados" , 0x0049E5 }, - { "America/Belem" , 0x004A7F }, - { "America/Belize" , 0x004B7A }, - { "America/Blanc-Sablon" , 0x004CF6 }, - { "America/Boa_Vista" , 0x004DAA }, - { "America/Bogota" , 0x004EB3 }, - { "America/Boise" , 0x004F1F }, - { "America/Buenos_Aires" , 0x0052B6 }, - { "America/Cambridge_Bay" , 0x00544F }, - { "America/Campo_Grande" , 0x005777 }, - { "America/Cancun" , 0x005A66 }, - { "America/Caracas" , 0x005CA8 }, - { "America/Catamarca" , 0x005D0F }, - { "America/Cayenne" , 0x005EB5 }, - { "America/Cayman" , 0x005F17 }, - { "America/Chicago" , 0x005F6C }, - { "America/Chihuahua" , 0x006483 }, - { "America/Coral_Harbour" , 0x0066EE }, - { "America/Cordoba" , 0x006780 }, - { "America/Costa_Rica" , 0x006926 }, - { "America/Cuiaba" , 0x0069B0 }, - { "America/Curacao" , 0x006C8E }, - { "America/Danmarkshavn" , 0x006CF4 }, - { "America/Dawson" , 0x006E38 }, - { "America/Dawson_Creek" , 0x007155 }, - { "America/Denver" , 0x00732F }, - { "America/Detroit" , 0x0076B5 }, - { "America/Dominica" , 0x007A14 }, - { "America/Edmonton" , 0x007A69 }, - { "America/Eirunepe" , 0x007E21 }, - { "America/El_Salvador" , 0x007F34 }, - { "America/Ensenada" , 0x007FA9 }, - { "America/Fort_Wayne" , 0x008450 }, - { "America/Fortaleza" , 0x008312 }, - { "America/Glace_Bay" , 0x0086BA }, - { "America/Godthab" , 0x008A31 }, - { "America/Goose_Bay" , 0x008CF5 }, - { "America/Grand_Turk" , 0x0091B2 }, - { "America/Grenada" , 0x009461 }, - { "America/Guadeloupe" , 0x0094B6 }, - { "America/Guatemala" , 0x00950B }, - { "America/Guayaquil" , 0x009594 }, - { "America/Guyana" , 0x0095F1 }, - { "America/Halifax" , 0x009672 }, - { "America/Havana" , 0x009B88 }, - { "America/Hermosillo" , 0x009EFB }, - { "America/Indiana/Indianapolis" , 0x009FD9 }, - { "America/Indiana/Knox" , 0x00A26A }, - { "America/Indiana/Marengo" , 0x00A601 }, - { "America/Indiana/Petersburg" , 0x00A8A7 }, - { "America/Indiana/Tell_City" , 0x00ADF4 }, - { "America/Indiana/Vevay" , 0x00B08D }, - { "America/Indiana/Vincennes" , 0x00B2C8 }, - { "America/Indiana/Winamac" , 0x00B57C }, - { "America/Indianapolis" , 0x00AB8A }, - { "America/Inuvik" , 0x00B835 }, - { "America/Iqaluit" , 0x00BB2C }, - { "America/Jamaica" , 0x00BE4E }, - { "America/Jujuy" , 0x00BF13 }, - { "America/Juneau" , 0x00C0BD }, - { "America/Kentucky/Louisville" , 0x00C43B }, - { "America/Kentucky/Monticello" , 0x00C859 }, - { "America/Knox_IN" , 0x00CBDE }, - { "America/Kralendijk" , 0x00CF4F }, - { "America/La_Paz" , 0x00CFB5 }, - { "America/Lima" , 0x00D01C }, - { "America/Los_Angeles" , 0x00D0C4 }, - { "America/Louisville" , 0x00D4D5 }, - { "America/Lower_Princes" , 0x00D8CA }, - { "America/Maceio" , 0x00D930 }, - { "America/Managua" , 0x00DA6A }, - { "America/Manaus" , 0x00DB1D }, - { "America/Marigot" , 0x00DC1F }, - { "America/Martinique" , 0x00DC74 }, - { "America/Matamoros" , 0x00DCE0 }, - { "America/Mazatlan" , 0x00DF39 }, - { "America/Mendoza" , 0x00E1A6 }, - { "America/Menominee" , 0x00E35A }, - { "America/Merida" , 0x00E6DB }, - { "America/Metlakatla" , 0x00E916 }, - { "America/Mexico_City" , 0x00EC74 }, - { "America/Miquelon" , 0x00EEEF }, - { "America/Moncton" , 0x00F161 }, - { "America/Monterrey" , 0x00F5F8 }, - { "America/Montevideo" , 0x00F85B }, - { "America/Montreal" , 0x00FB6D }, - { "America/Montserrat" , 0x010083 }, - { "America/Nassau" , 0x0100D8 }, - { "America/New_York" , 0x01041D }, - { "America/Nipigon" , 0x010928 }, - { "America/Nome" , 0x010C79 }, - { "America/Noronha" , 0x010FF7 }, - { "America/North_Dakota/Beulah" , 0x011127 }, - { "America/North_Dakota/Center" , 0x0114BB }, - { "America/North_Dakota/New_Salem" , 0x01184F }, - { "America/Ojinaga" , 0x011BF8 }, - { "America/Panama" , 0x011E59 }, - { "America/Pangnirtung" , 0x011EAE }, - { "America/Paramaribo" , 0x0121E4 }, - { "America/Phoenix" , 0x012276 }, - { "America/Port-au-Prince" , 0x012324 }, - { "America/Port_of_Spain" , 0x01253F }, - { "America/Porto_Acre" , 0x012440 }, - { "America/Porto_Velho" , 0x012594 }, - { "America/Puerto_Rico" , 0x01268A }, - { "America/Rainy_River" , 0x0126F5 }, - { "America/Rankin_Inlet" , 0x012A2D }, - { "America/Recife" , 0x012D13 }, - { "America/Regina" , 0x012E3D }, - { "America/Resolute" , 0x012FFB }, - { "America/Rio_Branco" , 0x0132F4 }, - { "America/Rosario" , 0x0133F7 }, - { "America/Santa_Isabel" , 0x01359D }, - { "America/Santarem" , 0x013940 }, - { "America/Santiago" , 0x013A45 }, - { "America/Santo_Domingo" , 0x013DEE }, - { "America/Sao_Paulo" , 0x013EB4 }, - { "America/Scoresbysund" , 0x0141C3 }, - { "America/Shiprock" , 0x0144B1 }, - { "America/Sitka" , 0x014840 }, - { "America/St_Barthelemy" , 0x014BC8 }, - { "America/St_Johns" , 0x014C1D }, - { "America/St_Kitts" , 0x015170 }, - { "America/St_Lucia" , 0x0151C5 }, - { "America/St_Thomas" , 0x01521A }, - { "America/St_Vincent" , 0x01526F }, - { "America/Swift_Current" , 0x0152C4 }, - { "America/Tegucigalpa" , 0x0153E5 }, - { "America/Thule" , 0x015464 }, - { "America/Thunder_Bay" , 0x0156AB }, - { "America/Tijuana" , 0x0159F4 }, - { "America/Toronto" , 0x015D8D }, - { "America/Tortola" , 0x0162A4 }, - { "America/Vancouver" , 0x0162F9 }, - { "America/Virgin" , 0x016736 }, - { "America/Whitehorse" , 0x01678B }, - { "America/Winnipeg" , 0x016AA8 }, - { "America/Yakutat" , 0x016EE8 }, - { "America/Yellowknife" , 0x017253 }, - { "Antarctica/Casey" , 0x017563 }, - { "Antarctica/Davis" , 0x0175EE }, - { "Antarctica/DumontDUrville" , 0x017685 }, - { "Antarctica/Macquarie" , 0x017717 }, - { "Antarctica/Mawson" , 0x017991 }, - { "Antarctica/McMurdo" , 0x017A0D }, - { "Antarctica/Palmer" , 0x017D0F }, - { "Antarctica/Rothera" , 0x01802B }, - { "Antarctica/South_Pole" , 0x0180A1 }, - { "Antarctica/Syowa" , 0x0183A9 }, - { "Antarctica/Vostok" , 0x018417 }, - { "Arctic/Longyearbyen" , 0x018488 }, - { "Asia/Aden" , 0x0187BA }, - { "Asia/Almaty" , 0x01880F }, - { "Asia/Amman" , 0x01898E }, - { "Asia/Anadyr" , 0x018C4E }, - { "Asia/Aqtau" , 0x018E33 }, - { "Asia/Aqtobe" , 0x019032 }, - { "Asia/Ashgabat" , 0x0191EA }, - { "Asia/Ashkhabad" , 0x019307 }, - { "Asia/Baghdad" , 0x019424 }, - { "Asia/Bahrain" , 0x019599 }, - { "Asia/Baku" , 0x0195FF }, - { "Asia/Bangkok" , 0x0198E7 }, - { "Asia/Beirut" , 0x01993C }, - { "Asia/Bishkek" , 0x019C49 }, - { "Asia/Brunei" , 0x019DF5 }, - { "Asia/Calcutta" , 0x019E57 }, - { "Asia/Choibalsan" , 0x019ED0 }, - { "Asia/Chongqing" , 0x01A049 }, - { "Asia/Chungking" , 0x01A138 }, - { "Asia/Colombo" , 0x01A1E7 }, - { "Asia/Dacca" , 0x01A283 }, - { "Asia/Damascus" , 0x01A329 }, - { "Asia/Dhaka" , 0x01A679 }, - { "Asia/Dili" , 0x01A71F }, - { "Asia/Dubai" , 0x01A7A8 }, - { "Asia/Dushanbe" , 0x01A7FD }, - { "Asia/Gaza" , 0x01A900 }, - { "Asia/Harbin" , 0x01AC49 }, - { "Asia/Ho_Chi_Minh" , 0x01AD30 }, - { "Asia/Hong_Kong" , 0x01ADA8 }, - { "Asia/Hovd" , 0x01AF6A }, - { "Asia/Irkutsk" , 0x01B0E2 }, - { "Asia/Istanbul" , 0x01B2C8 }, - { "Asia/Jakarta" , 0x01B6B5 }, - { "Asia/Jayapura" , 0x01B75F }, - { "Asia/Jerusalem" , 0x01B7FB }, - { "Asia/Kabul" , 0x01BB2A }, - { "Asia/Kamchatka" , 0x01BB7B }, - { "Asia/Karachi" , 0x01BD57 }, - { "Asia/Kashgar" , 0x01BE0C }, - { "Asia/Kathmandu" , 0x01BEDD }, - { "Asia/Katmandu" , 0x01BF43 }, - { "Asia/Kolkata" , 0x01BFA9 }, - { "Asia/Krasnoyarsk" , 0x01C022 }, - { "Asia/Kuala_Lumpur" , 0x01C20A }, - { "Asia/Kuching" , 0x01C2C7 }, - { "Asia/Kuwait" , 0x01C3B5 }, - { "Asia/Macao" , 0x01C40A }, - { "Asia/Macau" , 0x01C545 }, - { "Asia/Magadan" , 0x01C680 }, - { "Asia/Makassar" , 0x01C862 }, - { "Asia/Manila" , 0x01C926 }, - { "Asia/Muscat" , 0x01C9AB }, - { "Asia/Nicosia" , 0x01CA00 }, - { "Asia/Novokuznetsk" , 0x01CCE8 }, - { "Asia/Novosibirsk" , 0x01CEEA }, - { "Asia/Omsk" , 0x01D0D5 }, - { "Asia/Oral" , 0x01D2BC }, - { "Asia/Phnom_Penh" , 0x01D48C }, - { "Asia/Pontianak" , 0x01D504 }, - { "Asia/Pyongyang" , 0x01D5C5 }, - { "Asia/Qatar" , 0x01D632 }, - { "Asia/Qyzylorda" , 0x01D698 }, - { "Asia/Rangoon" , 0x01D86E }, - { "Asia/Riyadh" , 0x01D8E6 }, - { "Asia/Saigon" , 0x01D93B }, - { "Asia/Sakhalin" , 0x01D9B3 }, - { "Asia/Samarkand" , 0x01DBAA }, - { "Asia/Seoul" , 0x01DCE0 }, - { "Asia/Shanghai" , 0x01DD84 }, - { "Asia/Singapore" , 0x01DE64 }, - { "Asia/Taipei" , 0x01DF1B }, - { "Asia/Tashkent" , 0x01E033 }, - { "Asia/Tbilisi" , 0x01E164 }, - { "Asia/Tehran" , 0x01E31E }, - { "Asia/Tel_Aviv" , 0x01E58C }, - { "Asia/Thimbu" , 0x01E8BB }, - { "Asia/Thimphu" , 0x01E921 }, - { "Asia/Tokyo" , 0x01E987 }, - { "Asia/Ujung_Pandang" , 0x01EA10 }, - { "Asia/Ulaanbaatar" , 0x01EA8C }, - { "Asia/Ulan_Bator" , 0x01EBE7 }, - { "Asia/Urumqi" , 0x01ED34 }, - { "Asia/Vientiane" , 0x01EDFB }, - { "Asia/Vladivostok" , 0x01EE73 }, - { "Asia/Yakutsk" , 0x01F05F }, - { "Asia/Yekaterinburg" , 0x01F244 }, - { "Asia/Yerevan" , 0x01F44F }, - { "Atlantic/Azores" , 0x01F753 }, - { "Atlantic/Bermuda" , 0x01FC56 }, - { "Atlantic/Canary" , 0x01FF37 }, - { "Atlantic/Cape_Verde" , 0x02020D }, - { "Atlantic/Faeroe" , 0x020286 }, - { "Atlantic/Faroe" , 0x02052A }, - { "Atlantic/Jan_Mayen" , 0x0207CE }, - { "Atlantic/Madeira" , 0x020B00 }, - { "Atlantic/Reykjavik" , 0x021009 }, - { "Atlantic/South_Georgia" , 0x0211C2 }, - { "Atlantic/St_Helena" , 0x0214D0 }, - { "Atlantic/Stanley" , 0x021206 }, - { "Australia/ACT" , 0x021525 }, - { "Australia/Adelaide" , 0x021842 }, - { "Australia/Brisbane" , 0x021B6E }, - { "Australia/Broken_Hill" , 0x021C35 }, - { "Australia/Canberra" , 0x021F73 }, - { "Australia/Currie" , 0x022290 }, - { "Australia/Darwin" , 0x0225C3 }, - { "Australia/Eucla" , 0x022649 }, - { "Australia/Hobart" , 0x02271E }, - { "Australia/LHI" , 0x022A7C }, - { "Australia/Lindeman" , 0x022D17 }, - { "Australia/Lord_Howe" , 0x022DF8 }, - { "Australia/Melbourne" , 0x0230A3 }, - { "Australia/North" , 0x0233C8 }, - { "Australia/NSW" , 0x02343C }, - { "Australia/Perth" , 0x023759 }, - { "Australia/Queensland" , 0x023831 }, - { "Australia/South" , 0x0238DD }, - { "Australia/Sydney" , 0x023BFA }, - { "Australia/Tasmania" , 0x023F37 }, - { "Australia/Victoria" , 0x02427C }, - { "Australia/West" , 0x024599 }, - { "Australia/Yancowinna" , 0x02464F }, - { "Brazil/Acre" , 0x024971 }, - { "Brazil/DeNoronha" , 0x024A70 }, - { "Brazil/East" , 0x024B90 }, - { "Brazil/West" , 0x024E6D }, - { "Canada/Atlantic" , 0x024F65 }, - { "Canada/Central" , 0x02544D }, - { "Canada/East-Saskatchewan" , 0x025D57 }, - { "Canada/Eastern" , 0x025867 }, - { "Canada/Mountain" , 0x025EE0 }, - { "Canada/Newfoundland" , 0x026256 }, - { "Canada/Pacific" , 0x026781 }, - { "Canada/Saskatchewan" , 0x026B9A }, - { "Canada/Yukon" , 0x026D23 }, - { "CET" , 0x027026 }, - { "Chile/Continental" , 0x02732F }, - { "Chile/EasterIsland" , 0x0276CA }, - { "CST6CDT" , 0x027A0C }, - { "Cuba" , 0x027D5D }, - { "EET" , 0x0280D0 }, - { "Egypt" , 0x028383 }, - { "Eire" , 0x028646 }, - { "EST" , 0x028B57 }, - { "EST5EDT" , 0x028B9B }, - { "Etc/GMT" , 0x028EEC }, - { "Etc/GMT+0" , 0x028FB8 }, - { "Etc/GMT+1" , 0x029042 }, - { "Etc/GMT+10" , 0x0290CF }, - { "Etc/GMT+11" , 0x02915D }, - { "Etc/GMT+12" , 0x0291EB }, - { "Etc/GMT+2" , 0x029306 }, - { "Etc/GMT+3" , 0x029392 }, - { "Etc/GMT+4" , 0x02941E }, - { "Etc/GMT+5" , 0x0294AA }, - { "Etc/GMT+6" , 0x029536 }, - { "Etc/GMT+7" , 0x0295C2 }, - { "Etc/GMT+8" , 0x02964E }, - { "Etc/GMT+9" , 0x0296DA }, - { "Etc/GMT-0" , 0x028F74 }, - { "Etc/GMT-1" , 0x028FFC }, - { "Etc/GMT-10" , 0x029088 }, - { "Etc/GMT-11" , 0x029116 }, - { "Etc/GMT-12" , 0x0291A4 }, - { "Etc/GMT-13" , 0x029232 }, - { "Etc/GMT-14" , 0x029279 }, - { "Etc/GMT-2" , 0x0292C0 }, - { "Etc/GMT-3" , 0x02934C }, - { "Etc/GMT-4" , 0x0293D8 }, - { "Etc/GMT-5" , 0x029464 }, - { "Etc/GMT-6" , 0x0294F0 }, - { "Etc/GMT-7" , 0x02957C }, - { "Etc/GMT-8" , 0x029608 }, - { "Etc/GMT-9" , 0x029694 }, - { "Etc/GMT0" , 0x028F30 }, - { "Etc/Greenwich" , 0x029720 }, - { "Etc/UCT" , 0x029764 }, - { "Etc/Universal" , 0x0297A8 }, - { "Etc/UTC" , 0x0297EC }, - { "Etc/Zulu" , 0x029830 }, - { "Europe/Amsterdam" , 0x029874 }, - { "Europe/Andorra" , 0x029CB2 }, - { "Europe/Athens" , 0x029F2E }, - { "Europe/Belfast" , 0x02A271 }, - { "Europe/Belgrade" , 0x02A7A8 }, - { "Europe/Berlin" , 0x02AA71 }, - { "Europe/Bratislava" , 0x02ADC7 }, - { "Europe/Brussels" , 0x02B0F9 }, - { "Europe/Bucharest" , 0x02B530 }, - { "Europe/Budapest" , 0x02B85A }, - { "Europe/Chisinau" , 0x02BBCD }, - { "Europe/Copenhagen" , 0x02BF5B }, - { "Europe/Dublin" , 0x02C265 }, - { "Europe/Gibraltar" , 0x02C776 }, - { "Europe/Guernsey" , 0x02CBCD }, - { "Europe/Helsinki" , 0x02D104 }, - { "Europe/Isle_of_Man" , 0x02D3BA }, - { "Europe/Istanbul" , 0x02D8F1 }, - { "Europe/Jersey" , 0x02DCDE }, - { "Europe/Kaliningrad" , 0x02E215 }, - { "Europe/Kiev" , 0x02E477 }, - { "Europe/Lisbon" , 0x02E78E }, - { "Europe/Ljubljana" , 0x02EC92 }, - { "Europe/London" , 0x02EF5B }, - { "Europe/Luxembourg" , 0x02F492 }, - { "Europe/Madrid" , 0x02F8E8 }, - { "Europe/Malta" , 0x02FCAE }, - { "Europe/Mariehamn" , 0x030067 }, - { "Europe/Minsk" , 0x03031D }, - { "Europe/Monaco" , 0x030628 }, - { "Europe/Moscow" , 0x030A63 }, - { "Europe/Nicosia" , 0x030CB4 }, - { "Europe/Oslo" , 0x030F9C }, - { "Europe/Paris" , 0x0312CE }, - { "Europe/Podgorica" , 0x031714 }, - { "Europe/Prague" , 0x0319DD }, - { "Europe/Riga" , 0x031D0F }, - { "Europe/Rome" , 0x032054 }, - { "Europe/Samara" , 0x032417 }, - { "Europe/San_Marino" , 0x032647 }, - { "Europe/Sarajevo" , 0x032A0A }, - { "Europe/Simferopol" , 0x032CD3 }, - { "Europe/Skopje" , 0x032FFE }, - { "Europe/Sofia" , 0x0332C7 }, - { "Europe/Stockholm" , 0x0335CF }, - { "Europe/Tallinn" , 0x03387E }, - { "Europe/Tirane" , 0x033BB8 }, - { "Europe/Tiraspol" , 0x033EBE }, - { "Europe/Uzhgorod" , 0x03424C }, - { "Europe/Vaduz" , 0x034563 }, - { "Europe/Vatican" , 0x0347F6 }, - { "Europe/Vienna" , 0x034BB9 }, - { "Europe/Vilnius" , 0x034EE6 }, - { "Europe/Volgograd" , 0x035225 }, - { "Europe/Warsaw" , 0x035425 }, - { "Europe/Zagreb" , 0x035806 }, - { "Europe/Zaporozhye" , 0x035ACF }, - { "Europe/Zurich" , 0x035E10 }, - { "Factory" , 0x0360BF }, - { "GB" , 0x036130 }, - { "GB-Eire" , 0x036667 }, - { "GMT" , 0x036B9E }, - { "GMT+0" , 0x036C6A }, - { "GMT-0" , 0x036C26 }, - { "GMT0" , 0x036BE2 }, - { "Greenwich" , 0x036CAE }, - { "Hongkong" , 0x036CF2 }, - { "HST" , 0x036EB4 }, - { "Iceland" , 0x036EF8 }, - { "Indian/Antananarivo" , 0x0370B1 }, - { "Indian/Chagos" , 0x037125 }, - { "Indian/Christmas" , 0x037187 }, - { "Indian/Cocos" , 0x0371CB }, - { "Indian/Comoro" , 0x03720F }, - { "Indian/Kerguelen" , 0x037264 }, - { "Indian/Mahe" , 0x0372B9 }, - { "Indian/Maldives" , 0x03730E }, - { "Indian/Mauritius" , 0x037363 }, - { "Indian/Mayotte" , 0x0373D9 }, - { "Indian/Reunion" , 0x03742E }, - { "Iran" , 0x037483 }, - { "Israel" , 0x0376F1 }, - { "Jamaica" , 0x037A20 }, - { "Japan" , 0x037AE5 }, - { "Kwajalein" , 0x037B6E }, - { "Libya" , 0x037BD1 }, - { "MET" , 0x037CCB }, - { "Mexico/BajaNorte" , 0x037FD4 }, - { "Mexico/BajaSur" , 0x03833D }, - { "Mexico/General" , 0x038582 }, - { "MST" , 0x0387E0 }, - { "MST7MDT" , 0x038824 }, - { "Navajo" , 0x038B75 }, - { "NZ" , 0x038EEE }, - { "NZ-CHAT" , 0x03926C }, - { "Pacific/Apia" , 0x039554 }, - { "Pacific/Auckland" , 0x0395D2 }, - { "Pacific/Chatham" , 0x03995E }, - { "Pacific/Chuuk" , 0x039C55 }, - { "Pacific/Easter" , 0x039CAE }, - { "Pacific/Efate" , 0x03A00C }, - { "Pacific/Enderbury" , 0x03A0D2 }, - { "Pacific/Fakaofo" , 0x03A140 }, - { "Pacific/Fiji" , 0x03A184 }, - { "Pacific/Funafuti" , 0x03A20E }, - { "Pacific/Galapagos" , 0x03A252 }, - { "Pacific/Gambier" , 0x03A2CA }, - { "Pacific/Guadalcanal" , 0x03A32F }, - { "Pacific/Guam" , 0x03A384 }, - { "Pacific/Honolulu" , 0x03A3DA }, - { "Pacific/Johnston" , 0x03A451 }, - { "Pacific/Kiritimati" , 0x03A4A3 }, - { "Pacific/Kosrae" , 0x03A50E }, - { "Pacific/Kwajalein" , 0x03A56B }, - { "Pacific/Majuro" , 0x03A5D7 }, - { "Pacific/Marquesas" , 0x03A636 }, - { "Pacific/Midway" , 0x03A69D }, - { "Pacific/Nauru" , 0x03A727 }, - { "Pacific/Niue" , 0x03A79F }, - { "Pacific/Norfolk" , 0x03A7FD }, - { "Pacific/Noumea" , 0x03A852 }, - { "Pacific/Pago_Pago" , 0x03A8E2 }, - { "Pacific/Palau" , 0x03A96B }, - { "Pacific/Pitcairn" , 0x03A9AF }, - { "Pacific/Pohnpei" , 0x03AA04 }, - { "Pacific/Ponape" , 0x03AA59 }, - { "Pacific/Port_Moresby" , 0x03AA9E }, - { "Pacific/Rarotonga" , 0x03AAE2 }, - { "Pacific/Saipan" , 0x03ABBE }, - { "Pacific/Samoa" , 0x03AC21 }, - { "Pacific/Tahiti" , 0x03ACAA }, - { "Pacific/Tarawa" , 0x03AD0F }, - { "Pacific/Tongatapu" , 0x03AD63 }, - { "Pacific/Truk" , 0x03ADEF }, - { "Pacific/Wake" , 0x03AE34 }, - { "Pacific/Wallis" , 0x03AE84 }, - { "Pacific/Yap" , 0x03AEC8 }, - { "Poland" , 0x03AF0D }, - { "Portugal" , 0x03B2EE }, - { "PRC" , 0x03B7EA }, - { "PST8PDT" , 0x03B89B }, - { "ROC" , 0x03BBEC }, - { "ROK" , 0x03BD04 }, - { "Singapore" , 0x03BDA8 }, - { "Turkey" , 0x03BE5F }, - { "UCT" , 0x03C24C }, - { "Universal" , 0x03C290 }, - { "US/Alaska" , 0x03C2D4 }, - { "US/Aleutian" , 0x03C63D }, - { "US/Arizona" , 0x03C9A3 }, - { "US/Central" , 0x03CA31 }, - { "US/East-Indiana" , 0x03D43B }, - { "US/Eastern" , 0x03CF3C }, - { "US/Hawaii" , 0x03D6A5 }, - { "US/Indiana-Starke" , 0x03D716 }, - { "US/Michigan" , 0x03DA87 }, - { "US/Mountain" , 0x03DDBE }, - { "US/Pacific" , 0x03E137 }, - { "US/Pacific-New" , 0x03E53C }, - { "US/Samoa" , 0x03E941 }, - { "UTC" , 0x03E9CA }, - { "W-SU" , 0x03ECC1 }, - { "WET" , 0x03EA0E }, - { "Zulu" , 0x03EEFB }, + { "Africa/Juba" , 0x0010EA }, + { "Africa/Kampala" , 0x0011FD }, + { "Africa/Khartoum" , 0x00127C }, + { "Africa/Kigali" , 0x00138F }, + { "Africa/Kinshasa" , 0x0013E4 }, + { "Africa/Lagos" , 0x00143F }, + { "Africa/Libreville" , 0x001494 }, + { "Africa/Lome" , 0x0014E9 }, + { "Africa/Luanda" , 0x00152D }, + { "Africa/Lubumbashi" , 0x001582 }, + { "Africa/Lusaka" , 0x0015DD }, + { "Africa/Malabo" , 0x001632 }, + { "Africa/Maputo" , 0x001698 }, + { "Africa/Maseru" , 0x0016ED }, + { "Africa/Mbabane" , 0x001755 }, + { "Africa/Mogadishu" , 0x0017AB }, + { "Africa/Monrovia" , 0x001806 }, + { "Africa/Nairobi" , 0x00186C }, + { "Africa/Ndjamena" , 0x0018EB }, + { "Africa/Niamey" , 0x001957 }, + { "Africa/Nouakchott" , 0x0019CA }, + { "Africa/Ouagadougou" , 0x001A35 }, + { "Africa/Porto-Novo" , 0x001A8A }, + { "Africa/Sao_Tome" , 0x001AF0 }, + { "Africa/Timbuktu" , 0x001B45 }, + { "Africa/Tripoli" , 0x001BB0 }, + { "Africa/Tunis" , 0x001CAA }, + { "Africa/Windhoek" , 0x001DBC }, + { "America/Adak" , 0x002003 }, + { "America/Anchorage" , 0x002379 }, + { "America/Anguilla" , 0x0026ED }, + { "America/Antigua" , 0x002742 }, + { "America/Araguaina" , 0x0027A8 }, + { "America/Argentina/Buenos_Aires" , 0x002903 }, + { "America/Argentina/Catamarca" , 0x002AB1 }, + { "America/Argentina/ComodRivadavia" , 0x002C72 }, + { "America/Argentina/Cordoba" , 0x002E18 }, + { "America/Argentina/Jujuy" , 0x002FED }, + { "America/Argentina/La_Rioja" , 0x0031A1 }, + { "America/Argentina/Mendoza" , 0x003359 }, + { "America/Argentina/Rio_Gallegos" , 0x003519 }, + { "America/Argentina/Salta" , 0x0036CE }, + { "America/Argentina/San_Juan" , 0x00387A }, + { "America/Argentina/San_Luis" , 0x003A32 }, + { "America/Argentina/Tucuman" , 0x003BF8 }, + { "America/Argentina/Ushuaia" , 0x003DB4 }, + { "America/Aruba" , 0x003F6F }, + { "America/Asuncion" , 0x003FD5 }, + { "America/Atikokan" , 0x0042BA }, + { "America/Atka" , 0x004390 }, + { "America/Bahia" , 0x0046F6 }, + { "America/Bahia_Banderas" , 0x004988 }, + { "America/Barbados" , 0x004C01 }, + { "America/Belem" , 0x004C9B }, + { "America/Belize" , 0x004D96 }, + { "America/Blanc-Sablon" , 0x004F12 }, + { "America/Boa_Vista" , 0x004FC6 }, + { "America/Bogota" , 0x0050CF }, + { "America/Boise" , 0x00513B }, + { "America/Buenos_Aires" , 0x0054D2 }, + { "America/Cambridge_Bay" , 0x00566B }, + { "America/Campo_Grande" , 0x005993 }, + { "America/Cancun" , 0x005C82 }, + { "America/Caracas" , 0x005EC4 }, + { "America/Catamarca" , 0x005F2B }, + { "America/Cayenne" , 0x0060D1 }, + { "America/Cayman" , 0x006133 }, + { "America/Chicago" , 0x006188 }, + { "America/Chihuahua" , 0x00669F }, + { "America/Coral_Harbour" , 0x00690A }, + { "America/Cordoba" , 0x00699C }, + { "America/Costa_Rica" , 0x006B42 }, + { "America/Cuiaba" , 0x006BCC }, + { "America/Curacao" , 0x006EAA }, + { "America/Danmarkshavn" , 0x006F10 }, + { "America/Dawson" , 0x007054 }, + { "America/Dawson_Creek" , 0x007371 }, + { "America/Denver" , 0x00754B }, + { "America/Detroit" , 0x0078D1 }, + { "America/Dominica" , 0x007C30 }, + { "America/Edmonton" , 0x007C85 }, + { "America/Eirunepe" , 0x00803D }, + { "America/El_Salvador" , 0x008150 }, + { "America/Ensenada" , 0x0081C5 }, + { "America/Fort_Wayne" , 0x00866C }, + { "America/Fortaleza" , 0x00852E }, + { "America/Glace_Bay" , 0x0088D6 }, + { "America/Godthab" , 0x008C4D }, + { "America/Goose_Bay" , 0x008F11 }, + { "America/Grand_Turk" , 0x0093CE }, + { "America/Grenada" , 0x00967D }, + { "America/Guadeloupe" , 0x0096D2 }, + { "America/Guatemala" , 0x009727 }, + { "America/Guayaquil" , 0x0097B0 }, + { "America/Guyana" , 0x00980D }, + { "America/Halifax" , 0x00988E }, + { "America/Havana" , 0x009DA4 }, + { "America/Hermosillo" , 0x00A117 }, + { "America/Indiana/Indianapolis" , 0x00A1F5 }, + { "America/Indiana/Knox" , 0x00A486 }, + { "America/Indiana/Marengo" , 0x00A81D }, + { "America/Indiana/Petersburg" , 0x00AAC3 }, + { "America/Indiana/Tell_City" , 0x00B010 }, + { "America/Indiana/Vevay" , 0x00B2A9 }, + { "America/Indiana/Vincennes" , 0x00B4E4 }, + { "America/Indiana/Winamac" , 0x00B798 }, + { "America/Indianapolis" , 0x00ADA6 }, + { "America/Inuvik" , 0x00BA51 }, + { "America/Iqaluit" , 0x00BD48 }, + { "America/Jamaica" , 0x00C06A }, + { "America/Jujuy" , 0x00C12F }, + { "America/Juneau" , 0x00C2D9 }, + { "America/Kentucky/Louisville" , 0x00C657 }, + { "America/Kentucky/Monticello" , 0x00CA75 }, + { "America/Knox_IN" , 0x00CDFA }, + { "America/Kralendijk" , 0x00D16B }, + { "America/La_Paz" , 0x00D1D1 }, + { "America/Lima" , 0x00D238 }, + { "America/Los_Angeles" , 0x00D2E0 }, + { "America/Louisville" , 0x00D6F1 }, + { "America/Lower_Princes" , 0x00DAE6 }, + { "America/Maceio" , 0x00DB4C }, + { "America/Managua" , 0x00DC86 }, + { "America/Manaus" , 0x00DD39 }, + { "America/Marigot" , 0x00DE3B }, + { "America/Martinique" , 0x00DE90 }, + { "America/Matamoros" , 0x00DEFC }, + { "America/Mazatlan" , 0x00E155 }, + { "America/Mendoza" , 0x00E3C2 }, + { "America/Menominee" , 0x00E576 }, + { "America/Merida" , 0x00E8F7 }, + { "America/Metlakatla" , 0x00EB32 }, + { "America/Mexico_City" , 0x00EC6C }, + { "America/Miquelon" , 0x00EEE7 }, + { "America/Moncton" , 0x00F159 }, + { "America/Monterrey" , 0x00F5F0 }, + { "America/Montevideo" , 0x00F853 }, + { "America/Montreal" , 0x00FB65 }, + { "America/Montserrat" , 0x01007B }, + { "America/Nassau" , 0x0100D0 }, + { "America/New_York" , 0x010415 }, + { "America/Nipigon" , 0x010920 }, + { "America/Nome" , 0x010C71 }, + { "America/Noronha" , 0x010FEF }, + { "America/North_Dakota/Beulah" , 0x01111F }, + { "America/North_Dakota/Center" , 0x0114B3 }, + { "America/North_Dakota/New_Salem" , 0x011847 }, + { "America/Ojinaga" , 0x011BF0 }, + { "America/Panama" , 0x011E51 }, + { "America/Pangnirtung" , 0x011EA6 }, + { "America/Paramaribo" , 0x0121DC }, + { "America/Phoenix" , 0x01226E }, + { "America/Port-au-Prince" , 0x01231C }, + { "America/Port_of_Spain" , 0x012537 }, + { "America/Porto_Acre" , 0x012438 }, + { "America/Porto_Velho" , 0x01258C }, + { "America/Puerto_Rico" , 0x012682 }, + { "America/Rainy_River" , 0x0126ED }, + { "America/Rankin_Inlet" , 0x012A25 }, + { "America/Recife" , 0x012D0B }, + { "America/Regina" , 0x012E35 }, + { "America/Resolute" , 0x012FF3 }, + { "America/Rio_Branco" , 0x0132E4 }, + { "America/Rosario" , 0x0133E7 }, + { "America/Santa_Isabel" , 0x01358D }, + { "America/Santarem" , 0x013930 }, + { "America/Santiago" , 0x013A35 }, + { "America/Santo_Domingo" , 0x013DDE }, + { "America/Sao_Paulo" , 0x013EA4 }, + { "America/Scoresbysund" , 0x0141B3 }, + { "America/Shiprock" , 0x0144A1 }, + { "America/Sitka" , 0x014830 }, + { "America/St_Barthelemy" , 0x014BB8 }, + { "America/St_Johns" , 0x014C0D }, + { "America/St_Kitts" , 0x015160 }, + { "America/St_Lucia" , 0x0151B5 }, + { "America/St_Thomas" , 0x01520A }, + { "America/St_Vincent" , 0x01525F }, + { "America/Swift_Current" , 0x0152B4 }, + { "America/Tegucigalpa" , 0x0153D5 }, + { "America/Thule" , 0x015454 }, + { "America/Thunder_Bay" , 0x01569B }, + { "America/Tijuana" , 0x0159E4 }, + { "America/Toronto" , 0x015D7D }, + { "America/Tortola" , 0x016294 }, + { "America/Vancouver" , 0x0162E9 }, + { "America/Virgin" , 0x016726 }, + { "America/Whitehorse" , 0x01677B }, + { "America/Winnipeg" , 0x016A98 }, + { "America/Yakutat" , 0x016ED8 }, + { "America/Yellowknife" , 0x017243 }, + { "Antarctica/Casey" , 0x017553 }, + { "Antarctica/Davis" , 0x0175DE }, + { "Antarctica/DumontDUrville" , 0x017675 }, + { "Antarctica/Macquarie" , 0x017707 }, + { "Antarctica/Mawson" , 0x017981 }, + { "Antarctica/McMurdo" , 0x0179FD }, + { "Antarctica/Palmer" , 0x017CFF }, + { "Antarctica/Rothera" , 0x01801B }, + { "Antarctica/South_Pole" , 0x018091 }, + { "Antarctica/Syowa" , 0x018399 }, + { "Antarctica/Vostok" , 0x018407 }, + { "Arctic/Longyearbyen" , 0x018478 }, + { "Asia/Aden" , 0x0187AA }, + { "Asia/Almaty" , 0x0187FF }, + { "Asia/Amman" , 0x01897E }, + { "Asia/Anadyr" , 0x018C3E }, + { "Asia/Aqtau" , 0x018E23 }, + { "Asia/Aqtobe" , 0x019022 }, + { "Asia/Ashgabat" , 0x0191DA }, + { "Asia/Ashkhabad" , 0x0192F7 }, + { "Asia/Baghdad" , 0x019414 }, + { "Asia/Bahrain" , 0x019589 }, + { "Asia/Baku" , 0x0195EF }, + { "Asia/Bangkok" , 0x0198D7 }, + { "Asia/Beirut" , 0x01992C }, + { "Asia/Bishkek" , 0x019C39 }, + { "Asia/Brunei" , 0x019DE5 }, + { "Asia/Calcutta" , 0x019E47 }, + { "Asia/Choibalsan" , 0x019EC0 }, + { "Asia/Chongqing" , 0x01A039 }, + { "Asia/Chungking" , 0x01A128 }, + { "Asia/Colombo" , 0x01A1D7 }, + { "Asia/Dacca" , 0x01A273 }, + { "Asia/Damascus" , 0x01A319 }, + { "Asia/Dhaka" , 0x01A669 }, + { "Asia/Dili" , 0x01A70F }, + { "Asia/Dubai" , 0x01A798 }, + { "Asia/Dushanbe" , 0x01A7ED }, + { "Asia/Gaza" , 0x01A8F0 }, + { "Asia/Harbin" , 0x01AB3F }, + { "Asia/Hebron" , 0x01AC26 }, + { "Asia/Ho_Chi_Minh" , 0x01AE7E }, + { "Asia/Hong_Kong" , 0x01AEF6 }, + { "Asia/Hovd" , 0x01B0B8 }, + { "Asia/Irkutsk" , 0x01B230 }, + { "Asia/Istanbul" , 0x01B416 }, + { "Asia/Jakarta" , 0x01B803 }, + { "Asia/Jayapura" , 0x01B8AD }, + { "Asia/Jerusalem" , 0x01B949 }, + { "Asia/Kabul" , 0x01BC78 }, + { "Asia/Kamchatka" , 0x01BCC9 }, + { "Asia/Karachi" , 0x01BEA5 }, + { "Asia/Kashgar" , 0x01BF5A }, + { "Asia/Kathmandu" , 0x01C02B }, + { "Asia/Katmandu" , 0x01C091 }, + { "Asia/Kolkata" , 0x01C0F7 }, + { "Asia/Krasnoyarsk" , 0x01C170 }, + { "Asia/Kuala_Lumpur" , 0x01C358 }, + { "Asia/Kuching" , 0x01C415 }, + { "Asia/Kuwait" , 0x01C503 }, + { "Asia/Macao" , 0x01C558 }, + { "Asia/Macau" , 0x01C693 }, + { "Asia/Magadan" , 0x01C7CE }, + { "Asia/Makassar" , 0x01C9B0 }, + { "Asia/Manila" , 0x01CA74 }, + { "Asia/Muscat" , 0x01CAF9 }, + { "Asia/Nicosia" , 0x01CB4E }, + { "Asia/Novokuznetsk" , 0x01CE36 }, + { "Asia/Novosibirsk" , 0x01D038 }, + { "Asia/Omsk" , 0x01D223 }, + { "Asia/Oral" , 0x01D40A }, + { "Asia/Phnom_Penh" , 0x01D5DA }, + { "Asia/Pontianak" , 0x01D652 }, + { "Asia/Pyongyang" , 0x01D713 }, + { "Asia/Qatar" , 0x01D780 }, + { "Asia/Qyzylorda" , 0x01D7E6 }, + { "Asia/Rangoon" , 0x01D9BC }, + { "Asia/Riyadh" , 0x01DA34 }, + { "Asia/Saigon" , 0x01DA89 }, + { "Asia/Sakhalin" , 0x01DB01 }, + { "Asia/Samarkand" , 0x01DCF8 }, + { "Asia/Seoul" , 0x01DE2E }, + { "Asia/Shanghai" , 0x01DED2 }, + { "Asia/Singapore" , 0x01DFB2 }, + { "Asia/Taipei" , 0x01E069 }, + { "Asia/Tashkent" , 0x01E181 }, + { "Asia/Tbilisi" , 0x01E2B2 }, + { "Asia/Tehran" , 0x01E46C }, + { "Asia/Tel_Aviv" , 0x01E6DA }, + { "Asia/Thimbu" , 0x01EA09 }, + { "Asia/Thimphu" , 0x01EA6F }, + { "Asia/Tokyo" , 0x01EAD5 }, + { "Asia/Ujung_Pandang" , 0x01EB5E }, + { "Asia/Ulaanbaatar" , 0x01EBDA }, + { "Asia/Ulan_Bator" , 0x01ED35 }, + { "Asia/Urumqi" , 0x01EE82 }, + { "Asia/Vientiane" , 0x01EF49 }, + { "Asia/Vladivostok" , 0x01EFC1 }, + { "Asia/Yakutsk" , 0x01F1AD }, + { "Asia/Yekaterinburg" , 0x01F392 }, + { "Asia/Yerevan" , 0x01F59D }, + { "Atlantic/Azores" , 0x01F8A1 }, + { "Atlantic/Bermuda" , 0x01FDA4 }, + { "Atlantic/Canary" , 0x020085 }, + { "Atlantic/Cape_Verde" , 0x02035B }, + { "Atlantic/Faeroe" , 0x0203D4 }, + { "Atlantic/Faroe" , 0x020678 }, + { "Atlantic/Jan_Mayen" , 0x02091C }, + { "Atlantic/Madeira" , 0x020C4E }, + { "Atlantic/Reykjavik" , 0x021157 }, + { "Atlantic/South_Georgia" , 0x021310 }, + { "Atlantic/St_Helena" , 0x02161E }, + { "Atlantic/Stanley" , 0x021354 }, + { "Australia/ACT" , 0x021673 }, + { "Australia/Adelaide" , 0x021990 }, + { "Australia/Brisbane" , 0x021CBC }, + { "Australia/Broken_Hill" , 0x021D83 }, + { "Australia/Canberra" , 0x0220C1 }, + { "Australia/Currie" , 0x0223DE }, + { "Australia/Darwin" , 0x022711 }, + { "Australia/Eucla" , 0x022797 }, + { "Australia/Hobart" , 0x02286C }, + { "Australia/LHI" , 0x022BCA }, + { "Australia/Lindeman" , 0x022E65 }, + { "Australia/Lord_Howe" , 0x022F46 }, + { "Australia/Melbourne" , 0x0231F1 }, + { "Australia/North" , 0x023516 }, + { "Australia/NSW" , 0x02358A }, + { "Australia/Perth" , 0x0238A7 }, + { "Australia/Queensland" , 0x02397F }, + { "Australia/South" , 0x023A2B }, + { "Australia/Sydney" , 0x023D48 }, + { "Australia/Tasmania" , 0x024085 }, + { "Australia/Victoria" , 0x0243CA }, + { "Australia/West" , 0x0246E7 }, + { "Australia/Yancowinna" , 0x02479D }, + { "Brazil/Acre" , 0x024ABF }, + { "Brazil/DeNoronha" , 0x024BBE }, + { "Brazil/East" , 0x024CDE }, + { "Brazil/West" , 0x024FBB }, + { "Canada/Atlantic" , 0x0250B3 }, + { "Canada/Central" , 0x02559B }, + { "Canada/East-Saskatchewan" , 0x025EA5 }, + { "Canada/Eastern" , 0x0259B5 }, + { "Canada/Mountain" , 0x02602E }, + { "Canada/Newfoundland" , 0x0263A4 }, + { "Canada/Pacific" , 0x0268CF }, + { "Canada/Saskatchewan" , 0x026CE8 }, + { "Canada/Yukon" , 0x026E71 }, + { "CET" , 0x027174 }, + { "Chile/Continental" , 0x02747D }, + { "Chile/EasterIsland" , 0x027818 }, + { "CST6CDT" , 0x027B5A }, + { "Cuba" , 0x027EAB }, + { "EET" , 0x02821E }, + { "Egypt" , 0x0284D1 }, + { "Eire" , 0x028794 }, + { "EST" , 0x028CA5 }, + { "EST5EDT" , 0x028CE9 }, + { "Etc/GMT" , 0x02903A }, + { "Etc/GMT+0" , 0x029106 }, + { "Etc/GMT+1" , 0x029190 }, + { "Etc/GMT+10" , 0x02921D }, + { "Etc/GMT+11" , 0x0292AB }, + { "Etc/GMT+12" , 0x029339 }, + { "Etc/GMT+2" , 0x029454 }, + { "Etc/GMT+3" , 0x0294E0 }, + { "Etc/GMT+4" , 0x02956C }, + { "Etc/GMT+5" , 0x0295F8 }, + { "Etc/GMT+6" , 0x029684 }, + { "Etc/GMT+7" , 0x029710 }, + { "Etc/GMT+8" , 0x02979C }, + { "Etc/GMT+9" , 0x029828 }, + { "Etc/GMT-0" , 0x0290C2 }, + { "Etc/GMT-1" , 0x02914A }, + { "Etc/GMT-10" , 0x0291D6 }, + { "Etc/GMT-11" , 0x029264 }, + { "Etc/GMT-12" , 0x0292F2 }, + { "Etc/GMT-13" , 0x029380 }, + { "Etc/GMT-14" , 0x0293C7 }, + { "Etc/GMT-2" , 0x02940E }, + { "Etc/GMT-3" , 0x02949A }, + { "Etc/GMT-4" , 0x029526 }, + { "Etc/GMT-5" , 0x0295B2 }, + { "Etc/GMT-6" , 0x02963E }, + { "Etc/GMT-7" , 0x0296CA }, + { "Etc/GMT-8" , 0x029756 }, + { "Etc/GMT-9" , 0x0297E2 }, + { "Etc/GMT0" , 0x02907E }, + { "Etc/Greenwich" , 0x02986E }, + { "Etc/UCT" , 0x0298B2 }, + { "Etc/Universal" , 0x0298F6 }, + { "Etc/UTC" , 0x02993A }, + { "Etc/Zulu" , 0x02997E }, + { "Europe/Amsterdam" , 0x0299C2 }, + { "Europe/Andorra" , 0x029E00 }, + { "Europe/Athens" , 0x02A07C }, + { "Europe/Belfast" , 0x02A3BF }, + { "Europe/Belgrade" , 0x02A8F6 }, + { "Europe/Berlin" , 0x02ABBF }, + { "Europe/Bratislava" , 0x02AF15 }, + { "Europe/Brussels" , 0x02B247 }, + { "Europe/Bucharest" , 0x02B67E }, + { "Europe/Budapest" , 0x02B9A8 }, + { "Europe/Chisinau" , 0x02BD1B }, + { "Europe/Copenhagen" , 0x02C0A9 }, + { "Europe/Dublin" , 0x02C3B3 }, + { "Europe/Gibraltar" , 0x02C8C4 }, + { "Europe/Guernsey" , 0x02CD1B }, + { "Europe/Helsinki" , 0x02D252 }, + { "Europe/Isle_of_Man" , 0x02D508 }, + { "Europe/Istanbul" , 0x02DA3F }, + { "Europe/Jersey" , 0x02DE2C }, + { "Europe/Kaliningrad" , 0x02E363 }, + { "Europe/Kiev" , 0x02E5C9 }, + { "Europe/Lisbon" , 0x02E8E0 }, + { "Europe/Ljubljana" , 0x02EDE4 }, + { "Europe/London" , 0x02F0AD }, + { "Europe/Luxembourg" , 0x02F5E4 }, + { "Europe/Madrid" , 0x02FA3A }, + { "Europe/Malta" , 0x02FE00 }, + { "Europe/Mariehamn" , 0x0301B9 }, + { "Europe/Minsk" , 0x03046F }, + { "Europe/Monaco" , 0x03067D }, + { "Europe/Moscow" , 0x030AB8 }, + { "Europe/Nicosia" , 0x030D09 }, + { "Europe/Oslo" , 0x030FF1 }, + { "Europe/Paris" , 0x031323 }, + { "Europe/Podgorica" , 0x031769 }, + { "Europe/Prague" , 0x031A32 }, + { "Europe/Riga" , 0x031D64 }, + { "Europe/Rome" , 0x0320A9 }, + { "Europe/Samara" , 0x03246C }, + { "Europe/San_Marino" , 0x03269C }, + { "Europe/Sarajevo" , 0x032A5F }, + { "Europe/Simferopol" , 0x032D28 }, + { "Europe/Skopje" , 0x033053 }, + { "Europe/Sofia" , 0x03331C }, + { "Europe/Stockholm" , 0x033624 }, + { "Europe/Tallinn" , 0x0338D3 }, + { "Europe/Tirane" , 0x033C0D }, + { "Europe/Tiraspol" , 0x033F13 }, + { "Europe/Uzhgorod" , 0x0342A1 }, + { "Europe/Vaduz" , 0x0345B8 }, + { "Europe/Vatican" , 0x03484B }, + { "Europe/Vienna" , 0x034C0E }, + { "Europe/Vilnius" , 0x034F3B }, + { "Europe/Volgograd" , 0x03527A }, + { "Europe/Warsaw" , 0x03547A }, + { "Europe/Zagreb" , 0x03585B }, + { "Europe/Zaporozhye" , 0x035B24 }, + { "Europe/Zurich" , 0x035E65 }, + { "Factory" , 0x036114 }, + { "GB" , 0x036185 }, + { "GB-Eire" , 0x0366BC }, + { "GMT" , 0x036BF3 }, + { "GMT+0" , 0x036CBF }, + { "GMT-0" , 0x036C7B }, + { "GMT0" , 0x036C37 }, + { "Greenwich" , 0x036D03 }, + { "Hongkong" , 0x036D47 }, + { "HST" , 0x036F09 }, + { "Iceland" , 0x036F4D }, + { "Indian/Antananarivo" , 0x037106 }, + { "Indian/Chagos" , 0x03717A }, + { "Indian/Christmas" , 0x0371DC }, + { "Indian/Cocos" , 0x037220 }, + { "Indian/Comoro" , 0x037264 }, + { "Indian/Kerguelen" , 0x0372B9 }, + { "Indian/Mahe" , 0x03730E }, + { "Indian/Maldives" , 0x037363 }, + { "Indian/Mauritius" , 0x0373B8 }, + { "Indian/Mayotte" , 0x03742E }, + { "Indian/Reunion" , 0x037483 }, + { "Iran" , 0x0374D8 }, + { "Israel" , 0x037746 }, + { "Jamaica" , 0x037A75 }, + { "Japan" , 0x037B3A }, + { "Kwajalein" , 0x037BC3 }, + { "Libya" , 0x037C26 }, + { "MET" , 0x037D20 }, + { "Mexico/BajaNorte" , 0x038029 }, + { "Mexico/BajaSur" , 0x038392 }, + { "Mexico/General" , 0x0385D7 }, + { "MST" , 0x038835 }, + { "MST7MDT" , 0x038879 }, + { "Navajo" , 0x038BCA }, + { "NZ" , 0x038F43 }, + { "NZ-CHAT" , 0x0392C1 }, + { "Pacific/Apia" , 0x0395A9 }, + { "Pacific/Auckland" , 0x039646 }, + { "Pacific/Chatham" , 0x0399D2 }, + { "Pacific/Chuuk" , 0x039CC9 }, + { "Pacific/Easter" , 0x039D22 }, + { "Pacific/Efate" , 0x03A080 }, + { "Pacific/Enderbury" , 0x03A146 }, + { "Pacific/Fakaofo" , 0x03A1B4 }, + { "Pacific/Fiji" , 0x03A1F8 }, + { "Pacific/Funafuti" , 0x03A28C }, + { "Pacific/Galapagos" , 0x03A2D0 }, + { "Pacific/Gambier" , 0x03A348 }, + { "Pacific/Guadalcanal" , 0x03A3AD }, + { "Pacific/Guam" , 0x03A402 }, + { "Pacific/Honolulu" , 0x03A458 }, + { "Pacific/Johnston" , 0x03A4CF }, + { "Pacific/Kiritimati" , 0x03A521 }, + { "Pacific/Kosrae" , 0x03A58C }, + { "Pacific/Kwajalein" , 0x03A5E9 }, + { "Pacific/Majuro" , 0x03A655 }, + { "Pacific/Marquesas" , 0x03A6B4 }, + { "Pacific/Midway" , 0x03A71B }, + { "Pacific/Nauru" , 0x03A7A5 }, + { "Pacific/Niue" , 0x03A81D }, + { "Pacific/Norfolk" , 0x03A87B }, + { "Pacific/Noumea" , 0x03A8D0 }, + { "Pacific/Pago_Pago" , 0x03A960 }, + { "Pacific/Palau" , 0x03A9E9 }, + { "Pacific/Pitcairn" , 0x03AA2D }, + { "Pacific/Pohnpei" , 0x03AA82 }, + { "Pacific/Ponape" , 0x03AAD7 }, + { "Pacific/Port_Moresby" , 0x03AB1C }, + { "Pacific/Rarotonga" , 0x03AB60 }, + { "Pacific/Saipan" , 0x03AC3C }, + { "Pacific/Samoa" , 0x03AC9F }, + { "Pacific/Tahiti" , 0x03AD28 }, + { "Pacific/Tarawa" , 0x03AD8D }, + { "Pacific/Tongatapu" , 0x03ADE1 }, + { "Pacific/Truk" , 0x03AE6D }, + { "Pacific/Wake" , 0x03AEB2 }, + { "Pacific/Wallis" , 0x03AF02 }, + { "Pacific/Yap" , 0x03AF46 }, + { "Poland" , 0x03AF8B }, + { "Portugal" , 0x03B36C }, + { "PRC" , 0x03B868 }, + { "PST8PDT" , 0x03B919 }, + { "ROC" , 0x03BC6A }, + { "ROK" , 0x03BD82 }, + { "Singapore" , 0x03BE26 }, + { "Turkey" , 0x03BEDD }, + { "UCT" , 0x03C2CA }, + { "Universal" , 0x03C30E }, + { "US/Alaska" , 0x03C352 }, + { "US/Aleutian" , 0x03C6BB }, + { "US/Arizona" , 0x03CA21 }, + { "US/Central" , 0x03CAAF }, + { "US/East-Indiana" , 0x03D4B9 }, + { "US/Eastern" , 0x03CFBA }, + { "US/Hawaii" , 0x03D723 }, + { "US/Indiana-Starke" , 0x03D794 }, + { "US/Michigan" , 0x03DB05 }, + { "US/Mountain" , 0x03DE3C }, + { "US/Pacific" , 0x03E1B5 }, + { "US/Pacific-New" , 0x03E5BA }, + { "US/Samoa" , 0x03E9BF }, + { "UTC" , 0x03EA48 }, + { "W-SU" , 0x03ED3F }, + { "WET" , 0x03EA8C }, + { "Zulu" , 0x03EF79 }, }; /* This is a generated file, do not modify */ -const unsigned char timelib_timezone_db_data_builtin[257855] = { +const unsigned char timelib_timezone_db_data_builtin[257981] = { /* Africa/Abidjan */ @@ -840,8 +842,8 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0E, 0xB6, 0xA3, 0xD3, 0xAC, -0xD6, 0x9D, 0x7F, 0xD0, 0xEF, 0x12, 0x66, 0xE3, 0x01, 0x02, 0x01, 0x00, 0x00, 0x24, 0xD4, 0x00, -0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x26, 0x9D, 0x00, 0x08, 0x4C, 0x4D, 0x54, +0xD6, 0x9D, 0x7F, 0xD0, 0xEF, 0x12, 0x66, 0xD4, 0x01, 0x02, 0x01, 0x00, 0x00, 0x24, 0xD4, 0x00, +0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x08, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7E, 0xF4, 0x00, 0x01, 0x4E, 0x99, 0x8D, 0x00, 0x00, 0x00, 0x00, @@ -914,13 +916,33 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x53, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x46, 0x58, 0x01, 0x3D, 0x62, 0x00, 0x00, 0x00, 0x00, 0x00, +/* Africa/Juba */ +0x50, 0x48, 0x50, 0x31, 0x01, 0x53, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0xB6, 0xA3, 0xDA, 0xE0, +0x00, 0x9E, 0x17, 0xE0, 0x01, 0x7A, 0x34, 0x50, 0x02, 0x7D, 0xF9, 0xE0, 0x03, 0x5B, 0x67, 0xD0, +0x04, 0x60, 0x7E, 0xE0, 0x05, 0x3D, 0xEC, 0xD0, 0x06, 0x40, 0x60, 0xE0, 0x07, 0x1F, 0x20, 0x50, +0x08, 0x20, 0x42, 0xE0, 0x09, 0x00, 0x53, 0xD0, 0x0A, 0x00, 0x24, 0xE0, 0x0A, 0xE1, 0x87, 0x50, +0x0B, 0xE0, 0x06, 0xE0, 0x0C, 0xC4, 0x0C, 0x50, 0x0D, 0xBF, 0xE8, 0xE0, 0x0E, 0xA5, 0x3F, 0xD0, +0x0F, 0xA9, 0x05, 0x60, 0x10, 0x86, 0x73, 0x50, 0x11, 0x88, 0xE7, 0x60, 0x12, 0x67, 0xA6, 0xD0, +0x13, 0x68, 0xC9, 0x60, 0x14, 0x4A, 0x2B, 0xD0, 0x15, 0x48, 0xAB, 0x60, 0x16, 0x2B, 0x5F, 0x50, +0x17, 0x28, 0x8D, 0x60, 0x18, 0x0C, 0x92, 0xD0, 0x19, 0x08, 0x6F, 0x60, 0x19, 0xED, 0xC6, 0x50, +0x1A, 0xF1, 0x8B, 0xE0, 0x1B, 0xD0, 0x4B, 0x50, 0x1C, 0xD1, 0x6D, 0xE0, 0x1D, 0xB1, 0x7E, 0xD0, +0x38, 0x80, 0x45, 0x20, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x00, 0x00, 0x1D, 0xA0, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, +0x01, 0x04, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x4C, 0x4D, +0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x43, 0x41, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0xBA, 0xC8, 0x01, 0x42, 0xE0, 0x40, 0x00, +0x00, 0x00, 0x00, + /* Africa/Kampala */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x47, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDF, 0x1C, -0xB4, 0xC2, 0x9A, 0xD0, 0xD6, 0x9D, 0x86, 0xD8, 0xE7, 0x8C, 0x47, 0x63, 0x01, 0x02, 0x03, 0x01, +0xB4, 0xC2, 0x9A, 0xD0, 0xD6, 0x9D, 0x86, 0xD8, 0xE7, 0x8C, 0x47, 0x54, 0x01, 0x02, 0x03, 0x01, 0x00, 0x00, 0x1E, 0x64, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, -0x00, 0x08, 0x00, 0x00, 0x26, 0x9D, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, +0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0xCF, 0xF2, 0x01, 0x44, 0x1F, 0x42, 0x00, 0x00, 0x00, 0x00, @@ -1062,9 +1084,9 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x45, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x13, 0xB1, 0xEE, 0xDA, 0xFC, -0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xE3, 0x01, 0x02, 0x03, 0x01, +0xB4, 0xC2, 0x9A, 0xD0, 0xC7, 0x91, 0x47, 0xD8, 0xED, 0x2F, 0xE1, 0xD4, 0x01, 0x02, 0x03, 0x01, 0x00, 0x00, 0x22, 0x84, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x23, 0x28, -0x00, 0x08, 0x00, 0x00, 0x26, 0x9D, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, +0x00, 0x08, 0x00, 0x00, 0x26, 0xAC, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x54, 0x00, 0x42, 0x45, 0x41, 0x55, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, 0x5E, 0xF2, 0x01, 0x4A, 0xD6, 0x02, 0x00, 0x00, 0x00, 0x00, @@ -1890,7 +1912,7 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* America/Bahia */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x3B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x6B, 0x1C, +0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x96, 0xAA, 0x6B, 0x1C, 0xB8, 0x0F, 0x49, 0xE0, 0xB8, 0xFD, 0x40, 0xA0, 0xB9, 0xF1, 0x34, 0x30, 0xBA, 0xDE, 0x74, 0x20, 0xDA, 0x38, 0xAE, 0x30, 0xDA, 0xEB, 0xFA, 0x30, 0xDC, 0x19, 0xE1, 0xB0, 0xDC, 0xB9, 0x59, 0x20, 0xDD, 0xFB, 0x15, 0x30, 0xDE, 0x9B, 0xDE, 0x20, 0xDF, 0xDD, 0x9A, 0x30, 0xE0, 0x54, 0x33, 0x20, @@ -1905,14 +1927,31 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x32, 0x57, 0x20, 0xB0, 0x33, 0x06, 0x6A, 0x20, 0x34, 0x38, 0x54, 0x30, 0x34, 0xF8, 0xC1, 0x20, 0x36, 0x20, 0x1F, 0x30, 0x36, 0xCF, 0x68, 0xA0, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xB8, 0x85, 0x20, 0x39, 0xDF, 0xE3, 0x30, 0x3A, 0x8F, 0x2C, 0xA0, 0x3B, 0xC8, 0xFF, 0xB0, 0x3C, 0x6F, 0x0E, 0xA0, -0x3D, 0xC4, 0x91, 0x30, 0x3E, 0x4E, 0xF0, 0xA0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x3D, 0xC4, 0x91, 0x30, 0x3E, 0x4E, 0xF0, 0xA0, 0x4E, 0x9A, 0x48, 0xB0, 0x4F, 0x49, 0x92, 0x20, +0x50, 0x83, 0x65, 0x30, 0x51, 0x20, 0x39, 0xA0, 0x52, 0x63, 0x47, 0x30, 0x53, 0x00, 0x1B, 0xA0, +0x54, 0x43, 0x29, 0x30, 0x54, 0xE9, 0x38, 0x20, 0x56, 0x23, 0x0B, 0x30, 0x56, 0xC9, 0x1A, 0x20, +0x58, 0x02, 0xED, 0x30, 0x58, 0xA8, 0xFC, 0x20, 0x59, 0xE2, 0xCF, 0x30, 0x5A, 0x88, 0xDE, 0x20, +0x5B, 0xCB, 0xEB, 0xB0, 0x5C, 0x68, 0xC0, 0x20, 0x5D, 0xAB, 0xCD, 0xB0, 0x5E, 0x48, 0xA2, 0x20, +0x5F, 0x8B, 0xAF, 0xB0, 0x60, 0x31, 0xBE, 0xA0, 0x61, 0x6B, 0x91, 0xB0, 0x62, 0x11, 0xA0, 0xA0, +0x63, 0x4B, 0x73, 0xB0, 0x63, 0xFA, 0xBD, 0x20, 0x65, 0x2B, 0x55, 0xB0, 0x65, 0xD1, 0x64, 0xA0, +0x67, 0x14, 0x72, 0x30, 0x67, 0xB1, 0x46, 0xA0, 0x68, 0xF4, 0x54, 0x30, 0x69, 0x9A, 0x63, 0x20, +0x6A, 0xD4, 0x36, 0x30, 0x6B, 0x7A, 0x45, 0x20, 0x6C, 0xB4, 0x18, 0x30, 0x6D, 0x5A, 0x27, 0x20, +0x6E, 0x93, 0xFA, 0x30, 0x6F, 0x3A, 0x09, 0x20, 0x70, 0x7D, 0x16, 0xB0, 0x71, 0x19, 0xEB, 0x20, +0x72, 0x5C, 0xF8, 0xB0, 0x72, 0xF9, 0xCD, 0x20, 0x74, 0x3C, 0xDA, 0xB0, 0x74, 0xD9, 0xAF, 0x20, +0x76, 0x1C, 0xBC, 0xB0, 0x76, 0xC2, 0xCB, 0xA0, 0x77, 0xFC, 0x9E, 0xB0, 0x78, 0xAB, 0xE8, 0x20, +0x79, 0xDC, 0x80, 0xB0, 0x7A, 0x82, 0x8F, 0xA0, 0x7B, 0xC5, 0x9D, 0x30, 0x7C, 0x62, 0x71, 0xA0, +0x7D, 0xA5, 0x7F, 0x30, 0x7E, 0x4B, 0x8E, 0x20, 0x7F, 0x85, 0x61, 0x30, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0xFF, 0xFF, 0xDB, 0xE4, 0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, -0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, -0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x84, 0xA2, 0x00, 0xD7, 0xE2, 0xED, -0x00, 0x00, 0x00, 0x05, 0x42, 0x61, 0x68, 0x69, 0x61, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0xFF, 0xFF, 0xDB, 0xE4, +0x00, 0x00, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x09, 0x4C, 0x4D, +0x54, 0x00, 0x42, 0x52, 0x53, 0x54, 0x00, 0x42, 0x52, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x75, 0x84, 0xA2, 0x00, 0xD7, 0xE2, 0xED, 0x00, 0x00, 0x00, 0x05, 0x42, 0x61, 0x68, +0x69, 0x61, /* America/Bahia_Banderas */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -3160,20 +3199,20 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x42, 0x4F, 0x6A, 0x7C, 0x43, 0x64, 0x37, 0x6C, 0x44, 0x2F, 0x4C, 0x7C, 0x45, 0x44, 0x19, 0x6C, 0x45, 0xF3, 0x7E, 0xFC, 0x47, 0x2D, 0x35, 0xEC, 0x47, 0xD3, 0x60, 0xFC, 0x49, 0x0D, 0x17, 0xEC, 0x49, 0xB3, 0x42, 0xFC, 0x4A, 0xEC, 0xF9, 0xEC, 0x4B, 0x9C, 0x5F, 0x7C, 0x4C, 0xD6, 0x16, 0x6C, -0x4D, 0x7C, 0x41, 0x7C, 0x4E, 0xB5, 0xF8, 0x6C, 0x4F, 0x5C, 0x23, 0x7C, 0x50, 0x95, 0xDA, 0x6C, -0x51, 0x3C, 0x05, 0x7C, 0x52, 0x75, 0xBC, 0x6C, 0x53, 0x1B, 0xE7, 0x7C, 0x54, 0x55, 0x9E, 0x6C, -0x54, 0xFB, 0xC9, 0x7C, 0x56, 0x35, 0x80, 0x6C, 0x56, 0xE4, 0xE5, 0xFC, 0x58, 0x1E, 0x9C, 0xEC, -0x58, 0xC4, 0xC7, 0xFC, 0x59, 0xFE, 0x7E, 0xEC, 0x5A, 0xA4, 0xA9, 0xFC, 0x5B, 0xDE, 0x60, 0xEC, -0x5C, 0x84, 0x8B, 0xFC, 0x5D, 0xBE, 0x42, 0xEC, 0x5E, 0x64, 0x6D, 0xFC, 0x5F, 0x9E, 0x24, 0xEC, -0x60, 0x4D, 0x8A, 0x7C, 0x61, 0x87, 0x41, 0x6C, 0x62, 0x2D, 0x6C, 0x7C, 0x63, 0x67, 0x23, 0x6C, -0x64, 0x0D, 0x4E, 0x7C, 0x65, 0x47, 0x05, 0x6C, 0x65, 0xED, 0x30, 0x7C, 0x67, 0x26, 0xE7, 0x6C, -0x67, 0xCD, 0x12, 0x7C, 0x69, 0x06, 0xC9, 0x6C, 0x69, 0xAC, 0xF4, 0x7C, 0x6A, 0xE6, 0xAB, 0x6C, -0x6B, 0x96, 0x10, 0xFC, 0x6C, 0xCF, 0xC7, 0xEC, 0x6D, 0x75, 0xF2, 0xFC, 0x6E, 0xAF, 0xA9, 0xEC, -0x6F, 0x55, 0xD4, 0xFC, 0x70, 0x8F, 0x8B, 0xEC, 0x71, 0x35, 0xB6, 0xFC, 0x72, 0x6F, 0x6D, 0xEC, -0x73, 0x15, 0x98, 0xFC, 0x74, 0x4F, 0x4F, 0xEC, 0x74, 0xFE, 0xB5, 0x7C, 0x76, 0x38, 0x6C, 0x6C, -0x76, 0xDE, 0x97, 0x7C, 0x78, 0x18, 0x4E, 0x6C, 0x78, 0xBE, 0x79, 0x7C, 0x79, 0xF8, 0x30, 0x6C, -0x7A, 0x9E, 0x5B, 0x7C, 0x7B, 0xD8, 0x12, 0x6C, 0x7C, 0x7E, 0x3D, 0x7C, 0x7D, 0xB7, 0xF4, 0x6C, -0x7E, 0x5E, 0x1F, 0x7C, 0x7F, 0x97, 0xD6, 0x6C, 0x01, 0x00, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x4D, 0x7C, 0x41, 0x7C, 0x4E, 0xB6, 0x14, 0x50, 0x4F, 0x5C, 0x3F, 0x60, 0x50, 0x95, 0xF6, 0x50, +0x51, 0x3C, 0x21, 0x60, 0x52, 0x75, 0xD8, 0x50, 0x53, 0x1C, 0x03, 0x60, 0x54, 0x55, 0xBA, 0x50, +0x54, 0xFB, 0xE5, 0x60, 0x56, 0x35, 0x9C, 0x50, 0x56, 0xE5, 0x01, 0xE0, 0x58, 0x1E, 0xB8, 0xD0, +0x58, 0xC4, 0xE3, 0xE0, 0x59, 0xFE, 0x9A, 0xD0, 0x5A, 0xA4, 0xC5, 0xE0, 0x5B, 0xDE, 0x7C, 0xD0, +0x5C, 0x84, 0xA7, 0xE0, 0x5D, 0xBE, 0x5E, 0xD0, 0x5E, 0x64, 0x89, 0xE0, 0x5F, 0x9E, 0x40, 0xD0, +0x60, 0x4D, 0xA6, 0x60, 0x61, 0x87, 0x5D, 0x50, 0x62, 0x2D, 0x88, 0x60, 0x63, 0x67, 0x3F, 0x50, +0x64, 0x0D, 0x6A, 0x60, 0x65, 0x47, 0x21, 0x50, 0x65, 0xED, 0x4C, 0x60, 0x67, 0x27, 0x03, 0x50, +0x67, 0xCD, 0x2E, 0x60, 0x69, 0x06, 0xE5, 0x50, 0x69, 0xAD, 0x10, 0x60, 0x6A, 0xE6, 0xC7, 0x50, +0x6B, 0x96, 0x2C, 0xE0, 0x6C, 0xCF, 0xE3, 0xD0, 0x6D, 0x76, 0x0E, 0xE0, 0x6E, 0xAF, 0xC5, 0xD0, +0x6F, 0x55, 0xF0, 0xE0, 0x70, 0x8F, 0xA7, 0xD0, 0x71, 0x35, 0xD2, 0xE0, 0x72, 0x6F, 0x89, 0xD0, +0x73, 0x15, 0xB4, 0xE0, 0x74, 0x4F, 0x6B, 0xD0, 0x74, 0xFE, 0xD1, 0x60, 0x76, 0x38, 0x88, 0x50, +0x76, 0xDE, 0xB3, 0x60, 0x78, 0x18, 0x6A, 0x50, 0x78, 0xBE, 0x95, 0x60, 0x79, 0xF8, 0x4C, 0x50, +0x7A, 0x9E, 0x77, 0x60, 0x7B, 0xD8, 0x2E, 0x50, 0x7C, 0x7E, 0x59, 0x60, 0x7D, 0xB8, 0x10, 0x50, +0x7E, 0x5E, 0x3B, 0x60, 0x7F, 0x97, 0xF2, 0x50, 0x01, 0x00, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x05, 0x04, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, @@ -3401,7 +3440,7 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50, 0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xDC, 0xA9, 0x50, 0x49, 0x03, 0xF9, 0x50, 0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0x9C, 0x6D, 0x50, 0x4C, 0xCC, 0xF7, 0xD0, -0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x5C, 0x31, 0x50, 0x50, 0x8C, 0xBB, 0xD0, +0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xBF, 0x4E, 0xD0, 0x4F, 0x5C, 0x31, 0x50, 0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x3C, 0x13, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x4C, 0x7F, 0xD0, 0x54, 0xFB, 0xD7, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x15, 0x7E, 0x50, 0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xD5, 0x42, 0x50, @@ -4705,8 +4744,8 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* America/Metlakatla */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x8D, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xCB, 0x89, 0x1A, 0xA0, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xCB, 0x89, 0x1A, 0xA0, 0xD2, 0x23, 0xF4, 0x70, 0xD2, 0x61, 0x26, 0x10, 0xFE, 0xB8, 0x47, 0x20, 0xFF, 0xA8, 0x2A, 0x10, 0x00, 0x98, 0x29, 0x20, 0x01, 0x88, 0x0C, 0x10, 0x02, 0x78, 0x0B, 0x20, 0x03, 0x71, 0x28, 0x90, 0x04, 0x61, 0x27, 0xA0, 0x05, 0x51, 0x0A, 0x90, 0x06, 0x41, 0x09, 0xA0, 0x07, 0x30, 0xEC, 0x90, @@ -4715,49 +4754,15 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x0F, 0xA9, 0xAE, 0x20, 0x10, 0x99, 0x91, 0x10, 0x11, 0x89, 0x90, 0x20, 0x12, 0x79, 0x73, 0x10, 0x13, 0x69, 0x72, 0x20, 0x14, 0x59, 0x55, 0x10, 0x15, 0x49, 0x54, 0x20, 0x16, 0x39, 0x37, 0x10, 0x17, 0x29, 0x36, 0x20, 0x18, 0x22, 0x53, 0x90, 0x19, 0x09, 0x18, 0x20, 0x1A, 0x02, 0x35, 0x90, -0x1A, 0xF2, 0x34, 0xA0, 0x1B, 0xE2, 0x17, 0x90, 0x1C, 0xD2, 0x16, 0xA0, 0x1D, 0xC1, 0xF9, 0x90, -0x1E, 0xB1, 0xF8, 0xA0, 0x1F, 0xA1, 0xDB, 0x90, 0x20, 0x76, 0x2B, 0x20, 0x21, 0x81, 0xBD, 0x90, -0x22, 0x56, 0x0D, 0x20, 0x23, 0x6A, 0xDA, 0x10, 0x24, 0x35, 0xEF, 0x20, 0x25, 0x4A, 0xBC, 0x10, -0x26, 0x15, 0xD1, 0x20, 0x27, 0x2A, 0x9E, 0x10, 0x27, 0xFE, 0xED, 0xA0, 0x29, 0x0A, 0x80, 0x10, -0x29, 0xDE, 0xCF, 0xA0, 0x2A, 0xEA, 0x62, 0x10, 0x2B, 0xBE, 0xB1, 0xA0, 0x2C, 0xD3, 0x7E, 0x90, -0x2D, 0x9E, 0x93, 0xA0, 0x2E, 0xB3, 0x60, 0x90, 0x2F, 0x7E, 0x75, 0xA0, 0x30, 0x93, 0x42, 0x90, -0x31, 0x67, 0x92, 0x20, 0x32, 0x73, 0x24, 0x90, 0x33, 0x47, 0x74, 0x20, 0x34, 0x53, 0x06, 0x90, -0x35, 0x27, 0x56, 0x20, 0x36, 0x32, 0xE8, 0x90, 0x37, 0x07, 0x38, 0x20, 0x38, 0x1C, 0x05, 0x10, -0x38, 0xE7, 0x1A, 0x20, 0x39, 0xFB, 0xE7, 0x10, 0x3A, 0xC6, 0xFC, 0x20, 0x3B, 0xDB, 0xC9, 0x10, -0x3C, 0xB0, 0x18, 0xA0, 0x3D, 0xBB, 0xAB, 0x10, 0x3E, 0x8F, 0xFA, 0xA0, 0x3F, 0x9B, 0x8D, 0x10, -0x40, 0x6F, 0xDC, 0xA0, 0x41, 0x84, 0xA9, 0x90, 0x42, 0x4F, 0xBE, 0xA0, 0x43, 0x64, 0x8B, 0x90, -0x44, 0x2F, 0xA0, 0xA0, 0x45, 0x44, 0x6D, 0x90, 0x45, 0xF3, 0xD3, 0x20, 0x47, 0x2D, 0x8A, 0x10, -0x47, 0xD3, 0xB5, 0x20, 0x49, 0x0D, 0x6C, 0x10, 0x49, 0xB3, 0x97, 0x20, 0x4A, 0xED, 0x4E, 0x10, -0x4B, 0x9C, 0xB3, 0xA0, 0x4C, 0xD6, 0x6A, 0x90, 0x4D, 0x7C, 0x95, 0xA0, 0x4E, 0xB6, 0x4C, 0x90, -0x4F, 0x5C, 0x77, 0xA0, 0x50, 0x96, 0x2E, 0x90, 0x51, 0x3C, 0x59, 0xA0, 0x52, 0x76, 0x10, 0x90, -0x53, 0x1C, 0x3B, 0xA0, 0x54, 0x55, 0xF2, 0x90, 0x54, 0xFC, 0x1D, 0xA0, 0x56, 0x35, 0xD4, 0x90, -0x56, 0xE5, 0x3A, 0x20, 0x58, 0x1E, 0xF1, 0x10, 0x58, 0xC5, 0x1C, 0x20, 0x59, 0xFE, 0xD3, 0x10, -0x5A, 0xA4, 0xFE, 0x20, 0x5B, 0xDE, 0xB5, 0x10, 0x5C, 0x84, 0xE0, 0x20, 0x5D, 0xBE, 0x97, 0x10, -0x5E, 0x64, 0xC2, 0x20, 0x5F, 0x9E, 0x79, 0x10, 0x60, 0x4D, 0xDE, 0xA0, 0x61, 0x87, 0x95, 0x90, -0x62, 0x2D, 0xC0, 0xA0, 0x63, 0x67, 0x77, 0x90, 0x64, 0x0D, 0xA2, 0xA0, 0x65, 0x47, 0x59, 0x90, -0x65, 0xED, 0x84, 0xA0, 0x67, 0x27, 0x3B, 0x90, 0x67, 0xCD, 0x66, 0xA0, 0x69, 0x07, 0x1D, 0x90, -0x69, 0xAD, 0x48, 0xA0, 0x6A, 0xE6, 0xFF, 0x90, 0x6B, 0x96, 0x65, 0x20, 0x6C, 0xD0, 0x1C, 0x10, -0x6D, 0x76, 0x47, 0x20, 0x6E, 0xAF, 0xFE, 0x10, 0x6F, 0x56, 0x29, 0x20, 0x70, 0x8F, 0xE0, 0x10, -0x71, 0x36, 0x0B, 0x20, 0x72, 0x6F, 0xC2, 0x10, 0x73, 0x15, 0xED, 0x20, 0x74, 0x4F, 0xA4, 0x10, -0x74, 0xFF, 0x09, 0xA0, 0x76, 0x38, 0xC0, 0x90, 0x76, 0xDE, 0xEB, 0xA0, 0x78, 0x18, 0xA2, 0x90, -0x78, 0xBE, 0xCD, 0xA0, 0x79, 0xF8, 0x84, 0x90, 0x7A, 0x9E, 0xAF, 0xA0, 0x7B, 0xD8, 0x66, 0x90, -0x7C, 0x7E, 0x91, 0xA0, 0x7D, 0xB8, 0x48, 0x90, 0x7E, 0x5E, 0x73, 0xA0, 0x7F, 0x98, 0x2A, 0x90, 0x01, 0x02, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0xFF, 0xFF, 0x8F, -0x80, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x08, 0xFF, -0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x10, 0xFF, 0xFF, 0x9D, 0x90, 0x01, -0x10, 0x50, 0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, -0x00, 0x4D, 0x65, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, -0x00, 0x00, 0x00, 0xDD, 0x72, 0x36, 0x00, 0x49, 0xE3, 0x79, 0x00, 0x00, 0x00, 0x20, 0x4D, 0x65, -0x74, 0x6C, 0x61, 0x6B, 0x61, 0x74, 0x6C, 0x61, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, -0x41, 0x6E, 0x6E, 0x65, 0x74, 0x74, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, +0x04, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x00, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x04, 0xFF, 0xFF, 0x9D, +0x90, 0x01, 0x08, 0xFF, 0xFF, 0x9D, 0x90, 0x01, 0x0C, 0xFF, 0xFF, 0x8F, 0x80, 0x00, 0x10, 0x50, +0x53, 0x54, 0x00, 0x50, 0x57, 0x54, 0x00, 0x50, 0x50, 0x54, 0x00, 0x50, 0x44, 0x54, 0x00, 0x4D, +0x65, 0x53, 0x54, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xDD, +0x72, 0x36, 0x00, 0x49, 0xE3, 0x79, 0x00, 0x00, 0x00, 0x20, 0x4D, 0x65, 0x74, 0x6C, 0x61, 0x6B, +0x61, 0x74, 0x6C, 0x61, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x41, 0x6E, 0x6E, 0x65, +0x74, 0x74, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, /* America/Mexico_City */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x58, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5916,8 +5921,8 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* America/Resolute */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x15, 0xD5, 0xFB, 0x81, 0x80, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x15, 0xD5, 0xFB, 0x81, 0x80, 0xF7, 0x2F, 0x4C, 0x60, 0xF8, 0x28, 0x77, 0xE0, 0x13, 0x69, 0x56, 0x00, 0x14, 0x59, 0x38, 0xF0, 0x15, 0x49, 0x38, 0x00, 0x16, 0x39, 0x1A, 0xF0, 0x17, 0x29, 0x1A, 0x00, 0x18, 0x22, 0x37, 0x70, 0x19, 0x08, 0xFC, 0x00, 0x1A, 0x02, 0x19, 0x70, 0x1A, 0xF2, 0x18, 0x80, 0x1B, 0xE1, 0xFB, 0x70, @@ -5932,37 +5937,37 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x3A, 0xC6, 0xE0, 0x00, 0x3B, 0xDB, 0xAC, 0xF0, 0x3C, 0xAF, 0xFC, 0x80, 0x3D, 0xBB, 0x8E, 0xF0, 0x3E, 0x8F, 0xDE, 0x80, 0x3F, 0x9B, 0x70, 0xF0, 0x40, 0x6F, 0xC0, 0x80, 0x41, 0x84, 0x8D, 0x70, 0x42, 0x4F, 0xA2, 0x80, 0x43, 0x64, 0x6F, 0x70, 0x44, 0x2F, 0x84, 0x80, 0x45, 0x44, 0x51, 0x70, -0x45, 0xF3, 0xA8, 0xF0, 0x47, 0x2D, 0x6D, 0xF0, 0x47, 0xD3, 0x8A, 0xF0, 0x49, 0x0D, 0x4F, 0xF0, -0x49, 0xB3, 0x6C, 0xF0, 0x4A, 0xED, 0x31, 0xF0, 0x4B, 0x9C, 0x89, 0x70, 0x4C, 0xD6, 0x4E, 0x70, -0x4D, 0x7C, 0x6B, 0x70, 0x4E, 0xB6, 0x30, 0x70, 0x4F, 0x5C, 0x4D, 0x70, 0x50, 0x96, 0x12, 0x70, -0x51, 0x3C, 0x2F, 0x70, 0x52, 0x75, 0xF4, 0x70, 0x53, 0x1C, 0x11, 0x70, 0x54, 0x55, 0xD6, 0x70, -0x54, 0xFB, 0xF3, 0x70, 0x56, 0x35, 0xB8, 0x70, 0x56, 0xE5, 0x0F, 0xF0, 0x58, 0x1E, 0xD4, 0xF0, -0x58, 0xC4, 0xF1, 0xF0, 0x59, 0xFE, 0xB6, 0xF0, 0x5A, 0xA4, 0xD3, 0xF0, 0x5B, 0xDE, 0x98, 0xF0, -0x5C, 0x84, 0xB5, 0xF0, 0x5D, 0xBE, 0x7A, 0xF0, 0x5E, 0x64, 0x97, 0xF0, 0x5F, 0x9E, 0x5C, 0xF0, -0x60, 0x4D, 0xB4, 0x70, 0x61, 0x87, 0x79, 0x70, 0x62, 0x2D, 0x96, 0x70, 0x63, 0x67, 0x5B, 0x70, -0x64, 0x0D, 0x78, 0x70, 0x65, 0x47, 0x3D, 0x70, 0x65, 0xED, 0x5A, 0x70, 0x67, 0x27, 0x1F, 0x70, -0x67, 0xCD, 0x3C, 0x70, 0x69, 0x07, 0x01, 0x70, 0x69, 0xAD, 0x1E, 0x70, 0x6A, 0xE6, 0xE3, 0x70, -0x6B, 0x96, 0x3A, 0xF0, 0x6C, 0xCF, 0xFF, 0xF0, 0x6D, 0x76, 0x1C, 0xF0, 0x6E, 0xAF, 0xE1, 0xF0, -0x6F, 0x55, 0xFE, 0xF0, 0x70, 0x8F, 0xC3, 0xF0, 0x71, 0x35, 0xE0, 0xF0, 0x72, 0x6F, 0xA5, 0xF0, -0x73, 0x15, 0xC2, 0xF0, 0x74, 0x4F, 0x87, 0xF0, 0x74, 0xFE, 0xDF, 0x70, 0x76, 0x38, 0xA4, 0x70, -0x76, 0xDE, 0xC1, 0x70, 0x78, 0x18, 0x86, 0x70, 0x78, 0xBE, 0xA3, 0x70, 0x79, 0xF8, 0x68, 0x70, -0x7A, 0x9E, 0x85, 0x70, 0x7B, 0xD8, 0x4A, 0x70, 0x7C, 0x7E, 0x67, 0x70, 0x7D, 0xB8, 0x2C, 0x70, -0x7E, 0x5E, 0x49, 0x70, 0x7F, 0x98, 0x0E, 0x70, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x45, 0xF3, 0xB7, 0x00, 0x47, 0x2D, 0x6D, 0xF0, 0x47, 0xD3, 0x99, 0x00, 0x49, 0x0D, 0x4F, 0xF0, +0x49, 0xB3, 0x7B, 0x00, 0x4A, 0xED, 0x31, 0xF0, 0x4B, 0x9C, 0x97, 0x80, 0x4C, 0xD6, 0x4E, 0x70, +0x4D, 0x7C, 0x79, 0x80, 0x4E, 0xB6, 0x30, 0x70, 0x4F, 0x5C, 0x5B, 0x80, 0x50, 0x96, 0x12, 0x70, +0x51, 0x3C, 0x3D, 0x80, 0x52, 0x75, 0xF4, 0x70, 0x53, 0x1C, 0x1F, 0x80, 0x54, 0x55, 0xD6, 0x70, +0x54, 0xFC, 0x01, 0x80, 0x56, 0x35, 0xB8, 0x70, 0x56, 0xE5, 0x1E, 0x00, 0x58, 0x1E, 0xD4, 0xF0, +0x58, 0xC5, 0x00, 0x00, 0x59, 0xFE, 0xB6, 0xF0, 0x5A, 0xA4, 0xE2, 0x00, 0x5B, 0xDE, 0x98, 0xF0, +0x5C, 0x84, 0xC4, 0x00, 0x5D, 0xBE, 0x7A, 0xF0, 0x5E, 0x64, 0xA6, 0x00, 0x5F, 0x9E, 0x5C, 0xF0, +0x60, 0x4D, 0xC2, 0x80, 0x61, 0x87, 0x79, 0x70, 0x62, 0x2D, 0xA4, 0x80, 0x63, 0x67, 0x5B, 0x70, +0x64, 0x0D, 0x86, 0x80, 0x65, 0x47, 0x3D, 0x70, 0x65, 0xED, 0x68, 0x80, 0x67, 0x27, 0x1F, 0x70, +0x67, 0xCD, 0x4A, 0x80, 0x69, 0x07, 0x01, 0x70, 0x69, 0xAD, 0x2C, 0x80, 0x6A, 0xE6, 0xE3, 0x70, +0x6B, 0x96, 0x49, 0x00, 0x6C, 0xCF, 0xFF, 0xF0, 0x6D, 0x76, 0x2B, 0x00, 0x6E, 0xAF, 0xE1, 0xF0, +0x6F, 0x56, 0x0D, 0x00, 0x70, 0x8F, 0xC3, 0xF0, 0x71, 0x35, 0xEF, 0x00, 0x72, 0x6F, 0xA5, 0xF0, +0x73, 0x15, 0xD1, 0x00, 0x74, 0x4F, 0x87, 0xF0, 0x74, 0xFE, 0xED, 0x80, 0x76, 0x38, 0xA4, 0x70, +0x76, 0xDE, 0xCF, 0x80, 0x78, 0x18, 0x86, 0x70, 0x78, 0xBE, 0xB1, 0x80, 0x79, 0xF8, 0x68, 0x70, +0x7A, 0x9E, 0x93, 0x80, 0x7B, 0xD8, 0x4A, 0x70, 0x7C, 0x7E, 0x75, 0x80, 0x7D, 0xB8, 0x2C, 0x70, +0x7E, 0x5E, 0x57, 0x80, 0x7F, 0x98, 0x0E, 0x70, 0x02, 0x01, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, -0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x00, +0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, +0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x01, 0x04, 0xFF, 0xFF, 0xAB, 0xA0, 0x00, -0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x11, 0xFF, 0xFF, 0xB9, -0xB0, 0x00, 0x0D, 0x7A, 0x7A, 0x7A, 0x00, 0x43, 0x44, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, -0x43, 0x44, 0x54, 0x00, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0x4E, 0x33, 0x00, 0x81, 0xF5, 0xDB, 0x00, 0x00, 0x00, 0x29, -0x45, 0x61, 0x73, 0x74, 0x65, 0x72, 0x6E, 0x20, 0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, -0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, 0x52, 0x65, 0x73, 0x6F, 0x6C, 0x75, 0x74, 0x65, -0x2C, 0x20, 0x4E, 0x75, 0x6E, 0x61, 0x76, 0x75, 0x74, +0x09, 0xFF, 0xFF, 0xB9, 0xB0, 0x01, 0x0D, 0xFF, 0xFF, 0xB9, 0xB0, 0x00, 0x11, 0x7A, 0x7A, 0x7A, +0x00, 0x43, 0x44, 0x44, 0x54, 0x00, 0x43, 0x53, 0x54, 0x00, 0x43, 0x44, 0x54, 0x00, 0x45, 0x53, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFB, 0x4E, 0x33, +0x00, 0x81, 0xF5, 0xDB, 0x00, 0x00, 0x00, 0x29, 0x43, 0x65, 0x6E, 0x74, 0x72, 0x61, 0x6C, 0x20, +0x53, 0x74, 0x61, 0x6E, 0x64, 0x61, 0x72, 0x64, 0x20, 0x54, 0x69, 0x6D, 0x65, 0x20, 0x2D, 0x20, +0x52, 0x65, 0x73, 0x6F, 0x6C, 0x75, 0x74, 0x65, 0x2C, 0x20, 0x4E, 0x75, 0x6E, 0x61, 0x76, 0x75, +0x74, /* America/Rio_Branco */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -6444,20 +6449,20 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x43, 0x64, 0x30, 0x64, 0x44, 0x2F, 0x45, 0x74, 0x45, 0x44, 0x12, 0x64, 0x45, 0xF3, 0x77, 0xF4, 0x47, 0x2D, 0x2E, 0xE4, 0x47, 0xD3, 0x59, 0xF4, 0x49, 0x0D, 0x10, 0xE4, 0x49, 0xB3, 0x3B, 0xF4, 0x4A, 0xEC, 0xF2, 0xE4, 0x4B, 0x9C, 0x58, 0x74, 0x4C, 0xD6, 0x0F, 0x64, 0x4D, 0x7C, 0x3A, 0x74, -0x4E, 0xB5, 0xF1, 0x64, 0x4F, 0x5C, 0x1C, 0x74, 0x50, 0x95, 0xD3, 0x64, 0x51, 0x3B, 0xFE, 0x74, -0x52, 0x75, 0xB5, 0x64, 0x53, 0x1B, 0xE0, 0x74, 0x54, 0x55, 0x97, 0x64, 0x54, 0xFB, 0xC2, 0x74, -0x56, 0x35, 0x79, 0x64, 0x56, 0xE4, 0xDE, 0xF4, 0x58, 0x1E, 0x95, 0xE4, 0x58, 0xC4, 0xC0, 0xF4, -0x59, 0xFE, 0x77, 0xE4, 0x5A, 0xA4, 0xA2, 0xF4, 0x5B, 0xDE, 0x59, 0xE4, 0x5C, 0x84, 0x84, 0xF4, -0x5D, 0xBE, 0x3B, 0xE4, 0x5E, 0x64, 0x66, 0xF4, 0x5F, 0x9E, 0x1D, 0xE4, 0x60, 0x4D, 0x83, 0x74, -0x61, 0x87, 0x3A, 0x64, 0x62, 0x2D, 0x65, 0x74, 0x63, 0x67, 0x1C, 0x64, 0x64, 0x0D, 0x47, 0x74, -0x65, 0x46, 0xFE, 0x64, 0x65, 0xED, 0x29, 0x74, 0x67, 0x26, 0xE0, 0x64, 0x67, 0xCD, 0x0B, 0x74, -0x69, 0x06, 0xC2, 0x64, 0x69, 0xAC, 0xED, 0x74, 0x6A, 0xE6, 0xA4, 0x64, 0x6B, 0x96, 0x09, 0xF4, -0x6C, 0xCF, 0xC0, 0xE4, 0x6D, 0x75, 0xEB, 0xF4, 0x6E, 0xAF, 0xA2, 0xE4, 0x6F, 0x55, 0xCD, 0xF4, -0x70, 0x8F, 0x84, 0xE4, 0x71, 0x35, 0xAF, 0xF4, 0x72, 0x6F, 0x66, 0xE4, 0x73, 0x15, 0x91, 0xF4, -0x74, 0x4F, 0x48, 0xE4, 0x74, 0xFE, 0xAE, 0x74, 0x76, 0x38, 0x65, 0x64, 0x76, 0xDE, 0x90, 0x74, -0x78, 0x18, 0x47, 0x64, 0x78, 0xBE, 0x72, 0x74, 0x79, 0xF8, 0x29, 0x64, 0x7A, 0x9E, 0x54, 0x74, -0x7B, 0xD8, 0x0B, 0x64, 0x7C, 0x7E, 0x36, 0x74, 0x7D, 0xB7, 0xED, 0x64, 0x7E, 0x5E, 0x18, 0x74, -0x7F, 0x97, 0xCF, 0x64, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, +0x4E, 0xB6, 0x0D, 0x48, 0x4F, 0x5C, 0x38, 0x58, 0x50, 0x95, 0xEF, 0x48, 0x51, 0x3C, 0x1A, 0x58, +0x52, 0x75, 0xD1, 0x48, 0x53, 0x1B, 0xFC, 0x58, 0x54, 0x55, 0xB3, 0x48, 0x54, 0xFB, 0xDE, 0x58, +0x56, 0x35, 0x95, 0x48, 0x56, 0xE4, 0xFA, 0xD8, 0x58, 0x1E, 0xB1, 0xC8, 0x58, 0xC4, 0xDC, 0xD8, +0x59, 0xFE, 0x93, 0xC8, 0x5A, 0xA4, 0xBE, 0xD8, 0x5B, 0xDE, 0x75, 0xC8, 0x5C, 0x84, 0xA0, 0xD8, +0x5D, 0xBE, 0x57, 0xC8, 0x5E, 0x64, 0x82, 0xD8, 0x5F, 0x9E, 0x39, 0xC8, 0x60, 0x4D, 0x9F, 0x58, +0x61, 0x87, 0x56, 0x48, 0x62, 0x2D, 0x81, 0x58, 0x63, 0x67, 0x38, 0x48, 0x64, 0x0D, 0x63, 0x58, +0x65, 0x47, 0x1A, 0x48, 0x65, 0xED, 0x45, 0x58, 0x67, 0x26, 0xFC, 0x48, 0x67, 0xCD, 0x27, 0x58, +0x69, 0x06, 0xDE, 0x48, 0x69, 0xAD, 0x09, 0x58, 0x6A, 0xE6, 0xC0, 0x48, 0x6B, 0x96, 0x25, 0xD8, +0x6C, 0xCF, 0xDC, 0xC8, 0x6D, 0x76, 0x07, 0xD8, 0x6E, 0xAF, 0xBE, 0xC8, 0x6F, 0x55, 0xE9, 0xD8, +0x70, 0x8F, 0xA0, 0xC8, 0x71, 0x35, 0xCB, 0xD8, 0x72, 0x6F, 0x82, 0xC8, 0x73, 0x15, 0xAD, 0xD8, +0x74, 0x4F, 0x64, 0xC8, 0x74, 0xFE, 0xCA, 0x58, 0x76, 0x38, 0x81, 0x48, 0x76, 0xDE, 0xAC, 0x58, +0x78, 0x18, 0x63, 0x48, 0x78, 0xBE, 0x8E, 0x58, 0x79, 0xF8, 0x45, 0x48, 0x7A, 0x9E, 0x70, 0x58, +0x7B, 0xD8, 0x27, 0x48, 0x7C, 0x7E, 0x52, 0x58, 0x7D, 0xB8, 0x09, 0x48, 0x7E, 0x5E, 0x34, 0x58, +0x7F, 0x97, 0xEB, 0x48, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, @@ -8025,7 +8030,7 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* Asia/Gaza */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x90, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0, +0x00, 0x00, 0x00, 0x5C, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0, 0xCC, 0xE5, 0xC1, 0x50, 0xCD, 0xAC, 0xFE, 0x00, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, 0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xC9, 0x70, 0xD3, 0x65, 0xB0, 0x80, 0xD4, 0x6B, 0xE0, 0xD0, 0xE8, 0x36, 0x63, 0x60, 0xE8, 0xF4, 0x2D, 0x50, 0xEA, 0x0B, 0xB9, 0x60, @@ -8047,35 +8052,19 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x3D, 0xAF, 0x24, 0xD0, 0x3E, 0x9F, 0x23, 0xE0, 0x3F, 0x8F, 0x06, 0xD0, 0x40, 0x7F, 0x05, 0xE0, 0x41, 0x5C, 0x81, 0xE0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x41, 0xB7, 0xF0, 0x44, 0x2D, 0xA6, 0x60, 0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0, -0x48, 0xB7, 0x2D, 0xF0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C, -0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x8D, 0x10, 0x9C, 0x4E, 0x60, 0x0E, 0x70, 0x4F, 0x76, 0x2D, 0x1C, -0x50, 0x49, 0x2A, 0xF0, 0x51, 0x56, 0x0F, 0x1C, 0x52, 0x29, 0x0C, 0xF0, 0x53, 0x35, 0xF1, 0x1C, -0x54, 0x08, 0xEE, 0xF0, 0x55, 0x15, 0xD3, 0x1C, 0x55, 0xE8, 0xD0, 0xF0, 0x56, 0xF5, 0xB5, 0x1C, -0x57, 0xC8, 0xB2, 0xF0, 0x58, 0xD5, 0x97, 0x1C, 0x59, 0xA8, 0x94, 0xF0, 0x5A, 0xBE, 0xB3, 0x9C, -0x5B, 0x91, 0xB1, 0x70, 0x5C, 0x9E, 0x95, 0x9C, 0x5D, 0x71, 0x93, 0x70, 0x5E, 0x7E, 0x77, 0x9C, -0x5F, 0x51, 0x75, 0x70, 0x60, 0x5E, 0x59, 0x9C, 0x61, 0x31, 0x57, 0x70, 0x62, 0x3E, 0x3B, 0x9C, -0x63, 0x11, 0x39, 0x70, 0x64, 0x1E, 0x1D, 0x9C, 0x64, 0xF1, 0x1B, 0x70, 0x66, 0x07, 0x3A, 0x1C, -0x66, 0xDA, 0x37, 0xF0, 0x67, 0xE7, 0x1C, 0x1C, 0x68, 0xBA, 0x19, 0xF0, 0x69, 0xC6, 0xFE, 0x1C, -0x6A, 0x99, 0xFB, 0xF0, 0x6B, 0xA6, 0xE0, 0x1C, 0x6C, 0x79, 0xDD, 0xF0, 0x6D, 0x86, 0xC2, 0x1C, -0x6E, 0x59, 0xBF, 0xF0, 0x6F, 0x6F, 0xDE, 0x9C, 0x70, 0x42, 0xDC, 0x70, 0x71, 0x4F, 0xC0, 0x9C, -0x72, 0x22, 0xBE, 0x70, 0x73, 0x2F, 0xA2, 0x9C, 0x74, 0x02, 0xA0, 0x70, 0x75, 0x0F, 0x84, 0x9C, -0x75, 0xE2, 0x82, 0x70, 0x76, 0xEF, 0x66, 0x9C, 0x77, 0xC2, 0x64, 0x70, 0x78, 0xCF, 0x48, 0x9C, -0x79, 0xA2, 0x46, 0x70, 0x7A, 0xB8, 0x65, 0x1C, 0x7B, 0x8B, 0x62, 0xF0, 0x7C, 0x98, 0x47, 0x1C, -0x7D, 0x6B, 0x44, 0xF0, 0x7E, 0x78, 0x29, 0x1C, 0x7F, 0x4B, 0x26, 0xF0, 0x00, 0x01, 0x00, 0x01, +0x48, 0xB7, 0x11, 0xD0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C, +0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x96, 0xF3, 0xDC, 0x4E, 0x35, 0xC2, 0x50, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, 0x05, 0x02, 0x05, 0x02, 0x05, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x2A, 0x30, -0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, -0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, -0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x64, -0xF0, 0x01, 0x47, 0x40, 0x0A, 0x00, 0x00, 0x00, 0x00, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, +0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, +0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00, +0x45, 0x45, 0x53, 0x54, 0x00, 0x49, 0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB9, 0x64, 0xF0, 0x01, 0x47, 0x40, +0x0A, 0x00, 0x00, 0x00, 0x0A, 0x47, 0x61, 0x7A, 0x61, 0x20, 0x53, 0x74, 0x72, 0x69, 0x70, /* Asia/Harbin */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8094,6 +8083,46 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x6E, 0x67, 0x20, 0x28, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x4D, 0x6F, 0x68, 0x65, 0x29, 0x2C, 0x20, 0x4A, 0x69, 0x6C, 0x69, 0x6E, +/* Asia/Hebron */ +0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x5E, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x11, 0xC8, 0x59, 0xB2, 0xE0, +0xCC, 0xE5, 0xC1, 0x50, 0xCD, 0xAC, 0xFE, 0x00, 0xCE, 0xC6, 0xF4, 0xD0, 0xCF, 0x8F, 0x66, 0xE0, +0xD0, 0xA9, 0x79, 0xD0, 0xD1, 0x84, 0x60, 0xE0, 0xD2, 0x8A, 0xC9, 0x70, 0xD3, 0x65, 0xB0, 0x80, +0xD4, 0x6B, 0xE0, 0xD0, 0xE8, 0x36, 0x63, 0x60, 0xE8, 0xF4, 0x2D, 0x50, 0xEA, 0x0B, 0xB9, 0x60, +0xEA, 0xD5, 0x60, 0xD0, 0xEB, 0xEC, 0xFA, 0xF0, 0xEC, 0xB5, 0x6D, 0x00, 0xED, 0xCF, 0x7F, 0xF0, +0xEE, 0x97, 0xF2, 0x00, 0xEF, 0xB0, 0xB3, 0x70, 0xF0, 0x79, 0x25, 0x80, 0xF1, 0x91, 0xE6, 0xF0, +0xF2, 0x5A, 0x59, 0x00, 0xF3, 0x73, 0x1A, 0x70, 0xF4, 0x3B, 0x8C, 0x80, 0xF5, 0x55, 0x9F, 0x70, +0xF6, 0x1E, 0x11, 0x80, 0xF7, 0x36, 0xD2, 0xF0, 0xF7, 0xFF, 0x45, 0x00, 0xF9, 0x18, 0x06, 0x70, +0xF9, 0xE1, 0xCA, 0x00, 0xFA, 0xF9, 0x39, 0xF0, 0xFB, 0x27, 0x42, 0x50, 0x08, 0x7C, 0x8B, 0xE0, +0x08, 0xFD, 0xB0, 0xD0, 0x09, 0xF6, 0xEA, 0x60, 0x0A, 0xA6, 0x33, 0xD0, 0x1C, 0xBE, 0xF8, 0xE0, +0x1D, 0x89, 0xF1, 0xD0, 0x1E, 0xCC, 0xFF, 0x60, 0x1F, 0x60, 0x99, 0x50, 0x20, 0x82, 0xB1, 0x60, +0x21, 0x49, 0xB5, 0xD0, 0x22, 0x5D, 0x4D, 0x60, 0x23, 0x1F, 0x0B, 0xD0, 0x24, 0x5A, 0x30, 0x60, +0x25, 0x00, 0x3F, 0x50, 0x26, 0x0B, 0xED, 0xE0, 0x26, 0xD6, 0xE6, 0xD0, 0x27, 0xEB, 0xCF, 0xE0, +0x28, 0xC0, 0x03, 0x50, 0x29, 0xD4, 0xEC, 0x60, 0x2A, 0xA9, 0x1F, 0xD0, 0x2B, 0xBB, 0x65, 0xE0, +0x2C, 0x89, 0x01, 0xD0, 0x2D, 0x9B, 0x47, 0xE0, 0x2E, 0x5F, 0xA9, 0x50, 0x2F, 0x7B, 0x29, 0xE0, +0x30, 0x48, 0xC5, 0xD0, 0x30, 0xE7, 0x07, 0xE0, 0x31, 0x64, 0x46, 0x60, 0x32, 0x41, 0xC2, 0x60, +0x33, 0x44, 0x28, 0x60, 0x34, 0x21, 0xA4, 0x60, 0x35, 0x24, 0x0A, 0x60, 0x36, 0x01, 0x86, 0x60, +0x36, 0x8B, 0xF3, 0xE0, 0x37, 0x16, 0x61, 0x60, 0x38, 0x06, 0x44, 0x50, 0x38, 0xFF, 0x7D, 0xE0, +0x39, 0xEF, 0x60, 0xD0, 0x3A, 0xDF, 0x5F, 0xE0, 0x3B, 0xCF, 0x42, 0xD0, 0x3C, 0xBF, 0x41, 0xE0, +0x3D, 0xAF, 0x24, 0xD0, 0x3E, 0x9F, 0x23, 0xE0, 0x3F, 0x8F, 0x06, 0xD0, 0x40, 0x7F, 0x05, 0xE0, +0x41, 0x5C, 0x81, 0xE0, 0x42, 0x5E, 0xE7, 0xE0, 0x43, 0x41, 0xB7, 0xF0, 0x44, 0x2D, 0xA6, 0x60, +0x45, 0x12, 0xFD, 0x50, 0x46, 0x0E, 0xD9, 0xE0, 0x46, 0xE8, 0x6F, 0x70, 0x47, 0xF1, 0x5E, 0xE0, +0x48, 0xBB, 0x06, 0x50, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C, +0x4C, 0x61, 0xBD, 0xD0, 0x4D, 0x95, 0xA2, 0x5C, 0x4E, 0x35, 0xC2, 0x50, 0x4E, 0x5C, 0x0B, 0xE0, +0x4E, 0x85, 0x06, 0x80, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, +0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x01, 0x02, +0x05, 0x02, 0x05, 0x02, 0x05, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x00, 0x00, +0x2A, 0x30, 0x01, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0D, +0x00, 0x00, 0x1C, 0x20, 0x00, 0x00, 0x45, 0x45, 0x54, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x49, +0x44, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xB9, 0x71, 0xF5, 0x01, 0x48, 0x35, 0x7C, 0x00, 0x00, 0x00, 0x09, 0x57, +0x65, 0x73, 0x74, 0x20, 0x42, 0x61, 0x6E, 0x6B, + /* Asia/Ho_Chi_Minh */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x56, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, @@ -11305,20 +11334,20 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x43, 0x64, 0x30, 0x64, 0x44, 0x2F, 0x45, 0x74, 0x45, 0x44, 0x12, 0x64, 0x45, 0xF3, 0x77, 0xF4, 0x47, 0x2D, 0x2E, 0xE4, 0x47, 0xD3, 0x59, 0xF4, 0x49, 0x0D, 0x10, 0xE4, 0x49, 0xB3, 0x3B, 0xF4, 0x4A, 0xEC, 0xF2, 0xE4, 0x4B, 0x9C, 0x58, 0x74, 0x4C, 0xD6, 0x0F, 0x64, 0x4D, 0x7C, 0x3A, 0x74, -0x4E, 0xB5, 0xF1, 0x64, 0x4F, 0x5C, 0x1C, 0x74, 0x50, 0x95, 0xD3, 0x64, 0x51, 0x3B, 0xFE, 0x74, -0x52, 0x75, 0xB5, 0x64, 0x53, 0x1B, 0xE0, 0x74, 0x54, 0x55, 0x97, 0x64, 0x54, 0xFB, 0xC2, 0x74, -0x56, 0x35, 0x79, 0x64, 0x56, 0xE4, 0xDE, 0xF4, 0x58, 0x1E, 0x95, 0xE4, 0x58, 0xC4, 0xC0, 0xF4, -0x59, 0xFE, 0x77, 0xE4, 0x5A, 0xA4, 0xA2, 0xF4, 0x5B, 0xDE, 0x59, 0xE4, 0x5C, 0x84, 0x84, 0xF4, -0x5D, 0xBE, 0x3B, 0xE4, 0x5E, 0x64, 0x66, 0xF4, 0x5F, 0x9E, 0x1D, 0xE4, 0x60, 0x4D, 0x83, 0x74, -0x61, 0x87, 0x3A, 0x64, 0x62, 0x2D, 0x65, 0x74, 0x63, 0x67, 0x1C, 0x64, 0x64, 0x0D, 0x47, 0x74, -0x65, 0x46, 0xFE, 0x64, 0x65, 0xED, 0x29, 0x74, 0x67, 0x26, 0xE0, 0x64, 0x67, 0xCD, 0x0B, 0x74, -0x69, 0x06, 0xC2, 0x64, 0x69, 0xAC, 0xED, 0x74, 0x6A, 0xE6, 0xA4, 0x64, 0x6B, 0x96, 0x09, 0xF4, -0x6C, 0xCF, 0xC0, 0xE4, 0x6D, 0x75, 0xEB, 0xF4, 0x6E, 0xAF, 0xA2, 0xE4, 0x6F, 0x55, 0xCD, 0xF4, -0x70, 0x8F, 0x84, 0xE4, 0x71, 0x35, 0xAF, 0xF4, 0x72, 0x6F, 0x66, 0xE4, 0x73, 0x15, 0x91, 0xF4, -0x74, 0x4F, 0x48, 0xE4, 0x74, 0xFE, 0xAE, 0x74, 0x76, 0x38, 0x65, 0x64, 0x76, 0xDE, 0x90, 0x74, -0x78, 0x18, 0x47, 0x64, 0x78, 0xBE, 0x72, 0x74, 0x79, 0xF8, 0x29, 0x64, 0x7A, 0x9E, 0x54, 0x74, -0x7B, 0xD8, 0x0B, 0x64, 0x7C, 0x7E, 0x36, 0x74, 0x7D, 0xB7, 0xED, 0x64, 0x7E, 0x5E, 0x18, 0x74, -0x7F, 0x97, 0xCF, 0x64, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, +0x4E, 0xB6, 0x0D, 0x48, 0x4F, 0x5C, 0x38, 0x58, 0x50, 0x95, 0xEF, 0x48, 0x51, 0x3C, 0x1A, 0x58, +0x52, 0x75, 0xD1, 0x48, 0x53, 0x1B, 0xFC, 0x58, 0x54, 0x55, 0xB3, 0x48, 0x54, 0xFB, 0xDE, 0x58, +0x56, 0x35, 0x95, 0x48, 0x56, 0xE4, 0xFA, 0xD8, 0x58, 0x1E, 0xB1, 0xC8, 0x58, 0xC4, 0xDC, 0xD8, +0x59, 0xFE, 0x93, 0xC8, 0x5A, 0xA4, 0xBE, 0xD8, 0x5B, 0xDE, 0x75, 0xC8, 0x5C, 0x84, 0xA0, 0xD8, +0x5D, 0xBE, 0x57, 0xC8, 0x5E, 0x64, 0x82, 0xD8, 0x5F, 0x9E, 0x39, 0xC8, 0x60, 0x4D, 0x9F, 0x58, +0x61, 0x87, 0x56, 0x48, 0x62, 0x2D, 0x81, 0x58, 0x63, 0x67, 0x38, 0x48, 0x64, 0x0D, 0x63, 0x58, +0x65, 0x47, 0x1A, 0x48, 0x65, 0xED, 0x45, 0x58, 0x67, 0x26, 0xFC, 0x48, 0x67, 0xCD, 0x27, 0x58, +0x69, 0x06, 0xDE, 0x48, 0x69, 0xAD, 0x09, 0x58, 0x6A, 0xE6, 0xC0, 0x48, 0x6B, 0x96, 0x25, 0xD8, +0x6C, 0xCF, 0xDC, 0xC8, 0x6D, 0x76, 0x07, 0xD8, 0x6E, 0xAF, 0xBE, 0xC8, 0x6F, 0x55, 0xE9, 0xD8, +0x70, 0x8F, 0xA0, 0xC8, 0x71, 0x35, 0xCB, 0xD8, 0x72, 0x6F, 0x82, 0xC8, 0x73, 0x15, 0xAD, 0xD8, +0x74, 0x4F, 0x64, 0xC8, 0x74, 0xFE, 0xCA, 0x58, 0x76, 0x38, 0x81, 0x48, 0x76, 0xDE, 0xAC, 0x58, +0x78, 0x18, 0x63, 0x48, 0x78, 0xBE, 0x8E, 0x58, 0x79, 0xF8, 0x45, 0x48, 0x7A, 0x9E, 0x70, 0x58, +0x7B, 0xD8, 0x27, 0x48, 0x7C, 0x7E, 0x52, 0x58, 0x7D, 0xB8, 0x09, 0x48, 0x7E, 0x5E, 0x34, 0x58, +0x7F, 0x97, 0xEB, 0x48, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x05, 0x04, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, @@ -11737,7 +11766,7 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x3E, 0x8F, 0xB4, 0x50, 0x3F, 0x9B, 0x54, 0xD0, 0x40, 0x6F, 0x96, 0x50, 0x45, 0x44, 0x35, 0x50, 0x45, 0xF3, 0x8C, 0xD0, 0x47, 0x24, 0x17, 0x50, 0x47, 0xDC, 0xA9, 0x50, 0x49, 0x03, 0xF9, 0x50, 0x49, 0xB3, 0x50, 0xD0, 0x4A, 0xE3, 0xDB, 0x50, 0x4B, 0x9C, 0x6D, 0x50, 0x4C, 0xCC, 0xF7, 0xD0, -0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xAC, 0xD9, 0xD0, 0x4F, 0x5C, 0x31, 0x50, 0x50, 0x8C, 0xBB, 0xD0, +0x4D, 0x85, 0x89, 0xD0, 0x4E, 0xBF, 0x4E, 0xD0, 0x4F, 0x5C, 0x31, 0x50, 0x50, 0x8C, 0xBB, 0xD0, 0x51, 0x3C, 0x13, 0x50, 0x52, 0x6C, 0x9D, 0xD0, 0x53, 0x1B, 0xF5, 0x50, 0x54, 0x4C, 0x7F, 0xD0, 0x54, 0xFB, 0xD7, 0x50, 0x56, 0x2C, 0x61, 0xD0, 0x56, 0xE4, 0xF3, 0xD0, 0x58, 0x15, 0x7E, 0x50, 0x58, 0xC4, 0xD5, 0xD0, 0x59, 0xF5, 0x60, 0x50, 0x5A, 0xA4, 0xB7, 0xD0, 0x5B, 0xD5, 0x42, 0x50, @@ -13480,7 +13509,7 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* Europe/Kaliningrad */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1A, 0x9B, 0x0C, 0x17, 0x60, +0x00, 0x00, 0x00, 0x4D, 0x00, 0x00, 0x00, 0x0F, 0x00, 0x00, 0x00, 0x1E, 0x9B, 0x0C, 0x17, 0x60, 0x9B, 0xD5, 0xDA, 0xF0, 0x9C, 0xD9, 0xAE, 0x90, 0x9D, 0xA4, 0xB5, 0x90, 0x9E, 0xB9, 0x90, 0x90, 0x9F, 0x84, 0x97, 0x90, 0xC8, 0x09, 0x71, 0x90, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90, 0xCE, 0xA2, 0x43, 0x10, 0xCF, 0x92, 0x34, 0x10, 0xD0, 0x82, 0x25, 0x10, 0xD0, 0xFA, 0x01, 0x70, @@ -13510,13 +13539,13 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x05, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0D, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x16, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x11, 0x00, 0x00, 0x1C, 0x20, 0x00, -0x16, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x16, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, +0x16, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x1A, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x4D, 0x53, 0x44, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x45, 0x45, 0x54, -0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x01, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xDC, 0xD1, 0xF2, 0x01, 0x31, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x17, 0x4D, 0x6F, 0x73, 0x63, 0x6F, -0x77, 0x2D, 0x30, 0x31, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6C, 0x69, 0x6E, 0x69, 0x6E, 0x67, 0x72, -0x61, 0x64, +0x00, 0x46, 0x45, 0x54, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, +0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0xDC, 0xD1, 0xF2, 0x01, 0x31, 0xF0, 0x50, 0x00, 0x00, 0x00, 0x17, 0x4D, +0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2D, 0x30, 0x31, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6C, 0x69, 0x6E, +0x69, 0x6E, 0x67, 0x72, 0x61, 0x64, /* Europe/Kiev */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x55, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -14031,8 +14060,8 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* Europe/Minsk */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x1E, 0xAA, 0x19, 0xAA, 0x38, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x22, 0xAA, 0x19, 0xAA, 0x38, 0xB5, 0xA4, 0x19, 0x60, 0xCA, 0x5E, 0x70, 0xD0, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90, 0xCE, 0xA2, 0x43, 0x10, 0xCF, 0x92, 0x34, 0x10, 0xD0, 0x0A, 0x02, 0x60, 0x15, 0x27, 0xA7, 0xD0, 0x16, 0x18, 0xDC, 0x40, 0x17, 0x08, 0xDB, 0x50, 0x17, 0xFA, 0x0F, 0xC0, 0x18, 0xEA, 0x0E, 0xD0, @@ -14049,36 +14078,20 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x40, 0x66, 0x15, 0x80, 0x41, 0x84, 0x2B, 0x00, 0x42, 0x45, 0xF7, 0x80, 0x43, 0x64, 0x0D, 0x00, 0x44, 0x25, 0xD9, 0x80, 0x45, 0x43, 0xEF, 0x00, 0x46, 0x05, 0xBB, 0x80, 0x47, 0x23, 0xD1, 0x00, 0x47, 0xEE, 0xD8, 0x00, 0x49, 0x03, 0xB3, 0x00, 0x49, 0xCE, 0xBA, 0x00, 0x4A, 0xE3, 0x95, 0x00, -0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x4D, 0x8E, 0x7E, 0x00, 0x4E, 0xAC, 0x93, 0x80, -0x4F, 0x6E, 0x60, 0x00, 0x50, 0x8C, 0x75, 0x80, 0x51, 0x57, 0x7C, 0x80, 0x52, 0x6C, 0x57, 0x80, -0x53, 0x37, 0x5E, 0x80, 0x54, 0x4C, 0x39, 0x80, 0x55, 0x17, 0x40, 0x80, 0x56, 0x2C, 0x1B, 0x80, -0x56, 0xF7, 0x22, 0x80, 0x58, 0x15, 0x38, 0x00, 0x58, 0xD7, 0x04, 0x80, 0x59, 0xF5, 0x1A, 0x00, -0x5A, 0xB6, 0xE6, 0x80, 0x5B, 0xD4, 0xFC, 0x00, 0x5C, 0xA0, 0x03, 0x00, 0x5D, 0xB4, 0xDE, 0x00, -0x5E, 0x7F, 0xE5, 0x00, 0x5F, 0x94, 0xC0, 0x00, 0x60, 0x5F, 0xC7, 0x00, 0x61, 0x7D, 0xDC, 0x80, -0x62, 0x3F, 0xA9, 0x00, 0x63, 0x5D, 0xBE, 0x80, 0x64, 0x1F, 0x8B, 0x00, 0x65, 0x3D, 0xA0, 0x80, -0x66, 0x08, 0xA7, 0x80, 0x67, 0x1D, 0x82, 0x80, 0x67, 0xE8, 0x89, 0x80, 0x68, 0xFD, 0x64, 0x80, -0x69, 0xC8, 0x6B, 0x80, 0x6A, 0xDD, 0x46, 0x80, 0x6B, 0xA8, 0x4D, 0x80, 0x6C, 0xC6, 0x63, 0x00, -0x6D, 0x88, 0x2F, 0x80, 0x6E, 0xA6, 0x45, 0x00, 0x6F, 0x68, 0x11, 0x80, 0x70, 0x86, 0x27, 0x00, -0x71, 0x51, 0x2E, 0x00, 0x72, 0x66, 0x09, 0x00, 0x73, 0x31, 0x10, 0x00, 0x74, 0x45, 0xEB, 0x00, -0x75, 0x10, 0xF2, 0x00, 0x76, 0x2F, 0x07, 0x80, 0x76, 0xF0, 0xD4, 0x00, 0x78, 0x0E, 0xE9, 0x80, -0x78, 0xD0, 0xB6, 0x00, 0x79, 0xEE, 0xCB, 0x80, 0x7A, 0xB0, 0x98, 0x00, 0x7B, 0xCE, 0xAD, 0x80, -0x7C, 0x99, 0xB4, 0x80, 0x7D, 0xAE, 0x8F, 0x80, 0x7E, 0x79, 0x96, 0x80, 0x7F, 0x8E, 0x71, 0x80, -0x01, 0x02, 0x05, 0x03, 0x04, 0x03, 0x04, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x07, -0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x02, 0x09, 0x0A, 0x09, 0x0A, 0x09, -0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, -0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, -0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, +0x4B, 0xAE, 0x9C, 0x00, 0x4C, 0xCC, 0xB1, 0x80, 0x4D, 0x8E, 0x7E, 0x00, 0x01, 0x02, 0x05, 0x03, +0x04, 0x03, 0x04, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x02, 0x06, 0x07, 0x08, 0x07, 0x08, 0x07, +0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x02, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, -0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, -0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x00, 0x00, 0x19, 0xC8, 0x00, 0x00, 0x00, -0x00, 0x1C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, -0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x38, -0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, -0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x4D, 0x4D, 0x54, 0x00, 0x45, -0x45, 0x54, 0x00, 0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, -0x4D, 0x53, 0x44, 0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, -0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0xDB, 0x92, 0xF0, 0x01, 0x3C, 0xB8, 0xBA, 0x00, 0x00, 0x00, 0x00, +0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x09, 0x0A, 0x0B, +0x00, 0x00, 0x19, 0xC8, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, +0x00, 0x08, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0C, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, +0x1C, 0x20, 0x01, 0x10, 0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x08, +0x00, 0x00, 0x38, 0x40, 0x01, 0x15, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x19, 0x00, 0x00, 0x1C, 0x20, +0x00, 0x04, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x1E, 0x4D, 0x4D, 0x54, 0x00, 0x45, 0x45, 0x54, 0x00, +0x4D, 0x53, 0x4B, 0x00, 0x43, 0x45, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x4D, 0x53, 0x44, +0x00, 0x45, 0x45, 0x53, 0x54, 0x00, 0x46, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, +0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xDB, 0x92, 0xF0, 0x01, 0x3C, 0xB8, 0xBA, 0x00, 0x00, 0x00, 0x00, /* Europe/Monaco */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x43, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16544,13 +16557,15 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* Pacific/Apia */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x57, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x12, 0x91, 0x05, 0xFC, 0x00, -0xDA, 0x62, 0x04, 0x38, 0x4C, 0x9F, 0x27, 0xB0, 0x4D, 0x97, 0x2B, 0xE0, 0x01, 0x02, 0x03, 0x02, -0xFF, 0xFF, 0x5F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, -0x00, 0x09, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, -0x00, 0x57, 0x53, 0x54, 0x00, 0x57, 0x53, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x74, 0x38, 0x9A, 0x00, 0x0C, 0x9D, 0x2A, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x12, 0x91, 0x05, 0xFC, 0x00, +0xDA, 0x62, 0x04, 0x38, 0x4C, 0x9F, 0x27, 0xB0, 0x4D, 0x97, 0x2B, 0xE0, 0x4E, 0x7D, 0xE2, 0x60, +0x4E, 0xFD, 0x8B, 0xA0, 0x4F, 0x77, 0x0D, 0xE0, 0x01, 0x02, 0x03, 0x02, 0x03, 0x04, 0x05, 0xFF, +0xFF, 0x5F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x5E, 0x48, 0x00, 0x04, 0xFF, 0xFF, 0x65, 0x50, 0x00, +0x09, 0xFF, 0xFF, 0x73, 0x60, 0x01, 0x0D, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x0D, 0x00, 0x00, 0xB6, +0xD0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x57, 0x53, 0x54, 0x00, +0x57, 0x53, 0x44, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x74, 0x38, 0x9A, 0x00, 0x0C, 0x9D, 0x2A, 0x00, 0x00, 0x00, 0x00, /* Pacific/Auckland */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4E, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16759,13 +16774,14 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { /* Pacific/Fiji */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x46, 0x4A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x9A, 0x13, 0xB2, 0x3C, +0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x9A, 0x13, 0xB2, 0x3C, 0x36, 0x3B, 0x17, 0xE0, 0x36, 0xD7, 0xFA, 0x60, 0x38, 0x24, 0x34, 0x60, 0x38, 0xB7, 0xDC, 0x60, 0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60, 0x4D, 0x72, 0x41, 0xE0, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x00, 0x00, 0xA7, 0x44, 0x00, 0x00, 0x00, -0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, -0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, -0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82, 0x00, 0x00, 0x00, 0x00, +0x4E, 0xA2, 0xCC, 0x60, 0x4F, 0x1A, 0xC4, 0xE0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x01, 0x02, 0x00, 0x00, 0xA7, 0x44, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x04, 0x00, +0x00, 0xA8, 0xC0, 0x00, 0x09, 0x4C, 0x4D, 0x54, 0x00, 0x46, 0x4A, 0x53, 0x54, 0x00, 0x46, 0x4A, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6D, 0xA8, 0xEA, 0x02, 0x22, 0xE6, 0x82, +0x00, 0x00, 0x00, 0x00, /* Pacific/Funafuti */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x56, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -18157,4 +18173,4 @@ const unsigned char timelib_timezone_db_data_builtin[257855] = { 0x00, 0x00, 0x55, 0x54, 0x43, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, }; -const timelib_tzdb timezonedb_builtin = { "2011.8", 573, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2011.14", 575, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c index de877a382..7af06a8c1 100644 --- a/ext/date/lib/tm2unixtime.c +++ b/ext/date/lib/tm2unixtime.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tm2unixtime.c 302890 2010-08-30 16:25:52Z derick $ */ +/* $Id: tm2unixtime.c 320481 2011-12-06 06:21:08Z derick $ */ #include "timelib.h" @@ -179,11 +179,11 @@ void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt) do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y)); } -static void do_normalize(timelib_time* time) +void timelib_do_normalize(timelib_time* time) { - do {} while (do_range_limit(0, 60, 60, &time->s, &time->i)); - do {} while (do_range_limit(0, 60, 60, &time->i, &time->h)); - do {} while (do_range_limit(0, 24, 24, &time->h, &time->d)); + if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 60, 60, &time->s, &time->i)); + if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 60, 60, &time->i, &time->h)); + if (time->s != TIMELIB_UNSET) do {} while (do_range_limit(0, 24, 24, &time->h, &time->d)); do {} while (do_range_limit(1, 13, 12, &time->m, &time->y)); do {} while (do_range_limit_days(&time->y, &time->m, &time->d)); @@ -195,7 +195,7 @@ static void do_adjust_relative(timelib_time* time) if (time->relative.have_weekday_relative) { do_adjust_for_weekday(time); } - do_normalize(time); + timelib_do_normalize(time); if (time->have_relative) { time->s += time->relative.s; @@ -215,7 +215,7 @@ static void do_adjust_relative(timelib_time* time) time->m++; break; } - do_normalize(time); + timelib_do_normalize(time); } static void do_adjust_special_weekday(timelib_time* time) @@ -280,7 +280,7 @@ static void do_adjust_special(timelib_time* time) break; } } - do_normalize(time); + timelib_do_normalize(time); memset(&(time->relative.special), 0, sizeof(time->relative.special)); } @@ -300,7 +300,7 @@ static void do_adjust_special_early(timelib_time* time) break; } } - do_normalize(time); + timelib_do_normalize(time); } static timelib_sll do_years(timelib_sll year) diff --git a/ext/date/lib/unixtime2tm.c b/ext/date/lib/unixtime2tm.c index e42da44a8..2894a1ce8 100644 --- a/ext/date/lib/unixtime2tm.c +++ b/ext/date/lib/unixtime2tm.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unixtime2tm.c 307103 2011-01-05 04:13:23Z iliaa $ */ +/* $Id: unixtime2tm.c 319767 2011-11-24 17:13:47Z derick $ */ #include "timelib.h" @@ -146,7 +146,7 @@ void timelib_update_from_sse(timelib_time *tm) int z = tm->z; signed int dst = tm->dst; - timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60)); + timelib_unixtime2gmt(tm, tm->sse - (tm->z * 60) + (tm->dst * 3600)); tm->z = z; tm->dst = dst; @@ -184,7 +184,7 @@ void timelib_unixtime2local(timelib_time *tm, timelib_sll ts) int z = tm->z; signed int dst = tm->dst; - timelib_unixtime2gmt(tm, ts - (tm->z * 60)); + timelib_unixtime2gmt(tm, ts - (tm->z * 60) + (tm->dst * 3600)); tm->z = z; tm->dst = dst; diff --git a/ext/date/php_date.c b/ext/date/php_date.c index ad2391fc0..b74b002c8 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c 314445 2011-08-07 18:12:52Z gwynne $ */ +/* $Id: php_date.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_streams.h" @@ -463,6 +463,8 @@ const zend_function_entry date_funcs_timezone[] = { const zend_function_entry date_funcs_interval[] = { PHP_ME(DateInterval, __construct, arginfo_date_interval_construct, ZEND_ACC_CTOR|ZEND_ACC_PUBLIC) + PHP_ME(DateInterval, __wakeup, NULL, ZEND_ACC_PUBLIC) + PHP_ME(DateInterval, __set_state, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(format, date_interval_format, arginfo_date_method_interval_format, 0) PHP_ME_MAPPING(createFromDateString, date_interval_create_from_date_string, arginfo_date_interval_create_from_date_string, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_FE_END @@ -832,6 +834,12 @@ static timelib_tzinfo *php_date_parse_tzfile(char *formal_tzname, const timelib_ } return tzi; } + +timelib_tzinfo *php_date_parse_tzfile_wrapper(char *formal_tzname, const timelib_tzdb *tzdb) +{ + TSRMLS_FETCH(); + return php_date_parse_tzfile(formal_tzname, tzdb TSRMLS_CC); +} /* }}} */ /* {{{ Helper functions */ @@ -1367,7 +1375,7 @@ PHPAPI signed long php_parse_date(char *string, signed long *now) int error2; signed long retval; - parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB); + parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); if (error->error_count) { timelib_error_container_dtor(error); return -1; @@ -1404,7 +1412,7 @@ PHP_FUNCTION(strtotime) initial_ts = emalloc(25); snprintf(initial_ts, 24, "@%ld UTC", preset_ts); - t = timelib_strtotime(initial_ts, strlen(initial_ts), NULL, DATE_TIMEZONEDB); /* we ignore the error here, as this should never fail */ + t = timelib_strtotime(initial_ts, strlen(initial_ts), NULL, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); /* we ignore the error here, as this should never fail */ timelib_update_ts(t, tzi); now->tz_info = tzi; now->zone_type = TIMELIB_ZONETYPE_ID; @@ -1426,7 +1434,7 @@ PHP_FUNCTION(strtotime) RETURN_FALSE; } - t = timelib_strtotime(times, time_len, &error, DATE_TIMEZONEDB); + t = timelib_strtotime(times, time_len, &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); error1 = error->error_count; timelib_error_container_dtor(error); timelib_fill_holes(t, now, TIMELIB_NO_CLONE); @@ -2047,6 +2055,9 @@ static zend_object_value date_object_clone_date(zval *this_ptr TSRMLS_DC) zend_object_value new_ov = date_object_new_date_ex(old_obj->std.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC); + if (!old_obj->time) { + return new_ov; + } /* this should probably moved to a new `timelib_time *timelime_time_clone(timelib_time *)` */ new_obj->time = timelib_time_ctor(); @@ -2168,6 +2179,10 @@ static zend_object_value date_object_clone_timezone(zval *this_ptr TSRMLS_DC) zend_object_value new_ov = date_object_new_timezone_ex(old_obj->std.ce, &new_obj TSRMLS_CC); zend_objects_clone_members(&new_obj->std, new_ov, &old_obj->std, Z_OBJ_HANDLE_P(this_ptr) TSRMLS_CC); + if (!old_obj->initialized) { + return new_ov; + } + new_obj->type = old_obj->type; new_obj->initialized = 1; switch (new_obj->type) { @@ -2388,9 +2403,9 @@ PHPAPI int php_date_initialize(php_date_obj *dateobj, /*const*/ char *time_str, timelib_time_dtor(dateobj->time); } if (format) { - dateobj->time = timelib_parse_from_format(format, time_str_len ? time_str : "", time_str_len ? time_str_len : 0, &err, DATE_TIMEZONEDB); + dateobj->time = timelib_parse_from_format(format, time_str_len ? time_str : "", time_str_len ? time_str_len : 0, &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); } else { - dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB); + dateobj->time = timelib_strtotime(time_str_len ? time_str : "now", time_str_len ? time_str_len : sizeof("now") -1, &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); } /* update last errors and warnings */ @@ -2724,7 +2739,7 @@ PHP_FUNCTION(date_parse) RETURN_FALSE; } - parsed_time = timelib_strtotime(date, date_len, &error, DATE_TIMEZONEDB); + parsed_time = timelib_strtotime(date, date_len, &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAM_PASSTHRU, parsed_time, error); } /* }}} */ @@ -2743,7 +2758,7 @@ PHP_FUNCTION(date_parse_from_format) RETURN_FALSE; } - parsed_time = timelib_parse_from_format(format, date, date_len, &error, DATE_TIMEZONEDB); + parsed_time = timelib_parse_from_format(format, date, date_len, &error, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); php_date_do_return_parsed_time(INTERNAL_FUNCTION_PARAM_PASSTHRU, parsed_time, error); } /* }}} */ @@ -2785,7 +2800,7 @@ PHP_FUNCTION(date_modify) dateobj = (php_date_obj *) zend_object_store_get_object(object TSRMLS_CC); DATE_CHECK_INITIALIZED(dateobj->time, DateTime); - tmp_time = timelib_strtotime(modify, modify_len, &err, DATE_TIMEZONEDB); + tmp_time = timelib_strtotime(modify, modify_len, &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); /* update last errors and warnings */ update_errors_warnings(err TSRMLS_CC); @@ -3606,6 +3621,70 @@ PHP_METHOD(DateInterval, __construct) } /* }}} */ +static long php_date_long_from_hash_element(HashTable *myht, char *element, size_t size) +{ + zval **z_arg = NULL; + + if (zend_hash_find(myht, element, size + 1, (void**) &z_arg) == SUCCESS) { + convert_to_long(*z_arg); + return Z_LVAL_PP(z_arg); + } else { + return -1; + } +} + +static int php_date_interval_initialize_from_hash(zval **return_value, php_interval_obj **intobj, HashTable *myht TSRMLS_DC) +{ + (*intobj)->diff = timelib_rel_time_ctor(); + + (*intobj)->diff->y = php_date_long_from_hash_element(myht, "y", 1); + (*intobj)->diff->m = php_date_long_from_hash_element(myht, "m", 1); + (*intobj)->diff->d = php_date_long_from_hash_element(myht, "d", 1); + (*intobj)->diff->h = php_date_long_from_hash_element(myht, "h", 1); + (*intobj)->diff->i = php_date_long_from_hash_element(myht, "i", 1); + (*intobj)->diff->s = php_date_long_from_hash_element(myht, "s", 1); + (*intobj)->diff->invert = php_date_long_from_hash_element(myht, "invert", 6); + (*intobj)->diff->days = php_date_long_from_hash_element(myht, "days", 4); + (*intobj)->initialized = 1; + + return 0; +} + +/* {{{ proto DateInterval::__set_state() +*/ +PHP_METHOD(DateInterval, __set_state) +{ + php_interval_obj *intobj; + zval *array; + HashTable *myht; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &array) == FAILURE) { + RETURN_FALSE; + } + + myht = HASH_OF(array); + + php_date_instantiate(date_ce_interval, return_value TSRMLS_CC); + intobj = (php_interval_obj *) zend_object_store_get_object(return_value TSRMLS_CC); + php_date_interval_initialize_from_hash(&return_value, &intobj, myht TSRMLS_CC); +} +/* }}} */ + +/* {{{ proto DateInterval::__wakeup() +*/ +PHP_METHOD(DateInterval, __wakeup) +{ + zval *object = getThis(); + php_interval_obj *intobj; + HashTable *myht; + + intobj = (php_interval_obj *) zend_object_store_get_object(object TSRMLS_CC); + + myht = Z_OBJPROP_P(object); + + php_date_interval_initialize_from_hash(&return_value, &intobj, myht TSRMLS_CC); +} +/* }}} */ /* {{{ proto DateInterval date_interval_create_from_date_string(string time) Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string */ @@ -3623,7 +3702,7 @@ PHP_FUNCTION(date_interval_create_from_date_string) php_date_instantiate(date_ce_interval, return_value TSRMLS_CC); - time = timelib_strtotime(time_str, time_str_len, &err, DATE_TIMEZONEDB); + time = timelib_strtotime(time_str, time_str_len, &err, DATE_TIMEZONEDB, php_date_parse_tzfile_wrapper); diobj = (php_interval_obj *) zend_object_store_get_object(return_value TSRMLS_CC); diobj->diff = timelib_rel_time_clone(&time->relative); diobj->initialized = 1; @@ -3661,8 +3740,8 @@ static char *date_interval_format(char *format, int format_len, timelib_rel_time case 'I': length = slprintf(buffer, 32, "%02d", (int) t->i); break; case 'i': length = slprintf(buffer, 32, "%d", (int) t->i); break; - case 'S': length = slprintf(buffer, 32, "%02d", (int) t->s); break; - case 's': length = slprintf(buffer, 32, "%d", (int) t->s); break; + case 'S': length = slprintf(buffer, 32, "%02ld", (long) t->s); break; + case 's': length = slprintf(buffer, 32, "%ld", (long) t->s); break; case 'a': { if ((int) t->days != -99999) { diff --git a/ext/date/php_date.h b/ext/date/php_date.h index cda0b331b..e7adafa24 100644 --- a/ext/date/php_date.h +++ b/ext/date/php_date.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_date.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_DATE_H #define PHP_DATE_H @@ -82,6 +82,8 @@ PHP_FUNCTION(timezone_abbreviations_list); PHP_FUNCTION(timezone_version_get); PHP_METHOD(DateInterval, __construct); +PHP_METHOD(DateInterval, __wakeup); +PHP_METHOD(DateInterval, __set_state); PHP_FUNCTION(date_interval_format); PHP_FUNCTION(date_interval_create_from_date_string); diff --git a/ext/date/tests/DateInterval_format_a.phpt b/ext/date/tests/DateInterval_format_a.phpt index d095db56b..48c6cc167 100644 --- a/ext/date/tests/DateInterval_format_a.phpt +++ b/ext/date/tests/DateInterval_format_a.phpt @@ -8,10 +8,7 @@ date.timezone=UTC --SKIPIF-- <?php if (!method_exists('DateInterval', 'format')) die("skip: method doesn't exist"); -if (substr(PHP_OS, 0, 3) != 'WIN') die("skip this test is for Windows platforms only"); ?> ---XFAIL-- -Windows VC6 libs' floor()/ceil() choke on floats --FILE-- <?php diff --git a/ext/date/tests/DateTime_add-fall-type2-type2.phpt b/ext/date/tests/DateTime_add-fall-type2-type2.phpt index 82cc81c9e..894ff604e 100644 --- a/ext/date/tests/DateTime_add-fall-type2-type2.phpt +++ b/ext/date/tests/DateTime_add-fall-type2-type2.phpt @@ -2,8 +2,6 @@ DateTime::add() -- fall type2 type2 --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Various bugs exist --FILE-- <?php @@ -16,38 +14,38 @@ require 'DateTime_data-fall-type2-type2.inc'; test_time_fall_type2_prev_type2_prev: ADD: 2010-10-04 02:18:48 EDT + P+0Y1M2DT16H19M40S = **2010-11-06 18:38:28 EDT** test_time_fall_type2_prev_type2_dt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT** test_time_fall_type2_prev_type2_redodt: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT** -test_time_fall_type2_prev_type2_redost: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST** -test_time_fall_type2_prev_type2_st: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST** -test_time_fall_type2_prev_type2_post: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST** +test_time_fall_type2_prev_type2_redost: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT7H36M16S = **2010-11-07 02:14:44 EDT** +test_time_fall_type2_prev_type2_st: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M0DT9H38M27S = **2010-11-07 04:16:55 EDT** +test_time_fall_type2_prev_type2_post: ADD: 2010-11-06 18:38:28 EDT + P+0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EDT** test_time_fall_type2_dt_type2_prev: ADD: 2010-11-07 00:10:20 EDT + P-0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT** test_time_fall_type2_dt_type2_dt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT0H5M15S = **2010-11-07 00:15:35 EDT** test_time_fall_type2_dt_type2_redodt: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT** -test_time_fall_type2_dt_type2_redost: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST** -test_time_fall_type2_dt_type2_st: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST** -test_time_fall_type2_dt_type2_post: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST** +test_time_fall_type2_dt_type2_redost: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT2H4M24S = **2010-11-07 02:14:44 EDT** +test_time_fall_type2_dt_type2_st: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M0DT4H6M35S = **2010-11-07 04:16:55 EDT** +test_time_fall_type2_dt_type2_post: ADD: 2010-11-07 00:10:20 EDT + P+0Y0M1DT20H49M39S = **2010-11-08 20:59:59 EDT** test_time_fall_type2_redodt_type2_prev: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT** test_time_fall_type2_redodt_type2_dt: ADD: 2010-11-07 01:12:33 EDT + P-0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT** test_time_fall_type2_redodt_type2_redodt: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT0H3M2S = **2010-11-07 01:15:35 EDT** -test_time_fall_type2_redodt_type2_redost: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST** -test_time_fall_type2_redodt_type2_st: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST** -test_time_fall_type2_redodt_type2_post: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST** -test_time_fall_type2_redost_type2_prev: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT** -test_time_fall_type2_redost_type2_dt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT** -test_time_fall_type2_redost_type2_redodt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT** +test_time_fall_type2_redodt_type2_redost: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT1H2M11S = **2010-11-07 02:14:44 EDT** +test_time_fall_type2_redodt_type2_st: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M0DT3H4M22S = **2010-11-07 04:16:55 EDT** +test_time_fall_type2_redodt_type2_post: ADD: 2010-11-07 01:12:33 EDT + P+0Y0M1DT19H47M26S = **2010-11-08 20:59:59 EDT** +test_time_fall_type2_redost_type2_prev: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT7H36M16S = **2010-11-06 17:38:28 EST** +test_time_fall_type2_redost_type2_dt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT2H4M24S = **2010-11-06 23:10:20 EST** +test_time_fall_type2_redost_type2_redodt: ADD: 2010-11-07 01:14:44 EST + P-0Y0M0DT1H2M11S = **2010-11-07 00:12:33 EST** test_time_fall_type2_redost_type2_redost: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT0H2M10S = **2010-11-07 01:16:54 EST** test_time_fall_type2_redost_type2_st: ADD: 2010-11-07 01:14:44 EST + P+0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST** test_time_fall_type2_redost_type2_post: ADD: 2010-11-07 01:14:44 EST + P+0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST** -test_time_fall_type2_st_type2_prev: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT** -test_time_fall_type2_st_type2_dt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT** -test_time_fall_type2_st_type2_redodt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT** +test_time_fall_type2_st_type2_prev: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT9H38M27S = **2010-11-06 17:38:28 EST** +test_time_fall_type2_st_type2_dt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT4H6M35S = **2010-11-06 23:10:20 EST** +test_time_fall_type2_st_type2_redodt: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT3H4M22S = **2010-11-07 00:12:33 EST** test_time_fall_type2_st_type2_redost: ADD: 2010-11-07 03:16:55 EST + P-0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST** test_time_fall_type2_st_type2_st: ADD: 2010-11-07 03:16:55 EST + P+0Y0M0DT2H3M1S = **2010-11-07 05:19:56 EST** test_time_fall_type2_st_type2_post: ADD: 2010-11-07 03:16:55 EST + P+0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST** -test_time_fall_type2_post_type2_prev: ADD: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT** -test_time_fall_type2_post_type2_dt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT** -test_time_fall_type2_post_type2_redodt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT** +test_time_fall_type2_post_type2_prev: ADD: 2010-11-08 19:59:59 EST + P-0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EST** +test_time_fall_type2_post_type2_dt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT20H49M39S = **2010-11-06 23:10:20 EST** +test_time_fall_type2_post_type2_redodt: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT19H47M26S = **2010-11-07 00:12:33 EST** test_time_fall_type2_post_type2_redost: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST** test_time_fall_type2_post_type2_st: ADD: 2010-11-08 19:59:59 EST + P-0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST** test_time_fall_type2_post_type2_post: ADD: 2010-11-08 18:57:55 EST + P+0Y0M0DT1H2M4S = **2010-11-08 19:59:59 EST** -test_time_fall_type2_dtsec_type2_stsec: ADD: 2010-11-07 01:59:59 EDT + P+0Y0M0DT0H0M1S = **2010-11-07 01:00:00 EST** -test_time_fall_type2_stsec_type2_dtsec: ADD: 2010-11-07 01:00:00 EST + P-0Y0M0DT0H0M1S = **2010-11-07 01:59:59 EDT** +test_time_fall_type2_dtsec_type2_stsec: ADD: 2010-11-07 01:59:59 EDT + P+0Y0M0DT0H0M1S = **2010-11-07 02:00:00 EDT** +test_time_fall_type2_stsec_type2_dtsec: ADD: 2010-11-07 01:00:00 EST + P-0Y0M0DT0H0M1S = **2010-11-07 00:59:59 EST** diff --git a/ext/date/tests/DateTime_add-spring-type2-type2.phpt b/ext/date/tests/DateTime_add-spring-type2-type2.phpt index b64c27476..e522873b6 100644 --- a/ext/date/tests/DateTime_add-spring-type2-type2.phpt +++ b/ext/date/tests/DateTime_add-spring-type2-type2.phpt @@ -2,8 +2,6 @@ DateTime::add() -- spring type2 type2 --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Various bugs exist --FILE-- <?php @@ -15,19 +13,19 @@ require 'DateTime_data-spring-type2-type2.inc'; --EXPECT-- test_time_spring_type2_prev_type2_prev: ADD: 2010-02-11 02:18:48 EST + P+0Y1M2DT16H19M40S = **2010-03-13 18:38:28 EST** test_time_spring_type2_prev_type2_st: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST** -test_time_spring_type2_prev_type2_dt: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT** -test_time_spring_type2_prev_type2_post: ADD: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT** +test_time_spring_type2_prev_type2_dt: ADD: 2010-03-13 18:38:28 EST + P+0Y0M0DT7H38M27S = **2010-03-14 02:16:55 EST** +test_time_spring_type2_prev_type2_post: ADD: 2010-03-13 18:38:28 EST + P+0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EST** test_time_spring_type2_st_type2_prev: ADD: 2010-03-14 00:10:20 EST + P-0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST** test_time_spring_type2_st_type2_st: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT0H5M15S = **2010-03-14 00:15:35 EST** -test_time_spring_type2_st_type2_dt: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT** -test_time_spring_type2_st_type2_post: ADD: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT** -test_time_spring_type2_dt_type2_prev: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST** -test_time_spring_type2_dt_type2_st: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST** +test_time_spring_type2_st_type2_dt: ADD: 2010-03-14 00:10:20 EST + P+0Y0M0DT2H6M35S = **2010-03-14 02:16:55 EST** +test_time_spring_type2_st_type2_post: ADD: 2010-03-14 00:10:20 EST + P+0Y0M1DT18H49M39S = **2010-03-15 18:59:59 EST** +test_time_spring_type2_dt_type2_prev: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT7H38M27S = **2010-03-13 19:38:28 EDT** +test_time_spring_type2_dt_type2_st: ADD: 2010-03-14 03:16:55 EDT + P-0Y0M0DT2H6M35S = **2010-03-14 01:10:20 EDT** test_time_spring_type2_dt_type2_dt: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M0DT2H3M1S = **2010-03-14 05:19:56 EDT** test_time_spring_type2_dt_type2_post: ADD: 2010-03-14 03:16:55 EDT + P+0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT** -test_time_spring_type2_post_type2_prev: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST** -test_time_spring_type2_post_type2_st: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST** +test_time_spring_type2_post_type2_prev: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EDT** +test_time_spring_type2_post_type2_st: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT18H49M39S = **2010-03-14 01:10:20 EDT** test_time_spring_type2_post_type2_dt: ADD: 2010-03-15 19:59:59 EDT + P-0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT** test_time_spring_type2_post_type2_post: ADD: 2010-03-15 18:57:55 EDT + P+0Y0M0DT1H2M4S = **2010-03-15 19:59:59 EDT** -test_time_spring_type2_stsec_type2_dtsec: ADD: 2010-03-13 01:59:59 EST + P+0Y0M0DT0H0M1S = **2010-03-15 03:00:00 EDT** -test_time_spring_type2_dtsec_type2_stsec: ADD: 2010-03-15 03:00:00 EDT + P-0Y0M0DT0H0M1S = **2010-03-15 01:59:59 EST** +test_time_spring_type2_stsec_type2_dtsec: ADD: 2010-03-14 01:59:59 EST + P+0Y0M0DT0H0M1S = **2010-03-14 02:00:00 EST** +test_time_spring_type2_dtsec_type2_stsec: ADD: 2010-03-14 03:00:00 EDT + P-0Y0M0DT0H0M1S = **2010-03-14 02:59:59 EDT** diff --git a/ext/date/tests/DateTime_data-dates.inc b/ext/date/tests/DateTime_data-dates.inc index be608dfcb..c6f04e16c 100644 --- a/ext/date/tests/DateTime_data-dates.inc +++ b/ext/date/tests/DateTime_data-dates.inc @@ -20,6 +20,7 @@ examine_diff('2007-02-07', '2000-02-07', 'P+7Y0M0DT0H0M0S', 2557); echo "test_years_positive__7_by_1_day: "; examine_diff('2007-02-08', '2000-02-07', 'P+7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_positive__6_shy_1_day: "; examine_diff('2007-02-06', '2000-02-07', 'P+6Y11M30DT0H0M0S', 2556); @@ -48,6 +49,7 @@ examine_diff('2000-02-07', '2007-02-07', 'P-7Y0M0DT0H0M0S', 2557); echo "test_years_negative__7_by_1_day: "; examine_diff('2000-02-07', '2007-02-08', 'P-7Y0M1DT0H0M0S', 2558); +// NOTE: sub() produces different answer. echo "test_years_negative__6_shy_1_day: "; examine_diff('2000-02-07', '2007-02-06', 'P-6Y11M28DT0H0M0S', 2556); diff --git a/ext/date/tests/DateTime_data-february.inc b/ext/date/tests/DateTime_data-february.inc index 8c31ef69a..cc9d85df0 100644 --- a/ext/date/tests/DateTime_data-february.inc +++ b/ext/date/tests/DateTime_data-february.inc @@ -71,15 +71,19 @@ examine_diff('2010-03-01', '2010-01-01', 'P+0Y2M0DT0H0M0S', 59); echo "test_bug_49081__20: "; examine_diff('2010-03-01', '2010-01-31', 'P+0Y0M29DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081__21: "; examine_diff('2010-03-27', '2010-01-31', 'P+0Y1M24DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081__22: "; examine_diff('2010-03-28', '2010-01-31', 'P+0Y1M25DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081__23: "; examine_diff('2010-03-29', '2010-01-31', 'P+0Y1M26DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081__24: "; examine_diff('2010-03-30', '2010-01-31', 'P+0Y1M27DT0H0M0S', 58); @@ -168,18 +172,23 @@ examine_diff('2010-01-27', '2010-02-28', 'P-0Y1M1DT0H0M0S', 32); echo "test_bug_49081_negative__19: "; examine_diff('2010-01-01', '2010-03-01', 'P-0Y2M0DT0H0M0S', 59); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__20: "; examine_diff('2010-01-31', '2010-03-01', 'P-0Y1M1DT0H0M0S', 29); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__21: "; examine_diff('2010-01-31', '2010-03-27', 'P-0Y1M27DT0H0M0S', 55); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__22: "; examine_diff('2010-01-31', '2010-03-28', 'P-0Y1M28DT0H0M0S', 56); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__23: "; examine_diff('2010-01-31', '2010-03-29', 'P-0Y1M29DT0H0M0S', 57); +// NOTE: sub() produces different answer. echo "test_bug_49081_negative__24: "; examine_diff('2010-01-31', '2010-03-30', 'P-0Y1M30DT0H0M0S', 58); diff --git a/ext/date/tests/DateTime_data-spring-type2-type2.inc b/ext/date/tests/DateTime_data-spring-type2-type2.inc index 3556b207b..d9e07c313 100644 --- a/ext/date/tests/DateTime_data-spring-type2-type2.inc +++ b/ext/date/tests/DateTime_data-spring-type2-type2.inc @@ -99,11 +99,11 @@ $start = new DateTime('2010-03-15 18:57:55 EDT'); // sp post, zt2 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0); echo "test_time_spring_type2_stsec_type2_dtsec: "; -$end = new DateTime('2010-03-15 03:00:00 EDT'); // dtsec, zt2 -$start = new DateTime('2010-03-13 01:59:59 EST'); // stsec, zt2 +$end = new DateTime('2010-03-14 03:00:00 EDT'); // dtsec, zt2 +$start = new DateTime('2010-03-14 01:59:59 EST'); // stsec, zt2 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0); echo "test_time_spring_type2_dtsec_type2_stsec: "; -$end = new DateTime('2010-03-15 01:59:59 EST'); // stsec, zt2 -$start = new DateTime('2010-03-13 03:00:00 EDT'); // dtsec, zt2 +$end = new DateTime('2010-03-14 01:59:59 EST'); // stsec, zt2 +$start = new DateTime('2010-03-14 03:00:00 EDT'); // dtsec, zt2 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0); diff --git a/ext/date/tests/DateTime_data-spring-type2-type3.inc b/ext/date/tests/DateTime_data-spring-type2-type3.inc index b06825837..d66fc5177 100644 --- a/ext/date/tests/DateTime_data-spring-type2-type3.inc +++ b/ext/date/tests/DateTime_data-spring-type2-type3.inc @@ -99,11 +99,11 @@ $start = new DateTime('2010-03-15 18:57:55 EDT'); // sp post, zt2 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0); echo "test_time_spring_type2_stsec_type3_dtsec: "; -$end = new DateTime('2010-03-15 03:00:00'); // dtsec, zt3 -$start = new DateTime('2010-03-13 01:59:59 EST'); // stsec, zt2 +$end = new DateTime('2010-03-14 03:00:00'); // dtsec, zt3 +$start = new DateTime('2010-03-14 01:59:59 EST'); // stsec, zt2 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0); echo "test_time_spring_type2_dtsec_type3_stsec: "; -$end = new DateTime('2010-03-15 01:59:59'); // stsec, zt3 -$start = new DateTime('2010-03-13 03:00:00 EDT'); // dtsec, zt2 +$end = new DateTime('2010-03-14 01:59:59'); // stsec, zt3 +$start = new DateTime('2010-03-14 03:00:00 EDT'); // dtsec, zt2 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0); diff --git a/ext/date/tests/DateTime_data-spring-type3-type2.inc b/ext/date/tests/DateTime_data-spring-type3-type2.inc index 244cd5881..92211f4b1 100644 --- a/ext/date/tests/DateTime_data-spring-type3-type2.inc +++ b/ext/date/tests/DateTime_data-spring-type3-type2.inc @@ -99,11 +99,11 @@ $start = new DateTime('2010-03-15 18:57:55'); // sp post, zt3 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0); echo "test_time_spring_type3_stsec_type2_dtsec: "; -$end = new DateTime('2010-03-15 03:00:00 EDT'); // dtsec, zt2 -$start = new DateTime('2010-03-13 01:59:59'); // stsec, zt3 +$end = new DateTime('2010-03-14 03:00:00 EDT'); // dtsec, zt2 +$start = new DateTime('2010-03-14 01:59:59'); // stsec, zt3 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0); echo "test_time_spring_type3_dtsec_type2_stsec: "; -$end = new DateTime('2010-03-15 01:59:59 EST'); // stsec, zt2 -$start = new DateTime('2010-03-13 03:00:00'); // dtsec, zt3 +$end = new DateTime('2010-03-14 01:59:59 EST'); // stsec, zt2 +$start = new DateTime('2010-03-14 03:00:00'); // dtsec, zt3 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0); diff --git a/ext/date/tests/DateTime_data-spring-type3-type3.inc b/ext/date/tests/DateTime_data-spring-type3-type3.inc index d87373c5a..de1dee12e 100644 --- a/ext/date/tests/DateTime_data-spring-type3-type3.inc +++ b/ext/date/tests/DateTime_data-spring-type3-type3.inc @@ -99,11 +99,11 @@ $start = new DateTime('2010-03-15 18:57:55'); // sp post, zt3 examine_diff($end, $start, 'P+0Y0M0DT1H2M4S', 0); echo "test_time_spring_type3_stsec_type3_dtsec: "; -$end = new DateTime('2010-03-15 03:00:00'); // dtsec, zt3 -$start = new DateTime('2010-03-13 01:59:59'); // stsec, zt3 +$end = new DateTime('2010-03-14 03:00:00'); // dtsec, zt3 +$start = new DateTime('2010-03-14 01:59:59'); // stsec, zt3 examine_diff($end, $start, 'P+0Y0M0DT0H0M1S', 0); echo "test_time_spring_type3_dtsec_type3_stsec: "; -$end = new DateTime('2010-03-15 01:59:59'); // stsec, zt3 -$start = new DateTime('2010-03-13 03:00:00'); // dtsec, zt3 +$end = new DateTime('2010-03-14 01:59:59'); // stsec, zt3 +$start = new DateTime('2010-03-14 03:00:00'); // dtsec, zt3 examine_diff($end, $start, 'P-0Y0M0DT0H0M1S', 0); diff --git a/ext/date/tests/DateTime_days-spring-type2-type2.phpt b/ext/date/tests/DateTime_days-spring-type2-type2.phpt index 3f9c35352..3e702ace0 100644 --- a/ext/date/tests/DateTime_days-spring-type2-type2.phpt +++ b/ext/date/tests/DateTime_days-spring-type2-type2.phpt @@ -27,5 +27,5 @@ test_time_spring_type2_post_type2_prev: DAYS: **2** test_time_spring_type2_post_type2_st: DAYS: **1** test_time_spring_type2_post_type2_dt: DAYS: **1** test_time_spring_type2_post_type2_post: DAYS: **0** -test_time_spring_type2_stsec_type2_dtsec: DAYS: **0** +test_time_spring_type2_stsec_type2_dtsec: DAYS: **0** test_time_spring_type2_dtsec_type2_stsec: DAYS: **0** diff --git a/ext/date/tests/DateTime_days-spring-type2-type3.phpt b/ext/date/tests/DateTime_days-spring-type2-type3.phpt index 77ac5fdb6..0e23ac3e2 100644 --- a/ext/date/tests/DateTime_days-spring-type2-type3.phpt +++ b/ext/date/tests/DateTime_days-spring-type2-type3.phpt @@ -27,5 +27,5 @@ test_time_spring_type2_post_type3_prev: DAYS: **2** test_time_spring_type2_post_type3_st: DAYS: **1** test_time_spring_type2_post_type3_dt: DAYS: **1** test_time_spring_type2_post_type3_post: DAYS: **0** -test_time_spring_type2_stsec_type3_dtsec: DAYS: **0** +test_time_spring_type2_stsec_type3_dtsec: DAYS: **0** test_time_spring_type2_dtsec_type3_stsec: DAYS: **0** diff --git a/ext/date/tests/DateTime_days-spring-type3-type2.phpt b/ext/date/tests/DateTime_days-spring-type3-type2.phpt index 09aa8d9c1..4fb9ba76d 100644 --- a/ext/date/tests/DateTime_days-spring-type3-type2.phpt +++ b/ext/date/tests/DateTime_days-spring-type3-type2.phpt @@ -27,5 +27,5 @@ test_time_spring_type3_post_type2_prev: DAYS: **2** test_time_spring_type3_post_type2_st: DAYS: **1** test_time_spring_type3_post_type2_dt: DAYS: **1** test_time_spring_type3_post_type2_post: DAYS: **0** -test_time_spring_type3_stsec_type2_dtsec: DAYS: **0** +test_time_spring_type3_stsec_type2_dtsec: DAYS: **0** test_time_spring_type3_dtsec_type2_stsec: DAYS: **0** diff --git a/ext/date/tests/DateTime_days-spring-type3-type3.phpt b/ext/date/tests/DateTime_days-spring-type3-type3.phpt index f947329de..df44925fb 100644 --- a/ext/date/tests/DateTime_days-spring-type3-type3.phpt +++ b/ext/date/tests/DateTime_days-spring-type3-type3.phpt @@ -27,5 +27,5 @@ test_time_spring_type3_post_type3_prev: DAYS: **2** test_time_spring_type3_post_type3_st: DAYS: **1** test_time_spring_type3_post_type3_dt: DAYS: **1** test_time_spring_type3_post_type3_post: DAYS: **0** -test_time_spring_type3_stsec_type3_dtsec: DAYS: **0** +test_time_spring_type3_stsec_type3_dtsec: DAYS: **0** test_time_spring_type3_dtsec_type3_stsec: DAYS: **0** diff --git a/ext/date/tests/DateTime_diff-fall-type2-type2.phpt b/ext/date/tests/DateTime_diff-fall-type2-type2.phpt index 3e7cf7dbf..d655637ac 100644 --- a/ext/date/tests/DateTime_diff-fall-type2-type2.phpt +++ b/ext/date/tests/DateTime_diff-fall-type2-type2.phpt @@ -2,8 +2,6 @@ DateTime::diff() -- fall type2 type2 --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Various bugs exist --FILE-- <?php @@ -18,7 +16,7 @@ test_time_fall_type2_prev_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-06 1 test_time_fall_type2_prev_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT6H34M5S** test_time_fall_type2_prev_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT7H36M16S** test_time_fall_type2_prev_type2_st: DIFF: 2010-11-07 03:16:55 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M0DT9H38M27S** -test_time_fall_type2_prev_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT1H21M31S** +test_time_fall_type2_prev_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-06 18:38:28 EDT = **P+0Y0M2DT2H21M31S** test_time_fall_type2_dt_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-07 00:10:20 EDT = **P-0Y0M0DT5H31M52S** test_time_fall_type2_dt_type2_dt: DIFF: 2010-11-07 00:15:35 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT0H5M15S** test_time_fall_type2_dt_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 00:10:20 EDT = **P+0Y0M0DT1H2M13S** @@ -43,7 +41,7 @@ test_time_fall_type2_st_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-07 test_time_fall_type2_st_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-07 03:16:55 EST = **P-0Y0M0DT2H2M11S** test_time_fall_type2_st_type2_st: DIFF: 2010-11-07 05:19:56 EST - 2010-11-07 03:16:55 EST = **P+0Y0M0DT2H3M1S** test_time_fall_type2_st_type2_post: DIFF: 2010-11-08 19:59:59 EST - 2010-11-07 03:16:55 EST = **P+0Y0M1DT16H43M4S** -test_time_fall_type2_post_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT1H21M31S** +test_time_fall_type2_post_type2_prev: DIFF: 2010-11-06 18:38:28 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M2DT2H21M31S** test_time_fall_type2_post_type2_dt: DIFF: 2010-11-07 00:10:20 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT20H49M39S** test_time_fall_type2_post_type2_redodt: DIFF: 2010-11-07 01:12:33 EDT - 2010-11-08 19:59:59 EST = **P-0Y0M1DT19H47M26S** test_time_fall_type2_post_type2_redost: DIFF: 2010-11-07 01:14:44 EST - 2010-11-08 19:59:59 EST = **P-0Y0M1DT18H45M15S** diff --git a/ext/date/tests/DateTime_diff-spring-type2-type2.phpt b/ext/date/tests/DateTime_diff-spring-type2-type2.phpt index 4c590cd99..730cfd11e 100644 --- a/ext/date/tests/DateTime_diff-spring-type2-type2.phpt +++ b/ext/date/tests/DateTime_diff-spring-type2-type2.phpt @@ -2,8 +2,6 @@ DateTime::diff() -- spring type2 type2 --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Various bugs exist --FILE-- <?php @@ -16,7 +14,7 @@ require 'DateTime_data-spring-type2-type2.inc'; test_time_spring_type2_prev_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-02-11 02:18:48 EST = **P+0Y1M2DT16H19M40S** test_time_spring_type2_prev_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-13 18:38:28 EST = **P+0Y0M0DT5H31M52S** test_time_spring_type2_prev_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M0DT7H38M27S** -test_time_spring_type2_prev_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT1H21M31S** +test_time_spring_type2_prev_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-13 18:38:28 EST = **P+0Y0M2DT0H21M31S** test_time_spring_type2_st_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 00:10:20 EST = **P-0Y0M0DT5H31M52S** test_time_spring_type2_st_type2_st: DIFF: 2010-03-14 00:15:35 EST - 2010-03-14 00:10:20 EST = **P+0Y0M0DT0H5M15S** test_time_spring_type2_st_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-14 00:10:20 EST = **P+0Y0M0DT2H6M35S** @@ -25,9 +23,9 @@ test_time_spring_type2_dt_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-14 test_time_spring_type2_dt_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-14 03:16:55 EDT = **P-0Y0M0DT2H6M35S** test_time_spring_type2_dt_type2_dt: DIFF: 2010-03-14 05:19:56 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M0DT2H3M1S** test_time_spring_type2_dt_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-14 03:16:55 EDT = **P+0Y0M1DT16H43M4S** -test_time_spring_type2_post_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT1H21M31S** +test_time_spring_type2_post_type2_prev: DIFF: 2010-03-13 18:38:28 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M2DT0H21M31S** test_time_spring_type2_post_type2_st: DIFF: 2010-03-14 00:10:20 EST - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT18H49M39S** test_time_spring_type2_post_type2_dt: DIFF: 2010-03-14 03:16:55 EDT - 2010-03-15 19:59:59 EDT = **P-0Y0M1DT16H43M4S** test_time_spring_type2_post_type2_post: DIFF: 2010-03-15 19:59:59 EDT - 2010-03-15 18:57:55 EDT = **P+0Y0M0DT1H2M4S** -test_time_spring_type2_stsec_type2_dtsec: DIFF: 2010-03-15 03:00:00 EDT - 2010-03-13 01:59:59 EST = **P+0Y0M0DT0H0M1S** -test_time_spring_type2_dtsec_type2_stsec: DIFF: 2010-03-15 01:59:59 EST - 2010-03-15 03:00:00 EDT = **P-0Y0M0DT0H0M1S** +test_time_spring_type2_stsec_type2_dtsec: DIFF: 2010-03-14 03:00:00 EDT - 2010-03-14 01:59:59 EST = **P+0Y0M0DT0H0M1S** +test_time_spring_type2_dtsec_type2_stsec: DIFF: 2010-03-14 01:59:59 EST - 2010-03-14 03:00:00 EDT = **P-0Y0M0DT0H0M1S** diff --git a/ext/date/tests/DateTime_sub-dates.phpt b/ext/date/tests/DateTime_sub-dates.phpt index 36ca25c16..26f49ba83 100644 --- a/ext/date/tests/DateTime_sub-dates.phpt +++ b/ext/date/tests/DateTime_sub-dates.phpt @@ -14,7 +14,7 @@ require 'DateTime_data-dates.inc'; test__7: SUB: 2009-01-14 00:00:00 EST - P+0Y0M7DT0H0M0S = **2009-01-07 00:00:00 EST** test_years_positive__7_by_0_day: SUB: 2007-02-07 00:00:00 EST - P+7Y0M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_day: SUB: 2007-02-08 00:00:00 EST - P+7Y0M1DT0H0M0S = **2000-02-07 00:00:00 EST** -test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-07 00:00:00 EST** +test_years_positive__6_shy_1_day: SUB: 2007-02-06 00:00:00 EST - P+6Y11M30DT0H0M0S = **2000-02-05 00:00:00 EST** test_years_positive__7_by_1_month: SUB: 2007-03-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__6_shy_1_month: SUB: 2007-01-07 00:00:00 EST - P+6Y11M0DT0H0M0S = **2000-02-07 00:00:00 EST** test_years_positive__7_by_1_month_split_newyear: SUB: 2007-01-07 00:00:00 EST - P+7Y1M0DT0H0M0S = **1999-12-07 00:00:00 EST** @@ -22,7 +22,7 @@ test_years_positive__6_shy_1_month_split_newyear: SUB: 2006-12-07 00:00:00 EST - test_negative__7: SUB: 2009-01-07 00:00:00 EST - P-0Y0M7DT0H0M0S = **2009-01-14 00:00:00 EST** test_years_negative__7_by_0_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M0DT0H0M0S = **2007-02-07 00:00:00 EST** test_years_negative__7_by_1_day: SUB: 2000-02-07 00:00:00 EST - P-7Y0M1DT0H0M0S = **2007-02-08 00:00:00 EST** -test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-06 00:00:00 EST** +test_years_negative__6_shy_1_day: SUB: 2000-02-07 00:00:00 EST - P-6Y11M28DT0H0M0S = **2007-02-04 00:00:00 EST** test_years_negative__7_by_1_month: SUB: 2000-02-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-03-07 00:00:00 EST** test_years_negative__6_shy_1_month: SUB: 2000-02-07 00:00:00 EST - P-6Y11M0DT0H0M0S = **2007-01-07 00:00:00 EST** test_years_negative__7_by_1_month_split_newyear: SUB: 1999-12-07 00:00:00 EST - P-7Y1M0DT0H0M0S = **2007-01-07 00:00:00 EST** diff --git a/ext/date/tests/DateTime_sub-fall-type2-type2.phpt b/ext/date/tests/DateTime_sub-fall-type2-type2.phpt index 3138e1cd8..e133b1f4d 100644 --- a/ext/date/tests/DateTime_sub-fall-type2-type2.phpt +++ b/ext/date/tests/DateTime_sub-fall-type2-type2.phpt @@ -2,8 +2,6 @@ DateTime::sub() -- fall type2 type2 --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Various bugs exist --FILE-- <?php @@ -16,38 +14,38 @@ require 'DateTime_data-fall-type2-type2.inc'; test_time_fall_type2_prev_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P+0Y1M2DT16H19M40S = **2010-10-04 02:18:48 EDT** test_time_fall_type2_prev_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P+0Y0M0DT5H31M52S = **2010-11-06 18:38:28 EDT** test_time_fall_type2_prev_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P+0Y0M0DT6H34M5S = **2010-11-06 18:38:28 EDT** -test_time_fall_type2_prev_type2_redost: SUB: 2010-11-07 01:14:44 EST - P+0Y0M0DT7H36M16S = **2010-11-06 18:38:28 EDT** -test_time_fall_type2_prev_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT9H38M27S = **2010-11-06 18:38:28 EDT** -test_time_fall_type2_prev_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EDT** +test_time_fall_type2_prev_type2_redost: SUB: 2010-11-07 01:14:44 EST - P+0Y0M0DT7H36M16S = **2010-11-06 17:38:28 EST** +test_time_fall_type2_prev_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT9H38M27S = **2010-11-06 17:38:28 EST** +test_time_fall_type2_prev_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M2DT1H21M31S = **2010-11-06 18:38:28 EST** test_time_fall_type2_dt_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M0DT5H31M52S = **2010-11-07 00:10:20 EDT** test_time_fall_type2_dt_type2_dt: SUB: 2010-11-07 00:15:35 EDT - P+0Y0M0DT0H5M15S = **2010-11-07 00:10:20 EDT** test_time_fall_type2_dt_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P+0Y0M0DT1H2M13S = **2010-11-07 00:10:20 EDT** -test_time_fall_type2_dt_type2_redost: SUB: 2010-11-07 01:14:44 EST - P+0Y0M0DT2H4M24S = **2010-11-07 00:10:20 EDT** -test_time_fall_type2_dt_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT4H6M35S = **2010-11-07 00:10:20 EDT** -test_time_fall_type2_dt_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M1DT20H49M39S = **2010-11-07 00:10:20 EDT** +test_time_fall_type2_dt_type2_redost: SUB: 2010-11-07 01:14:44 EST - P+0Y0M0DT2H4M24S = **2010-11-06 23:10:20 EST** +test_time_fall_type2_dt_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT4H6M35S = **2010-11-06 23:10:20 EST** +test_time_fall_type2_dt_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M1DT20H49M39S = **2010-11-06 23:10:20 EST** test_time_fall_type2_redodt_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M0DT6H34M5S = **2010-11-07 01:12:33 EDT** test_time_fall_type2_redodt_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M0DT1H2M13S = **2010-11-07 01:12:33 EDT** test_time_fall_type2_redodt_type2_redodt: SUB: 2010-11-07 01:15:35 EDT - P+0Y0M0DT0H3M2S = **2010-11-07 01:12:33 EDT** -test_time_fall_type2_redodt_type2_redost: SUB: 2010-11-07 01:14:44 EST - P+0Y0M0DT1H2M11S = **2010-11-07 01:12:33 EDT** -test_time_fall_type2_redodt_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT3H4M22S = **2010-11-07 01:12:33 EDT** -test_time_fall_type2_redodt_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M1DT19H47M26S = **2010-11-07 01:12:33 EDT** -test_time_fall_type2_redost_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M0DT7H36M16S = **2010-11-07 01:14:44 EST** -test_time_fall_type2_redost_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M0DT2H4M24S = **2010-11-07 01:14:44 EST** -test_time_fall_type2_redost_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P-0Y0M0DT1H2M11S = **2010-11-07 01:14:44 EST** +test_time_fall_type2_redodt_type2_redost: SUB: 2010-11-07 01:14:44 EST - P+0Y0M0DT1H2M11S = **2010-11-07 00:12:33 EST** +test_time_fall_type2_redodt_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT3H4M22S = **2010-11-07 00:12:33 EST** +test_time_fall_type2_redodt_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M1DT19H47M26S = **2010-11-07 00:12:33 EST** +test_time_fall_type2_redost_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M0DT7H36M16S = **2010-11-07 02:14:44 EDT** +test_time_fall_type2_redost_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M0DT2H4M24S = **2010-11-07 02:14:44 EDT** +test_time_fall_type2_redost_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P-0Y0M0DT1H2M11S = **2010-11-07 02:14:44 EDT** test_time_fall_type2_redost_type2_redost: SUB: 2010-11-07 01:16:54 EST - P+0Y0M0DT0H2M10S = **2010-11-07 01:14:44 EST** test_time_fall_type2_redost_type2_st: SUB: 2010-11-07 03:16:55 EST - P+0Y0M0DT2H2M11S = **2010-11-07 01:14:44 EST** test_time_fall_type2_redost_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M1DT18H45M15S = **2010-11-07 01:14:44 EST** -test_time_fall_type2_st_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M0DT9H38M27S = **2010-11-07 03:16:55 EST** -test_time_fall_type2_st_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M0DT4H6M35S = **2010-11-07 03:16:55 EST** -test_time_fall_type2_st_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P-0Y0M0DT3H4M22S = **2010-11-07 03:16:55 EST** +test_time_fall_type2_st_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M0DT9H38M27S = **2010-11-07 04:16:55 EDT** +test_time_fall_type2_st_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M0DT4H6M35S = **2010-11-07 04:16:55 EDT** +test_time_fall_type2_st_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P-0Y0M0DT3H4M22S = **2010-11-07 04:16:55 EDT** test_time_fall_type2_st_type2_redost: SUB: 2010-11-07 01:14:44 EST - P-0Y0M0DT2H2M11S = **2010-11-07 03:16:55 EST** test_time_fall_type2_st_type2_st: SUB: 2010-11-07 05:19:56 EST - P+0Y0M0DT2H3M1S = **2010-11-07 03:16:55 EST** test_time_fall_type2_st_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M1DT16H43M4S = **2010-11-07 03:16:55 EST** -test_time_fall_type2_post_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EST** -test_time_fall_type2_post_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M1DT20H49M39S = **2010-11-08 19:59:59 EST** -test_time_fall_type2_post_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P-0Y0M1DT19H47M26S = **2010-11-08 19:59:59 EST** +test_time_fall_type2_post_type2_prev: SUB: 2010-11-06 18:38:28 EDT - P-0Y0M2DT1H21M31S = **2010-11-08 19:59:59 EDT** +test_time_fall_type2_post_type2_dt: SUB: 2010-11-07 00:10:20 EDT - P-0Y0M1DT20H49M39S = **2010-11-08 20:59:59 EDT** +test_time_fall_type2_post_type2_redodt: SUB: 2010-11-07 01:12:33 EDT - P-0Y0M1DT19H47M26S = **2010-11-08 20:59:59 EDT** test_time_fall_type2_post_type2_redost: SUB: 2010-11-07 01:14:44 EST - P-0Y0M1DT18H45M15S = **2010-11-08 19:59:59 EST** test_time_fall_type2_post_type2_st: SUB: 2010-11-07 03:16:55 EST - P-0Y0M1DT16H43M4S = **2010-11-08 19:59:59 EST** test_time_fall_type2_post_type2_post: SUB: 2010-11-08 19:59:59 EST - P+0Y0M0DT1H2M4S = **2010-11-08 18:57:55 EST** -test_time_fall_type2_dtsec_type2_stsec: SUB: 2010-11-07 01:00:00 EST - P+0Y0M0DT0H0M1S = **2010-11-07 01:59:59 EDT** -test_time_fall_type2_stsec_type2_dtsec: SUB: 2010-11-07 01:59:59 EDT - P-0Y0M0DT0H0M1S = **2010-11-07 01:00:00 EST** +test_time_fall_type2_dtsec_type2_stsec: SUB: 2010-11-07 01:00:00 EST - P+0Y0M0DT0H0M1S = **2010-11-07 00:59:59 EST** +test_time_fall_type2_stsec_type2_dtsec: SUB: 2010-11-07 01:59:59 EDT - P-0Y0M0DT0H0M1S = **2010-11-07 02:00:00 EDT** diff --git a/ext/date/tests/DateTime_sub-february.phpt b/ext/date/tests/DateTime_sub-february.phpt index 89cba4bde..23c8da447 100644 --- a/ext/date/tests/DateTime_sub-february.phpt +++ b/ext/date/tests/DateTime_sub-february.phpt @@ -31,10 +31,10 @@ test_bug_49081__17: SUB: 2010-02-28 00:00:00 EST - P+0Y1M0DT0H0M0S = **2010-01-2 test_bug_49081__18: SUB: 2010-02-28 00:00:00 EST - P+0Y1M1DT0H0M0S = **2010-01-27 00:00:00 EST** test_bug_49081__19: SUB: 2010-03-01 00:00:00 EST - P+0Y2M0DT0H0M0S = **2010-01-01 00:00:00 EST** test_bug_49081__20: SUB: 2010-03-01 00:00:00 EST - P+0Y0M29DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-01-31 00:00:00 EST** -test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-01-31 00:00:00 EST** +test_bug_49081__21: SUB: 2010-03-27 00:00:00 EDT - P+0Y1M24DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__22: SUB: 2010-03-28 00:00:00 EDT - P+0Y1M25DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__23: SUB: 2010-03-29 00:00:00 EDT - P+0Y1M26DT0H0M0S = **2010-02-03 00:00:00 EST** +test_bug_49081__24: SUB: 2010-03-30 00:00:00 EDT - P+0Y1M27DT0H0M0S = **2010-02-03 00:00:00 EST** test_bug_49081__25: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M0DT0H0M0S = **2010-01-31 00:00:00 EST** test_bug_49081__26: SUB: 2010-03-31 00:00:00 EDT - P+0Y2M1DT0H0M0S = **2010-01-30 00:00:00 EST** test_bug_49081__27: SUB: 2009-01-31 00:00:00 EST - P+0Y0M30DT0H0M0S = **2009-01-01 00:00:00 EST** @@ -62,11 +62,11 @@ test_bug_49081_negative__16: SUB: 2010-01-29 00:00:00 EST - P-0Y0M30DT0H0M0S = * test_bug_49081_negative__17: SUB: 2010-01-28 00:00:00 EST - P-0Y1M0DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__18: SUB: 2010-01-27 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-02-28 00:00:00 EST** test_bug_49081_negative__19: SUB: 2010-01-01 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-01 00:00:00 EST** -test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-27 00:00:00 EDT** -test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-28 00:00:00 EDT** -test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-03-29 00:00:00 EDT** -test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__20: SUB: 2010-01-31 00:00:00 EST - P-0Y1M1DT0H0M0S = **2010-03-04 00:00:00 EST** +test_bug_49081_negative__21: SUB: 2010-01-31 00:00:00 EST - P-0Y1M27DT0H0M0S = **2010-03-30 00:00:00 EDT** +test_bug_49081_negative__22: SUB: 2010-01-31 00:00:00 EST - P-0Y1M28DT0H0M0S = **2010-03-31 00:00:00 EDT** +test_bug_49081_negative__23: SUB: 2010-01-31 00:00:00 EST - P-0Y1M29DT0H0M0S = **2010-04-01 00:00:00 EDT** +test_bug_49081_negative__24: SUB: 2010-01-31 00:00:00 EST - P-0Y1M30DT0H0M0S = **2010-04-02 00:00:00 EDT** test_bug_49081_negative__25: SUB: 2010-01-31 00:00:00 EST - P-0Y2M0DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__26: SUB: 2010-01-30 00:00:00 EST - P-0Y2M1DT0H0M0S = **2010-03-31 00:00:00 EDT** test_bug_49081_negative__27: SUB: 2009-01-01 00:00:00 EST - P-0Y0M30DT0H0M0S = **2009-01-31 00:00:00 EST** diff --git a/ext/date/tests/DateTime_sub-spring-type2-type2.phpt b/ext/date/tests/DateTime_sub-spring-type2-type2.phpt index 2b1817d79..925f1411e 100644 --- a/ext/date/tests/DateTime_sub-spring-type2-type2.phpt +++ b/ext/date/tests/DateTime_sub-spring-type2-type2.phpt @@ -2,8 +2,6 @@ DateTime::sub() -- spring type2 type2 --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Various bugs exist --FILE-- <?php @@ -15,19 +13,19 @@ require 'DateTime_data-spring-type2-type2.inc'; --EXPECT-- test_time_spring_type2_prev_type2_prev: SUB: 2010-03-13 18:38:28 EST - P+0Y1M2DT16H19M40S = **2010-02-11 02:18:48 EST** test_time_spring_type2_prev_type2_st: SUB: 2010-03-14 00:10:20 EST - P+0Y0M0DT5H31M52S = **2010-03-13 18:38:28 EST** -test_time_spring_type2_prev_type2_dt: SUB: 2010-03-14 03:16:55 EDT - P+0Y0M0DT7H38M27S = **2010-03-13 18:38:28 EST** -test_time_spring_type2_prev_type2_post: SUB: 2010-03-15 19:59:59 EDT - P+0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EST** +test_time_spring_type2_prev_type2_dt: SUB: 2010-03-14 03:16:55 EDT - P+0Y0M0DT7H38M27S = **2010-03-13 19:38:28 EDT** +test_time_spring_type2_prev_type2_post: SUB: 2010-03-15 19:59:59 EDT - P+0Y0M2DT1H21M31S = **2010-03-13 18:38:28 EDT** test_time_spring_type2_st_type2_prev: SUB: 2010-03-13 18:38:28 EST - P-0Y0M0DT5H31M52S = **2010-03-14 00:10:20 EST** test_time_spring_type2_st_type2_st: SUB: 2010-03-14 00:15:35 EST - P+0Y0M0DT0H5M15S = **2010-03-14 00:10:20 EST** -test_time_spring_type2_st_type2_dt: SUB: 2010-03-14 03:16:55 EDT - P+0Y0M0DT2H6M35S = **2010-03-14 00:10:20 EST** -test_time_spring_type2_st_type2_post: SUB: 2010-03-15 19:59:59 EDT - P+0Y0M1DT18H49M39S = **2010-03-14 00:10:20 EST** -test_time_spring_type2_dt_type2_prev: SUB: 2010-03-13 18:38:28 EST - P-0Y0M0DT7H38M27S = **2010-03-14 03:16:55 EDT** -test_time_spring_type2_dt_type2_st: SUB: 2010-03-14 00:10:20 EST - P-0Y0M0DT2H6M35S = **2010-03-14 03:16:55 EDT** +test_time_spring_type2_st_type2_dt: SUB: 2010-03-14 03:16:55 EDT - P+0Y0M0DT2H6M35S = **2010-03-14 01:10:20 EDT** +test_time_spring_type2_st_type2_post: SUB: 2010-03-15 19:59:59 EDT - P+0Y0M1DT18H49M39S = **2010-03-14 01:10:20 EDT** +test_time_spring_type2_dt_type2_prev: SUB: 2010-03-13 18:38:28 EST - P-0Y0M0DT7H38M27S = **2010-03-14 02:16:55 EST** +test_time_spring_type2_dt_type2_st: SUB: 2010-03-14 00:10:20 EST - P-0Y0M0DT2H6M35S = **2010-03-14 02:16:55 EST** test_time_spring_type2_dt_type2_dt: SUB: 2010-03-14 05:19:56 EDT - P+0Y0M0DT2H3M1S = **2010-03-14 03:16:55 EDT** test_time_spring_type2_dt_type2_post: SUB: 2010-03-15 19:59:59 EDT - P+0Y0M1DT16H43M4S = **2010-03-14 03:16:55 EDT** -test_time_spring_type2_post_type2_prev: SUB: 2010-03-13 18:38:28 EST - P-0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EDT** -test_time_spring_type2_post_type2_st: SUB: 2010-03-14 00:10:20 EST - P-0Y0M1DT18H49M39S = **2010-03-15 19:59:59 EDT** +test_time_spring_type2_post_type2_prev: SUB: 2010-03-13 18:38:28 EST - P-0Y0M2DT1H21M31S = **2010-03-15 19:59:59 EST** +test_time_spring_type2_post_type2_st: SUB: 2010-03-14 00:10:20 EST - P-0Y0M1DT18H49M39S = **2010-03-15 18:59:59 EST** test_time_spring_type2_post_type2_dt: SUB: 2010-03-14 03:16:55 EDT - P-0Y0M1DT16H43M4S = **2010-03-15 19:59:59 EDT** test_time_spring_type2_post_type2_post: SUB: 2010-03-15 19:59:59 EDT - P+0Y0M0DT1H2M4S = **2010-03-15 18:57:55 EDT** -test_time_spring_type2_stsec_type2_dtsec: SUB: 2010-03-15 03:00:00 EDT - P+0Y0M0DT0H0M1S = **2010-03-13 01:59:59 EST** -test_time_spring_type2_dtsec_type2_stsec: SUB: 2010-03-15 01:59:59 EST - P-0Y0M0DT0H0M1S = **2010-03-15 03:00:00 EDT** +test_time_spring_type2_stsec_type2_dtsec: SUB: 2010-03-14 03:00:00 EDT - P+0Y0M0DT0H0M1S = **2010-03-14 02:59:59 EDT** +test_time_spring_type2_dtsec_type2_stsec: SUB: 2010-03-14 01:59:59 EST - P-0Y0M0DT0H0M1S = **2010-03-14 02:00:00 EST** diff --git a/ext/date/tests/bug13142.phpt b/ext/date/tests/bug13142.phpt index 60fc7e7f6..5254142ba 100644 --- a/ext/date/tests/bug13142.phpt +++ b/ext/date/tests/bug13142.phpt @@ -4,6 +4,9 @@ Bug #13142 (strtotime handling of "M d H:i:s Y" format) date.timezone=US/Eastern --SKIPIF-- <?php +if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + die("skip. set TZ env is not supported at runtime."); +} if (!@putenv("TZ=US/Eastern") || getenv("TZ") != 'US/Eastern') { die("skip unable to change TZ enviroment variable\n"); } diff --git a/ext/date/tests/bug27780.phpt b/ext/date/tests/bug27780.phpt index bd3bc949b..af35b8fbf 100644 --- a/ext/date/tests/bug27780.phpt +++ b/ext/date/tests/bug27780.phpt @@ -1,5 +1,10 @@ --TEST-- Bug #27780 (strtotime(+1 xxx) returns a wrong date/time) +--SKIPIF-- +<?php +if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + die("skip. Not the same TZ on windows."); +} --FILE-- <?php $timezones = array ( diff --git a/ext/date/tests/bug28088.phpt b/ext/date/tests/bug28088.phpt index 95866e00b..c31013938 100644 --- a/ext/date/tests/bug28088.phpt +++ b/ext/date/tests/bug28088.phpt @@ -1,9 +1,9 @@ --TEST-- Bug #28088 (strtotime() cannot convert 00 hours") +--INI-- +date.timezone=UTC --FILE-- <?php -putenv("TZ=GMT"); - echo "The following line rightly shows the correct date time:\n"; echo gmdate("m/d/y Hi", strtotime("04/04/04 2345")), "\n"; diff --git a/ext/date/tests/bug32555.phpt b/ext/date/tests/bug32555.phpt index a99d3e289..fca34ffa1 100644 --- a/ext/date/tests/bug32555.phpt +++ b/ext/date/tests/bug32555.phpt @@ -1,10 +1,13 @@ --TEST-- Bug #32555 (strtotime("tomorrow") can return false) +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') die('skip strftime uses system TZ'); +?> --INI-- date.timezone=US/Eastern --FILE-- <?php - $stamp = 1112427000; print strftime('%c %Z',strtotime('now',$stamp)) ."\n"; print strftime('%c %Z',strtotime('tomorrow',$stamp)) ."\n"; diff --git a/ext/date/tests/bug33415-2.phpt b/ext/date/tests/bug33415-2.phpt index 9ea537a9f..424be76fc 100644 --- a/ext/date/tests/bug33415-2.phpt +++ b/ext/date/tests/bug33415-2.phpt @@ -2,10 +2,10 @@ Bug #33415 [2] (Possibly invalid non-one-hour DST or timezone shifts) --FILE-- <?php +date_default_timezone_set('Africa/Bujumbura'); print "TZ=Africa/Bujumbura - *Note*: Unexpected, as does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Africa/Bujumbura"); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Wednesday", $tStamp); @@ -13,7 +13,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Wednesday 00:00:00\n\n"; print "TZ=Asia/Thimbu - Is it OK for this to be 0:30 AM? yes\n"; -putenv("TZ=Asia/Thimbu"); +date_default_timezone_set('Asia/Thimbu'); $tStamp = mktime (17, 17, 17, 1, 6476, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Thursday", $tStamp); @@ -22,7 +22,7 @@ print "wanted=Thursday 00:30:00\n\n"; print "TZ=Indian/Cocos - Is it OK for this to be 6:30 AM? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Indian/Cocos"); +date_default_timezone_set('Indian/Cocos'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Thursday", $tStamp); @@ -31,7 +31,7 @@ print "wanted=Thursday 00:00:00\n\n"; print "TZ=Africa/Lubumbashi - Is it OK for this to be 2 AM? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Africa/Lubumbashi"); +date_default_timezone_set('Africa/Lubumbashi'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Saturday", $tStamp); @@ -39,7 +39,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Saturday 00:00:00\n\n"; print "TZ=Asia/Kashgar - Is it OK for this to be 3 AM? yes\n"; -putenv("TZ=Asia/Kashgar"); +date_default_timezone_set('Asia/Kashgar'); $tStamp = mktime (17, 17, 17, 1, 3767, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Thursday", $tStamp); @@ -48,7 +48,7 @@ print "wanted=Thursday 03:00:00\n\n"; print "TZ=Indian/Christmas - Is it OK for this to be 7 AM? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Indian/Christmas"); +date_default_timezone_set('Indian/Christmas'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Sunday", $tStamp); @@ -56,7 +56,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Sunday 00:00:00\n\n"; print "TZ=America/Santo_Domingo - Is it OK for this to be 0:30 AM? yes\n"; -putenv("TZ=America/Santo_Domingo"); +date_default_timezone_set('America/Santo_Domingo'); $tStamp = mktime (17, 17, 17, 1, 291, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Sunday", $tStamp); @@ -65,7 +65,7 @@ print "wanted=Sunday 00:30:00\n\n"; print "TZ=Pacific/Truk - Is it OK for this to be 10 AM? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Pacific/Truk"); +date_default_timezone_set('Pacific/Truk'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Tuesday", $tStamp); @@ -74,7 +74,7 @@ print "wanted=Tuesday 00:00:00\n\n"; print "TZ=Pacific/Ponape - Is it OK for this to be 11 AM? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Pacific/Ponape"); +date_default_timezone_set('Pacific/Ponape'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Monday", $tStamp); @@ -82,7 +82,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Monday 00:00:00\n\n"; print "TZ=America/Scoresbysund - Is it OK for this to be 2 AM? yes\n"; -putenv("TZ=America/Scoresbysund"); +date_default_timezone_set('America/Scoresbysund'); $tStamp = mktime (17, 17, 17, 1, 4099, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Sunday", $tStamp); @@ -90,7 +90,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Sunday 02:00:00\n\n"; print "TZ=America/Guyana - Is it OK for this to be 0:45 AM? yes\n"; -putenv("TZ=America/Guyana"); +date_default_timezone_set('America/Guyana'); $tStamp = mktime (17, 17, 17, 1, 2031, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Thursday", $tStamp); @@ -98,7 +98,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Thursday 00:45:00\n\n"; print "TZ=Asia/Tehran - Is it OK for this to be 0:30 AM? yes\n"; -putenv("TZ=Asia/Tehran"); +date_default_timezone_set('Asia/Tehran'); $tStamp = mktime (17, 17, 17, 1, 2855, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Tuesday", $tStamp); @@ -107,7 +107,7 @@ print "wanted=Tuesday 00:30:00\n\n"; print "TZ=Pacific/Tarawa - Is it OK for this to be Midday? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Pacific/Tarawa"); +date_default_timezone_set('Pacific/Tarawa'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Monday", $tStamp); @@ -115,7 +115,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Monday 00:00:00\n\n"; print "TZ=Africa/Monrovia - Is it OK for this to be 00:44:30 AM? yes\n"; -putenv("TZ=Africa/Monrovia"); +date_default_timezone_set('Africa/Monrovia'); $tStamp = mktime (17, 17, 17, 1, 845, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Monday", $tStamp); @@ -123,7 +123,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Monday 00:44:30\n\n"; print "TZ=Asia/Katmandu - Is it OK for this to 0:15 AM?. yes\n"; -putenv("TZ=Asia/Katmandu"); +date_default_timezone_set('Asia/Katmandu'); $tStamp = mktime (17, 17, 17, 1, 5838, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Wednesday", $tStamp); @@ -131,7 +131,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Wednesday 00:15:00\n\n"; print "TZ=Pacific/Nauru - Is it OK for this to be 0:30? yes\n"; -putenv("TZ=Pacific/Nauru"); +date_default_timezone_set('Pacific/Nauru'); $tStamp = mktime (17, 17, 17, 1, 3401, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Tuesday", $tStamp); @@ -139,7 +139,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Tuesday 00:30:00\n\n"; print "TZ=Pacific/Niue - Is it OK for this to be 0:30 AM? yes\n"; -putenv("TZ=Pacific/Niue"); +date_default_timezone_set('Pacific/Niue'); $tStamp = mktime (17, 17, 17, 1, 3189, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Sunday", $tStamp); @@ -148,7 +148,7 @@ print "wanted=Sunday 00:30:00\n\n"; print "TZ=Pacific/Port_Moresby - Is it OK for this to be 10 AM? No DST or timezone transition.\n"; -putenv("TZ=Pacific/Port_Moresby"); +date_default_timezone_set('Pacific/Port_Moresby'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Thursday", $tStamp); @@ -156,7 +156,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Thursday 00:00:00\n\n"; print "TZ=America/Miquelon - Is it OK for this to be 1 AM ? yes\n"; -putenv("TZ=America/Miquelon"); +date_default_timezone_set('America/Miquelon'); $tStamp = mktime (17, 17, 17, 1, 3767, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Thursday", $tStamp); @@ -165,7 +165,7 @@ print "wanted=Thursday 01:00:00\n\n"; print "TZ=Pacific/Palau - Is it OK for this to be 9 AM? No DST or timezone transition.\n"; -putenv("TZ=Pacific/Palau"); +date_default_timezone_set('Pacific/Palau'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Saturday", $tStamp); @@ -174,7 +174,7 @@ print "wanted=Saturday 00:00:00\n\n"; print "TZ=Pacific/Funafuti - Is it OK for this to be midday? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Pacific/Funafuti"); +date_default_timezone_set('Pacific/Funafuti'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Wednesday", $tStamp); @@ -183,7 +183,7 @@ print "wanted=Wednesday 00:00:00\n\n"; print "TZ=Pacific/Wake - Is it OK for this to be midday? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Pacific/Wake"); +date_default_timezone_set('Pacific/Wake'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Tuesday", $tStamp); @@ -192,7 +192,7 @@ print "wanted=Tuesday 00:00:00\n\n"; print "TZ=Pacific/Wallis - Is it OK for this to be midday? Note: does not appear to have a DST or timezone transition.\n"; -putenv("TZ=Pacific/Wallis"); +date_default_timezone_set('Pacific/Wallis'); $tStamp = mktime (17, 17, 17, 1, 1, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Tuesday", $tStamp); @@ -200,7 +200,7 @@ print "result=".date("l Y-m-d H:i:s T I", $strtotime_tstamp)."\n"; print "wanted=Tuesday 00:00:00\n\n"; print "TZ=America/Paramaribo - Is it OK for this to be 0:30 AM? yes\n"; -putenv("TZ=America/Paramaribo"); +date_default_timezone_set('America/Paramaribo'); $tStamp = mktime (17, 17, 17, 1, 5381, 1970); print "tStamp=". date("l Y-m-d H:i:s T I", $tStamp). "\n"; $strtotime_tstamp = strtotime("next Monday", $tStamp); diff --git a/ext/date/tests/bug33532.phpt b/ext/date/tests/bug33532.phpt index 286ceb4ce..148630855 100644 --- a/ext/date/tests/bug33532.phpt +++ b/ext/date/tests/bug33532.phpt @@ -3,6 +3,10 @@ Bug #33532 (Different output for strftime() and date()) --INI-- error_reporting=2047 date.timezone=UTC +--SKIPIF-- +<?php +if(PHP_OS == 'Darwin' || defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip strftime uses system TZ on Darwin and Windows"); +?> --FILE-- <?php @@ -18,6 +22,7 @@ print "datestr " . date ("H:i:s A F j Y T", $tStamp) . "\n"; print "\nSetting TZ\n"; date_default_timezone_set('Australia/Sydney'); +putenv("TZ=Australia/Sydney"); $input = "10:00:00 AM July 1 2005"; print "input " . $input . "\n"; $tStamp = strtotime($input); diff --git a/ext/date/tests/bug48476.phpt b/ext/date/tests/bug48476.phpt new file mode 100644 index 000000000..2daa59487 --- /dev/null +++ b/ext/date/tests/bug48476.phpt @@ -0,0 +1,33 @@ +--TEST-- +Bug #48476 (cloning extended DateTime class without calling parent::__constr crashed PHP) +--FILE-- +<?php +class MyDateTime extends DateTime { + public function __construct() { } +} +class MyDateTimeZone extends DateTimeZone { + public function __construct() { } +} + +$o = new MyDateTime; +var_dump($o->format("d")); +$x = clone $o; + +var_dump($x->format("d")); + +clone $o; + + +var_dump(timezone_location_get(clone new MyDateTimezone)); +?> +--EXPECTF-- +Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug48476.php on line 10 +bool(false) + +Warning: DateTime::format(): The DateTime object has not been correctly initialized by its constructor in %sbug48476.php on line 13 +bool(false) + +Warning: timezone_location_get(): The DateTimeZone object has not been correctly initialized by its constructor in %sbug48476.php on line 18 +bool(false) + + diff --git a/ext/date/tests/bug48678.phpt b/ext/date/tests/bug48678.phpt index 896693463..e2cb724f7 100644 --- a/ext/date/tests/bug48678.phpt +++ b/ext/date/tests/bug48678.phpt @@ -1,12 +1,12 @@ --TEST-- -Bug #48678 DateInterval segfaults when unserialising +Bug #48678 (DateInterval segfaults when unserialising) --FILE-- <?php -$x = new dateinterval("P3Y6M4DT12H30M5S"); +$x = new DateInterval("P3Y6M4DT12H30M5S"); print_r($x); $y = unserialize(serialize($x)); print_r($y); ---EXPECT-- +--EXPECTF-- DateInterval Object ( [y] => 3 @@ -16,7 +16,7 @@ DateInterval Object [i] => 30 [s] => 5 [invert] => 0 - [days] => + [days] =>%s ) DateInterval Object ( @@ -27,5 +27,5 @@ DateInterval Object [i] => 30 [s] => 5 [invert] => 0 - [days] => + [days] =>%s ) diff --git a/ext/date/tests/bug50392.phpt b/ext/date/tests/bug50392.phpt index 4fa506ef5..9b1002317 100644 --- a/ext/date/tests/bug50392.phpt +++ b/ext/date/tests/bug50392.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #50392 date_create_from_format enforces 6 digits for 'u' format character +Bug #50392 (date_create_from_format enforces 6 digits for 'u' format character) --FILE-- <?php date_default_timezone_set('Europe/Bratislava'); diff --git a/ext/date/tests/bug51096.phpt b/ext/date/tests/bug51096.phpt index 31503bc7a..df31313a7 100644 --- a/ext/date/tests/bug51096.phpt +++ b/ext/date/tests/bug51096.phpt @@ -1,5 +1,5 @@ --TEST-- -Bug #51096: Test for "first day" vs "first day of". +Bug #51096 (Test for "first day" vs "first day of") --FILE-- <?php $tests = array( diff --git a/ext/date/tests/bug51866.phpt b/ext/date/tests/bug51866.phpt new file mode 100644 index 000000000..8d765b02f --- /dev/null +++ b/ext/date/tests/bug51866.phpt @@ -0,0 +1,161 @@ +--TEST-- +Bug #51866 (Lenient parsing with parseFromFormat) +--FILE-- +<?php +date_default_timezone_set('UTC'); + +$tests = array( + array( 'Y-m-d', '2001-11-29 13:20:01' ), + array( 'Y-m-d+', '2001-11-29 13:20:01' ), + array( 'Y-m-d +', '2001-11-29 13:20:01' ), + array( 'Y-m-d+', '2001-11-29' ), + array( 'Y-m-d +', '2001-11-29' ), + array( 'Y-m-d +', '2001-11-29 ' ), +); +foreach( $tests as $test ) +{ + list($format, $str) = $test; + var_dump($format, $str); + $d = DateTime::createFromFormat($format, $str); + var_dump($d); + var_dump(DateTime::getLastErrors()); + + echo "\n\n"; +} +--EXPECTF-- +string(5) "Y-m-d" +string(19) "2001-11-29 13:20:01" +bool(false) +array(4) { + ["warning_count"]=> + int(0) + ["warnings"]=> + array(0) { + } + ["error_count"]=> + int(1) + ["errors"]=> + array(1) { + [10]=> + string(13) "Trailing data" + } +} + + +string(6) "Y-m-d+" +string(19) "2001-11-29 13:20:01" +object(DateTime)#2 (3) { + ["date"]=> + string(19) "2001-11-29 %d:%d:%d" + ["timezone_type"]=> + int(3) + ["timezone"]=> + string(%d) "%s" +} +array(4) { + ["warning_count"]=> + int(1) + ["warnings"]=> + array(1) { + [10]=> + string(13) "Trailing data" + } + ["error_count"]=> + int(0) + ["errors"]=> + array(0) { + } +} + + +string(7) "Y-m-d +" +string(19) "2001-11-29 13:20:01" +object(DateTime)#3 (3) { + ["date"]=> + string(19) "2001-11-29 %d:%d:%d" + ["timezone_type"]=> + int(3) + ["timezone"]=> + string(%d) "%s" +} +array(4) { + ["warning_count"]=> + int(1) + ["warnings"]=> + array(1) { + [11]=> + string(13) "Trailing data" + } + ["error_count"]=> + int(0) + ["errors"]=> + array(0) { + } +} + + +string(6) "Y-m-d+" +string(10) "2001-11-29" +object(DateTime)#2 (3) { + ["date"]=> + string(19) "2001-11-29 %d:%d:%d" + ["timezone_type"]=> + int(3) + ["timezone"]=> + string(%d) "%s" +} +array(4) { + ["warning_count"]=> + int(0) + ["warnings"]=> + array(0) { + } + ["error_count"]=> + int(0) + ["errors"]=> + array(0) { + } +} + + +string(7) "Y-m-d +" +string(10) "2001-11-29" +bool(false) +array(4) { + ["warning_count"]=> + int(0) + ["warnings"]=> + array(0) { + } + ["error_count"]=> + int(1) + ["errors"]=> + array(1) { + [10]=> + string(12) "Data missing" + } +} + + +string(7) "Y-m-d +" +string(11) "2001-11-29 " +object(DateTime)#2 (3) { + ["date"]=> + string(19) "2001-11-29 %d:%d:%d" + ["timezone_type"]=> + int(3) + ["timezone"]=> + string(%d) "%s" +} +array(4) { + ["warning_count"]=> + int(0) + ["warnings"]=> + array(0) { + } + ["error_count"]=> + int(0) + ["errors"]=> + array(0) { + } +} diff --git a/ext/date/tests/bug51994.phpt b/ext/date/tests/bug51994.phpt index fb0fe46d8..2c456ba6e 100644 --- a/ext/date/tests/bug51994.phpt +++ b/ext/date/tests/bug51994.phpt @@ -1,12 +1,9 @@ --TEST-- Bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format) ---XFAIL-- -Bug #51994 isn't fixed yet --FILE-- <?php $trans_date = '10153'; // 152nd day of year 2010 -> 03.06.2010 $a_date = date_parse_from_format('yz', $trans_date); - var_dump($a_date); ?> --EXPECTF-- diff --git a/ext/date/tests/bug52062-64bit.phpt b/ext/date/tests/bug52062-64bit.phpt new file mode 100644 index 000000000..e4a2a524f --- /dev/null +++ b/ext/date/tests/bug52062-64bit.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp) (64 bit) +--SKIPIF-- +<?php +if (PHP_INT_SIZE == 4) die('skip 64 bit only'); +?> +--INI-- +date.timezone=UTC +--FILE-- +<?php +$d = new DateTime('@100000000000'); +var_dump($d->format('Y-m-d H:i:s U')); +var_dump($d->getTimestamp()); + +$d->setTimestamp(100000000000); +var_dump($d->format('Y-m-d H:i:s U')); +var_dump($d->getTimestamp()); + +$i = new DateInterval('PT100000000000S'); +var_dump($i->format('%s')); +?> +--EXPECT-- +string(32) "5138-11-16 09:46:40 100000000000" +int(100000000000) +string(32) "5138-11-16 09:46:40 100000000000" +int(100000000000) +string(12) "100000000000" diff --git a/ext/date/tests/bug52062.phpt b/ext/date/tests/bug52062.phpt new file mode 100644 index 000000000..d3e1c9abf --- /dev/null +++ b/ext/date/tests/bug52062.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #52062 (large timestamps with DateTime::getTimestamp and DateTime::setTimestamp) (32 bit) +--SKIPIF-- +<?php +if (PHP_INT_SIZE == 8) die('skip 32-bit only'); +?> +--INI-- +date.timezone=UTC +--FILE-- +<?php +$d = new DateTime('@100000000000'); +var_dump($d->format('Y-m-d H:i:s U')); +var_dump($d->getTimestamp()); + +$d->setTimestamp(100000000000); +var_dump($d->format('Y-m-d H:i:s U')); +var_dump($d->getTimestamp()); + +$i = new DateInterval('PT100000000000S'); +var_dump($i->format('%s')); +?> +--EXPECT-- +string(32) "5138-11-16 09:46:40 100000000000" +int(100000000000) +string(32) "5138-11-16 09:46:40 100000000000" +int(100000000000) +string(12) "100000000000" diff --git a/ext/date/tests/bug52113.phpt b/ext/date/tests/bug52113.phpt new file mode 100644 index 000000000..a7d9339d1 --- /dev/null +++ b/ext/date/tests/bug52113.phpt @@ -0,0 +1,102 @@ +--TEST-- +Bug #52113 (Seg fault while creating (by unserialization) DatePeriod) +--INI-- +date.timezone=UTC +--FILE-- +<?php +$start = new DateTime('2003-01-02 08:00:00'); +$end = new DateTime('2003-01-02 12:00:00'); +$diff = $start->diff($end); +$p = new DatePeriod($start, $diff, 2); +$diff_s = serialize($diff); +var_dump($diff, $diff_s); +var_export($diff); + +$diff_un = unserialize($diff_s); +$p = new DatePeriod($start, $diff_un, 2); +var_dump($diff_un, $p); + +$unser = DateInterval::__set_state(array( + 'y' => 7, + 'm' => 6, + 'd' => 5, + 'h' => 4, + 'i' => 3, + 's' => 2, + 'invert' => 1, + 'days' => 2400, +)); + +$p = new DatePeriod($start, $diff_un, 2); +var_dump($unser, $p); + +?> +--EXPECT-- +object(DateInterval)#3 (8) { + ["y"]=> + int(0) + ["m"]=> + int(0) + ["d"]=> + int(0) + ["h"]=> + int(4) + ["i"]=> + int(0) + ["s"]=> + int(0) + ["invert"]=> + int(0) + ["days"]=> + int(0) +} +string(128) "O:12:"DateInterval":8:{s:1:"y";i:0;s:1:"m";i:0;s:1:"d";i:0;s:1:"h";i:4;s:1:"i";i:0;s:1:"s";i:0;s:6:"invert";i:0;s:4:"days";i:0;}" +DateInterval::__set_state(array( + 'y' => 0, + 'm' => 0, + 'd' => 0, + 'h' => 4, + 'i' => 0, + 's' => 0, + 'invert' => 0, + 'days' => 0, +))object(DateInterval)#5 (8) { + ["y"]=> + int(0) + ["m"]=> + int(0) + ["d"]=> + int(0) + ["h"]=> + int(4) + ["i"]=> + int(0) + ["s"]=> + int(0) + ["invert"]=> + int(0) + ["days"]=> + int(0) +} +object(DatePeriod)#6 (0) { +} +object(DateInterval)#4 (8) { + ["y"]=> + int(7) + ["m"]=> + int(6) + ["d"]=> + int(5) + ["h"]=> + int(4) + ["i"]=> + int(3) + ["s"]=> + int(2) + ["invert"]=> + int(1) + ["days"]=> + int(2400) +} +object(DatePeriod)#7 (0) { +} diff --git a/ext/date/tests/bug53437.phpt b/ext/date/tests/bug53437.phpt new file mode 100644 index 000000000..f08986653 --- /dev/null +++ b/ext/date/tests/bug53437.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #53437 (Crash when using unserialized DatePeriod instance) +--XFAIL-- +Bug #53437 Not fixed yet +--FILE-- +<?php +$dp = new DatePeriod(new DateTime('2010-01-01 UTC'), new DateInterval('P1D'), 2); + +echo "Original:\r\n"; +foreach($dp as $dt) { + echo $dt->format('Y-m-d H:i:s')."\r\n"; +} +echo "\r\n"; +var_dump($dp); + +$ser = serialize($dp); // $ser is: O:10:"DatePeriod":0:{} + +// Create dangerous instance +$dpu = unserialize($ser); // $dpu has invalid values??? +var_dump($dpu); + +echo "Unserialized:\r\n"; +// ???which leads to CRASH: +foreach($dpu as $dt) { + echo $dt->format('Y-m-d H:i:s')."\r\n"; +} +?> +--EXPECT-- diff --git a/ext/date/tests/bug53502.phpt b/ext/date/tests/bug53502.phpt new file mode 100644 index 000000000..6cfa5e07f --- /dev/null +++ b/ext/date/tests/bug53502.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #53502 (strtotime with timezone memory leak) +--INI-- +date.timezone=UTC +--FILE-- +<?php +for ($i = 0; $i < 1000; $i++) { + strtotime('Monday 00:00 Europe/Paris'); // Memory leak +} +echo "Nothing, test only makes sense through valgrind.\n"; +?> +--EXPECT-- +Nothing, test only makes sense through valgrind. diff --git a/ext/date/tests/bug54597.phpt b/ext/date/tests/bug54597.phpt new file mode 100644 index 000000000..d196adf12 --- /dev/null +++ b/ext/date/tests/bug54597.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #54597 (incorrect years for DateTime objects created with 4-digit years) +--INI-- +date.timezone=Europe/London +--FILE-- +<?php +$tz = new DateTimeZone("Europe/Amsterdam"); +$dateObject = new DateTime( 'January 0099', $tz ); +echo $dateObject->format( 'Y' ), "\n"; +$dateObject = new DateTime( 'January 1, 0099', $tz ); +echo $dateObject->format( 'Y' ), "\n"; +$dateObject = new DateTime( '0099-01', $tz ); +echo $dateObject->format( 'Y' ), "\n"; +?> +--EXPECT-- +0099 +0099 +0099 diff --git a/ext/date/tests/bug54851.phpt b/ext/date/tests/bug54851.phpt new file mode 100644 index 000000000..84d18ba5a --- /dev/null +++ b/ext/date/tests/bug54851.phpt @@ -0,0 +1,57 @@ +--TEST-- +Bug #54851 (DateTime::createFromFormat() doesn't interpret "D") +--INI-- +date.timezone=UTC +--FILE-- +<?php +$date = new DateTime("2011-05-17T22:14:12"); +$date2 = DateTime::createFromFormat("D H i s", $date->format("D"). ' 0 00 00'); +echo $date->format("r"), "\n"; +echo $date2->format("r"), "\n"; +var_dump($date->format("D") == $date2->format("D")); + +// Verify that our implementation works regardless of position +$datePre = DateTime::createFromFormat("!D d M Y", "Fri 17 may 2011"); +$datePost = DateTime::createFromFormat("!d M Y D", "17 may 2011 Fri"); +echo $datePre->format("r"), "\n"; +echo $datePost->format("r"), "\n"; +var_dump($datePre->format("Y-m-d") == $datePost->format("Y-m-d")); + +// Verify that our implementation is the same as for the constructor and +// strtotime +$date1 = new DateTime("Tuesday"); +$date2 = DateTime::createFromFormat("D H i s", "Tuesday 0 00 00"); +echo $date1->format('r'), "\n"; +echo $date2->format('r'), "\n"; +var_dump($date1->format('D') == $date2->format('D')); + +// - when the day is not the same as the day on the original date: +$date1 = DateTime::createFromFormat("!D d M Y", "Fri 19 November 2011"); +$date2 = new DateTime("Fri 19 November 2011"); +echo $date1->format('r'), "\n"; +echo $date2->format('r'), "\n"; +var_dump($date1->format('Y-m-d') == $date2->format('Y-m-d')); + +// - when the day *is* the same as the day on the original date: +$date1 = DateTime::createFromFormat("!D d M Y", "Sat 19 November 2011"); +$date2 = new DateTime("Sat 19 November 2011"); +echo $date1->format('r'), "\n"; +echo $date2->format('r'), "\n"; +var_dump($date1->format('Y-m-d') == $date2->format('Y-m-d')); +?> +--EXPECTF-- +Tue, 17 May 2011 22:14:12 +0000 +Tue, %d %s %d 00:00:00 +0000 +bool(true) +Fri, 20 May 2011 00:00:00 +0000 +Fri, 20 May 2011 00:00:00 +0000 +bool(true) +Tue, %d %s %d 00:00:00 +0000 +Tue, %d %s %d 00:00:00 +0000 +bool(true) +Fri, 25 Nov 2011 00:00:00 +0000 +Fri, 25 Nov 2011 00:00:00 +0000 +bool(true) +Sat, 19 Nov 2011 00:00:00 +0000 +Sat, 19 Nov 2011 00:00:00 +0000 +bool(true) diff --git a/ext/date/tests/bug55253.phpt b/ext/date/tests/bug55253.phpt index 3c0efc469..5751cc112 100755 --- a/ext/date/tests/bug55253.phpt +++ b/ext/date/tests/bug55253.phpt @@ -1,9 +1,7 @@ --TEST-- -DateTime::add() and sub() result -1 hour on objects with time zone type 2 +Bug #55253 (DateTime::add() and sub() result -1 hour on objects with time zone type 2) --CREDITS-- Daniel Convissor <danielc@php.net> ---XFAIL-- -Bug 55253 exists --FILE-- <?php diff --git a/ext/date/tests/bug60236.phpt b/ext/date/tests/bug60236.phpt new file mode 100644 index 000000000..faa0e160c --- /dev/null +++ b/ext/date/tests/bug60236.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #60236 (TLA timezone dates are not converted properly from timestamp) +--INI-- +date.timezone=America/New_York +--FILE-- +<?php +$t = new DateTime('2010-07-06 18:38:28 EDT'); +$ts = $t->format('U'); +var_dump($ts); +$t->setTimestamp($ts); +var_dump($t); +?> +--EXPECT-- +string(10) "1278455908" +object(DateTime)#1 (3) { + ["date"]=> + string(19) "2010-07-06 18:38:28" + ["timezone_type"]=> + int(2) + ["timezone"]=> + string(3) "EDT" +} diff --git a/ext/date/tests/date.phpt b/ext/date/tests/date.phpt index ccdb3cda9..12bc9f0fc 100644 --- a/ext/date/tests/date.phpt +++ b/ext/date/tests/date.phpt @@ -3,13 +3,13 @@ date() function --FILE-- <?php $tmp = "cr"; -putenv ("TZ=GMT0"); +date_default_timezone_set('UTC'); for($a = 0;$a < strlen($tmp); $a++){ echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n"; } -putenv ("TZ=MET"); +date_default_timezone_set("MET"); for($a = 0;$a < strlen($tmp); $a++){ echo $tmp[$a], ': ', date($tmp[$a], 1043324459)."\n"; diff --git a/ext/date/tests/date_default_timezone_set-1.phpt b/ext/date/tests/date_default_timezone_set-1.phpt index c6a6daf7a..bca8789e7 100644 --- a/ext/date/tests/date_default_timezone_set-1.phpt +++ b/ext/date/tests/date_default_timezone_set-1.phpt @@ -1,5 +1,9 @@ --TEST-- date_default_timezone_set() function [1] +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') die('skip diff TZ detection on windows.'); +?> --INI-- date.timezone= --FILE-- diff --git a/ext/date/tests/gmstrftime_variation22.phpt b/ext/date/tests/gmstrftime_variation22.phpt index 198941871..d9abdce17 100644 --- a/ext/date/tests/gmstrftime_variation22.phpt +++ b/ext/date/tests/gmstrftime_variation22.phpt @@ -5,8 +5,8 @@ Test gmstrftime() function : usage variation - Checking Preferred date and time if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { die("skip Test is not valid for Windows"); } -if (!setlocale(LC_ALL, "en_US.utf8", "en_US")) { - die("skip Locale en_US or en_US.utf8 is required to run this test"); +if (!setlocale(LC_TIME, "POSIX")) { + die("skip Locale POSIX is required to run this test"); } ?> --FILE-- @@ -21,7 +21,8 @@ echo "*** Testing gmstrftime() : usage variation ***\n"; // Initialise function arguments not being substituted (if any) $timestamp = gmmktime(8, 8, 8, 8, 8, 2008); -setlocale(LC_ALL, "en_US.utf8", "en_US"); +setlocale(LC_TIME, "POSIX"); +putenv("LC_TIME=POSIX"); date_default_timezone_set("Asia/Calcutta"); //array of values to iterate over @@ -46,13 +47,13 @@ foreach($inputs as $key =>$value) { --Preferred date and time representation-- string(2) "%c" -string(31) "Fri 08 Aug 2008 08:08:08 AM GMT" +string(24) "Fri Aug 8 08:08:08 2008" --Preferred date representation-- string(2) "%x" -string(10) "08/08/2008" +string(8) "08/08/08" --Preferred time representation-- string(2) "%X" -string(11) "08:08:08 AM" +string(8) "08:08:08" ===DONE=== diff --git a/ext/date/tests/mktime-2.phpt b/ext/date/tests/mktime-2.phpt index aa259b577..931f63755 100644 --- a/ext/date/tests/mktime-2.phpt +++ b/ext/date/tests/mktime-2.phpt @@ -5,13 +5,13 @@ error_reporting=2047 --FILE-- <?php $timezones = array( - 'GMT0', + 'UTC', 'Europe/London' ); foreach($timezones as $timezone) { - putenv('TZ='.$timezone); + date_default_timezone_set($timezone); /* status of daylight saving time unknown */ var_dump(mktime(0, 0, 0, 1, 1, 2002)); diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type1.phpt b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type1.phpt new file mode 100644 index 000000000..c29760891 --- /dev/null +++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type1.phpt @@ -0,0 +1,380 @@ +--TEST-- +RFC: DateTime and Daylight Saving Time Transitions (zone type 1) +--CREDITS-- +Daniel Convissor <danielc@php.net> +--FILE-- +<?php + +date_default_timezone_set('America/New_York'); +$date_format = 'Y-m-d H:i:s e'; +$interval_format = 'P%dDT%hH'; + +/* + * Forward Transitions, diff(). + */ + +$end = new DateTime('2010-03-14 03:00:00 -0400'); +$start = new DateTime('2010-03-14 01:59:59 -0500'); +echo 'fd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n"; + +$end = new DateTime('2010-03-14 04:30:00 -0400'); +$start = new DateTime('2010-03-13 04:30:00 -0500'); +echo 'fd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 -0400'); +$start = new DateTime('2010-03-13 04:30:00 -0500'); +echo 'fd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 -0500'); +$start = new DateTime('2010-03-13 04:30:00 -0500'); +echo 'fd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 -0500'); +$start = new DateTime('2010-03-13 01:30:00 -0500'); +echo 'fd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 -0400'); +$start = new DateTime('2010-03-13 03:30:00 -0500'); +echo 'fd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 -0400'); +$start = new DateTime('2010-03-13 02:30:00 -0500'); +echo 'fd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +echo "\n"; + +/* + * Forward Transitions, add(). + */ + +$start = new DateTime('2010-03-14 01:59:59 -0500'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'fa1 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00 -0500'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'fa3 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00 -0500'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'fa4 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 01:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 02:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa6 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Forward Transitions, sub(). + */ + +$end = new DateTime('2010-03-14 03:00:00 -0400'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'fs1 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 04:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs2 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 -0400'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'fs3 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 -0500'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'fs4 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs5 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-15 03:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs6 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-15 02:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs7 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, diff(). + */ + +$end = new DateTime('2010-11-07 01:00:00 -0500'); +$start = new DateTime('2010-11-07 01:59:59 -0400'); +echo 'bd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n"; + +$end = new DateTime('2010-11-07 04:30:00 -0500'); +$start = new DateTime('2010-11-06 04:30:00 -0400'); +echo 'bd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00 -0500'); +$start = new DateTime('2010-11-06 04:30:00 -0400'); +echo 'bd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00 -0500'); +$start = new DateTime('2010-11-06 04:30:00 -0400'); +echo 'bd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0500'); +$start = new DateTime('2010-11-06 04:30:00 -0400'); +echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0400'); +$start = new DateTime('2010-11-06 04:30:00 -0400'); +echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0400'); +$start = new DateTime('2010-11-06 01:30:00 -0400'); +echo 'bd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0500'); +$start = new DateTime('2010-11-06 01:30:00 -0400'); +echo 'bd8 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, add(). + */ + +$start = new DateTime('2010-11-07 01:59:59 -0400'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'ba1 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba2 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 -0400'); +$interval_spec = 'PT24H'; +$interval = new DateInterval($interval_spec); +echo 'ba3 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 -0400'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'ba4 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 -0400'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'ba5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 -0400'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'ba6 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 01:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba7 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 01:30:00 -0400'); +$interval_spec = 'P1DT1H'; +$interval = new DateInterval($interval_spec); +echo 'ba8 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 -0400'); +$interval_spec = 'PT25H'; +$interval = new DateInterval($interval_spec); +echo 'ba9 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 03:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba10 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 02:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba11 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, sub(). + */ + +$end = new DateTime('2010-11-07 01:00:00 -0500'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'bs1 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 04:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs2 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00 -0500'); +$interval_spec = 'PT24H'; +$interval = new DateInterval($interval_spec); +echo 'bs3 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00 -0500'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'bs4 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0500'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'bs5 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0400'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'bs6 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0400'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs7 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 -0500'); +$interval_spec = 'P1DT1H'; +$interval = new DateInterval($interval_spec); +echo 'bs8 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs9 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00 -0500'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs10 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +?> +--EXPECT-- +fd1 2010-03-14 03:00:00 -04:00 - 2010-03-14 01:59:59 -05:00 = PT0H0M1S +fd2 2010-03-14 04:30:00 -04:00 - 2010-03-13 04:30:00 -05:00 = P0DT23H +fd3 2010-03-14 03:30:00 -04:00 - 2010-03-13 04:30:00 -05:00 = P0DT22H +fd4 2010-03-14 01:30:00 -05:00 - 2010-03-13 04:30:00 -05:00 = P0DT21H +fd5 2010-03-14 01:30:00 -05:00 - 2010-03-13 01:30:00 -05:00 = P1DT0H +fd6 2010-03-14 03:30:00 -04:00 - 2010-03-13 03:30:00 -05:00 = P0DT23H +fd7 2010-03-14 03:30:00 -04:00 - 2010-03-13 02:30:00 -05:00 = P1DT0H + +fa1 2010-03-14 01:59:59 -05:00 + PT1S = 2010-03-14 02:00:00 -05:00 +fa2 2010-03-13 04:30:00 -05:00 + P1D = 2010-03-14 04:30:00 -05:00 +fa3 2010-03-13 04:30:00 -05:00 + PT22H = 2010-03-14 02:30:00 -05:00 +fa4 2010-03-13 04:30:00 -05:00 + PT21H = 2010-03-14 01:30:00 -05:00 +fa5 2010-03-13 01:30:00 -05:00 + P1D = 2010-03-14 01:30:00 -05:00 +fa6 2010-03-13 02:30:00 -05:00 + P1D = 2010-03-14 02:30:00 -05:00 + +fs1 2010-03-14 03:00:00 -04:00 - PT1S = 2010-03-14 02:59:59 -04:00 +fs2 2010-03-14 04:30:00 -04:00 - P1D = 2010-03-13 04:30:00 -04:00 +fs3 2010-03-14 03:30:00 -04:00 - PT22H = 2010-03-13 05:30:00 -04:00 +fs4 2010-03-14 01:30:00 -05:00 - PT21H = 2010-03-13 04:30:00 -05:00 +fs5 2010-03-14 01:30:00 -05:00 - P1D = 2010-03-13 01:30:00 -05:00 +fs6 2010-03-15 03:30:00 -04:00 - P1D = 2010-03-14 03:30:00 -04:00 +fs7 2010-03-15 02:30:00 -04:00 - P1D = 2010-03-14 02:30:00 -04:00 + +bd1 2010-11-07 01:00:00 -05:00 - 2010-11-07 01:59:59 -04:00 = PT0H0M1S +bd2 2010-11-07 04:30:00 -05:00 - 2010-11-06 04:30:00 -04:00 = P1DT1H +bd3 2010-11-07 03:30:00 -05:00 - 2010-11-06 04:30:00 -04:00 = P1DT0H +bd4 2010-11-07 02:30:00 -05:00 - 2010-11-06 04:30:00 -04:00 = P0DT23H +bd5 2010-11-07 01:30:00 -05:00 - 2010-11-06 04:30:00 -04:00 = P0DT22H +bd6 2010-11-07 01:30:00 -04:00 - 2010-11-06 04:30:00 -04:00 = P0DT21H +bd7 2010-11-07 01:30:00 -04:00 - 2010-11-06 01:30:00 -04:00 = P1DT0H +bd8 2010-11-07 01:30:00 -05:00 - 2010-11-06 01:30:00 -04:00 = P1DT1H + +ba1 2010-11-07 01:59:59 -04:00 + PT1S = 2010-11-07 02:00:00 -04:00 +ba2 2010-11-06 04:30:00 -04:00 + P1D = 2010-11-07 04:30:00 -04:00 +ba3 2010-11-06 04:30:00 -04:00 + PT24H = 2010-11-07 04:30:00 -04:00 +ba4 2010-11-06 04:30:00 -04:00 + PT23H = 2010-11-07 03:30:00 -04:00 +ba5 2010-11-06 04:30:00 -04:00 + PT22H = 2010-11-07 02:30:00 -04:00 +ba6 2010-11-06 04:30:00 -04:00 + PT21H = 2010-11-07 01:30:00 -04:00 +ba7 2010-11-06 01:30:00 -04:00 + P1D = 2010-11-07 01:30:00 -04:00 +ba8 2010-11-06 01:30:00 -04:00 + P1DT1H = 2010-11-07 02:30:00 -04:00 +ba9 2010-11-06 04:30:00 -04:00 + PT25H = 2010-11-07 05:30:00 -04:00 +ba10 2010-11-06 03:30:00 -04:00 + P1D = 2010-11-07 03:30:00 -04:00 +ba11 2010-11-06 02:30:00 -04:00 + P1D = 2010-11-07 02:30:00 -04:00 + +bs1 2010-11-07 01:00:00 -05:00 - PT1S = 2010-11-07 00:59:59 -05:00 +bs2 2010-11-07 04:30:00 -05:00 - P1D = 2010-11-06 04:30:00 -05:00 +bs3 2010-11-07 03:30:00 -05:00 - PT24H = 2010-11-06 03:30:00 -05:00 +bs4 2010-11-07 02:30:00 -05:00 - PT23H = 2010-11-06 03:30:00 -05:00 +bs5 2010-11-07 01:30:00 -05:00 - PT22H = 2010-11-06 03:30:00 -05:00 +bs6 2010-11-07 01:30:00 -04:00 - PT21H = 2010-11-06 04:30:00 -04:00 +bs7 2010-11-07 01:30:00 -04:00 - P1D = 2010-11-06 01:30:00 -04:00 +bs8 2010-11-07 01:30:00 -05:00 - P1DT1H = 2010-11-06 00:30:00 -05:00 +bs9 2010-11-07 03:30:00 -05:00 - P1D = 2010-11-06 03:30:00 -05:00 +bs10 2010-11-07 02:30:00 -05:00 - P1D = 2010-11-06 02:30:00 -05:00 diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type2.phpt b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type2.phpt new file mode 100644 index 000000000..72585125e --- /dev/null +++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type2.phpt @@ -0,0 +1,380 @@ +--TEST-- +RFC: DateTime and Daylight Saving Time Transitions (zone type 2) +--CREDITS-- +Daniel Convissor <danielc@php.net> +--FILE-- +<?php + +date_default_timezone_set('America/New_York'); +$date_format = 'Y-m-d H:i:s T e'; +$interval_format = 'P%dDT%hH'; + +/* + * Forward Transitions, diff(). + */ + +$end = new DateTime('2010-03-14 03:00:00 EDT'); +$start = new DateTime('2010-03-14 01:59:59 EST'); +echo 'fd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n"; + +$end = new DateTime('2010-03-14 04:30:00 EDT'); +$start = new DateTime('2010-03-13 04:30:00 EST'); +echo 'fd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 EDT'); +$start = new DateTime('2010-03-13 04:30:00 EST'); +echo 'fd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 EST'); +$start = new DateTime('2010-03-13 04:30:00 EST'); +echo 'fd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 EST'); +$start = new DateTime('2010-03-13 01:30:00 EST'); +echo 'fd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 EDT'); +$start = new DateTime('2010-03-13 03:30:00 EST'); +echo 'fd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 EDT'); +$start = new DateTime('2010-03-13 02:30:00 EST'); +echo 'fd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +echo "\n"; + +/* + * Forward Transitions, add(). + */ + +$start = new DateTime('2010-03-14 01:59:59 EST'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'fa1 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00 EST'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'fa3 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00 EST'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'fa4 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 01:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 02:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa6 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Forward Transitions, sub(). + */ + +$end = new DateTime('2010-03-14 03:00:00 EDT'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'fs1 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 04:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs2 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00 EDT'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'fs3 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 EST'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'fs4 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs5 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-15 03:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs6 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-15 02:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs7 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, diff(). + */ + +$end = new DateTime('2010-11-07 01:00:00 EST'); +$start = new DateTime('2010-11-07 01:59:59 EDT'); +echo 'bd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n"; + +$end = new DateTime('2010-11-07 04:30:00 EST'); +$start = new DateTime('2010-11-06 04:30:00 EDT'); +echo 'bd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00 EST'); +$start = new DateTime('2010-11-06 04:30:00 EDT'); +echo 'bd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00 EST'); +$start = new DateTime('2010-11-06 04:30:00 EDT'); +echo 'bd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$start = new DateTime('2010-11-06 04:30:00 EDT'); +echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EDT'); +$start = new DateTime('2010-11-06 04:30:00 EDT'); +echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EDT'); +$start = new DateTime('2010-11-06 01:30:00 EDT'); +echo 'bd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$start = new DateTime('2010-11-06 01:30:00 EDT'); +echo 'bd8 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, add(). + */ + +$start = new DateTime('2010-11-07 01:59:59 EDT'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'ba1 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba2 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 EDT'); +$interval_spec = 'PT24H'; +$interval = new DateInterval($interval_spec); +echo 'ba3 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 EDT'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'ba4 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 EDT'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'ba5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 EDT'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'ba6 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 01:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba7 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 01:30:00 EDT'); +$interval_spec = 'P1DT1H'; +$interval = new DateInterval($interval_spec); +echo 'ba8 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00 EDT'); +$interval_spec = 'PT25H'; +$interval = new DateInterval($interval_spec); +echo 'ba9 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 03:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba10 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 02:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba11 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, sub(). + */ + +$end = new DateTime('2010-11-07 01:00:00 EST'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'bs1 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 04:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs2 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00 EST'); +$interval_spec = 'PT24H'; +$interval = new DateInterval($interval_spec); +echo 'bs3 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00 EST'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'bs4 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'bs5 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EDT'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'bs6 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EDT'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs7 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$interval_spec = 'P1DT1H'; +$interval = new DateInterval($interval_spec); +echo 'bs8 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs9 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00 EST'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs10 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +?> +--EXPECT-- +fd1 2010-03-14 03:00:00 EDT EDT - 2010-03-14 01:59:59 EST EST = PT0H0M1S +fd2 2010-03-14 04:30:00 EDT EDT - 2010-03-13 04:30:00 EST EST = P0DT23H +fd3 2010-03-14 03:30:00 EDT EDT - 2010-03-13 04:30:00 EST EST = P0DT22H +fd4 2010-03-14 01:30:00 EST EST - 2010-03-13 04:30:00 EST EST = P0DT21H +fd5 2010-03-14 01:30:00 EST EST - 2010-03-13 01:30:00 EST EST = P1DT0H +fd6 2010-03-14 03:30:00 EDT EDT - 2010-03-13 03:30:00 EST EST = P0DT23H +fd7 2010-03-14 03:30:00 EDT EDT - 2010-03-13 02:30:00 EST EST = P1DT0H + +fa1 2010-03-14 01:59:59 EST EST + PT1S = 2010-03-14 02:00:00 EST EST +fa2 2010-03-13 04:30:00 EST EST + P1D = 2010-03-14 04:30:00 EST EST +fa3 2010-03-13 04:30:00 EST EST + PT22H = 2010-03-14 02:30:00 EST EST +fa4 2010-03-13 04:30:00 EST EST + PT21H = 2010-03-14 01:30:00 EST EST +fa5 2010-03-13 01:30:00 EST EST + P1D = 2010-03-14 01:30:00 EST EST +fa6 2010-03-13 02:30:00 EST EST + P1D = 2010-03-14 02:30:00 EST EST + +fs1 2010-03-14 03:00:00 EDT EDT - PT1S = 2010-03-14 02:59:59 EDT EDT +fs2 2010-03-14 04:30:00 EDT EDT - P1D = 2010-03-13 04:30:00 EDT EDT +fs3 2010-03-14 03:30:00 EDT EDT - PT22H = 2010-03-13 05:30:00 EDT EDT +fs4 2010-03-14 01:30:00 EST EST - PT21H = 2010-03-13 04:30:00 EST EST +fs5 2010-03-14 01:30:00 EST EST - P1D = 2010-03-13 01:30:00 EST EST +fs6 2010-03-15 03:30:00 EDT EDT - P1D = 2010-03-14 03:30:00 EDT EDT +fs7 2010-03-15 02:30:00 EDT EDT - P1D = 2010-03-14 02:30:00 EDT EDT + +bd1 2010-11-07 01:00:00 EST EST - 2010-11-07 01:59:59 EDT EDT = PT0H0M1S +bd2 2010-11-07 04:30:00 EST EST - 2010-11-06 04:30:00 EDT EDT = P1DT1H +bd3 2010-11-07 03:30:00 EST EST - 2010-11-06 04:30:00 EDT EDT = P1DT0H +bd4 2010-11-07 02:30:00 EST EST - 2010-11-06 04:30:00 EDT EDT = P0DT23H +bd5 2010-11-07 01:30:00 EST EST - 2010-11-06 04:30:00 EDT EDT = P0DT22H +bd6 2010-11-07 01:30:00 EDT EDT - 2010-11-06 04:30:00 EDT EDT = P0DT21H +bd7 2010-11-07 01:30:00 EDT EDT - 2010-11-06 01:30:00 EDT EDT = P1DT0H +bd8 2010-11-07 01:30:00 EST EST - 2010-11-06 01:30:00 EDT EDT = P1DT1H + +ba1 2010-11-07 01:59:59 EDT EDT + PT1S = 2010-11-07 02:00:00 EDT EDT +ba2 2010-11-06 04:30:00 EDT EDT + P1D = 2010-11-07 04:30:00 EDT EDT +ba3 2010-11-06 04:30:00 EDT EDT + PT24H = 2010-11-07 04:30:00 EDT EDT +ba4 2010-11-06 04:30:00 EDT EDT + PT23H = 2010-11-07 03:30:00 EDT EDT +ba5 2010-11-06 04:30:00 EDT EDT + PT22H = 2010-11-07 02:30:00 EDT EDT +ba6 2010-11-06 04:30:00 EDT EDT + PT21H = 2010-11-07 01:30:00 EDT EDT +ba7 2010-11-06 01:30:00 EDT EDT + P1D = 2010-11-07 01:30:00 EDT EDT +ba8 2010-11-06 01:30:00 EDT EDT + P1DT1H = 2010-11-07 02:30:00 EDT EDT +ba9 2010-11-06 04:30:00 EDT EDT + PT25H = 2010-11-07 05:30:00 EDT EDT +ba10 2010-11-06 03:30:00 EDT EDT + P1D = 2010-11-07 03:30:00 EDT EDT +ba11 2010-11-06 02:30:00 EDT EDT + P1D = 2010-11-07 02:30:00 EDT EDT + +bs1 2010-11-07 01:00:00 EST EST - PT1S = 2010-11-07 00:59:59 EST EST +bs2 2010-11-07 04:30:00 EST EST - P1D = 2010-11-06 04:30:00 EST EST +bs3 2010-11-07 03:30:00 EST EST - PT24H = 2010-11-06 03:30:00 EST EST +bs4 2010-11-07 02:30:00 EST EST - PT23H = 2010-11-06 03:30:00 EST EST +bs5 2010-11-07 01:30:00 EST EST - PT22H = 2010-11-06 03:30:00 EST EST +bs6 2010-11-07 01:30:00 EDT EDT - PT21H = 2010-11-06 04:30:00 EDT EDT +bs7 2010-11-07 01:30:00 EDT EDT - P1D = 2010-11-06 01:30:00 EDT EDT +bs8 2010-11-07 01:30:00 EST EST - P1DT1H = 2010-11-06 00:30:00 EST EST +bs9 2010-11-07 03:30:00 EST EST - P1D = 2010-11-06 03:30:00 EST EST +bs10 2010-11-07 02:30:00 EST EST - P1D = 2010-11-06 02:30:00 EST EST diff --git a/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt new file mode 100644 index 000000000..855fe4ef6 --- /dev/null +++ b/ext/date/tests/rfc-datetime_and_daylight_saving_time-type3.phpt @@ -0,0 +1,399 @@ +--TEST-- +RFC: DateTime and Daylight Saving Time Transitions (zone type 3) +--CREDITS-- +Daniel Convissor <danielc@php.net> +--XFAIL-- +RFC not implemented yet +--FILE-- +<?php + +date_default_timezone_set('America/New_York'); +$date_format = 'Y-m-d H:i:s T e'; +$interval_format = 'P%dDT%hH'; + +/* + * Forward Transitions, diff(). + */ + +$end = new DateTime('2010-03-14 03:00:00'); +$start = new DateTime('2010-03-14 01:59:59'); +echo 'fd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n"; + +$end = new DateTime('2010-03-14 04:30:00'); +$start = new DateTime('2010-03-13 04:30:00'); +echo 'fd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00'); +$start = new DateTime('2010-03-13 04:30:00'); +echo 'fd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00'); +$start = new DateTime('2010-03-13 04:30:00'); +echo 'fd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00'); +$start = new DateTime('2010-03-13 01:30:00'); +echo 'fd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00'); +$start = new DateTime('2010-03-13 03:30:00'); +echo 'fd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00'); +$start = new DateTime('2010-03-13 02:30:00'); +echo 'fd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +echo "\n"; + +/* + * Forward Transitions, add(). + */ + +$start = new DateTime('2010-03-14 01:59:59'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'fa1 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa2 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'fa3 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 04:30:00'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'fa4 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 01:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-03-13 02:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fa6 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Forward Transitions, sub(). + */ + +$end = new DateTime('2010-03-14 03:00:00'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'fs1 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 04:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs2 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 03:30:00'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'fs3 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'fs4 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-14 01:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs5 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-15 03:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs6 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-03-15 02:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'fs7 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +echo "\n"; + + +/* + * For backward transitions, must create objects with zone type 2 + * where specifying Daylight or Standard time is required + * then converting them to zone type 3. + */ + +$tz = new DateTimeZone('America/New_York'); + +/* + * Backward Transitions, diff(). + */ + +$end = new DateTime('2010-11-07 01:00:00 EST'); +$end->setTimeZone($tz); +$start = new DateTime('2010-11-07 01:59:59'); +echo 'bd1 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format('PT%hH%iM%sS') . "\n"; + +$end = new DateTime('2010-11-07 04:30:00'); +$start = new DateTime('2010-11-06 04:30:00'); +echo 'bd2 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00'); +$start = new DateTime('2010-11-06 04:30:00'); +echo 'bd3 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00'); +$start = new DateTime('2010-11-06 04:30:00'); +echo 'bd4 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$end->setTimeZone($tz); +$start = new DateTime('2010-11-06 04:30:00'); +echo 'bd5 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EDT'); +$end->setTimeZone($tz); +$start = new DateTime('2010-11-06 04:30:00'); +echo 'bd6 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00'); +$start = new DateTime('2010-11-06 01:30:00'); +echo 'bd7 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$end->setTimeZone($tz); +$start = new DateTime('2010-11-06 01:30:00'); +echo 'bd8 ' . $end->format($date_format) . ' - ' . $start->format($date_format) + . ' = ' . $start->diff($end)->format($interval_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, add(). + */ + +$start = new DateTime('2010-11-07 01:59:59'); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'ba1 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba2 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00'); +$interval_spec = 'PT24H'; +$interval = new DateInterval($interval_spec); +echo 'ba3 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'ba4 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00'); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'ba5 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00'); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'ba6 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 01:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba7 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 01:30:00'); +$interval_spec = 'P1DT1H'; +$interval = new DateInterval($interval_spec); +echo 'ba8 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 04:30:00'); +$interval_spec = 'PT25H'; +$interval = new DateInterval($interval_spec); +echo 'ba9 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 03:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba10 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +$start = new DateTime('2010-11-06 02:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'ba11 ' . $start->format($date_format) . " + $interval_spec = " + . $start->add($interval)->format($date_format) . "\n"; + +echo "\n"; + +/* + * Backward Transitions, sub(). + */ + +$end = new DateTime('2010-11-07 01:00:00 EST'); +$end->setTimeZone($tz); +$interval_spec = 'PT1S'; +$interval = new DateInterval($interval_spec); +echo 'bs1 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 04:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs2 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00'); +$interval_spec = 'PT24H'; +$interval = new DateInterval($interval_spec); +echo 'bs3 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00'); +$interval_spec = 'PT23H'; +$interval = new DateInterval($interval_spec); +echo 'bs4 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$end->setTimeZone($tz); +$interval_spec = 'PT22H'; +$interval = new DateInterval($interval_spec); +echo 'bs5 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EDT'); +$end->setTimeZone($tz); +$interval_spec = 'PT21H'; +$interval = new DateInterval($interval_spec); +echo 'bs6 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs7 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 01:30:00 EST'); +$end->setTimeZone($tz); +$interval_spec = 'P1DT1H'; +$interval = new DateInterval($interval_spec); +echo 'bs8 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 03:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs9 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +$end = new DateTime('2010-11-07 02:30:00'); +$interval_spec = 'P1D'; +$interval = new DateInterval($interval_spec); +echo 'bs10 ' . $end->format($date_format) . " - $interval_spec = " + . $end->sub($interval)->format($date_format) . "\n"; + +?> +--EXPECT-- +fd1 2010-03-14 03:00:00 EDT America/New_York - 2010-03-14 01:59:59 EST America/New_York = PT0H0M1S +fd2 2010-03-14 04:30:00 EDT America/New_York - 2010-03-13 04:30:00 EST America/New_York = P1DT0H +fd3 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 04:30:00 EST America/New_York = P0DT22H +fd4 2010-03-14 01:30:00 EST America/New_York - 2010-03-13 04:30:00 EST America/New_York = P0DT21H +fd5 2010-03-14 01:30:00 EST America/New_York - 2010-03-13 01:30:00 EST America/New_York = P1DT0H +fd6 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 03:30:00 EST America/New_York = P1DT0H +fd7 2010-03-14 03:30:00 EDT America/New_York - 2010-03-13 02:30:00 EST America/New_York = P1DT1H + +fa1 2010-03-14 01:59:59 EST America/New_York + PT1S = 2010-03-14 03:00:00 EDT America/New_York +fa2 2010-03-13 04:30:00 EST America/New_York + P1D = 2010-03-14 04:30:00 EDT America/New_York +fa3 2010-03-13 04:30:00 EST America/New_York + PT22H = 2010-03-14 03:30:00 EDT America/New_York +fa4 2010-03-13 04:30:00 EST America/New_York + PT21H = 2010-03-14 01:30:00 EST America/New_York +fa5 2010-03-13 01:30:00 EST America/New_York + P1D = 2010-03-14 01:30:00 EST America/New_York +fa6 2010-03-13 02:30:00 EST America/New_York + P1D = 2010-03-14 03:30:00 EDT America/New_York + +fs1 2010-03-14 03:00:00 EDT America/New_York - PT1S = 2010-03-14 01:59:59 EST America/New_York +fs2 2010-03-14 04:30:00 EDT America/New_York - P1D = 2010-03-13 04:30:00 EST America/New_York +fs3 2010-03-14 03:30:00 EDT America/New_York - PT22H = 2010-03-13 04:30:00 EST America/New_York +fs4 2010-03-14 01:30:00 EST America/New_York - PT21H = 2010-03-13 04:30:00 EST America/New_York +fs5 2010-03-14 01:30:00 EST America/New_York - P1D = 2010-03-13 01:30:00 EST America/New_York +fs6 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York +fs7 2010-03-15 03:30:00 EDT America/New_York - P1D = 2010-03-14 03:30:00 EDT America/New_York + +bd1 2010-11-07 01:00:00 EST America/New_York - 2010-11-07 01:59:59 EDT America/New_York = PT0H0M1S +bd2 2010-11-07 04:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P1DT0H +bd3 2010-11-07 03:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT24H +bd4 2010-11-07 02:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT23H +bd5 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT22H +bd6 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 04:30:00 EDT America/New_York = P0DT21H +bd7 2010-11-07 01:30:00 EDT America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT0H +bd8 2010-11-07 01:30:00 EST America/New_York - 2010-11-06 01:30:00 EDT America/New_York = P1DT1H + +ba1 2010-11-07 01:59:59 EDT America/New_York + PT1S = 2010-11-07 01:00:00 EST America/New_York +ba2 2010-11-06 04:30:00 EDT America/New_York + P1D = 2010-11-07 04:30:00 EST America/New_York +ba3 2010-11-06 04:30:00 EDT America/New_York + PT24H = 2010-11-07 03:30:00 EST America/New_York +ba4 2010-11-06 04:30:00 EDT America/New_York + PT23H = 2010-11-07 02:30:00 EST America/New_York +ba5 2010-11-06 04:30:00 EDT America/New_York + PT22H = 2010-11-07 01:30:00 EST America/New_York +ba6 2010-11-06 04:30:00 EDT America/New_York + PT21H = 2010-11-07 01:30:00 EDT America/New_York +ba7 2010-11-06 01:30:00 EDT America/New_York + P1D = 2010-11-07 01:30:00 EDT America/New_York +ba8 2010-11-06 01:30:00 EDT America/New_York + P1DT1H = 2010-11-07 01:30:00 EST America/New_York +ba9 2010-11-06 04:30:00 EDT America/New_York + PT25H = 2010-11-07 04:30:00 EST America/New_York +ba10 2010-11-06 03:30:00 EDT America/New_York + P1D = 2010-11-07 03:30:00 EST America/New_York +ba11 2010-11-06 02:30:00 EDT America/New_York + P1D = 2010-11-07 02:30:00 EST America/New_York + +bs1 2010-11-07 01:00:00 EST America/New_York - PT1S = 2010-11-07 01:59:59 EDT America/New_York +bs2 2010-11-07 04:30:00 EST America/New_York - P1D = 2010-11-06 04:30:00 EDT America/New_York +bs3 2010-11-07 03:30:00 EST America/New_York - PT24H = 2010-11-06 04:30:00 EDT America/New_York +bs4 2010-11-07 02:30:00 EST America/New_York - PT23H = 2010-11-06 04:30:00 EDT America/New_York +bs5 2010-11-07 01:30:00 EST America/New_York - PT22H = 2010-11-06 04:30:00 EDT America/New_York +bs6 2010-11-07 01:30:00 EDT America/New_York - PT21H = 2010-11-06 04:30:00 EDT America/New_York +bs7 2010-11-07 01:30:00 EDT America/New_York - P1D = 2010-11-06 01:30:00 EDT America/New_York +bs8 2010-11-07 01:30:00 EST America/New_York - P1DT1H = 2010-11-06 00:30:00 EDT America/New_York +bs9 2010-11-07 03:30:00 EST America/New_York - P1D = 2010-11-06 03:30:00 EDT America/New_York +bs10 2010-11-07 02:30:00 EST America/New_York - P1D = 2010-11-06 02:30:00 EDT America/New_York diff --git a/ext/date/tests/strftime_variation22.phpt b/ext/date/tests/strftime_variation22.phpt index 151a7d206..7b72ca51e 100644 --- a/ext/date/tests/strftime_variation22.phpt +++ b/ext/date/tests/strftime_variation22.phpt @@ -5,8 +5,8 @@ Test strftime() function : usage variation - Checking Preferred date and time re if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { die("skip Test is not valid for Windows"); } -if(!setlocale(LC_ALL, "en_US.utf8", "en_US")) { - die("skip Locale en_US.utf8 or en_US is needed by test and is not available"); +if(!setlocale(LC_ALL, "POSIX")) { + die("skip Locale POSIX is needed by test and is not available"); } ?> --FILE-- @@ -20,7 +20,8 @@ if(!setlocale(LC_ALL, "en_US.utf8", "en_US")) { echo "*** Testing strftime() : usage variation ***\n"; // Initialise function arguments not being substituted (if any) -setlocale(LC_ALL, "en_US.utf8", "en_US"); +setlocale(LC_ALL, "POSIX"); +putenv("LC_ALL=POSIX"); date_default_timezone_set("Asia/Calcutta"); $timestamp = mktime(8, 8, 8, 8, 8, 2008); @@ -46,13 +47,13 @@ foreach($inputs as $key =>$value) { --Preferred date and time representation-- string(2) "%c" -string(31) "Fri 08 Aug 2008 08:08:08 AM IST" +string(24) "Fri Aug 8 08:08:08 2008" --Preferred date representation-- string(2) "%x" -string(10) "08/08/2008" +string(8) "08/08/08" --Preferred time representation-- string(2) "%X" -string(11) "08:08:08 AM" +string(8) "08:08:08" ===DONE=== diff --git a/ext/date/tests/timezone-configuration.phpt b/ext/date/tests/timezone-configuration.phpt index efd248977..c70d6456d 100644 --- a/ext/date/tests/timezone-configuration.phpt +++ b/ext/date/tests/timezone-configuration.phpt @@ -4,10 +4,10 @@ timezone configuration [1] date.timezone=GMT --FILE-- <?php - putenv('TZ=Europe/Oslo'); + date_default_timezone_set('Europe/Oslo'); echo strtotime("2005-06-18 22:15:44"), "\n"; - putenv('TZ=Europe/London'); + date_default_timezone_set('Europe/London'); echo strtotime("2005-06-18 22:15:44"), "\n"; date_default_timezone_set('Europe/Oslo'); diff --git a/ext/dba/dba.c b/ext/dba/dba.c index 558c82c8c..90ccbf34e 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: dba.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_cdb.c b/ext/dba/dba_cdb.c index 5a736d4eb..66e87ee1a 100644 --- a/ext/dba/dba_cdb.c +++ b/ext/dba/dba_cdb.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_cdb.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_cdb.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db1.c b/ext/dba/dba_db1.c index d94ba159f..c8f08821b 100755 --- a/ext/dba/dba_db1.c +++ b/ext/dba/dba_db1.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db1.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_db1.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db2.c b/ext/dba/dba_db2.c index 4077fc3b9..8bb15ba03 100644 --- a/ext/dba/dba_db2.c +++ b/ext/dba/dba_db2.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db2.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_db2.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db3.c b/ext/dba/dba_db3.c index c0a052cf2..710070ae2 100644 --- a/ext/dba/dba_db3.c +++ b/ext/dba/dba_db3.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db3.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_db3.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 4cc4d6eb7..29dfba560 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db4.c 312540 2011-06-27 22:58:59Z sixd $ */ +/* $Id: dba_db4.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_dbm.c b/ext/dba/dba_dbm.c index 26116206e..7ad92989e 100644 --- a/ext/dba/dba_dbm.c +++ b/ext/dba/dba_dbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_dbm.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_dbm.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_flatfile.c b/ext/dba/dba_flatfile.c index 51d3b6e29..8103de2cd 100644 --- a/ext/dba/dba_flatfile.c +++ b/ext/dba/dba_flatfile.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_flatfile.c 309341 2011-03-17 11:43:05Z felipe $ */ +/* $Id: dba_flatfile.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_gdbm.c b/ext/dba/dba_gdbm.c index 6aabddd16..f11f5ae68 100644 --- a/ext/dba/dba_gdbm.c +++ b/ext/dba/dba_gdbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_gdbm.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_gdbm.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_inifile.c b/ext/dba/dba_inifile.c index 233ebf8c6..1dec89b00 100644 --- a/ext/dba/dba_inifile.c +++ b/ext/dba/dba_inifile.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_inifile.c 309341 2011-03-17 11:43:05Z felipe $ */ +/* $Id: dba_inifile.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_ndbm.c b/ext/dba/dba_ndbm.c index 771af5eb9..56bd51769 100644 --- a/ext/dba/dba_ndbm.c +++ b/ext/dba/dba_ndbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_ndbm.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_ndbm.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/dba_qdbm.c b/ext/dba/dba_qdbm.c index 21bd70717..a24361e60 100755 --- a/ext/dba/dba_qdbm.c +++ b/ext/dba/dba_qdbm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_qdbm.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dba_qdbm.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dba/php_dba.h b/ext/dba/php_dba.h index e2a566992..2cbeea390 100644 --- a/ext/dba/php_dba.h +++ b/ext/dba/php_dba.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dba.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_dba.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_DBA_H #define PHP_DBA_H diff --git a/ext/dom/attr.c b/ext/dom/attr.c index ddec8f967..8ff544c24 100644 --- a/ext/dom/attr.c +++ b/ext/dom/attr.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: attr.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: attr.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/cdatasection.c b/ext/dom/cdatasection.c index c21fa3396..18f137d82 100644 --- a/ext/dom/cdatasection.c +++ b/ext/dom/cdatasection.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cdatasection.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: cdatasection.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/characterdata.c b/ext/dom/characterdata.c index 6a6109462..eb4092541 100644 --- a/ext/dom/characterdata.c +++ b/ext/dom/characterdata.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: characterdata.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: characterdata.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/comment.c b/ext/dom/comment.c index ae874e8cc..5146fef52 100644 --- a/ext/dom/comment.c +++ b/ext/dom/comment.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: comment.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: comment.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/document.c b/ext/dom/document.c index b06b38910..4d8a4dfdd 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: document.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/documentfragment.c b/ext/dom/documentfragment.c index 42dde4108..5ec2d7672 100644 --- a/ext/dom/documentfragment.c +++ b/ext/dom/documentfragment.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documentfragment.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: documentfragment.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c index 0fa76efec..8f583e547 100644 --- a/ext/dom/documenttype.c +++ b/ext/dom/documenttype.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: documenttype.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: documenttype.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/dom_ce.h b/ext/dom/dom_ce.h index ea0d4966b..a343d5a96 100644 --- a/ext/dom/dom_ce.h +++ b/ext/dom/dom_ce.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_ce.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dom_ce.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef DOM_CE_H #define DOM_CE_H diff --git a/ext/dom/dom_fe.h b/ext/dom/dom_fe.h index 6ef27b611..8e831be6d 100644 --- a/ext/dom/dom_fe.h +++ b/ext/dom/dom_fe.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_fe.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dom_fe.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef DOM_FE_H #define DOM_FE_H diff --git a/ext/dom/dom_iterators.c b/ext/dom/dom_iterators.c index b7b7fcd0a..971d1928b 100644 --- a/ext/dom/dom_iterators.c +++ b/ext/dom/dom_iterators.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_iterators.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dom_iterators.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/dom_properties.h b/ext/dom/dom_properties.h index ca2fae021..2f642a589 100644 --- a/ext/dom/dom_properties.h +++ b/ext/dom/dom_properties.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dom_properties.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dom_properties.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef DOM_PROPERTIES_H #define DOM_PROPERTIES_H diff --git a/ext/dom/domconfiguration.c b/ext/dom/domconfiguration.c index de3de6adc..37be948b1 100644 --- a/ext/dom/domconfiguration.c +++ b/ext/dom/domconfiguration.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domconfiguration.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domconfiguration.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domerror.c b/ext/dom/domerror.c index 481cce916..f4ac4cfe1 100644 --- a/ext/dom/domerror.c +++ b/ext/dom/domerror.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domerror.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domerror.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c index 73a8ef50d..c22405b02 100644 --- a/ext/dom/domerrorhandler.c +++ b/ext/dom/domerrorhandler.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domerrorhandler.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domerrorhandler.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domexception.c b/ext/dom/domexception.c index 18ac78b39..0f9b367ab 100644 --- a/ext/dom/domexception.c +++ b/ext/dom/domexception.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domexception.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domexception.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domimplementation.c b/ext/dom/domimplementation.c index 28bd39c21..0f99d5177 100644 --- a/ext/dom/domimplementation.c +++ b/ext/dom/domimplementation.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementation.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domimplementation.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domimplementationlist.c b/ext/dom/domimplementationlist.c index e1cc1f22a..2f91e68a2 100644 --- a/ext/dom/domimplementationlist.c +++ b/ext/dom/domimplementationlist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementationlist.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: domimplementationlist.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domimplementationsource.c b/ext/dom/domimplementationsource.c index b23185c37..af5c3a858 100644 --- a/ext/dom/domimplementationsource.c +++ b/ext/dom/domimplementationsource.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domimplementationsource.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domimplementationsource.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domlocator.c b/ext/dom/domlocator.c index b240c41af..7cb64bf3d 100644 --- a/ext/dom/domlocator.c +++ b/ext/dom/domlocator.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domlocator.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domlocator.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/domstringlist.c b/ext/dom/domstringlist.c index b2639ab6c..dd815e9b9 100644 --- a/ext/dom/domstringlist.c +++ b/ext/dom/domstringlist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: domstringlist.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: domstringlist.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/element.c b/ext/dom/element.c index 512e37a54..57a174f97 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: element.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/entity.c b/ext/dom/entity.c index 48abaeb9c..c4888e1cc 100644 --- a/ext/dom/entity.c +++ b/ext/dom/entity.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entity.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: entity.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/entityreference.c b/ext/dom/entityreference.c index 2e8c4b538..8e3799e2b 100644 --- a/ext/dom/entityreference.c +++ b/ext/dom/entityreference.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: entityreference.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: entityreference.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/namednodemap.c b/ext/dom/namednodemap.c index 30dff986c..6eda92209 100644 --- a/ext/dom/namednodemap.c +++ b/ext/dom/namednodemap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: namednodemap.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: namednodemap.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/namelist.c b/ext/dom/namelist.c index b731ae99a..73f5332f7 100644 --- a/ext/dom/namelist.c +++ b/ext/dom/namelist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: namelist.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: namelist.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/node.c b/ext/dom/node.c index a2c9c280a..b7a1ba7c9 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c 314493 2011-08-08 12:29:32Z iliaa $ */ +/* $Id: node.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/nodelist.c b/ext/dom/nodelist.c index a31b32aa5..1667e6a4d 100644 --- a/ext/dom/nodelist.c +++ b/ext/dom/nodelist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: nodelist.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: nodelist.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/notation.c b/ext/dom/notation.c index 6951cc443..18c56e27a 100644 --- a/ext/dom/notation.c +++ b/ext/dom/notation.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: notation.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: notation.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 4e921de0e..7f6c68716 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c 314493 2011-08-08 12:29:32Z iliaa $ */ +/* $Id: php_dom.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/php_dom.h b/ext/dom/php_dom.h index b9b295e4b..b68d1f5d8 100644 --- a/ext/dom/php_dom.h +++ b/ext/dom/php_dom.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_dom.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_DOM_H #define PHP_DOM_H diff --git a/ext/dom/processinginstruction.c b/ext/dom/processinginstruction.c index 955f59fc3..199674687 100644 --- a/ext/dom/processinginstruction.c +++ b/ext/dom/processinginstruction.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: processinginstruction.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: processinginstruction.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/string_extend.c b/ext/dom/string_extend.c index 9b8de142c..ee7f79717 100644 --- a/ext/dom/string_extend.c +++ b/ext/dom/string_extend.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string_extend.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: string_extend.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt index 85749210b..7c5f8901e 100644 --- a/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt +++ b/ext/dom/tests/DOMDocument_relaxNGValidate_error2.phpt @@ -23,3 +23,9 @@ var_dump($result); ?> --EXPECTF-- +Warning: DOMDocument::relaxNGValidate(): I/O warning : failed to load external entity "%s/foo.rng" in %s on line %d + +Warning: DOMDocument::relaxNGValidate(): xmlRelaxNGParse: could not load %s/foo.rng in %s on line %d + +Warning: DOMDocument::relaxNGValidate(): Invalid RelaxNG in %s on line %d +bool(false) diff --git a/ext/dom/tests/dom_xinclude.phpt b/ext/dom/tests/dom_xinclude.phpt index 686a9e81a..5d8906e31 100644 --- a/ext/dom/tests/dom_xinclude.phpt +++ b/ext/dom/tests/dom_xinclude.phpt @@ -10,10 +10,14 @@ in_array('compress.zlib', stream_get_wrappers()) or die('skip compress.zlib wrap $dom = new domdocument; $data = file_get_contents(dirname(__FILE__)."/xinclude.xml"); -$data = str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.dirname(__FILE__).'/', $data); +$reldir = str_replace(getcwd(),".",dirname(__FILE__)); +if (DIRECTORY_SEPARATOR == '\\') { + $reldir = str_replace('\\',"/", $reldir); +} +$data = str_replace('compress.zlib://ext/dom/tests/','compress.zlib://'.$reldir."/", $data); -$dom->loadXML($data); +$dom->loadXML($data); $dom->xinclude(); print $dom->saveXML()."\n"; foreach ($dom->documentElement->childNodes as $node) { diff --git a/ext/dom/text.c b/ext/dom/text.c index 4e761dc36..18383b42c 100644 --- a/ext/dom/text.c +++ b/ext/dom/text.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: text.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: text.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/typeinfo.c b/ext/dom/typeinfo.c index 839e7ecd5..847cff4fd 100644 --- a/ext/dom/typeinfo.c +++ b/ext/dom/typeinfo.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: typeinfo.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: typeinfo.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/userdatahandler.c b/ext/dom/userdatahandler.c index 0f1b82f4d..214ec1beb 100644 --- a/ext/dom/userdatahandler.c +++ b/ext/dom/userdatahandler.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: userdatahandler.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: userdatahandler.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/xml_common.h b/ext/dom/xml_common.h index 8f93ed7ec..818aed14a 100644 --- a/ext/dom/xml_common.h +++ b/ext/dom/xml_common.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml_common.h 314493 2011-08-08 12:29:32Z iliaa $ */ +/* $Id: xml_common.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_XML_COMMON_H #define PHP_XML_COMMON_H diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 6b650577b..6a784d121 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xpath.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: xpath.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 7b2fb7db6..1333bafe6 100755 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ | Ilia Alshanetsky <ilia@prohost.org> | +----------------------------------------------------------------------+ - $Id: enchant.c 313665 2011-07-25 11:42:53Z felipe $ + $Id: enchant.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H @@ -326,7 +326,7 @@ PHP_MINFO_FUNCTION(enchant) #elif defined(HAVE_ENCHANT_BROKER_SET_PARAM) php_info_print_table_row(2, "Libenchant Version", "1.5.0 or later"); #endif - php_info_print_table_row(2, "Revision", "$Revision: 313665 $"); + php_info_print_table_row(2, "Revision", "$Revision: 321634 $"); php_info_print_table_end(); php_info_print_table_start(); diff --git a/ext/enchant/php_enchant.h b/ext/enchant/php_enchant.h index 162862664..8f7ba58c3 100644 --- a/ext/enchant/php_enchant.h +++ b/ext/enchant/php_enchant.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 4 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Pierre-Alain Joye <paj@pearfr.org> | +----------------------------------------------------------------------+ - $Id: php_enchant.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_enchant.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ENCHANT_H diff --git a/ext/ereg/ereg.c b/ext/ereg/ereg.c index 12f85dca9..a4fa7bf0f 100644 --- a/ext/ereg/ereg.c +++ b/ext/ereg/ereg.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Jaakko Hyvätti <jaakko@hyvatti.iki.fi> | +----------------------------------------------------------------------+ */ -/* $Id: ereg.c 314398 2011-08-07 05:08:08Z rasmus $ */ +/* $Id: ereg.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdio.h> #include <ctype.h> @@ -475,6 +475,7 @@ PHPAPI char *php_ereg_replace(const char *pattern, const char *replace, const ch buf_len = 1 + buf_len + 2 * new_l; nbuf = emalloc(buf_len); strncpy(nbuf, buf, buf_len-1); + nbuf[buf_len - 1] = '\0'; efree(buf); buf = nbuf; } @@ -486,7 +487,7 @@ PHPAPI char *php_ereg_replace(const char *pattern, const char *replace, const ch walkbuf = &buf[tmp + subs[0].rm_so]; walk = replace; while (*walk) { - if ('\\' == *walk && isdigit(walk[1]) && walk[1] - '0' <= (int)re.re_nsub) { + if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= (int)re.re_nsub) { if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1 /* this next case shouldn't happen. it does. */ && subs[walk[1] - '0'].rm_so <= subs[walk[1] - '0'].rm_eo) { diff --git a/ext/ereg/php_ereg.h b/ext/ereg/php_ereg.h index fd3974904..7cba2ce51 100644 --- a/ext/ereg/php_ereg.h +++ b/ext/ereg/php_ereg.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ */ -/* $Id: php_ereg.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_ereg.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef EREG_H #define EREG_H diff --git a/ext/ereg/php_regex.h b/ext/ereg/php_regex.h index 7172589e8..6da5214e7 100644 --- a/ext/ereg/php_regex.h +++ b/ext/ereg/php_regex.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_regex.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_regex.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_REGEX_H #define PHP_REGEX_H diff --git a/ext/ereg/regex/regerror.c b/ext/ereg/regex/regerror.c index 1c66d4114..7bf741967 100644 --- a/ext/ereg/regex/regerror.c +++ b/ext/ereg/regex/regerror.c @@ -82,10 +82,12 @@ size_t errbuf_size) break; if (errcode®_ITOA) { - if (r->code >= 0) - (void) strncpy(convbuf, r->name, 50); - else + if (r->code >= 0) { + (void) strncpy(convbuf, r->name, sizeof(convbuf) - 1); + convbuf[sizeof(convbuf) - 1] = '\0'; + } else { snprintf(convbuf, sizeof(convbuf), "REG_0x%x", target); + } assert(strlen(convbuf) < sizeof(convbuf)); s = convbuf; } else diff --git a/ext/exif/exif.c b/ext/exif/exif.c index e2cf9f78c..f767b25ea 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exif.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: exif.c 321634 2012-01-01 13:15:04Z felipe $ */ /* ToDos * @@ -148,7 +148,7 @@ const zend_function_entry exif_functions[] = { }; /* }}} */ -#define EXIF_VERSION "1.4 $Id: exif.c 314376 2011-08-06 14:47:44Z felipe $" +#define EXIF_VERSION "1.4 $Id: exif.c 321634 2012-01-01 13:15:04Z felipe $" /* {{{ PHP_MINFO_FUNCTION */ @@ -2874,11 +2874,11 @@ static int exif_process_IFD_TAG(image_info_type *ImageInfo, char *dir_entry, cha offset_val = php_ifd_get32u(dir_entry+8, ImageInfo->motorola_intel); /* If its bigger than 4 bytes, the dir entry contains an offset. */ value_ptr = offset_base+offset_val; - if (offset_val+byte_count > IFDlength || value_ptr < dir_entry) { + if (byte_count > IFDlength || offset_val > IFDlength-byte_count || value_ptr < dir_entry) { /* It is important to check for IMAGE_FILETYPE_TIFF * JPEG does not use absolute pointers instead its pointers are * relative to the start of the TIFF header in APP1 section. */ - if (offset_val+byte_count>ImageInfo->FileSize || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM && ImageInfo->FileType!=IMAGE_FILETYPE_JPEG)) { + if (byte_count > ImageInfo->FileSize || offset_val>ImageInfo->FileSize-byte_count || (ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_II && ImageInfo->FileType!=IMAGE_FILETYPE_TIFF_MM && ImageInfo->FileType!=IMAGE_FILETYPE_JPEG)) { if (value_ptr < dir_entry) { /* we can read this if offset_val > 0 */ /* some files have their values in other parts of the file */ diff --git a/ext/exif/php_exif.h b/ext/exif/php_exif.h index ab351bd79..58f934a51 100644 --- a/ext/exif/php_exif.h +++ b/ext/exif/php_exif.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_exif.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_exif.h 321634 2012-01-01 13:15:04Z felipe $ */ #if HAVE_EXIF extern zend_module_entry exif_module_entry; diff --git a/ext/exif/tests/bug60150.jpg b/ext/exif/tests/bug60150.jpg Binary files differnew file mode 100644 index 000000000..2d7d1659c --- /dev/null +++ b/ext/exif/tests/bug60150.jpg diff --git a/ext/exif/tests/bug60150.phpt b/ext/exif/tests/bug60150.phpt new file mode 100755 index 000000000..63cf0a9da --- /dev/null +++ b/ext/exif/tests/bug60150.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #60150 (Integer overflow during the parsing of invalid exif header) +--SKIPIF-- +<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?> +--INI-- +output_handler= +zlib.output_compression=0 +--FILE-- +<?php +$infile = dirname(__FILE__).'/bug60150.jpg'; +var_dump(exif_read_data($infile)); +?> +===DONE=== +--EXPECTF-- +Warning: exif_read_data(bug60150.jpg): Process tag(x9003=DateTimeOri): Illegal pointer offset(x%x + x%x = x%x > x%x) in %s on line %d + +Warning: exif_read_data(bug60150.jpg): Error reading from file: got=x%x(=%d) != itemlen-%d=x%x(=%d) in %s on line %d + +Warning: exif_read_data(bug60150.jpg): Invalid JPEG file in %s on line %d +bool(false) +===DONE=== diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index 95eca4c0b..2b3f5f774 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fileinfo.c 314584 2011-08-09 05:11:19Z laruence $ */ +/* $Id: fileinfo.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -290,6 +290,16 @@ PHP_FUNCTION(finfo_open) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|ls", &options, &file, &file_len) == FAILURE) { RETURN_FALSE; } + + if (object) { + struct finfo_object *finfo_obj = (struct finfo_object*)zend_object_store_get_object(object TSRMLS_CC); + + if (finfo_obj->ptr) { + magic_close(finfo_obj->ptr->magic); + efree(finfo_obj->ptr); + finfo_obj->ptr = NULL; + } + } if (file_len == 0) { file = NULL; diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index a834c0039..3b99ce5dc 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -1,6 +1,6 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c ---- libmagic.orig/apprentice.c 2009-03-18 15:19:23.000000000 +0000 -+++ libmagic/apprentice.c 2010-01-28 11:02:24.000000000 +0000 +--- libmagic.orig/apprentice.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/apprentice.c 2011-09-15 23:29:29.000000000 +0800 @@ -29,6 +29,8 @@ * apprentice - make one pass through /etc/magic, learning its secrets. */ @@ -10,12 +10,20 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c #include "file.h" #ifndef lint -@@ -38,17 +40,24 @@ +@@ -38,17 +40,32 @@ #include "magic.h" #include "patchlevel.h" #include <stdlib.h> -#ifdef HAVE_UNISTD_H + ++#if defined(__hpux) && !defined(HAVE_STRTOULL) ++#if SIZEOF_LONG == 8 ++# define strtoull strtoul ++#else ++# define strtoull __strtoull ++#endif ++#endif ++ +#ifdef PHP_WIN32 +#include "win32/unistd.h" +#if _MSC_VER <= 1300 @@ -39,7 +47,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c #define EATAB {while (isascii((unsigned char) *l) && \ isspace((unsigned char) *l)) ++l;} -@@ -116,12 +125,10 @@ +@@ -116,12 +133,10 @@ private int parse_strength(struct magic_set *, struct magic_entry *, const char *); private int parse_apple(struct magic_set *, struct magic_entry *, const char *); @@ -52,7 +60,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c private struct { const char *name; size_t len; -@@ -135,38 +142,7 @@ +@@ -135,38 +150,7 @@ { NULL, 0, NULL } }; @@ -92,7 +100,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c static const struct type_tbl_s { const char name[16]; -@@ -222,6 +198,10 @@ +@@ -222,6 +206,10 @@ # undef XX_NULL }; @@ -103,7 +111,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c private int get_type(const char *l, const char **t) { -@@ -279,15 +259,17 @@ +@@ -279,15 +267,17 @@ if (rv != 0) return -1; rv = apprentice_compile(ms, &magic, &nmagic, fn); @@ -126,7 +134,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c if (rv != 0) return -1; } -@@ -299,11 +281,7 @@ +@@ -299,11 +289,7 @@ return -1; } @@ -139,7 +147,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c ml->magic = magic; ml->nmagic = nmagic; -@@ -315,7 +293,6 @@ +@@ -315,7 +301,6 @@ mlist->prev = ml; return 0; @@ -147,7 +155,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c } protected void -@@ -324,22 +301,18 @@ +@@ -324,22 +309,18 @@ if (p == NULL) return; switch (type) { @@ -176,7 +184,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c default: abort(); } -@@ -357,20 +330,17 @@ +@@ -357,20 +338,17 @@ if (fn == NULL) fn = getenv("MAGIC"); @@ -205,7 +213,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c mlist->next = mlist->prev = mlist; while (fn) { -@@ -384,13 +354,13 @@ +@@ -384,13 +362,13 @@ fn = p; } if (errs == -1) { @@ -222,7 +230,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c return mlist; } -@@ -523,6 +493,7 @@ +@@ -523,6 +501,7 @@ abort(); } @@ -230,7 +238,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c /* * Magic entries with no description get a bonus because they depend * on subsequent magic entries to print something. -@@ -538,8 +509,8 @@ +@@ -538,8 +517,8 @@ private int apprentice_sort(const void *a, const void *b) { @@ -241,7 +249,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c size_t sa = apprentice_magic_strength(ma->mp); size_t sb = apprentice_magic_strength(mb->mp); if (sa == sb) -@@ -617,34 +588,51 @@ +@@ -617,34 +596,51 @@ load_1(struct magic_set *ms, int action, const char *fn, int *errs, struct magic_entry **marray, uint32_t *marraycount) { @@ -303,7 +311,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c memcmp(bang[i].name, line + 2, bang[i].len) == 0) break; -@@ -670,12 +658,11 @@ +@@ -670,12 +666,11 @@ } continue; } @@ -318,7 +326,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c } } -@@ -690,7 +677,6 @@ +@@ -690,7 +685,6 @@ int errs = 0; struct magic_entry *marray; uint32_t marraycount, i, mentrycount = 0, starttest; @@ -326,7 +334,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c char subfn[MAXPATHLEN]; struct stat st; DIR *dir; -@@ -698,12 +684,8 @@ +@@ -698,12 +692,8 @@ ms->flags |= MAGIC_CHECK; /* Enable checks for parsed files */ @@ -341,7 +349,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c marraycount = 0; /* print silly verbose header for USG compat. */ -@@ -713,14 +695,14 @@ +@@ -713,14 +703,14 @@ /* load directory or file */ /* FIXME: Read file names and sort them to prevent non-determinism. See Debian bug #488562. */ @@ -358,7 +366,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c load_1(ms, action, subfn, &errs, &marray, &marraycount); } -@@ -790,12 +772,7 @@ +@@ -790,12 +780,7 @@ for (i = 0; i < marraycount; i++) mentrycount += marray[i].cont_count; @@ -372,7 +380,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c mentrycount = 0; for (i = 0; i < marraycount; i++) { -@@ -805,8 +782,8 @@ +@@ -805,8 +790,8 @@ } out: for (i = 0; i < marraycount; i++) @@ -383,7 +391,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c if (errs) { *magicp = NULL; *nmagicp = 0; -@@ -1081,11 +1058,7 @@ +@@ -1081,11 +1066,7 @@ if (me->cont_count == me->max_count) { struct magic *nm; size_t cnt = me->max_count + ALLOC_CHUNK; @@ -396,7 +404,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c me->mp = m = nm; me->max_count = cnt; } -@@ -1097,23 +1070,13 @@ +@@ -1097,23 +1078,13 @@ struct magic_entry *mp; maxmagic += ALLOC_INCR; @@ -423,7 +431,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c me->mp = m; me->max_count = ALLOC_CHUNK; } else -@@ -1264,7 +1227,7 @@ +@@ -1264,7 +1235,7 @@ m->mask_op = 0; if (*l == '~') { @@ -432,7 +440,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c m->mask_op |= FILE_OPINVERSE; else if (ms->flags & MAGIC_CHECK) file_magwarn(ms, "'~' invalid for string types"); -@@ -1274,7 +1237,7 @@ +@@ -1274,7 +1245,7 @@ m->str_flags = 0; m->num_mask = 0; if ((op = get_op(*l)) != -1) { @@ -441,7 +449,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c uint64_t val; ++l; m->mask_op |= op; -@@ -1423,11 +1386,6 @@ +@@ -1423,11 +1394,6 @@ if (check_format(ms, m) == -1) return -1; } @@ -453,7 +461,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c m->mimetype[0] = '\0'; /* initialise MIME type to none */ if (m->cont_level == 0) ++(*nmentryp); /* make room for next */ -@@ -2053,56 +2011,68 @@ +@@ -2053,56 +2019,68 @@ /* * handle a compiled file. @@ -545,7 +553,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c ptr = (uint32_t *)(void *)*magicp; if (*ptr != MAGICNO) { if (swap4(*ptr) != MAGICNO) { -@@ -2110,42 +2080,65 @@ +@@ -2110,42 +2088,65 @@ goto error1; } needsbyteswap = 1; @@ -626,7 +634,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c return -1; } -@@ -2159,41 +2152,50 @@ +@@ -2159,41 +2160,50 @@ apprentice_compile(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp, const char *fn) { @@ -688,7 +696,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c return rv; } -@@ -2206,6 +2208,7 @@ +@@ -2206,6 +2216,7 @@ { const char *p, *q; char *buf; @@ -696,7 +704,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c if (strip) { if ((p = strrchr(fn, '/')) != NULL) -@@ -2227,14 +2230,14 @@ +@@ -2227,14 +2238,14 @@ q++; /* Compatibility with old code that looked in .mime */ if (ms->flags & MAGIC_MIME) { @@ -715,7 +723,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c /* Compatibility with old code that looked in .mime */ if (strstr(p, ".mime") != NULL) -@@ -2324,7 +2327,7 @@ +@@ -2324,7 +2335,7 @@ m->offset = swap4((uint32_t)m->offset); m->in_offset = swap4((uint32_t)m->in_offset); m->lineno = swap4((uint32_t)m->lineno); @@ -725,8 +733,8 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c m->str_flags = swap4(m->str_flags); } diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c ---- libmagic.orig/ascmagic.c 2009-03-17 21:52:35.000000000 +0000 -+++ libmagic/ascmagic.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/ascmagic.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/ascmagic.c 2011-09-15 23:28:26.000000000 +0800 @@ -144,10 +144,8 @@ /* malloc size is a conservative overestimate; could be improved, or at least realloced after conversion. */ @@ -750,8 +758,8 @@ diff -u libmagic.orig/ascmagic.c libmagic/ascmagic.c return rv; } diff -u libmagic.orig/cdf.c libmagic/cdf.c ---- libmagic.orig/cdf.c 2009-05-06 15:29:47.000000000 +0100 -+++ libmagic/cdf.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/cdf.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/cdf.c 2011-09-15 23:29:29.000000000 +0800 @@ -40,7 +40,17 @@ #include <err.h> #endif @@ -815,8 +823,8 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c break; case CDF_CLIPBOARD: diff -u libmagic.orig/cdf.h libmagic/cdf.h ---- libmagic.orig/cdf.h 2009-04-29 20:03:02.000000000 +0100 -+++ libmagic/cdf.h 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/cdf.h 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/cdf.h 2011-09-15 23:29:29.000000000 +0800 @@ -42,7 +42,11 @@ typedef struct { @@ -844,8 +852,8 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h void cdf_swap_header(cdf_header_t *); void cdf_unpack_header(cdf_header_t *, char *); diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c ---- libmagic.orig/cdf_time.c 2009-03-10 11:44:29.000000000 +0000 -+++ libmagic/cdf_time.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/cdf_time.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/cdf_time.c 2011-10-19 22:51:40.000000000 +0800 @@ -96,7 +96,7 @@ } @@ -866,6 +874,15 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c t /= CDF_TIME_PREC; tm.tm_sec = t % 60; +@@ -117,7 +117,7 @@ + tm.tm_hour = t % 24; + t /= 24; + +- // XXX: Approx ++ /* XXX: Approx */ + tm.tm_year = CDF_BASE_YEAR + (t / 365); + + rdays = cdf_getdays(tm.tm_year); @@ -143,7 +143,7 @@ } @@ -894,8 +911,8 @@ diff -u libmagic.orig/cdf_time.c libmagic/cdf_time.c static const char *ref = "Sat Apr 23 01:30:00 1977"; char *p, *q; diff -u libmagic.orig/compress.c libmagic/compress.c ---- libmagic.orig/compress.c 2009-03-23 14:21:51.000000000 +0000 -+++ libmagic/compress.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/compress.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/compress.c 2011-09-15 23:28:26.000000000 +0800 @@ -32,6 +32,7 @@ * uncompress(method, old, n, newch) - uncompress old into new, * using method, return sizeof new @@ -1040,8 +1057,8 @@ diff -u libmagic.orig/compress.c libmagic/compress.c } +#endif /* if PHP_FILEINFO_UNCOMPRESS */ diff -u libmagic.orig/file.h libmagic/file.h ---- libmagic.orig/file.h 2009-03-17 21:52:35.000000000 +0000 -+++ libmagic/file.h 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/file.h 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/file.h 2011-09-15 23:28:26.000000000 +0800 @@ -33,9 +33,7 @@ #ifndef __file_h__ #define __file_h__ @@ -1195,8 +1212,8 @@ diff -u libmagic.orig/file.h libmagic/file.h #define QUICK #endif diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c ---- libmagic.orig/fsmagic.c 2009-03-17 21:52:35.000000000 +0000 -+++ libmagic/fsmagic.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/fsmagic.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/fsmagic.c 2011-09-15 23:28:26.000000000 +0800 @@ -60,29 +60,19 @@ #endif #undef HAVE_MAJOR @@ -1555,8 +1572,8 @@ diff -u libmagic.orig/fsmagic.c libmagic/fsmagic.c /* diff -u libmagic.orig/funcs.c libmagic/funcs.c ---- libmagic.orig/funcs.c 2009-04-07 12:07:00.000000000 +0100 -+++ libmagic/funcs.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/funcs.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/funcs.c 2011-09-15 23:28:26.000000000 +0800 @@ -41,52 +41,36 @@ #if defined(HAVE_WCTYPE_H) #include <wctype.h> @@ -1785,8 +1802,8 @@ diff -u libmagic.orig/funcs.c libmagic/funcs.c ms->c.li[level].got_match = 0; #ifdef ENABLE_CONDITIONALS diff -u libmagic.orig/magic.c libmagic/magic.c ---- libmagic.orig/magic.c 2009-03-20 21:25:41.000000000 +0000 -+++ libmagic/magic.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/magic.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/magic.c 2011-09-15 23:29:29.000000000 +0800 @@ -34,14 +34,19 @@ #include "magic.h" @@ -2130,8 +2147,8 @@ diff -u libmagic.orig/magic.c libmagic/magic.c public const char * magic_error(struct magic_set *ms) diff -u libmagic.orig/magic.h libmagic/magic.h ---- libmagic.orig/magic.h 2009-03-17 21:52:35.000000000 +0000 -+++ libmagic/magic.h 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/magic.h 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/magic.h 2011-09-15 23:28:26.000000000 +0800 @@ -70,6 +70,7 @@ void magic_close(magic_t); @@ -2149,8 +2166,8 @@ diff -u libmagic.orig/magic.h libmagic/magic.h #ifdef __cplusplus diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h ---- libmagic.orig/patchlevel.h 2009-05-06 21:32:48.000000000 +0100 -+++ libmagic/patchlevel.h 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/patchlevel.h 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/patchlevel.h 2011-09-15 23:28:26.000000000 +0800 @@ -3,23 +3,23 @@ /* @@ -2188,18 +2205,26 @@ diff -u libmagic.orig/patchlevel.h libmagic/patchlevel.h * Revision 1.69 2008/07/02 15:27:05 christos * welcome to 4.25 diff -u libmagic.orig/print.c libmagic/print.c ---- libmagic.orig/print.c 2009-03-17 21:52:35.000000000 +0000 -+++ libmagic/print.c 2009-12-23 19:39:50.000000000 +0000 -@@ -29,6 +29,8 @@ +--- libmagic.orig/print.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/print.c 2011-09-15 23:29:29.000000000 +0800 +@@ -28,6 +28,8 @@ + /* * print.c - debugging printout routines */ - ++#define _GNU_SOURCE +#include "php.h" -+ + #include "file.h" - #ifndef lint -@@ -45,157 +47,21 @@ +@@ -35,6 +37,7 @@ + FILE_RCSID("@(#)$File: print.c,v 1.66 2009/02/03 20:27:51 christos Exp $") + #endif /* lint */ + ++#include <stdio.h> + #include <string.h> + #include <stdarg.h> + #include <stdlib.h> +@@ -45,157 +48,21 @@ #define SZOF(a) (sizeof(a) / sizeof(a[0])) @@ -2365,8 +2390,8 @@ diff -u libmagic.orig/print.c libmagic/print.c protected const char * diff -u libmagic.orig/readcdf.c libmagic/readcdf.c ---- libmagic.orig/readcdf.c 2009-05-06 21:48:22.000000000 +0100 -+++ libmagic/readcdf.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/readcdf.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/readcdf.c 2011-09-15 23:29:29.000000000 +0800 @@ -30,7 +30,11 @@ #endif @@ -2413,8 +2438,8 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c if ((ec = strchr(c, '\n')) != NULL) *ec = '\0'; diff -u libmagic.orig/readelf.c libmagic/readelf.c ---- libmagic.orig/readelf.c 2009-03-17 21:52:35.000000000 +0000 -+++ libmagic/readelf.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/readelf.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/readelf.c 2011-09-15 23:28:26.000000000 +0800 @@ -49,7 +49,7 @@ off_t, int *, int); private int doshn(struct magic_set *, int, int, int, off_t, int, size_t, int *, @@ -2480,8 +2505,8 @@ diff -u libmagic.orig/readelf.c libmagic/readelf.c case SHT_SUNW_cap: { diff -u libmagic.orig/softmagic.c libmagic/softmagic.c ---- libmagic.orig/softmagic.c 2009-03-27 22:42:49.000000000 +0000 -+++ libmagic/softmagic.c 2009-12-23 19:39:50.000000000 +0000 +--- libmagic.orig/softmagic.c 2011-09-15 23:28:13.000000000 +0800 ++++ libmagic/softmagic.c 2011-09-15 23:29:29.000000000 +0800 @@ -41,6 +41,11 @@ #include <stdlib.h> #include <time.h> @@ -2662,7 +2687,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c } } -@@ -1672,6 +1645,66 @@ +@@ -1672,6 +1645,65 @@ return file_strncmp(a, b, len, flags); } @@ -2673,7 +2698,6 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c + char *t; + + t = (char *) safe_emalloc(Z_STRLEN_P(pattern), 2, 5); -+ memset(t, '\0', sizeof(t)); + + t[j++] = '~'; + @@ -2729,7 +2753,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c private int magiccheck(struct magic_set *ms, struct magic *m) { -@@ -1828,67 +1861,162 @@ +@@ -1828,67 +1860,162 @@ break; } case FILE_REGEX: { @@ -2773,7 +2797,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c + + convert_libmagic_pattern(pattern, options); + -+#if PHP_API_VERSION < 20100412 ++#if (PHP_MAJOR_VERSION < 6) + if ((pce = pcre_get_compiled_regex_cache(Z_STRVAL_P(pattern), Z_STRLEN_P(pattern) TSRMLS_CC)) == NULL) { #else - pmatch[0].rm_so = 0; @@ -2800,7 +2824,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c + haystack = estrndup(ms->search.s, ms->search.s_len); + + /* match v = 0, no match v = 1 */ -+#if PHP_API_VERSION < 20100412 ++#if (PHP_MAJOR_VERSION < 6) + php_pcre_match_impl(pce, haystack, ms->search.s_len, retval, subpats, 1, 1, PREG_OFFSET_CAPTURE, 0 TSRMLS_CC); +#else + php_pcre_match_impl(pce, IS_STRING, haystack, ms->search.s_len, retval, subpats, 1, 1, PREG_OFFSET_CAPTURE, 0 TSRMLS_CC); @@ -2944,7 +2968,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c default: file_magerror(ms, "invalid type %d in magiccheck()", m->type); return -1; -@@ -1900,7 +2028,7 @@ +@@ -1900,7 +2027,7 @@ case 'x': if ((ms->flags & MAGIC_DEBUG) != 0) (void) fprintf(stderr, "%llu == *any* = 1\n", @@ -2953,7 +2977,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c matched = 1; break; -@@ -1908,7 +2036,7 @@ +@@ -1908,7 +2035,7 @@ matched = v != l; if ((ms->flags & MAGIC_DEBUG) != 0) (void) fprintf(stderr, "%llu != %llu = %d\n", @@ -2962,7 +2986,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c matched); break; -@@ -1916,7 +2044,7 @@ +@@ -1916,7 +2043,7 @@ matched = v == l; if ((ms->flags & MAGIC_DEBUG) != 0) (void) fprintf(stderr, "%llu == %llu = %d\n", @@ -2971,7 +2995,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c matched); break; -@@ -1925,14 +2053,14 @@ +@@ -1925,14 +2052,14 @@ matched = v > l; if ((ms->flags & MAGIC_DEBUG) != 0) (void) fprintf(stderr, "%llu > %llu = %d\n", @@ -2989,7 +3013,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c } break; -@@ -1941,14 +2069,14 @@ +@@ -1941,14 +2068,14 @@ matched = v < l; if ((ms->flags & MAGIC_DEBUG) != 0) (void) fprintf(stderr, "%llu < %llu = %d\n", @@ -3007,7 +3031,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c } break; -@@ -1956,16 +2084,16 @@ +@@ -1956,16 +2083,16 @@ matched = (v & l) == l; if ((ms->flags & MAGIC_DEBUG) != 0) (void) fprintf(stderr, "((%llx & %llx) == %llx) = %d\n", diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index eb1562e46..6844bf5d3 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -2070,11 +2070,11 @@ apprentice_map(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp, } mm = emalloc((size_t)st.sb.st_size); + ret = 1; if (php_stream_read(stream, mm, (size_t)st.sb.st_size) != (size_t)st.sb.st_size) { file_badread(ms); goto error1; } - ret = 1; php_stream_close(stream); stream = NULL; diff --git a/ext/fileinfo/libmagic/cdf_time.c b/ext/fileinfo/libmagic/cdf_time.c index 36372966a..750c5986a 100644 --- a/ext/fileinfo/libmagic/cdf_time.c +++ b/ext/fileinfo/libmagic/cdf_time.c @@ -117,7 +117,7 @@ cdf_timestamp_to_timespec(struct timeval *ts, cdf_timestamp_t t) tm.tm_hour = t % 24; t /= 24; - // XXX: Approx + /* XXX: Approx */ tm.tm_year = CDF_BASE_YEAR + (t / 365); rdays = cdf_getdays(tm.tm_year); diff --git a/ext/fileinfo/libmagic/print.c b/ext/fileinfo/libmagic/print.c index fd10126b1..851045375 100644 --- a/ext/fileinfo/libmagic/print.c +++ b/ext/fileinfo/libmagic/print.c @@ -30,6 +30,7 @@ */ #include "php.h" +#include "main/snprintf.h" #include "file.h" diff --git a/ext/fileinfo/php_fileinfo.h b/ext/fileinfo/php_fileinfo.h index fea0d53b0..532a87ce4 100644 --- a/ext/fileinfo/php_fileinfo.h +++ b/ext/fileinfo/php_fileinfo.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fileinfo.h 306943 2011-01-01 02:51:27Z felipe $ */ +/* $Id: php_fileinfo.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_FILEINFO_H #define PHP_FILEINFO_H diff --git a/ext/fileinfo/tests/finfo_open_002.phpt b/ext/fileinfo/tests/finfo_open_002.phpt new file mode 100644 index 000000000..cf4809f09 --- /dev/null +++ b/ext/fileinfo/tests/finfo_open_002.phpt @@ -0,0 +1,17 @@ +--TEST-- +FileInfo - Calling the constructor twice +--SKIPIF-- +<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +--FILE-- +<?php + +$x = new finfo; +$x->finfo(); + +echo "done!\n"; + +?> +--EXPECTF-- +done! + + diff --git a/ext/filter/callback_filter.c b/ext/filter/callback_filter.c index 1a2ec3797..02bc73f52 100644 --- a/ext/filter/callback_filter.c +++ b/ext/filter/callback_filter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: callback_filter.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: callback_filter.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_filter.h" diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 5005c7607..a0e03dbb9 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filter.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: filter.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -318,7 +318,7 @@ PHP_MINFO_FUNCTION(filter) { php_info_print_table_start(); php_info_print_table_row( 2, "Input Validation and Filtering", "enabled" ); - php_info_print_table_row( 2, "Revision", "$Revision: 313665 $"); + php_info_print_table_row( 2, "Revision", "$Revision: 321634 $"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h index 5f498273f..ccac304a6 100644 --- a/ext/filter/filter_private.h +++ b/ext/filter/filter_private.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filter_private.h 307670 2011-01-23 09:46:06Z pajoye $ */ +/* $Id: filter_private.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef FILTER_PRIVATE_H #define FILTER_PRIVATE_H diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index 777a2157c..fa86f0f83 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: logical_filters.c 311403 2011-05-24 22:34:07Z felipe $ */ +/* $Id: logical_filters.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_filter.h" #include "filter_private.h" @@ -522,7 +522,7 @@ void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ * Feel free to use and redistribute this code. But please keep this copyright notice. * */ - const char regexp[] = "/^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD"; + const char regexp[] = "/^(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){255,})(?!(?:(?:\\x22?\\x5C[\\x00-\\x7E]\\x22?)|(?:\\x22?[^\\x5C\\x22]\\x22?)){65,}@)(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22))(?:\\.(?:(?:[\\x21\\x23-\\x27\\x2A\\x2B\\x2D\\x2F-\\x39\\x3D\\x3F\\x5E-\\x7E]+)|(?:\\x22(?:[\\x01-\\x08\\x0B\\x0C\\x0E-\\x1F\\x21\\x23-\\x5B\\x5D-\\x7F]|(?:\\x5C[\\x00-\\x7F]))*\\x22)))*@(?:(?:(?!.*[^.]{64,})(?:(?:(?:xn--)?[a-z0-9]+(?:-+[a-z0-9]+)*\\.){1,126}){1,}(?:(?:[a-z][a-z0-9]*)|(?:(?:xn--)[a-z0-9]+))(?:-+[a-z0-9]+)*)|(?:\\[(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){7})|(?:(?!(?:.*[a-f0-9][:\\]]){7,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,5})?)))|(?:(?:IPv6:(?:(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){5}:)|(?:(?!(?:.*[a-f0-9]:){5,})(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3})?::(?:[a-f0-9]{1,4}(?::[a-f0-9]{1,4}){0,3}:)?)))?(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))(?:\\.(?:(?:25[0-5])|(?:2[0-4][0-9])|(?:1[0-9]{2})|(?:[1-9]?[0-9]))){3}))\\]))$/iD"; pcre *re = NULL; pcre_extra *pcre_extra = NULL; diff --git a/ext/filter/php_filter.h b/ext/filter/php_filter.h index 011ff2757..06b00f8c3 100644 --- a/ext/filter/php_filter.h +++ b/ext/filter/php_filter.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filter.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_filter.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_FILTER_H #define PHP_FILTER_H diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index d67920852..3ed3bf176 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sanitizing_filters.c 309920 2011-04-03 16:30:31Z iliaa $ */ +/* $Id: sanitizing_filters.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_filter.h" #include "filter_private.h" diff --git a/ext/filter/tests/005.phpt b/ext/filter/tests/005.phpt index f44379153..b3735f562 100644 --- a/ext/filter/tests/005.phpt +++ b/ext/filter/tests/005.phpt @@ -1,5 +1,7 @@ --TEST-- GET/REQUEST Test with fifa example data +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --INI-- filter.default=stripped --GET-- diff --git a/ext/filter/tests/bug39763.phpt b/ext/filter/tests/bug39763.phpt index 36ee41561..69d451bbd 100644 --- a/ext/filter/tests/bug39763.phpt +++ b/ext/filter/tests/bug39763.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #39763 (filter applies magic_quotes twice in parse_str()) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --INI-- magic_quotes_gpc=1 filter.default= @@ -14,4 +16,4 @@ echo $val . "\n"; --EXPECT-- Deprecated: Directive 'magic_quotes_gpc' is deprecated in PHP 5.3 and greater in Unknown on line 0 \"probably a bug\" -\"probably a bug\"
\ No newline at end of file +\"probably a bug\" diff --git a/ext/filter/tests/bug44779.phpt b/ext/filter/tests/bug44779.phpt index 33a4fe4ff..65a1e094e 100644 --- a/ext/filter/tests/bug44779.phpt +++ b/ext/filter/tests/bug44779.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #44779 (filter returns NULL in CLI when it shouldn't) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php var_dump(filter_input(INPUT_SERVER, "PHP_SELF")); diff --git a/ext/filter/tests/bug46973.phpt b/ext/filter/tests/bug46973.phpt index 01a5118cf..eacacf5b3 100644 --- a/ext/filter/tests/bug46973.phpt +++ b/ext/filter/tests/bug46973.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #46973 (IPv6 address filter rejects valid address) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php diff --git a/ext/filter/tests/bug47435.phpt b/ext/filter/tests/bug47435.phpt index 42705fdc6..957a00194 100644 --- a/ext/filter/tests/bug47435.phpt +++ b/ext/filter/tests/bug47435.phpt @@ -1,5 +1,7 @@ --TEST--
Bug #47435 (FILTER_FLAG_NO_PRIV_RANGE and FILTER_FLAG_NO_RES_RANGE don't work with ipv6)
+--SKIPIF--
+<?php if (!extension_loaded("filter")) die("skip"); ?>
--FILE--
<?php
var_dump(filter_var("FC00::1", FILTER_VALIDATE_IP, FILTER_FLAG_IPV6));
diff --git a/ext/filter/tests/bug47745.phpt b/ext/filter/tests/bug47745.phpt index a8656fd93..feb0c2b6d 100644 --- a/ext/filter/tests/bug47745.phpt +++ b/ext/filter/tests/bug47745.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #47745 (FILTER_VALIDATE_INT doesn't allow minimum integer) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php $s = (string)(-PHP_INT_MAX-1); diff --git a/ext/filter/tests/bug48762.phpt b/ext/filter/tests/bug48762.phpt index 1737f0a75..195a61664 100644 --- a/ext/filter/tests/bug48762.phpt +++ b/ext/filter/tests/bug48762.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #48762 (IPv6 address filter still rejects valid address) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php diff --git a/ext/filter/tests/bug50158.phpt b/ext/filter/tests/bug50158.phpt index fbe2ca3af..72c31a720 100644 --- a/ext/filter/tests/bug50158.phpt +++ b/ext/filter/tests/bug50158.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #50158 (FILTER_VALIDATE_EMAIL fails with valid addresses containing = or ?) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php diff --git a/ext/filter/tests/bug55478.phpt b/ext/filter/tests/bug55478.phpt new file mode 100644 index 000000000..243d7078e --- /dev/null +++ b/ext/filter/tests/bug55478.phpt @@ -0,0 +1,11 @@ +--TEST-- +Bug #55478 (FILTER_VALIDATE_EMAIL fails with internationalized domain name addresses containing >1 -) +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> +--FILE-- +<?php +$email_address = "test@xn--example--7za.de"; // "example-ä.de" +var_dump(filter_var($email_address, FILTER_VALIDATE_EMAIL)); +?> +--EXPECT-- +string(24) "test@xn--example--7za.de" diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 37e809914..ed9bd6ad1 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: ftp.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1122,6 +1122,9 @@ ftp_putcmd(ftpbuf_t *ftp, const char *cmd, const char *args) data = ftp->outbuf; + /* Clear the extra-lines buffer */ + ftp->extra = NULL; + if (my_send(ftp, ftp->fd, data, size) != size) { return 0; } diff --git a/ext/ftp/ftp.h b/ext/ftp/ftp.h index 291391ef2..c9b2c8052 100644 --- a/ext/ftp/ftp.h +++ b/ext/ftp/ftp.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: ftp.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef FTP_H #define FTP_H diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index 3a1325f52..43495ef74 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftp.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: php_ftp.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/ftp/php_ftp.h b/ext/ftp/php_ftp.h index 65957f36a..d4caec11d 100644 --- a/ext/ftp/php_ftp.h +++ b/ext/ftp/php_ftp.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftp.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_ftp.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef _INCLUDED_FTP_H #define _INCLUDED_FTP_H diff --git a/ext/gd/gd.c b/ext/gd/gd.c index cc2ae4a16..378881d56 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: gd.c 321634 2012-01-01 13:15:04Z felipe $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ diff --git a/ext/gd/gd_ctx.c b/ext/gd/gd_ctx.c index 47ad9f6e5..a82220111 100644 --- a/ext/gd/gd_ctx.c +++ b/ext/gd/gd_ctx.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd_ctx.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: gd_ctx.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_gd.h" diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index 0cc2e1d7d..fa75898dd 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1894,19 +1894,14 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) if (im->sx < 4) { int ix = x, iy = y, c; do { - c = gdImageGetPixel(im, ix, iy); - if (c != oc) { - goto done; - } - gdImageSetPixel(im, ix, iy, nc); - } while(ix++ < (im->sx -1)); - ix = x; iy = y + 1; - do { - c = gdImageGetPixel(im, ix, iy); - if (c != oc) { - goto done; - } - gdImageSetPixel(im, ix, iy, nc); + do { + c = gdImageGetPixel(im, ix, iy); + if (c != oc) { + goto done; + } + gdImageSetPixel(im, ix, iy, nc); + } while(ix++ < (im->sx -1)); + ix = x; } while(iy++ < (im->sy -1)); goto done; } diff --git a/ext/gd/php_gd.h b/ext/gd/php_gd.h index f33c5bdcd..da4f40724 100644 --- a/ext/gd/php_gd.h +++ b/ext/gd/php_gd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_gd.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_gd.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_GD_H #define PHP_GD_H diff --git a/ext/gd/tests/bug60160.phpt b/ext/gd/tests/bug60160.phpt new file mode 100644 index 000000000..af2df4182 --- /dev/null +++ b/ext/gd/tests/bug60160.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #60160 (imagefill does not work correctly for small images) @see bug51671 +--SKIPIF-- +<?php + if(!extension_loaded('gd')){ die('skip gd extension not available'); } +?> +--FILE-- +<?php +$w = 3; +$h = 50; +$im = imagecreatetruecolor($w, $h); +$white = imagecolorallocate($im, 255, 255, 255); +imagefill($im, 0, 0, $white); + +for ($ix = 0; $ix < $w; $ix++) { + for ($iy = 0; $iy < $h; $iy++) { + if (($c = imagecolorat($im, $ix, $iy)) != $white) { + printf("Failed, ($ix, $iy) is %X\n", $c); + } + } +} + +echo "OK\n"; +?> +--EXPECTF-- +OK diff --git a/ext/gd/tests/image_type_to_mime_type_variation3.phpt b/ext/gd/tests/image_type_to_mime_type_variation3.phpt deleted file mode 100644 index 8383facb0..000000000 --- a/ext/gd/tests/image_type_to_mime_type_variation3.phpt +++ /dev/null @@ -1,76 +0,0 @@ ---TEST-- -Test image_type_to_mime_type() function : usage variations - Pass equivalent imagetype constant integer values ---FILE-- -<?php -/* Prototype : string image_type_to_mime_type(int imagetype) - * Description: Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype - * Source code: ext/standard/image.c - */ - -echo "*** Testing image_type_to_mime_type() : usage variations ***\n"; - -//There are 17 imagetypes -$number_of_imagetypes = 17; - -$iterator = 1; -for($imagetype = 1; $imagetype<=$number_of_imagetypes; $imagetype++) { - echo "\n-- Iteration $iterator --\n"; - var_dump( image_type_to_mime_type($imagetype) ); - $iterator++; -} -?> -===DONE=== ---EXPECTREGEX-- -\*\*\* Testing image_type_to_mime_type\(\) : usage variations \*\*\* - --- Iteration 1 -- -string\(9\) "image\/gif" - --- Iteration 2 -- -string\(10\) "image\/jpeg" - --- Iteration 3 -- -string\(9\) "image\/png" - --- Iteration 4 -- -string\(29\) "application\/x-shockwave-flash" - --- Iteration 5 -- -string\(9\) "image\/psd" - --- Iteration 6 -- -string\(14\) "image\/x-ms-bmp" - --- Iteration 7 -- -string\(10\) "image\/tiff" - --- Iteration 8 -- -string\(10\) "image\/tiff" - --- Iteration 9 -- -string\(24\) "application\/octet-stream" - --- Iteration 10 -- -string\(9\) "image\/jp2" - --- Iteration 11 -- -string\(24\) "application\/octet-stream" - --- Iteration 12 -- -string\(24\) "application\/octet-stream" - --- Iteration 13 -- -string\(2[49]\) "application\/(x-shockwave-flash|octet-stream)" - --- Iteration 14 -- -string\(9\) "image\/iff" - --- Iteration 15 -- -string\(18\) "image\/vnd.wap.wbmp" - --- Iteration 16 -- -string\(9\) "image\/xbm" - --- Iteration 17 -- -string\(24\) "image\/vnd.microsoft.icon" -===DONE=== diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index d315ca46b..da61cc02e 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gettext.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: gettext.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/gettext/php_gettext.h b/ext/gettext/php_gettext.h index 313cd1374..dd41cd25f 100644 --- a/ext/gettext/php_gettext.h +++ b/ext/gettext/php_gettext.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_gettext.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_gettext.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_GETTEXT_H #define PHP_GETTEXT_H diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index 1045d5abd..22e76d5c9 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/gmp/php_gmp.h b/ext/gmp/php_gmp.h index b84b3b842..1e4bffe20 100644 --- a/ext/gmp/php_gmp.h +++ b/ext/gmp/php_gmp.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/hash/hash.c b/ext/hash/hash.c index ac1e07303..ae00e38a0 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: hash.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/hash/hash_adler32.c b/ext/hash/hash_adler32.c index 4514eba7c..6c67484b0 100644 --- a/ext/hash/hash_adler32.c +++ b/ext/hash/hash_adler32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_adler32.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_adler32.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_adler32.h" diff --git a/ext/hash/hash_crc32.c b/ext/hash/hash_crc32.c index aa4c167ae..b9c0cd3f8 100644 --- a/ext/hash/hash_crc32.c +++ b/ext/hash/hash_crc32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_crc32.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_crc32.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_crc32.h" diff --git a/ext/hash/hash_gost.c b/ext/hash/hash_gost.c index e165275d2..54b2e0f7b 100644 --- a/ext/hash/hash_gost.c +++ b/ext/hash/hash_gost.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_gost.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_gost.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_gost.h" diff --git a/ext/hash/hash_haval.c b/ext/hash/hash_haval.c index c327f811b..36e2ba4dc 100644 --- a/ext/hash/hash_haval.c +++ b/ext/hash/hash_haval.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_haval.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_haval.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_haval.h" diff --git a/ext/hash/hash_md.c b/ext/hash/hash_md.c index f07b4b42b..7d3e94d60 100644 --- a/ext/hash/hash_md.c +++ b/ext/hash/hash_md.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_md.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_md.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_md.h" diff --git a/ext/hash/hash_ripemd.c b/ext/hash/hash_ripemd.c index b418471d1..2e7d0cde5 100644 --- a/ext/hash/hash_ripemd.c +++ b/ext/hash/hash_ripemd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_ripemd.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_ripemd.c 321634 2012-01-01 13:15:04Z felipe $ */ /* Heavily borrowed from md5.c & sha1.c of PHP archival fame Note that ripemd laughs in the face of logic and uses diff --git a/ext/hash/hash_salsa.c b/ext/hash/hash_salsa.c index 728f43392..076f18438 100644 --- a/ext/hash/hash_salsa.c +++ b/ext/hash/hash_salsa.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_salsa.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_salsa.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_salsa.h" diff --git a/ext/hash/hash_sha.c b/ext/hash/hash_sha.c index e4ba1eb7f..13ddb82be 100644 --- a/ext/hash/hash_sha.c +++ b/ext/hash/hash_sha.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_sha.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_sha.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_sha.h" diff --git a/ext/hash/hash_snefru.c b/ext/hash/hash_snefru.c index 0438605b6..0f94d9b7c 100644 --- a/ext/hash/hash_snefru.c +++ b/ext/hash/hash_snefru.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_snefru.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_snefru.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_snefru.h" diff --git a/ext/hash/hash_tiger.c b/ext/hash/hash_tiger.c index 238960204..48c1f6c59 100644 --- a/ext/hash/hash_tiger.c +++ b/ext/hash/hash_tiger.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_tiger.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_tiger.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" #include "php_hash_tiger.h" diff --git a/ext/hash/hash_whirlpool.c b/ext/hash/hash_whirlpool.c index f6dd2433f..cdafc483f 100644 --- a/ext/hash/hash_whirlpool.c +++ b/ext/hash/hash_whirlpool.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash_whirlpool.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: hash_whirlpool.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_hash.h" diff --git a/ext/hash/php_hash.h b/ext/hash/php_hash.h index 43b06f4b8..515feeb9a 100644 --- a/ext/hash/php_hash.h +++ b/ext/hash/php_hash.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_H #define PHP_HASH_H diff --git a/ext/hash/php_hash_adler32.h b/ext/hash/php_hash_adler32.h index f2ab2cec6..e0f08b090 100644 --- a/ext/hash/php_hash_adler32.h +++ b/ext/hash/php_hash_adler32.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_adler32.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_adler32.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_ADLER32_H #define PHP_HASH_ADLER32_H diff --git a/ext/hash/php_hash_crc32.h b/ext/hash/php_hash_crc32.h index e4083c375..6b97582c7 100644 --- a/ext/hash/php_hash_crc32.h +++ b/ext/hash/php_hash_crc32.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_crc32.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_crc32.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_CRC32_H #define PHP_HASH_CRC32_H diff --git a/ext/hash/php_hash_crc32_tables.h b/ext/hash/php_hash_crc32_tables.h index 1865180a4..9733634f1 100644 --- a/ext/hash/php_hash_crc32_tables.h +++ b/ext/hash/php_hash_crc32_tables.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_crc32_tables.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_crc32_tables.h 321634 2012-01-01 13:15:04Z felipe $ */ static const php_hash_uint32 crc32_table[] = { 0x0, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b, diff --git a/ext/hash/php_hash_gost.h b/ext/hash/php_hash_gost.h index abe2f27f1..6b4a6a9f8 100644 --- a/ext/hash/php_hash_gost.h +++ b/ext/hash/php_hash_gost.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_gost.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_gost.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_GOST_H #define PHP_HASH_GOST_H diff --git a/ext/hash/php_hash_haval.h b/ext/hash/php_hash_haval.h index b02fe8f92..2e3db892d 100644 --- a/ext/hash/php_hash_haval.h +++ b/ext/hash/php_hash_haval.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_haval.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_haval.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_HAVAL_H #define PHP_HASH_HAVAL_H diff --git a/ext/hash/php_hash_md.h b/ext/hash/php_hash_md.h index 83cfba9e9..90bfe3d84 100644 --- a/ext/hash/php_hash_md.h +++ b/ext/hash/php_hash_md.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_md.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_md.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_MD_H #define PHP_HASH_MD_H diff --git a/ext/hash/php_hash_ripemd.h b/ext/hash/php_hash_ripemd.h index 77ae2c70c..2b8b2aa6a 100644 --- a/ext/hash/php_hash_ripemd.h +++ b/ext/hash/php_hash_ripemd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_ripemd.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_ripemd.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_RIPEMD_H #define PHP_HASH_RIPEMD_H diff --git a/ext/hash/php_hash_salsa.h b/ext/hash/php_hash_salsa.h index 471775c33..33388a4bf 100644 --- a/ext/hash/php_hash_salsa.h +++ b/ext/hash/php_hash_salsa.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_salsa.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_salsa.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_SALSA_H #define PHP_HASH_SALSA_H diff --git a/ext/hash/php_hash_sha.h b/ext/hash/php_hash_sha.h index 260f70a6f..9b5a53f48 100644 --- a/ext/hash/php_hash_sha.h +++ b/ext/hash/php_hash_sha.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_sha.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_sha.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_SHA_H #define PHP_HASH_SHA_H diff --git a/ext/hash/php_hash_snefru.h b/ext/hash/php_hash_snefru.h index e013a5b76..a47ca78cf 100644 --- a/ext/hash/php_hash_snefru.h +++ b/ext/hash/php_hash_snefru.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_snefru.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_snefru.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_SNEFRU_H #define PHP_HASH_SNEFRU_H diff --git a/ext/hash/php_hash_snefru_tables.h b/ext/hash/php_hash_snefru_tables.h index 2e920f281..4b0a71c6c 100644 --- a/ext/hash/php_hash_snefru_tables.h +++ b/ext/hash/php_hash_snefru_tables.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_snefru_tables.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_snefru_tables.h 321634 2012-01-01 13:15:04Z felipe $ */ static const php_hash_uint32 tables[16][256]= { diff --git a/ext/hash/php_hash_tiger.h b/ext/hash/php_hash_tiger.h index 20842fc44..f67152b4a 100644 --- a/ext/hash/php_hash_tiger.h +++ b/ext/hash/php_hash_tiger.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_tiger.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_tiger.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_TIGER_H #define PHP_HASH_TIGER_H diff --git a/ext/hash/php_hash_tiger_tables.h b/ext/hash/php_hash_tiger_tables.h index dffb8f167..0252804d2 100644 --- a/ext/hash/php_hash_tiger_tables.h +++ b/ext/hash/php_hash_tiger_tables.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_tiger_tables.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_tiger_tables.h 321634 2012-01-01 13:15:04Z felipe $ */ #define t1 (table) #define t2 (table+256) diff --git a/ext/hash/php_hash_types.h b/ext/hash/php_hash_types.h index a728f187d..e34cf0836 100644 --- a/ext/hash/php_hash_types.h +++ b/ext/hash/php_hash_types.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_types.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_types.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_TYPES_H #define PHP_HASH_TYPES_H diff --git a/ext/hash/php_hash_whirlpool.h b/ext/hash/php_hash_whirlpool.h index 773f502fa..46c3c57e1 100644 --- a/ext/hash/php_hash_whirlpool.h +++ b/ext/hash/php_hash_whirlpool.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_whirlpool.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_whirlpool.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_WHIRLPOOL_H #define PHP_HASH_WHIRLPOOL_H diff --git a/ext/hash/php_hash_whirlpool_tables.h b/ext/hash/php_hash_whirlpool_tables.h index 02a20e588..9cd9cbff2 100644 --- a/ext/hash/php_hash_whirlpool_tables.h +++ b/ext/hash/php_hash_whirlpool_tables.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_whirlpool_tables.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_hash_whirlpool_tables.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HASH_WHIRLPOOL_TABLES_H #define PHP_HASH_WHIRLPOOL_TABLES_H diff --git a/ext/hash/tests/hash_copy_001.phpt b/ext/hash/tests/hash_copy_001.phpt index ffc87c3a8..35d50a5cd 100644 --- a/ext/hash/tests/hash_copy_001.phpt +++ b/ext/hash/tests/hash_copy_001.phpt @@ -1,5 +1,7 @@ --TEST-- hash_copy() basic tests +--SKIPIF-- +<?php extension_loaded('hash') or die('skip'); ?> --FILE-- <?php diff --git a/ext/hash/tests/hash_copy_002.phpt b/ext/hash/tests/hash_copy_002.phpt index 77cbca426..aac4c3bdd 100644 --- a/ext/hash/tests/hash_copy_002.phpt +++ b/ext/hash/tests/hash_copy_002.phpt @@ -1,5 +1,7 @@ --TEST-- hash_copy() errors +--SKIPIF-- +<?php extension_loaded('hash') or die('skip'); ?> --FILE-- <?php diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index ea27b1944..ecde19279 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iconv.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: iconv.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index 72266f666..11124d5d0 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Revision: 306939 $ */ +/* $Revision: 321634 $ */ #ifndef PHP_ICONV_H #define PHP_ICONV_H diff --git a/ext/iconv/tests/bug52941.phpt b/ext/iconv/tests/bug52941.phpt index 753c9ada1..b336d40c4 100644 --- a/ext/iconv/tests/bug52941.phpt +++ b/ext/iconv/tests/bug52941.phpt @@ -28,14 +28,14 @@ var_dump($decoded['X-Foo']); var_dump($decoded['X-Bar']); var_dump($decoded['To']); ?> ---EXPECT-- +--EXPECTF-- string(17) "<foo@example.com>" -string(29) "=?ks_c_5601-1987?B?UkU6odk=?=" -string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo" -string(32) "=?ks_c_5601-1987?B?UkU6odk=?=Foo" +string(%d) "%s" +string(%d) "%sFoo" +string(%d) "%sFoo" string(18) "<test@example.com>" string(17) "<foo@example.com>" -string(29) "=?ks_c_5601-1987?B?UkU6odk=?=" -string(33) "=?ks_c_5601-1987?B?UkU6odk=?= Foo" -string(32) "=?ks_c_5601-1987?B?UkU6odk=?=Foo" +string(%d) "%s" +string(%d) "%sFoo" +string(%d) "%sFoo" string(18) "<test@example.com>" diff --git a/ext/iconv/tests/iconv_stream_filter.phpt b/ext/iconv/tests/iconv_stream_filter.phpt index 6a60bafeb..79f6ad517 100644 --- a/ext/iconv/tests/iconv_stream_filter.phpt +++ b/ext/iconv/tests/iconv_stream_filter.phpt @@ -22,7 +22,7 @@ fclose($fp); $fp = fopen(dirname(__FILE__).'/iconv_stream_filter.txt', 'rb'); stream_filter_append($fp, 'string.rot13'); // this will make conversion fail. stream_filter_append($fp, 'convert.iconv.ISO-2022-JP/EUC-JP'); -var_dump(bin2hex(fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf"); +var_dump(bin2hex(@fread($fp, 10)) != "a4b3a4f3a4cba4c1a4cf"); var_dump(bin2hex(fread($fp, 5)) != "69636f6e76"); var_dump(bin2hex(fread($fp, 1)) != "0a"); fclose($fp); diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 59ce0ce74..a0676e9a1 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: php_imap.c 321634 2012-01-01 13:15:04Z felipe $ */ #define IMAP41 diff --git a/ext/imap/php_imap.h b/ext/imap/php_imap.h index 5e9c029fc..d0bb9898f 100644 --- a/ext/imap/php_imap.h +++ b/ext/imap/php_imap.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -27,7 +27,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_imap.h 307691 2011-01-24 03:52:00Z stas $ */ +/* $Id: php_imap.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_IMAP_H #define PHP_IMAP_H diff --git a/ext/imap/tests/imap_utf8_to_mutf7_basic.phpt b/ext/imap/tests/imap_utf8_to_mutf7_basic.phpt index 6598be0d2..54b43efae 100644 --- a/ext/imap/tests/imap_utf8_to_mutf7_basic.phpt +++ b/ext/imap/tests/imap_utf8_to_mutf7_basic.phpt @@ -1,8 +1,8 @@ --TEST-- imap_utf8_to_mutf7 --SKIPIF-- -<?php if (!extension_loaded("imap")) print "skip"; ?> -<?php if (!function_exists("imap_utf8_to_mutf7")) print "skip"; ?> +<?php if (!extension_loaded("imap")) print "skip imap extension not loaded"; ?> +<?php if (!function_exists("imap_utf8_to_mutf7")) print "skip imap_utf8_to_mutf7() not available"; ?> --FILE-- <?php diff --git a/ext/interbase/ibase_blobs.c b/ext/interbase/ibase_blobs.c index 92df8fe40..609781eab 100644 --- a/ext/interbase/ibase_blobs.c +++ b/ext/interbase/ibase_blobs.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_blobs.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: ibase_blobs.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_events.c b/ext/interbase/ibase_events.c index a8fa86fa3..1a4975797 100644 --- a/ext/interbase/ibase_events.c +++ b/ext/interbase/ibase_events.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_events.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: ibase_events.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_query.c b/ext/interbase/ibase_query.c index b72721631..6fdac8650 100644 --- a/ext/interbase/ibase_query.c +++ b/ext/interbase/ibase_query.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_query.c 313447 2011-07-19 20:25:51Z mariuz $ */ +/* $Id: ibase_query.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/ibase_service.c b/ext/interbase/ibase_service.c index b02d2156c..e8817e8f1 100644 --- a/ext/interbase/ibase_service.c +++ b/ext/interbase/ibase_service.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ibase_service.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: ibase_service.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index a1bed0157..183398fab 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.c 313830 2011-07-28 10:39:19Z pajoye $ */ +/* $Id: interbase.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/interbase/php_ibase_includes.h b/ext/interbase/php_ibase_includes.h index 071d9447f..07b24bbf6 100755 --- a/ext/interbase/php_ibase_includes.h +++ b/ext/interbase/php_ibase_includes.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ibase_includes.h 311341 2011-05-22 19:06:21Z felipe $ */ +/* $Id: php_ibase_includes.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_IBASE_INCLUDES_H #define PHP_IBASE_INCLUDES_H diff --git a/ext/interbase/php_ibase_udf.c b/ext/interbase/php_ibase_udf.c index fac8bbe61..b90514601 100644 --- a/ext/interbase/php_ibase_udf.c +++ b/ext/interbase/php_ibase_udf.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ibase_udf.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_ibase_udf.c 321634 2012-01-01 13:15:04Z felipe $ */ /** * This UDF library adds the ability to call PHP functions from SQL diff --git a/ext/interbase/php_interbase.h b/ext/interbase/php_interbase.h index a93fb9a7c..10bbd4d0a 100644 --- a/ext/interbase/php_interbase.h +++ b/ext/interbase/php_interbase.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_interbase.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_interbase.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_INTERBASE_H #define PHP_INTERBASE_H diff --git a/ext/interbase/tests/003.phpt b/ext/interbase/tests/003.phpt index 4be516701..bc4338ad4 100644 --- a/ext/interbase/tests/003.phpt +++ b/ext/interbase/tests/003.phpt @@ -3,7 +3,7 @@ InterBase: misc sql types (may take a while) --SKIPIF-- <?php include("skipif.inc"); ?> --FILE-- -<?php /* $Id: 003.phpt 160078 2004-05-30 16:20:25Z abies $ */ +<?php /* $Id: 003.phpt 321992 2012-01-10 05:26:20Z mariuz $ */ require("interbase.inc"); ibase_connect($test_base); @@ -21,7 +21,7 @@ InterBase: misc sql types (may take a while) v_numeric15_0 numeric(15,0), v_double double precision, v_float float, - v_integer integer, + v_integer integer, v_smallint smallint, v_varchar varchar(10000) )"); @@ -157,27 +157,27 @@ array(22) { int(10) ["ID_10"]=> int(11) - ["FIELD_00"]=> + ["CONSTANT"]=> int(12) - ["FIELD_01"]=> + ["CONSTANT_01"]=> int(13) - ["FIELD_02"]=> + ["CONSTANT_02"]=> int(14) - ["FIELD_03"]=> + ["CONSTANT_03"]=> int(15) - ["FIELD_04"]=> + ["CONSTANT_04"]=> int(16) - ["FIELD_05"]=> + ["CONSTANT_05"]=> int(17) - ["FIELD_06"]=> + ["CONSTANT_06"]=> int(18) - ["FIELD_07"]=> + ["CONSTANT_07"]=> int(19) - ["FIELD_08"]=> + ["CONSTANT_08"]=> int(20) - ["FIELD_09"]=> + ["CONSTANT_09"]=> int(21) - ["FIELD_10"]=> + ["CONSTANT_10"]=> int(22) } end of test diff --git a/ext/interbase/tests/006.phpt b/ext/interbase/tests/006.phpt index 2aeb0739d..331d2437f 100644 --- a/ext/interbase/tests/006.phpt +++ b/ext/interbase/tests/006.phpt @@ -3,7 +3,7 @@ InterBase: binding (may take a while) --SKIPIF-- <?php include("skipif.inc"); ?> --FILE-- -<?php /* $Id: 006.phpt 160078 2004-05-30 16:20:25Z abies $ */ +<?php /* $Id: 006.phpt 316521 2011-09-12 09:56:45Z mariuz $ */ require("interbase.inc"); @@ -210,7 +210,7 @@ InterBase: binding (may take a while) out_result($res, "test6"); ibase_free_result($res); - $res = ibase_execute($query, "5", 7.5); + $res = ibase_execute($query, "5", 7.499); out_result($res, "test6"); ibase_free_result($res); diff --git a/ext/interbase/tests/skipif.inc b/ext/interbase/tests/skipif.inc index 78c0d5ca3..2430e7ca6 100755 --- a/ext/interbase/tests/skipif.inc +++ b/ext/interbase/tests/skipif.inc @@ -1,5 +1,9 @@ -<?php /* $Id: skipif.inc 155152 2004-04-01 16:25:51Z abies $ */ +<?php /* $Id: skipif.inc 317169 2011-09-22 22:07:02Z tyrael $ */ -if (!extension_loaded("interbase")) print "skip"; +if (!extension_loaded("interbase")) print "skip interbase extension not available"; +require("interbase.inc"); +if(!@ibase_connect($test_base)){ + die("skip cannot connnect"); +} ?> diff --git a/ext/intl/collator/collator_compare.c b/ext/intl/collator/collator_compare.c index 840855661..4384558ac 100755 --- a/ext/intl/collator/collator_compare.c +++ b/ext/intl/collator/collator_compare.c @@ -58,6 +58,14 @@ PHP_FUNCTION( collator_compare ) /* Fetch the object. */ COLLATOR_METHOD_FETCH_OBJECT; + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + + RETURN_FALSE; + } /* * Compare given strings (converting them to UTF-16 first). diff --git a/ext/intl/collator/collator_locale.c b/ext/intl/collator/collator_locale.c index 331fed22f..b30b021ee 100755 --- a/ext/intl/collator/collator_locale.c +++ b/ext/intl/collator/collator_locale.c @@ -51,6 +51,15 @@ PHP_FUNCTION( collator_get_locale ) /* Fetch the object. */ COLLATOR_METHOD_FETCH_OBJECT; + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + + RETURN_FALSE; + } + /* Get locale by specified type. */ locale_name = (char*) ucol_getLocaleByType( co->ucoll, type, COLLATOR_ERROR_CODE_P( co ) ); diff --git a/ext/intl/collator/collator_sort.c b/ext/intl/collator/collator_sort.c index 929a9c09d..a871c90a8 100755 --- a/ext/intl/collator/collator_sort.c +++ b/ext/intl/collator/collator_sort.c @@ -73,6 +73,13 @@ static int collator_regular_compare_function(zval *result, zval *op1, zval *op2 /* Fetch collator object. */ co = (Collator_object *) zend_object_store_get_object( INTL_G(current_collator) TSRMLS_CC ); + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + } + /* Compare the strings using ICU. */ result->value.lval = ucol_strcoll( co->ucoll, @@ -387,6 +394,14 @@ PHP_FUNCTION( collator_sort_with_sort_keys ) /* Fetch the object. */ COLLATOR_METHOD_FETCH_OBJECT; + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + + RETURN_FALSE; + } /* * Sort specified array. @@ -551,6 +566,14 @@ PHP_FUNCTION( collator_get_sort_key ) /* Fetch the object. */ COLLATOR_METHOD_FETCH_OBJECT; + if (!co || !co->ucoll) { + intl_error_set_code( NULL, COLLATOR_ERROR_CODE( co ) TSRMLS_CC ); + intl_errors_set_custom_msg( COLLATOR_ERROR_P( co ), + "Object not initialized", 0 TSRMLS_CC ); + php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "Object not initialized"); + + RETURN_FALSE; + } /* * Compare given strings (converting them to UTF-16 first). diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c index b306bbede..448a9db72 100755 --- a/ext/intl/formatter/formatter_attr.c +++ b/ext/intl/formatter/formatter_attr.c @@ -77,11 +77,11 @@ PHP_FUNCTION( numfmt_get_attribute ) break; case UNUM_ROUNDING_INCREMENT: { - double value = unum_getDoubleAttribute(FORMATTER_OBJECT(nfo), attribute); - if(value == -1) { + double value_double = unum_getDoubleAttribute(FORMATTER_OBJECT(nfo), attribute); + if(value_double == -1) { INTL_DATA_ERROR_CODE(nfo) = U_UNSUPPORTED_ERROR; } else { - RETVAL_DOUBLE(value); + RETVAL_DOUBLE(value_double); } } break; diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index bbfb65bbd..593b6e472 100755 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: locale_methods.c 307392 2011-01-12 00:29:59Z felipe $ */ +/* $Id: locale_methods.c 319676 2011-11-22 12:29:15Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -470,6 +470,7 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME char* disp_loc_name = NULL; int disp_loc_name_len = 0; + int free_loc_name = 0; UChar* disp_name = NULL; int32_t disp_name_len = 0; @@ -517,17 +518,18 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME if( mod_loc_name==NULL ){ mod_loc_name = estrdup( loc_name ); } + + /* Check if disp_loc_name passed , if not use default locale */ + if( !disp_loc_name){ + disp_loc_name = estrdup(INTL_G(default_locale)); + free_loc_name = 1; + } /* Get the disp_value for the given locale */ do{ disp_name = erealloc( disp_name , buflen ); disp_name_len = buflen; - /* Check if disp_loc_name passed , if not use default locale */ - if( !disp_loc_name){ - disp_loc_name = estrdup(INTL_G(default_locale)); - } - if( strcmp(tag_name , LOC_LANG_TAG)==0 ){ buflen = uloc_getDisplayLanguage ( mod_loc_name , disp_loc_name , disp_name , disp_name_len , &status); } else if( strcmp(tag_name , LOC_SCRIPT_TAG)==0 ){ @@ -557,6 +559,10 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME if( mod_loc_name){ efree( mod_loc_name ); } + if (free_loc_name) { + efree(disp_loc_name); + disp_loc_name = NULL; + } RETURN_FALSE; } } while( buflen > disp_name_len ); @@ -564,6 +570,10 @@ static void get_icu_disp_value_src_php( char* tag_name, INTERNAL_FUNCTION_PARAME if( mod_loc_name){ efree( mod_loc_name ); } + if (free_loc_name) { + efree(disp_loc_name); + disp_loc_name = NULL; + } /* Convert display locale name from UTF-16 to UTF-8. */ intl_convert_utf16_to_utf8( &utf8value, &utf8value_len, disp_name, buflen, &status ); efree( disp_name ); diff --git a/ext/intl/tests/bug60192-compare.phpt b/ext/intl/tests/bug60192-compare.phpt new file mode 100644 index 000000000..0fd24cce8 --- /dev/null +++ b/ext/intl/tests/bug60192-compare.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #60192 (SegFault when Collator not constructed properly) +--SKIPIF-- +<?php + if (!extension_loaded('intl')) { die('skip intl extension not available'); } +?> +--FILE-- +<?php +class Collator2 extends Collator{ + public function __construct() { + // ommitting parent::__construct($someLocale); + } +} + +$c = new Collator2(); +$a = $c->compare('h', 'H'); +--EXPECTF-- + +Catchable fatal error: Collator::compare(): Object not initialized in %s on line %d diff --git a/ext/intl/tests/bug60192-getlocale.phpt b/ext/intl/tests/bug60192-getlocale.phpt new file mode 100644 index 000000000..50e3ec35e --- /dev/null +++ b/ext/intl/tests/bug60192-getlocale.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #60192 (SegFault when Collator not constructed properly) +--SKIPIF-- +<?php + if (!extension_loaded('intl')) { die('skip intl extension not available'); } +?> +--FILE-- +<?php + +class Collator2 extends Collator{ + public function __construct() { + // ommitting parent::__construct($someLocale); + } +} + +$c = new Collator2(); +$c->getLocale(Locale::ACTUAL_LOCALE); +--EXPECTF-- + +Catchable fatal error: Collator::getLocale(): Object not initialized in %s on line %d diff --git a/ext/intl/tests/bug60192-getsortkey.phpt b/ext/intl/tests/bug60192-getsortkey.phpt new file mode 100644 index 000000000..39755ae8f --- /dev/null +++ b/ext/intl/tests/bug60192-getsortkey.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #60192 (SegFault when Collator not constructed properly) +--SKIPIF-- +<?php + if (!extension_loaded('intl')) { die('skip intl extension not available'); } +?> +--FILE-- +<?php + +class Collator2 extends Collator{ + public function __construct() { + // ommitting parent::__construct($someLocale); + } +} + +$c = new Collator2(); +$c->getSortKey('h'); +--EXPECTF-- + +Catchable fatal error: Collator::getSortKey(): Object not initialized in %s on line %d diff --git a/ext/intl/tests/bug60192-sort.phpt b/ext/intl/tests/bug60192-sort.phpt new file mode 100644 index 000000000..57057215e --- /dev/null +++ b/ext/intl/tests/bug60192-sort.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #60192 (SegFault when Collator not constructed properly) +--SKIPIF-- +<?php + if (!extension_loaded('intl')) { die('skip intl extension not available'); } +?> +--FILE-- +<?php + +class Collator2 extends Collator{ + public function __construct() { + // ommitting parent::__construct($someLocale); + } +} + +$c = new Collator2(); +$a = array('a', 'b'); +$c->sort($a); +--EXPECTF-- + +Catchable fatal error: Collator::sort(): Object not initialized in %s on line %d diff --git a/ext/intl/tests/bug60192-sortwithsortkeys.phpt b/ext/intl/tests/bug60192-sortwithsortkeys.phpt new file mode 100644 index 000000000..445f4a03b --- /dev/null +++ b/ext/intl/tests/bug60192-sortwithsortkeys.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #60192 (SegFault when Collator not constructed properly) +--SKIPIF-- +<?php + if (!extension_loaded('intl')) { die('skip intl extension not available'); } +?> +--FILE-- +<?php + +class Collator2 extends Collator{ + public function __construct() { + // ommitting parent::__construct($someLocale); + } +} + +$c = new Collator2(); +$a = array('a', 'b'); +$c->sortWithSortKeys($a); +--EXPECTF-- + +Catchable fatal error: Collator::sortWithSortKeys(): Object not initialized in %s on line %d diff --git a/ext/intl/tests/dateformat_parse.phpt b/ext/intl/tests/dateformat_parse.phpt index b3be895e5..ce800aa48 100755 --- a/ext/intl/tests/dateformat_parse.phpt +++ b/ext/intl/tests/dateformat_parse.phpt @@ -2,6 +2,8 @@ datefmt_parse_code() --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +--INI-- +date.timezone="America/Los_Angeles" --FILE-- <?php @@ -9,13 +11,14 @@ datefmt_parse_code() * Test for the datefmt_parse function */ +putenv('TZ=America/Los_Angeles'); function ut_main() { $locale_arr = array ( 'en_US_CA' ); - + $datetype_arr = array ( IntlDateFormatter::FULL, IntlDateFormatter::LONG, @@ -28,36 +31,34 @@ function ut_main() $text_arr = array ( - "Sunday, September 18, 2039 4:06:40 PM PT", - "Wednesday, December 17, 1969 6:40:00 PM PT", - "Thursday, December 18, 1969 8:49:59 AM PST", - "Thursday, December 18, 1969 8:49:59 PM PST", - "December 18, 1969 8:49:59 AM PST", - "12/18/69 8:49 AM", - "19691218 08:49 AM" + // Full parsing + array("Sunday, September 18, 2039 4:06:40 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::FULL), + array("Wednesday, December 17, 1969 6:40:00 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::FULL), + array("Thursday, December 18, 1969 8:49:59 PM PST", IntlDateFormatter::FULL, IntlDateFormatter::FULL), + array("December 18, 1969 8:49:59 AM PST", IntlDateFormatter::LONG, IntlDateFormatter::FULL), + array("12/18/69 8:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT), + array("19691218 08:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::SHORT), + // Partial parsing + array("Sunday, September 18, 2039 4:06:40 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::NONE), + array("Sunday, September 18, 2039 4:06:40 PM PT", IntlDateFormatter::FULL, IntlDateFormatter::SHORT), + array("December 18, 1969 8:49:59 AM PST", IntlDateFormatter::LONG, IntlDateFormatter::NONE), + array("December 18, 1969 8:49:59 AM PST", IntlDateFormatter::LONG, IntlDateFormatter::SHORT), + array("12/18/69 8:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::LONG), + array("19691218 08:49 AM", IntlDateFormatter::SHORT, IntlDateFormatter::LONG), ); - $parse_pos = 0; - $fmt = ut_datefmt_create( 'en_US_CA', IntlDateFormatter::NONE, IntlDateFormatter::SHORT); foreach( $text_arr as $text_entry){ - for ( $parse_pos = 0 ; $parse_pos< strlen($text_entry) ; $parse_pos++ ){ - $i = $parse_pos; - $parsed = ut_datefmt_parse( $fmt , $text_entry , $parse_pos ); - if( intl_get_error_code() == U_ZERO_ERROR){ - $res_str .= "\nInput text :$text_entry ; Parsed text : $parsed"; - $res_str .= " ; parse_pos : $i $parse_pos"; - } else { - $parse_pos = $i; - } -/* - else{ - $res_str .= "\nError while parsing as: '".intl_get_error_message()."'"; - } -*/ + $fmt = ut_datefmt_create( 'en_US_CA', $text_entry[1], $text_entry[2]); + $parse_pos = 0; + $parsed = ut_datefmt_parse( $fmt , $text_entry[0] , $parse_pos ); + + $res_str .= "\nInput text : {$text_entry[0]} ; DF = {$text_entry[1]}; TF = {$text_entry[2]}"; + if( intl_get_error_code() != U_ZERO_ERROR) { + $res_str .= "\nError : ".intl_get_error_message(); } + $res_str .= "\nParsed: $parsed; parse_pos : $parse_pos\n"; } - return $res_str; } @@ -68,10 +69,44 @@ include_once( 'ut_common.inc' ); ut_run(); ?> --EXPECT-- -Input text :Sunday, September 18, 2039 4:06:40 PM PT ; Parsed text : 96000 ; parse_pos : 29 37 -Input text :Wednesday, December 17, 1969 6:40:00 PM PT ; Parsed text : 216000 ; parse_pos : 31 39 -Input text :Thursday, December 18, 1969 8:49:59 AM PST ; Parsed text : 208740 ; parse_pos : 30 38 -Input text :Thursday, December 18, 1969 8:49:59 PM PST ; Parsed text : 251940 ; parse_pos : 30 38 -Input text :December 18, 1969 8:49:59 AM PST ; Parsed text : 208740 ; parse_pos : 20 28 -Input text :12/18/69 8:49 AM ; Parsed text : 60540 ; parse_pos : 8 16 -Input text :19691218 08:49 AM ; Parsed text : 60540 ; parse_pos : 8 17 + +Input text : Sunday, September 18, 2039 4:06:40 PM PT ; DF = 0; TF = 0 +Parsed: 2200000000; parse_pos : 40 + +Input text : Wednesday, December 17, 1969 6:40:00 PM PT ; DF = 0; TF = 0 +Parsed: -1200000; parse_pos : 42 + +Input text : Thursday, December 18, 1969 8:49:59 PM PST ; DF = 0; TF = 0 +Parsed: -1105801; parse_pos : 42 + +Input text : December 18, 1969 8:49:59 AM PST ; DF = 1; TF = 0 +Parsed: -1149001; parse_pos : 32 + +Input text : 12/18/69 8:49 AM ; DF = 3; TF = 3 +Parsed: -1149060; parse_pos : 16 + +Input text : 19691218 08:49 AM ; DF = 3; TF = 3 +Error : Date parsing failed: U_PARSE_ERROR +Parsed: ; parse_pos : 8 + +Input text : Sunday, September 18, 2039 4:06:40 PM PT ; DF = 0; TF = -1 +Parsed: 2199942000; parse_pos : 26 + +Input text : Sunday, September 18, 2039 4:06:40 PM PT ; DF = 0; TF = 3 +Error : Date parsing failed: U_PARSE_ERROR +Parsed: ; parse_pos : 31 + +Input text : December 18, 1969 8:49:59 AM PST ; DF = 1; TF = -1 +Parsed: -1180800; parse_pos : 17 + +Input text : December 18, 1969 8:49:59 AM PST ; DF = 1; TF = 3 +Error : Date parsing failed: U_PARSE_ERROR +Parsed: ; parse_pos : 22 + +Input text : 12/18/69 8:49 AM ; DF = 3; TF = 1 +Error : Date parsing failed: U_PARSE_ERROR +Parsed: ; parse_pos : 13 + +Input text : 19691218 08:49 AM ; DF = 3; TF = 1 +Error : Date parsing failed: U_PARSE_ERROR +Parsed: ; parse_pos : 8 diff --git a/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt b/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt index b7e820388..040f72e47 100755 --- a/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt +++ b/ext/intl/tests/dateformat_parse_timestamp_parsepos.phpt @@ -2,6 +2,10 @@ datefmt_parse_timestamp_code() with parse pos --SKIPIF-- <?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> +--INI-- +datetime.timezone="America/Los_Angeles" +--ENV-- +TZ=America/Los_Angeles --FILE-- <?php @@ -15,7 +19,7 @@ function ut_main() $locale_arr = array ( 'en_US_CA' ); - + $datetype_arr = array ( IntlDateFormatter::FULL, IntlDateFormatter::LONG, @@ -31,8 +35,8 @@ function ut_main() "Sunday, September 18, 3039 4:06:40 PM PT", "Thursday, December 18, 1969 8:49:59 AM PST", //"December 18, 1969 8:49:59 AM PST", - //"12/18/69 8:49 AM", - "19001218 08:49 AM", + "12/18/69 8:49 AM", + "20111218 08:49 AM", "19691218 08:49 AM" ); @@ -46,18 +50,19 @@ function ut_main() $res_str .= "\n------------"; foreach( $datetype_arr as $datetype_entry ) { - $res_str .= "\ndatetype = $datetype_entry ,timetype =$datetype_entry "; + $res_str .= "\ndatetype = $datetype_entry ,timetype =$datetype_entry"; $fmt = ut_datefmt_create( $locale_entry , $datetype_entry ,$datetype_entry); - $parsed = ut_datefmt_parse( $fmt , $text_entry); + $pos = 0; + $parsed = ut_datefmt_parse( $fmt , $text_entry, $pos); if( intl_get_error_code() == U_ZERO_ERROR){ - $res_str .= "\nParsed text is : $parsed"; + $res_str .= "\nParsed text is : $parsed; Position = $pos"; }else{ - $res_str .= "\nError while parsing as: '".intl_get_error_message()."'"; + $res_str .= "\nError while parsing as: '".intl_get_error_message()."'; Position = $pos"; } } } } - + $res_str .= "\n"; return $res_str; @@ -75,61 +80,77 @@ Input text is : Sunday, September 18, 3039 4:06:40 PM PT ------------ Locale is : en_US_CA ------------ -datetype = 0 ,timetype =0 -Parsed text is : 33756908800 -datetype = 1 ,timetype =1 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 2 ,timetype =2 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 3 ,timetype =3 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = -1 ,timetype =-1 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' +datetype = 0 ,timetype =0 +Parsed text is : 33756908800; Position = 40 +datetype = 1 ,timetype =1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 2 ,timetype =2 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 3 ,timetype =3 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = -1 ,timetype =-1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 ------------ Input text is : Thursday, December 18, 1969 8:49:59 AM PST ------------ Locale is : en_US_CA ------------ -datetype = 0 ,timetype =0 -Parsed text is : -1149001 -datetype = 1 ,timetype =1 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 2 ,timetype =2 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 3 ,timetype =3 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = -1 ,timetype =-1 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' +datetype = 0 ,timetype =0 +Parsed text is : -1149001; Position = 42 +datetype = 1 ,timetype =1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 2 ,timetype =2 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 3 ,timetype =3 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = -1 ,timetype =-1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +------------ + +Input text is : 12/18/69 8:49 AM +------------ +Locale is : en_US_CA +------------ +datetype = 0 ,timetype =0 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 1 ,timetype =1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 2 ,timetype =2 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 3 ,timetype =3 +Parsed text is : -1149060; Position = 16 +datetype = -1 ,timetype =-1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 ------------ -Input text is : 19001218 08:49 AM +Input text is : 20111218 08:49 AM ------------ Locale is : en_US_CA ------------ -datetype = 0 ,timetype =0 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 1 ,timetype =1 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 2 ,timetype =2 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 3 ,timetype =3 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = -1 ,timetype =-1 -Parsed text is : -2178601860 +datetype = 0 ,timetype =0 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 1 ,timetype =1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 2 ,timetype =2 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 3 ,timetype =3 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 8 +datetype = -1 ,timetype =-1 +Parsed text is : 1324226940; Position = 17 ------------ Input text is : 19691218 08:49 AM ------------ Locale is : en_US_CA ------------ -datetype = 0 ,timetype =0 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 1 ,timetype =1 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 2 ,timetype =2 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = 3 ,timetype =3 -Error while parsing as: 'Date parsing failed: U_PARSE_ERROR' -datetype = -1 ,timetype =-1 -Parsed text is : -1149060 +datetype = 0 ,timetype =0 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 1 ,timetype =1 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 2 ,timetype =2 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 0 +datetype = 3 ,timetype =3 +Error while parsing as: 'Date parsing failed: U_PARSE_ERROR'; Position = 8 +datetype = -1 ,timetype =-1 +Parsed text is : -1149060; Position = 17 diff --git a/ext/intl/tests/locale_get_display_region.phpt b/ext/intl/tests/locale_get_display_region.phpt index 354fc0623..48cd7b6c7 100755 --- a/ext/intl/tests/locale_get_display_region.phpt +++ b/ext/intl/tests/locale_get_display_region.phpt @@ -163,14 +163,14 @@ disp_locale=fr : display_region=Serbie-et-Monténégro disp_locale=de : display_region=Serbien und Montenegro ----------------- locale='sl-rozaj' -disp_locale=en : display_region= -disp_locale=fr : display_region= -disp_locale=de : display_region= +disp_locale=en : display_region=(ROZAJ)? +disp_locale=fr : display_region=(ROZAJ)? +disp_locale=de : display_region=(ROZAJ)? ----------------- locale='sl-nedis' -disp_locale=en : display_region= -disp_locale=fr : display_region= -disp_locale=de : display_region= +disp_locale=en : display_region=(NEDIS)? +disp_locale=fr : display_region=(NEDIS)? +disp_locale=de : display_region=(NEDIS)? ----------------- locale='de-CH-1901' disp_locale=en : display_region=Switzerland diff --git a/ext/intl/tests/locale_get_region.phpt b/ext/intl/tests/locale_get_region.phpt index 0bebb331a..0baae4993 100755 --- a/ext/intl/tests/locale_get_region.phpt +++ b/ext/intl/tests/locale_get_region.phpt @@ -84,7 +84,7 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECT-- +--EXPECTF-- uk-ua_CALIFORNIA@currency=;currency=GRN: region='UA' root: region='' uk@currency=EURO: region='' @@ -99,8 +99,8 @@ sr-Cyrl: region='' sr-Latn: region='' zh-Hans-CN: region='CN' sr-Latn-CS: region='CS' -sl-rozaj: region='' -sl-nedis: region='' +sl-rozaj: region='%r(ROZAJ)?%r' +sl-nedis: region='%r(NEDIS)?%r' de-CH-1901: region='CH' sl-IT-nedis: region='IT' sl-Latn-IT-nedis: region='IT' @@ -108,7 +108,7 @@ de-DE: region='DE' en-US: region='US' es-419: region='419' de-CH-x-phonebk: region='CH' -az-Arab-x-AZE-derbend: region='' +az-Arab-x-AZE-derbend: region='%r(X)?%r' zh-min: region='' zh-min-nan-Hant-CN: region='MIN' x-whatever: region='' @@ -117,7 +117,7 @@ sr-Latn-QM: region='QM' sr-Qaaa-CS: region='CS' en-US-u-islamCal: region='US' zh-CN-a-myExt-x-private: region='CN' -en-a-myExt-b-another: region='' +en-a-myExt-b-another: region='%r(A)?%r' de-419-DE: region='419' a-DE: region='DE' -ar-a-aaa-b-bbb-a-ccc: region='' +ar-a-aaa-b-bbb-a-ccc: region='%r(A)?%r' diff --git a/ext/intl/tests/locale_parse_locale.phpt b/ext/intl/tests/locale_parse_locale.phpt index e47f71830..36637f0d8 100755 --- a/ext/intl/tests/locale_parse_locale.phpt +++ b/ext/intl/tests/locale_parse_locale.phpt @@ -6,7 +6,7 @@ locale_parse_locale() <?php /* - * Try parsing different Locales + * Try parsing different Locales * with Procedural and Object methods. */ @@ -72,11 +72,12 @@ function ut_main() { $arr = ut_loc_locale_parse( $locale); $res_str .= "---------------------\n"; - $res_str .= "$locale: \n"; + $res_str .= "$locale:\n"; if( $arr){ foreach( $arr as $key => $value){ $res_str .= "$key : '$value' , "; } + $res_str = rtrim($res_str); } else{ $res_str .= "No values found from Locale parsing."; @@ -93,109 +94,109 @@ include_once( 'ut_common.inc' ); ut_run(); ?> ---EXPECT-- +--EXPECTF-- --------------------- -uk-ua_CALIFORNIA@currency=;currency=GRN: -language : 'uk' , region : 'UA' , variant0 : 'CALIFORNIA' , +uk-ua_CALIFORNIA@currency=;currency=GRN: +language : 'uk' , region : 'UA' , variant0 : 'CALIFORNIA' , --------------------- -root: -language : 'root' , +root: +language : 'root' , --------------------- -uk@currency=EURO: -language : 'uk' , +uk@currency=EURO: +language : 'uk' , --------------------- -Hindi: -language : 'hindi' , +Hindi: +language : 'hindi' , --------------------- -de: -language : 'de' , +de: +language : 'de' , --------------------- -fr: -language : 'fr' , +fr: +language : 'fr' , --------------------- -ja: -language : 'ja' , +ja: +language : 'ja' , --------------------- -i-enochian: -grandfathered : 'i-enochian' , +i-enochian: +grandfathered : 'i-enochian' , --------------------- -zh-Hant: -language : 'zh' , script : 'Hant' , +zh-Hant: +language : 'zh' , script : 'Hant' , --------------------- -zh-Hans: -language : 'zh' , script : 'Hans' , +zh-Hans: +language : 'zh' , script : 'Hans' , --------------------- -sr-Cyrl: -language : 'sr' , script : 'Cyrl' , +sr-Cyrl: +language : 'sr' , script : 'Cyrl' , --------------------- -sr-Latn: -language : 'sr' , script : 'Latn' , +sr-Latn: +language : 'sr' , script : 'Latn' , --------------------- -zh-Hans-CN: -language : 'zh' , script : 'Hans' , region : 'CN' , +zh-Hans-CN: +language : 'zh' , script : 'Hans' , region : 'CN' , --------------------- -sr-Latn-CS: -language : 'sr' , script : 'Latn' , region : 'CS' , +sr-Latn-CS: +language : 'sr' , script : 'Latn' , region : 'CS' , --------------------- -sl-rozaj: -language : 'sl' , +sl-rozaj: +language : 'sl' ,%r( region : 'ROZAJ' ,)?%r --------------------- -sl-nedis: -language : 'sl' , +sl-nedis: +language : 'sl' ,%r( region : 'NEDIS' ,)?%r --------------------- -de-CH-1901: -language : 'de' , region : 'CH' , variant0 : '1901' , +de-CH-1901: +language : 'de' , region : 'CH' , variant0 : '1901' , --------------------- -sl-IT-nedis: -language : 'sl' , region : 'IT' , variant0 : 'NEDIS' , +sl-IT-nedis: +language : 'sl' , region : 'IT' , variant0 : 'NEDIS' , --------------------- -sl-Latn-IT-nedis: -language : 'sl' , script : 'Latn' , region : 'IT' , variant0 : 'NEDIS' , +sl-Latn-IT-nedis: +language : 'sl' , script : 'Latn' , region : 'IT' , variant0 : 'NEDIS' , --------------------- -de-DE: -language : 'de' , region : 'DE' , +de-DE: +language : 'de' , region : 'DE' , --------------------- -en-US: -language : 'en' , region : 'US' , +en-US: +language : 'en' , region : 'US' , --------------------- -es-419: -language : 'es' , region : '419' , +es-419: +language : 'es' , region : '419' , --------------------- -de-CH-x-phonebk: -language : 'de' , region : 'CH' , private0 : 'phonebk' , +de-CH-x-phonebk: +language : 'de' , region : 'CH' , private0 : 'phonebk' , --------------------- -az-Arab-x-AZE-derbend: -language : 'az' , script : 'Arab' , private0 : 'AZE' , private1 : 'derbend' , +az-Arab-x-AZE-derbend: +language : 'az' , script : 'Arab' , private0 : 'AZE' , private1 : 'derbend' , --------------------- -zh-min: -grandfathered : 'zh-min' , +zh-min: +grandfathered : 'zh-min' , --------------------- -zh-min-nan-Hant-CN: -language : 'zh' , region : 'MIN' , variant0 : 'NAN' , variant1 : 'HANT' , variant2 : 'CN' , +zh-min-nan-Hant-CN: +language : 'zh' , region : 'MIN' , variant0 : 'NAN' , variant1 : 'HANT' , variant2 : 'CN' , --------------------- -qaa-Qaaa-QM-x-southern: -language : 'qaa' , script : 'Qaaa' , region : 'QM' , private0 : 'southern' , +qaa-Qaaa-QM-x-southern: +language : 'qaa' , script : 'Qaaa' , region : 'QM' , private0 : 'southern' , --------------------- -sr-Latn-QM: -language : 'sr' , script : 'Latn' , region : 'QM' , +sr-Latn-QM: +language : 'sr' , script : 'Latn' , region : 'QM' , --------------------- -sr-Qaaa-CS: -language : 'sr' , script : 'Qaaa' , region : 'CS' , +sr-Qaaa-CS: +language : 'sr' , script : 'Qaaa' , region : 'CS' , --------------------- -en-US-u-islamCal: -language : 'en' , region : 'US' , +en-US-u-islamCal: +language : 'en' , region : 'US' , --------------------- -zh-CN-a-myExt-x-private: -language : 'zh' , region : 'CN' , private0 : 'private' , +zh-CN-a-myExt-x-private: +language : 'zh' , region : 'CN' , private0 : 'private' , --------------------- -en-a-myExt-b-another: -language : 'en' , +en-a-myExt-b-another: +language : 'en' , --------------------- -de-419-DE: -language : 'de' , region : '419' , variant0 : 'DE' , +de-419-DE: +language : 'de' , region : '419' , variant0 : 'DE' , --------------------- -a-DE: +a-DE: No values found from Locale parsing. --------------------- -ar-a-aaa-b-bbb-a-ccc: +ar-a-aaa-b-bbb-a-ccc: language : 'ar' , diff --git a/ext/intl/tests/resourcebundle_arrayaccess.phpt b/ext/intl/tests/resourcebundle_arrayaccess.phpt index ef2c0a8b9..d035a8d30 100644 --- a/ext/intl/tests/resourcebundle_arrayaccess.phpt +++ b/ext/intl/tests/resourcebundle_arrayaccess.phpt @@ -1,5 +1,7 @@ --TEST-- Test ResourceBundle array access and count - existing/missing keys +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> --FILE-- <?php include "resourcebundle.inc"; diff --git a/ext/intl/tests/resourcebundle_individual.phpt b/ext/intl/tests/resourcebundle_individual.phpt index 182cbf325..dcbf1f583 100644 --- a/ext/intl/tests/resourcebundle_individual.phpt +++ b/ext/intl/tests/resourcebundle_individual.phpt @@ -1,5 +1,7 @@ --TEST-- Test ResourceBundle::get() and length() - existing/missing keys +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> --FILE-- <?php include "resourcebundle.inc"; diff --git a/ext/intl/tests/resourcebundle_iterator.phpt b/ext/intl/tests/resourcebundle_iterator.phpt index 31b0768bf..a10b9deb8 100644 --- a/ext/intl/tests/resourcebundle_iterator.phpt +++ b/ext/intl/tests/resourcebundle_iterator.phpt @@ -1,5 +1,7 @@ --TEST-- Test ResourceBundle iterator +--SKIPIF-- +<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?> --FILE-- <?php include "resourcebundle.inc"; diff --git a/ext/json/json.c b/ext/json/json.c index 56b8e3c3f..4e6753384 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: json.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: json.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -238,7 +238,7 @@ static void json_encode_array(smart_str *buf, zval **val, int options TSRMLS_DC) need_comma = 1; } - json_escape_string(buf, key, key_len - 1, options TSRMLS_CC); + json_escape_string(buf, key, key_len - 1, options & ~PHP_JSON_NUMERIC_CHECK TSRMLS_CC); smart_str_appendc(buf, ':'); php_json_encode(buf, *data, options TSRMLS_CC); diff --git a/ext/json/php_json.h b/ext/json/php_json.h index beb6423da..4b5bc5135 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_json.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_json.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_JSON_H #define PHP_JSON_H diff --git a/ext/json/tests/bug55543.phpt b/ext/json/tests/bug55543.phpt new file mode 100644 index 000000000..8657fe776 --- /dev/null +++ b/ext/json/tests/bug55543.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #55543 (json_encode() with JSON_NUMERIC_CHECK & numeric string properties) +--SKIPIF-- +<?php if (!extension_loaded("json")) print "skip"; ?> +--FILE-- +<?php +$a = new stdClass; +$a->{"1"} = "5"; + +var_dump(json_encode($a, JSON_NUMERIC_CHECK)); +?> +--EXPECT-- +string(7) "{"1":5}" diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 599afccca..ba3d0c13c 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ldap.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: ldap.c 321634 2012-01-01 13:15:04Z felipe $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -226,7 +226,7 @@ PHP_MINFO_FUNCTION(ldap) php_info_print_table_start(); php_info_print_table_row(2, "LDAP Support", "enabled"); - php_info_print_table_row(2, "RCS Version", "$Id: ldap.c 313665 2011-07-25 11:42:53Z felipe $"); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c 321634 2012-01-01 13:15:04Z felipe $"); if (LDAPG(max_links) == -1) { snprintf(tmp, 31, "%ld/unlimited", LDAPG(num_links)); diff --git a/ext/ldap/php_ldap.h b/ext/ldap/php_ldap.h index 4a2669fd7..9ad5366af 100644 --- a/ext/ldap/php_ldap.h +++ b/ext/ldap/php_ldap.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ldap.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_ldap.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_LDAP_H #define PHP_LDAP_H diff --git a/ext/libxml/libxml.c b/ext/libxml/libxml.c index ea07e8878..3aef65f4e 100644 --- a/ext/libxml/libxml.c +++ b/ext/libxml/libxml.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: libxml.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: libxml.c 321634 2012-01-01 13:15:04Z felipe $ */ #define IS_EXT_MODULE @@ -228,9 +228,9 @@ static void php_libxml_node_free_list(xmlNodePtr node TSRMLS_DC) php_libxml_node_free_list((xmlNodePtr) node->properties TSRMLS_CC); break; case XML_ATTRIBUTE_NODE: - if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) { - xmlRemoveID(node->doc, (xmlAttrPtr) node); - } + if ((node->doc != NULL) && (((xmlAttrPtr) node)->atype == XML_ATTRIBUTE_ID)) { + xmlRemoveID(node->doc, (xmlAttrPtr) node); + } case XML_ATTRIBUTE_DECL: case XML_DTD_NODE: case XML_DOCUMENT_TYPE_NODE: diff --git a/ext/libxml/php_libxml.h b/ext/libxml/php_libxml.h index d91a7ed56..36ec885fe 100644 --- a/ext/libxml/php_libxml.h +++ b/ext/libxml/php_libxml.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_libxml.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_libxml.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_LIBXML_H #define PHP_LIBXML_H diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 34e33644b..8f2c8bb14 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -2702,6 +2702,53 @@ collector_decode_htmlnumericentity(int c, void *data) return c; } +int mbfl_filt_decode_htmlnumericentity_flush(mbfl_convert_filter *filter) +{ + struct collector_htmlnumericentity_data *pc = (struct collector_htmlnumericentity_data *)filter; + int n, s, r, d; + + if (pc->status) { + switch (pc->status) { + case 1: /* '&' */ + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + break; + case 2: /* '#' */ + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + break; + case 3: /* '0'-'9' */ + (*pc->decoder->filter_function)(0x26, pc->decoder); /* '&' */ + (*pc->decoder->filter_function)(0x23, pc->decoder); /* '#' */ + + s = pc->cache; + r = 1; + n = pc->digit; + while (n > 0) { + r *= 10; + n--; + } + s %= r; + r /= 10; + while (r > 0) { + d = s/r; + s %= r; + r /= 10; + (*pc->decoder->filter_function)(mbfl_hexchar_table[d], pc->decoder); + } + + break; + default: + break; + } + } + + pc->status = 0; + pc->cache = 0; + pc->digit = 0; + + return 0; +} + mbfl_string * mbfl_html_numeric_entity( mbfl_string *string, @@ -2739,7 +2786,8 @@ mbfl_html_numeric_entity( encoder = mbfl_convert_filter_new( string->no_encoding, mbfl_no_encoding_wchar, - collector_decode_htmlnumericentity, 0, &pc); + collector_decode_htmlnumericentity, + (int (*)(void*))mbfl_filt_decode_htmlnumericentity_flush, &pc); } if (pc.decoder == NULL || encoder == NULL) { mbfl_convert_filter_delete(encoder); diff --git a/ext/mbstring/mb_gpc.c b/ext/mbstring/mb_gpc.c index b6a681a59..70fbbb4e0 100644 --- a/ext/mbstring/mb_gpc.c +++ b/ext/mbstring/mb_gpc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mb_gpc.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mb_gpc.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes */ #ifdef HAVE_CONFIG_H diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 7520ee171..51ff3fd6f 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: mbstring.c 321634 2012-01-01 13:15:04Z felipe $ */ /* * PHP 4 Multibyte String module "mbstring" @@ -3017,7 +3017,7 @@ PHP_FUNCTION(mb_detect_encoding) /* make encoding list */ list = NULL; size = 0; - if (ZEND_NUM_ARGS() >= 2 && Z_STRVAL_P(encoding_list)) { + if (ZEND_NUM_ARGS() >= 2 && !ZVAL_IS_NULL(encoding_list)) { switch (Z_TYPE_P(encoding_list)) { case IS_ARRAY: if (!php_mb_parse_encoding_array(encoding_list, &list, &size, 0 TSRMLS_CC)) { diff --git a/ext/mbstring/mbstring.h b/ext/mbstring/mbstring.h index ac5b35a9c..173bb6c44 100644 --- a/ext/mbstring/mbstring.h +++ b/ext/mbstring/mbstring.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mbstring.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mbstring.h 321634 2012-01-01 13:15:04Z felipe $ */ /* * PHP 4 Multibyte String module "mbstring" (currently only for Japanese) diff --git a/ext/mbstring/oniguruma/regparse.c b/ext/mbstring/oniguruma/regparse.c index af5c8593e..abf2cc1cb 100644 --- a/ext/mbstring/oniguruma/regparse.c +++ b/ext/mbstring/oniguruma/regparse.c @@ -4980,6 +4980,7 @@ parse_exp(Node** np, OnigToken* tok, int term, CCLASS_SET_SHARE(&(NCCLASS(*np))); new_key = (type_cclass_key* )xmalloc(sizeof(type_cclass_key)); + xmemcpy(new_key, &key, sizeof(type_cclass_key)); onig_st_add_direct(OnigTypeCClassTable, (st_data_t )new_key, (st_data_t )*np); diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 66dda4bcb..8c2fd7abd 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mbregex.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H @@ -1245,14 +1245,19 @@ PHP_FUNCTION(mb_ereg_search_init) { size_t argc = ZEND_NUM_ARGS(); zval *arg_str; - char *arg_pattern, *arg_options; - int arg_pattern_len, arg_options_len; + char *arg_pattern = NULL, *arg_options = NULL; + int arg_pattern_len = 0, arg_options_len = 0; OnigSyntaxType *syntax = NULL; OnigOptionType option; if (zend_parse_parameters(argc TSRMLS_CC, "z|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) { return; } + + if (argc > 1 && arg_pattern_len == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty pattern"); + RETURN_FALSE; + } option = MBREX(regex_default_options); syntax = MBREX(regex_default_syntax); diff --git a/ext/mbstring/php_mbregex.h b/ext/mbstring/php_mbregex.h index 9819b7c79..2fac06e35 100644 --- a/ext/mbstring/php_mbregex.h +++ b/ext/mbstring/php_mbregex.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mbregex.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mbregex.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef _PHP_MBREGEX_H #define _PHP_MBREGEX_H diff --git a/ext/mbstring/php_unicode.c b/ext/mbstring/php_unicode.c index cb04e55d2..99430d1aa 100644 --- a/ext/mbstring/php_unicode.c +++ b/ext/mbstring/php_unicode.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/php_unicode.h b/ext/mbstring/php_unicode.h index 2b64f973e..015073afd 100644 --- a/ext/mbstring/php_unicode.h +++ b/ext/mbstring/php_unicode.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mbstring/tests/bug40685.phpt b/ext/mbstring/tests/bug40685.phpt new file mode 100644 index 000000000..420b916bc --- /dev/null +++ b/ext/mbstring/tests/bug40685.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #40685 (mb_decode_numericentity() removes '&' in the string) +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php +$map = array(0, 0x10FFFF, 0, 0xFFFFFF); +var_dump(mb_decode_numericentity('&', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('&&&', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('&#', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +var_dump(mb_decode_numericentity('=', $map, 'UTF-8')); +?> +--EXPECTF-- +string(1) "&" +string(3) "&&&" +string(2) "&#" +string(4) "=" +string(1) "=" + diff --git a/ext/mbstring/tests/bug52931.phpt b/ext/mbstring/tests/bug52931.phpt index 9669d884c..52efd03de 100644 --- a/ext/mbstring/tests/bug52931.phpt +++ b/ext/mbstring/tests/bug52931.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #52931 (strripos not overloaded with function overloading enabled) +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> --INI-- mbstring.func_overload = 7 mbstring.internal_encoding = utf-8 diff --git a/ext/mbstring/tests/empty_pattern.phpt b/ext/mbstring/tests/empty_pattern.phpt new file mode 100644 index 000000000..e395604f8 --- /dev/null +++ b/ext/mbstring/tests/empty_pattern.phpt @@ -0,0 +1,18 @@ +--TEST-- +Check for empty pattern +--SKIPIF-- +<?php extension_loaded('mbstring') or die('skip mbstring not available'); ?> +--FILE-- +<?php + +mb_ereg_search_init("","",""); +mb_split("",""); +mb_ereg_search_regs(); + +?> +--EXPECTF-- +Warning: mb_ereg_search_init(): Empty pattern in %s on line %d + +Warning: mb_split(): Empty regular expression in %s on line %d + +Warning: mb_ereg_search_regs(): No regex given in %s on line %d diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 7e8ef0df9..2b966a18f 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ | Derick Rethans <derick@derickrethans.nl> | +----------------------------------------------------------------------+ */ -/* $Id: mcrypt.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: mcrypt.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/mcrypt/mcrypt_filter.c b/ext/mcrypt/mcrypt_filter.c index 3a4ea1557..ba7ac76a7 100644 --- a/ext/mcrypt/mcrypt_filter.c +++ b/ext/mcrypt/mcrypt_filter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ - $Id: mcrypt_filter.c 306939 2011-01-01 02:19:59Z felipe $ + $Id: mcrypt_filter.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/mcrypt/php_mcrypt.h b/ext/mcrypt/php_mcrypt.h index 30466afb7..3481544df 100644 --- a/ext/mcrypt/php_mcrypt.h +++ b/ext/mcrypt/php_mcrypt.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ | Derick Rethans <derick@derickrethans.nl> | +----------------------------------------------------------------------+ */ -/* $Id: php_mcrypt.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mcrypt.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MCRYPT_H #define PHP_MCRYPT_H diff --git a/ext/mcrypt/php_mcrypt_filter.h b/ext/mcrypt/php_mcrypt_filter.h index 38cefebf4..7843c81ee 100644 --- a/ext/mcrypt/php_mcrypt_filter.h +++ b/ext/mcrypt/php_mcrypt_filter.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ - $Id: php_mcrypt_filter.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_mcrypt_filter.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MCRYPT_FILTER_H diff --git a/ext/mcrypt/tests/bug43143.phpt b/ext/mcrypt/tests/bug43143.phpt index 4c390439e..d9fccf3c8 100644 --- a/ext/mcrypt/tests/bug43143.phpt +++ b/ext/mcrypt/tests/bug43143.phpt @@ -1,7 +1,8 @@ --TEST-- Bug #43143 (Warning about empty IV with MCRYPT_MODE_ECB) --SKIPIF-- -<?php if (!extension_loaded("mcrypt")) print "skip"; ?> +<?php if (!extension_loaded("mcrypt")) print "skip"; +if (!extension_loaded("hash")) print "skip"; ?> --FILE-- <?php echo "ECB\n"; diff --git a/ext/mcrypt/tests/bug46010.phpt b/ext/mcrypt/tests/bug46010.phpt index bacfb5975..ddb691e36 100644 --- a/ext/mcrypt/tests/bug46010.phpt +++ b/ext/mcrypt/tests/bug46010.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #46010 (warnings incorrectly generated for iv in ecb mode) +--SKIPIF-- +<?php if (!extension_loaded("mcrypt")) print "skip"; ?> --FILE-- <?php diff --git a/ext/mcrypt/tests/bug55169.phpt b/ext/mcrypt/tests/bug55169.phpt index 7bddd5087..bebcd675c 100644 --- a/ext/mcrypt/tests/bug55169.phpt +++ b/ext/mcrypt/tests/bug55169.phpt @@ -1,8 +1,9 @@ --TEST--
-mcrypt_create_iv
-https://bugs.php.net/bug.php?id=55169
+mcrypt_create_iv https://bugs.php.net/bug.php?id=55169
--CREDIT--
Ryan Biesemeyer <ryan@yaauie.com>
+--SKIPIF--
+<?php if (!extension_loaded("mcrypt")) print "skip"; ?>
--FILE--
<?php
for( $i=1; $i<=64; $i = $i*2 ){
diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 8f2272fa4..dce38b285 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c 313835 2011-07-28 11:01:04Z pajoye $ */ +/* $Id: php_mssql.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 diff --git a/ext/mssql/php_mssql.h b/ext/mssql/php_mssql.h index 9c49fa537..f1ac18fdf 100644 --- a/ext/mssql/php_mssql.h +++ b/ext/mssql/php_mssql.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ */ -/* $Id: php_mssql.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mssql.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MSSQL_H #define PHP_MSSQL_H @@ -26,6 +26,11 @@ #if HAVE_MSSQL #define MSDBLIB +/* FreeTDS checks for PHP_MSSQL_API for avoid type redefinition */ +#ifdef HAVE_FREETDS +#define PHP_MSSQL_API +#endif + #include <sqlfront.h> #include <sqldb.h> diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index c6cb10a81..6d2c91198 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: php_mysql.c 321634 2012-01-01 13:15:04Z felipe $ */ /* TODO: * @@ -1588,6 +1588,7 @@ PHP_FUNCTION(mysql_list_dbs) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save MySQL query result"); RETURN_FALSE; } + MySG(result_allocated)++; ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result); } /* }}} */ @@ -1625,6 +1626,7 @@ PHP_FUNCTION(mysql_list_tables) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save MySQL query result"); RETURN_FALSE; } + MySG(result_allocated)++; ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result); } /* }}} */ @@ -1662,6 +1664,7 @@ PHP_FUNCTION(mysql_list_fields) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to save MySQL query result"); RETURN_FALSE; } + MySG(result_allocated)++; ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result); } /* }}} */ @@ -1694,6 +1697,7 @@ PHP_FUNCTION(mysql_list_processes) RETURN_FALSE; } + MySG(result_allocated)++; ZEND_REGISTER_RESOURCE(return_value, mysql_result, le_result); } /* }}} */ diff --git a/ext/mysql/php_mysql.h b/ext/mysql/php_mysql.h index 0dbdc53bc..e2aca90fb 100644 --- a/ext/mysql/php_mysql.h +++ b/ext/mysql/php_mysql.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ */ -/* $Id: php_mysql.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mysql.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MYSQL_H #define PHP_MYSQL_H diff --git a/ext/mysql/php_mysql_structs.h b/ext/mysql/php_mysql_structs.h index 89819fbaa..47a75172c 100644 --- a/ext/mysql/php_mysql_structs.h +++ b/ext/mysql/php_mysql_structs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ */ -/* $Id: php_mysql_structs.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mysql_structs.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MYSQL_STRUCTS_H #define PHP_MYSQL_STRUCTS_H diff --git a/ext/mysql/tests/001.phpt b/ext/mysql/tests/001.phpt index 6f2e284de..72b661477 100755 --- a/ext/mysql/tests/001.phpt +++ b/ext/mysql/tests/001.phpt @@ -1,7 +1,10 @@ --TEST-- mysql connect --SKIPIF-- -<?php include 'skipif.inc'; ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php require_once('connect.inc'); diff --git a/ext/mysql/tests/bug53649.phpt b/ext/mysql/tests/bug53649.phpt index 126f34b73..70bf9bed3 100644 --- a/ext/mysql/tests/bug53649.phpt +++ b/ext/mysql/tests/bug53649.phpt @@ -4,28 +4,46 @@ Bug #53649 (mysql_query with "load data" unable to save result set) <?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+
+if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
+ die(sprintf("skip Connect failed, [%d] %s\n", mysqlerrno(), mysqli_error()));
+}
+
+if (!mysql_query("DROP TABLE IF EXISTS test", $link) ||
+ !mysql_query("CREATE TABLE test (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine, $link))
+ die(sprintf("skip [%d] %s\n", mysql_errno($link), mysql_error($link)));
+
+if (false === file_put_contents('bug53649.data', "1\n2\n3\n"))
+ die(sprintf("skip Failed to create data file\n"));
+
+if (!mysql_query("LOAD DATA LOCAL INFILE 'bug53649.data' INTO TABLE test", $link) &&
+ 1148 == mysql_errno($link))
+ die("skip LOAD DATA LOAD INFILE not allowed\n");
?>
--FILE--
<?php
require_once("connect.inc");
if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) {
- printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ printf("[001] Connect failed, [%d] %s\n", mysqlerrno(), mysqli_error());
}
- if (!mysql_query("DROP TABLE IF EXISTS tlocaldata", $link)) {
- printf("[002] [%d] %s\n", $link->errno, $link->error);
+ if (!mysql_query("DROP TABLE IF EXISTS test", $link)) {
+ printf("[002] [%d] %s\n", mysql_errno($link), mysql_error($link));
}
- if (!mysql_query("CREATE TABLE tlocaldata (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine, $link)) {
- printf("[003] [%d] %s\n", $link->errno, $link->error);
+ if (!mysql_query("CREATE TABLE test (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine, $link)) {
+ printf("[003] [%d] %s\n", mysql_errno($link), mysql_error($link));
}
- file_put_contents('bug53649.data', "1\n2\n3\n");
+ if (false === file_put_contents('bug53649.data', "1\n2\n3\n"))
+ printf("[004] Failed to create data file\n");
- mysql_query("SELECT 1 FROM DUAL", $link);
+ if (!mysql_query("SELECT 1 FROM DUAL", $link))
+ printf("[005] [%d] %s\n", mysql_errno($link), mysql_error($link));
- if (!mysql_query("LOAD DATA LOCAL INFILE 'bug53649.data' INTO TABLE tlocaldata", $link)) {
+ if (!mysql_query("LOAD DATA LOCAL INFILE 'bug53649.data' INTO TABLE test", $link)) {
+ printf("[006] [%d] %s\n", mysql_errno($link), mysql_error($link));
echo "bug";
} else {
echo "done";
@@ -41,7 +59,7 @@ if (!$link = my_mysql_connect($host, $user, $passwd, $db, $port, $socket)) { $host, $user, $db, $port, $socket);
}
-if (!mysql_query($link, 'DROP TABLE IF EXISTS tlocaldata', $link)) {
+if (!mysql_query($link, 'DROP TABLE IF EXISTS test', $link)) {
printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
diff --git a/ext/mysql/tests/bug55473.phpt b/ext/mysql/tests/bug55473.phpt new file mode 100644 index 000000000..df584bdef --- /dev/null +++ b/ext/mysql/tests/bug55473.phpt @@ -0,0 +1,79 @@ +--TEST-- +Bug #5547 (mysql_pconnect leaks file descriptors on reconnect) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + die("skip Test doesn't work on Windows"); +} + +if (!($output = @exec("lsof -np " . getmypid()))) + die("skip Test can't find command line tool lsof"); +?> +--INI-- +mysql.max_persistent=30 +mysql.allow_persistent=1 +--FILE-- +<?php + include "connect.inc"; + + $tmp = NULL; + $link = NULL; + + if ($socket) + $host = sprintf("%s:%s", $host, $socket); + else if ($port) + $host = sprintf("%s:%s", $host, $port); + + function connect($host, $user, $passwd) { + $conn = mysql_pconnect($host, $user, $passwd); + + if (!$conn) + die(sprintf("[001] %s\n", mysql_error())); + + if (!mysql_query("set wait_timeout=1", $conn)) + printf("[002] [%d] %s\n", mysql_errno($conn), mysql_error($conn)); + + return $conn; + } + + $conn = connect($host, $user, $passwd); + $opened_files = -1; + + for ($i = 0; $i < 4; $i++) { + /* wait while mysql closes connection */ + sleep(3); + + if (!mysql_ping($conn)) { + printf("[003] reconnect %d\n", $i); + $conn = connect($host, $user, $passwd); + } + + $r = mysql_query('select 1', $conn); + if (!$r) + printf("[004] [%d] %s\n", mysql_errno($conn), mysql_error($conn)); + + + if ($opened_files == -1) { + $opened_files = trim(exec("lsof -np " . getmypid() . " | wc -l")); + printf("[005] Setting openened files...\n"); + } else if (($tmp = trim(exec("lsof -np " . getmypid() . " | wc -l"))) != $opened_files) { + printf("[006] [%d] different number of opened_files : expected %d, got %d", $i, $opened_files, $tmp); + } else { + printf("[007] Opened files as expected\n"); + } + } + + print "done!"; +?> +--EXPECTF-- +[003] reconnect 0 +[005] Setting openened files... +[003] reconnect 1 +[007] Opened files as expected +[003] reconnect 2 +[007] Opened files as expected +[003] reconnect 3 +[007] Opened files as expected +done!
\ No newline at end of file diff --git a/ext/mysql/tests/connect.inc b/ext/mysql/tests/connect.inc index 97fed4214..0df5bc3aa 100755 --- a/ext/mysql/tests/connect.inc +++ b/ext/mysql/tests/connect.inc @@ -64,13 +64,14 @@ $host = getenv("MYSQL_TEST_HOST") ? getenv("MYSQL_TEST_HOST") : "localhost"; $port = getenv("MYSQL_TEST_PORT") ? getenv("MYSQL_TEST_PORT") : 3306; $user = getenv("MYSQL_TEST_USER") ? getenv("MYSQL_TEST_USER") : "root"; $passwd = getenv("MYSQL_TEST_PASSWD") ? getenv("MYSQL_TEST_PASSWD") : ""; + $db = getenv("MYSQL_TEST_DB") ? getenv("MYSQL_TEST_DB") : "test"; $engine = getenv("MYSQL_TEST_ENGINE") ? getenv("MYSQL_TEST_ENGINE") : "MyISAM"; $socket = getenv("MYSQL_TEST_SOCKET") ? getenv("MYSQL_TEST_SOCKET") : null; $skip_on_connect_failure = getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") ? getenv("MYSQL_TEST_SKIP_CONNECT_FAILURE") : true; $connect_flags = getenv("MYSQL_TEST_CONNECT_FLAGS") ? (int)getenv("MYSQL_TEST_CONNECT_FLAGS") : 0; if ($socket) { - ini_set('mysql.default_user', $socket); + ini_set('mysql.default_socket', $socket); } /* Development setting: test experimal features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? @@ -78,4 +79,4 @@ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) false; $IS_MYSQLND = stristr(mysql_get_client_info(), "mysqlnd"); -?>
\ No newline at end of file +?> diff --git a/ext/mysql/tests/mysql_affected_rows.phpt b/ext/mysql/tests/mysql_affected_rows.phpt index ce16a7748..145e1f5c0 100644 --- a/ext/mysql/tests/mysql_affected_rows.phpt +++ b/ext/mysql/tests/mysql_affected_rows.phpt @@ -4,11 +4,11 @@ mysql_affected_rows() <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); -require_once('skipifdefaultconnectfailure.inc'); ?> --FILE-- <?php include_once("connect.inc"); +include_once('setupdefault.inc'); $tmp = NULL; $link = NULL; diff --git a/ext/mysql/tests/mysql_connect.phpt b/ext/mysql/tests/mysql_connect.phpt index 773264e5a..715824804 100644 --- a/ext/mysql/tests/mysql_connect.phpt +++ b/ext/mysql/tests/mysql_connect.phpt @@ -1,7 +1,10 @@ --TEST-- mysql_connect() --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php include_once "connect.inc"; diff --git a/ext/mysql/tests/mysql_insert_id.phpt b/ext/mysql/tests/mysql_insert_id.phpt index 678245c2c..460d9f3f4 100644 --- a/ext/mysql/tests/mysql_insert_id.phpt +++ b/ext/mysql/tests/mysql_insert_id.phpt @@ -4,11 +4,11 @@ mysql_insert_id() <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); -require_once('skipifdefaultconnectfailure.inc'); ?> --FILE-- <?php include "connect.inc"; +include 'setupdefault.inc'; $tmp = NULL; $link = NULL; diff --git a/ext/mysql/tests/mysql_max_links.phpt b/ext/mysql/tests/mysql_max_links.phpt index fbe3ae003..52ecd0ac0 100644 --- a/ext/mysql/tests/mysql_max_links.phpt +++ b/ext/mysql/tests/mysql_max_links.phpt @@ -3,6 +3,7 @@ mysql_[p]connect() - max_links/max_persistent --SKIPIF-- <?php require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); ?> --INI-- mysql.max_links=2 diff --git a/ext/mysql/tests/mysql_num_rows.phpt b/ext/mysql/tests/mysql_num_rows.phpt index 1f68b4d60..0f538c4a2 100644 --- a/ext/mysql/tests/mysql_num_rows.phpt +++ b/ext/mysql/tests/mysql_num_rows.phpt @@ -54,6 +54,23 @@ if ($res = mysql_query('SELECT COUNT(id) AS num FROM test', $link)) { printf("[030] [%d] %s\n", mysql_errno($link), mysql_error($link)); } +if ($res = mysql_unbuffered_query('SELECT id, label FROM test')) { + + if (0 != mysql_num_rows($res)) + printf("[032] Expecting 0 rows got %d\n", mysql_num_rows($res)); + + $rows = 0; + while ($row = mysql_fetch_assoc($res)) + $rows++; + + if ($rows != mysql_num_rows($res)) + printf("[033] Expecting %d rows got %d\n", $rows, mysql_num_rows($res)); + + mysql_free_result($res); +} else { + printf("[034] [%d] %s\n", mysql_errno($link), mysql_error($link)); +} + mysql_close($link); print "done!"; ?> diff --git a/ext/mysql/tests/mysql_pconn_kill.phpt b/ext/mysql/tests/mysql_pconn_kill.phpt index 8543e39d6..20dfbe9a1 100755 --- a/ext/mysql/tests/mysql_pconn_kill.phpt +++ b/ext/mysql/tests/mysql_pconn_kill.phpt @@ -64,7 +64,9 @@ mysql.max_persistent=2 mysql_close($plink); - if (!($plink = mysql_pconnect($myhost, $user, $passwd))) + /* mysql_pconnect cound generate a warning when linked against mysqlnd + PHP Warning: mysql_pconnect(): MySQL server has gone away */ + if (!($plink = @mysql_pconnect($myhost, $user, $passwd))) printf("[009] Cannot create new persistent connection, [%d] %s\n", mysql_errno(), mysql_error()); mysql_select_db($db, $plink); diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt index ff62f4227..c2685a572 100644 --- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt +++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt @@ -2,9 +2,15 @@ LOAD DATA INFILE - open_basedir --SKIPIF-- <?php -require_once('skipif.inc'); -require_once('skipifconnectfailure.inc'); -require_once("connect.inc"); +@include_once("connect.inc"); + +if (!isset($db)) { + die("skip open_basedir setting prevents inclusing of required files"); +} + +include_once('skipif.inc'); +include_once('skipifconnectfailure.inc'); + if (!$IS_MYSQLND) die("skip mysqlnd only, libmysql does not know about open_basedir restrictions"); @@ -30,6 +36,7 @@ open_basedir="." --FILE-- <?php @include_once("connect.inc"); + if (!isset($db)) { // run-tests, I love you for not allowing me to set ini settings dynamically print "[006] [1148] The used command is not allowed with this MySQL version diff --git a/ext/mysql/tests/mysql_sql_safe_mode.phpt b/ext/mysql/tests/mysql_sql_safe_mode.phpt index 6c652fb57..4d8ca92e4 100644 --- a/ext/mysql/tests/mysql_sql_safe_mode.phpt +++ b/ext/mysql/tests/mysql_sql_safe_mode.phpt @@ -3,6 +3,7 @@ mysql_[p]connect() - safe_mode --SKIPIF-- <?php require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); $link = @mysql_connect("", "", "", true); if ($link) die("skip Test cannot be run if annonymous connections are allowed"); diff --git a/ext/mysql/tests/setupdefault.inc b/ext/mysql/tests/setupdefault.inc new file mode 100644 index 000000000..6d25c2084 --- /dev/null +++ b/ext/mysql/tests/setupdefault.inc @@ -0,0 +1,10 @@ +<?php + +// copy variables from connect.inc into mysql default connection ini settings, so that implicit mysql_connect() behaviour can be tested where needed +// must be loaded AFTER connect.inc + +ini_set('mysql.default_host', $host); +ini_set('mysql.default_user', $user); +ini_set('mysql.default_password', $passwd); + +?> diff --git a/ext/mysql/tests/skipifdefaultconnectfailure.inc b/ext/mysql/tests/skipifdefaultconnectfailure.inc deleted file mode 100755 index 99f390515..000000000 --- a/ext/mysql/tests/skipifdefaultconnectfailure.inc +++ /dev/null @@ -1,11 +0,0 @@ -<?php -if ($skip_on_connect_failure) { - if (!$link = @mysql_connect()) - die(sprintf("skip Can't connect to MySQL Server with default credentials - [%d] %s", mysql_errno(), mysql_error())); - - if (!@mysql_select_db($db, $link)) - die(sprintf("skip Can't connect to MySQL Server with default credentials - [%d] %s", mysql_errno(), mysql_error())); - - mysql_close($link); -} -?> diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 466457d1d..c74e5b42e 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli.c 314376 2011-08-06 14:47:44Z felipe $ + $Id: mysqli.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 4fb4470e9..9fcbde83d 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c 314116 2011-08-02 15:30:58Z andrey $ + $Id: mysqli_api.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H @@ -1053,7 +1053,12 @@ static void php_add_field_properties(zval *value, const MYSQL_FIELD *field TSRML add_property_string(value, "orgtable", (char *) (field->org_table ? field->org_table : ""), 1); add_property_string(value, "def", (field->def ? field->def : ""), 1); add_property_string(value, "db", (field->db ? field->db : ""), 1); - add_property_string(value, "catalog", (field->catalog ? field->catalog : ""), 1); + + /* FIXME: manually set the catalog to "def" due to bug in + * libmysqlclient which does not initialize field->catalog + * and in addition, the catalog is always be "def" + */ + add_property_string(value, "catalog", "def", 1); add_property_long(value, "max_length", field->max_length); add_property_long(value, "length", field->length); @@ -1608,7 +1613,7 @@ PHP_FUNCTION(mysqli_num_rows) } MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result", MYSQLI_STATUS_VALID); - if (mysqli_result_is_unbuffered(result)) { + if (mysqli_result_is_unbuffered_and_not_everything_is_fetched(result)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function cannot be used with MYSQL_USE_RESULT"); RETURN_LONG(0); } diff --git a/ext/mysqli/mysqli_driver.c b/ext/mysqli/mysqli_driver.c index fd4698feb..b7227bb3c 100644 --- a/ext/mysqli/mysqli_driver.c +++ b/ext/mysqli/mysqli_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -27,7 +27,7 @@ #include "ext/standard/info.h" #include "php_mysqli_structs.h" #include "zend_exceptions.h" - +#include "mysqli_fe.h" #define MAP_PROPERTY_MYG_BOOL_READ(name, value) \ static int name(mysqli_object *obj, zval **retval TSRMLS_DC) \ diff --git a/ext/mysqli/mysqli_embedded.c b/ext/mysqli/mysqli_embedded.c index f5360ae09..acf32424e 100644 --- a/ext/mysqli/mysqli_embedded.c +++ b/ext/mysqli/mysqli_embedded.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqli/mysqli_exception.c b/ext/mysqli/mysqli_exception.c index 35d66cf41..b2e99227f 100644 --- a/ext/mysqli/mysqli_exception.c +++ b/ext/mysqli/mysqli_exception.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 8243a1d54..d83002738 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_fe.c 313665 2011-07-25 11:42:53Z felipe $ + $Id: mysqli_fe.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_fe.h b/ext/mysqli/mysqli_fe.h index 14b8dcbea..ad73eb73e 100644 --- a/ext/mysqli/mysqli_fe.h +++ b/ext/mysqli/mysqli_fe.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqli/mysqli_libmysql.h b/ext/mysqli/mysqli_libmysql.h index 9fdfd7eb2..65c69bf28 100644 --- a/ext/mysqli/mysqli_libmysql.h +++ b/ext/mysqli/mysqli_libmysql.h @@ -29,7 +29,8 @@ #define MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE 200 #define MYSQLND_OPT_INT_AND_YEAR_AS_INT 201 -#define mysqli_result_is_unbuffered(r) ((r)->handle && (r)->handle->status == MYSQL_STATUS_USE_RESULT) +#define mysqli_result_is_unbuffered(r) ((r)->handle && (r)->handle->status == MYSQL_STATUS_USE_RESULT && (r)->data == NULL) +#define mysqli_result_is_unbuffered_and_not_everything_is_fetched(r) mysqli_result_is_unbuffered(r) #define mysqli_server_status(c) (c)->server_status #define mysqli_stmt_get_id(s) ((s)->stmt_id) #define mysqli_stmt_warning_count(s) mysql_warning_count((s)->mysql) diff --git a/ext/mysqli/mysqli_mysqlnd.h b/ext/mysqli/mysqli_mysqlnd.h index 3072835c5..ce0be63e5 100644 --- a/ext/mysqli/mysqli_mysqlnd.h +++ b/ext/mysqli/mysqli_mysqlnd.h @@ -31,6 +31,7 @@ #define MYSQLI_CLOSE_DISCONNECTED MYSQLND_CLOSE_DISCONNECTED #define mysqli_result_is_unbuffered(r) ((r)->unbuf) +#define mysqli_result_is_unbuffered_and_not_everything_is_fetched(r) ((r)->unbuf && !(r)->unbuf->eof_reached) #define mysqli_server_status(c) (c)->upsert_status.server_status #define mysqli_stmt_get_id(s) ((s)->data->stmt_id) #define mysqli_stmt_warning_count(s) mysqlnd_stmt_warning_count((s)) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index 8f8401367..893e4a19b 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_nonapi.c 314838 2011-08-12 14:55:00Z andrey $ + $Id: mysqli_nonapi.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_priv.h b/ext/mysqli/mysqli_priv.h index c5f209e41..3a7788dba 100644 --- a/ext/mysqli/mysqli_priv.h +++ b/ext/mysqli/mysqli_priv.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index fcff2c682..4989a57c5 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_prop.c 306939 2011-01-01 02:19:59Z felipe $ + $Id: mysqli_prop.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H @@ -202,6 +202,36 @@ MYSQLI_MAP_PROPERTY_FUNC_LONG(link_server_version_read, mysql_get_server_version MYSQLI_MAP_PROPERTY_FUNC_STRING(link_sqlstate_read, mysql_sqlstate, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID)) MYSQLI_MAP_PROPERTY_FUNC_LONG(link_thread_id_read, mysql_thread_id, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu") MYSQLI_MAP_PROPERTY_FUNC_LONG(link_warning_count_read, mysql_warning_count, MYSQLI_GET_MYSQL(MYSQLI_STATUS_VALID), ulong, "%lu") + +/* {{{ property link_stat_read */ +static int link_stat_read(mysqli_object *obj, zval **retval TSRMLS_DC)\ +{\ + MY_MYSQL *mysql; + + MAKE_STD_ZVAL(*retval); + ZVAL_NULL(*retval); + + CHECK_STATUS(MYSQLI_STATUS_INITIALIZED); + + mysql = (MY_MYSQL *)((MYSQLI_RESOURCE *)(obj->ptr))->ptr; + + if (mysql) { + char * stat_msg; +#if defined(MYSQLI_USE_MYSQLND) + uint stat_msg_len; + if (mysqlnd_stat(mysql->mysql, &stat_msg, &stat_msg_len) == PASS) { + ZVAL_STRINGL(*retval, stat_msg, stat_msg_len, 0); + } +#else + if ((stat_msg = (char *) mysql_stat(mysql->mysql))) { + ZVAL_STRING(*retval, stat_msg, 1); + } +#endif + } + return SUCCESS; +} +/* }}} */ + /* result properties */ /* {{{ property result_type_read */ @@ -329,6 +359,7 @@ const mysqli_property_entry mysqli_link_property_entries[] = { {"insert_id", sizeof("insert_id") - 1, link_insert_id_read, NULL}, {"server_info", sizeof("server_info") - 1, link_server_info_read, NULL}, {"server_version", sizeof("server_version") - 1, link_server_version_read, NULL}, + {"stat", sizeof("stat") - 1, link_stat_read, NULL}, {"sqlstate", sizeof("sqlstate") - 1, link_sqlstate_read, NULL}, {"protocol_version",sizeof("protocol_version") - 1, link_protocol_version_read, NULL}, {"thread_id", sizeof("thread_id") - 1, link_thread_id_read, NULL}, @@ -351,6 +382,7 @@ zend_property_info mysqli_link_property_info_entries[] = { {ZEND_ACC_PUBLIC, "insert_id", sizeof("insert_id") - 1, 0, NULL, 0, NULL}, {ZEND_ACC_PUBLIC, "server_info", sizeof("server_info") - 1, 0, NULL, 0, NULL}, {ZEND_ACC_PUBLIC, "server_version", sizeof("server_version") - 1, 0, NULL, 0, NULL}, + {ZEND_ACC_PUBLIC, "stat", sizeof("stat") - 1, 0, NULL, 0, NULL}, {ZEND_ACC_PUBLIC, "sqlstate", sizeof("sqlstate") - 1, 0, NULL, 0, NULL}, {ZEND_ACC_PUBLIC, "protocol_version", sizeof("protocol_version")-1, 0, NULL, 0, NULL}, {ZEND_ACC_PUBLIC, "thread_id", sizeof("thread_id") - 1, 0, NULL, 0, NULL}, diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c index c44245c51..ca5424aaa 100644 --- a/ext/mysqli/mysqli_report.c +++ b/ext/mysqli/mysqli_report.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_report.c 306939 2011-01-01 02:19:59Z felipe $ + $Id: mysqli_report.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/mysqli/mysqli_report.h b/ext/mysqli/mysqli_report.h index 8e7484a30..c5d7af29f 100644 --- a/ext/mysqli/mysqli_report.h +++ b/ext/mysqli/mysqli_report.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_report.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: mysqli_report.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef __HAVE_MYSQLI_PROFILER_H__ diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index ee815121b..d897a82b8 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqli/php_mysqli.h b/ext/mysqli/php_mysqli.h index fedc34930..0717021b8 100644 --- a/ext/mysqli/php_mysqli.h +++ b/ext/mysqli/php_mysqli.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: php_mysqli.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_mysqli.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MYSQLI_H diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index 61f9184f0..70c591e57 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: php_mysqli_structs.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_mysqli_structs.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MYSQLI_STRUCTS_H diff --git a/ext/mysqli/tests/004.phpt b/ext/mysqli/tests/004.phpt index ce222fea4..010d6e196 100644 --- a/ext/mysqli/tests/004.phpt +++ b/ext/mysqli/tests/004.phpt @@ -15,24 +15,27 @@ require_once('skipifconnectfailure.inc'); mysqli_select_db($link, $db); if (!mysqli_query($link,"DROP TABLE IF EXISTS test_bind_fetch")) - printf("[001] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[001] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link,"CREATE TABLE test_bind_fetch(c1 char(10), c2 text) ENGINE=" . $engine)) - printf("[002] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567890', 'this is a test0')")) - printf("[003] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567891', 'this is a test1')")) - printf("[004] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567892', 'this is a test2')")) - printf("[005] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!mysqli_query($link, "INSERT INTO test_bind_fetch VALUES ('1234567893', 'this is a test3')")) - printf("[006] [%d] string\n", mysqli_errno($link), mysqli_error($link)); + printf("[006] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - $stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1"); + if (!$stmt = mysqli_prepare($link, "SELECT * FROM test_bind_fetch ORDER BY c1")) + printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + + $c1 = $c2 = NULL; mysqli_stmt_bind_result($stmt, $c1, $c2); mysqli_stmt_execute($stmt); $i = 4; diff --git a/ext/mysqli/tests/014.phpt b/ext/mysqli/tests/014.phpt index 8fb8cceef..da6a0052c 100644 --- a/ext/mysqli/tests/014.phpt +++ b/ext/mysqli/tests/014.phpt @@ -5,19 +5,13 @@ mysqli autocommit/commit/rollback require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); require_once("connect.inc"); + $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); - if (!$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { - die("skip Cannot check for required InnoDB suppot"); - } - if (!$row = mysqli_fetch_row($result)) - die("skip Cannot check for required InnoDB suppot"); + if (!$link) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); - mysqli_free_result($result); - mysqli_close($link); - if ($row[1] == "DISABLED" || $row[1] == "NO") { - printf ("skip innodb support is not installed or enabled."); - exit; - } + if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/015.phpt b/ext/mysqli/tests/015.phpt index c4f693ff1..c671ad68f 100644 --- a/ext/mysqli/tests/015.phpt +++ b/ext/mysqli/tests/015.phpt @@ -4,17 +4,13 @@ mysqli autocommit/commit/rollback with innodb <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); - require_once("connect.inc"); - $link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); - $result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'"); - $row = mysqli_fetch_row($result); - mysqli_free_result($result); - mysqli_close($link); - if ($row[1] == "DISABLED" || $row[1] == "NO") { - printf ("skip innodb support is not installed or enabled."); - exit; - } + require_once('connect.inc'); + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + + if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/061.phpt b/ext/mysqli/tests/061.phpt index 08b4cda25..5817d8230 100644 --- a/ext/mysqli/tests/061.phpt +++ b/ext/mysqli/tests/061.phpt @@ -6,6 +6,16 @@ require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); + +$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); +if (!$link) + die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); + +mysqli_close($link); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/071.phpt b/ext/mysqli/tests/071.phpt index 38bc46b84..6f4577797 100644 --- a/ext/mysqli/tests/071.phpt +++ b/ext/mysqli/tests/071.phpt @@ -22,14 +22,14 @@ require_once('skipifconnectfailure.inc'); } } else { /* libmysql return value seems to depend on server version */ - if (($version >= 50123 || $version <= 40200) && $version != 50200) { + if ((($version >= 50123) || ($version <= 40200)) && $version != 50200) { /* TODO: find exact version */ if ($ret !== true){ printf("[001] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version); } } else { if ($ret !== false){ - printf("[001] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version); + printf("[001] Expecting boolean/false got %s/%s @\n", gettype($ret), var_export($ret, true), $version); } } } @@ -49,7 +49,7 @@ require_once('skipifconnectfailure.inc'); } } else { /* libmysql return value seems to depend on server version */ - if (($version >= 50123 || $version <= 40200) && $version != 50200) { + if ((($version >= 50123) || ($version <= 40200)) && $version != 50200) { /* TODO: find exact version */ if ($ret !== true){ printf("[002] Expecting boolean/true got %s/%s @\n", gettype($ret), var_export($ret, true), $version); diff --git a/ext/mysqli/tests/072.phpt b/ext/mysqli/tests/072.phpt index 036253a0b..a1e9983bf 100644 --- a/ext/mysqli/tests/072.phpt +++ b/ext/mysqli/tests/072.phpt @@ -27,6 +27,6 @@ require_once('skipifconnectfailure.inc'); --EXPECTF-- int(1) int(1051) -%unicode|string%(26) "Unknown table 'not_exists'" +%unicode|string%(%d) "Unknown table %snot_exists%s" %unicode|string%(5) "HY000" done!
\ No newline at end of file diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index 35eb71753..f97550618 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -89,6 +89,8 @@ object(mysqli)#%d (%d) { %unicode|string%(%d) "%s" [%u|b%"server_version"]=> int(%d) + ["stat"]=> + %s [%u|b%"sqlstate"]=> %unicode|string%(5) "00000" [%u|b%"protocol_version"]=> @@ -125,6 +127,8 @@ object(mysqli)#%d (%d) { NULL [%u|b%"server_version"]=> NULL + ["stat"]=> + NULL [%u|b%"sqlstate"]=> NULL [%u|b%"protocol_version"]=> diff --git a/ext/mysqli/tests/bug45289.phpt b/ext/mysqli/tests/bug45289.phpt index 50775b55c..2ddacf4fd 100644 --- a/ext/mysqli/tests/bug45289.phpt +++ b/ext/mysqli/tests/bug45289.phpt @@ -37,4 +37,4 @@ require_once('skipifconnectfailure.inc'); require_once("clean_table.inc"); ?> --EXPECTF-- -[004] [0%s +[004] [%s diff --git a/ext/mysqli/tests/bug49442.phpt b/ext/mysqli/tests/bug49442.phpt index 5323a28ed..54267451e 100644 --- a/ext/mysqli/tests/bug49442.phpt +++ b/ext/mysqli/tests/bug49442.phpt @@ -4,6 +4,17 @@ Bug #49422 (mysqlnd: mysqli_real_connect() and LOAD DATA INFILE crash) <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); + +$link = mysqli_init(); +if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { + die(sprintf("skip Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error())); +} + +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); + +mysqli_close($link); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt index 833f8edbb..b1c1e87a7 100644 --- a/ext/mysqli/tests/bug51647.phpt +++ b/ext/mysqli/tests/bug51647.phpt @@ -4,6 +4,35 @@ Bug #51647 (Certificate file without private key (pk in another file) doesn't wo <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); +require_once("connect.inc"); + +if ($IS_MYSQLND && !extension_loaded("openssl")) + die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn."); + +if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))) + die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +$row = NULL; +if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) { + $row = $res->fetch_row(); +} else { + if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) { + while ($row = $res->fetch_row()) + if ($row[0] == 'have_ssl') + break; + } else { + die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error)); + } +} + + +if (empty($row)) + die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error)); + +if ($row[1] == 'NO') + die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error)); + +$link->close(); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/bug53503.phpt b/ext/mysqli/tests/bug53503.phpt index 6b705524e..339fce7a8 100644 --- a/ext/mysqli/tests/bug53503.phpt +++ b/ext/mysqli/tests/bug53503.phpt @@ -4,6 +4,16 @@ Bug #53503 (mysqli::query returns false after successful LOAD DATA query) <?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
+
+if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
+ die("skip Cannot connect to MySQL");
+
+include_once("local_infile_tools.inc");
+if ($msg = check_local_infile_support($link, $engine))
+ die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error));
+
+mysqli_close($link);
+
?>
--FILE--
<?php
@@ -13,19 +23,22 @@ require_once('skipifconnectfailure.inc'); printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
}
- if (!$link->query("DROP TABLE IF EXISTS tlocaldata")) {
+ if (!$link->query("DROP TABLE IF EXISTS test")) {
printf("[002] [%d] %s\n", $link->errno, $link->error);
}
- if (!$link->query("CREATE TABLE tlocaldata (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) {
+ if (!$link->query("CREATE TABLE test (dump1 INT UNSIGNED NOT NULL PRIMARY KEY) ENGINE=" . $engine)) {
printf("[003] [%d] %s\n", $link->errno, $link->error);
}
- file_put_contents('bug53503.data', "1\n2\n3\n");
+ if (FALSE == file_put_contents('bug53503.data', "1\n2\n3\n"))
+ printf("[004] Failed to create CVS file\n");
- $link->query("SELECT 1 FROM DUAL");
+ if (!$link->query("SELECT 1 FROM DUAL"))
+ printf("[005] [%d] %s\n", $link->errno, $link->error);
- if (!$link->query("LOAD DATA LOCAL INFILE 'bug53503.data' INTO TABLE tlocaldata")) {
+ if (!$link->query("LOAD DATA LOCAL INFILE 'bug53503.data' INTO TABLE test")) {
+ printf("[006] [%d] %s\n", $link->errno, $link->error);
echo "bug";
} else {
echo "done";
@@ -41,7 +54,7 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { $host, $user, $db, $port, $socket);
}
-if (!$link->query($link, 'DROP TABLE IF EXISTS tlocaldata')) {
+if (!$link->query($link, 'DROP TABLE IF EXISTS test')) {
printf("[clean] Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link));
}
diff --git a/ext/mysqli/tests/bug55283.phpt b/ext/mysqli/tests/bug55283.phpt index 0611c773c..6000fce0a 100644 --- a/ext/mysqli/tests/bug55283.phpt +++ b/ext/mysqli/tests/bug55283.phpt @@ -4,15 +4,35 @@ Bug #55283 (SSL options set by mysqli_ssl_set ignored for MySQLi persistent conn <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); -$link = mysqli_init(); -mysqli_ssl_set($link, null, null, null, null, "RC4-MD5"); -if (my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, null, $flags)) { - $res = $link->query("SHOW STATUS LIKE 'Ssl_cipher'"); +require_once("connect.inc"); + +if ($IS_MYSQLND && !extension_loaded("openssl")) + die("skip PHP streams lack support for SSL. mysqli is compiled to use mysqlnd which uses PHP streams in turn."); + +if (!($link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))) + die(sprintf("skip Connect failed, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +$row = NULL; +if ($res = $link->query('SHOW VARIABLES LIKE "have_ssl"')) { $row = $res->fetch_row(); - if ($row[1] === "") { - die('skip Server started without SSL support'); +} else { + if ($link->errno == 1064 && ($res = $link->query("SHOW VARIABLES"))) { + while ($row = $res->fetch_row()) + if ($row[0] == 'have_ssl') + break; + } else { + die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error)); } } + + +if (empty($row)) + die(sprintf("skip Failed to test for MySQL SSL support, [%d] %s", $link->errno, $link->error)); + +if ($row[1] == 'NO') + die(sprintf("skip MySQL has no SSL support, [%d] %s", $link->errno, $link->error)); + +$link->close(); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/bug55582.phpt b/ext/mysqli/tests/bug55582.phpt new file mode 100644 index 000000000..85fc7f6ce --- /dev/null +++ b/ext/mysqli/tests/bug55582.phpt @@ -0,0 +1,41 @@ +--TEST-- +Bug #55582 mysqli_num_rows() returns always 0 for unbuffered, when mysqlnd is used +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +require_once("connect.inc"); +?> +--FILE-- +<?php + include "connect.inc"; + if (!($link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))) { + printf("[001] Cannot connect to the server"); + } + + var_dump($link->real_query("SELECT 1")); + $res = $link->use_result(); + var_dump(mysqli_num_rows($res)); + var_dump($res->fetch_assoc()); + var_dump(mysqli_num_rows($res)); + var_dump($res->fetch_assoc()); + var_dump(mysqli_num_rows($res)); + + $link->close(); + echo "done\n"; +?> +--EXPECTF-- +bool(true) + +Warning: mysqli_num_rows(): Function cannot be used with MYSQL_USE_RESULT in %s on line %d +int(0) +array(1) { + [1]=> + string(1) "1" +} + +Warning: mysqli_num_rows(): Function cannot be used with MYSQL_USE_RESULT in %s on line %d +int(0) +NULL +int(1) +done
\ No newline at end of file diff --git a/ext/mysqli/tests/bug55653.phpt b/ext/mysqli/tests/bug55653.phpt new file mode 100644 index 000000000..f9cd297eb --- /dev/null +++ b/ext/mysqli/tests/bug55653.phpt @@ -0,0 +1,36 @@ +--TEST--
+Bug #55653 PS crash with libmysql when binding same variable as param and out
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ }
+
+ $in_and_out = "a";
+
+ if (!($stmt = $link->stmt_init()))
+ printf("[002] [%d] %s\n", $link->errno, $link->error);
+
+ if (!($stmt->prepare("SELECT ?")) ||
+ !($stmt->bind_param("s", $in_and_out)) ||
+ !($stmt->execute()) ||
+ !($stmt->bind_result($in_and_out)))
+ printf("[003] [%d] %s\n", $stmt->errno, $stmt->error);
+
+ if (!$stmt->fetch())
+ printf("[004] [%d] %s\n", $stmt->errno, $stmt->error);
+
+ if ("a" !== $in_and_out)
+ printf("[005] Wrong result: '%s'\n", $in_and_out);
+
+ echo "done!";
+?>
+--EXPECT--
+done!
\ No newline at end of file diff --git a/ext/mysqli/tests/bug55859.phpt b/ext/mysqli/tests/bug55859.phpt new file mode 100644 index 000000000..a8bb4b3f2 --- /dev/null +++ b/ext/mysqli/tests/bug55859.phpt @@ -0,0 +1,20 @@ +--TEST--
+Bug #55859 mysqli->stat property access gives error
+--SKIPIF--
+<?php
+require_once('skipif.inc');
+require_once('skipifconnectfailure.inc');
+?>
+--FILE--
+<?php
+ require_once("connect.inc");
+
+ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
+ printf("[001] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
+ }
+ var_dump(mysqli_stat($link) === $link->stat);
+ echo "done!";
+?>
+--EXPECT--
+bool(true)
+done!
\ No newline at end of file diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 6c6c48b5f..3a9d8ec25 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -222,7 +222,52 @@ return $charsets; } + function have_innodb($link) { + if (($res = $link->query("SHOW VARIABLES LIKE 'have_innodb'")) && + ($row = $res->fetch_row()) && + !empty($row)) { + if ($row[1] == "DISABLED" || $row[1] == "NO") { + return false; + } + return true; + } else { + /* MySQL 5.6.1+ */ + if ($res = $link->query("SHOW ENGINES")) { + while ($row = $res->fetch_assoc()) { + if (!isset($row['Engine']) || !isset($row['Support'])) + return false; + + if (('InnoDB' == $row['Engine']) && + (('YES' == $row['Support']) || ('DEFAULT' == $row['Support'])) + ) { + return true; + } + } + return false; + } else { + return false; + } + } + return false; + } + } else { printf("skip Eeeek/BUG/FIXME - connect.inc included twice! skipif bug?\n"); } -?>
\ No newline at end of file + + function handle_catchable_fatal($errno, $error, $file, $line) { + static $errcodes = array(); + if (empty($errcodes)) { + $constants = get_defined_constants(); + foreach ($constants as $name => $value) { + if (substr($name, 0, 2) == "E_") + $errcodes[$value] = $name; + } + } + printf("[%s] %s in %s on line %s\n", + (isset($errcodes[$errno])) ? $errcodes[$errno] : $errno, + $error, $file, $line); + + return true; + } +?> diff --git a/ext/mysqli/tests/local_infile_tools.inc b/ext/mysqli/tests/local_infile_tools.inc index 04d6e8a12..bb9872f1a 100644 --- a/ext/mysqli/tests/local_infile_tools.inc +++ b/ext/mysqli/tests/local_infile_tools.inc @@ -6,11 +6,53 @@ } } - function create_standard_csv($offset) { + function check_local_infile_support($link, $engine, $table_name = 'test') { + + if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) + return "Cannot check if Server variable 'local_infile' is set to 'ON'"; + + $row = mysqli_fetch_assoc($res); + mysqli_free_result($res); + if ('ON' != $row['Value']) + return sprintf("Server variable 'local_infile' seems not set to 'ON', found '%s'", $row['Value']); + + if (!mysqli_query($link, sprintf('DROP TABLE IF EXISTS %s', $table_name))) { + return "Failed to drop old test table"; + } + + if (!mysqli_query($link, $sql = sprintf('CREATE TABLE %s(id INT, label CHAR(1), PRIMARY KEY(id)) ENGINE=%s', + $table_name, $engine))) + return "Failed to create test table: $sql"; + + $file = create_standard_csv(1, false); + if (!$file) { + mysqli_query($link, sprintf('DROP TABLE IF EXISTS %s', $table_name)); + return "Cannot create CSV file"; + } + + if (!@mysqli_query($link, sprintf("LOAD DATA LOCAL INFILE '%s' + INTO TABLE %s + FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '\'' + LINES TERMINATED BY '\n'", + mysqli_real_escape_string($link, $file), + $table_name))) { + if (1148 == mysqli_errno($link)) { + mysqli_query($link, sprintf('DROP TABLE IF EXISTS %s', $table_name)); + return "Cannot test LOAD DATA LOCAL INFILE, [1148] The used command is not allowed with this MySQL version"; + } else if ($link->errno) { + return $link->error; + } + } + mysqli_query($link, sprintf('DROP TABLE IF EXISTS %s', $table_name)); + return ""; + } + + function create_standard_csv($offset, $verbose = true) { // create a CVS file $file = tempnam(sys_get_temp_dir(), 'mysqli_test'); if (!$fp = fopen($file, 'w')) { - printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file); + if ($verbose) + printf("[%03d + 1] Cannot create CVS file '%s'\n", $offset, $file); return NULL; } else { /* Looks ugly? No, handy if you have crashes... */ @@ -21,14 +63,16 @@ if (!fwrite($fp, (binary)"'97';'x';\n") || !fwrite($fp, (binary)"'98';'y';\n") || !fwrite($fp, (binary)"99;'z';\n")) { - printf("[%03d + 2] Cannot write CVS file '%s'\n", $offset, $file); + if ($verbose) + printf("[%03d + 2] Cannot write CVS file '%s'\n", $offset, $file); return NULL; } } else { if (!fwrite($fp, "97;'x';\n") || !fwrite($fp, "98;'y';\n") || !fwrite($fp, "99;'z';\n")) { - printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file); + if ($verbose) + printf("[%03d + 3] Cannot write CVS file '%s'\n", $offset, $file); return NULL; } } @@ -36,8 +80,9 @@ fclose($fp); if (!chmod($file, 0644)) { - printf("[%03d + 4] Cannot change the file perms of '%s' from 0600 to 0644, MySQL might not be able to read it\n", - $offset, $file); + if ($verbose) + printf("[%03d + 4] Cannot change the file perms of '%s' from 0600 to 0644, MySQL might not be able to read it\n", + $offset, $file); return NULL; } return $file; diff --git a/ext/mysqli/tests/mysqli_autocommit.phpt b/ext/mysqli/tests/mysqli_autocommit.phpt index f1f63e7f3..a93d89f10 100644 --- a/ext/mysqli/tests/mysqli_autocommit.phpt +++ b/ext/mysqli/tests/mysqli_autocommit.phpt @@ -12,17 +12,8 @@ mysqli_autocommit() $host, $user, $db, $port, $socket)); } - if (!$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { - die("skip Cannot check for required InnoDB suppot"); - } - if (!$row = mysqli_fetch_row($result)) - die("skip Cannot check for required InnoDB suppot"); - - mysqli_free_result($result); - mysqli_close($link); - if ($row[1] == "DISABLED" || $row[1] == "NO") { - die(sprintf ("skip innodb support is not installed or enabled.")); - } + if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_autocommit_oo.phpt b/ext/mysqli/tests/mysqli_autocommit_oo.phpt index b1777b9f6..3a5a25779 100644 --- a/ext/mysqli/tests/mysqli_autocommit_oo.phpt +++ b/ext/mysqli/tests/mysqli_autocommit_oo.phpt @@ -7,25 +7,14 @@ mysqli->autocommit() require_once('skipifconnectfailure.inc'); require_once('connect.inc'); - if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { + if (!$link = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { printf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", $host, $user, $db, $port, $socket); exit(1); } - if (!$res = $mysqli->query("SHOW VARIABLES LIKE 'have_innodb'")) { - printf("skip Cannot fetch have_innodb variable\n"); - exit(1); - } - - $row = $res->fetch_row(); - $res->free_result(); - $mysqli->close(); - - if ($row[1] == "DISABLED" || $row[1] == "NO") { - printf ("skip Innodb support is not installed or enabled."); - exit(1); - } + if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_change_user_rollback.phpt b/ext/mysqli/tests/mysqli_change_user_rollback.phpt index 97c2bd851..ed3330e06 100644 --- a/ext/mysqli/tests/mysqli_change_user_rollback.phpt +++ b/ext/mysqli/tests/mysqli_change_user_rollback.phpt @@ -6,16 +6,11 @@ require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); require_once('connect.inc'); -$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); -$result = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'"); -$row = mysqli_fetch_row($result); -mysqli_free_result($result); -mysqli_close($link); +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); -if ($row[1] == "DISABLED" || $row[1] == "NO") { - printf ("skip innodb support is not installed or enabled."); - exit; -} +if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_character_set.phpt b/ext/mysqli/tests/mysqli_character_set.phpt index 191a163f2..1bfe9cbda 100644 --- a/ext/mysqli/tests/mysqli_character_set.phpt +++ b/ext/mysqli/tests/mysqli_character_set.phpt @@ -48,7 +48,8 @@ if (version_compare(PHP_VERSION, '5.9.9', '>') == 1) { $k = $charset['Charset']; /* The server currently 17.07.2007 can't handle data sent in ucs2 */ /* The server currently 16.08.2010 can't handle data sent in utf16 and utf32 */ - if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32') { + /* The server currently 02.09.2011 can't handle data sent in utf16le */ + if ($charset['Charset'] == 'ucs2' || $charset['Charset'] == 'utf16' || $charset['Charset'] == 'utf32' || 'utf16le' == $charset['Charset']) { continue; } diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt index b503d3e56..c6d4e7cc3 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt @@ -22,7 +22,6 @@ require_once('skipifconnectfailure.inc'); 'autocommit' => true, 'change_user' => true, 'character_set_name' => true, - 'client_encoding' => true, 'close' => true, 'commit' => true, 'connect' => true, @@ -57,9 +56,13 @@ require_once('skipifconnectfailure.inc'); 'thread_safe' => true, 'use_result' => true, ); + + if (version_compare(PHP_VERSION, '5.3.99', '<=')) { + $expected_methods['client_encoding'] = true; + } + if ($IS_MYSQLND) { // mysqlnd only - /* $expected_methods['get_cache_stats'] = true; */ /* $expected_methods['get_client_stats'] = true; */ $expected_methods['get_connection_stats'] = true; $expected_methods['reap_async_query'] = true; @@ -96,15 +99,70 @@ require_once('skipifconnectfailure.inc'); printf("ok\n"); printf("\nClass variables:\n"); - $variables = array_keys(get_class_vars(get_class($mysqli))); - sort($variables); - foreach ($variables as $k => $var) - printf("%s\n", $var); + + $expected_class_variables = $expected_object_variables = array( + "affected_rows" => true, + "client_info" => true, + "client_version" => true, + "connect_errno" => true, + "connect_error" => true, + "errno" => true, + "error" => true, + "field_count" => true, + "host_info" => true, + "info" => true, + "insert_id" => true, + "protocol_version" => true, + "server_info" => true, + "server_version" => true, + "sqlstate" => true, + "stat" => true, + "thread_id" => true, + "warning_count" => true, + ); + + if (version_compare(PHP_VERSION, '5.3.99', '>')) { + $expected_class_variables["error_list"] = true; + $expected_object_variables["error_list"] = true; + } + + $variables = get_class_vars(get_class($mysqli)); + foreach ($variables as $var => $v) { + if (isset($expected_class_variables[$var])) { + unset($expected_class_variables[$var]); + unset($variables[$var]); + } + } + + if (!empty($expected_class_variables)) { + printf("Dumping list of missing class variables\n"); + var_dump($expected_class_variables); + } + if (!empty($variables)) { + printf("Dumping list of unexpected class variables\n"); + var_dump($variables); + } + echo "ok\n"; printf("\nObject variables:\n"); - $variables = array_keys(get_object_vars($mysqli)); - foreach ($variables as $k => $var) - printf("%s\n", $var); + $variables = get_object_vars($mysqli); + foreach ($variables as $var => $v) { + if (isset($expected_object_variables[$var])) { + unset($expected_object_variables[$var]); + unset($variables[$var]); + } + } + + if (!empty($expected_object_variables)) { + printf("Dumping list of missing object variables\n"); + var_dump($expected_object_variables); + } + if (!empty($variables)) { + printf("Dumping list of unexpected object variables\n"); + var_dump($variables); + } + echo "ok\n"; + printf("\nMagic, magic properties:\n"); @@ -133,6 +191,11 @@ require_once('skipifconnectfailure.inc'); $mysqli->error, gettype($mysqli->error), mysqli_error($link), gettype(mysqli_error($link))); + if (version_compare(PHP_VERSION, '5.3.99', '>')) { + assert(mysqli_error_list($link) === $mysqli->error_list); + assert(is_array($mysqli->error_list)); + } + assert(mysqli_field_count($link) === $mysqli->field_count); printf("mysqli->field_count = '%s'/%s ('%s'/%s)\n", $mysqli->field_count, gettype($mysqli->field_count), @@ -148,6 +211,11 @@ require_once('skipifconnectfailure.inc'); $mysqli->sqlstate, gettype($mysqli->sqlstate), mysqli_sqlstate($link), gettype(mysqli_sqlstate($link))); + assert(mysqli_stat($link) === $mysqli->stat); + printf("mysqli->stat = '%s'/%s ('%s'/%s)\n", + $mysqli->stat, gettype($mysqli->stat), + mysqli_stat($link), gettype(mysqli_stat($link))); + assert(mysqli_get_host_info($link) === $mysqli->host_info); printf("mysqli->host_info = '%s'/%s ('%s'/%s)\n", $mysqli->host_info, gettype($mysqli->host_info), @@ -217,42 +285,10 @@ Methods: ok Class variables: -affected_rows -client_info -client_version -connect_errno -connect_error -errno -error -field_count -host_info -info -insert_id -protocol_version -server_info -server_version -sqlstate -thread_id -warning_count +ok Object variables: -affected_rows -client_info -client_version -connect_errno -connect_error -errno -error -field_count -host_info -info -insert_id -server_info -server_version -sqlstate -protocol_version -thread_id -warning_count +ok Magic, magic properties: mysqli->affected_rows = '%s'/integer ('%s'/integer) @@ -263,6 +299,7 @@ mysqli->error = ''/%unicode|string% (''/%unicode|string%) mysqli->field_count = '0'/integer ('0'/integer) mysqli->insert_id = '0'/integer ('0'/integer) mysqli->sqlstate = '00000'/%unicode|string% ('00000'/%unicode|string%) +mysqli->stat = 'Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d'/string ('Uptime: %d Threads: %d Questions: %d Slow queries: %d Opens: %d Flush tables: %d Open tables: %d Queries per second avg: %d.%d'/string) mysqli->host_info = '%s'/%unicode|string% ('%s'/%unicode|string%) mysqli->info = ''/NULL (''/%unicode|string%) mysqli->thread_id = '%d'/integer ('%d'/integer) diff --git a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt index d0940a756..530b4647c 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_properties_no_conn.phpt @@ -68,6 +68,11 @@ require_once('skipifconnectfailure.inc'); @$mysqli->sqlstate, gettype(@$mysqli->sqlstate), @mysqli_sqlstate($mysqli), gettype(@mysqli_sqlstate($mysqli))); + assert(@mysqli_stat($mysqli) === @$mysqli->sstat); + printf("mysqli->stat = '%s'/%s ('%s'/%s)\n", + @$mysqli->stat, gettype(@$mysqli->stat), + @mysqli_stat($mysqli), gettype(@mysqli_stat($mysqli))); + assert(@mysqli_get_host_info($mysqli) === @$mysqli->host_info); printf("mysqli->host_info = '%s'/%s ('%s'/%s)\n", @$mysqli->host_info, gettype(@$mysqli->host_info), @@ -146,9 +151,9 @@ Without RS Class variables: affected_rows = 'NULL' client_info = 'NULL' -client_version = '%s' -connect_errno = '%s' -connect_error = ''%s' +client_version = '%d' +connect_errno = '%d' +connect_error = '%s' errno = 'NULL' error = 'NULL' field_count = 'NULL' @@ -159,14 +164,15 @@ protocol_version = 'NULL' server_info = 'NULL' server_version = 'NULL' sqlstate = 'NULL' +stat = 'NULL' thread_id = 'NULL' warning_count = 'NULL' Object variables: affected_rows = 'NULL' client_info = 'NULL' -client_version = '%s' -connect_errno = '%s' +client_version = '%d' +connect_errno = '%d' connect_error = '%s' errno = 'NULL' error = 'NULL' @@ -176,6 +182,7 @@ info = 'NULL' insert_id = 'NULL' server_info = 'NULL' server_version = 'NULL' +stat = 'NULL' sqlstate = 'NULL' protocol_version = 'NULL' thread_id = 'NULL' @@ -185,17 +192,18 @@ Magic, magic properties: mysqli->affected_rows = ''/NULL (''/NULL) Warning: assert(): Assertion failed in %s on line %d -mysqli->client_info = ''/NULL ('%s'/%s) -mysqli->client_version = '%s'/integer ('%s'/integer) +mysqli->client_info = ''/NULL ('%s'/string) +mysqli->client_version = '%d'/integer ('%d'/integer) mysqli->errno = ''/NULL (''/NULL) mysqli->error = ''/NULL (''/NULL) mysqli->field_count = ''/NULL (''/NULL) mysqli->insert_id = ''/NULL (''/NULL) mysqli->sqlstate = ''/NULL (''/NULL) +mysqli->stat = ''/NULL (''/NULL) mysqli->host_info = ''/NULL (''/NULL) mysqli->info = ''/NULL (''/NULL) -Warning: assert(): Assertion failed in %s on line %d +Warning: assert(): Assertion failed in %s on line 78 mysqli->thread_id = ''/NULL (''/NULL) mysqli->protocol_version = ''/NULL (''/NULL) mysqli->server_info = ''/NULL (''/NULL) @@ -208,15 +216,15 @@ setting mysqli->unknown, @mysqli_unknown = '13' setting mysqli->unknown, @mysqli_unknown = 'friday' Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation): -mysqli->connect_error = '%s'/%s) -mysqli->connect_errno = '%s'/integer ('%s'/integer) +mysqli->connect_error = '%s'/string ('%s'/string) +mysqli->connect_errno = '%d'/integer ('%d'/integer) With RS Class variables: affected_rows = 'NULL' client_info = 'NULL' -client_version = '%s' -connect_errno = '%s' +client_version = '%d' +connect_errno = '%d' connect_error = '%s' errno = 'NULL' error = 'NULL' @@ -228,14 +236,15 @@ protocol_version = 'NULL' server_info = 'NULL' server_version = 'NULL' sqlstate = 'NULL' +stat = 'NULL' thread_id = 'NULL' warning_count = 'NULL' Object variables: affected_rows = 'NULL' client_info = 'NULL' -client_version = '%s' -connect_errno = '%s' +client_version = '%d' +connect_errno = '%d' connect_error = '%s' errno = 'NULL' error = 'NULL' @@ -245,6 +254,7 @@ info = 'NULL' insert_id = 'NULL' server_info = 'NULL' server_version = 'NULL' +stat = 'NULL' sqlstate = 'NULL' protocol_version = 'NULL' thread_id = 'NULL' @@ -253,14 +263,15 @@ warning_count = 'NULL' Magic, magic properties: mysqli->affected_rows = ''/NULL (''/NULL) -Warning: assert(): Assertion failed in %s on line %d -mysqli->client_info = ''/NULL ('%s'/%s) -mysqli->client_version = '%s'/integer ('%s'/integer) +Warning: assert(): Assertion failed in %s on line %s +mysqli->client_info = ''/NULL ('%s'/string) +mysqli->client_version = '%d'/integer ('%d'/integer) mysqli->errno = ''/NULL (''/NULL) mysqli->error = ''/NULL (''/NULL) mysqli->field_count = ''/NULL (''/NULL) mysqli->insert_id = ''/NULL (''/NULL) mysqli->sqlstate = ''/NULL (''/NULL) +mysqli->stat = ''/NULL (''/NULL) mysqli->host_info = ''/NULL (''/NULL) mysqli->info = ''/NULL (''/NULL) @@ -277,6 +288,6 @@ setting mysqli->unknown, @mysqli_unknown = '13' setting mysqli->unknown, @mysqli_unknown = 'friday' Access hidden properties for MYSLQI_STATUS_INITIALIZED (TODO documentation): -mysqli->connect_error = '%s'/%s) -mysqli->connect_errno = '%s'/integer ('%s'/integer) +mysqli->connect_error = '%s'/string ('%s'/string) +mysqli->connect_errno = '%d'/integer ('%d'/integer) done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt index 652aee29e..0e0fe6cf5 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt @@ -1209,6 +1209,14 @@ isStatic: no isDefault: yes Modifiers: 256 +Inspecting property 'stat' +isPublic: yes +isPrivate: no +isProtected: no +isStatic: no +isDefault: yes +Modifiers: 256 + Inspecting property 'thread_id' isPublic: yes isPrivate: no @@ -1239,6 +1247,7 @@ Default property 'protocol_version' Default property 'server_info' Default property 'server_version' Default property 'sqlstate' +Default property 'stat' Default property 'thread_id' Default property 'warning_count' done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_commit.phpt b/ext/mysqli/tests/mysqli_commit.phpt index 66113b3a5..d20ba5dd2 100644 --- a/ext/mysqli/tests/mysqli_commit.phpt +++ b/ext/mysqli/tests/mysqli_commit.phpt @@ -6,22 +6,12 @@ require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); -if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { - die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket)); -} - -if (!$res = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { - die(sprintf("skip Cannot fetch have_innodb variable\n")); -} - -$row = mysqli_fetch_row($res); -mysqli_free_result($res); -mysqli_close($link); - -if ($row[1] == "DISABLED" || $row[1] == "NO") { - die(sprintf ("skip Innodb support is not installed or enabled.")); -} +require_once('connect.inc'); +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_commit_oo.phpt b/ext/mysqli/tests/mysqli_commit_oo.phpt index fee796739..34ec4bfcd 100644 --- a/ext/mysqli/tests/mysqli_commit_oo.phpt +++ b/ext/mysqli/tests/mysqli_commit_oo.phpt @@ -5,22 +5,13 @@ mysqli_commit() require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); -if (!$mysqli = new my_mysqli($host, $user, $passwd, $db, $port, $socket)) { - die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket)); -} - -if (!$res = $mysqli->query("SHOW VARIABLES LIKE 'have_innodb'")) { - die(sprintf("skip Cannot fetch have_innodb variable\n")); -} - -$row = $res->fetch_row(); -$res->free(); -$mysqli->close(); - -if ($row[1] == "DISABLED" || $row[1] == "NO") { - die(sprintf("skip Innodb support is not installed or enabled.")); -} + +require_once('connect.inc'); +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_connect.phpt b/ext/mysqli/tests/mysqli_connect.phpt index cf7c7bede..e14d88fe7 100644 --- a/ext/mysqli/tests/mysqli_connect.phpt +++ b/ext/mysqli/tests/mysqli_connect.phpt @@ -1,8 +1,11 @@ --TEST-- mysqli_connect() --SKIPIF-- -<?php require_once('skipif.inc'); ?> -<?php require_once('skipifemb.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php require_once("connect.inc"); @@ -146,7 +149,7 @@ mysqli_connect() print "done!"; ?> --EXPECTF-- -Warning: mysqli_connect(): (%d/%d): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d +Warning: mysqli_connect(): (%s/%d): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d array(1) { [%u|b%"testing"]=> %unicode|string%(21) "mysqli.default_socket" diff --git a/ext/mysqli/tests/mysqli_connect_oo.phpt b/ext/mysqli/tests/mysqli_connect_oo.phpt index d406e2484..35cc11616 100644 --- a/ext/mysqli/tests/mysqli_connect_oo.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo.phpt @@ -1,8 +1,11 @@ --TEST-- new mysqli() --SKIPIF-- -<?php require_once('skipif.inc'); ?> -<?php require_once('skipifemb.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php require_once("connect.inc"); @@ -144,7 +147,7 @@ new mysqli() print "done!"; ?> --EXPECTF-- -Warning: mysqli::mysqli(): (%d/%d): Access denied for user '%sunknown%s'@'%s' (using password: %s) in %s on line %d +Warning: mysqli::mysqli(): (%s/%d): Access denied for user '%sunknown%s'@'%s' (using password: %s) in %s on line %d ... and now Exceptions Access denied for user '%s'@'%s' (using password: %s) done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt index bb643e8a3..1855a2031 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt @@ -1,8 +1,11 @@ --TEST-- new mysqli() --SKIPIF-- -<?php require_once('skipif.inc'); ?> -<?php require_once('skipifemb.inc'); ?> +<?php +require_once('skipif.inc'); +require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); +?> --FILE-- <?php require_once("connect.inc"); diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt index ff92160a7..613dddfc8 100644 --- a/ext/mysqli/tests/mysqli_constants.phpt +++ b/ext/mysqli/tests/mysqli_constants.phpt @@ -160,6 +160,9 @@ require_once('skipifconnectfailure.inc'); if (defined('MYSQLI_DATA_TRUNCATED')) $expected_constants["MYSQLI_DATA_TRUNCATED"] = true; + if (defined('MYSQLI_SERVER_PS_OUT_PARAMS')) + $expected_constants["MYSQLI_SERVER_PS_OUT_PARAMS"] = true; + if (!$IS_MYSQLND) { /* libmysql only */ diff --git a/ext/mysqli/tests/mysqli_debug_append.phpt b/ext/mysqli/tests/mysqli_debug_append.phpt index f15365f2e..f91699546 100644 --- a/ext/mysqli/tests/mysqli_debug_append.phpt +++ b/ext/mysqli/tests/mysqli_debug_append.phpt @@ -14,6 +14,9 @@ if (!defined('MYSQLI_DEBUG_TRACE_ENABLED')) if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED) die("skip: debug functionality not enabled"); + +if (!$IS_MYSQLND) + die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation"); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_debug_control_string.phpt b/ext/mysqli/tests/mysqli_debug_control_string.phpt index 20556df04..42a802d81 100644 --- a/ext/mysqli/tests/mysqli_debug_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_control_string.phpt @@ -14,6 +14,9 @@ if (!defined('MYSQLI_DEBUG_TRACE_ENABLED')) if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED) die("skip: debug functionality not enabled"); + +if (!$IS_MYSQLND) + die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation"); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_debug_ini.phpt b/ext/mysqli/tests/mysqli_debug_ini.phpt index 859a44c32..bcf00672d 100644 --- a/ext/mysqli/tests/mysqli_debug_ini.phpt +++ b/ext/mysqli/tests/mysqli_debug_ini.phpt @@ -4,6 +4,7 @@ mysqli_debug() - enabling trace with ini setting <?php require_once('skipif.inc'); require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); if (!function_exists('mysqli_debug')) die("skip mysqli_debug() not available"); diff --git a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt index 5b66ee26d..1de2eebb2 100644 --- a/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt +++ b/ext/mysqli/tests/mysqli_debug_mysqlnd_control_string.phpt @@ -14,6 +14,9 @@ if (!defined('MYSQLI_DEBUG_TRACE_ENABLED')) if (defined('MYSQLI_DEBUG_TRACE_ENABLED') && !MYSQLI_DEBUG_TRACE_ENABLED) die("skip: debug functionality not enabled"); + +if (!$IS_MYSQLND) + die("SKIP Libmysql feature not sufficiently spec'd in MySQL C API documentation"); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_explain_metadata.phpt b/ext/mysqli/tests/mysqli_explain_metadata.phpt index 5bfb001a1..fc1f9dbe4 100644 --- a/ext/mysqli/tests/mysqli_explain_metadata.phpt +++ b/ext/mysqli/tests/mysqli_explain_metadata.phpt @@ -5,6 +5,9 @@ EXPLAIN - metadata require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); +require_once("connect.inc"); +if (!$IS_MYSQLND) + die("skip Open libmysql/MySQL issue http://bugs.mysql.com/?id=62350"); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_fetch_field_types.phpt b/ext/mysqli/tests/mysqli_fetch_field_types.phpt index 98332f4a1..d02c02c76 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_types.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_types.phpt @@ -10,14 +10,14 @@ require_once('skipifconnectfailure.inc'); <?php require('table.inc'); - function mysqli_field_datatypes($link, $sql_type, $php_value, $php_type, $datatypes) { + function mysqli_field_datatypes($link, $sql_type, $php_value, $php_type, $datatypes, $default_charset="latin1") { if (!mysqli_query($link, "DROP TABLE IF EXISTS test")) { printf("[001] %s, [%d] %s\n", $sql_type, mysqli_errno($link), mysqli_error($link)); return false; } - $create = sprintf("CREATE TABLE test(id %s)", $sql_type); + $create = sprintf("CREATE TABLE test(id %s) DEFAULT CHARSET %s", $sql_type, $default_charset); if (!mysqli_query($link, $create)) { printf("[002] '%s' - '%s', [%d] %s\n", $sql_type, $create, mysqli_errno($link), mysqli_error($link)); diff --git a/ext/mysqli/tests/mysqli_fork.phpt b/ext/mysqli/tests/mysqli_fork.phpt index 6c5096f37..f5a0b7bc9 100644 --- a/ext/mysqli/tests/mysqli_fork.phpt +++ b/ext/mysqli/tests/mysqli_fork.phpt @@ -13,22 +13,11 @@ if (!function_exists('posix_getpid')) die("skip POSIX functions not available"); require_once('connect.inc'); -if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { - die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket)); -} - -if (!$res = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { - die(sprintf("skip Cannot fetch have_innodb variable\n")); -} - -$row = mysqli_fetch_row($res); -mysqli_free_result($res); -mysqli_close($link); +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); -if ($row[1] == "DISABLED" || $row[1] == "NO") { - die(sprintf ("skip Innodb support is not installed or enabled.")); -} +if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_kill.phpt b/ext/mysqli/tests/mysqli_kill.phpt index 5706adf46..3606fda0b 100644 --- a/ext/mysqli/tests/mysqli_kill.phpt +++ b/ext/mysqli/tests/mysqli_kill.phpt @@ -44,28 +44,31 @@ require_once('skipifconnectfailure.inc'); if ($link->info != 'Records: 6 Duplicates: 0 Warnings: 0') { printf("[008] mysqlnd used to be more verbose and used to support SELECT"); } + if ($link->stat != NULL) { + printf("[009] NULL expected because of error.\n"); + } } else { if ($link->info != NULL) { - printf("[008] Time for wonders - libmysql has started to support SELECT, change test"); + printf("[010] Time for wonders - libmysql has started to support SELECT, change test"); } } mysqli_close($link); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) - printf("[009] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + printf("[011] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); mysqli_kill($link, -1); if ((!$res = mysqli_query($link, "SELECT id FROM test LIMIT 1")) || (!$tmp = mysqli_fetch_assoc($res))) { - printf("[010] Connection should not be gone, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + printf("[012] Connection should not be gone, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); } var_dump($tmp); mysqli_free_result($res); mysqli_close($link); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) - printf("[011] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + printf("[013] Cannot connect, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); mysqli_change_user($link, "This might work if you accept anonymous users in your setup", "password", $db); mysqli_kill($link, -1); @@ -108,6 +111,8 @@ object(mysqli)#%d (%d) { %unicode|string%(%d) "%s" [%u|b%"server_version"]=> int(%d) + ["stat"]=> + %s [%u|b%"sqlstate"]=> %unicode|string%(5) "HY000" [%u|b%"protocol_version"]=> @@ -125,4 +130,4 @@ array(1) { } Warning: mysqli_kill(): processid should have positive value in %s on line %d -done!
\ No newline at end of file +done! diff --git a/ext/mysqli/tests/mysqli_last_insert_id.phpt b/ext/mysqli/tests/mysqli_last_insert_id.phpt index 353cb7a8a..996c401f7 100644 --- a/ext/mysqli/tests/mysqli_last_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_last_insert_id.phpt @@ -31,7 +31,7 @@ API vs. SQL LAST_INSERT_ID() $host, $user, $db, $port, $socket); if (!$link->query("DROP TABLE IF EXISTS test") || - !$link->query("CREATE TABLE test (id INT auto_increment, label varchar(10) not null, PRIMARY KEY (id))") || + !$link->query("CREATE TABLE test (id INT auto_increment, label varchar(10) not null, PRIMARY KEY (id)) ENGINE=MyISAM") || !$link->query("INSERT INTO test (id, label) VALUES (null, 'a')")) { printf("[002] [%d] %s\n", $link->errno, $link->error); } diff --git a/ext/mysqli/tests/mysqli_poll_kill.phpt b/ext/mysqli/tests/mysqli_poll_kill.phpt index 800521aa7..b068d64e8 100644 --- a/ext/mysqli/tests/mysqli_poll_kill.phpt +++ b/ext/mysqli/tests/mysqli_poll_kill.phpt @@ -25,7 +25,7 @@ if (!$IS_MYSQLND) // Killing connection - 1 $link = get_connection(); - if (true !== ($tmp = mysqli_query($link, "SELECT 1 AS 'processed beofre killed'", MYSQLI_ASYNC | MYSQLI_USE_RESULT))) + if (true !== ($tmp = mysqli_query($link, "SELECT 1 AS 'processed before killed'", MYSQLI_ASYNC | MYSQLI_USE_RESULT))) printf("[002] Expecting boolean/true got %s/%s\n", gettype($tmp), var_export($tmp, true)); // Sleep 0.1s - the asynchronous query should have been processed after the wait period @@ -136,15 +136,14 @@ if (!$IS_MYSQLND) mysqli_kill(get_connection(), $thread_id); // Sleep 0.1s to ensure the KILL gets recognized usleep(100000); - if (false !== ($tmp = mysqli_query($link, "SELECT 1 AS 'processed beofre killed'", MYSQLI_ASYNC | MYSQLI_USE_RESULT))) + if (false !== ($tmp = mysqli_query($link, "SELECT 1 AS 'processed before killed'", MYSQLI_ASYNC | MYSQLI_USE_RESULT))) printf("[015] Expecting boolean/false got %s/%s\n", gettype($tmp), var_export($tmp, true)); $links = array($link); $errors = array($link); $reject = array($link); - // Yes, that is weird, right? Its the OK package we have to fetch - if (1 !== ($tmp = (mysqli_poll($links, $errors, $reject, 0, 10000)))) + if (0 !== ($tmp = (mysqli_poll($links, $errors, $reject, 0, 10000)))) printf("[016] Expecting int/0 got %s/%s\n", gettype($tmp), var_export($tmp, true)); if (!is_array($links) || empty($links)) @@ -172,9 +171,11 @@ if (!$IS_MYSQLND) mysqli_close($link); print "done!"; ?> +--XFAIL-- +To be fixed later. Minor issue about fetching error message from killed line --EXPECTF-- array(1) { - [%u|b%"processed beofre killed"]=> + [%u|b%"processed before killed"]=> %unicode|string%(1) "1" } Fetching from thread %d... diff --git a/ext/mysqli/tests/mysqli_poll_reference.phpt b/ext/mysqli/tests/mysqli_poll_reference.phpt index 332f871af..ab2ed2aee 100644 --- a/ext/mysqli/tests/mysqli_poll_reference.phpt +++ b/ext/mysqli/tests/mysqli_poll_reference.phpt @@ -13,7 +13,7 @@ if (!$IS_MYSQLND) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip cannot connect"); -if (mysqli_server_version($link) < 50012) +if (mysqli_get_server_version($link) < 50012) die("skip Test needs SQL function SLEEP() available as of MySQL 5.0.12"); ?> diff --git a/ext/mysqli/tests/mysqli_query_local_infile_large.phpt b/ext/mysqli/tests/mysqli_query_local_infile_large.phpt index 8b115a507..76bc415d8 100644 --- a/ext/mysqli/tests/mysqli_query_local_infile_large.phpt +++ b/ext/mysqli/tests/mysqli_query_local_infile_large.phpt @@ -4,6 +4,16 @@ mysql_query(LOAD DATA LOCAL INFILE) with large data set (10MB) <?php require_once('skipif.inc'); require_once('skipifconnectfailure.inc'); + +$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); +if (!$link) + die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); + +mysqli_close($link); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt index 2c371328b..b9ba98693 100644 --- a/ext/mysqli/tests/mysqli_real_connect.phpt +++ b/ext/mysqli/tests/mysqli_real_connect.phpt @@ -176,40 +176,42 @@ require_once('skipifconnectfailure.inc'); ?> --EXPECTF-- Warning: mysqli_real_connect(): (%d/%d): Access denied for user '%s'@'%s' (using password: YES) in %s on line %d -object(mysqli)#%d (%d) { - [%u|b%"affected_rows"]=> +object(mysqli)#%d (18) { + ["affected_rows"]=> NULL - [%u|b%"client_info"]=> + ["client_info"]=> %s - [%u|b%"client_version"]=> + ["client_version"]=> int(%d) - [%u|b%"connect_errno"]=> - int(%d) - [%u|b%"connect_error"]=> - NULL - [%u|b%"errno"]=> + ["connect_errno"]=> + int(0) + ["connect_error"]=> %s - [%u|b%"error"]=> + ["errno"]=> %s - [%u|b%"field_count"]=> + ["error"]=> + %s + ["field_count"]=> NULL - [%u|b%"host_info"]=> + ["host_info"]=> + %s + ["info"]=> NULL - [%u|b%"info"]=> + ["insert_id"]=> NULL - [%u|b%"insert_id"]=> + ["server_info"]=> NULL - [%u|b%"server_info"]=> + ["server_version"]=> NULL - [%u|b%"server_version"]=> + ["stat"]=> NULL - [%u|b%"sqlstate"]=> + ["sqlstate"]=> NULL - [%u|b%"protocol_version"]=> + ["protocol_version"]=> NULL - [%u|b%"thread_id"]=> + ["thread_id"]=> NULL - [%u|b%"warning_count"]=> + ["warning_count"]=> NULL } diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt index 1d9cf794a..886d464b7 100644 --- a/ext/mysqli/tests/mysqli_report.phpt +++ b/ext/mysqli/tests/mysqli_report.phpt @@ -289,7 +289,7 @@ Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; ch Warning: mysqli_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOO' at line 1 in %s on line %d -Warning: mysqli_change_user(): (%d/%d): Access denied for user '0123456789-10-4%s'@'%s' (using password: YES) in %s on line %d +Warning: mysqli_change_user(): (%d/%d): Access denied for user '%s'@'%s' (using password: %s) in %s on line %d Warning: mysqli_kill(): processid should have positive value in %s on line %d diff --git a/ext/mysqli/tests/mysqli_report_wo_ps.phpt b/ext/mysqli/tests/mysqli_report_wo_ps.phpt index 2ded3fd9d..cc57511b5 100644 --- a/ext/mysqli/tests/mysqli_report_wo_ps.phpt +++ b/ext/mysqli/tests/mysqli_report_wo_ps.phpt @@ -101,7 +101,7 @@ Warning: mysqli_multi_query(): (%d/%d): You have an error in your SQL syntax; ch Warning: mysqli_query(): (%d/%d): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FOO' at line 1 in %s on line %d -Warning: mysqli_change_user(): (%d/%d): Access denied for user '0123456789-10-4%s'@'%s' (using password: YES) in %s on line %d +Warning: mysqli_change_user(): (%d/%d): Access denied for user '%s'@'%s' (using password: %s) in %s on line %d Warning: mysqli_kill(): processid should have positive value in %s on line %d diff --git a/ext/mysqli/tests/mysqli_rollback.phpt b/ext/mysqli/tests/mysqli_rollback.phpt index 1b1fe8b35..be4900031 100644 --- a/ext/mysqli/tests/mysqli_rollback.phpt +++ b/ext/mysqli/tests/mysqli_rollback.phpt @@ -9,23 +9,11 @@ mysqli_rollback() require_once('skipifconnectfailure.inc'); require_once('connect.inc'); + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) + die(sprintf("Cannot connect, [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); - if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { - die(sprintf("skip Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", - $host, $user, $db, $port, $socket)); - } - - if (!$res = mysqli_query($link, "SHOW VARIABLES LIKE 'have_innodb'")) { - die(sprintf("skip Cannot fetch have_innodb variable\n")); - } - - $row = mysqli_fetch_row($res); - mysqli_free_result($res); - mysqli_close($link); - - if ($row[1] == "DISABLED" || $row[1] == "NO") { - die(sprintf("skip Innodb support is not installed or enabled.")); - } + if (!have_innodb($link)) + die(sprintf("Needs InnoDB support, [%d] %s", $link->errno, $link->error)); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_select_db.phpt b/ext/mysqli/tests/mysqli_select_db.phpt index 7527a1313..f58a19bea 100644 --- a/ext/mysqli/tests/mysqli_select_db.phpt +++ b/ext/mysqli/tests/mysqli_select_db.phpt @@ -70,7 +70,17 @@ require_once('skipifconnectfailure.inc'); mysqli_report(MYSQLI_REPORT_OFF); mysqli_select_db($link, 'I can not imagine that this database exists'); mysqli_report(MYSQLI_REPORT_ERROR); + + ob_start(); mysqli_select_db($link, 'I can not imagine that this database exists'); + $output = ob_get_contents(); + ob_end_clean(); + if (!stristr($output, "1049") && !stristr($output, "1044") && !stristr($output, "1045")) { + /* Error: 1049 SQLSTATE: 42000 (ER_BAD_DB_ERROR) Message: Unknown database '%s' */ + /* Error: 1044 SQLSTATE: 42000 (ER_DBACCESS_DENIED_ERROR) Message: Access denied for user '%s'@'%s' to database '%s' */ + /* Error: 1045 SQLSTATE: 28000 (ER_ACCESS_DENIED_ERROR) Message: Access denied for user '%s'@'%s' (using password: %s) */ + echo $output; + } if (!$res = mysqli_query($link, "SELECT DATABASE() AS dbname")) printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); @@ -98,7 +108,5 @@ require_once('skipifconnectfailure.inc'); --CLEAN-- <?php require_once("clean_table.inc"); ?> --EXPECTF-- -Warning: mysqli_select_db(): (%d/%d): Unknown database '%s' in %s on line %d - Warning: mysqli_select_db(): Couldn't fetch mysqli in %s on line %d done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_set_charset.phpt b/ext/mysqli/tests/mysqli_set_charset.phpt index 4cd6e6ec1..38fe56841 100644 --- a/ext/mysqli/tests/mysqli_set_charset.phpt +++ b/ext/mysqli/tests/mysqli_set_charset.phpt @@ -102,7 +102,7 @@ if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STOR printf("[016] Cannot get list of character sets\n"); while ($tmp = mysqli_fetch_assoc($res)) { - if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset']) + if ('ucs2' == $tmp['Charset'] || 'utf16' == $tmp['Charset'] || 'utf32' == $tmp['Charset'] || 'utf16le' == $tmp['Charset']) continue; /* Uncomment to see where it hangs - var_dump($tmp); flush(); */ diff --git a/ext/mysqli/tests/mysqli_set_local_infile_default.phpt b/ext/mysqli/tests/mysqli_set_local_infile_default.phpt index dd67bb32a..0348b01f6 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_default.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_default.phpt @@ -9,7 +9,15 @@ require_once('skipifconnectfailure.inc'); if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); -require_once('connect.inc'); +$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket); +if (!$link) + die(sprintf("skip Can't connect [%d] %s", mysqli_connect_errno(), mysqli_connect_error())); + +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); + +mysqli_close($link); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt index c8da0183b..58f4c7035 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler.phpt @@ -13,18 +13,11 @@ require_once('connect.inc'); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt index ad0a3532f..b8f51c214 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_bad_character.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt index e7df96e5a..a3c880102 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_buffer_overflow.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt index c2ee87b34..408bb29ec 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_close_link.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt index 4ebf8ded2..168cbc135 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_closefile.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt index 3d94a545d..ad7ab32c1 100755 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_closures.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt index 09b4f90f6..b2b42a22e 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_kill_link.phpt @@ -13,18 +13,11 @@ require_once('connect.inc'); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt index ca4270549..16e38c5fa 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_negative_len.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt index 8b56deafa..4663fe236 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_nested_call.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt index 1c47292e3..ca06435c5 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_new_query.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt index 6113abae6..601a09e12 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_nofileop.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt index 423ad834e..7163aca10 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_openbasedir.phpt @@ -2,14 +2,17 @@ mysqli_set_local_infile_handler() - open basedir restrictions --SKIPIF-- <?php -require_once('skipif.inc'); -require_once('skipifemb.inc'); -require_once('skipifconnectfailure.inc'); +if (!$fp = @fopen('skipif.inc', 'r')) + die("skip open_basedir restrictions forbid opening include files"); + +include_once('skipif.inc'); +include_once('skipifemb.inc'); +include_once('skipifconnectfailure.inc'); if (!function_exists('mysqli_set_local_infile_handler')) die("skip - function not available."); -require_once('connect.inc'); +include_once('connect.inc'); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); @@ -18,13 +21,11 @@ if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); } -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); -mysqli_close($link); +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); +mysqli_close($link); ?> --INI-- open_basedir="." diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt index 33dd5164e..0d4024e52 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_replace_buffer.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt index 9af9974e7..b3144e430 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_short_len.phpt @@ -16,18 +16,11 @@ if (!$TEST_EXPERIMENTAL) if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt b/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt index e6dfecb7e..f287f4d87 100644 --- a/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt +++ b/ext/mysqli/tests/mysqli_set_local_infile_handler_unregister.phpt @@ -13,18 +13,11 @@ require_once('connect.inc'); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) die("skip Cannot connect to MySQL"); -if (!$res = mysqli_query($link, 'SHOW VARIABLES LIKE "local_infile"')) { - mysqli_close($link); - die("skip Cannot check if Server variable 'local_infile' is set to 'ON'"); -} +include_once("local_infile_tools.inc"); +if ($msg = check_local_infile_support($link, $engine)) + die(sprintf("skip %s, [%d] %s", $msg, $link->errno, $link->error)); -$row = mysqli_fetch_assoc($res); -mysqli_free_result($res); mysqli_close($link); - -if ('ON' != $row['Value']) - die(sprintf("skip Server variable 'local_infile' seems not set to 'ON', found '%s'", - $row['Value'])); ?> --INI-- mysqli.allow_local_infile=1 diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt index 1f92ca1f8..35433b136 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_next_result.phpt @@ -15,7 +15,11 @@ if (mysqli_get_server_version($link) < 50503) { --FILE-- <?php require_once('connect.inc'); - require_once('table.inc'); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, $port, $socket); + } if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p')) printf("[003] [%d] %s.\n", mysqli_errno($link), mysqli_error($link)); @@ -119,6 +123,8 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) mysqli_close($link); ?> +--XFAIL-- +Unsupported and undefined, under development --EXPECTF-- [010] More results: yes [011] Next result: yes diff --git a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt index c6053bcae..8c7c799de 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute_stored_proc_out.phpt @@ -20,7 +20,11 @@ if ($IS_MYSQLND) { --FILE-- <?php require_once('connect.inc'); - require_once('table.inc'); + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, $port, $socket); + } if (!mysqli_query($link, 'DROP PROCEDURE IF EXISTS p')) printf("[003] [%d] %s.\n", mysqli_errno($link), mysqli_error($link)); @@ -69,6 +73,8 @@ if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) mysqli_close($link); ?> +--XFAIL-- +Unsupported and undefined, under development --EXPECTF-- [008] More results: %s [009] Next results: %s diff --git a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt index af81ca4e8..a1f5e89c7 100644 --- a/ext/mysqli/tests/mysqli_stmt_num_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_num_rows.phpt @@ -82,7 +82,17 @@ require_once('skipifconnectfailure.inc'); $i++; } while (mysqli_stmt_fetch($stmt)); - if (7 !== ($tmp = mysqli_stmt_num_rows($stmt))) + /* NOTE to users + Behaviour with libmysql is UNDEFINED, see http://news.php.net/php.internals/55210 + Because it is undefined it is allowed to the mysqlnd DEVELOPER to implement + any behaviour they like, including the one checked for in this test. + What the test does is cover an implementation detail of the mysqlnd library. + This implementation detail may, at any time, change without prior notice. + On the contrary, the mysqlnd way is a reasonable one and, maybe, one fine + day, after Klingons visited earh, becomes the official one. Meanwhile do + not rely on it. + */ + if ($IS_MYSQLND && (7 !== ($tmp = mysqli_stmt_num_rows($stmt)))) printf("[54] Expecting int/7, got %s/%s\n", gettype($tmp), $tmp); } else { diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index 3c4b5c808..ba1f0b75e 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -1,9 +1,12 @@ dnl -dnl $Id: config9.m4 309609 2011-03-23 17:14:28Z andrey $ +dnl $Id: config9.m4 316281 2011-09-06 16:38:22Z johannes $ dnl config.m4 for mysqlnd driver +PHP_ARG_ENABLE(mysqlnd, whether to enable mysqlnd, + [ --enable-mysqlnd Enable mysqlnd expliciely, will be done implicitly + when required by other extensions], no, yes) -PHP_ARG_ENABLE(mysqlnd_compression_support, whether to enable compressed protocol support in mysqlnd, +PHP_ARG_ENABLE(mysqlnd_compression_support, whether to disable compressed protocol support in mysqlnd, [ --disable-mysqlnd-compression-support Disable support for the MySQL compressed protocol in mysqlnd], yes, no) @@ -13,7 +16,7 @@ if test -z "$PHP_ZLIB_DIR"; then fi dnl If some extension uses mysqlnd it will get compiled in PHP core -if test "$PHP_MYSQLND_ENABLED" = "yes"; then +if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then mysqlnd_ps_sources="mysqlnd_ps.c mysqlnd_ps_codec.c" mysqlnd_base_sources="mysqlnd.c mysqlnd_charset.c mysqlnd_wireprotocol.c \ mysqlnd_loaddata.c mysqlnd_net.c mysqlnd_statistics.c \ @@ -27,12 +30,12 @@ if test "$PHP_MYSQLND_ENABLED" = "yes"; then AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support]) mysqlnd_sources="$mysqlnd_base_sources $mysqlnd_ps_sources" - PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, no) + PHP_NEW_EXTENSION(mysqlnd, $mysqlnd_sources, $ext_shared) PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) PHP_INSTALL_HEADERS([ext/mysqlnd/]) fi -if test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then +if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then PHP_ADD_BUILD_DIR([ext/mysqlnd], 1) dnl This creates a file so it has to be after above macros diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index e3f892894..7815c6642 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd.c 314740 2011-08-10 14:12:24Z andrey $ */ +/* $Id: mysqlnd.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -886,6 +886,144 @@ PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn, /* }}} */ +/* {{{ mysqlnd_conn::change_user */ +static enum_func_status +MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, + const char *user, + const char *passwd, + const char *db, + zend_bool silent TSRMLS_DC) +{ + size_t user_len; + enum_func_status ret = FAIL; + MYSQLND_PACKET_CHG_USER_RESPONSE * chg_user_resp; + char buffer[MYSQLND_MAX_ALLOWED_USER_LEN + 1 + 1 + SCRAMBLE_LENGTH + MYSQLND_MAX_ALLOWED_DB_LEN + 1 + 2 /* charset*/ + 2]; + char *p = buffer; + const MYSQLND_CHARSET * old_cs = conn->charset; + + DBG_ENTER("mysqlnd_conn::change_user"); + DBG_INF_FMT("conn=%llu user=%s passwd=%s db=%s silent=%u", + conn->thread_id, user?user:"", passwd?"***":"null", db?db:"", (silent == TRUE)?1:0 ); + + SET_ERROR_AFF_ROWS(conn); + + if (!user) { + user = ""; + } + if (!passwd) { + passwd = ""; + } + if (!db) { + db = ""; + } + + /* 1. user ASCIIZ */ + user_len = MIN(strlen(user), MYSQLND_MAX_ALLOWED_USER_LEN); + memcpy(p, user, user_len); + p += user_len; + *p++ = '\0'; + + /* 2. password SCRAMBLE_LENGTH followed by the scramble or \0 */ + if (passwd[0]) { + *p++ = SCRAMBLE_LENGTH; + php_mysqlnd_scramble((unsigned char *)p, conn->scramble, (unsigned char *)passwd); + p += SCRAMBLE_LENGTH; + } else { + *p++ = '\0'; + } + + /* 3. db ASCIIZ */ + if (db[0]) { + size_t db_len = MIN(strlen(db), MYSQLND_MAX_ALLOWED_DB_LEN); + memcpy(p, db, db_len); + p += db_len; + } + *p++ = '\0'; + + /* + 4. request the current charset, or it will be reset to the system one. + 5.0 doesn't support it. Support added in 5.1.23 by fixing the following bug : + Bug #30472 libmysql doesn't reset charset, insert_id after succ. mysql_change_user() call + */ + if (mysqlnd_get_server_version(conn) >= 50123) { + int2store(p, conn->charset->nr); + p+=2; + } + + if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer, + PROT_LAST /* we will handle the OK packet*/, + silent, TRUE TSRMLS_CC)) { + DBG_RETURN(FAIL); + } + + chg_user_resp = conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE TSRMLS_CC); + if (!chg_user_resp) { + SET_OOM_ERROR(conn->error_info); + goto end; + } + ret = PACKET_READ(chg_user_resp, conn); + conn->error_info = chg_user_resp->error_info; + + if (conn->error_info.error_no) { + ret = FAIL; + /* + COM_CHANGE_USER is broken in 5.1. At least in 5.1.15 and 5.1.14, 5.1.11 is immune. + bug#25371 mysql_change_user() triggers "packets out of sync" + When it gets fixed, there should be one more check here + */ + if (mysqlnd_get_server_version(conn) > 50113L && mysqlnd_get_server_version(conn) < 50118L) { + MYSQLND_PACKET_OK * redundant_error_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); + if (redundant_error_packet) { + PACKET_READ(redundant_error_packet, conn); + PACKET_FREE(redundant_error_packet); + DBG_INF_FMT("Server is %u, buggy, sends two ERR messages", mysqlnd_get_server_version(conn)); + } else { + SET_OOM_ERROR(conn->error_info); + } + } + } + if (ret == PASS) { + char * tmp = NULL; + /* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */ + tmp = mnd_pestrndup(user, user_len, conn->persistent); + if (conn->user) { + mnd_pefree(conn->user, conn->persistent); + } + conn->user = tmp; + + tmp = mnd_pestrdup(passwd, conn->persistent); + if (conn->passwd) { + mnd_pefree(conn->passwd, conn->persistent); + } + conn->passwd = tmp; + + if (conn->last_message) { + mnd_pefree(conn->last_message, conn->persistent); + conn->last_message = NULL; + } + memset(&conn->upsert_status, 0, sizeof(conn->upsert_status)); + /* set charset for old servers */ + if (mysqlnd_get_server_version(conn) < 50123) { + ret = conn->m->set_charset(conn, old_cs->name TSRMLS_CC); + } + } else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) { + /* old authentication with new server !*/ + DBG_ERR(mysqlnd_old_passwd); + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); + } +end: + PACKET_FREE(chg_user_resp); + + /* + Here we should close all statements. Unbuffered queries should not be a + problem as we won't allow sending COM_CHANGE_USER. + */ + DBG_INF(ret == PASS? "PASS":"FAIL"); + DBG_RETURN(ret); +} +/* }}} */ + + /* {{{ mysqlnd_conn::query */ /* If conn->error_info.error_no is not zero, then we had an error. @@ -1043,7 +1181,7 @@ static int mysqlnd_stream_array_from_fd_set(MYSQLND **conn_array, fd_set *fds TS return ret; } - +/* }}} */ #ifndef PHP_WIN32 #define php_select(m, r, w, e, t) select(m, r, w, e, t) @@ -1407,7 +1545,7 @@ MYSQLND_METHOD(mysqlnd_conn, kill)(MYSQLND * conn, unsigned int pid TSRMLS_DC) char buff[4]; DBG_ENTER("mysqlnd_conn::kill"); - DBG_INF_FMT("conn=%llu pid=%lu", conn->thread_id, pid); + DBG_INF_FMT("conn=%llu pid=%u", conn->thread_id, pid); int4store(buff, pid); @@ -1869,149 +2007,6 @@ PHPAPI const char *mysqlnd_field_type_name(enum mysqlnd_field_types field_type) /* }}} */ -/* {{{ mysqlnd_conn::change_user */ -static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, - const char *user, - const char *passwd, - const char *db, - zend_bool silent TSRMLS_DC) -{ - /* - User could be max 16 * 3 (utf8), pass is 20 usually, db is up to 64*3 - Stack space is not that expensive, so use a bit more to be protected against - buffer overflows. - */ - size_t user_len; - enum_func_status ret = FAIL; - MYSQLND_PACKET_CHG_USER_RESPONSE * chg_user_resp; - char buffer[MYSQLND_MAX_ALLOWED_USER_LEN + 1 + SCRAMBLE_LENGTH + MYSQLND_MAX_ALLOWED_DB_LEN + 1 + 2 /* charset*/ ]; - char *p = buffer; - const MYSQLND_CHARSET * old_cs = conn->charset; - - DBG_ENTER("mysqlnd_conn::change_user"); - DBG_INF_FMT("conn=%llu user=%s passwd=%s db=%s silent=%u", - conn->thread_id, user?user:"", passwd?"***":"null", db?db:"", (silent == TRUE)?1:0 ); - - SET_ERROR_AFF_ROWS(conn); - - if (!user) { - user = ""; - } - if (!passwd) { - passwd = ""; - } - if (!db) { - db = ""; - } - - /* 1. user ASCIIZ */ - user_len = MIN(strlen(user), MYSQLND_MAX_ALLOWED_USER_LEN); - memcpy(p, user, user_len); - p += user_len; - *p++ = '\0'; - - /* 2. password SCRAMBLE_LENGTH followed by the scramble or \0 */ - if (passwd[0]) { - *p++ = SCRAMBLE_LENGTH; - php_mysqlnd_scramble((unsigned char *)p, conn->scramble, (unsigned char *)passwd); - p += SCRAMBLE_LENGTH; - } else { - *p++ = '\0'; - } - - /* 3. db ASCIIZ */ - if (db[0]) { - size_t db_len = MIN(strlen(db), MYSQLND_MAX_ALLOWED_DB_LEN); - memcpy(p, db, db_len); - p += db_len; - } - *p++ = '\0'; - - /* - 4. request the current charset, or it will be reset to the system one. - 5.0 doesn't support it. Support added in 5.1.23 by fixing the following bug : - Bug #30472 libmysql doesn't reset charset, insert_id after succ. mysql_change_user() call - */ - if (mysqlnd_get_server_version(conn) >= 50123) { - int2store(p, conn->charset->nr); - p+=2; - } - - if (PASS != conn->m->simple_command(conn, COM_CHANGE_USER, buffer, p - buffer, - PROT_LAST /* we will handle the OK packet*/, - silent, TRUE TSRMLS_CC)) { - DBG_RETURN(FAIL); - } - - chg_user_resp = conn->protocol->m.get_change_user_response_packet(conn->protocol, FALSE TSRMLS_CC); - if (!chg_user_resp) { - SET_OOM_ERROR(conn->error_info); - goto end; - } - ret = PACKET_READ(chg_user_resp, conn); - conn->error_info = chg_user_resp->error_info; - - if (conn->error_info.error_no) { - ret = FAIL; - /* - COM_CHANGE_USER is broken in 5.1. At least in 5.1.15 and 5.1.14, 5.1.11 is immune. - bug#25371 mysql_change_user() triggers "packets out of sync" - When it gets fixed, there should be one more check here - */ - if (mysqlnd_get_server_version(conn) > 50113L && mysqlnd_get_server_version(conn) < 50118L) { - MYSQLND_PACKET_OK * redundant_error_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); - if (redundant_error_packet) { - PACKET_READ(redundant_error_packet, conn); - PACKET_FREE(redundant_error_packet); - DBG_INF_FMT("Server is %u, buggy, sends two ERR messages", mysqlnd_get_server_version(conn)); - } else { - SET_OOM_ERROR(conn->error_info); - } - } - } - if (ret == PASS) { - char * tmp = NULL; - /* if we get conn->user as parameter and then we first free it, then estrndup it, we will crash */ - tmp = mnd_pestrndup(user, user_len, conn->persistent); - if (conn->user) { - mnd_pefree(conn->user, conn->persistent); - } - conn->user = tmp; - - tmp = mnd_pestrdup(passwd, conn->persistent); - if (conn->passwd) { - mnd_pefree(conn->passwd, conn->persistent); - } - conn->passwd = tmp; - - if (conn->last_message) { - mnd_pefree(conn->last_message, conn->persistent); - conn->last_message = NULL; - } - memset(&conn->upsert_status, 0, sizeof(conn->upsert_status)); - /* set charset for old servers */ - if (mysqlnd_get_server_version(conn) < 50123) { - ret = conn->m->set_charset(conn, old_cs->name TSRMLS_CC); - } - } else if (ret == FAIL && chg_user_resp->server_asked_323_auth == TRUE) { - /* old authentication with new server !*/ - DBG_ERR(mysqlnd_old_passwd); - SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); - } -end: - PACKET_FREE(chg_user_resp); - - /* - Here we should close all statements. Unbuffered queries should not be a - problem as we won't allow sending COM_CHANGE_USER. - */ - DBG_INF(ret == PASS? "PASS":"FAIL"); - DBG_RETURN(ret); -} -/* }}} */ - - /* {{{ mysqlnd_conn::set_client_option */ static enum_func_status MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 571d1f56a..bf76bfd9f 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,12 +17,12 @@ | Ulf Wendel <uwendel@mysql.com> | +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd.h 310735 2011-05-03 09:37:53Z andrey $ */ +/* $Id: mysqlnd.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_H #define MYSQLND_H -#define MYSQLND_VERSION "mysqlnd 5.0.8-dev - 20102224 - $Revision: 310735 $" +#define MYSQLND_VERSION "mysqlnd 5.0.8-dev - 20102224 - $Revision: 321634 $" #define MYSQLND_VERSION_ID 50008 /* This forces inlining of some accessor functions */ diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c index fd957a989..289b2ccb9 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.c +++ b/ext/mysqlnd/mysqlnd_block_alloc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_block_alloc.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_block_alloc.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" diff --git a/ext/mysqlnd/mysqlnd_block_alloc.h b/ext/mysqlnd/mysqlnd_block_alloc.h index 12ee34079..38e87e308 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.h +++ b/ext/mysqlnd/mysqlnd_block_alloc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_block_alloc.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_block_alloc.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_BLOCK_ALLOC_H #define MYSQLND_BLOCK_ALLOC_H diff --git a/ext/mysqlnd/mysqlnd_charset.c b/ext/mysqlnd/mysqlnd_charset.c index 6c8e7a5cc..5b60711a8 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -122,11 +122,11 @@ static unsigned int check_mb_utf8_sequence(const char *start, const char *end) [F4][80..8F][80..BF][80..BF] */ - if (!((start[1] ^ 0x80) < 0x40 && - (start[2] ^ 0x80) < 0x40 && - (start[3] ^ 0x80) < 0x40 && - (c >= 0xf1 || start[1] >= 0x90) && - (c <= 0xf3 || start[1] <= 0x8F))) + if (!(((zend_uchar)start[1] ^ 0x80) < 0x40 && + ((zend_uchar)start[2] ^ 0x80) < 0x40 && + ((zend_uchar)start[3] ^ 0x80) < 0x40 && + (c >= 0xf1 || (zend_uchar)start[1] >= 0x90) && + (c <= 0xf3 || (zend_uchar)start[1] <= 0x8F))) { return 0; /* invalid utf8 character */ } diff --git a/ext/mysqlnd/mysqlnd_charset.h b/ext/mysqlnd/mysqlnd_charset.h index 69194bea4..2f5d1db27 100644 --- a/ext/mysqlnd/mysqlnd_charset.h +++ b/ext/mysqlnd/mysqlnd_charset.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index a7a13df1b..01d4ea749 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_debug.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_debug.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index f6a571d43..9bb9f0eb8 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_debug.h 310768 2011-05-04 19:09:12Z andrey $ */ +/* $Id: mysqlnd_debug.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_DEBUG_H #define MYSQLND_DEBUG_H diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h index 279827aa2..c291b4438 100644 --- a/ext/mysqlnd/mysqlnd_enum_n_def.h +++ b/ext/mysqlnd/mysqlnd_enum_n_def.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_enum_n_def.h 307883 2011-01-31 13:52:21Z andrey $ */ +/* $Id: mysqlnd_enum_n_def.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_ENUM_N_DEF_H #define MYSQLND_ENUM_N_DEF_H diff --git a/ext/mysqlnd/mysqlnd_libmysql_compat.h b/ext/mysqlnd/mysqlnd_libmysql_compat.h index 0498f058e..c95539b08 100644 --- a/ext/mysqlnd/mysqlnd_libmysql_compat.h +++ b/ext/mysqlnd/mysqlnd_libmysql_compat.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index 11413e2c7..557caa294 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 600a65080..e80192850 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -120,6 +120,17 @@ MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const schem net->packet_no = net->compressed_envelope_packet_no = 0; + if (net->stream) { + /* close before opening a new one */ + DBG_INF_FMT("Freeing stream. abstract=%p", net->stream->abstract); + if (net->persistent) { + php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE_PERSISTENT | PHP_STREAM_FREE_RSRC_DTOR); + } else { + php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE); + } + net->stream = NULL; + } + if (net->options.timeout_connect) { tv.tv_sec = net->options.timeout_connect; tv.tv_usec = 0; @@ -254,7 +265,7 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t STORE_HEADER_SIZE(safe_storage, uncompressed_payload); int3store(uncompressed_payload, to_be_sent); int1store(uncompressed_payload + 3, net->packet_no); - if (PASS == net->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), tmp_complen, + if (PASS == net->m.encode((compress_buf + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE), &tmp_complen, uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE TSRMLS_CC)) { int3store(compress_buf + MYSQLND_HEADER_SIZE, to_be_sent + MYSQLND_HEADER_SIZE); @@ -480,20 +491,22 @@ MYSQLND_METHOD(mysqlnd_net, decode)(zend_uchar * uncompressed_data, size_t uncom /* {{{ mysqlnd_net::encode */ static enum_func_status -MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t compress_buffer_len, +MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC) { #ifdef MYSQLND_COMPRESSION_ENABLED int error; - uLongf tmp_complen = compress_buffer_len; + uLongf tmp_complen = *compress_buffer_len; DBG_ENTER("mysqlnd_net::encode"); error = compress(compress_buffer, &tmp_complen, uncompressed_data, uncompressed_data_len); if (error != Z_OK) { DBG_INF_FMT("compression NOT successful. error=%d Z_OK=%d Z_BUF_ERROR=%d Z_MEM_ERROR=%d", error, Z_OK, Z_BUF_ERROR, Z_MEM_ERROR); } else { + *compress_buffer_len = tmp_complen; DBG_INF_FMT("compression successful. compressed size=%lu", tmp_complen); } + DBG_RETURN(error == Z_OK? PASS:FAIL); #else DBG_ENTER("mysqlnd_net::encode"); diff --git a/ext/mysqlnd/mysqlnd_net.h b/ext/mysqlnd/mysqlnd_net.h index 8a0e399b5..d4077aea0 100644 --- a/ext/mysqlnd/mysqlnd_net.h +++ b/ext/mysqlnd/mysqlnd_net.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index 4e2294625..09ca81b1b 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_priv.h 311643 2011-05-31 10:35:07Z andrey $ */ +/* $Id: mysqlnd_priv.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_PRIV_H #define MYSQLND_PRIV_H @@ -147,15 +147,8 @@ #define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR((stmt)->error_info, a, b, c) - -#ifdef ZTS #define CONN_GET_STATE(c) (c)->m->get_state((c) TSRMLS_CC) #define CONN_SET_STATE(c, s) (c)->m->set_state((c), (s) TSRMLS_CC) -#else -#define CONN_GET_STATE(c) ((c)->state) -#define CONN_SET_STATE(c, s) ((c)->state = (s)) -#endif - /* PS stuff */ typedef void (*ps_field_fetch_func)(zval *zv, const MYSQLND_FIELD * const field, diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index 61c3089f6..6dc5011a6 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps.c 307921 2011-02-01 16:55:20Z andrey $ */ +/* $Id: mysqlnd_ps.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -41,7 +41,7 @@ static struct st_mysqlnd_stmt_methods *mysqlnd_stmt_methods; /* Exported by mysqlnd_ps_codec.c */ enum_func_status mysqlnd_stmt_execute_generate_request(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); -enum_func_status mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, +enum_func_status mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC); @@ -97,7 +97,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s TSRMLS_DC) result = stmt->result; result->type = MYSQLND_RES_PS_BUF; - result->m.fetch_row = mysqlnd_fetch_stmt_row_buffered; + result->m.fetch_row = mysqlnd_stmt_fetch_row_buffered; result->m.fetch_lengths = NULL;/* makes no sense */ result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); @@ -724,16 +724,16 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const s TSRMLS_DC) /* }}} */ -/* {{{ mysqlnd_fetch_stmt_row_buffered */ +/* {{{ mysqlnd_stmt_fetch_row_buffered */ enum_func_status -mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) +mysqlnd_stmt_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { MYSQLND_STMT * s = (MYSQLND_STMT *) param; MYSQLND_STMT_DATA * stmt = s? s->data:NULL; MYSQLND_RES_BUFFERED *set = result->stored_data; unsigned int field_count = result->meta->field_count; - DBG_ENTER("mysqlnd_fetch_stmt_row_buffered"); + DBG_ENTER("mysqlnd_stmt_fetch_row_buffered"); *fetched_anything = FALSE; DBG_INF_FMT("stmt=%lu", stmt != NULL ? stmt->stmt_id : 0L); diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 4be7ead2d..ec0baf2a5 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps_codec.c 309655 2011-03-24 16:12:18Z andrey $ */ +/* $Id: mysqlnd_ps_codec.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 582f5c2ed..6c0fe59b2 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.c 311122 2011-05-17 09:44:11Z andrey $ */ +/* $Id: mysqlnd_result.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -616,19 +616,18 @@ mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) static unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) { - return result->lengths; + /* simulate output of libmysql */ + return (!result->unbuf || result->unbuf->last_row_data || result->unbuf->eof_reached)? result->lengths:NULL; } /* }}} */ -#if !defined(MYSQLND_USE_OPTIMISATIONS) || MYSQLND_USE_OPTIMISATIONS == 0 /* {{{ mysqlnd_res::fetch_lengths */ PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_DC) { return result->m.fetch_lengths? result->m.fetch_lengths(result TSRMLS_CC) : NULL; } /* }}} */ -#endif /* {{{ mysqlnd_fetch_row_unbuffered_c */ diff --git a/ext/mysqlnd/mysqlnd_result.h b/ext/mysqlnd/mysqlnd_result.h index 3b20a84bc..63523c9fd 100644 --- a/ext/mysqlnd/mysqlnd_result.h +++ b/ext/mysqlnd/mysqlnd_result.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_result.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_RESULT_H #define MYSQLND_RESULT_H diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index 83a1ae1b1..236be7392 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_result_meta.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" diff --git a/ext/mysqlnd/mysqlnd_result_meta.h b/ext/mysqlnd/mysqlnd_result_meta.h index e7d52ce10..d459838bd 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.h +++ b/ext/mysqlnd/mysqlnd_result_meta.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_result_meta.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_RESULT_META_H #define MYSQLND_RESULT_META_H diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 8095b7ee8..d25c88adf 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.c 307593 2011-01-19 18:09:17Z andrey $ */ +/* $Id: mysqlnd_statistics.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h index f02e08a63..27211c62b 100644 --- a/ext/mysqlnd/mysqlnd_statistics.h +++ b/ext/mysqlnd/mysqlnd_statistics.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_statistics.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_STATISTICS_H #define MYSQLND_STATISTICS_H diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index 28bbf07a7..680587f52 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_structs.h 314740 2011-08-10 14:12:24Z andrey $ */ +/* $Id: mysqlnd_structs.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_STRUCTS_H #define MYSQLND_STRUCTS_H @@ -258,7 +258,7 @@ typedef enum_func_status (*func_mysqlnd_net__set_client_option)(MYSQLND_NET * co typedef enum_func_status (*func_mysqlnd_net__network_read)(MYSQLND * conn, zend_uchar * buffer, size_t count TSRMLS_DC); typedef size_t (*func_mysqlnd_net__network_write)(MYSQLND * const conn, const zend_uchar * const buf, size_t count TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_net__decode)(zend_uchar * uncompressed_data, size_t uncompressed_data_len, const zend_uchar * const compressed_data, size_t compressed_data_len TSRMLS_DC); -typedef enum_func_status (*func_mysqlnd_net__encode)(zend_uchar * compress_buffer, size_t compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_net__encode)(zend_uchar * compress_buffer, size_t * compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC); typedef size_t (*func_mysqlnd_net__consume_uneaten_data)(MYSQLND_NET * const net, enum php_mysqlnd_server_command cmd TSRMLS_DC); typedef void (*func_mysqlnd_net__free_contents)(MYSQLND_NET * net TSRMLS_DC); typedef enum_func_status (*func_mysqlnd_net__enable_ssl)(MYSQLND_NET * const net TSRMLS_DC); diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 61582a3aa..e7cf47427 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 77a2ec7cf..6d3770b03 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_wireprotocol.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mysqlnd_wireprotocol.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MYSQLND_WIREPROTOCOL_H #define MYSQLND_WIREPROTOCOL_H diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index 47c546536..a39909cf0 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysqlnd.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: php_mysqlnd.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_ini.h" #include "mysqlnd.h" @@ -299,6 +299,11 @@ zend_module_entry mysqlnd_module_entry = { }; /* }}} */ +/* {{{ COMPILE_DL_MYSQLND */ +#ifdef COMPILE_DL_MYSQLND +ZEND_GET_MODULE(mysqlnd) +#endif +/* }}} */ /* * Local variables: diff --git a/ext/mysqlnd/php_mysqlnd.h b/ext/mysqlnd/php_mysqlnd.h index db47bdb00..1ec85262c 100644 --- a/ext/mysqlnd/php_mysqlnd.h +++ b/ext/mysqlnd/php_mysqlnd.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: php_mysqlnd.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_mysqlnd.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MYSQLND_H diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index b2a42ed46..367c55464 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -26,7 +26,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c 313688 2011-07-25 23:40:57Z sixd $ */ +/* $Id: oci8.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -79,11 +79,14 @@ static PHP_GSHUTDOWN_FUNCTION(oci); #endif /* For a user friendly message about environment setup */ -/* TODO: add cases for SHLIB_PATH, LIBPATH, LD_LIBRARY_PATH_64 etc */ #if defined(PHP_WIN32) #define PHP_OCI8_LIB_PATH_MSG "PATH" #elif defined(__APPLE__) #define PHP_OCI8_LIB_PATH_MSG "DYLD_LIBRARY_PATH" +#elif defined(_AIX) +#define PHP_OCI8_LIB_PATH_MSG "LIBPATH" +#elif defined(__hpux) +#define PHP_OCI8_LIB_PATH_MSG "SHLIB_PATH" #else #define PHP_OCI8_LIB_PATH_MSG "LD_LIBRARY_PATH" #endif @@ -106,7 +109,12 @@ zend_class_entry *oci_coll_class_entry_ptr; #define SQLT_CFILEE 115 #endif -#define PHP_OCI_ERRBUF_LEN 1024 +#ifdef OCI_ERROR_MAXMSG_SIZE2 +/* Bigger size is defined from 11.2.0.3 onwards */ +#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE2 +#else +#define PHP_OCI_ERRBUF_LEN OCI_ERROR_MAXMSG_SIZE +#endif #if ZEND_MODULE_API_NO > 20020429 #define ONUPDATELONGFUNC OnUpdateLong @@ -1063,7 +1071,7 @@ static void php_oci_init_global_handles(TSRMLS_D) { sword errstatus; sb4 ora_error_code = 0; - text tmp_buf[PHP_OCI_ERRBUF_LEN]; + text tmp_buf[OCI_ERROR_MAXMSG_SIZE]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */ errstatus = OCIEnvNlsCreate(&OCI_G(env), PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, 0, 0); @@ -1074,7 +1082,7 @@ static void php_oci_init_global_handles(TSRMLS_D) php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right directories"); #endif if (OCI_G(env) - && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS + && OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS && *tmp_buf) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", tmp_buf); } @@ -1103,7 +1111,7 @@ static void php_oci_init_global_handles(TSRMLS_D) PHP_OCI_CALL(OCIHandleFree, (cpoolh, OCI_HTYPE_CPOOL)); #endif } else { - OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR); + OCIErrorGet(OCI_G(env), (ub4)1, NULL, &ora_error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ERROR); if (ora_error_code) { int tmp_buf_len = strlen((char *)tmp_buf); @@ -1333,7 +1341,7 @@ PHP_MINFO_FUNCTION(oci) php_info_print_table_start(); php_info_print_table_row(2, "OCI8 Support", "enabled"); php_info_print_table_row(2, "Version", PHP_OCI8_VERSION); - php_info_print_table_row(2, "Revision", "$Revision: 313688 $"); + php_info_print_table_row(2, "Revision", "$Revision: 321634 $"); snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent)); php_info_print_table_row(2, "Active Persistent Connections", buf); @@ -1624,9 +1632,9 @@ sb4 php_oci_error(OCIError *err_p, sword status TSRMLS_DC) php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NEED_DATA"); break; case OCI_NO_DATA: - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA"); errcode = php_oci_fetch_errmsg(err_p, &errbuf TSRMLS_CC); if (errbuf) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", errbuf); efree(errbuf); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCI_NO_DATA: failed to fetch error message"); @@ -2046,7 +2054,14 @@ php_oci_connection *php_oci_do_connect_ex(char *username, int username_len, char connection->is_persistent = 0; } else { connection = (php_oci_connection *) calloc(1, sizeof(php_oci_connection)); + if (connection == NULL) { + return NULL; + } connection->hash_key = zend_strndup(hashed_details.c, hashed_details.len); + if (connection->hash_key == NULL) { + free(connection); + return NULL; + } connection->is_persistent = 1; } } else { @@ -2181,10 +2196,10 @@ static int php_oci_connection_ping(php_oci_connection *connection TSRMLS_DC) return 1; } else { sb4 error_code = 0; - text tmp_buf[PHP_OCI_ERRBUF_LEN]; + text tmp_buf[OCI_ERROR_MAXMSG_SIZE]; /* Treat ORA-1010 as a successful Ping */ - OCIErrorGet(OCI_G(err), (ub4)1, NULL, &error_code, tmp_buf, (ub4)PHP_OCI_ERRBUF_LEN, (ub4)OCI_HTYPE_ERROR); + OCIErrorGet(OCI_G(err), (ub4)1, NULL, &error_code, tmp_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ERROR); if (error_code == 1010) { return 1; } @@ -2696,12 +2711,20 @@ static php_oci_spool *php_oci_create_spool(char *username, int username_len, cha ub4 poolmode = OCI_DEFAULT; /* Mode to be passed to OCISessionPoolCreate */ OCIAuthInfo *spoolAuth = NULL; - /*Allocate sessionpool out of persistent memory */ + /* Allocate sessionpool out of persistent memory */ session_pool = (php_oci_spool *) calloc(1, sizeof(php_oci_spool)); + if (session_pool == NULL) { + iserror = 1; + goto exit_create_spool; + } /* Populate key if passed */ if (hash_key_len) { session_pool->spool_hash_key = zend_strndup(hash_key, hash_key_len); + if (session_pool->spool_hash_key == NULL) { + iserror = 1; + goto exit_create_spool; + } } /* Create the session pool's env */ @@ -2893,11 +2916,20 @@ static OCIEnv *php_oci_create_env(ub2 charsetid TSRMLS_DC) PHP_OCI_CALL_RETURN(OCI_G(errcode), OCIEnvNlsCreate, (&retenv, OCI_G(events) ? PHP_OCI_INIT_MODE | OCI_EVENTS : PHP_OCI_INIT_MODE, 0, NULL, NULL, NULL, 0, NULL, charsetid, charsetid)); if (OCI_G(errcode) != OCI_SUCCESS) { + sb4 ora_error_code = 0; + text ora_msg_buf[OCI_ERROR_MAXMSG_SIZE]; /* Use traditional smaller size: non-PL/SQL errors should fit and it keeps the stack smaller */ + #ifdef HAVE_OCI_INSTANT_CLIENT php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that " PHP_OCI8_LIB_PATH_MSG " includes the directory with Oracle Instant Client libraries"); #else php_error_docref(NULL TSRMLS_CC, E_WARNING, "OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME and " PHP_OCI8_LIB_PATH_MSG " are set and point to the right directories"); #endif + if (retenv + && OCIErrorGet(retenv, (ub4)1, NULL, &ora_error_code, ora_msg_buf, (ub4)OCI_ERROR_MAXMSG_SIZE, (ub4)OCI_HTYPE_ENV) == OCI_SUCCESS + && *ora_msg_buf) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s", ora_msg_buf); + } + return NULL; } return retenv; diff --git a/ext/oci8/oci8_collection.c b/ext/oci8/oci8_collection.c index 3ee5dc888..480da34cb 100644 --- a/ext/oci8/oci8_collection.c +++ b/ext/oci8/oci8_collection.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_collection.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: oci8_collection.c 321634 2012-01-01 13:15:04Z felipe $ */ diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index e405f12f4..80645fc78 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_interface.c 312017 2011-06-10 17:38:07Z sixd $ */ +/* $Id: oci8_interface.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index 1045e35c1..dd92f0302 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_lob.c 313754 2011-07-27 00:04:23Z sixd $ */ +/* $Id: oci8_lob.c 321634 2012-01-01 13:15:04Z felipe $ */ diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index fe5ba8399..1f5f171ee 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_statement.c 313754 2011-07-27 00:04:23Z sixd $ */ +/* $Id: oci8_statement.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 0bb6eb532..d3a912832 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -33,12 +33,12 @@ http://pear.php.net/dtd/package-2.0.xsd"> <active>no</active> </lead> - <date>2011-06-10</date> + <date>2011-11-18</date> <time>12:00:00</time> <version> - <release>1.4.6</release> - <api>1.4.6</api> + <release>1.4.7</release> + <api>1.4.7</api> </version> <stability> <release>stable</release> @@ -46,8 +46,11 @@ http://pear.php.net/dtd/package-2.0.xsd"> </stability> <license uri="http://www.php.net/license">PHP</license> <notes> - Added oci_client_version() returning the runtime Oracle client library version - Made OCI8 extension buildable with PHP 5.4-development code + Fixed bug #59985 (show normal warning text for OCI_NO_DATA) + Fixed OCI8 part of bug #55748 (CVE-2011-4153: multiple NULL pointer dereferences with zend_strndup) + Fixed OCI8 part of bug #55301 (multiple null pointer dereferences with calloc) + Increased maximum Oracle error message buffer length for new Oracle 11.2.0.3 size + Improve internal initalization failure error messages </notes> <contents> <dir name="/"> @@ -66,6 +69,8 @@ http://pear.php.net/dtd/package-2.0.xsd"> <file name="array_bind_012.phpt" role="test" /> <file name="array_bind_013.phpt" role="test" /> <file name="array_bind_014.phpt" role="test" /> + <file name="array_bind_bdouble.phpt" role="test" /> + <file name="array_bind_bfloat.phpt" role="test" /> <file name="array_bind_date1.phpt" role="test" /> <file name="array_bind_date.phpt" role="test" /> <file name="array_bind_float1.phpt" role="test" /> @@ -74,6 +79,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> <file name="array_bind_int.phpt" role="test" /> <file name="array_bind_str1.phpt" role="test" /> <file name="array_bind_str.phpt" role="test" /> + <file name="array_bind_uin.phpt" role="test" /> <file name="b47243_1.phpt" role="test" /> <file name="b47243_2.phpt" role="test" /> <file name="b47243_3.phpt" role="test" /> @@ -251,6 +257,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> <file name="edition_2.phpt" role="test" /> <file name="error1.phpt" role="test" /> <file name="error2.phpt" role="test" /> + <file name="error3.phpt" role="test" /> <file name="error_bind.phpt" role="test" /> <file name="error_old.phpt" role="test" /> <file name="error_parse.phpt" role="test" /> @@ -338,7 +345,6 @@ http://pear.php.net/dtd/package-2.0.xsd"> <file name="null_byte_2.phpt" role="test" /> <file name="null_byte_3.phpt" role="test" /> <file name="num.phpt" role="test" /> - <file name="oci8safemode.phpt" role="test" /> <file name="oci_execute_segfault.phpt" role="test" /> <file name="old_oci_close1.phpt" role="test" /> <file name="old_oci_close.phpt" role="test" /> @@ -410,6 +416,22 @@ http://pear.php.net/dtd/package-2.0.xsd"> <release> <version> + <release>1.4.6</release> + <api>1.4.6</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP</license> + <notes> + Added oci_client_version() returning the runtime Oracle client library version + Made OCI8 extension buildable with PHP 5.4-development code + </notes> +</release> + +<release> + <version> <release>1.4.5</release> <api>1.4.5</api> </version> diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index 5a5c8d0b7..74704ccf8 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_oci8.h 312535 2011-06-27 17:24:55Z sixd $ */ +/* $Id: php_oci8.h 321634 2012-01-01 13:15:04Z felipe $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_H @@ -46,7 +46,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "1.4.6" +#define PHP_OCI8_VERSION "1.4.7" extern zend_module_entry oci8_module_entry; #define phpext_oci8_ptr &oci8_module_entry diff --git a/ext/oci8/php_oci8_int.h b/ext/oci8/php_oci8_int.h index c88284816..3c2c25de8 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_oci8_int.h 313754 2011-07-27 00:04:23Z sixd $ */ +/* $Id: php_oci8_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H diff --git a/ext/oci8/tests/array_bind_003.phpt b/ext/oci8/tests/array_bind_003.phpt index 94bce02e3..0875c694f 100644 --- a/ext/oci8/tests/array_bind_003.phpt +++ b/ext/oci8/tests/array_bind_003.phpt @@ -62,7 +62,9 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_execute(): OCI_NO_DATA in %s on line %d +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d +ORA-06512: at line %d in %sarray_bind_003.php on line %d array(4) { [0]=> string(9) "06-DEC-05" diff --git a/ext/oci8/tests/array_bind_004.phpt b/ext/oci8/tests/array_bind_004.phpt index 1eb1fc7fa..df74025d7 100644 --- a/ext/oci8/tests/array_bind_004.phpt +++ b/ext/oci8/tests/array_bind_004.phpt @@ -62,7 +62,9 @@ var_dump($array); echo "Done\n"; ?> --EXPECTF-- -Warning: oci_execute(): OCI_NO_DATA in %s on line %d +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at "SYSTEM.ARRAYBINDPKG1", line %d +ORA-06512: at line %d in %sarray_bind_004.php on line %d array(0) { } Done diff --git a/ext/oci8/tests/array_bind_bdouble.phpt b/ext/oci8/tests/array_bind_bdouble.phpt new file mode 100644 index 000000000..1bb95b236 --- /dev/null +++ b/ext/oci8/tests/array_bind_bdouble.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_BDOUBLE +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BDOUBLE); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 22 in %sarray_bind_bdouble.php on line %d +Done diff --git a/ext/oci8/tests/array_bind_bfloat.phpt b/ext/oci8/tests/array_bind_bfloat.phpt new file mode 100644 index 000000000..0b8fad6e6 --- /dev/null +++ b/ext/oci8/tests/array_bind_bfloat.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_BFLOAT +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_BFLOAT); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 21 in %sarray_bind_bfloat.php on line %d +Done diff --git a/ext/oci8/tests/array_bind_uin.phpt b/ext/oci8/tests/array_bind_uin.phpt new file mode 100644 index 000000000..3ce039e0d --- /dev/null +++ b/ext/oci8/tests/array_bind_uin.phpt @@ -0,0 +1,21 @@ +--TEST-- +Unsupported type: oci_bind_array_by_name() and SQLT_UIN +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array = Array(1.243,2.5658,3.4234,4.2123,5.9999); +oci_bind_array_by_name($statement, ":c1", $array, 5, 5, SQLT_UIN); + +echo "Done\n"; +?> +--EXPECTF-- +Warning: oci_bind_array_by_name(): Unknown or unsupported datatype given: 68 in %sarray_bind_uin.php on line %d +Done diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index a668294d4..91fa4b75b 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -4,9 +4,13 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) { + die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases"); + } +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt index 55973a61b..a7feff9f6 100644 --- a/ext/oci8/tests/bind_char_1_11gR1.phpt +++ b/ext/oci8/tests/bind_char_1_11gR1.phpt @@ -4,12 +4,15 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 11\.1\./', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases"); + } } ?> +--ENV-- +NLS_LANG= --FILE-- <?php diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index 53785e066..43661a065 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/ext/oci8/tests/bind_char_2.phpt @@ -4,9 +4,13 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) { + die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases"); + } +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt index 357a716e6..8bb28733f 100644 --- a/ext/oci8/tests/bind_char_2_11gR1.phpt +++ b/ext/oci8/tests/bind_char_2_11gR1.phpt @@ -4,12 +4,15 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases"); + } } ?> +--ENV-- +NLS_LANG= --FILE-- <?php diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt index a459f616b..25115836d 100644 --- a/ext/oci8/tests/bind_char_3.phpt +++ b/ext/oci8/tests/bind_char_3.phpt @@ -4,9 +4,13 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) { + die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases"); + } +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt index 1e7da47ed..4c6241ccf 100644 --- a/ext/oci8/tests/bind_char_3_11gR1.phpt +++ b/ext/oci8/tests/bind_char_3_11gR1.phpt @@ -4,12 +4,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases"); + } } ?> +--ENV-- +NLS_LANG= --FILE-- <?php diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 34d703c52..36765f813 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/ext/oci8/tests/bind_char_4.phpt @@ -4,9 +4,13 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\./', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 2) { + die("skip expected output only valid when using Oracle 10gR2 or 11.2.0.2 databases"); + } +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt index 87b7daba8..14d587885 100644 --- a/ext/oci8/tests/bind_char_4_11gR1.phpt +++ b/ext/oci8/tests/bind_char_4_11gR1.phpt @@ -4,12 +4,15 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 11\.1\./', $sv, $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 11gR1 or 11.2.0.3 databases"); + } } ?> +--ENV-- +NLS_LANG= --FILE-- <?php diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt index 028f5b793..40ab4ebed 100644 --- a/ext/oci8/tests/bug27303_1.phpt +++ b/ext/oci8/tests/bug27303_1.phpt @@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 && + preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases"); + // Other point releases may also work +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> diff --git a/ext/oci8/tests/bug27303_1_11gR1.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index 20097613f..6de9b9937 100644 --- a/ext/oci8/tests/bug27303_1_11gR1.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.1\.0\.6/', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using specific Oracle database versions"); + } + } } ?> --FILE-- diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index e7564ac21..1fb2b3168 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 && + preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases"); + // Other point releases may also work +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt index c2b5c433c..1e3e3105a 100644 --- a/ext/oci8/tests/bug27303_2_11gR1.phpt +++ b/ext/oci8/tests/bug27303_2_11gR1.phpt @@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.1\.0\.6/', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using specific Oracle database versions"); + } + } } ?> --FILE-- diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index 0dcfed913..3137db865 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -4,9 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -if (preg_match('/Release 1[01]\.2\./', oci_server_version($c), $matches) !== 1) { - die("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); -} else if (preg_match('/^11\./', oci_client_version()) != 1) { +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\.0\.2/', oci_server_version($c), $matches) !== 1 && + preg_match('/Release 11\.2\.0\.2/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using Oracle 10.2.0.2 or 11.2.0.2 databases"); + // Other point releases may also work +} +if (preg_match('/^11\./', oci_client_version()) != 1) { die("skip test expected to work only with Oracle 11g or greater version of client"); } ?> @@ -23,10 +27,7 @@ $create_st[] = "drop table mytab"; $create_st[] = "create sequence myseq"; $create_st[] = "create table mytab (mydata varchar2(20), seqcol number)"; -foreach ($create_st as $statement) { - $stmt = oci_parse($c, $statement); - oci_execute($stmt); -} +oci8_test_sql_execute($c, $create_st); define('MYLIMIT', 200); @@ -50,10 +51,7 @@ $drop_st = array(); $drop_st[] = "drop sequence myseq"; $drop_st[] = "drop table mytab"; -foreach ($create_st as $statement) { - $stmt = oci_parse($c, $statement); - oci_execute($stmt); -} +oci8_test_sql_execute($c, $drop_st); echo "Done\n"; ?> diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt index 0c88360be..f9bc2da8a 100644 --- a/ext/oci8/tests/bug27303_4_11gR1.phpt +++ b/ext/oci8/tests/bug27303_4_11gR1.phpt @@ -4,10 +4,13 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); -$sv = oci_server_version($c); -$sv = preg_match('/Release 11\.1\./', $sv, $matches); -if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11gR1 database"); +// The bind buffer size edge cases seem to change each DB version. +if (preg_match('/Release 10\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.1\.0\.6/', oci_server_version($c), $matches) !== 1) { + if (preg_match('/Release 11\.2\.0\.3/', oci_server_version($c), $matches) !== 1) { + die("skip expected output only valid when using specific Oracle database versions"); + } + } } ?> --FILE-- @@ -21,10 +24,7 @@ $create_st[] = "drop table mytab"; $create_st[] = "create sequence myseq"; $create_st[] = "create table mytab (mydata varchar2(20), seqcol number)"; -foreach ($create_st as $statement) { - $stmt = oci_parse($c, $statement); - oci_execute($stmt); -} +oci8_test_sql_execute($c, $create_st); define('MYLIMIT', 200); @@ -48,10 +48,7 @@ $drop_st = array(); $drop_st[] = "drop sequence myseq"; $drop_st[] = "drop table mytab"; -foreach ($create_st as $statement) { - $stmt = oci_parse($c, $statement); - oci_execute($stmt); -} +oci8_test_sql_execute($c, $drop_st); echo "Done\n"; ?> diff --git a/ext/oci8/tests/bug42496_1.phpt b/ext/oci8/tests/bug42496_1.phpt index abf6cc8c7..d430474fa 100644 --- a/ext/oci8/tests/bug42496_1.phpt +++ b/ext/oci8/tests/bug42496_1.phpt @@ -4,7 +4,7 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php @@ -14,11 +14,11 @@ require dirname(__FILE__).'/connect.inc'; // Initialization $stmtarray = array( - "DROP table bug42496_tab", - "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)", - "INSERT INTO bug42496_tab VALUES('test1', 'test1')", - "INSERT INTO bug42496_tab VALUES('test2', 'test2')", - "INSERT INTO bug42496_tab VALUES('test3', 'test3')" + "DROP table bug42496_1_tab", + "CREATE table bug42496_1_tab(c1 CLOB, c2 CLOB)", + "INSERT INTO bug42496_1_tab VALUES('test1', 'test1')", + "INSERT INTO bug42496_1_tab VALUES('test2', 'test2')", + "INSERT INTO bug42496_1_tab VALUES('test3', 'test3')" ); oci8_test_sql_execute($c, $stmtarray); @@ -28,7 +28,7 @@ oci8_test_sql_execute($c, $stmtarray); echo "Test 1\n"; for ($i = 0; $i < 15000; $i++) { - $s = oci_parse($c, "SELECT * from bug42496_tab"); + $s = oci_parse($c, "SELECT * from bug42496_1_tab"); oci_define_by_name($s, "C1", $col1); oci_define_by_name($s, "C2", $col2); if (oci_execute($s)) { @@ -46,7 +46,7 @@ echo "Done\n"; // Cleanup $stmtarray = array( - "DROP table bug42496_tab" + "DROP table bug42496_1_tab" ); oci8_test_sql_execute($c, $stmtarray); diff --git a/ext/oci8/tests/bug42496_2.phpt b/ext/oci8/tests/bug42496_2.phpt index 8c4b79141..71854f3d4 100644 --- a/ext/oci8/tests/bug42496_2.phpt +++ b/ext/oci8/tests/bug42496_2.phpt @@ -4,7 +4,7 @@ Bug #42496 (LOB fetch leaks cursors, eventually failing with ORA-1000 maximum op <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php @@ -14,11 +14,11 @@ require dirname(__FILE__).'/connect.inc'; // Initialization $stmtarray = array( - "DROP table bug42496_tab", - "CREATE table bug42496_tab(c1 CLOB, c2 CLOB)", - "INSERT INTO bug42496_tab VALUES('test1', 'test1')", - "INSERT INTO bug42496_tab VALUES('test2', 'test2')", - "INSERT INTO bug42496_tab VALUES('test3', 'test3')" + "DROP table bug42496_2_tab", + "CREATE table bug42496_2_tab(c1 CLOB, c2 CLOB)", + "INSERT INTO bug42496_2_tab VALUES('test1', 'test1')", + "INSERT INTO bug42496_2_tab VALUES('test2', 'test2')", + "INSERT INTO bug42496_2_tab VALUES('test3', 'test3')" ); oci8_test_sql_execute($c, $stmtarray); @@ -28,7 +28,7 @@ oci8_test_sql_execute($c, $stmtarray); echo "Test 2\n"; for ($i = 0; $i < 15000; $i++) { - $s = oci_parse($c, "SELECT * from bug42496_tab"); + $s = oci_parse($c, "SELECT * from bug42496_2_tab"); if (oci_execute($s)) { $arr = array(); while ($arr = oci_fetch_assoc($s)) { @@ -44,7 +44,7 @@ echo "Done\n"; // Cleanup $stmtarray = array( - "DROP table bug42496_tab" + "DROP table bug42496_2_tab" ); oci8_test_sql_execute($c, $stmtarray); diff --git a/ext/oci8/tests/bug43497.phpt b/ext/oci8/tests/bug43497.phpt index 600fb047b..8c57fabee 100644 --- a/ext/oci8/tests/bug43497.phpt +++ b/ext/oci8/tests/bug43497.phpt @@ -4,7 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (preg_match('/^1[01]\./', oci_client_version()) != 1) { die("skip expected output only valid with Oracle 10g or greater version of client"); } diff --git a/ext/oci8/tests/bug43497_92.phpt b/ext/oci8/tests/bug43497_92.phpt index 932a863d7..d4201257c 100644 --- a/ext/oci8/tests/bug43497_92.phpt +++ b/ext/oci8/tests/bug43497_92.phpt @@ -4,7 +4,7 @@ Bug #43497 (OCI8 XML/getClobVal aka temporary LOBs leak UGA memory) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (preg_match('/Unknown/', oci_client_version()) != 1) { die("skip expected output only valid with Oracle 9gR2 clients"); } diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt index aa4f2bb8e..d44171561 100644 --- a/ext/oci8/tests/bug44113.phpt +++ b/ext/oci8/tests/bug44113.phpt @@ -4,7 +4,7 @@ Bug #44113 (New collection creation can fail with OCI-22303) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/bug47281.phpt b/ext/oci8/tests/bug47281.phpt index 6b94bdef2..d0e002353 100644 --- a/ext/oci8/tests/bug47281.phpt +++ b/ext/oci8/tests/bug47281.phpt @@ -4,6 +4,13 @@ Bug #47281 ($php_errormsg is limited in size of characters) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +// error3.phpt obsoletes this test for newer Oracle client versions +// Assume runtime client version is >= compile time client version +$cv = explode('.', oci_client_version()); +if ($cv[0] > 11 || ($cv[0] == 11 && $cv[1] > 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] >= 3)) { + die("skip test works only with Oracle 11.2.0.2 or earlier Oracle client libraries"); +} + ?> --ENV-- NLS_LANG=.AL32UTF8 diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index b1a22858a..d15b7a38d 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -4,10 +4,10 @@ Set and get of connection attributes with errors. <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (strcasecmp($user, "system") && strcasecmp($user, "sys")) die("skip needs to be run as a DBA user"); if ($test_drcp) die("skip output might vary with DRCP"); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); if (preg_match('/Release (11\.2|12)\./', oci_server_version($c), $matches) !== 1) { // Bug fixed in 11.2 prevents client_info being rest diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 4c07e636e..0f03c3a65 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -9,10 +9,6 @@ * greater, and $dbase should be set to the tnsnames.ora entry * corresponding to the POOLED server instance or an Easy Connect * string like hostname:port/service_name:POOLED - * - * Set $stress_test to TRUE if you want to run some longer/slower/more - * memory intensive tests. External configuration such as increasing - * the timeout of run-tests.php may also be needed. */ if (file_exists(dirname(__FILE__)."/details_local.inc")) { @@ -23,23 +19,16 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) { $password = getenv('PHP_OCI8_TEST_PASS'); // Password for $user $dbase = getenv('PHP_OCI8_TEST_DB'); // Database connection string $test_drcp = getenv('PHP_OCI8_TEST_DRCP'); - $stress_test = getenv('PHP_OCI8_STRESS_TEST'); if (false !== $test_drcp && 0 == strcasecmp($test_drcp,'TRUE')) { $test_drcp = TRUE; } else { $test_drcp = FALSE; } - if (false !== $stress_test && 0 == strcasecmp($stress_test,'TRUE')) { - $stress_test = TRUE; - } else { - $stress_test = FALSE; - } } else { $user = "system"; $password = "oracle"; $dbase = "localhost/XE"; $test_drcp = FALSE; - $stress_test = FALSE; } /* diff --git a/ext/oci8/tests/error2.phpt b/ext/oci8/tests/error2.phpt index 12eab61a6..48f21f440 100644 --- a/ext/oci8/tests/error2.phpt +++ b/ext/oci8/tests/error2.phpt @@ -4,7 +4,7 @@ Exercise error code for SUCCESS_WITH_INFO <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/error3.phpt b/ext/oci8/tests/error3.phpt new file mode 100644 index 000000000..8540db250 --- /dev/null +++ b/ext/oci8/tests/error3.phpt @@ -0,0 +1,40 @@ +--TEST-- +Maximum Oracle error length +--SKIPIF-- +<?php +$target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs +require(dirname(__FILE__).'/skipif.inc'); +// Assume runtime client version is >= compile time client version +$cv = explode('.', oci_client_version()); +if ($cv[0] < 11 || ($cv[0] == 11 && $cv[1] < 2) || ($cv[0] == 11 && $cv[1] == 2 && $cv[3] < 3)) { + die("skip test works only with Oracle 11.2.0.3 or greater version of Oracle client libraries"); +} +?> +--INI-- +log_errors_max_len=4096 +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +echo "Test 1\n"; + +error_reporting(E_ALL); + +$s = oci_parse($c, "declare +s varchar2(4000); +begin +s := 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBabcdefghBBBBBBBBCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC'; +raise_application_error(-20333, s); +end;"); + +oci_execute($s); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Test 1 + +Warning: oci_execute(): ORA-20333: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBab in %serror3.php on line %d +===DONE=== diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 993198c4d..37f8f3834 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -5,7 +5,7 @@ Test External Authentication errors with oci_connect if (!extension_loaded('oci8')) die ("skip no oci8 extension"); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); require(dirname(__FILE__).'/details.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index d3bee0bfc..f3b517f73 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -3,9 +3,8 @@ Test External Authentication errors with oci_new_connect --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); -require(dirname(__FILE__).'/details.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index e159c50f9..e6685eb17 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -3,9 +3,8 @@ Test External Authentication errors with oci_pconnect --SKIPIF-- <?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (substr(PHP_OS, 0, 3) == 'WIN') die("skip feature not available on Windows platforms"); -require(dirname(__FILE__).'/details.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index ade79a200..4cd159510 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -4,7 +4,7 @@ Bug #49560 (LOB resource destructor and refcount test) <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --FILE-- <?php diff --git a/ext/oci8/tests/password_new.phpt b/ext/oci8/tests/password_new.phpt index 8041699f9..c218d904f 100644 --- a/ext/oci8/tests/password_new.phpt +++ b/ext/oci8/tests/password_new.phpt @@ -17,6 +17,10 @@ if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 && --FILE-- <?php +// This test will diff if either the client or the server is 11.2.0.3 +// (or greater) and the other is 11.2.0.2 (or earlier). Both client +// and server must be upgraded at the same time. + require dirname(__FILE__)."/connect.inc"; $new_password = "test"; diff --git a/ext/oci8/tests/password_old.phpt b/ext/oci8/tests/password_old.phpt index 3ff726d2b..fdbb1f9e8 100644 --- a/ext/oci8/tests/password_old.phpt +++ b/ext/oci8/tests/password_old.phpt @@ -19,6 +19,10 @@ if (preg_match('/Release (11|12)\./', oci_server_version($c), $matches) === 1 && --FILE-- <?php +// This test will diff if either the client or the server is 11.2.0.3 +// (or greater) and the other is 11.2.0.2 (or earlier). Both client +// and server must be upgraded at the same time. + require dirname(__FILE__)."/connect.inc"; $new_password = "test"; diff --git a/ext/oci8/tests/pecl_bug10194.phpt b/ext/oci8/tests/pecl_bug10194.phpt index 6a9044b1a..9947e15db 100644 --- a/ext/oci8/tests/pecl_bug10194.phpt +++ b/ext/oci8/tests/pecl_bug10194.phpt @@ -4,7 +4,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); -if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- memory_limit=10M diff --git a/ext/oci8/tests/pecl_bug10194_blob.phpt b/ext/oci8/tests/pecl_bug10194_blob.phpt index 75632ce47..faf87ab3c 100644 --- a/ext/oci8/tests/pecl_bug10194_blob.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob.phpt @@ -5,7 +5,7 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on these DBs require(dirname(__FILE__).'/skipif.inc'); if (PHP_INT_SIZE != 4) die("skip this test is for 32bit platforms only"); -if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); ?> --INI-- memory_limit=3M diff --git a/ext/oci8/tests/pecl_bug10194_blob_64.phpt b/ext/oci8/tests/pecl_bug10194_blob_64.phpt index da7ec592f..45788a41b 100644 --- a/ext/oci8/tests/pecl_bug10194_blob_64.phpt +++ b/ext/oci8/tests/pecl_bug10194_blob_64.phpt @@ -4,8 +4,8 @@ PECL Bug #10194 (segfault in Instant Client when memory_limit is reached inside <?php $target_dbs = array('oracledb' => true, 'timesten' => false); // test runs on thes require(dirname(__FILE__).'/skipif.inc'); +if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request'); if (PHP_INT_SIZE != 8) die("skip this test is for 64bit platforms only"); -if ($stress_test !== true) die ('skip Test not run when $stress_test is FALSE'); ?> --INI-- memory_limit=6M diff --git a/ext/oci8/tests/pecl_bug16035.phpt b/ext/oci8/tests/pecl_bug16035.phpt index 29ff6439d..ddd0038de 100644 --- a/ext/oci8/tests/pecl_bug16035.phpt +++ b/ext/oci8/tests/pecl_bug16035.phpt @@ -10,6 +10,9 @@ $ov = preg_match('/Compile-time ORACLE_HOME/', $phpinfo); if ($ov !== 1) { die ("skip Test only valid when OCI8 is built with an ORACLE_HOME"); } +if (preg_match('/Unknown/', oci_client_version()) == 1) { + die("skip expected output only valid with Oracle clients > 9gR2"); +} ?> --ENV-- ORACLE_HOME="" diff --git a/ext/oci8/tests/pecl_bug16842.phpt b/ext/oci8/tests/pecl_bug16842.phpt index dbf7e6bb8..ca24d0d27 100644 --- a/ext/oci8/tests/pecl_bug16842.phpt +++ b/ext/oci8/tests/pecl_bug16842.phpt @@ -39,7 +39,8 @@ oci_close($c); Test 1 Raises NO_DATA_FOUND -Warning: oci_execute(): OCI_NO_DATA in %s on line 11 +Warning: oci_execute(): ORA-01403: %s +ORA-06512: at line %d in %specl_bug16842.php on line %d bool(false) array(4) { ["code"]=> diff --git a/ext/odbc/birdstep.c b/ext/odbc/birdstep.c index 65d22fcb1..0c6bae423 100644 --- a/ext/odbc/birdstep.c +++ b/ext/odbc/birdstep.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: birdstep.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: birdstep.c 321634 2012-01-01 13:15:04Z felipe $ */ /* * TODO: diff --git a/ext/odbc/php_birdstep.h b/ext/odbc/php_birdstep.h index 7748d8af0..e1422646e 100644 --- a/ext/odbc/php_birdstep.h +++ b/ext/odbc/php_birdstep.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_birdstep.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_birdstep.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_BIRDSTEP_H #define PHP_BIRDSTEP_H diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 70d15e344..2716bdf49 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: php_odbc.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/odbc/php_odbc.h b/ext/odbc/php_odbc.h index fb426ebea..0a966ebdd 100644 --- a/ext/odbc/php_odbc.h +++ b/ext/odbc/php_odbc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_odbc.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ODBC_H #define PHP_ODBC_H diff --git a/ext/odbc/php_odbc_includes.h b/ext/odbc/php_odbc_includes.h index c30528647..197331217 100644 --- a/ext/odbc/php_odbc_includes.h +++ b/ext/odbc/php_odbc_includes.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc_includes.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_odbc_includes.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ODBC_INCLUDES_H #define PHP_ODBC_INCLUDES_H diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index ce96c645d..bf68e982f 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: openssl.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -4713,7 +4713,9 @@ PHP_FUNCTION(openssl_encrypt) EVP_CIPHER_CTX_set_key_length(&cipher_ctx, password_len); } EVP_EncryptInit_ex(&cipher_ctx, NULL, NULL, key, (unsigned char *)iv); - EVP_EncryptUpdate(&cipher_ctx, outbuf, &i, (unsigned char *)data, data_len); + if (data_len > 0) { + EVP_EncryptUpdate(&cipher_ctx, outbuf, &i, (unsigned char *)data, data_len); + } outlen = i; if (EVP_EncryptFinal(&cipher_ctx, (unsigned char *)outbuf + i, &i)) { outlen += i; diff --git a/ext/openssl/php_openssl.h b/ext/openssl/php_openssl.h index 0d15f41f8..19193d8b7 100644 --- a/ext/openssl/php_openssl.h +++ b/ext/openssl/php_openssl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_openssl.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_openssl.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_OPENSSL_H #define PHP_OPENSSL_H diff --git a/ext/openssl/tests/bug36732.phpt b/ext/openssl/tests/bug36732.phpt index 290c9e95e..ec8fedb9d 100644 --- a/ext/openssl/tests/bug36732.phpt +++ b/ext/openssl/tests/bug36732.phpt @@ -9,7 +9,8 @@ if (OPENSSL_VERSION_NUMBER < 0x009070af) die("skip"); <?php $configargs = array( "req_extensions" => "v3_req", - "x509_extensions" => "usr_cert" + "x509_extensions" => "usr_cert", + "config" => __DIR__."/openssl.cnf", ); $dn = array( diff --git a/ext/openssl/tests/bug54992.phpt b/ext/openssl/tests/bug54992.phpt index d3a06310e..768b07378 100644 --- a/ext/openssl/tests/bug54992.phpt +++ b/ext/openssl/tests/bug54992.phpt @@ -8,7 +8,7 @@ if (!function_exists('pcntl_fork')) die("skip no fork"); <?php $context = stream_context_create(); -stream_context_set_option($context, 'ssl', 'local_cert', "./bug54992.pem"); +stream_context_set_option($context, 'ssl', 'local_cert', __DIR__ . "/bug54992.pem"); stream_context_set_option($context, 'ssl', 'allow_self_signed', true); $server = stream_socket_server('ssl://127.0.0.1:64321', $errno, $errstr, STREAM_SERVER_BIND|STREAM_SERVER_LISTEN, $context); @@ -22,7 +22,7 @@ if ($pid == -1) { array( 'ssl' => array( 'verify_peer' => true, - 'cafile' => 'bug54992-ca.pem', + 'cafile' => __DIR__ . '/bug54992-ca.pem', 'CN_match' => 'buga_buga', ) ) diff --git a/ext/openssl/tests/openssl.cnf b/ext/openssl/tests/openssl.cnf new file mode 100644 index 000000000..10e69076c --- /dev/null +++ b/ext/openssl/tests/openssl.cnf @@ -0,0 +1,43 @@ +[ req ] +default_bits = 1024 +default_keyfile = privkey.pem +distinguished_name = req_distinguished_name +attributes = req_attributes +x509_extensions = v3_ca # The extentions to add to the self signed cert +string_mask = MASK:4294967295 + + +[ req_distinguished_name ] +countryName = Country Name (2 letter code) +countryName_default = AU +countryName_min = 2 +countryName_max = 2 +stateOrProvinceName = State or Province Name (full name) +stateOrProvinceName_default = Some-State +localityName = Locality Name (eg, city) +0.organizationName = Organization Name (eg, company) +0.organizationName_default = Internet Widgits Pty Ltd +organizationalUnitName = Organizational Unit Name (eg, section) +commonName = Common Name (eg, YOUR name) +commonName_max = 64 +emailAddress = Email Address +emailAddress_max = 64 + +[ req_attributes ] +challengePassword = A challenge password +challengePassword_min = 4 +challengePassword_max = 20 +unstructuredName = An optional company name + +[ v3_req ] +basicConstraints = CA:FALSE +keyUsage = nonRepudiation, digitalSignature, keyEncipherment + +[ v3_ca ] +subjectKeyIdentifier=hash +authorityKeyIdentifier=keyid:always,issuer:always +basicConstraints = CA:true + +[ usr_cert ] +basicConstraints=CA:FALSE + diff --git a/ext/openssl/tests/openssl_encrypt_crash.phpt b/ext/openssl/tests/openssl_encrypt_crash.phpt new file mode 100644 index 000000000..b88782b0b --- /dev/null +++ b/ext/openssl/tests/openssl_encrypt_crash.phpt @@ -0,0 +1,13 @@ +--TEST-- +openssl_encrypt() crash with old OpenSSL +--SKIPIF-- +<?php if (!extension_loaded("openssl")) print "skip"; ?> +--FILE-- +<?php +openssl_encrypt('', 'AES-128-CBC', 'foo'); +var_dump("done"); +?> +--EXPECTF-- + +Warning: openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended in %s on line %d +string(4) "done"
\ No newline at end of file diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 0cc04cbe7..c349b540e 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_ssl.c 315339 2011-08-23 08:12:58Z johannes $ */ +/* $Id: xp_ssl.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "ext/standard/file.h" @@ -406,6 +406,8 @@ static inline int php_openssl_setup_crypto(php_stream *stream, if (cparam->inputs.session) { if (cparam->inputs.session->ops != &php_openssl_socket_ops) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "supplied session stream must be an SSL enabled stream"); + } else if (((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "supplied SSL session stream is not initialized"); } else { SSL_copy_session_id(sslsock->ssl_handle, ((php_openssl_netstream_data_t*)cparam->inputs.session->abstract)->ssl_handle); } diff --git a/ext/pcntl/config.m4 b/ext/pcntl/config.m4 index ea26eb149..014dfc441 100644 --- a/ext/pcntl/config.m4 +++ b/ext/pcntl/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 264390 2008-08-07 13:11:05Z tony2001 $ +dnl $Id: config.m4 316353 2011-09-07 13:47:31Z bjori $ dnl PHP_ARG_ENABLE(pcntl, whether to enable pcntl support, @@ -7,7 +7,7 @@ PHP_ARG_ENABLE(pcntl, whether to enable pcntl support, if test "$PHP_PCNTL" != "no"; then AC_CHECK_FUNCS(fork, [ AC_DEFINE(HAVE_FORK,1,[ ]) ], [ AC_MSG_ERROR(pcntl: fork() not supported by this platform) ]) - AC_CHECK_FUNCS(waitpid, [ AC_DEFINE(HAVE_WAITPID,1,[ ]) ], [ AC_MSG_ERROR(pcntl: fork() not supported by this platform) ]) + AC_CHECK_FUNCS(waitpid, [ AC_DEFINE(HAVE_WAITPID,1,[ ]) ], [ AC_MSG_ERROR(pcntl: waitpid() not supported by this platform) ]) AC_CHECK_FUNCS(sigaction, [ AC_DEFINE(HAVE_SIGACTION,1,[ ]) ], [ AC_MSG_ERROR(pcntl: sigaction() not supported by this platform) ]) AC_CHECK_FUNCS([getpriority setpriority wait3 sigprocmask sigwaitinfo sigtimedwait]) PHP_NEW_EXTENSION(pcntl, pcntl.c php_signal.c, $ext_shared, cli) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index ad8c29ed9..a6e629e03 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pcntl.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: pcntl.c 321634 2012-01-01 13:15:04Z felipe $ */ #define PCNTL_DEBUG 0 diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index de63aa658..e5f824c2f 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcntl.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pcntl.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PCNTL_H #define PHP_PCNTL_H diff --git a/ext/pcntl/php_signal.c b/ext/pcntl/php_signal.c index 9ba68a746..348503bae 100644 --- a/ext/pcntl/php_signal.c +++ b/ext/pcntl/php_signal.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_signal.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_signal.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_signal.h" diff --git a/ext/pcntl/php_signal.h b/ext/pcntl/php_signal.h index 2f89f847c..2e33e7f70 100644 --- a/ext/pcntl/php_signal.h +++ b/ext/pcntl/php_signal.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_signal.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_signal.h 321634 2012-01-01 13:15:04Z felipe $ */ #include <signal.h> #ifndef PHP_SIGNAL_H diff --git a/ext/pcre/php_pcre.c b/ext/pcre/php_pcre.c index 6c616ec20..c5b68647b 100644 --- a/ext/pcre/php_pcre.c +++ b/ext/pcre/php_pcre.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c 314349 2011-08-05 22:39:40Z rasmus $ */ +/* $Id: php_pcre.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_ini.h" diff --git a/ext/pcre/php_pcre.h b/ext/pcre/php_pcre.h index 9ca7f7964..9ef325fb0 100644 --- a/ext/pcre/php_pcre.h +++ b/ext/pcre/php_pcre.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pcre.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PCRE_H #define PHP_PCRE_H diff --git a/ext/pcre/tests/006.phpt b/ext/pcre/tests/006.phpt index d1282bf42..2d39b6ea3 100644 --- a/ext/pcre/tests/006.phpt +++ b/ext/pcre/tests/006.phpt @@ -1,5 +1,7 @@ --TEST-- preg_replace() with array of failing regular expressions +--INI-- +pcre.backtrack_limit=100000 --FILE-- <?php diff --git a/ext/pdo/pdo.c b/ext/pdo/pdo.c index e2947df0a..3a167e33d 100755 --- a/ext/pdo/pdo.c +++ b/ext/pdo/pdo.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo.c 314450 2011-08-07 23:46:00Z iliaa $ */ +/* $Id: pdo.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index 5adb15833..4980e194e 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dbh.c 314450 2011-08-07 23:46:00Z iliaa $ */ +/* $Id: pdo_dbh.c 321634 2012-01-01 13:15:04Z felipe $ */ /* The PDO Database Handle Class */ diff --git a/ext/pdo/pdo_sql_parser.c b/ext/pdo/pdo_sql_parser.c index 1fa56e50b..4609dff9d 100644 --- a/ext/pdo/pdo_sql_parser.c +++ b/ext/pdo/pdo_sql_parser.c @@ -3,7 +3,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sql_parser.c 311812 2011-06-04 22:54:40Z felipe $ */ +/* $Id: pdo_sql_parser.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_pdo_driver.h" diff --git a/ext/pdo/pdo_sql_parser.c.orig b/ext/pdo/pdo_sql_parser.c.orig deleted file mode 100644 index c6e8b0787..000000000 --- a/ext/pdo/pdo_sql_parser.c.orig +++ /dev/null @@ -1,876 +0,0 @@ -/* Generated by re2c 0.13.5 on Sat Jun 4 18:42:25 2011 */ -#line 1 "ext/pdo/pdo_sql_parser.re" -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: George Schlossnagle <george@omniti.com> | - +----------------------------------------------------------------------+ -*/ - -/* $Id: pdo_sql_parser.c 311812 2011-06-04 22:54:40Z felipe $ */ - -#include "php.h" -#include "php_pdo_driver.h" -#include "php_pdo_int.h" - -#define PDO_PARSER_TEXT 1 -#define PDO_PARSER_BIND 2 -#define PDO_PARSER_BIND_POS 3 -#define PDO_PARSER_EOI 4 - -#define RET(i) {s->cur = cursor; return i; } -#define SKIP_ONE(i) {s->cur = s->tok + 1; return i; } - -#define YYCTYPE unsigned char -#define YYCURSOR cursor -#define YYLIMIT cursor -#define YYMARKER s->ptr -#define YYFILL(n) - -typedef struct Scanner { - char *ptr, *cur, *tok; -} Scanner; - -static int scan(Scanner *s) -{ - char *cursor = s->cur; - - s->tok = cursor; - #line 56 "ext/pdo/pdo_sql_parser.re" - - - -#line 55 "ext/pdo/pdo_sql_parser.c" -{ - YYCTYPE yych; - unsigned int yyaccept = 0; - - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - switch (yych) { - case 0x00: goto yy13; - case '"': goto yy2; - case '\'': goto yy4; - case '-': goto yy10; - case '/': goto yy8; - case ':': goto yy5; - case '?': goto yy6; - default: goto yy11; - } -yy2: - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych >= 0x01) goto yy43; -yy3: -#line 64 "ext/pdo/pdo_sql_parser.re" - { SKIP_ONE(PDO_PARSER_TEXT); } -#line 79 "ext/pdo/pdo_sql_parser.c" -yy4: - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x00) goto yy3; - goto yy37; -yy5: - yych = *++YYCURSOR; - switch (yych) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case '_': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy33; - case ':': - case '?': goto yy30; - default: goto yy3; - } -yy6: - ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case ':': - case '?': goto yy30; - default: goto yy7; - } -yy7: -#line 63 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_BIND_POS); } -#line 165 "ext/pdo/pdo_sql_parser.c" -yy8: - ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '*': goto yy20; - default: goto yy12; - } -yy9: -#line 66 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_TEXT); } -#line 175 "ext/pdo/pdo_sql_parser.c" -yy10: - yych = *++YYCURSOR; - switch (yych) { - case '-': goto yy15; - default: goto yy12; - } -yy11: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy12: - switch (yych) { - case 0x00: - case '"': - case '\'': - case ':': - case '?': goto yy9; - default: goto yy11; - } -yy13: - ++YYCURSOR; -#line 67 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_EOI); } -#line 199 "ext/pdo/pdo_sql_parser.c" -yy15: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case 0x00: - case '"': - case '\'': - case ':': - case '?': goto yy18; - case '\n': - case '\r': goto yy11; - default: goto yy15; - } -yy17: -#line 65 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_TEXT); } -#line 217 "ext/pdo/pdo_sql_parser.c" -yy18: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case '\n': - case '\r': goto yy17; - default: goto yy18; - } -yy20: - yyaccept = 1; - YYMARKER = ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case 0x00: - case '"': - case '\'': - case ':': - case '?': goto yy22; - case '*': goto yy24; - default: goto yy20; - } -yy22: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case '*': goto yy27; - default: goto yy22; - } -yy24: - yyaccept = 1; - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - switch (yych) { - case 0x00: - case '"': - case '\'': - case ':': - case '?': goto yy22; - case '*': goto yy24; - case '/': goto yy26; - default: goto yy20; - } -yy26: - yych = *++YYCURSOR; - switch (yych) { - case 0x00: - case '"': - case '\'': - case ':': - case '?': goto yy17; - default: goto yy11; - } -yy27: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case '*': goto yy27; - case '/': goto yy29; - default: goto yy22; - } -yy29: - yych = *++YYCURSOR; - goto yy17; -yy30: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case ':': - case '?': goto yy30; - default: goto yy32; - } -yy32: -#line 61 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_TEXT); } -#line 298 "ext/pdo/pdo_sql_parser.c" -yy33: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - switch (yych) { - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case 'A': - case 'B': - case 'C': - case 'D': - case 'E': - case 'F': - case 'G': - case 'H': - case 'I': - case 'J': - case 'K': - case 'L': - case 'M': - case 'N': - case 'O': - case 'P': - case 'Q': - case 'R': - case 'S': - case 'T': - case 'U': - case 'V': - case 'W': - case 'X': - case 'Y': - case 'Z': - case '_': - case 'a': - case 'b': - case 'c': - case 'd': - case 'e': - case 'f': - case 'g': - case 'h': - case 'i': - case 'j': - case 'k': - case 'l': - case 'm': - case 'n': - case 'o': - case 'p': - case 'q': - case 'r': - case 's': - case 't': - case 'u': - case 'v': - case 'w': - case 'x': - case 'y': - case 'z': goto yy33; - default: goto yy35; - } -yy35: -#line 62 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_BIND); } -#line 372 "ext/pdo/pdo_sql_parser.c" -yy36: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy37: - switch (yych) { - case 0x00: goto yy38; - case '\'': goto yy40; - case '\\': goto yy39; - default: goto yy36; - } -yy38: - YYCURSOR = YYMARKER; - switch (yyaccept) { - case 0: goto yy3; - case 1: goto yy9; - } -yy39: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= 0x00) goto yy38; - goto yy36; -yy40: - ++YYCURSOR; -#line 60 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_TEXT); } -#line 400 "ext/pdo/pdo_sql_parser.c" -yy42: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy43: - switch (yych) { - case 0x00: goto yy38; - case '"': goto yy45; - case '\\': goto yy44; - default: goto yy42; - } -yy44: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= 0x00) goto yy38; - goto yy42; -yy45: - ++YYCURSOR; -#line 59 "ext/pdo/pdo_sql_parser.re" - { RET(PDO_PARSER_TEXT); } -#line 422 "ext/pdo/pdo_sql_parser.c" -} -#line 68 "ext/pdo/pdo_sql_parser.re" - -} - -struct placeholder { - char *pos; - int len; - int bindno; - int qlen; /* quoted length of value */ - char *quoted; /* quoted value */ - int freeq; - struct placeholder *next; -}; - -PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, - char **outquery, int *outquery_len TSRMLS_DC) -{ - Scanner s; - char *ptr, *newbuffer; - int t; - int bindno = 0; - int ret = 0; - int newbuffer_len; - HashTable *params; - struct pdo_bound_param_data *param; - int query_type = PDO_PLACEHOLDER_NONE; - struct placeholder *placeholders = NULL, *placetail = NULL, *plc = NULL; - - ptr = *outquery; - s.cur = inquery; - - /* phase 1: look for args */ - while((t = scan(&s)) != PDO_PARSER_EOI) { - if (t == PDO_PARSER_BIND || t == PDO_PARSER_BIND_POS) { - if (t == PDO_PARSER_BIND) { - int len = s.cur - s.tok; - if ((inquery < (s.cur - len)) && isalnum(*(s.cur - len - 1))) { - continue; - } - query_type |= PDO_PLACEHOLDER_NAMED; - } else { - query_type |= PDO_PLACEHOLDER_POSITIONAL; - } - - plc = emalloc(sizeof(*plc)); - memset(plc, 0, sizeof(*plc)); - plc->next = NULL; - plc->pos = s.tok; - plc->len = s.cur - s.tok; - plc->bindno = bindno++; - - if (placetail) { - placetail->next = plc; - } else { - placeholders = plc; - } - placetail = plc; - } - } - - if (bindno == 0) { - /* nothing to do; good! */ - return 0; - } - - /* did the query make sense to me? */ - if (query_type == (PDO_PLACEHOLDER_NAMED|PDO_PLACEHOLDER_POSITIONAL)) { - /* they mixed both types; punt */ - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "mixed named and positional parameters" TSRMLS_CC); - ret = -1; - goto clean_up; - } - - if (stmt->supports_placeholders == query_type && !stmt->named_rewrite_template) { - /* query matches native syntax */ - ret = 0; - goto clean_up; - } - - if (stmt->named_rewrite_template) { - /* magic/hack. - * We we pretend that the query was positional even if - * it was named so that we fall into the - * named rewrite case below. Not too pretty, - * but it works. */ - query_type = PDO_PLACEHOLDER_POSITIONAL; - } - - params = stmt->bound_params; - - /* Do we have placeholders but no bound params */ - if (bindno && !params && stmt->supports_placeholders == PDO_PLACEHOLDER_NONE) { - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "no parameters were bound" TSRMLS_CC); - ret = -1; - goto clean_up; - } - - if (params && bindno != zend_hash_num_elements(params) && stmt->supports_placeholders == PDO_PLACEHOLDER_NONE) { - /* extra bit of validation for instances when same params are bound more then once */ - if (query_type != PDO_PLACEHOLDER_POSITIONAL && bindno > zend_hash_num_elements(params)) { - int ok = 1; - for (plc = placeholders; plc; plc = plc->next) { - if (zend_hash_find(params, plc->pos, plc->len, (void**) ¶m) == FAILURE) { - ok = 0; - break; - } - } - if (ok) { - goto safe; - } - } - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "number of bound variables does not match number of tokens" TSRMLS_CC); - ret = -1; - goto clean_up; - } -safe: - /* what are we going to do ? */ - if (stmt->supports_placeholders == PDO_PLACEHOLDER_NONE) { - /* query generation */ - - newbuffer_len = inquery_len; - - /* let's quote all the values */ - for (plc = placeholders; plc; plc = plc->next) { - if (query_type == PDO_PLACEHOLDER_POSITIONAL) { - ret = zend_hash_index_find(params, plc->bindno, (void**) ¶m); - } else { - ret = zend_hash_find(params, plc->pos, plc->len, (void**) ¶m); - } - if (ret == FAILURE) { - /* parameter was not defined */ - ret = -1; - pdo_raise_impl_error(stmt->dbh, stmt, "HY093", "parameter was not defined" TSRMLS_CC); - goto clean_up; - } - if (stmt->dbh->methods->quoter) { - if (param->param_type == PDO_PARAM_LOB && Z_TYPE_P(param->parameter) == IS_RESOURCE) { - php_stream *stm; - - php_stream_from_zval_no_verify(stm, ¶m->parameter); - if (stm) { - size_t len; - char *buf = NULL; - - len = php_stream_copy_to_mem(stm, &buf, PHP_STREAM_COPY_ALL, 0); - if (!stmt->dbh->methods->quoter(stmt->dbh, buf, len, &plc->quoted, &plc->qlen, - param->param_type TSRMLS_CC)) { - /* bork */ - ret = -1; - strcpy(stmt->error_code, stmt->dbh->error_code); - if (buf) { - efree(buf); - } - goto clean_up; - } - if (buf) { - efree(buf); - } - } else { - pdo_raise_impl_error(stmt->dbh, stmt, "HY105", "Expected a stream resource" TSRMLS_CC); - ret = -1; - goto clean_up; - } - plc->freeq = 1; - } else { - switch (Z_TYPE_P(param->parameter)) { - case IS_NULL: - plc->quoted = "NULL"; - plc->qlen = sizeof("NULL")-1; - plc->freeq = 0; - break; - - case IS_LONG: - case IS_DOUBLE: - convert_to_string(param->parameter); - plc->qlen = Z_STRLEN_P(param->parameter); - plc->quoted = Z_STRVAL_P(param->parameter); - plc->freeq = 0; - break; - - case IS_BOOL: - convert_to_long(param->parameter); - default: - convert_to_string(param->parameter); - if (!stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter), - Z_STRLEN_P(param->parameter), &plc->quoted, &plc->qlen, - param->param_type TSRMLS_CC)) { - /* bork */ - ret = -1; - strcpy(stmt->error_code, stmt->dbh->error_code); - goto clean_up; - } - plc->freeq = 1; - } - } - } else { - plc->quoted = Z_STRVAL_P(param->parameter); - plc->qlen = Z_STRLEN_P(param->parameter); - } - newbuffer_len += plc->qlen; - } - -rewrite: - /* allocate output buffer */ - newbuffer = emalloc(newbuffer_len + 1); - *outquery = newbuffer; - - /* and build the query */ - plc = placeholders; - ptr = inquery; - - do { - t = plc->pos - ptr; - if (t) { - memcpy(newbuffer, ptr, t); - newbuffer += t; - } - memcpy(newbuffer, plc->quoted, plc->qlen); - newbuffer += plc->qlen; - ptr = plc->pos + plc->len; - - plc = plc->next; - } while (plc); - - t = (inquery + inquery_len) - ptr; - if (t) { - memcpy(newbuffer, ptr, t); - newbuffer += t; - } - *newbuffer = '\0'; - *outquery_len = newbuffer - *outquery; - - ret = 1; - goto clean_up; - - } else if (query_type == PDO_PLACEHOLDER_POSITIONAL) { - /* rewrite ? to :pdoX */ - char *name, *idxbuf; - const char *tmpl = stmt->named_rewrite_template ? stmt->named_rewrite_template : ":pdo%d"; - int bind_no = 1; - - newbuffer_len = inquery_len; - - if (stmt->bound_param_map == NULL) { - ALLOC_HASHTABLE(stmt->bound_param_map); - zend_hash_init(stmt->bound_param_map, 13, NULL, NULL, 0); - } - - for (plc = placeholders; plc; plc = plc->next) { - int skip_map = 0; - char *p; - name = estrndup(plc->pos, plc->len); - - /* check if bound parameter is already available */ - if (!strcmp(name, "?") || zend_hash_find(stmt->bound_param_map, name, plc->len + 1, (void**) &p) == FAILURE) { - spprintf(&idxbuf, 0, tmpl, bind_no++); - } else { - idxbuf = estrdup(p); - skip_map = 1; - } - - plc->quoted = idxbuf; - plc->qlen = strlen(plc->quoted); - plc->freeq = 1; - newbuffer_len += plc->qlen; - - if (!skip_map && stmt->named_rewrite_template) { - /* create a mapping */ - zend_hash_update(stmt->bound_param_map, name, plc->len + 1, idxbuf, plc->qlen + 1, NULL); - } - - /* map number to name */ - zend_hash_index_update(stmt->bound_param_map, plc->bindno, idxbuf, plc->qlen + 1, NULL); - - efree(name); - } - - goto rewrite; - - } else { - /* rewrite :name to ? */ - - newbuffer_len = inquery_len; - - if (stmt->bound_param_map == NULL) { - ALLOC_HASHTABLE(stmt->bound_param_map); - zend_hash_init(stmt->bound_param_map, 13, NULL, NULL, 0); - } - - for (plc = placeholders; plc; plc = plc->next) { - char *name; - - name = estrndup(plc->pos, plc->len); - zend_hash_index_update(stmt->bound_param_map, plc->bindno, name, plc->len + 1, NULL); - efree(name); - plc->quoted = "?"; - plc->qlen = 1; - } - - goto rewrite; - } - -clean_up: - - while (placeholders) { - plc = placeholders; - placeholders = plc->next; - - if (plc->freeq) { - efree(plc->quoted); - } - - efree(plc); - } - - return ret; -} - -#if 0 -int old_pdo_parse_params(pdo_stmt_t *stmt, char *inquery, int inquery_len, char **outquery, - int *outquery_len TSRMLS_DC) -{ - Scanner s; - char *ptr; - int t; - int bindno = 0; - int newbuffer_len; - int padding; - HashTable *params = stmt->bound_params; - struct pdo_bound_param_data *param; - /* allocate buffer for query with expanded binds, ptr is our writing pointer */ - newbuffer_len = inquery_len; - - /* calculate the possible padding factor due to quoting */ - if(stmt->dbh->max_escaped_char_length) { - padding = stmt->dbh->max_escaped_char_length; - } else { - padding = 3; - } - if(params) { - zend_hash_internal_pointer_reset(params); - while (SUCCESS == zend_hash_get_current_data(params, (void**)¶m)) { - if(param->parameter) { - convert_to_string(param->parameter); - /* accomodate a string that needs to be fully quoted - bind placeholders are at least 2 characters, so - the accomodate their own "'s - */ - newbuffer_len += padding * Z_STRLEN_P(param->parameter); - } - zend_hash_move_forward(params); - } - } - *outquery = (char *) emalloc(newbuffer_len + 1); - *outquery_len = 0; - - ptr = *outquery; - s.cur = inquery; - while((t = scan(&s)) != PDO_PARSER_EOI) { - if(t == PDO_PARSER_TEXT) { - memcpy(ptr, s.tok, s.cur - s.tok); - ptr += (s.cur - s.tok); - *outquery_len += (s.cur - s.tok); - } - else if(t == PDO_PARSER_BIND) { - if(!params) { - /* error */ - efree(*outquery); - *outquery = NULL; - return (int) (s.cur - inquery); - } - /* lookup bind first via hash and then index */ - /* stupid keys need to be null-terminated, even though we know their length */ - if((SUCCESS == zend_hash_find(params, s.tok, s.cur-s.tok,(void **)¶m)) - || - (SUCCESS == zend_hash_index_find(params, bindno, (void **)¶m))) - { - char *quotedstr; - int quotedstrlen; - /* restore the in-string key, doesn't need null-termination here */ - /* currently everything is a string here */ - - /* quote the bind value if necessary */ - if(stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter), - Z_STRLEN_P(param->parameter), "edstr, "edstrlen TSRMLS_CC)) - { - memcpy(ptr, quotedstr, quotedstrlen); - ptr += quotedstrlen; - *outquery_len += quotedstrlen; - efree(quotedstr); - } else { - memcpy(ptr, Z_STRVAL_P(param->parameter), Z_STRLEN_P(param->parameter)); - ptr += Z_STRLEN_P(param->parameter); - *outquery_len += (Z_STRLEN_P(param->parameter)); - } - } - else { - /* error and cleanup */ - efree(*outquery); - *outquery = NULL; - return (int) (s.cur - inquery); - } - bindno++; - } - else if(t == PDO_PARSER_BIND_POS) { - if(!params) { - /* error */ - efree(*outquery); - *outquery = NULL; - return (int) (s.cur - inquery); - } - /* lookup bind by index */ - if(SUCCESS == zend_hash_index_find(params, bindno, (void **)¶m)) - { - char *quotedstr; - int quotedstrlen; - /* currently everything is a string here */ - - /* quote the bind value if necessary */ - if(stmt->dbh->methods->quoter(stmt->dbh, Z_STRVAL_P(param->parameter), - Z_STRLEN_P(param->parameter), "edstr, "edstrlen TSRMLS_CC)) - { - memcpy(ptr, quotedstr, quotedstrlen); - ptr += quotedstrlen; - *outquery_len += quotedstrlen; - efree(quotedstr); - } else { - memcpy(ptr, Z_STRVAL_P(param->parameter), Z_STRLEN_P(param->parameter)); - ptr += Z_STRLEN_P(param->parameter); - *outquery_len += (Z_STRLEN_P(param->parameter)); - } - } - else { - /* error and cleanup */ - efree(*outquery); - *outquery = NULL; - return (int) (s.cur - inquery); - } - bindno++; - } - } - *ptr = '\0'; - return 0; -} -#endif - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker ft=c - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/pdo/pdo_sql_parser.re b/ext/pdo/pdo_sql_parser.re index 55ae5e38d..fee5bdcc8 100644 --- a/ext/pdo/pdo_sql_parser.re +++ b/ext/pdo/pdo_sql_parser.re @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sql_parser.re 314451 2011-08-08 00:07:54Z iliaa $ */ +/* $Id: pdo_sql_parser.re 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_pdo_driver.h" diff --git a/ext/pdo/pdo_sqlstate.c b/ext/pdo/pdo_sqlstate.c index ad3e7c929..575154a9a 100644 --- a/ext/pdo/pdo_sqlstate.c +++ b/ext/pdo/pdo_sqlstate.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlstate.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pdo_sqlstate.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 04cdad030..2ee207909 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c 312258 2011-06-18 15:56:14Z felipe $ */ +/* $Id: pdo_stmt.c 321634 2012-01-01 13:15:04Z felipe $ */ /* The PDO Statement Handle Class */ @@ -2351,6 +2351,7 @@ static zend_object_value dbstmt_clone_obj(zval *zobject TSRMLS_DC) } zend_object_handlers pdo_dbstmt_object_handlers; +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC); void pdo_stmt_init(TSRMLS_D) { @@ -2374,6 +2375,7 @@ void pdo_stmt_init(TSRMLS_D) pdo_row_ce = zend_register_internal_class(&ce TSRMLS_CC); pdo_row_ce->ce_flags |= ZEND_ACC_FINAL_CLASS; /* when removing this a lot of handlers need to be redone */ pdo_row_ce->create_object = pdo_row_new; + pdo_row_ce->serialize = pdo_row_serialize; } static void free_statement(pdo_stmt_t *stmt TSRMLS_DC) @@ -2797,6 +2799,12 @@ zend_object_value pdo_row_new(zend_class_entry *ce TSRMLS_DC) return retval; } + +static int pdo_row_serialize(zval *object, unsigned char **buffer, zend_uint *buf_len, zend_serialize_data *data TSRMLS_DC) +{ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PDORow instances may not be serialized"); + return FAILURE; +} /* }}} */ /* diff --git a/ext/pdo/php_pdo.h b/ext/pdo/php_pdo.h index 866151ded..79115b523 100755 --- a/ext/pdo/php_pdo.h +++ b/ext/pdo/php_pdo.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_H #define PHP_PDO_H diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index e95c738ee..0bdc1cea2 100755 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_driver.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_driver.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_DRIVER_H #define PHP_PDO_DRIVER_H diff --git a/ext/pdo/php_pdo_int.h b/ext/pdo/php_pdo_int.h index 03c717958..8e3e1bea1 100755 --- a/ext/pdo/php_pdo_int.h +++ b/ext/pdo/php_pdo_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_int.h 314450 2011-08-07 23:46:00Z iliaa $ */ +/* $Id: php_pdo_int.h 321634 2012-01-01 13:15:04Z felipe $ */ /* Stuff private to the PDO extension and not for consumption by PDO drivers * */ diff --git a/ext/pdo/tests/bug_34630.phpt b/ext/pdo/tests/bug_34630.phpt index 22ad2e820..070217baf 100644 --- a/ext/pdo/tests/bug_34630.phpt +++ b/ext/pdo/tests/bug_34630.phpt @@ -45,8 +45,6 @@ $db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, true); var_dump($db->query("SELECT * from test")->fetchAll(PDO::FETCH_ASSOC)); ?> ---XFAIL-- -This bug might be still open on aix5.2-ppc64 and hpux11.23-ia64 --EXPECT-- array(1) { [0]=> diff --git a/ext/pdo/tests/bug_36798.phpt b/ext/pdo/tests/bug_36798.phpt index 5a40bb78c..9da703e84 100644 --- a/ext/pdo/tests/bug_36798.phpt +++ b/ext/pdo/tests/bug_36798.phpt @@ -7,6 +7,12 @@ $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); + +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))){ + if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=we8mswin1252')) die('skip expected output valid for Oracle with WE8MSWIN1252 character set'); + +} + ?> --FILE-- <?php diff --git a/ext/pdo/tests/bug_43130.phpt b/ext/pdo/tests/bug_43130.phpt index bb40f894d..a35138a07 100644 --- a/ext/pdo/tests/bug_43130.phpt +++ b/ext/pdo/tests/bug_43130.phpt @@ -7,6 +7,7 @@ $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); if (!strncasecmp(getenv('PDOTEST_DSN'), 'sqlite', strlen('sqlite'))) die('skip not relevant for sqlite driver'); if (!strncasecmp(getenv('PDOTEST_DSN'), 'pgsql', strlen('pgsql'))) die('skip not relevant for pgsql driver'); +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - Hyphen is not legal for bind names in Oracle DB'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ?> diff --git a/ext/pdo/tests/bug_43139.phpt b/ext/pdo/tests/bug_43139.phpt index 2c04d79fa..87bfd4e58 100644 --- a/ext/pdo/tests/bug_43139.phpt +++ b/ext/pdo/tests/bug_43139.phpt @@ -20,6 +20,8 @@ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); $from = ''; if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') { $from = 'from dual'; +} else if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'firebird') { + $from = 'FROM RDB$DATABASE'; } var_dump($db->query("select 0 as abc, 1 as xyz, 2 as def $from")->fetchAll(PDO::FETCH_GROUP)); diff --git a/ext/pdo/tests/bug_44861.phpt b/ext/pdo/tests/bug_44861.phpt index 3612561ed..cb8e657e9 100644 --- a/ext/pdo/tests/bug_44861.phpt +++ b/ext/pdo/tests/bug_44861.phpt @@ -28,11 +28,13 @@ $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'oci') { $from = 'FROM DUAL'; + $ob = '1'; } else { $from = ''; + $ob = 'r'; } -$query = "SELECT 'row1' AS r $from UNION SELECT 'row2' $from UNION SELECT 'row3' $from UNION SELECT 'row4' $from ORDER BY r"; +$query = "SELECT 'row1' AS r $from UNION SELECT 'row2' $from UNION SELECT 'row3' $from UNION SELECT 'row4' $from ORDER BY $ob"; $aParams = array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL); $res = $db->prepare($query, $aParams); diff --git a/ext/pdo/tests/pdo_016.phpt b/ext/pdo/tests/pdo_016.phpt index f3aba13e0..12c951723 100644 --- a/ext/pdo/tests/pdo_016.phpt +++ b/ext/pdo/tests/pdo_016.phpt @@ -5,6 +5,7 @@ PDO Common: PDO::FETCH_BOUND if (!extension_loaded('pdo')) die('skip'); $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse'); require_once $dir . 'pdo_test.inc'; PDOTest::skip(); ?> diff --git a/ext/pdo/tests/pdo_016a.phpt b/ext/pdo/tests/pdo_016a.phpt index 00b75aeca..72f4b4224 100755 --- a/ext/pdo/tests/pdo_016a.phpt +++ b/ext/pdo/tests/pdo_016a.phpt @@ -6,6 +6,7 @@ if (!extension_loaded('pdo')) die('skip'); $dir = getenv('REDIR_TEST_DIR'); if (false == $dir) die('skip no driver'); require_once $dir . 'pdo_test.inc'; +if (!strncasecmp(getenv('PDOTEST_DSN'), 'oci', strlen('oci'))) die('skip not relevant for oci driver - cannot reexecute after closing cursors without reparse'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo/tests/pdo_036.phpt b/ext/pdo/tests/pdo_036.phpt index 6bd38cb06..94006c9e8 100644 --- a/ext/pdo/tests/pdo_036.phpt +++ b/ext/pdo/tests/pdo_036.phpt @@ -1,5 +1,7 @@ --TEST-- Testing PDORow and PDOStatement instances with Reflection +--SKIPIF-- +<?php if (!extension_loaded('pdo')) die('skip'); ?> --FILE-- <?php diff --git a/ext/pdo/tests/pdorow.phpt b/ext/pdo/tests/pdorow.phpt index b33dd155d..bcfd8ff22 100644 --- a/ext/pdo/tests/pdorow.phpt +++ b/ext/pdo/tests/pdorow.phpt @@ -1,5 +1,7 @@ --TEST-- Trying instantiate a PDORow object manually +--SKIPIF-- +<?php if (!extension_loaded('pdo')) die('skip'); ?> --FILE-- <?php diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index bd6b8ef39..7f152efea 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dblib_driver.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dblib_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index 1f5af7fa7..cc4e642c2 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dblib_stmt.c 312860 2011-07-03 19:01:42Z felipe $ */ +/* $Id: dblib_stmt.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/pdo_dblib/pdo_dblib.c b/ext/pdo_dblib/pdo_dblib.c index d189c33a2..e5b30c543 100644 --- a/ext/pdo_dblib/pdo_dblib.c +++ b/ext/pdo_dblib/pdo_dblib.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dblib.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_dblib.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/pdo_dblib/php_pdo_dblib.h b/ext/pdo_dblib/php_pdo_dblib.h index 34e93d666..7038dc50a 100644 --- a/ext/pdo_dblib/php_pdo_dblib.h +++ b/ext/pdo_dblib/php_pdo_dblib.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_dblib.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_dblib.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_DBLIB_H #define PHP_PDO_DBLIB_H diff --git a/ext/pdo_dblib/php_pdo_dblib_int.h b/ext/pdo_dblib/php_pdo_dblib_int.h index 6f29ef399..a267e73a6 100644 --- a/ext/pdo_dblib/php_pdo_dblib_int.h +++ b/ext/pdo_dblib/php_pdo_dblib_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_dblib_int.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_dblib_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_DBLIB_INT_H #define PHP_PDO_DBLIB_INT_H diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 0efd6a158..deec3b1a3 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: firebird_driver.c 312225 2011-06-17 02:00:20Z felipe $ */ +/* $Id: firebird_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -433,14 +433,17 @@ static int firebird_alloc_prepare_stmt(pdo_dbh_t *dbh, const char *sql, long sql case ':': in_param = 1; ppname = pname; + *ppname++ = sql[l]; case '?': *c++ = '?'; ++pindex; continue; } } else { - if ((in_param &= (sql[l] == '_') || (sql[l] >= 'A' && sql[l] <= 'Z') - || (sql[l] >= 'a' && sql[l] <= 'z') || (sql[l] >= '0' && sql[l] <= '9'))) { + if ((in_param &= ((sql[l] >= 'A' && sql[l] <= 'Z') || (sql[l] >= 'a' && sql[l] <= 'z') + || (sql[l] >= '0' && sql[l] <= '9') || sql[l] == '_' || sql[l] == '-'))) { + + *ppname++ = sql[l]; continue; } else { diff --git a/ext/pdo_firebird/firebird_statement.c b/ext/pdo_firebird/firebird_statement.c index 562b047a9..9529288de 100644 --- a/ext/pdo_firebird/firebird_statement.c +++ b/ext/pdo_firebird/firebird_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: firebird_statement.c 312225 2011-06-17 02:00:20Z felipe $ */ +/* $Id: firebird_statement.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -582,6 +582,12 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat break; case PDO_PARAM_EVT_FETCH_POST: + if (param->paramno == -1) { + return 0; + } + if (param->is_param) { + break; + } value = NULL; value_len = 0; caller_frees = 0; @@ -598,6 +604,15 @@ static int firebird_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_dat ZVAL_LONG(param->parameter, *(long*)value); break; } + case PDO_PARAM_EVT_NORMALIZE: + if (!param->is_param) { + char *s = param->name; + while (*s != '\0') { + *s = toupper(*s); + s++; + } + } + break; default: ZVAL_NULL(param->parameter); } diff --git a/ext/pdo_firebird/pdo_firebird.c b/ext/pdo_firebird/pdo_firebird.c index 8dd35aff7..98000da45 100644 --- a/ext/pdo_firebird/pdo_firebird.c +++ b/ext/pdo_firebird/pdo_firebird.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_firebird.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_firebird.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_firebird/php_pdo_firebird.h b/ext/pdo_firebird/php_pdo_firebird.h index 0dc4d9939..fba536380 100644 --- a/ext/pdo_firebird/php_pdo_firebird.h +++ b/ext/pdo_firebird/php_pdo_firebird.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_firebird.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_firebird.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_FIREBIRD_H #define PHP_PDO_FIREBIRD_H diff --git a/ext/pdo_firebird/php_pdo_firebird_int.h b/ext/pdo_firebird/php_pdo_firebird_int.h index 71e83d7e3..653e86ace 100644 --- a/ext/pdo_firebird/php_pdo_firebird_int.h +++ b/ext/pdo_firebird/php_pdo_firebird_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_firebird_int.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_firebird_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_FIREBIRD_INT_H #define PHP_PDO_FIREBIRD_INT_H diff --git a/ext/pdo_firebird/tests/bug_47415.phpt b/ext/pdo_firebird/tests/bug_47415.phpt new file mode 100644 index 000000000..cedc2c45b --- /dev/null +++ b/ext/pdo_firebird/tests/bug_47415.phpt @@ -0,0 +1,42 @@ +--TEST-- +Bug #47415 PDO_Firebird segfaults when passing lowercased column name to bindColumn() +--SKIPIF-- +<?php extension_loaded("pdo_firebird") or die("skip"); ?> +--FILE-- +<?php + +require("testdb.inc"); + +$dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die; +$dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING); +$value = '2'; +@$dbh->exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz (idx int NOT NULL PRIMARY KEY, txt VARCHAR(20))'); +$dbh->exec('INSERT INTO testz VALUES(0, \'String0\')'); +$dbh->commit(); + +$query = "SELECT idx, txt FROM testz ORDER by idx"; +$idx = $txt = 0; +$stmt = $dbh->prepare($query); +$stmt->bindColumn('idx', $idx); +$stmt->bindColumn('txt', $txt); +$stmt->execute(); +$rows = $stmt->fetch(PDO::FETCH_BOUND); +var_dump($stmt->fetch()); +var_dump($stmt->rowCount()); + + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +bool(false) +int(1) diff --git a/ext/pdo_firebird/tests/bug_48877.phpt b/ext/pdo_firebird/tests/bug_48877.phpt new file mode 100644 index 000000000..290cd7a3a --- /dev/null +++ b/ext/pdo_firebird/tests/bug_48877.phpt @@ -0,0 +1,42 @@ +--TEST-- +PDO_Firebird: bug 48877 The "bindValue" and "bindParam" do not work for PDO Firebird if we use named parameters (:parameter). +--SKIPIF-- +<?php extension_loaded("pdo_firebird") or die("skip"); ?> +--FILE-- +<?php + +require("testdb.inc"); + +$dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die; +$value = '2'; +@$dbh->exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz (A integer)'); +$dbh->exec("INSERT INTO testz VALUES ('1')"); +$dbh->exec("INSERT INTO testz VALUES ('2')"); +$dbh->exec("INSERT INTO testz VALUES ('3')"); +$dbh->commit(); + +$query = "SELECT * FROM testz WHERE A = :paramno"; + +$stmt = $dbh->prepare($query); +$stmt->bindParam(':paramno', $value, PDO::PARAM_STR); +$stmt->execute(); +$rows = $stmt->fetch(); +var_dump($stmt->fetch()); +var_dump($stmt->rowCount()); + + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +bool(false) +int(1) diff --git a/ext/pdo_firebird/tests/bug_53280.phpt b/ext/pdo_firebird/tests/bug_53280.phpt new file mode 100644 index 000000000..cc030dd49 --- /dev/null +++ b/ext/pdo_firebird/tests/bug_53280.phpt @@ -0,0 +1,63 @@ +--TEST-- +PDO_Firebird: bug 53280 segfaults if query column count is less than param count +--SKIPIF-- +<?php extension_loaded("pdo_firebird") or die("skip"); ?> +--FILE-- +<?php + +require("testdb.inc"); + +$dbh = new PDO("firebird:dbname=$test_base",$user,$password) or die; +$value = '2'; +@$dbh->exec('DROP TABLE testz'); +$dbh->exec('CREATE TABLE testz(A VARCHAR(30), B VARCHAR(30), C VARCHAR(30))'); +$dbh->exec("INSERT INTO testz VALUES ('A', 'B', 'C')"); +$dbh->commit(); + +$stmt1 = "SELECT B FROM testz WHERE A = ? AND B = ?"; +$stmt2 = "SELECT B, C FROM testz WHERE A = ? AND B = ?"; + +$stmth2 = $dbh->prepare($stmt2); +$stmth2->execute(array('A', 'B')); +$rows = $stmth2->fetchAll(); // <------ OK +var_dump($rows); + +$stmth1 = $dbh->prepare($stmt1); +$stmth1->execute(array('A', 'B')); +$rows = $stmth1->fetchAll(); // <------- segfault +var_dump($rows); + +$stmt = $dbh->prepare('DELETE FROM testz'); +$stmt->execute(); + +$dbh->commit(); + +$dbh->exec('DROP TABLE testz'); + +unset($stmt); +unset($dbh); + +?> +--EXPECT-- +array(1) { + [0]=> + array(4) { + ["B"]=> + string(1) "B" + [0]=> + string(1) "B" + ["C"]=> + string(1) "C" + [1]=> + string(1) "C" + } +} +array(1) { + [0]=> + array(2) { + ["B"]=> + string(1) "B" + [0]=> + string(1) "B" + } +} diff --git a/ext/pdo_firebird/tests/rowCount.phpt b/ext/pdo_firebird/tests/rowCount.phpt index 1cb09e1e9..54ab55471 100644 --- a/ext/pdo_firebird/tests/rowCount.phpt +++ b/ext/pdo_firebird/tests/rowCount.phpt @@ -3,7 +3,7 @@ PDO_Firebird: rowCount --SKIPIF-- <?php extension_loaded("pdo_firebird") or die("skip"); ?> --FILE-- -<?php /* $Id: rowCount.phpt 305476 2010-11-18 01:24:00Z felipe $ */ +<?php /* $Id: rowCount.phpt 316542 2011-09-12 13:43:42Z mariuz $ */ require("testdb.inc"); @@ -38,6 +38,7 @@ $dbh->commit(); $dbh->exec('DROP TABLE testz'); +unset($stmt); unset($dbh); ?> diff --git a/ext/pdo_mysql/get_error_codes.php b/ext/pdo_mysql/get_error_codes.php index 2785c93b9..a1ed85016 100644 --- a/ext/pdo_mysql/get_error_codes.php +++ b/ext/pdo_mysql/get_error_codes.php @@ -5,7 +5,7 @@ while (!feof(STDIN)) { $line = fgets(STDIN); - if (ereg('^(ER_.*),[[:space:]]+"(.*)",[[:space:]]+"(.*)"', $line, $matches)) { + if (ereg('^\{[[:space:]]+(ER_.*)[[:space:]]+,[[:space:]]*"(.*)",[[:space:]]*"(.*)"', $line, $matches)) { $codes[$matches[1]] = $matches[2]; $maxlen = max($maxlen, strlen($matches[1])); } @@ -24,4 +24,4 @@ } -?>
\ No newline at end of file +?> diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index ff161f7f6..88b2ba6ed 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_driver.c 310239 2011-04-15 14:24:40Z rrichards $ */ +/* $Id: mysql_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -42,7 +42,7 @@ # define pdo_mysql_init(persistent) mysql_init(NULL) #endif -#if !HAVE_MYSQL_SQLSTATE && !PDO_USE_MYSQLND +#if !defined(HAVE_MYSQL_SQLSTATE) && !defined(PDO_USE_MYSQLND) static const char *pdo_mysql_get_sqlstate(unsigned int my_errno) { /* {{{ */ switch (my_errno) { /* import auto-generated case: code */ @@ -54,7 +54,7 @@ static const char *pdo_mysql_get_sqlstate(unsigned int my_errno) { /* {{{ */ #endif /* {{{ _pdo_mysql_error */ -int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC) /* {{{ */ +int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int line TSRMLS_DC) { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; pdo_error_type *pdo_err; @@ -72,7 +72,7 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin einfo = &H->einfo; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) if (S && S->stmt) { einfo->errcode = mysql_stmt_errno(S->stmt); } @@ -112,8 +112,8 @@ int _pdo_mysql_error(pdo_dbh_t *dbh, pdo_stmt_t *stmt, const char *file, int lin PDO_DBG_RETURN(0); } -#if HAVE_MYSQL_SQLSTATE || PDO_USE_MYSQLND -# if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_SQLSTATE) || defined(PDO_USE_MYSQLND) +# if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) if (S && S->stmt) { strcpy(*pdo_err, mysql_stmt_sqlstate(S->stmt)); } else @@ -160,7 +160,7 @@ static int pdo_mysql_fetch_error_func(pdo_dbh_t *dbh, pdo_stmt_t *stmt, zval *in /* }}} */ /* {{{ mysql_handle_closer */ -static int mysql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ +static int mysql_handle_closer(pdo_dbh_t *dbh TSRMLS_DC) { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; @@ -187,7 +187,7 @@ static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; pdo_mysql_stmt *S = ecalloc(1, sizeof(pdo_mysql_stmt)); -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) char *nsql = NULL; int nsql_len = 0; int ret; @@ -206,7 +206,7 @@ static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, goto end; } -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) server_version = mysql_get_server_version(H->server); if (server_version < 40100) { goto fallback; @@ -255,7 +255,7 @@ static int mysql_handle_preparer(pdo_dbh_t *dbh, const char *sql, long sql_len, if (S->num_params) { S->params_given = 0; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND S->params = NULL; #else S->params = ecalloc(S->num_params, sizeof(MYSQL_BIND)); @@ -296,7 +296,7 @@ static long mysql_handle_doer(pdo_dbh_t *dbh, const char *sql, long sql_len TSRM PDO_DBG_RETURN(H->einfo.errcode ? -1 : 0); } else { -#if HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND +#if defined(HAVE_MYSQL_NEXT_RESULT) || defined(PDO_USE_MYSQLND) /* MULTI_QUERY support - eat up all unfetched result sets */ MYSQL_RES* result; while (mysql_more_results(H->server)) { @@ -324,6 +324,7 @@ static char *pdo_mysql_last_insert_id(pdo_dbh_t *dbh, const char *name, unsigned *len = strlen(id); PDO_DBG_RETURN(id); } +/* }}} */ /* {{{ mysql_handle_quoter */ static int mysql_handle_quoter(pdo_dbh_t *dbh, const char *unquoted, int unquotedlen, char **quoted, int *quotedlen, enum pdo_param_type paramtype TSRMLS_DC) @@ -361,6 +362,7 @@ static int mysql_handle_commit(pdo_dbh_t *dbh TSRMLS_DC) PDO_DBG_RETURN(0 <= mysql_handle_doer(dbh, ZEND_STRL("COMMIT") TSRMLS_CC)); #endif } +/* }}} */ /* {{{ mysql_handle_rollback */ static int mysql_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) @@ -461,7 +463,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_value break; case PDO_ATTR_SERVER_INFO: { char *tmp; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND unsigned int tmp_len; if (mysqlnd_stat(H->server, &tmp, &tmp_len) == PASS) { @@ -503,7 +505,7 @@ static int pdo_mysql_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_value /* }}} */ /* {{{ pdo_mysql_check_liveness */ -static int pdo_mysql_check_liveness(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ +static int pdo_mysql_check_liveness(pdo_dbh_t *dbh TSRMLS_DC) { pdo_mysql_db_handle *H = (pdo_mysql_db_handle *)dbh->driver_data; #if MYSQL_VERSION_ID <= 32230 @@ -551,16 +553,15 @@ static struct pdo_dbh_methods mysql_methods = { pdo_mysql_check_liveness }; /* }}} */ -#ifdef PDO_USE_MYSQLND -# ifdef PHP_WIN32 -# define MYSQL_UNIX_ADDR "MySQL" -# else -# define MYSQL_UNIX_ADDR PDO_MYSQL_G(default_socket) -# endif + +#ifdef PHP_WIN32 +# define MYSQL_UNIX_ADDR NULL +#else +# define MYSQL_UNIX_ADDR PDO_MYSQL_G(default_socket) #endif /* {{{ pdo_mysql_handle_factory */ -static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */ +static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) { pdo_mysql_db_handle *H; int i, ret = 0; @@ -583,7 +584,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ #endif ; -#if PDO_USE_MYSQLND +#ifdef PDO_USE_MYSQLND int dbname_len = 0; int password_len = 0; #endif @@ -625,7 +626,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ char *default_file = NULL, *default_group = NULL; long compress = 0; #endif -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSLQND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, *ssl_capath = NULL, *ssl_cipher = NULL; #endif H->buffered = pdo_attr_lval(driver_options, PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC); @@ -660,7 +661,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ { local_infile = 0; } -#ifdef MYSQL_OPT_LOCAL_INFILE +#if defined(MYSQL_OPT_LOCAL_INFILE) || defined(PDO_USE_MYSQLND) if (mysql_options(H->server, MYSQL_OPT_LOCAL_INFILE, (const char *)&local_infile)) { pdo_mysql_error(dbh); goto cleanup; @@ -668,7 +669,9 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ #endif #ifdef MYSQL_OPT_RECONNECT /* since 5.0.3, the default for this option is 0 if not specified. - * we want the old behaviour */ + * we want the old behaviour + * mysqlnd doesn't support reconnect, thus we don't have "|| defined(PDO_USE_MYSQLND)" + */ { long reconnect = 1; mysql_options(H->server, MYSQL_OPT_RECONNECT, (const char*)&reconnect); @@ -712,7 +715,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ } } #endif -#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSLQND +#if defined(HAVE_MYSQL_STMT_PREPARE) || defined(PDO_USE_MYSQLND) ssl_key = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_KEY, NULL TSRMLS_CC); ssl_cert = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CERT, NULL TSRMLS_CC); ssl_ca = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CA, NULL TSRMLS_CC); diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index c2a593f1d..4c8c3559a 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_statement.c 311088 2011-05-16 15:37:39Z johannes $ */ +/* $Id: mysql_statement.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -335,7 +335,7 @@ static int pdo_mysql_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ PDO_DBG_RETURN(1); } -/* {{{ */ +/* }}} */ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ { @@ -461,8 +461,7 @@ static const char * const pdo_param_event_names[] = }; -static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, - enum pdo_param_event event_type TSRMLS_DC) /* {{{ */ +static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo_param_event event_type TSRMLS_DC) /* {{{ */ { #ifndef PDO_USE_MYSQLND PDO_MYSQL_PARAM_BIND *b; @@ -604,8 +603,7 @@ static int pdo_mysql_stmt_param_hook(pdo_stmt_t *stmt, struct pdo_bound_param_da } /* }}} */ -static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, - enum pdo_fetch_orientation ori, long offset TSRMLS_DC) /* {{{ */ +static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, enum pdo_fetch_orientation ori, long offset TSRMLS_DC) /* {{{ */ { pdo_mysql_stmt *S = (pdo_mysql_stmt*)stmt->driver_data; #if PDO_USE_MYSQLND @@ -777,7 +775,7 @@ static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsig PDO_DBG_RETURN(1); } /* }}} */ -static char *type_to_name_native(int type) /* }}} */ +static char *type_to_name_native(int type) /* {{{ */ { #define PDO_MYSQL_NATIVE_TYPE_NAME(x) case FIELD_TYPE_##x: return #x; diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c index 85829e208..aa122efc9 100755 --- a/ext/pdo_mysql/pdo_mysql.c +++ b/ext/pdo_mysql/pdo_mysql.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_mysql.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_mysql.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -37,12 +37,22 @@ ZEND_GET_MODULE(pdo_mysql) ZEND_DECLARE_MODULE_GLOBALS(pdo_mysql); -#ifndef PHP_WIN32 -# ifndef PDO_MYSQL_UNIX_ADDR -# ifdef PHP_MYSQL_UNIX_SOCK_ADDR -# define PDO_MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR -# else +/* + The default socket location is sometimes defined by configure. + With libmysql `mysql_config --socket` will fill PDO_MYSQL_UNIX_ADDR + and the user can use --with-mysql-sock=SOCKET which will fill + PDO_MYSQL_UNIX_ADDR. If both aren't set we're using mysqlnd and use + /tmp/mysql.sock as default on *nix and NULL for Windows (default + named pipe name is set in mysqlnd). +*/ +#ifndef PDO_MYSQL_UNIX_ADDR +# ifdef PHP_MYSQL_UNIX_SOCK_ADDR +# define PDO_MYSQL_UNIX_ADDR PHP_MYSQL_UNIX_SOCK_ADDR +# else +# if !PHP_WIN32 # define PDO_MYSQL_UNIX_ADDR "/tmp/mysql.sock" +# else +# define PDO_MYSQL_UNIX_ADDR NULL # endif # endif #endif @@ -112,7 +122,7 @@ static PHP_MINFO_FUNCTION(pdo_mysql) php_info_print_table_end(); -#ifdef PDO_USE_MYSQLND +#ifndef PHP_WIN32 DISPLAY_INI_ENTRIES(); #endif } diff --git a/ext/pdo_mysql/php_pdo_mysql.h b/ext/pdo_mysql/php_pdo_mysql.h index 8319b0774..1b55273f7 100755 --- a/ext/pdo_mysql/php_pdo_mysql.h +++ b/ext/pdo_mysql/php_pdo_mysql.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_mysql.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_mysql.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_MYSQL_H #define PHP_PDO_MYSQL_H diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index 7a3c89995..1eae578a0 100755 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_mysql_int.h 310850 2011-05-09 11:34:17Z johannes $ */ +/* $Id: php_pdo_mysql_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_MYSQL_INT_H #define PHP_PDO_MYSQL_INT_H diff --git a/ext/pdo_mysql/php_pdo_mysql_sqlstate.h b/ext/pdo_mysql/php_pdo_mysql_sqlstate.h index 97724b72e..70fc95ef7 100644 --- a/ext/pdo_mysql/php_pdo_mysql_sqlstate.h +++ b/ext/pdo_mysql/php_pdo_mysql_sqlstate.h @@ -1,388 +1,646 @@ /* DO NOT EDIT THIS FILE!!! It is auto generated by get_error_codes.php */ -#ifdef ER_DUP_KEY - case ER_DUP_KEY : return "23000"; +#ifdef ER_DUP_KEY + case ER_DUP_KEY : return "23000"; #endif -#ifdef ER_OUTOFMEMORY - case ER_OUTOFMEMORY : return "HY001"; +#ifdef ER_OUTOFMEMORY + case ER_OUTOFMEMORY : return "HY001"; #endif -#ifdef ER_OUT_OF_SORTMEMORY - case ER_OUT_OF_SORTMEMORY : return "HY001"; +#ifdef ER_OUT_OF_SORTMEMORY + case ER_OUT_OF_SORTMEMORY : return "HY001"; #endif -#ifdef ER_CON_COUNT_ERROR - case ER_CON_COUNT_ERROR : return "08004"; +#ifdef ER_CON_COUNT_ERROR + case ER_CON_COUNT_ERROR : return "08004"; #endif -#ifdef ER_BAD_HOST_ERROR - case ER_BAD_HOST_ERROR : return "08S01"; +#ifdef ER_BAD_HOST_ERROR + case ER_BAD_HOST_ERROR : return "08S01"; #endif -#ifdef ER_HANDSHAKE_ERROR - case ER_HANDSHAKE_ERROR : return "08S01"; +#ifdef ER_HANDSHAKE_ERROR + case ER_HANDSHAKE_ERROR : return "08S01"; #endif -#ifdef ER_DBACCESS_DENIED_ERROR - case ER_DBACCESS_DENIED_ERROR : return "42000"; +#ifdef ER_DBACCESS_DENIED_ERROR + case ER_DBACCESS_DENIED_ERROR : return "42000"; #endif -#ifdef ER_ACCESS_DENIED_ERROR - case ER_ACCESS_DENIED_ERROR : return "28000"; +#ifdef ER_ACCESS_DENIED_ERROR + case ER_ACCESS_DENIED_ERROR : return "28000"; #endif -#ifdef ER_NO_DB_ERROR - case ER_NO_DB_ERROR : return "3D000"; +#ifdef ER_NO_DB_ERROR + case ER_NO_DB_ERROR : return "3D000"; #endif -#ifdef ER_UNKNOWN_COM_ERROR - case ER_UNKNOWN_COM_ERROR : return "08S01"; +#ifdef ER_UNKNOWN_COM_ERROR + case ER_UNKNOWN_COM_ERROR : return "08S01"; #endif -#ifdef ER_BAD_NULL_ERROR - case ER_BAD_NULL_ERROR : return "23000"; +#ifdef ER_BAD_NULL_ERROR + case ER_BAD_NULL_ERROR : return "23000"; #endif -#ifdef ER_BAD_DB_ERROR - case ER_BAD_DB_ERROR : return "42000"; +#ifdef ER_BAD_DB_ERROR + case ER_BAD_DB_ERROR : return "42000"; #endif -#ifdef ER_TABLE_EXISTS_ERROR - case ER_TABLE_EXISTS_ERROR : return "42S01"; +#ifdef ER_TABLE_EXISTS_ERROR + case ER_TABLE_EXISTS_ERROR : return "42S01"; #endif -#ifdef ER_BAD_TABLE_ERROR - case ER_BAD_TABLE_ERROR : return "42S02"; +#ifdef ER_BAD_TABLE_ERROR + case ER_BAD_TABLE_ERROR : return "42S02"; #endif -#ifdef ER_NON_UNIQ_ERROR - case ER_NON_UNIQ_ERROR : return "23000"; +#ifdef ER_NON_UNIQ_ERROR + case ER_NON_UNIQ_ERROR : return "23000"; #endif -#ifdef ER_SERVER_SHUTDOWN - case ER_SERVER_SHUTDOWN : return "08S01"; +#ifdef ER_SERVER_SHUTDOWN + case ER_SERVER_SHUTDOWN : return "08S01"; #endif -#ifdef ER_BAD_FIELD_ERROR - case ER_BAD_FIELD_ERROR : return "42S22"; +#ifdef ER_BAD_FIELD_ERROR + case ER_BAD_FIELD_ERROR : return "42S22"; #endif -#ifdef ER_WRONG_FIELD_WITH_GROUP - case ER_WRONG_FIELD_WITH_GROUP : return "42000"; +#ifdef ER_WRONG_FIELD_WITH_GROUP + case ER_WRONG_FIELD_WITH_GROUP : return "42000"; #endif -#ifdef ER_WRONG_GROUP_FIELD - case ER_WRONG_GROUP_FIELD : return "42000"; +#ifdef ER_WRONG_GROUP_FIELD + case ER_WRONG_GROUP_FIELD : return "42000"; #endif -#ifdef ER_WRONG_SUM_SELECT - case ER_WRONG_SUM_SELECT : return "42000"; +#ifdef ER_WRONG_SUM_SELECT + case ER_WRONG_SUM_SELECT : return "42000"; #endif -#ifdef ER_WRONG_VALUE_COUNT - case ER_WRONG_VALUE_COUNT : return "21S01"; +#ifdef ER_WRONG_VALUE_COUNT + case ER_WRONG_VALUE_COUNT : return "21S01"; #endif -#ifdef ER_TOO_LONG_IDENT - case ER_TOO_LONG_IDENT : return "42000"; +#ifdef ER_TOO_LONG_IDENT + case ER_TOO_LONG_IDENT : return "42000"; #endif -#ifdef ER_DUP_FIELDNAME - case ER_DUP_FIELDNAME : return "42S21"; +#ifdef ER_DUP_FIELDNAME + case ER_DUP_FIELDNAME : return "42S21"; #endif -#ifdef ER_DUP_KEYNAME - case ER_DUP_KEYNAME : return "42000"; +#ifdef ER_DUP_KEYNAME + case ER_DUP_KEYNAME : return "42000"; #endif -#ifdef ER_DUP_ENTRY - case ER_DUP_ENTRY : return "23000"; +#ifdef ER_DUP_ENTRY + case ER_DUP_ENTRY : return "23000"; #endif -#ifdef ER_WRONG_FIELD_SPEC - case ER_WRONG_FIELD_SPEC : return "42000"; +#ifdef ER_WRONG_FIELD_SPEC + case ER_WRONG_FIELD_SPEC : return "42000"; #endif -#ifdef ER_PARSE_ERROR - case ER_PARSE_ERROR : return "42000"; +#ifdef ER_PARSE_ERROR + case ER_PARSE_ERROR : return "42000"; #endif -#ifdef ER_NONUNIQ_TABLE - case ER_NONUNIQ_TABLE : return "42000"; +#ifdef ER_EMPTY_QUERY + case ER_EMPTY_QUERY : return "42000"; #endif -#ifdef ER_INVALID_DEFAULT - case ER_INVALID_DEFAULT : return "42000"; +#ifdef ER_NONUNIQ_TABLE + case ER_NONUNIQ_TABLE : return "42000"; #endif -#ifdef ER_MULTIPLE_PRI_KEY - case ER_MULTIPLE_PRI_KEY : return "42000"; +#ifdef ER_INVALID_DEFAULT + case ER_INVALID_DEFAULT : return "42000"; #endif -#ifdef ER_TOO_MANY_KEYS - case ER_TOO_MANY_KEYS : return "42000"; +#ifdef ER_MULTIPLE_PRI_KEY + case ER_MULTIPLE_PRI_KEY : return "42000"; #endif -#ifdef ER_TOO_MANY_KEY_PARTS - case ER_TOO_MANY_KEY_PARTS : return "42000"; +#ifdef ER_TOO_MANY_KEYS + case ER_TOO_MANY_KEYS : return "42000"; #endif -#ifdef ER_TOO_LONG_KEY - case ER_TOO_LONG_KEY : return "42000"; +#ifdef ER_TOO_MANY_KEY_PARTS + case ER_TOO_MANY_KEY_PARTS : return "42000"; #endif -#ifdef ER_KEY_COLUMN_DOES_NOT_EXITS - case ER_KEY_COLUMN_DOES_NOT_EXITS : return "42000"; +#ifdef ER_TOO_LONG_KEY + case ER_TOO_LONG_KEY : return "42000"; #endif -#ifdef ER_BLOB_USED_AS_KEY - case ER_BLOB_USED_AS_KEY : return "42000"; +#ifdef ER_KEY_COLUMN_DOES_NOT_EXITS + case ER_KEY_COLUMN_DOES_NOT_EXITS : return "42000"; #endif -#ifdef ER_TOO_BIG_FIELDLENGTH - case ER_TOO_BIG_FIELDLENGTH : return "42000"; +#ifdef ER_BLOB_USED_AS_KEY + case ER_BLOB_USED_AS_KEY : return "42000"; #endif -#ifdef ER_WRONG_AUTO_KEY - case ER_WRONG_AUTO_KEY : return "42000"; +#ifdef ER_TOO_BIG_FIELDLENGTH + case ER_TOO_BIG_FIELDLENGTH : return "42000"; #endif -#ifdef ER_FORCING_CLOSE - case ER_FORCING_CLOSE : return "08S01"; +#ifdef ER_WRONG_AUTO_KEY + case ER_WRONG_AUTO_KEY : return "42000"; #endif -#ifdef ER_IPSOCK_ERROR - case ER_IPSOCK_ERROR : return "08S01"; +#ifdef ER_FORCING_CLOSE + case ER_FORCING_CLOSE : return "08S01"; #endif -#ifdef ER_NO_SUCH_INDEX - case ER_NO_SUCH_INDEX : return "42S12"; +#ifdef ER_IPSOCK_ERROR + case ER_IPSOCK_ERROR : return "08S01"; #endif -#ifdef ER_WRONG_FIELD_TERMINATORS - case ER_WRONG_FIELD_TERMINATORS : return "42000"; +#ifdef ER_NO_SUCH_INDEX + case ER_NO_SUCH_INDEX : return "42S12"; #endif -#ifdef ER_BLOBS_AND_NO_TERMINATED - case ER_BLOBS_AND_NO_TERMINATED : return "42000"; +#ifdef ER_WRONG_FIELD_TERMINATORS + case ER_WRONG_FIELD_TERMINATORS : return "42000"; #endif -#ifdef ER_CANT_REMOVE_ALL_FIELDS - case ER_CANT_REMOVE_ALL_FIELDS : return "42000"; +#ifdef ER_BLOBS_AND_NO_TERMINATED + case ER_BLOBS_AND_NO_TERMINATED : return "42000"; #endif -#ifdef ER_CANT_DROP_FIELD_OR_KEY - case ER_CANT_DROP_FIELD_OR_KEY : return "42000"; +#ifdef ER_CANT_REMOVE_ALL_FIELDS + case ER_CANT_REMOVE_ALL_FIELDS : return "42000"; #endif -#ifdef ER_BLOB_CANT_HAVE_DEFAULT - case ER_BLOB_CANT_HAVE_DEFAULT : return "42000"; +#ifdef ER_CANT_DROP_FIELD_OR_KEY + case ER_CANT_DROP_FIELD_OR_KEY : return "42000"; #endif -#ifdef ER_WRONG_DB_NAME - case ER_WRONG_DB_NAME : return "42000"; +#ifdef ER_BLOB_CANT_HAVE_DEFAULT + case ER_BLOB_CANT_HAVE_DEFAULT : return "42000"; #endif -#ifdef ER_WRONG_TABLE_NAME - case ER_WRONG_TABLE_NAME : return "42000"; +#ifdef ER_WRONG_DB_NAME + case ER_WRONG_DB_NAME : return "42000"; #endif -#ifdef ER_TOO_BIG_SELECT - case ER_TOO_BIG_SELECT : return "42000"; +#ifdef ER_WRONG_TABLE_NAME + case ER_WRONG_TABLE_NAME : return "42000"; #endif -#ifdef ER_UNKNOWN_PROCEDURE - case ER_UNKNOWN_PROCEDURE : return "42000"; +#ifdef ER_TOO_BIG_SELECT + case ER_TOO_BIG_SELECT : return "42000"; #endif -#ifdef ER_WRONG_PARAMCOUNT_TO_PROCEDURE - case ER_WRONG_PARAMCOUNT_TO_PROCEDURE : return "42000"; +#ifdef ER_UNKNOWN_PROCEDURE + case ER_UNKNOWN_PROCEDURE : return "42000"; #endif -#ifdef ER_UNKNOWN_TABLE - case ER_UNKNOWN_TABLE : return "42S02"; +#ifdef ER_WRONG_PARAMCOUNT_TO_PROCEDURE + case ER_WRONG_PARAMCOUNT_TO_PROCEDURE : return "42000"; #endif -#ifdef ER_FIELD_SPECIFIED_TWICE - case ER_FIELD_SPECIFIED_TWICE : return "42000"; +#ifdef ER_UNKNOWN_TABLE + case ER_UNKNOWN_TABLE : return "42S02"; #endif -#ifdef ER_UNSUPPORTED_EXTENSION - case ER_UNSUPPORTED_EXTENSION : return "42000"; +#ifdef ER_FIELD_SPECIFIED_TWICE + case ER_FIELD_SPECIFIED_TWICE : return "42000"; #endif -#ifdef ER_TABLE_MUST_HAVE_COLUMNS - case ER_TABLE_MUST_HAVE_COLUMNS : return "42000"; +#ifdef ER_UNSUPPORTED_EXTENSION + case ER_UNSUPPORTED_EXTENSION : return "42000"; #endif -#ifdef ER_UNKNOWN_CHARACTER_SET - case ER_UNKNOWN_CHARACTER_SET : return "42000"; +#ifdef ER_TABLE_MUST_HAVE_COLUMNS + case ER_TABLE_MUST_HAVE_COLUMNS : return "42000"; #endif -#ifdef ER_TOO_BIG_ROWSIZE - case ER_TOO_BIG_ROWSIZE : return "42000"; +#ifdef ER_UNKNOWN_CHARACTER_SET + case ER_UNKNOWN_CHARACTER_SET : return "42000"; #endif -#ifdef ER_WRONG_OUTER_JOIN - case ER_WRONG_OUTER_JOIN : return "42000"; +#ifdef ER_TOO_BIG_ROWSIZE + case ER_TOO_BIG_ROWSIZE : return "42000"; #endif -#ifdef ER_NULL_COLUMN_IN_INDEX - case ER_NULL_COLUMN_IN_INDEX : return "42000"; +#ifdef ER_WRONG_OUTER_JOIN + case ER_WRONG_OUTER_JOIN : return "42000"; #endif -#ifdef ER_PASSWORD_ANONYMOUS_USER - case ER_PASSWORD_ANONYMOUS_USER : return "42000"; +#ifdef ER_NULL_COLUMN_IN_INDEX + case ER_NULL_COLUMN_IN_INDEX : return "42000"; #endif -#ifdef ER_PASSWORD_NOT_ALLOWED - case ER_PASSWORD_NOT_ALLOWED : return "42000"; +#ifdef ER_PASSWORD_ANONYMOUS_USER + case ER_PASSWORD_ANONYMOUS_USER : return "42000"; #endif -#ifdef ER_PASSWORD_NO_MATCH - case ER_PASSWORD_NO_MATCH : return "42000"; +#ifdef ER_PASSWORD_NOT_ALLOWED + case ER_PASSWORD_NOT_ALLOWED : return "42000"; #endif -#ifdef ER_WRONG_VALUE_COUNT_ON_ROW - case ER_WRONG_VALUE_COUNT_ON_ROW : return "21S01"; +#ifdef ER_PASSWORD_NO_MATCH + case ER_PASSWORD_NO_MATCH : return "42000"; #endif -#ifdef ER_INVALID_USE_OF_NULL - case ER_INVALID_USE_OF_NULL : return "42000"; +#ifdef ER_WRONG_VALUE_COUNT_ON_ROW + case ER_WRONG_VALUE_COUNT_ON_ROW : return "21S01"; #endif -#ifdef ER_REGEXP_ERROR - case ER_REGEXP_ERROR : return "42000"; +#ifdef ER_INVALID_USE_OF_NULL + case ER_INVALID_USE_OF_NULL : return "22004"; #endif -#ifdef ER_NONEXISTING_GRANT - case ER_NONEXISTING_GRANT : return "42000"; +#ifdef ER_REGEXP_ERROR + case ER_REGEXP_ERROR : return "42000"; #endif -#ifdef ER_TABLEACCESS_DENIED_ERROR - case ER_TABLEACCESS_DENIED_ERROR : return "42000"; +#ifdef ER_MIX_OF_GROUP_FUNC_AND_FIELDS + case ER_MIX_OF_GROUP_FUNC_AND_FIELDS : return "42000"; #endif -#ifdef ER_COLUMNACCESS_DENIED_ERROR - case ER_COLUMNACCESS_DENIED_ERROR : return "42000"; +#ifdef ER_NONEXISTING_GRANT + case ER_NONEXISTING_GRANT : return "42000"; #endif -#ifdef ER_ILLEGAL_GRANT_FOR_TABLE - case ER_ILLEGAL_GRANT_FOR_TABLE : return "42000"; +#ifdef ER_TABLEACCESS_DENIED_ERROR + case ER_TABLEACCESS_DENIED_ERROR : return "42000"; #endif -#ifdef ER_GRANT_WRONG_HOST_OR_USER - case ER_GRANT_WRONG_HOST_OR_USER : return "42000"; +#ifdef ER_COLUMNACCESS_DENIED_ERROR + case ER_COLUMNACCESS_DENIED_ERROR : return "42000"; #endif -#ifdef ER_NO_SUCH_TABLE - case ER_NO_SUCH_TABLE : return "42S02"; +#ifdef ER_ILLEGAL_GRANT_FOR_TABLE + case ER_ILLEGAL_GRANT_FOR_TABLE : return "42000"; #endif -#ifdef ER_NONEXISTING_TABLE_GRANT - case ER_NONEXISTING_TABLE_GRANT : return "42000"; +#ifdef ER_GRANT_WRONG_HOST_OR_USER + case ER_GRANT_WRONG_HOST_OR_USER : return "42000"; #endif -#ifdef ER_NOT_ALLOWED_COMMAND - case ER_NOT_ALLOWED_COMMAND : return "42000"; +#ifdef ER_NO_SUCH_TABLE + case ER_NO_SUCH_TABLE : return "42S02"; #endif -#ifdef ER_SYNTAX_ERROR - case ER_SYNTAX_ERROR : return "42000"; +#ifdef ER_NONEXISTING_TABLE_GRANT + case ER_NONEXISTING_TABLE_GRANT : return "42000"; #endif -#ifdef ER_ABORTING_CONNECTION - case ER_ABORTING_CONNECTION : return "08S01"; +#ifdef ER_NOT_ALLOWED_COMMAND + case ER_NOT_ALLOWED_COMMAND : return "42000"; #endif -#ifdef ER_NET_PACKET_TOO_LARGE - case ER_NET_PACKET_TOO_LARGE : return "08S01"; +#ifdef ER_SYNTAX_ERROR + case ER_SYNTAX_ERROR : return "42000"; #endif -#ifdef ER_NET_READ_ERROR_FROM_PIPE - case ER_NET_READ_ERROR_FROM_PIPE : return "08S01"; +#ifdef ER_ABORTING_CONNECTION + case ER_ABORTING_CONNECTION : return "08S01"; #endif -#ifdef ER_NET_FCNTL_ERROR - case ER_NET_FCNTL_ERROR : return "08S01"; +#ifdef ER_NET_PACKET_TOO_LARGE + case ER_NET_PACKET_TOO_LARGE : return "08S01"; #endif -#ifdef ER_NET_PACKETS_OUT_OF_ORDER - case ER_NET_PACKETS_OUT_OF_ORDER : return "08S01"; +#ifdef ER_NET_READ_ERROR_FROM_PIPE + case ER_NET_READ_ERROR_FROM_PIPE : return "08S01"; #endif -#ifdef ER_NET_UNCOMPRESS_ERROR - case ER_NET_UNCOMPRESS_ERROR : return "08S01"; +#ifdef ER_NET_FCNTL_ERROR + case ER_NET_FCNTL_ERROR : return "08S01"; #endif -#ifdef ER_NET_READ_ERROR - case ER_NET_READ_ERROR : return "08S01"; +#ifdef ER_NET_PACKETS_OUT_OF_ORDER + case ER_NET_PACKETS_OUT_OF_ORDER : return "08S01"; #endif -#ifdef ER_NET_READ_INTERRUPTED - case ER_NET_READ_INTERRUPTED : return "08S01"; +#ifdef ER_NET_UNCOMPRESS_ERROR + case ER_NET_UNCOMPRESS_ERROR : return "08S01"; #endif -#ifdef ER_NET_ERROR_ON_WRITE - case ER_NET_ERROR_ON_WRITE : return "08S01"; +#ifdef ER_NET_READ_ERROR + case ER_NET_READ_ERROR : return "08S01"; #endif -#ifdef ER_NET_WRITE_INTERRUPTED - case ER_NET_WRITE_INTERRUPTED : return "08S01"; +#ifdef ER_NET_READ_INTERRUPTED + case ER_NET_READ_INTERRUPTED : return "08S01"; #endif -#ifdef ER_TOO_LONG_STRING - case ER_TOO_LONG_STRING : return "42000"; +#ifdef ER_NET_ERROR_ON_WRITE + case ER_NET_ERROR_ON_WRITE : return "08S01"; #endif -#ifdef ER_TABLE_CANT_HANDLE_BLOB - case ER_TABLE_CANT_HANDLE_BLOB : return "42000"; +#ifdef ER_NET_WRITE_INTERRUPTED + case ER_NET_WRITE_INTERRUPTED : return "08S01"; #endif -#ifdef ER_TABLE_CANT_HANDLE_AUTO_INCREMENT - case ER_TABLE_CANT_HANDLE_AUTO_INCREMENT : return "42000"; +#ifdef ER_TOO_LONG_STRING + case ER_TOO_LONG_STRING : return "42000"; #endif -#ifdef ER_WRONG_COLUMN_NAME - case ER_WRONG_COLUMN_NAME : return "42000"; +#ifdef ER_TABLE_CANT_HANDLE_BLOB + case ER_TABLE_CANT_HANDLE_BLOB : return "42000"; #endif -#ifdef ER_WRONG_KEY_COLUMN - case ER_WRONG_KEY_COLUMN : return "42000"; +#ifdef ER_TABLE_CANT_HANDLE_AUTO_INCREMENT + case ER_TABLE_CANT_HANDLE_AUTO_INCREMENT : return "42000"; #endif -#ifdef ER_DUP_UNIQUE - case ER_DUP_UNIQUE : return "23000"; +#ifdef ER_WRONG_COLUMN_NAME + case ER_WRONG_COLUMN_NAME : return "42000"; #endif -#ifdef ER_BLOB_KEY_WITHOUT_LENGTH - case ER_BLOB_KEY_WITHOUT_LENGTH : return "42000"; +#ifdef ER_WRONG_KEY_COLUMN + case ER_WRONG_KEY_COLUMN : return "42000"; #endif -#ifdef ER_PRIMARY_CANT_HAVE_NULL - case ER_PRIMARY_CANT_HAVE_NULL : return "42000"; +#ifdef ER_DUP_UNIQUE + case ER_DUP_UNIQUE : return "23000"; #endif -#ifdef ER_TOO_MANY_ROWS - case ER_TOO_MANY_ROWS : return "42000"; +#ifdef ER_BLOB_KEY_WITHOUT_LENGTH + case ER_BLOB_KEY_WITHOUT_LENGTH : return "42000"; #endif -#ifdef ER_REQUIRES_PRIMARY_KEY - case ER_REQUIRES_PRIMARY_KEY : return "42000"; +#ifdef ER_PRIMARY_CANT_HAVE_NULL + case ER_PRIMARY_CANT_HAVE_NULL : return "42000"; #endif -#ifdef ER_CHECK_NO_SUCH_TABLE - case ER_CHECK_NO_SUCH_TABLE : return "42000"; +#ifdef ER_TOO_MANY_ROWS + case ER_TOO_MANY_ROWS : return "42000"; #endif -#ifdef ER_CHECK_NOT_IMPLEMENTED - case ER_CHECK_NOT_IMPLEMENTED : return "42000"; +#ifdef ER_REQUIRES_PRIMARY_KEY + case ER_REQUIRES_PRIMARY_KEY : return "42000"; #endif -#ifdef ER_CANT_DO_THIS_DURING_AN_TRANSACTION - case ER_CANT_DO_THIS_DURING_AN_TRANSACTION: return "25000"; +#ifdef ER_KEY_DOES_NOT_EXITS + case ER_KEY_DOES_NOT_EXITS : return "42000"; #endif -#ifdef ER_NEW_ABORTING_CONNECTION - case ER_NEW_ABORTING_CONNECTION : return "08S01"; +#ifdef ER_CHECK_NO_SUCH_TABLE + case ER_CHECK_NO_SUCH_TABLE : return "42000"; #endif -#ifdef ER_MASTER_NET_READ - case ER_MASTER_NET_READ : return "08S01"; +#ifdef ER_CHECK_NOT_IMPLEMENTED + case ER_CHECK_NOT_IMPLEMENTED : return "42000"; #endif -#ifdef ER_MASTER_NET_WRITE - case ER_MASTER_NET_WRITE : return "08S01"; +#ifdef ER_CANT_DO_THIS_DURING_AN_TRANSACTION + case ER_CANT_DO_THIS_DURING_AN_TRANSACTION : return "25000"; #endif -#ifdef ER_TOO_MANY_USER_CONNECTIONS - case ER_TOO_MANY_USER_CONNECTIONS : return "42000"; +#ifdef ER_NEW_ABORTING_CONNECTION + case ER_NEW_ABORTING_CONNECTION : return "08S01"; #endif -#ifdef ER_READ_ONLY_TRANSACTION - case ER_READ_ONLY_TRANSACTION : return "25000"; +#ifdef ER_MASTER_NET_READ + case ER_MASTER_NET_READ : return "08S01"; #endif -#ifdef ER_LOCK_DEADLOCK - case ER_LOCK_DEADLOCK : return "40001"; +#ifdef ER_MASTER_NET_WRITE + case ER_MASTER_NET_WRITE : return "08S01"; #endif -#ifdef ER_NO_REFERENCED_ROW - case ER_NO_REFERENCED_ROW : return "23000"; +#ifdef ER_TOO_MANY_USER_CONNECTIONS + case ER_TOO_MANY_USER_CONNECTIONS : return "42000"; #endif -#ifdef ER_ROW_IS_REFERENCED - case ER_ROW_IS_REFERENCED : return "23000"; +#ifdef ER_READ_ONLY_TRANSACTION + case ER_READ_ONLY_TRANSACTION : return "25000"; #endif -#ifdef ER_CONNECT_TO_MASTER - case ER_CONNECT_TO_MASTER : return "08S01"; +#ifdef ER_NO_PERMISSION_TO_CREATE_USER + case ER_NO_PERMISSION_TO_CREATE_USER : return "42000"; #endif -#ifdef ER_USER_LIMIT_REACHED - case ER_USER_LIMIT_REACHED : return "42000"; +#ifdef ER_LOCK_DEADLOCK + case ER_LOCK_DEADLOCK : return "40001"; #endif -#ifdef ER_NO_DEFAULT - case ER_NO_DEFAULT : return "42000"; +#ifdef ER_NO_REFERENCED_ROW + case ER_NO_REFERENCED_ROW : return "23000"; #endif -#ifdef ER_WRONG_VALUE_FOR_VAR - case ER_WRONG_VALUE_FOR_VAR : return "42000"; +#ifdef ER_ROW_IS_REFERENCED + case ER_ROW_IS_REFERENCED : return "23000"; #endif -#ifdef ER_WRONG_TYPE_FOR_VAR - case ER_WRONG_TYPE_FOR_VAR : return "42000"; +#ifdef ER_CONNECT_TO_MASTER + case ER_CONNECT_TO_MASTER : return "08S01"; #endif -#ifdef ER_CANT_USE_OPTION_HERE - case ER_CANT_USE_OPTION_HERE : return "42000"; +#ifdef ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT + case ER_WRONG_NUMBER_OF_COLUMNS_IN_SELECT : return "21000"; #endif -#ifdef ER_NOT_SUPPORTED_YET - case ER_NOT_SUPPORTED_YET : return "42000"; +#ifdef ER_USER_LIMIT_REACHED + case ER_USER_LIMIT_REACHED : return "42000"; #endif -#ifdef ER_WRONG_FK_DEF - case ER_WRONG_FK_DEF : return "42000"; +#ifdef ER_SPECIFIC_ACCESS_DENIED_ERROR + case ER_SPECIFIC_ACCESS_DENIED_ERROR : return "42000"; #endif -#ifdef ER_OPERAND_COLUMNS - case ER_OPERAND_COLUMNS : return "21000"; +#ifdef ER_NO_DEFAULT + case ER_NO_DEFAULT : return "42000"; #endif -#ifdef ER_SUBQUERY_NO_1_ROW - case ER_SUBQUERY_NO_1_ROW : return "21000"; +#ifdef ER_WRONG_VALUE_FOR_VAR + case ER_WRONG_VALUE_FOR_VAR : return "42000"; #endif -#ifdef ER_ILLEGAL_REFERENCE - case ER_ILLEGAL_REFERENCE : return "42S22"; +#ifdef ER_WRONG_TYPE_FOR_VAR + case ER_WRONG_TYPE_FOR_VAR : return "42000"; #endif -#ifdef ER_DERIVED_MUST_HAVE_ALIAS - case ER_DERIVED_MUST_HAVE_ALIAS : return "42000"; +#ifdef ER_CANT_USE_OPTION_HERE + case ER_CANT_USE_OPTION_HERE : return "42000"; #endif -#ifdef ER_SELECT_REDUCED - case ER_SELECT_REDUCED : return "01000"; +#ifdef ER_NOT_SUPPORTED_YET + case ER_NOT_SUPPORTED_YET : return "42000"; #endif -#ifdef ER_TABLENAME_NOT_ALLOWED_HERE - case ER_TABLENAME_NOT_ALLOWED_HERE : return "42000"; +#ifdef ER_WRONG_FK_DEF + case ER_WRONG_FK_DEF : return "42000"; #endif -#ifdef ER_NOT_SUPPORTED_AUTH_MODE - case ER_NOT_SUPPORTED_AUTH_MODE : return "08004"; +#ifdef ER_OPERAND_COLUMNS + case ER_OPERAND_COLUMNS : return "21000"; #endif -#ifdef ER_SPATIAL_CANT_HAVE_NULL - case ER_SPATIAL_CANT_HAVE_NULL : return "42000"; +#ifdef ER_SUBQUERY_NO_1_ROW + case ER_SUBQUERY_NO_1_ROW : return "21000"; #endif -#ifdef ER_COLLATION_CHARSET_MISMATCH - case ER_COLLATION_CHARSET_MISMATCH : return "42000"; +#ifdef ER_ILLEGAL_REFERENCE + case ER_ILLEGAL_REFERENCE : return "42S22"; #endif -#ifdef ER_WARN_TOO_FEW_RECORDS - case ER_WARN_TOO_FEW_RECORDS : return "01000"; +#ifdef ER_DERIVED_MUST_HAVE_ALIAS + case ER_DERIVED_MUST_HAVE_ALIAS : return "42000"; #endif -#ifdef ER_WARN_TOO_MANY_RECORDS - case ER_WARN_TOO_MANY_RECORDS : return "01000"; +#ifdef ER_SELECT_REDUCED + case ER_SELECT_REDUCED : return "01000"; #endif -#ifdef ER_WARN_NULL_TO_NOTNULL - case ER_WARN_NULL_TO_NOTNULL : return "01000"; +#ifdef ER_TABLENAME_NOT_ALLOWED_HERE + case ER_TABLENAME_NOT_ALLOWED_HERE : return "42000"; #endif -#ifdef ER_WARN_DATA_OUT_OF_RANGE - case ER_WARN_DATA_OUT_OF_RANGE : return "01000"; +#ifdef ER_NOT_SUPPORTED_AUTH_MODE + case ER_NOT_SUPPORTED_AUTH_MODE : return "08004"; #endif -#ifdef ER_WARN_DATA_TRUNCATED - case ER_WARN_DATA_TRUNCATED : return "01000"; +#ifdef ER_SPATIAL_CANT_HAVE_NULL + case ER_SPATIAL_CANT_HAVE_NULL : return "42000"; #endif -#ifdef ER_WRONG_NAME_FOR_INDEX - case ER_WRONG_NAME_FOR_INDEX : return "42000"; +#ifdef ER_COLLATION_CHARSET_MISMATCH + case ER_COLLATION_CHARSET_MISMATCH : return "42000"; #endif -#ifdef ER_WRONG_NAME_FOR_CATALOG - case ER_WRONG_NAME_FOR_CATALOG : return "42000"; +#ifdef ER_WARN_TOO_FEW_RECORDS + case ER_WARN_TOO_FEW_RECORDS : return "01000"; #endif -#ifdef ER_UNKNOWN_STORAGE_ENGINE - case ER_UNKNOWN_STORAGE_ENGINE : return "42000"; +#ifdef ER_WARN_TOO_MANY_RECORDS + case ER_WARN_TOO_MANY_RECORDS : return "01000"; +#endif +#ifdef ER_WARN_NULL_TO_NOTNULL + case ER_WARN_NULL_TO_NOTNULL : return "22004"; +#endif +#ifdef ER_WARN_DATA_OUT_OF_RANGE + case ER_WARN_DATA_OUT_OF_RANGE : return "22003"; +#endif +#ifdef ER_WRONG_NAME_FOR_INDEX + case ER_WRONG_NAME_FOR_INDEX : return "42000"; +#endif +#ifdef ER_WRONG_NAME_FOR_CATALOG + case ER_WRONG_NAME_FOR_CATALOG : return "42000"; +#endif +#ifdef ER_UNKNOWN_STORAGE_ENGINE + case ER_UNKNOWN_STORAGE_ENGINE : return "42000"; +#endif +#ifdef ER_TRUNCATED_WRONG_VALUE + case ER_TRUNCATED_WRONG_VALUE : return "22007"; +#endif +#ifdef ER_SP_NO_RECURSIVE_CREATE + case ER_SP_NO_RECURSIVE_CREATE : return "2F003"; +#endif +#ifdef ER_SP_ALREADY_EXISTS + case ER_SP_ALREADY_EXISTS : return "42000"; +#endif +#ifdef ER_SP_DOES_NOT_EXIST + case ER_SP_DOES_NOT_EXIST : return "42000"; +#endif +#ifdef ER_SP_LILABEL_MISMATCH + case ER_SP_LILABEL_MISMATCH : return "42000"; +#endif +#ifdef ER_SP_LABEL_REDEFINE + case ER_SP_LABEL_REDEFINE : return "42000"; +#endif +#ifdef ER_SP_LABEL_MISMATCH + case ER_SP_LABEL_MISMATCH : return "42000"; +#endif +#ifdef ER_SP_UNINIT_VAR + case ER_SP_UNINIT_VAR : return "01000"; +#endif +#ifdef ER_SP_BADSELECT + case ER_SP_BADSELECT : return "0A000"; +#endif +#ifdef ER_SP_BADRETURN + case ER_SP_BADRETURN : return "42000"; +#endif +#ifdef ER_SP_BADSTATEMENT + case ER_SP_BADSTATEMENT : return "0A000"; +#endif +#ifdef ER_UPDATE_LOG_DEPRECATED_IGNORED + case ER_UPDATE_LOG_DEPRECATED_IGNORED : return "42000"; +#endif +#ifdef ER_UPDATE_LOG_DEPRECATED_TRANSLATED + case ER_UPDATE_LOG_DEPRECATED_TRANSLATED : return "42000"; +#endif +#ifdef ER_QUERY_INTERRUPTED + case ER_QUERY_INTERRUPTED : return "70100"; +#endif +#ifdef ER_SP_WRONG_NO_OF_ARGS + case ER_SP_WRONG_NO_OF_ARGS : return "42000"; +#endif +#ifdef ER_SP_COND_MISMATCH + case ER_SP_COND_MISMATCH : return "42000"; +#endif +#ifdef ER_SP_NORETURN + case ER_SP_NORETURN : return "42000"; +#endif +#ifdef ER_SP_NORETURNEND + case ER_SP_NORETURNEND : return "2F005"; +#endif +#ifdef ER_SP_BAD_CURSOR_QUERY + case ER_SP_BAD_CURSOR_QUERY : return "42000"; +#endif +#ifdef ER_SP_BAD_CURSOR_SELECT + case ER_SP_BAD_CURSOR_SELECT : return "42000"; +#endif +#ifdef ER_SP_CURSOR_MISMATCH + case ER_SP_CURSOR_MISMATCH : return "42000"; +#endif +#ifdef ER_SP_CURSOR_ALREADY_OPEN + case ER_SP_CURSOR_ALREADY_OPEN : return "24000"; +#endif +#ifdef ER_SP_CURSOR_NOT_OPEN + case ER_SP_CURSOR_NOT_OPEN : return "24000"; +#endif +#ifdef ER_SP_UNDECLARED_VAR + case ER_SP_UNDECLARED_VAR : return "42000"; +#endif +#ifdef ER_SP_FETCH_NO_DATA + case ER_SP_FETCH_NO_DATA : return "02000"; +#endif +#ifdef ER_SP_DUP_PARAM + case ER_SP_DUP_PARAM : return "42000"; +#endif +#ifdef ER_SP_DUP_VAR + case ER_SP_DUP_VAR : return "42000"; +#endif +#ifdef ER_SP_DUP_COND + case ER_SP_DUP_COND : return "42000"; +#endif +#ifdef ER_SP_DUP_CURS + case ER_SP_DUP_CURS : return "42000"; +#endif +#ifdef ER_SP_SUBSELECT_NYI + case ER_SP_SUBSELECT_NYI : return "0A000"; +#endif +#ifdef ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG + case ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG : return "0A000"; +#endif +#ifdef ER_SP_VARCOND_AFTER_CURSHNDLR + case ER_SP_VARCOND_AFTER_CURSHNDLR : return "42000"; +#endif +#ifdef ER_SP_CURSOR_AFTER_HANDLER + case ER_SP_CURSOR_AFTER_HANDLER : return "42000"; +#endif +#ifdef ER_SP_CASE_NOT_FOUND + case ER_SP_CASE_NOT_FOUND : return "20000"; +#endif +#ifdef ER_DIVISION_BY_ZERO + case ER_DIVISION_BY_ZERO : return "22012"; +#endif +#ifdef ER_ILLEGAL_VALUE_FOR_TYPE + case ER_ILLEGAL_VALUE_FOR_TYPE : return "22007"; +#endif +#ifdef ER_PROCACCESS_DENIED_ERROR + case ER_PROCACCESS_DENIED_ERROR : return "42000"; +#endif +#ifdef ER_XAER_NOTA + case ER_XAER_NOTA : return "XAE04"; +#endif +#ifdef ER_XAER_INVAL + case ER_XAER_INVAL : return "XAE05"; +#endif +#ifdef ER_XAER_RMFAIL + case ER_XAER_RMFAIL : return "XAE07"; +#endif +#ifdef ER_XAER_OUTSIDE + case ER_XAER_OUTSIDE : return "XAE09"; +#endif +#ifdef ER_XAER_RMERR + case ER_XAER_RMERR : return "XAE03"; +#endif +#ifdef ER_XA_RBROLLBACK + case ER_XA_RBROLLBACK : return "XA100"; +#endif +#ifdef ER_NONEXISTING_PROC_GRANT + case ER_NONEXISTING_PROC_GRANT : return "42000"; +#endif +#ifdef ER_DATA_TOO_LONG + case ER_DATA_TOO_LONG : return "22001"; +#endif +#ifdef ER_SP_BAD_SQLSTATE + case ER_SP_BAD_SQLSTATE : return "42000"; +#endif +#ifdef ER_CANT_CREATE_USER_WITH_GRANT + case ER_CANT_CREATE_USER_WITH_GRANT : return "42000"; +#endif +#ifdef ER_SP_DUP_HANDLER + case ER_SP_DUP_HANDLER : return "42000"; +#endif +#ifdef ER_SP_NOT_VAR_ARG + case ER_SP_NOT_VAR_ARG : return "42000"; +#endif +#ifdef ER_SP_NO_RETSET + case ER_SP_NO_RETSET : return "0A000"; +#endif +#ifdef ER_CANT_CREATE_GEOMETRY_OBJECT + case ER_CANT_CREATE_GEOMETRY_OBJECT : return "22003"; +#endif +#ifdef ER_TOO_BIG_SCALE + case ER_TOO_BIG_SCALE : return "42000"; +#endif +#ifdef ER_TOO_BIG_PRECISION + case ER_TOO_BIG_PRECISION : return "42000"; +#endif +#ifdef ER_M_BIGGER_THAN_D + case ER_M_BIGGER_THAN_D : return "42000"; +#endif +#ifdef ER_TOO_LONG_BODY + case ER_TOO_LONG_BODY : return "42000"; +#endif +#ifdef ER_TOO_BIG_DISPLAYWIDTH + case ER_TOO_BIG_DISPLAYWIDTH : return "42000"; +#endif +#ifdef ER_XAER_DUPID + case ER_XAER_DUPID : return "XAE08"; +#endif +#ifdef ER_DATETIME_FUNCTION_OVERFLOW + case ER_DATETIME_FUNCTION_OVERFLOW : return "22008"; +#endif +#ifdef ER_ROW_IS_REFERENCED_2 + case ER_ROW_IS_REFERENCED_2 : return "23000"; +#endif +#ifdef ER_NO_REFERENCED_ROW_2 + case ER_NO_REFERENCED_ROW_2 : return "23000"; +#endif +#ifdef ER_SP_BAD_VAR_SHADOW + case ER_SP_BAD_VAR_SHADOW : return "42000"; +#endif +#ifdef ER_SP_WRONG_NAME + case ER_SP_WRONG_NAME : return "42000"; +#endif +#ifdef ER_SP_NO_AGGREGATE + case ER_SP_NO_AGGREGATE : return "42000"; +#endif +#ifdef ER_MAX_PREPARED_STMT_COUNT_REACHED + case ER_MAX_PREPARED_STMT_COUNT_REACHED : return "42000"; +#endif +#ifdef ER_NON_GROUPING_FIELD_USED + case ER_NON_GROUPING_FIELD_USED : return "42000"; +#endif +#ifdef ER_FOREIGN_DUPLICATE_KEY + case ER_FOREIGN_DUPLICATE_KEY : return "23000"; +#endif +#ifdef ER_CANT_CHANGE_TX_ISOLATION + case ER_CANT_CHANGE_TX_ISOLATION : return "25001"; +#endif +#ifdef ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT + case ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT : return "42000"; +#endif +#ifdef ER_WRONG_PARAMETERS_TO_NATIVE_FCT + case ER_WRONG_PARAMETERS_TO_NATIVE_FCT : return "42000"; +#endif +#ifdef ER_WRONG_PARAMETERS_TO_STORED_FCT + case ER_WRONG_PARAMETERS_TO_STORED_FCT : return "42000"; +#endif +#ifdef ER_DUP_ENTRY_WITH_KEY_NAME + case ER_DUP_ENTRY_WITH_KEY_NAME : return "23000"; +#endif +#ifdef ER_XA_RBTIMEOUT + case ER_XA_RBTIMEOUT : return "XA106"; +#endif +#ifdef ER_XA_RBDEADLOCK + case ER_XA_RBDEADLOCK : return "XA102"; +#endif +#ifdef ER_FUNC_INEXISTENT_NAME_COLLISION + case ER_FUNC_INEXISTENT_NAME_COLLISION : return "42000"; +#endif +#ifdef ER_DUP_SIGNAL_SET + case ER_DUP_SIGNAL_SET : return "42000"; +#endif +#ifdef ER_SIGNAL_WARN + case ER_SIGNAL_WARN : return "01000"; +#endif +#ifdef ER_SIGNAL_NOT_FOUND + case ER_SIGNAL_NOT_FOUND : return "02000"; +#endif +#ifdef ER_SIGNAL_EXCEPTION + case ER_SIGNAL_EXCEPTION : return "HY000"; +#endif +#ifdef ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER + case ER_RESIGNAL_WITHOUT_ACTIVE_HANDLER : return "0K000"; +#endif +#ifdef ER_SPATIAL_MUST_HAVE_GEOM_COL + case ER_SPATIAL_MUST_HAVE_GEOM_COL : return "42000"; +#endif +#ifdef ER_DATA_OUT_OF_RANGE + case ER_DATA_OUT_OF_RANGE : return "22003"; #endif diff --git a/ext/pdo_mysql/tests/mysql_pdo_test.inc b/ext/pdo_mysql/tests/mysql_pdo_test.inc index 0af2e6df6..115aeadc5 100644 --- a/ext/pdo_mysql/tests/mysql_pdo_test.inc +++ b/ext/pdo_mysql/tests/mysql_pdo_test.inc @@ -141,12 +141,19 @@ class MySQLPDOTest extends PDOTest { } - static function detect_transactional_mysql_engine($db) { + static function detect_transactional_mysql_engine($db) { foreach ($db->query("show variables like 'have%'") as $row) { - if ($row[1] == 'YES' && ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) { + if (!empty($row) && $row[1] == 'YES' && ($row[0] == 'have_innodb' || $row[0] == 'have_bdb')) { return str_replace("have_", "", $row[0]); } } + /* MySQL 5.6.1+ */ + foreach ($db->query("SHOW ENGINES") as $row) { + if (isset($row['engine']) && isset($row['support'])) { + if ('InnoDB' == $row['engine'] && ('YES' == $row['support'] || 'DEFAULT' == $row['support'])) + return 'innodb'; + } + } return false; } diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt index 46015533d..9092004fe 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct.phpt @@ -294,7 +294,7 @@ MySQLPDOTest::skip(); [005] invalid data source name, [n/a] n/a [006] invalid data source name, [n/a] n/a [007] could not find driver, [n/a] n/a -[009] SQLSTATE[28000] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a -[010] SQLSTATE[28000] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a +[009] SQLSTATE[%s] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a +[010] SQLSTATE[%s] [1045] Access denied for user 'dont%s'@'%s' (using password: YES), [n/a] n/a [017] DSN=%s, SQLSTATE[%s] [%d] %s [033] DSN = mysql:%s, character sets has not been set, @@character_set_connection reports 'latin1', expecting 'latin2'done! diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt index ea25cdc32..29b3c11f7 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt @@ -3,6 +3,8 @@ MySQL PDO->__construct(), options --SKIPIF-- <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); +require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); +MySQLPDOTest::skip(); ?> --FILE-- <?php diff --git a/ext/pdo_mysql/tests/pdo_mysql_interface.phpt b/ext/pdo_mysql/tests/pdo_mysql_interface.phpt index 9e13908a5..24b19ae3f 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_interface.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_interface.phpt @@ -4,7 +4,8 @@ MySQL PDO class interface <?php require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'skipif.inc'); require_once(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc'); -$db = MySQLPDOTest::getDriver(); +MySQLPDOTest::skip(); +$db = MySQLPDOTest::factory(); if (false == MySQLPDOTest::detect_transactional_mysql_engine($db)) die("skip Transactional engine not found"); ?> diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 0544a2934..cb1e89267 100755 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci_driver.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: oci_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -141,12 +141,27 @@ ub4 _oci_error(OCIError *err, pdo_dbh_t *dbh, pdo_stmt_t *stmt, char *what, swor case 12154: /* ORA-12154: TNS:could not resolve service name */ strcpy(*pdo_err, "42S02"); break; - - case 22: /* ORA-00022: invalid session id */ - case 1012: /* ORA-01012: */ - case 3113: /* ORA-03133: end of file on communication channel */ - case 604: - case 1041: + + case 22: /* ORA-00022: invalid session id */ + case 378: + case 602: + case 603: + case 604: + case 609: + case 1012: /* ORA-01012: */ + case 1033: + case 1041: + case 1043: + case 1089: + case 1090: + case 1092: + case 3113: /* ORA-03133: end of file on communication channel */ + case 3114: + case 3122: + case 3135: + case 12153: + case 27146: + case 28511: /* consider the connection closed */ dbh->is_closed = 1; H->attached = 0; @@ -516,6 +531,43 @@ static int oci_handle_get_attribute(pdo_dbh_t *dbh, long attr, zval *return_valu } /* }}} */ +static int pdo_oci_check_liveness(pdo_dbh_t *dbh TSRMLS_DC) /* {{{ */ +{ + pdo_oci_db_handle *H = (pdo_oci_db_handle *)dbh->driver_data; + sb4 error_code = 0; + char version[256]; + + /* TODO move attached check to PDO level */ + if (H->attached == 0) { + return FAILURE; + } + /* TODO add persistent_timeout check at PDO level */ + + + /* Use OCIPing instead of OCIServerVersion. If OCIPing returns ORA-1010 (invalid OCI operation) + * such as from Pre-10.1 servers, the error is still from the server and we would have + * successfully performed a roundtrip and validated the connection. Use OCIServerVersion for + * Pre-10.2 clients + */ +#if ((OCI_MAJOR_VERSION > 10) || ((OCI_MAJOR_VERSION == 10) && (OCI_MINOR_VERSION >= 2))) /* OCIPing available 10.2 onwards */ + H->last_err = OCIPing (H->svc, H->err, OCI_DEFAULT); +#else + /* use good old OCIServerVersion() */ + H->last_err = OCIServerVersion (H->svc, H->err, (text *)version, sizeof(version), OCI_HTYPE_SVCCTX); +#endif + if (H->last_err == OCI_SUCCESS) { + return SUCCESS; + } + + OCIErrorGet (H->err, (ub4)1, NULL, &error_code, NULL, 0, OCI_HTYPE_ERROR); + + if (error_code == 1010) { + return SUCCESS; + } + return FAILURE; +} +/* }}} */ + static struct pdo_dbh_methods oci_methods = { oci_handle_closer, oci_handle_preparer, @@ -528,7 +580,7 @@ static struct pdo_dbh_methods oci_methods = { NULL, pdo_oci_fetch_error_func, oci_handle_get_attribute, - NULL, /* check_liveness */ + pdo_oci_check_liveness, /* check_liveness */ NULL /* get_driver_methods */ }; @@ -675,6 +727,7 @@ static inline ub4 pdo_oci_sanitize_prefetch(long prefetch) /* {{{ */ } /* }}} */ + /* * Local variables: * tab-width: 4 diff --git a/ext/pdo_oci/oci_statement.c b/ext/pdo_oci/oci_statement.c index 5608b0c07..a1e489e5a 100755 --- a/ext/pdo_oci/oci_statement.c +++ b/ext/pdo_oci/oci_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci_statement.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: oci_statement.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_oci/pdo_oci.c b/ext/pdo_oci/pdo_oci.c index ebd5591cd..be76ffcd1 100755 --- a/ext/pdo_oci/pdo_oci.c +++ b/ext/pdo_oci/pdo_oci.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_oci.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_oci.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_oci/php_pdo_oci.h b/ext/pdo_oci/php_pdo_oci.h index 9e26438df..074dc5753 100755 --- a/ext/pdo_oci/php_pdo_oci.h +++ b/ext/pdo_oci/php_pdo_oci.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_oci.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_oci.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_OCI_H #define PHP_PDO_OCI_H diff --git a/ext/pdo_oci/php_pdo_oci_int.h b/ext/pdo_oci/php_pdo_oci_int.h index ea47648b0..4c707cf10 100755 --- a/ext/pdo_oci/php_pdo_oci_int.h +++ b/ext/pdo_oci/php_pdo_oci_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_oci_int.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_oci_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #include <oci.h> diff --git a/ext/pdo_oci/tests/bug46274.phpt b/ext/pdo_oci/tests/bug46274.phpt index 23ee8ee20..77f2a0115 100644 --- a/ext/pdo_oci/tests/bug46274.phpt +++ b/ext/pdo_oci/tests/bug46274.phpt @@ -56,6 +56,8 @@ var_dump($res->fetch()); $db->exec("DROP TABLE test_one_blob"); ?> +--XFAIL-- +Corrupts memory --EXPECTF-- array(2) { ["blob1"]=> diff --git a/ext/pdo_oci/tests/bug46274_2.phpt b/ext/pdo_oci/tests/bug46274_2.phpt index cbadcef4f..9e9225415 100644 --- a/ext/pdo_oci/tests/bug46274_2.phpt +++ b/ext/pdo_oci/tests/bug46274_2.phpt @@ -60,6 +60,8 @@ fclose($row[0]); $db->exec("DROP TABLE test_one_blob"); ?> +--XFAIL-- +Corrupts memory --EXPECTF-- array(2) { ["blob1"]=> diff --git a/ext/pdo_oci/tests/common.phpt b/ext/pdo_oci/tests/common.phpt index 413b57bbf..5107828ce 100644 --- a/ext/pdo_oci/tests/common.phpt +++ b/ext/pdo_oci/tests/common.phpt @@ -18,9 +18,9 @@ if (false !== getenv('PDO_OCI_TEST_DSN')) { $config['ENV']['PDOTEST_PASS'] = getenv('PDO_OCI_TEST_PASS'); $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_OCI_TEST_ATTR'); } else { - $config['ENV']['PDOTEST_DSN'] = 'oci:dbname=test'; + $config['ENV']['PDOTEST_DSN'] = 'oci:dbname=localhost/xe;charset=WE8MSWIN1252'; $config['ENV']['PDOTEST_USER'] = 'SYSTEM'; - $config['ENV']['PDOTEST_PASS'] = 'PASSWORD'; + $config['ENV']['PDOTEST_PASS'] = 'oracle'; } return $config; diff --git a/ext/pdo_oci/tests/pdo_oci_fread_1.phpt b/ext/pdo_oci/tests/pdo_oci_fread_1.phpt index 9604ef586..26a92f01b 100644 --- a/ext/pdo_oci/tests/pdo_oci_fread_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_fread_1.phpt @@ -4,6 +4,7 @@ PDO_OCI: check fread() EOF <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=we8mswin1252')) die('skip expected output valid for WE8MSWIN1252 character set'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_oci/tests/pdo_oci_stream_1.phpt b/ext/pdo_oci/tests/pdo_oci_stream_1.phpt index d054f88d4..27a28b9bb 100644 --- a/ext/pdo_oci/tests/pdo_oci_stream_1.phpt +++ b/ext/pdo_oci/tests/pdo_oci_stream_1.phpt @@ -4,6 +4,7 @@ PDO_OCI: stream_get_contents length & offset test <?php if (!extension_loaded('pdo') || !extension_loaded('pdo_oci')) die('skip not loaded'); require(dirname(__FILE__).'/../../pdo/tests/pdo_test.inc'); +if (!strpos(strtolower(getenv('PDOTEST_DSN')), 'charset=we8mswin1252')) die('skip expected output valid for WE8MSWIN1252 character set'); PDOTest::skip(); ?> --FILE-- diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index 8eea0c66a..b9b69310c 100755 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: odbc_driver.c 312506 2011-06-27 01:36:39Z felipe $ */ +/* $Id: odbc_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_odbc/odbc_stmt.c b/ext/pdo_odbc/odbc_stmt.c index fb7605486..d80c70d0d 100755 --- a/ext/pdo_odbc/odbc_stmt.c +++ b/ext/pdo_odbc/odbc_stmt.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: odbc_stmt.c 312506 2011-06-27 01:36:39Z felipe $ */ +/* $Id: odbc_stmt.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_odbc/pdo_odbc.c b/ext/pdo_odbc/pdo_odbc.c index 046bf4c3a..31e4403ae 100755 --- a/ext/pdo_odbc/pdo_odbc.c +++ b/ext/pdo_odbc/pdo_odbc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_odbc.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_odbc.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_odbc/php_pdo_odbc.h b/ext/pdo_odbc/php_pdo_odbc.h index dcea1e56e..eef6c43a1 100644 --- a/ext/pdo_odbc/php_pdo_odbc.h +++ b/ext/pdo_odbc/php_pdo_odbc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_odbc.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_odbc.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_ODBC_H #define PHP_PDO_ODBC_H diff --git a/ext/pdo_odbc/php_pdo_odbc_int.h b/ext/pdo_odbc/php_pdo_odbc_int.h index 2f9a6cc60..a16d63489 100755 --- a/ext/pdo_odbc/php_pdo_odbc_int.h +++ b/ext/pdo_odbc/php_pdo_odbc_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.0 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_odbc_int.h 312506 2011-06-27 01:36:39Z felipe $ */ +/* $Id: php_pdo_odbc_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef PHP_WIN32 # define PDO_ODBC_TYPE "Win32" diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index 3ad08ad23..2c53624b7 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_pgsql.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_pgsql.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -116,7 +116,7 @@ PHP_MINFO_FUNCTION(pdo_pgsql) php_info_print_table_row(2, "PostgreSQL(libpq) Version", PG_VERSION); #endif php_info_print_table_row(2, "Module version", pdo_pgsql_module_entry.version); - php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c 314376 2011-08-06 14:47:44Z felipe $ "); + php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c 321634 2012-01-01 13:15:04Z felipe $ "); php_info_print_table_end(); } diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 44df82b27..78cc926b1 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql_driver.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: pgsql_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_pgsql/pgsql_statement.c b/ext/pdo_pgsql/pgsql_statement.c index e70387413..7cc9d86f0 100644 --- a/ext/pdo_pgsql/pgsql_statement.c +++ b/ext/pdo_pgsql/pgsql_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql_statement.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pgsql_statement.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_pgsql/php_pdo_pgsql.h b/ext/pdo_pgsql/php_pdo_pgsql.h index ccc4fc9c6..b5f3dba5b 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql.h +++ b/ext/pdo_pgsql/php_pdo_pgsql.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_pgsql.h 311631 2011-05-31 08:59:32Z iliaa $ */ +/* $Id: php_pdo_pgsql.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_PGSQL_H #define PHP_PDO_PGSQL_H diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index 8c2b9c0e4..1d4424255 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_pgsql_int.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_pgsql_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_PGSQL_INT_H #define PHP_PDO_PGSQL_INT_H diff --git a/ext/pdo_sqlite/pdo_sqlite.c b/ext/pdo_sqlite/pdo_sqlite.c index 9ac167a8b..534727514 100644 --- a/ext/pdo_sqlite/pdo_sqlite.c +++ b/ext/pdo_sqlite/pdo_sqlite.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlite.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: pdo_sqlite.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_sqlite/php_pdo_sqlite.h b/ext/pdo_sqlite/php_pdo_sqlite.h index 3adeab1b2..8c33801e7 100644 --- a/ext/pdo_sqlite/php_pdo_sqlite.h +++ b/ext/pdo_sqlite/php_pdo_sqlite.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_sqlite.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_sqlite.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_SQLITE_H diff --git a/ext/pdo_sqlite/php_pdo_sqlite_int.h b/ext/pdo_sqlite/php_pdo_sqlite_int.h index 3cba7fbf1..319d08325 100644 --- a/ext/pdo_sqlite/php_pdo_sqlite_int.h +++ b/ext/pdo_sqlite/php_pdo_sqlite_int.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_sqlite_int.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pdo_sqlite_int.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PDO_SQLITE_INT_H #define PHP_PDO_SQLITE_INT_H diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 2eb78fc63..4949d3a2b 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_driver.c 314451 2011-08-08 00:07:54Z iliaa $ */ +/* $Id: sqlite_driver.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_sqlite/sqlite_statement.c b/ext/pdo_sqlite/sqlite_statement.c index 74c6b1a96..bb792fc1c 100644 --- a/ext/pdo_sqlite/sqlite_statement.c +++ b/ext/pdo_sqlite/sqlite_statement.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_statement.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: sqlite_statement.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index d6dea8e6f..3a91cfc0e 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: pgsql.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> @@ -2452,6 +2452,10 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, } else { convert_to_long(zrow); row = Z_LVAL_P(zrow); + if (row < 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "The row parameter must be greater or equal to zero"); + RETURN_FALSE; + } } use_row = ZEND_NUM_ARGS() > 1 && row != -1; @@ -4798,10 +4802,24 @@ PHP_FUNCTION(pg_get_notify) if (result_type & PGSQL_NUM) { add_index_string(return_value, 0, pgsql_notify->relname, 1); add_index_long(return_value, 1, pgsql_notify->be_pid); +#if HAVE_PQPROTOCOLVERSION && HAVE_PQPARAMETERSTATUS + if (PQprotocolVersion(pgsql) >= 3 && atof(PQparameterStatus(pgsql, "server_version")) >= 9.0) { +#else + if (atof(PG_VERSION) >= 9.0) { +#endif + add_index_string(return_value, 2, pgsql_notify->extra, 1); + } } if (result_type & PGSQL_ASSOC) { add_assoc_string(return_value, "message", pgsql_notify->relname, 1); add_assoc_long(return_value, "pid", pgsql_notify->be_pid); +#if HAVE_PQPROTOCOLVERSION && HAVE_PQPARAMETERSTATUS + if (PQprotocolVersion(pgsql) >= 3 && atof(PQparameterStatus(pgsql, "server_version")) >= 9.0) { +#else + if (atof(PG_VERSION) >= 9.0) { +#endif + add_assoc_string(return_value, "payload", pgsql_notify->extra, 1); + } } PQfreemem(pgsql_notify); } diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h index c22d6a470..40bfd9e19 100644 --- a/ext/pgsql/php_pgsql.h +++ b/ext/pgsql/php_pgsql.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pgsql.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pgsql.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PGSQL_H #define PHP_PGSQL_H diff --git a/ext/pgsql/tests/09notice.phpt b/ext/pgsql/tests/09notice.phpt index b7611b98c..316706916 100644 --- a/ext/pgsql/tests/09notice.phpt +++ b/ext/pgsql/tests/09notice.phpt @@ -1,16 +1,25 @@ --TEST-- PostgreSQL notice function --SKIPIF-- -<?php include("skipif.inc"); ?> +<?php + +include("skipif.inc"); + +_skip_lc_messages(); + +?> --INI-- pgsql.log_notice=1 pgsql.ignore_notices=0 --FILE-- <?php include 'config.inc'; +include 'lcmess.inc'; $db = pg_connect($conn_str); -pg_exec($db, "SET LC_MESSAGES='C';"); + +_set_lc_messages(); + pg_query($db, "BEGIN;"); pg_query($db, "BEGIN;"); diff --git a/ext/pgsql/tests/22pg_fetch_object.phpt b/ext/pgsql/tests/22pg_fetch_object.phpt index 4f2f5dc18..76a3fbeed 100755 --- a/ext/pgsql/tests/22pg_fetch_object.phpt +++ b/ext/pgsql/tests/22pg_fetch_object.phpt @@ -16,7 +16,7 @@ class test_class { $db = pg_connect($conn_str); -$sql = "SELECT * FROM $table_name"; +$sql = "SELECT * FROM $table_name WHERE num = 0"; $result = pg_query($db, $sql) or die('Cannot qeury db'); $rows = pg_num_rows($result); diff --git a/ext/pgsql/tests/80_bug32223.phpt b/ext/pgsql/tests/80_bug32223.phpt index b201d320c..573742c6e 100755 --- a/ext/pgsql/tests/80_bug32223.phpt +++ b/ext/pgsql/tests/80_bug32223.phpt @@ -3,6 +3,8 @@ Bug #32223 (weird behaviour of pg_last_notice) --SKIPIF-- <?php require_once('skipif.inc'); + +_skip_lc_messages(); @pg_query($conn, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); $res = @pg_query($conn, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' @@ -17,14 +19,15 @@ if (!$res) die('skip PLPGSQL not available'); <?php require_once('config.inc'); +require_once('lcmess.inc'); $dbh = @pg_connect($conn_str); if (!$dbh) { die ("Could not connect to the server"); } -pg_exec($dbh, "SET LC_MESSAGES='C';"); -//@pg_query($dbh, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); +_set_lc_messages(); + $res = pg_query($dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' begin RAISE NOTICE ''11111''; diff --git a/ext/pgsql/tests/80_bug32223b.phpt b/ext/pgsql/tests/80_bug32223b.phpt index 98e472388..aada3f01b 100755 --- a/ext/pgsql/tests/80_bug32223b.phpt +++ b/ext/pgsql/tests/80_bug32223b.phpt @@ -3,6 +3,8 @@ Bug #32223 (weird behaviour of pg_last_notice using define) --SKIPIF-- <?php require_once('skipif.inc'); + +_skip_lc_messages(); @pg_query($conn, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); $res = @pg_query($conn, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' @@ -17,14 +19,15 @@ if (!$res) die('skip PLPGSQL not available'); <?php require_once('config.inc'); +require_once('lcmess.inc'); define('dbh', pg_connect($conn_str)); if (!dbh) { die ("Could not connect to the server"); } -pg_exec(dbh, "SET LC_MESSAGES='C';"); -//@pg_query(dbh, "CREATE LANGUAGE 'plpgsql' HANDLER plpgsql_call_handler LANCOMPILER 'PL/pgSQL'"); +_set_lc_messages(); + $res = pg_query(dbh, "CREATE OR REPLACE FUNCTION test_notice() RETURNS boolean AS ' begin RAISE NOTICE ''11111''; diff --git a/ext/pgsql/tests/bug60244.phpt b/ext/pgsql/tests/bug60244.phpt new file mode 100644 index 000000000..94568b603 --- /dev/null +++ b/ext/pgsql/tests/bug60244.phpt @@ -0,0 +1,57 @@ +--TEST-- +Bug #60244 (pg_fetch_* functions do not validate that row param is >0) +--SKIPIF-- +<?php +include("skipif.inc"); +?> +--FILE-- +<?php + +include 'config.inc'; + +$db = pg_connect($conn_str); +$result = pg_query("select 'a' union select 'b'"); + +var_dump(pg_fetch_array($result, -1)); +var_dump(pg_fetch_assoc($result, -1)); +var_dump(pg_fetch_object($result, -1)); +var_dump(pg_fetch_row($result, -1)); + +var_dump(pg_fetch_array($result, 0)); +var_dump(pg_fetch_assoc($result, 0)); +var_dump(pg_fetch_object($result, 0)); +var_dump(pg_fetch_row($result, 0)); + +pg_close($db); + +?> +--EXPECTF-- +Warning: pg_fetch_array(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d +bool(false) + +Warning: pg_fetch_assoc(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d +bool(false) + +Warning: pg_fetch_object(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d +bool(false) + +Warning: pg_fetch_row(): The row parameter must be greater or equal to zero in %sbug60244.php on line %d +bool(false) +array(2) { + [0]=> + string(1) "a" + ["?column?"]=> + string(1) "a" +} +array(1) { + ["?column?"]=> + string(1) "a" +} +object(stdClass)#1 (1) { + ["?column?"]=> + string(1) "a" +} +array(1) { + [0]=> + string(1) "a" +} diff --git a/ext/pgsql/tests/lcmess.inc b/ext/pgsql/tests/lcmess.inc new file mode 100644 index 000000000..6e0ac25b1 --- /dev/null +++ b/ext/pgsql/tests/lcmess.inc @@ -0,0 +1,21 @@ +<?php + +function _skip_lc_messages($lc_messages = 'C') +{ + if (!_set_lc_messages($lc_messages)) { + die("skip Cannot set LC_MESSAGES to '{$lc_messages}'\n"); + } +} + +function _set_lc_messages($lc_messages = 'C') +{ + if (pg_result(pg_query("SHOW LC_MESSAGES"), 0, 0) != $lc_messages) { + if (!@pg_exec("SET LC_MESSAGES='{$lc_messages}'")) { + return false; + } + } + + return true; +} + +?> diff --git a/ext/pgsql/tests/skipif.inc b/ext/pgsql/tests/skipif.inc index 74b27b3ad..7c5153e6f 100644 --- a/ext/pgsql/tests/skipif.inc +++ b/ext/pgsql/tests/skipif.inc @@ -7,6 +7,7 @@ // database include("config.inc"); +include("lcmess.inc"); if (!extension_loaded("pgsql")) { die("skip\n"); diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index 4b6fd586f..a1c5b09ab 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar:// stream wrapper support | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/phar/dirstream.h b/ext/phar/dirstream.h index eed6e6677..b4a05c463 100644 --- a/ext/phar/dirstream.h +++ b/ext/phar/dirstream.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dirstream.h 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: dirstream.h 321634 2012-01-01 13:15:04Z felipe $ */ BEGIN_EXTERN_C() int phar_wrapper_mkdir(php_stream_wrapper *wrapper, char *url_from, int mode, int options, php_stream_context *context TSRMLS_DC); diff --git a/ext/phar/func_interceptors.c b/ext/phar/func_interceptors.c index 216cb05e3..b2582bc39 100644 --- a/ext/phar/func_interceptors.c +++ b/ext/phar/func_interceptors.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: func_interceptors.c 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: func_interceptors.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "phar_internal.h" diff --git a/ext/phar/func_interceptors.h b/ext/phar/func_interceptors.h index 3f738a9a7..9a8378a8b 100644 --- a/ext/phar/func_interceptors.h +++ b/ext/phar/func_interceptors.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: func_interceptors.h 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: func_interceptors.h 321634 2012-01-01 13:15:04Z felipe $ */ BEGIN_EXTERN_C() void phar_intercept_functions(TSRMLS_D); diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 46a8e34e1..d16576a2d 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar.c 314419 2011-08-07 11:13:27Z laruence $ */ +/* $Id: phar.c 321634 2012-01-01 13:15:04Z felipe $ */ #define PHAR_MAIN 1 #include "phar_internal.h" @@ -1569,7 +1569,9 @@ static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *a const char zip_magic[] = "PK\x03\x04"; const char gz_magic[] = "\x1f\x8b\x08"; const char bz_magic[] = "BZh"; - char *pos, buffer[1024 + sizeof(token)], test = '\0'; + char *pos, test = '\0'; + const int window_size = 1024; + char buffer[1024 + sizeof(token)]; /* a 1024 byte window + the size of the halt_compiler token (moving window) */ const long readsize = sizeof(buffer) - sizeof(token); const long tokenlen = sizeof(token) - 1; long halt_offset; @@ -1717,7 +1719,7 @@ static int phar_open_from_fp(php_stream* fp, char *fname, int fname_len, char *a } halt_offset += got; - memmove(buffer, buffer + tokenlen, got + 1); + memmove(buffer, buffer + window_size, tokenlen); /* move the memory buffer by the size of the window */ } MAPPHAR_ALLOC_FAIL("internal corruption of phar \"%s\" (__HALT_COMPILER(); not found)") @@ -3103,9 +3105,7 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert, /* this will have changed for all files that have either changed compression or been modified */ entry->offset = entry->offset_abs = offset; offset += entry->compressed_filesize; - phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote); - - if (entry->compressed_filesize != wrote) { + if (phar_stream_copy_to_stream(file, newfile, entry->compressed_filesize, &wrote) == FAILURE) { if (closeoldfile) { php_stream_close(oldfile); } @@ -3669,7 +3669,7 @@ PHP_MINFO_FUNCTION(phar) /* {{{ */ php_info_print_table_header(2, "Phar: PHP Archive support", "enabled"); php_info_print_table_row(2, "Phar EXT version", PHP_PHAR_VERSION); php_info_print_table_row(2, "Phar API version", PHP_PHAR_API_VERSION); - php_info_print_table_row(2, "SVN revision", "$Revision: 314419 $"); + php_info_print_table_row(2, "SVN revision", "$Revision: 321634 $"); php_info_print_table_row(2, "Phar-based phar archives", "enabled"); php_info_print_table_row(2, "Tar-based phar archives", "enabled"); php_info_print_table_row(2, "ZIP-based phar archives", "enabled"); diff --git a/ext/phar/phar_internal.h b/ext/phar/phar_internal.h index 0b4b08395..ef9a7fa65 100644 --- a/ext/phar/phar_internal.h +++ b/ext/phar/phar_internal.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_internal.h 308657 2011-02-25 09:32:17Z nlopess $ */ +/* $Id: phar_internal.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/phar/phar_object.c b/ext/phar/phar_object.c index f7dbc209c..959a2b483 100644 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_object.c 314653 2011-08-09 14:11:56Z iliaa $ */ +/* $Id: phar_object.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "phar_internal.h" #include "func_interceptors.h" diff --git a/ext/phar/phar_path_check.c b/ext/phar/phar_path_check.c index c33d75f8b..cb73e7a82 100644 --- a/ext/phar/phar_path_check.c +++ b/ext/phar/phar_path_check.c @@ -4,7 +4,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2007-2011 The PHP Group | + | Copyright (c) 2007-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_path_check.c 308657 2011-02-25 09:32:17Z nlopess $ */ +/* $Id: phar_path_check.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "phar_internal.h" diff --git a/ext/phar/phar_path_check.re b/ext/phar/phar_path_check.re index 19da87cd0..46431749a 100644 --- a/ext/phar/phar_path_check.re +++ b/ext/phar/phar_path_check.re @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2007-2011 The PHP Group | + | Copyright (c) 2007-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_path_check.re 308657 2011-02-25 09:32:17Z nlopess $ */ +/* $Id: phar_path_check.re 321634 2012-01-01 13:15:04Z felipe $ */ #include "phar_internal.h" diff --git a/ext/phar/pharzip.h b/ext/phar/pharzip.h index afc3ea2a9..e7471a5e8 100644 --- a/ext/phar/pharzip.h +++ b/ext/phar/pharzip.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pharzip.h 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: pharzip.h 321634 2012-01-01 13:15:04Z felipe $ */ typedef struct _phar_zip_file_header { char signature[4]; /* local file header signature 4 bytes (0x04034b50) */ diff --git a/ext/phar/php_phar.h b/ext/phar/php_phar.h index 0dc642967..87bc0a2bc 100644 --- a/ext/phar/php_phar.h +++ b/ext/phar/php_phar.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_phar.h 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: php_phar.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PHAR_H #define PHP_PHAR_H diff --git a/ext/phar/stream.c b/ext/phar/stream.c index cf2c53620..7e74ed60f 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar:// stream wrapper support | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/phar/stream.h b/ext/phar/stream.h index 045186c54..138285997 100644 --- a/ext/phar/stream.h +++ b/ext/phar/stream.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2011 The PHP Group | + | Copyright (c) 2006-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: stream.h 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: stream.h 321634 2012-01-01 13:15:04Z felipe $ */ BEGIN_EXTERN_C() diff --git a/ext/phar/stub.h b/ext/phar/stub.h index 6a68464b4..cf20f25c8 100644 --- a/ext/phar/stub.h +++ b/ext/phar/stub.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | phar php single-file executable PHP extension generated stub | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: stub.h 306941 2011-01-01 02:48:19Z felipe $ */ +/* $Id: stub.h 321634 2012-01-01 13:15:04Z felipe $ */ static inline void phar_get_stub(const char *index_php, const char *web, size_t *len, char **stub, const int name_len, const int web_len TSRMLS_DC) { diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 38c3f4f85..9d1e5bcb1 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | TAR archive support for Phar | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/phar/tar.h b/ext/phar/tar.h index 950cace9f..ed9934647 100644 --- a/ext/phar/tar.h +++ b/ext/phar/tar.h @@ -4,7 +4,7 @@ +----------------------------------------------------------------------+ | TAR archive support for Phar | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/phar/tests/bug53872.phpt b/ext/phar/tests/bug53872.phpt new file mode 100644 index 000000000..fd332fdf0 --- /dev/null +++ b/ext/phar/tests/bug53872.phpt @@ -0,0 +1,28 @@ +--TEST--
+bug#53872 (internal corruption of phar)
+--SKIPIF--
+<?php
+if (!extension_loaded("phar")) die("skip");
+if (!extension_loaded("zlib")) die("skip Test needs ext/zlib");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+$p=new Phar('bug53872-phar.phar');
+$p->buildFromDirectory(__DIR__ . "/bug53872/");
+$p->setStub('<?php __HALT_COMPILER();?\>');
+$p->compressFiles(Phar::GZ);
+
+print(file_get_contents('phar://bug53872-phar.phar/first.txt'));
+print(file_get_contents('phar://bug53872-phar.phar/second.txt'));
+print(file_get_contents('phar://bug53872-phar.phar/third.txt'));
+?>
+--CLEAN--
+<?php
+unlink("bug53872-phar.phar");
+?>
+--EXPECT--
+content of first.txt
+content of third.txt
+
diff --git a/ext/phar/tests/bug53872/first.txt b/ext/phar/tests/bug53872/first.txt new file mode 100644 index 000000000..90a4d1f09 --- /dev/null +++ b/ext/phar/tests/bug53872/first.txt @@ -0,0 +1 @@ +content of first.txt diff --git a/ext/phar/tests/bug53872/second.txt b/ext/phar/tests/bug53872/second.txt new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/ext/phar/tests/bug53872/second.txt diff --git a/ext/phar/tests/bug53872/third.txt b/ext/phar/tests/bug53872/third.txt new file mode 100644 index 000000000..4f283cd78 --- /dev/null +++ b/ext/phar/tests/bug53872/third.txt @@ -0,0 +1 @@ +content of third.txt diff --git a/ext/phar/tests/bug60164.phpt b/ext/phar/tests/bug60164.phpt new file mode 100644 index 000000000..8fd5de514 --- /dev/null +++ b/ext/phar/tests/bug60164.phpt @@ -0,0 +1,21 @@ +--TEST-- +Phar: verify stub of specific length does not break __HALT_COMPILER(); scanning in php +--SKIPIF-- +<?php +if (!extension_loaded("phar")) die("skip"); +?> +--INI-- +phar.require_hash=0 +phar.readonly=0 +--FILE-- +<?php +$phar = __DIR__ . '/files/stuboflength1041.phar'; +foreach (new RecursiveIteratorIterator(new Phar($phar, null, 'stuboflength1041.phar')) as $item) { + var_dump($item->getFileName()); +} +?> +===DONE=== +--EXPECT-- +string(5) "a.php" +string(5) "b.php" +===DONE===
\ No newline at end of file diff --git a/ext/phar/tests/bug60261.phpt b/ext/phar/tests/bug60261.phpt new file mode 100644 index 000000000..1b6cd7a7c --- /dev/null +++ b/ext/phar/tests/bug60261.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #60261 (phar dos null pointer) +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--FILE-- +<?php + +$nx = new Phar(); +try { + $nx->getLinkTarget(); +} catch (Exception $e) { + echo $e->getMessage(), "\n"; +} + +?> +--EXPECTF-- + +Warning: Phar::__construct() expects at least 1 parameter, 0 given in %s on line %d +SplFileInfo::getLinkTarget(): Empty filename diff --git a/ext/phar/tests/files/stuboflength1041.phar b/ext/phar/tests/files/stuboflength1041.phar Binary files differnew file mode 100644 index 000000000..d90fb8f10 --- /dev/null +++ b/ext/phar/tests/files/stuboflength1041.phar diff --git a/ext/phar/tests/files/stuboflength1041.phar.inc b/ext/phar/tests/files/stuboflength1041.phar.inc new file mode 100644 index 000000000..4a26a41a0 --- /dev/null +++ b/ext/phar/tests/files/stuboflength1041.phar.inc @@ -0,0 +1,42 @@ +<?php + +@unlink(__DIR__ . '/stuboflength1041.phar'); + +$phar = new Phar('./stuboflength1041.phar'); +$phar['a.php'] = 'hi1'; +$phar['b.php'] = 'hi2'; + +$phar->setStub('<?php +/***stub of length 1041 including the halt compiler********************************************* +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +*********************************************/ +__HALT_COMPILER();'); +<?php + +@unlink(__DIR__ . '/stuboflength1041.phar'); + +$phar = new Phar('./stuboflength1041.phar'); +$phar['a.php'] = 'hi1'; +$phar['b.php'] = 'hi2'; + +$phar->setStub('<?php +/***stub of length 1041 including the halt compiler********************************************* +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +************************************************************************************************ +*********************************************/ +__HALT_COMPILER();');
\ No newline at end of file diff --git a/ext/phar/tests/fopen_edgecases2.phpt b/ext/phar/tests/fopen_edgecases2.phpt index 6c5ac7b45..c7ccd34af 100644 --- a/ext/phar/tests/fopen_edgecases2.phpt +++ b/ext/phar/tests/fopen_edgecases2.phpt @@ -2,7 +2,7 @@ Phar: test edge cases of fopen() function interception #2 --SKIPIF-- <?php if (!extension_loaded("phar")) die("skip"); ?> -<?php if (version_compare(php_version(), '6.0', '>=')) die('skip parameter parsing changed in 6.0'); ?> +<?php if (version_compare(phpversion(), '6.0', '>=')) die('skip parameter parsing changed in 6.0'); ?> --INI-- phar.readonly=0 --FILE-- diff --git a/ext/phar/tests/phar_commitwrite.phpt b/ext/phar/tests/phar_commitwrite.phpt index 36d473e5c..8e3668133 100644 --- a/ext/phar/tests/phar_commitwrite.phpt +++ b/ext/phar/tests/phar_commitwrite.phpt @@ -39,4 +39,4 @@ Phar::mapPhar('brandnewphar.phar'); include 'phar://brandnewphar.phar/startup.php'; __HALT_COMPILER(); ?> " -===DONE===
\ No newline at end of file +===DONE=== diff --git a/ext/phar/tests/phar_create_in_cwd.phpt b/ext/phar/tests/phar_create_in_cwd.phpt index 4b0e6594f..1828fe745 100644 --- a/ext/phar/tests/phar_create_in_cwd.phpt +++ b/ext/phar/tests/phar_create_in_cwd.phpt @@ -42,4 +42,4 @@ Phar::mapPhar('brandnewphar.phar'); include 'phar://brandnewphar.phar/startup.php'; __HALT_COMPILER(); ?> " -===DONE===
\ No newline at end of file +===DONE=== diff --git a/ext/phar/tests/phar_gobyebye-win32.phpt b/ext/phar/tests/phar_gobyebye-win32.phpt new file mode 100644 index 000000000..43c8c7782 --- /dev/null +++ b/ext/phar/tests/phar_gobyebye-win32.phpt @@ -0,0 +1,48 @@ +--TEST--
+Phar: test edge cases of intercepted functions when the underlying phar archive has been unlinkArchive()d
+--SKIPIF--
+<?php if (!extension_loaded("phar")) die("skip");
+if (strpos(PHP_OS, 'WIN') === false) die("skip Extra warning on Windows.");
+?>
+--INI--
+phar.readonly=0
+--FILE--
+<?php
+Phar::interceptFileFuncs();
+$fname = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.phar.php';
+$fname2 = dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.2.php';
+$pname = 'phar://' . $fname;
+file_put_contents($fname2, '<?php Phar::unlinkArchive("' . addslashes($fname) . '");');
+file_put_contents($pname . '/foo/hi', '<?php
+include "' . addslashes($fname2) . '";
+readfile("foo/hi");
+fopen("foo/hi", "r");
+echo file_get_contents("foo/hi");
+var_dump(is_file("foo/hi"),is_link("foo/hi"),is_dir("foo/hi"),file_exists("foo/hi"),stat("foo/hi"));
+opendir("foo/hi");
+?>
+');
+include $pname . '/foo/hi';
+?>
+===DONE===
+--CLEAN--
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?>
+<?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.2.php'); ?>
+--EXPECTF--
+Warning: readfile(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: fopen(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: file_get_contents(foo/hi): failed to open stream: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: stat(): stat failed for foo/hi in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+bool(false)
+
+Warning: opendir(foo/hi,foo/hi): The system cannot find the path specified. (code: 3) in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+
+Warning: opendir(foo/hi): failed to open dir: No such file or directory in phar://%sphar_gobyebye-win32.phar.php/foo/hi on line %d
+===DONE===
diff --git a/ext/phar/tests/phar_gobyebye.phpt b/ext/phar/tests/phar_gobyebye.phpt index d55bef0c3..608e95076 100644 --- a/ext/phar/tests/phar_gobyebye.phpt +++ b/ext/phar/tests/phar_gobyebye.phpt @@ -1,7 +1,10 @@ --TEST-- Phar: test edge cases of intercepted functions when the underlying phar archive has been unlinkArchive()d --SKIPIF-- -<?php if (!extension_loaded("phar")) die("skip");?> +<?php +if (defined('PHP_WINDOWS_VERSION_MAJOR')) die("skip"); +if (!extension_loaded("phar")) die("skip"); +?> --INI-- phar.readonly=0 --FILE-- diff --git a/ext/phar/tests/phar_oo_001.phpt b/ext/phar/tests/phar_oo_001.phpt index f211394e5..7a81bbb4b 100755 --- a/ext/phar/tests/phar_oo_001.phpt +++ b/ext/phar/tests/phar_oo_001.phpt @@ -30,14 +30,14 @@ try $phar = new MyPhar(); var_dump($phar->getVersion()); } -catch (BadMethodCallException $e) +catch (LogicException $e) { var_dump($e->getMessage()); } try { $phar = new Phar('test.phar'); $phar->__construct('oops'); -} catch (BadMethodCallException $e) +} catch (LogicException $e) { var_dump($e->getMessage()); } diff --git a/ext/phar/util.c b/ext/phar/util.c index 983ca38d1..c92d796eb 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -3,7 +3,7 @@ | phar php single-file executable PHP extension | | utility functions | +----------------------------------------------------------------------+ - | Copyright (c) 2005-2011 The PHP Group | + | Copyright (c) 2005-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: util.c 314419 2011-08-07 11:13:27Z laruence $ */ +/* $Id: util.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "phar_internal.h" #ifdef PHAR_HASH_OK @@ -1000,10 +1000,12 @@ int phar_open_entry_fp(phar_entry_info *entry, char **error, int follow_links TS php_stream_filter_append(&ufp->writefilters, filter); php_stream_seek(phar_get_entrypfp(entry TSRMLS_CC), phar_get_fp_offset(entry TSRMLS_CC), SEEK_SET); - if (SUCCESS != phar_stream_copy_to_stream(phar_get_entrypfp(entry TSRMLS_CC), ufp, entry->compressed_filesize, NULL)) { - spprintf(error, 4096, "phar error: internal corruption of phar \"%s\" (actual filesize mismatch on file \"%s\")", phar->fname, entry->filename); - php_stream_filter_remove(filter, 1 TSRMLS_CC); - return FAILURE; + if (entry->uncompressed_filesize) { + if (SUCCESS != phar_stream_copy_to_stream(phar_get_entrypfp(entry TSRMLS_CC), ufp, entry->compressed_filesize, NULL)) { + spprintf(error, 4096, "phar error: internal corruption of phar \"%s\" (actual filesize mismatch on file \"%s\")", phar->fname, entry->filename); + php_stream_filter_remove(filter, 1 TSRMLS_CC); + return FAILURE; + } } php_stream_filter_flush(filter, 1); diff --git a/ext/phar/zip.c b/ext/phar/zip.c index a8ac63aeb..ced975cb3 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | ZIP archive support for Phar | +----------------------------------------------------------------------+ - | Copyright (c) 2007-2011 The PHP Group | + | Copyright (c) 2007-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/posix/php_posix.h b/ext/posix/php_posix.h index 64ce54f48..f4e6baee3 100644 --- a/ext/posix/php_posix.h +++ b/ext/posix/php_posix.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ */ -/* $Id: php_posix.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_posix.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_POSIX_H #define PHP_POSIX_H diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 18aa87fda..557252aeb 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: posix.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: posix.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -310,7 +310,7 @@ const zend_function_entry posix_functions[] = { static PHP_MINFO_FUNCTION(posix) { php_info_print_table_start(); - php_info_print_table_row(2, "Revision", "$Revision: 313665 $"); + php_info_print_table_row(2, "Revision", "$Revision: 321634 $"); php_info_print_table_end(); } /* }}} */ diff --git a/ext/posix/tests/posix_getpgid_error.phpt b/ext/posix/tests/posix_getpgid_error.phpt index e703b8fdc..b15a3c39b 100644 --- a/ext/posix/tests/posix_getpgid_error.phpt +++ b/ext/posix/tests/posix_getpgid_error.phpt @@ -2,7 +2,7 @@ Test posix_getpgid() function : error conditions --SKIPIF-- <?php -if((!extension_loaded("posix")) || (!function_exists(posix_getpgid))) { +if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) { print "skip - POSIX extension not loaded or posix_getpgid() does not exist"; } ?> diff --git a/ext/posix/tests/posix_getpgid_variation.phpt b/ext/posix/tests/posix_getpgid_variation.phpt index 34a4beb0a..e53d58f39 100644 --- a/ext/posix/tests/posix_getpgid_variation.phpt +++ b/ext/posix/tests/posix_getpgid_variation.phpt @@ -2,7 +2,7 @@ Test posix_getpgid() function : variation --SKIPIF-- <?php -if((!extension_loaded("posix")) || (!function_exists(posix_getpgid))) { +if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) { print "skip - POSIX extension not loaded or posix_getpgid() does not exist"; } ?> diff --git a/ext/posix/tests/posix_ttyname_error.phpt b/ext/posix/tests/posix_ttyname_error.phpt index e3ec695e5..f7b011e77 100644 --- a/ext/posix/tests/posix_ttyname_error.phpt +++ b/ext/posix/tests/posix_ttyname_error.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by calling it more than or less than its expected Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation1.phpt b/ext/posix/tests/posix_ttyname_variation1.phpt index 072b9fa67..efbf64a4b 100644 --- a/ext/posix/tests/posix_ttyname_variation1.phpt +++ b/ext/posix/tests/posix_ttyname_variation1.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with array values. Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation2.phpt b/ext/posix/tests/posix_ttyname_variation2.phpt index f46821b0c..324614275 100644 --- a/ext/posix/tests/posix_ttyname_variation2.phpt +++ b/ext/posix/tests/posix_ttyname_variation2.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with boolean values. Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation3.phpt b/ext/posix/tests/posix_ttyname_variation3.phpt index 30054265a..a3ebc8cc5 100644 --- a/ext/posix/tests/posix_ttyname_variation3.phpt +++ b/ext/posix/tests/posix_ttyname_variation3.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with emptyUnsetUndefNul Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation4.phpt b/ext/posix/tests/posix_ttyname_variation4.phpt index 321549279..da999341e 100644 --- a/ext/posix/tests/posix_ttyname_variation4.phpt +++ b/ext/posix/tests/posix_ttyname_variation4.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with float values. Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation5.phpt b/ext/posix/tests/posix_ttyname_variation5.phpt index 661dd606f..7290f07dc 100644 --- a/ext/posix/tests/posix_ttyname_variation5.phpt +++ b/ext/posix/tests/posix_ttyname_variation5.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with int values. Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation6.phpt b/ext/posix/tests/posix_ttyname_variation6.phpt index 020aef115..eecae6769 100644 --- a/ext/posix/tests/posix_ttyname_variation6.phpt +++ b/ext/posix/tests/posix_ttyname_variation6.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with object values. Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/posix/tests/posix_ttyname_variation7.phpt b/ext/posix/tests/posix_ttyname_variation7.phpt index b39916c5b..8a92ef627 100644 --- a/ext/posix/tests/posix_ttyname_variation7.phpt +++ b/ext/posix/tests/posix_ttyname_variation7.phpt @@ -4,6 +4,12 @@ Test function posix_ttyname() by substituting argument 1 with string values. Marco Fabbri mrfabbri@gmail.com Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 +--SKIPIF-- +<?php +if (!extension_loaded('posix')) { + die('SKIP The posix extension is not loaded.'); +} +?> --FILE-- <?php diff --git a/ext/pspell/php_pspell.h b/ext/pspell/php_pspell.h index ee26a8158..e084fbb13 100644 --- a/ext/pspell/php_pspell.h +++ b/ext/pspell/php_pspell.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pspell.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_pspell.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef _PSPELL_H #define _PSPELL_H diff --git a/ext/pspell/pspell.c b/ext/pspell/pspell.c index ff01c6679..aaefadd70 100644 --- a/ext/pspell/pspell.c +++ b/ext/pspell/pspell.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pspell.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: pspell.c 321634 2012-01-01 13:15:04Z felipe $ */ #define IS_EXT_MODULE diff --git a/ext/readline/php_readline.h b/ext/readline/php_readline.h index c6979e193..b0b3a7d82 100644 --- a/ext/readline/php_readline.h +++ b/ext/readline/php_readline.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_readline.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_readline.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_READLINE_H #define PHP_READLINE_H diff --git a/ext/readline/readline.c b/ext/readline/readline.c index 1d2341a3e..9bf1e15ef 100644 --- a/ext/readline/readline.c +++ b/ext/readline/readline.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: readline.c 313831 2011-07-28 10:42:45Z pajoye $ */ +/* $Id: readline.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes & prototypes */ diff --git a/ext/recode/php_recode.h b/ext/recode/php_recode.h index c131da699..50fa4a80e 100644 --- a/ext/recode/php_recode.h +++ b/ext/recode/php_recode.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_recode.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_recode.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_RECODE_H #define PHP_RECODE_H diff --git a/ext/recode/recode.c b/ext/recode/recode.c index 6eaba2a43..02bb43a9a 100644 --- a/ext/recode/recode.c +++ b/ext/recode/recode.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: recode.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: recode.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes & prototypes */ @@ -135,7 +135,7 @@ PHP_MINFO_FUNCTION(recode) { php_info_print_table_start(); php_info_print_table_row(2, "Recode Support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 313665 $"); + php_info_print_table_row(2, "Revision", "$Revision: 321634 $"); php_info_print_table_end(); } diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index a4d8cb71d..a73b67026 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: php_reflection.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2635,7 +2635,7 @@ ZEND_METHOD(reflection_method, invoke) fcc.initialized = 1; fcc.function_handler = mptr; fcc.calling_scope = obj_ce; - fcc.called_scope = obj_ce; + fcc.called_scope = intern->ce; fcc.object_ptr = object_ptr; result = zend_call_function(&fci, &fcc TSRMLS_CC); @@ -5545,7 +5545,7 @@ PHP_MINFO_FUNCTION(reflection) /* {{{ */ php_info_print_table_start(); php_info_print_table_header(2, "Reflection", "enabled"); - php_info_print_table_row(2, "Version", "$Revision: 313665 $"); + php_info_print_table_row(2, "Version", "$Revision: 321634 $"); php_info_print_table_end(); } /* }}} */ @@ -5559,7 +5559,7 @@ zend_module_entry reflection_module_entry = { /* {{{ */ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 313665 $", + "$Revision: 321634 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/reflection/php_reflection.h b/ext/reflection/php_reflection.h index 0607f7f64..71bacaae4 100644 --- a/ext/reflection/php_reflection.h +++ b/ext/reflection/php_reflection.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_reflection.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_REFLECTION_H #define PHP_REFLECTION_H diff --git a/ext/reflection/tests/bug60367.phpt b/ext/reflection/tests/bug60367.phpt new file mode 100644 index 000000000..31e8a2e94 --- /dev/null +++ b/ext/reflection/tests/bug60367.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #60367 (Reflection and Late Static Binding) +--FILE-- +<?php +abstract class A { + + const WHAT = 'A'; + + public static function call() { + echo static::WHAT; + } + +} + +class B extends A { + + const WHAT = 'B'; + +} + +$method = new ReflectionMethod("b::call"); +$method->invoke(null); +$method = new ReflectionMethod("A::call"); +$method->invoke(null); +--EXPECTF-- +BA diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index a25a7db0e..a7aac29d2 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mod_files.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/session/mod_files.h b/ext/session/mod_files.h index 357a12059..ff6838cd7 100644 --- a/ext/session/mod_files.h +++ b/ext/session/mod_files.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mod_files.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MOD_FILES_H #define MOD_FILES_H diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c index e84d4f584..0d5a0bdcc 100644 --- a/ext/session/mod_mm.c +++ b/ext/session/mod_mm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_mm.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mod_mm.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" @@ -278,7 +278,7 @@ PHP_MINIT_FUNCTION(ps_mm) ps_mm_path = emalloc(save_path_len + 1 + (sizeof(PS_MM_FILE) - 1) + mod_name_len + euid_len + 1); memcpy(ps_mm_path, PS(save_path), save_path_len); - if (PS(save_path)[save_path_len - 1] != DEFAULT_SLASH) { + if (save_path_len && PS(save_path)[save_path_len - 1] != DEFAULT_SLASH) { ps_mm_path[save_path_len] = DEFAULT_SLASH; save_path_len++; } diff --git a/ext/session/mod_mm.h b/ext/session/mod_mm.h index 638bd77b1..bd69117ab 100644 --- a/ext/session/mod_mm.h +++ b/ext/session/mod_mm.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_mm.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mod_mm.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MOD_MM_H #define MOD_MM_H diff --git a/ext/session/mod_user.c b/ext/session/mod_user.c index 6431f3a12..8a6ff8609 100644 --- a/ext/session/mod_user.c +++ b/ext/session/mod_user.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_user.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mod_user.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_session.h" diff --git a/ext/session/mod_user.h b/ext/session/mod_user.h index e3a8dd716..27330bf66 100644 --- a/ext/session/mod_user.h +++ b/ext/session/mod_user.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_user.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mod_user.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MOD_USER_H #define MOD_USER_H diff --git a/ext/session/php_session.h b/ext/session/php_session.h index f93adf69f..07cb89dc5 100644 --- a/ext/session/php_session.h +++ b/ext/session/php_session.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_session.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_session.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SESSION_H #define PHP_SESSION_H diff --git a/ext/session/session.c b/ext/session/session.c index 432048dc7..19fa3cc38 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: session.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: session.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1742,7 +1742,7 @@ static PHP_FUNCTION(session_regenerate_id) return; } - if (SG(headers_sent)) { + if (SG(headers_sent) && PS(use_cookies)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot regenerate session id - headers already sent"); RETURN_FALSE; } diff --git a/ext/session/tests/014.phpt b/ext/session/tests/014.phpt index be1119d9a..09ad0f5b1 100644 --- a/ext/session/tests/014.phpt +++ b/ext/session/tests/014.phpt @@ -3,7 +3,7 @@ a script should not be able to modify session.use_trans_sid --SKIPIF-- <?php include('skipif.inc'); ?> --INI-- -session.use_trans_sid=1 +session.use_trans_sid=0 session.use_cookies=0 session.cache_limiter= register_globals=1 @@ -22,11 +22,11 @@ session_start(); ?> <a href="/link"> <?php -ini_set("session.use_trans_sid","0"); +ini_set("session.use_trans_sid","1"); ?> <a href="/link"> <?php -ini_set("session.use_trans_sid","1"); +ini_set("session.use_trans_sid","0"); ?> <a href="/link"> <?php @@ -34,10 +34,10 @@ session_destroy(); ?> --EXPECTF-- Deprecated: Directive 'register_globals' is deprecated in PHP 5.3 and greater in Unknown on line 0 -<a href="/link?PHPSESSID=abtest"> +<a href="/link"> Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d -<a href="/link?PHPSESSID=abtest"> +<a href="/link"> Warning: ini_set(): A session is active. You cannot change the session module's ini settings at this time in %s on line %d -<a href="/link?PHPSESSID=abtest"> +<a href="/link"> diff --git a/ext/session/tests/015.phpt b/ext/session/tests/015.phpt index e747e08fb..7d7b73734 100644 --- a/ext/session/tests/015.phpt +++ b/ext/session/tests/015.phpt @@ -5,6 +5,7 @@ use_trans_sid should not affect SID --INI-- session.use_trans_sid=1 session.use_cookies=0 +session.use_only_cookies=0 session.cache_limiter= arg_separator.output=& session.name=PHPSESSID diff --git a/ext/session/tests/018.phpt b/ext/session/tests/018.phpt index 3450d1e3f..def1f419c 100644 --- a/ext/session/tests/018.phpt +++ b/ext/session/tests/018.phpt @@ -4,6 +4,7 @@ rewriter correctly handles attribute names which contain dashes <?php include('skipif.inc'); ?> --INI-- session.use_cookies=0 +session.use_only_cookies=0 session.cache_limiter= session.use_trans_sid=1 session.name=PHPSESSID diff --git a/ext/session/tests/020.phpt b/ext/session/tests/020.phpt index 82997a8f0..f43bac5d1 100644 --- a/ext/session/tests/020.phpt +++ b/ext/session/tests/020.phpt @@ -4,6 +4,7 @@ rewriter uses arg_seperator.output for modifying URLs <?php include('skipif.inc'); ?> --INI-- session.use_cookies=0 +session.use_only_cookies=0 session.cache_limiter= session.use_trans_sid=1 arg_separator.output="&" diff --git a/ext/session/tests/021.phpt b/ext/session/tests/021.phpt index 9d95b86d0..1ad3c5d5f 100644 --- a/ext/session/tests/021.phpt +++ b/ext/session/tests/021.phpt @@ -4,6 +4,7 @@ rewriter handles form and fieldset tags correctly <?php include('skipif.inc'); ?> --INI-- session.use_cookies=0 +session.use_only_cookies=0 session.cache_limiter= session.use_trans_sid=1 url_rewriter.tags="a=href,area=href,frame=src,input=src,form=,fieldset=" diff --git a/ext/session/tests/bug36459.phpt b/ext/session/tests/bug36459.phpt index 1488fb4dd..66a4ac1cb 100644 --- a/ext/session/tests/bug36459.phpt +++ b/ext/session/tests/bug36459.phpt @@ -1,41 +1,42 @@ ---TEST-- -Bug #31454 (Incorrect adding PHPSESSID to links, which contains \r\n) ---SKIPIF-- -<?php include('skipif.inc'); ?> ---INI-- -session.use_trans_sid=1 -session.use_cookies=0 -session.name=sid ---FILE-- -<?php -error_reporting(E_ALL); - -session_start(); - -# Do not remove \r from this tests, they are essential! -?> -<html> - <head> - <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title> - </head> - <body> - <p>See source html code</p> - <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2" - style="font: normal 11pt Times New Roman">incorrect link</a><br /> - <br /> - <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2" style="font: normal 11pt Times New Roman">correct link</a> - </body> -</html> ---EXPECTF-- -<html> - <head> - <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title> - </head> - <body> - <p>See source html code</p> - <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s" - style="font: normal 11pt Times New Roman">incorrect link</a><br /> - <br /> - <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s" style="font: normal 11pt Times New Roman">correct link</a> - </body> -</html> +--TEST--
+Bug #31454 (Incorrect adding PHPSESSID to links, which contains \r\n)
+--SKIPIF--
+<?php include('skipif.inc'); ?>
+--INI--
+session.use_trans_sid=1
+session.use_cookies=0
+session.use_only_cookies=0
+session.name=sid
+--FILE--
+<?php
+error_reporting(E_ALL);
+
+session_start();
+
+# Do not remove \r from this tests, they are essential!
+?>
+<html>
+ <head>
+ <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
+ </head>
+ <body>
+ <p>See source html code</p>
+ <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2"
+ style="font: normal 11pt Times New Roman">incorrect link</a><br />
+ <br />
+ <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2" style="font: normal 11pt Times New Roman">correct link</a>
+ </body>
+</html>
+--EXPECTF--
+<html>
+ <head>
+ <title>Bug #36459 Incorrect adding PHPSESSID to links, which contains \r\n</title>
+ </head>
+ <body>
+ <p>See source html code</p>
+ <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s"
+ style="font: normal 11pt Times New Roman">incorrect link</a><br />
+ <br />
+ <a href="/b2w/www/ru/adm/pages/?action=prev&rec_id=8&pid=2&sid=%s" style="font: normal 11pt Times New Roman">correct link</a>
+ </body>
+</html>
diff --git a/ext/session/tests/bug41600.phpt b/ext/session/tests/bug41600.phpt index 028fca79a..690347ac8 100644 --- a/ext/session/tests/bug41600.phpt +++ b/ext/session/tests/bug41600.phpt @@ -4,6 +4,7 @@ Bug #41600 (url rewriter tags doesn't work with namespaced tags) <?php include('skipif.inc'); ?> --INI-- session.use_cookies=0 +session.use_only_cookies=0 session.cache_limiter= session.use_trans_sid=1 arg_separator.output="&" diff --git a/ext/session/tests/bug60634.phpt b/ext/session/tests/bug60634.phpt new file mode 100644 index 000000000..2ec0c26c1 --- /dev/null +++ b/ext/session/tests/bug60634.phpt @@ -0,0 +1,46 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + die("close: goodbye cruel world\n"); +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + die("write: goodbye cruel world\n"); +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +write: goodbye cruel world diff --git a/ext/session/tests/bug60634_error_1.phpt b/ext/session/tests/bug60634_error_1.phpt new file mode 100644 index 000000000..3b6e394ee --- /dev/null +++ b/ext/session/tests/bug60634_error_1.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write during exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + undefined_function(); +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Call to undefined function undefined_function() in %s on line %d diff --git a/ext/session/tests/bug60634_error_2.phpt b/ext/session/tests/bug60634_error_2.phpt new file mode 100644 index 000000000..265fb303f --- /dev/null +++ b/ext/session/tests/bug60634_error_2.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write during exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + throw new Exception; +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Uncaught exception 'Exception' in %s diff --git a/ext/session/tests/bug60634_error_3.phpt b/ext/session/tests/bug60634_error_3.phpt new file mode 100644 index 000000000..b2004d68b --- /dev/null +++ b/ext/session/tests/bug60634_error_3.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in write after exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; + exit; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + undefined_function(); +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Call to undefined function undefined_function() in %s on line %d diff --git a/ext/session/tests/bug60634_error_4.phpt b/ext/session/tests/bug60634_error_4.phpt new file mode 100644 index 000000000..60bc0dcf5 --- /dev/null +++ b/ext/session/tests/bug60634_error_4.phpt @@ -0,0 +1,48 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - exception in write after exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; + exit; +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + echo "write: goodbye cruel world\n"; + throw new Exception; +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); + +?> +--EXPECTF-- +write: goodbye cruel world + +Fatal error: Uncaught exception 'Exception' in %s diff --git a/ext/session/tests/bug60634_error_5.phpt b/ext/session/tests/bug60634_error_5.phpt new file mode 100644 index 000000000..376b65f20 --- /dev/null +++ b/ext/session/tests/bug60634_error_5.phpt @@ -0,0 +1,49 @@ +--TEST-- +Bug #60634 (Segmentation fault when trying to die() in SessionHandler::write()) - fatal error in close during exec +--XFAIL-- +Long term low priority bug, working on it +--INI-- +session.save_path= +session.name=PHPSESSID +--SKIPIF-- +<?php include('skipif.inc'); ?> +--FILE-- +<?php + +ob_start(); + +function open($save_path, $session_name) { + return true; +} + +function close() { + echo "close: goodbye cruel world\n"; + undefined_function(); +} + +function read($id) { + return ''; +} + +function write($id, $session_data) { + return true; +} + +function destroy($id) { + return true; +} + +function gc($maxlifetime) { + return true; +} + +session_set_save_handler('open', 'close', 'read', 'write', 'destroy', 'gc'); +session_start(); +session_write_close(); +echo "um, hi\n"; + +?> +--EXPECTF-- +close: goodbye cruel world + +Fatal error: Call to undefined function undefined_function() in %s on line %d diff --git a/ext/session/tests/session_save_path_variation4.phpt b/ext/session/tests/session_save_path_variation4.phpt index 6ea725cd8..80db6caf7 100644 --- a/ext/session/tests/session_save_path_variation4.phpt +++ b/ext/session/tests/session_save_path_variation4.phpt @@ -1,10 +1,7 @@ --TEST-- Test session_save_path() function : variation --SKIPIF-- -<?php include('skipif.inc'); -if(substr(PHP_OS, 0, 3) != "WIN") - die("skip Only for Windows"); -?> +<?php include('skipif.inc');?> --INI-- open_basedir=. session.save_handler=files diff --git a/ext/shmop/php_shmop.h b/ext/shmop/php_shmop.h index 7ad5ec2eb..89e5d2ad3 100644 --- a/ext/shmop/php_shmop.h +++ b/ext/shmop/php_shmop.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/shmop/shmop.c b/ext/shmop/shmop.c index b176ae501..cea2b3359 100644 --- a/ext/shmop/shmop.c +++ b/ext/shmop/shmop.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ | Ilia Alshanetsky <ilia@prohost.org> | +----------------------------------------------------------------------+ */ -/* $Id: shmop.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: shmop.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index eee70138a..2c37eda8b 100644 --- a/ext/simplexml/php_simplexml.h +++ b/ext/simplexml/php_simplexml.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_simplexml.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_simplexml.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SIMPLEXML_H #define PHP_SIMPLEXML_H diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h index 313bb88eb..9c187ce66 100755 --- a/ext/simplexml/php_simplexml_exports.h +++ b/ext/simplexml/php_simplexml_exports.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_simplexml_exports.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_simplexml_exports.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SIMPLEXML_EXPORTS_H #define PHP_SIMPLEXML_EXPORTS_H diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 888a6c0fd..f9020026b 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: simplexml.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1264,8 +1264,9 @@ SXE_METHOD(xpath) result = retval->nodesetval; + array_init(return_value); + if (result != NULL) { - array_init(return_value); for (i = 0; i < result->nodeNr; ++i) { nodeptr = result->nodeTab[i]; if (nodeptr->type == XML_TEXT_NODE || nodeptr->type == XML_ELEMENT_NODE || nodeptr->type == XML_ATTRIBUTE_NODE) { @@ -1286,8 +1287,6 @@ SXE_METHOD(xpath) add_next_index_zval(return_value, value); } } - } else { - RETVAL_FALSE; } xmlXPathFreeObject(retval); @@ -2609,7 +2608,7 @@ PHP_MINFO_FUNCTION(simplexml) { php_info_print_table_start(); php_info_print_table_header(2, "Simplexml support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 314376 $"); + php_info_print_table_row(2, "Revision", "$Revision: 321634 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); diff --git a/ext/simplexml/sxe.c b/ext/simplexml/sxe.c index 815bea1db..ff36e4aa6 100755 --- a/ext/simplexml/sxe.c +++ b/ext/simplexml/sxe.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sxe.c 312258 2011-06-18 15:56:14Z felipe $ */ +/* $Id: sxe.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/simplexml/sxe.h b/ext/simplexml/sxe.h index c979d7ec0..65d119d80 100755 --- a/ext/simplexml/sxe.h +++ b/ext/simplexml/sxe.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sxe.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: sxe.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SXE_H #define SXE_H diff --git a/ext/simplexml/tests/008.phpt b/ext/simplexml/tests/008.phpt index 4fda204a2..8734ba4a4 100644 --- a/ext/simplexml/tests/008.phpt +++ b/ext/simplexml/tests/008.phpt @@ -25,7 +25,10 @@ EOF; $sxe = simplexml_load_string($xml); var_dump($sxe->xpath("elem1/elem2/elem3/elem4")); +//valid expression var_dump($sxe->xpath("***")); +//invalid expression +var_dump($sxe->xpath("**")); ?> --EXPECTF-- array(1) { @@ -36,4 +39,10 @@ array(1) { } } } +array(0) { +} + +Warning: SimpleXMLElement::xpath(): Invalid expression in %s on line %d + +Warning: SimpleXMLElement::xpath(): xmlXPathEval: evaluation failed in %s on line %d bool(false) diff --git a/ext/simplexml/tests/bug37076.phpt b/ext/simplexml/tests/bug37076.phpt index a5b3801cc..c7f19b3cc 100644 --- a/ext/simplexml/tests/bug37076.phpt +++ b/ext/simplexml/tests/bug37076.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #37076 (SimpleXML ignores .=) +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> --FILE-- <?php $xml = simplexml_load_string("<root><foo /></root>"); diff --git a/ext/simplexml/tests/bug37076_1.phpt b/ext/simplexml/tests/bug37076_1.phpt index d2260040c..d4f4e0333 100644 --- a/ext/simplexml/tests/bug37076_1.phpt +++ b/ext/simplexml/tests/bug37076_1.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #37076 (SimpleXML ignores .=) (appending to unnamed attribute) +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> --FILE-- <?php $xml = simplexml_load_string("<root><foo /></root>"); diff --git a/ext/simplexml/tests/bug51615.phpt b/ext/simplexml/tests/bug51615.phpt index 75f6769ff..94c7b20c4 100644 --- a/ext/simplexml/tests/bug51615.phpt +++ b/ext/simplexml/tests/bug51615.phpt @@ -1,7 +1,9 @@ --TEST-- Bug #51615 (PHP crash with wrong HTML in SimpleXML) --SKIPIF-- -<?php if (!extension_loaded("simplexml")) print "skip"; ?> +<?php if (!extension_loaded("simplexml")) print "skip"; + if (!extension_loaded("dom")) print "skip"; +?> --FILE-- <?php diff --git a/ext/snmp/php_snmp.h b/ext/snmp/php_snmp.h index 6f17f9405..6b7f06d9b 100644 --- a/ext/snmp/php_snmp.h +++ b/ext/snmp/php_snmp.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_snmp.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_snmp.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SNMP_H #define PHP_SNMP_H diff --git a/ext/snmp/snmp.c b/ext/snmp/snmp.c index 2c2a1138f..1b02220ae 100644 --- a/ext/snmp/snmp.c +++ b/ext/snmp/snmp.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: snmp.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: snmp.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index b6f0fda32..342f70bc1 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c 314737 2011-08-10 13:44:48Z dmitry $ */ +/* $Id: php_encoding.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <time.h> diff --git a/ext/soap/php_encoding.h b/ext/soap/php_encoding.h index bf8ef5de8..5cd7d5b1c 100644 --- a/ext/soap/php_encoding.h +++ b/ext/soap/php_encoding.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_encoding.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ENCODING_H #define PHP_ENCODING_H diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index 63cd409f8..91ab27d52 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_http.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -1383,7 +1383,7 @@ static int get_http_body(php_stream *stream, int close, char *headers, char **r } } else if (header_length) { - if (header_length < 0) { + if (header_length < 0 || header_length >= INT_MAX) { return FALSE; } http_buf = emalloc(header_length + 1); diff --git a/ext/soap/php_http.h b/ext/soap/php_http.h index b22dd1e5f..42a3ba4a7 100644 --- a/ext/soap/php_http.h +++ b/ext/soap/php_http.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_http.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HTTP_H #define PHP_HTTP_H diff --git a/ext/soap/php_packet_soap.c b/ext/soap/php_packet_soap.c index a9c118f44..4f6fe33b6 100644 --- a/ext/soap/php_packet_soap.c +++ b/ext/soap/php_packet_soap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_packet_soap.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_soap.h" diff --git a/ext/soap/php_packet_soap.h b/ext/soap/php_packet_soap.h index a062b4ad0..c6960b899 100644 --- a/ext/soap/php_packet_soap.h +++ b/ext/soap/php_packet_soap.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_packet_soap.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_packet_soap.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_PACKET_SOAP_H #define PHP_PACKET_SOAP_H diff --git a/ext/soap/php_schema.c b/ext/soap/php_schema.c index 08122259d..7d4a33341 100644 --- a/ext/soap/php_schema.c +++ b/ext/soap/php_schema.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_schema.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_schema.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_soap.h" #include "libxml/uri.h" @@ -1081,8 +1081,8 @@ static int schema_group(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr groupType, sdlTyp nsptr = xmlSearchNs(groupType->doc, groupType, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&key, (char*)nsptr->href); - smart_str_appendc(&key, ':'); } + smart_str_appendc(&key, ':'); smart_str_appends(&key, type); smart_str_0(&key); @@ -1508,9 +1508,9 @@ static int schema_element(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr element, sdlTyp nsptr = xmlSearchNs(element->doc, element, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&nscat, (char*)nsptr->href); - smart_str_appendc(&nscat, ':'); newType->namens = estrdup((char*)nsptr->href); - } + } + smart_str_appendc(&nscat, ':'); smart_str_appends(&nscat, type); newType->name = estrdup(type); smart_str_0(&nscat); @@ -1734,9 +1734,9 @@ static int schema_attribute(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrType, sdl nsptr = xmlSearchNs(attrType->doc, attrType, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&key, (char*)nsptr->href); - smart_str_appendc(&key, ':'); newAttr->namens = estrdup((char*)nsptr->href); } + smart_str_appendc(&key, ':'); smart_str_appends(&key, attr_name); smart_str_0(&key); newAttr->ref = estrdup(key.c); @@ -1970,8 +1970,8 @@ static int schema_attributeGroup(sdlPtr sdl, xmlAttrPtr tns, xmlNodePtr attrGrou nsptr = xmlSearchNs(attrGroup->doc, attrGroup, BAD_CAST(ns)); if (nsptr != NULL) { smart_str_appends(&key, (char*)nsptr->href); - smart_str_appendc(&key, ':'); } + smart_str_appendc(&key, ':'); smart_str_appends(&key, group_name); smart_str_0(&key); newAttr->ref = estrdup(key.c); diff --git a/ext/soap/php_schema.h b/ext/soap/php_schema.h index 3b2042259..cf55bad02 100644 --- a/ext/soap/php_schema.h +++ b/ext/soap/php_schema.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_schema.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_schema.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SCHEMA_H #define PHP_SCHEMA_H diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 6eb016997..7750da9f1 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sdl.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" diff --git a/ext/soap/php_sdl.h b/ext/soap/php_sdl.h index 3c1c0218f..f9f2ab17f 100644 --- a/ext/soap/php_sdl.h +++ b/ext/soap/php_sdl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sdl.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SDL_H #define PHP_SDL_H diff --git a/ext/soap/php_soap.h b/ext/soap/php_soap.h index 220bf8f30..d8f1c764f 100644 --- a/ext/soap/php_soap.h +++ b/ext/soap/php_soap.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_soap.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_soap.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SOAP_H #define PHP_SOAP_H diff --git a/ext/soap/php_xml.c b/ext/soap/php_xml.c index 44961085e..8b0ede2e9 100644 --- a/ext/soap/php_xml.c +++ b/ext/soap/php_xml.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_xml.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xml.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_soap.h" #include "libxml/parser.h" diff --git a/ext/soap/php_xml.h b/ext/soap/php_xml.h index 62a4a185e..56fff3a71 100644 --- a/ext/soap/php_xml.h +++ b/ext/soap/php_xml.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_xml.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xml.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SOAP_XML_H #define PHP_SOAP_XML_H diff --git a/ext/soap/soap.c b/ext/soap/soap.c index d1660dc04..1639c7177 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: soap.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -99,6 +99,7 @@ static void soap_error_handler(int error_num, const char *error_filename, const zend_bool _old_in_compilation = CG(in_compilation); \ zend_bool _old_in_execution = EG(in_execution); \ zend_execute_data *_old_current_execute_data = EG(current_execute_data); \ + void **_old_stack_top = EG(argument_stack)->top; \ int _bailout = 0;\ SOAP_GLOBAL(use_soap_error_handler) = 1;\ SOAP_GLOBAL(error_code) = "Client";\ @@ -115,6 +116,16 @@ static void soap_error_handler(int error_num, const char *error_filename, const !instanceof_function(Z_OBJCE_P(EG(exception)), soap_fault_class_entry TSRMLS_CC)) {\ _bailout = 1;\ }\ + if (_old_stack_top != EG(argument_stack)->top) { \ + while (EG(argument_stack)->prev != NULL && \ + ((char*)_old_stack_top < (char*)EG(argument_stack) || \ + (char*) _old_stack_top > (char*)EG(argument_stack)->end)) { \ + zend_vm_stack tmp = EG(argument_stack)->prev; \ + efree(EG(argument_stack)); \ + EG(argument_stack) = tmp; \ + } \ + EG(argument_stack)->top = _old_stack_top; \ + } \ } zend_end_try();\ SOAP_GLOBAL(use_soap_error_handler) = _old_handler;\ SOAP_GLOBAL(error_code) = _old_error_code;\ diff --git a/ext/soap/tests/bugs/bug44686.phpt b/ext/soap/tests/bugs/bug44686.phpt new file mode 100644 index 000000000..cff97999c --- /dev/null +++ b/ext/soap/tests/bugs/bug44686.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #44686 (SOAP-ERROR: Parsing WSDL with references) +--SKIPIF-- +<?php require_once 'skipif.inc'; ?> +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . "/bug44686.wsdl"); +echo "ok\n"; +?> +--EXPECT-- +ok + diff --git a/ext/soap/tests/bugs/bug44686.wsdl b/ext/soap/tests/bugs/bug44686.wsdl new file mode 100644 index 000000000..87b4640b7 --- /dev/null +++ b/ext/soap/tests/bugs/bug44686.wsdl @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="utf-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://www.gomeznetworks.com/webservices/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://www.gomeznetworks.com/webservices/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> + <wsdl:types> + <s:schema elementFormDefault="qualified" targetNamespace="http://www.gomeznetworks.com/webservices/"> + <s:element name="ProvisionMonitors"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="username" type="s:string" /> + <s:element minOccurs="0" maxOccurs="1" name="password" type="s:string" /> + <s:element minOccurs="0" maxOccurs="1" ref="ProvisioningOrder" /> + </s:sequence> + </s:complexType> + </s:element> + <s:element name="ProvisionMonitorsResponse"> + <s:complexType> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" ref="ProvisioningOrderResponse" /> + </s:sequence> + </s:complexType> + </s:element> + </s:schema> + <s:schema elementFormDefault="qualified"> + <s:element name="ProvisioningOrder" type="ProvisioningOrder" /> + <s:complexType name="ProvisioningOrder"> + <s:complexContent mixed="false"> + <s:extension base="CServiceObject"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="MonitorOrders" type="ArrayOfMonitorOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="MonitorSites" type="ArrayOfMonitorSiteOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="ReportOrders" type="ArrayOfReportOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="MonitorAttributes" type="ArrayOfMonitorAttribute" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="expirationDate" type="s:dateTime" use="required" /> + <s:attribute name="autoDelete" type="s:boolean" use="required" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="CServiceObject" abstract="true" /> + <s:complexType name="ArrayOfMonitorOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorOrder" nillable="true" type="MonitorOrder" /> + </s:sequence> + </s:complexType> + <s:complexType name="MonitorOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="MonitorSites" type="ArrayOfMonitorSiteOrder" /> + <s:element minOccurs="0" maxOccurs="1" name="MonitorAttributes" type="ArrayOfMonitorAttribute" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="url" type="s:string" /> + <s:attribute name="frequencyInMins" type="s:int" use="required" /> + <s:attribute name="targetClass" type="MonitorTargetClass" use="required" /> + <s:attribute name="fileSizeOverrideInKB" type="s:int" use="required" /> + </s:complexType> + <s:complexType name="ArrayOfMonitorSiteOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorSite" nillable="true" type="MonitorSiteOrder" /> + </s:sequence> + </s:complexType> + <s:complexType name="MonitorSiteOrder"> + <s:attribute name="siteId" type="s:int" use="required" /> + </s:complexType> + <s:complexType name="ArrayOfMonitorAttribute"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorAttribute" nillable="true" type="MonitorAttribute" /> + </s:sequence> + </s:complexType> + <s:complexType name="MonitorAttribute"> + <s:attribute name="name" type="s:string" /> + <s:attribute name="value" type="s:string" /> + </s:complexType> + <s:simpleType name="MonitorTargetClass"> + <s:restriction base="s:string"> + <s:enumeration value="eTransaction" /> + <s:enumeration value="eSingleURL" /> + </s:restriction> + </s:simpleType> + <s:complexType name="ArrayOfReportOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="ReportOrder" nillable="true" type="ReportOrder" /> + </s:sequence> + </s:complexType> + <s:complexType name="ReportOrder"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="EmailTargets" type="ArrayOfEmailTarget" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="reportFormatType" type="ReportFormatType" use="required" /> + <s:attribute name="reportDeliveryType" type="ReportDeliveryType" use="required" /> + <s:attribute name="reportDelayInMins" type="s:int" use="required" /> + </s:complexType> + <s:complexType name="ArrayOfEmailTarget"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="EmailTarget" nillable="true" type="EmailTarget" /> + </s:sequence> + </s:complexType> + <s:complexType name="EmailTarget"> + <s:attribute name="address" type="s:string" /> + </s:complexType> + <s:simpleType name="ReportFormatType"> + <s:restriction base="s:string"> + <s:enumeration value="eBarChartTestByNode" /> + </s:restriction> + </s:simpleType> + <s:simpleType name="ReportDeliveryType"> + <s:restriction base="s:string"> + <s:enumeration value="eHTML" /> + </s:restriction> + </s:simpleType> + <s:element name="ProvisioningOrderResponse" type="ProvisioningOrderResponse" /> + <s:complexType name="ProvisioningOrderResponse"> + <s:complexContent mixed="false"> + <s:extension base="CommonServiceResponse"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="1" name="MonitorOrderResponses" type="ArrayOfMonitorOrderResponse" /> + <s:element minOccurs="0" maxOccurs="1" name="ReportOrderResponses" type="ArrayOfReportOrderResponse" /> + </s:sequence> + <s:attribute name="name" type="s:string" /> + <s:attribute name="groupId" type="s:int" use="required" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="CommonServiceResponse"> + <s:sequence> + <s:element minOccurs="1" maxOccurs="1" name="status" type="StatusType" /> + <s:element minOccurs="0" maxOccurs="1" name="errorMessage" type="s:string" /> + </s:sequence> + </s:complexType> + <s:simpleType name="StatusType"> + <s:restriction base="s:string"> + <s:enumeration value="SUCCESS" /> + <s:enumeration value="FAILED" /> + </s:restriction> + </s:simpleType> + <s:complexType name="ReportOrderResponse"> + <s:complexContent mixed="false"> + <s:extension base="CommonServiceResponse"> + <s:attribute name="name" type="s:string" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="MonitorOrderResponse"> + <s:complexContent mixed="false"> + <s:extension base="CommonServiceResponse"> + <s:attribute name="monitorId" type="s:int" use="required" /> + <s:attribute name="name" type="s:string" /> + <s:attribute name="url" type="s:string" /> + </s:extension> + </s:complexContent> + </s:complexType> + <s:complexType name="ArrayOfMonitorOrderResponse"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="MonitorOrderResponse" nillable="true" type="MonitorOrderResponse" /> + </s:sequence> + </s:complexType> + <s:complexType name="ArrayOfReportOrderResponse"> + <s:sequence> + <s:element minOccurs="0" maxOccurs="unbounded" name="ReportOrderResponse" nillable="true" type="ReportOrderResponse" /> + </s:sequence> + </s:complexType> + </s:schema> + </wsdl:types> + <wsdl:message name="ProvisionMonitorsSoapIn"> + <wsdl:part name="parameters" element="tns:ProvisionMonitors" /> + </wsdl:message> + <wsdl:message name="ProvisionMonitorsSoapOut"> + <wsdl:part name="parameters" element="tns:ProvisionMonitorsResponse" /> + </wsdl:message> + <wsdl:portType name="ProvisioningServiceSoap"> + <wsdl:operation name="ProvisionMonitors"> + <wsdl:input message="tns:ProvisionMonitorsSoapIn" /> + <wsdl:output message="tns:ProvisionMonitorsSoapOut" /> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="ProvisioningServiceSoap" type="tns:ProvisioningServiceSoap"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> + <wsdl:operation name="ProvisionMonitors"> + <soap:operation soapAction="http://www.gomeznetworks.com/webservices/ProvisionMonitors" style="document" /> + <wsdl:input> + <soap:body use="literal" /> + </wsdl:input> + <wsdl:output> + <soap:body use="literal" /> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="ProvisioningService"> + <wsdl:port name="ProvisioningServiceSoap" binding="tns:ProvisioningServiceSoap"> + <soap:address location="test://" /> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug54911.phpt b/ext/soap/tests/bugs/bug54911.phpt new file mode 100644 index 000000000..da57383ac --- /dev/null +++ b/ext/soap/tests/bugs/bug54911.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #54911 (Access to a undefined member in inherit SoapClient may cause Segmentation Fault) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php + class XSoapClient extends SoapClient { + function __doRequest($request, $location, $action, $version, $one_way=false) { + echo self::$crash; + } + } + $client = new XSoapClient(null, array('uri'=>'', 'location'=>'')); + $client->__soapCall('', array()); +?> +--EXPECTF-- +Fatal error: Uncaught SoapFault exception: [Client] Access to undeclared static property: XSoapClient::$crash in %sbug54911.php:4 +Stack trace: +#0 %sbug54911.php(4): XSoapClient::__doRequest() +#1 [internal function]: XSoapClient->__doRequest('<?xml version="...', '', '#', 1, 0) +#2 %sbug54911.php(8): SoapClient->__soapCall('', Array) +#3 {main} + thrown in %sbug54911.php on line 4
\ No newline at end of file diff --git a/ext/soap/tests/schema/schema064.phpt b/ext/soap/tests/schema/schema064.phpt index 53e1b257b..899a2938f 100644 --- a/ext/soap/tests/schema/schema064.phpt +++ b/ext/soap/tests/schema/schema064.phpt @@ -1,7 +1,11 @@ --TEST-- SOAP XML Schema 64: standard date/time types --SKIPIF-- -<?php require_once('skipif.inc'); ?> +<?php +if (defined('PHP_WINDOWS_VERSION_MAJOR')) { + die('skip, windows has different TZ format'); +} +require_once('skipif.inc'); ?> --FILE-- <?php include "test_schema.inc"; diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index c067532de..c599ab7e7 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sockets.h 321634 2012-01-01 13:15:04Z felipe $ */ #if HAVE_SOCKETS diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index dab8e3840..c11bcc730 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: sockets.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -884,7 +884,7 @@ PHP_FUNCTION(socket_accept) zval *arg1; php_socket *php_sock, *new_sock; php_sockaddr_storage sa; - socklen_t sa_len = sizeof(sa); + socklen_t php_sa_len = sizeof(sa); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &arg1) == FAILURE) { return; @@ -892,7 +892,7 @@ PHP_FUNCTION(socket_accept) ZEND_FETCH_RESOURCE(php_sock, php_socket *, &arg1, -1, le_socket_name, le_socket); - if (!php_accept_connect(php_sock, &new_sock, (struct sockaddr*)&sa, &sa_len TSRMLS_CC)) { + if (!php_accept_connect(php_sock, &new_sock, (struct sockaddr*)&sa, &php_sa_len TSRMLS_CC)) { RETURN_FALSE; } diff --git a/ext/sockets/tests/socket_strerror.phpt b/ext/sockets/tests/socket_strerror.phpt index 52e7a0a48..7985fadba 100644 --- a/ext/sockets/tests/socket_strerror.phpt +++ b/ext/sockets/tests/socket_strerror.phpt @@ -5,11 +5,11 @@ Florian Anderiasch fa@php.net --SKIPIF-- <?php - if (!extension_loaded('sockets')) { + if (!extension_loaded('sockets') || !function_exists('socket_strerror')) { die('skip sockets extension not available.'); } - if (!stristr(PHP_OS, "linux") { - die('skip - test validtes linux error strings only.'); + if (!stristr(PHP_OS, "Linux")) { + die('skip - test validates linux error strings only.'); } ?> --FILE-- diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h index cf3efad2d..9f0218391 100644 --- a/ext/sockets/unix_socket_constants.h +++ b/ext/sockets/unix_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unix_socket_constants.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: unix_socket_constants.h 321634 2012-01-01 13:15:04Z felipe $ */ /* This file is to be included by sockets.c */ diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h index 34d106994..3823f9c5a 100644 --- a/ext/sockets/win32_socket_constants.h +++ b/ext/sockets/win32_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: win32_socket_constants.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: win32_socket_constants.h 321634 2012-01-01 13:15:04Z felipe $ */ /* This file is to be included by sockets.c */ diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 8e172efde..1ce09fe04 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_spl.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: php_spl.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -406,6 +406,7 @@ PHP_FUNCTION(spl_autoload_call) zend_exception_save(TSRMLS_C); if (retval) { zval_ptr_dtor(&retval); + retval = NULL; } if (zend_hash_exists(EG(class_table), lc_name, class_name_len + 1)) { break; diff --git a/ext/spl/php_spl.h b/ext/spl/php_spl.h index bafaf53d4..fb0765a81 100755 --- a/ext/spl/php_spl.h +++ b/ext/spl/php_spl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index be24d48ed..c6cef638c 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: spl_array.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -77,6 +77,7 @@ typedef struct _spl_array_object { php_serialize_data_t *serialize_data; php_unserialize_data_t *unserialize_data; HashTable *debug_info; + unsigned char nApplyCount; } spl_array_object; static inline HashTable *spl_array_get_hash_table(spl_array_object* intern, int check_std_props TSRMLS_DC) { /* {{{ */ @@ -728,8 +729,16 @@ SPL_METHOD(Array, getArrayCopy) static HashTable *spl_array_get_properties(zval *object TSRMLS_DC) /* {{{ */ { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); + HashTable *result; - return spl_array_get_hash_table(intern, 1 TSRMLS_CC); + if (intern->nApplyCount > 1) { + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Nesting level too deep - recursive dependency?"); + } + + intern->nApplyCount++; + result = spl_array_get_hash_table(intern, 1 TSRMLS_CC); + intern->nApplyCount--; + return result; } /* }}} */ static HashTable* spl_array_get_debug_info(zval *obj, int *is_temp TSRMLS_DC) /* {{{ */ diff --git a/ext/spl/spl_array.h b/ext/spl/spl_array.h index 90b8e6629..b2280e613 100755 --- a/ext/spl/spl_array.h +++ b/ext/spl/spl_array.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_array.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_ARRAY_H #define SPL_ARRAY_H diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index b7560915c..76183c550 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: spl_directory.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -1215,7 +1215,10 @@ SPL_METHOD(SplFileInfo, getLinkTarget) zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC); #if defined(PHP_WIN32) || HAVE_SYMLINK - if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { + if (intern->file_name == NULL) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Empty filename"); + RETURN_FALSE; + } else if (!IS_ABSOLUTE_PATH(intern->file_name, intern->file_name_len)) { char expanded_path[MAXPATHLEN]; /* TODO: Fix expand_filepath to do not resolve links but only expand the path diff --git a/ext/spl/spl_directory.h b/ext/spl/spl_directory.h index 1d97efedb..ec31b09bb 100755 --- a/ext/spl/spl_directory.h +++ b/ext/spl/spl_directory.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_directory.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_DIRECTORY_H #define SPL_DIRECTORY_H @@ -117,7 +117,7 @@ static inline spl_filesystem_object* spl_filesystem_iterator_to_object(spl_files #define SPL_FILE_OBJECT_DROP_NEW_LINE 0x00000001 /* drop new lines */ #define SPL_FILE_OBJECT_READ_AHEAD 0x00000002 /* read on rewind/next */ -#define SPL_FILE_OBJECT_SKIP_EMPTY 0x00000006 /* skip empty lines */ +#define SPL_FILE_OBJECT_SKIP_EMPTY 0x00000004 /* skip empty lines */ #define SPL_FILE_OBJECT_READ_CSV 0x00000008 /* read via fgetcsv */ #define SPL_FILE_OBJECT_MASK 0x0000000F /* read via fgetcsv */ diff --git a/ext/spl/spl_dllist.c b/ext/spl/spl_dllist.c index 7db3885c2..3533ec4d9 100644 --- a/ext/spl/spl_dllist.c +++ b/ext/spl/spl_dllist.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_dllist.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: spl_dllist.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_dllist.h b/ext/spl/spl_dllist.h index 3bb8c28f1..dec421966 100644 --- a/ext/spl/spl_dllist.h +++ b/ext/spl/spl_dllist.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_dllist.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_dllist.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_DLLIST_H #define SPL_DLLIST_H diff --git a/ext/spl/spl_engine.c b/ext/spl/spl_engine.c index 0e922c564..9273308b1 100755 --- a/ext/spl/spl_engine.c +++ b/ext/spl/spl_engine.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/spl/spl_engine.h b/ext/spl/spl_engine.h index f6c5f5ff1..c0d044bc3 100755 --- a/ext/spl/spl_engine.h +++ b/ext/spl/spl_engine.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_engine.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_engine.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_ENGINE_H #define SPL_ENGINE_H diff --git a/ext/spl/spl_exceptions.c b/ext/spl/spl_exceptions.c index 3cdcd1f7e..fe3f4b1e1 100755 --- a/ext/spl/spl_exceptions.c +++ b/ext/spl/spl_exceptions.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_exceptions.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_exceptions.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_exceptions.h b/ext/spl/spl_exceptions.h index 3f0808db7..3c9c05788 100755 --- a/ext/spl/spl_exceptions.h +++ b/ext/spl/spl_exceptions.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_exceptions.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_exceptions.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_EXCEPTIONS_H #define SPL_EXCEPTIONS_H diff --git a/ext/spl/spl_fixedarray.c b/ext/spl/spl_fixedarray.c index 54b457b50..ad270ca52 100644 --- a/ext/spl/spl_fixedarray.c +++ b/ext/spl/spl_fixedarray.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_fixedarray.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: spl_fixedarray.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/spl/spl_fixedarray.h b/ext/spl/spl_fixedarray.h index a85ddb98e..071da5449 100644 --- a/ext/spl/spl_fixedarray.h +++ b/ext/spl/spl_fixedarray.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_fixedarray.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_fixedarray.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_FIXEDARRAY_H #define SPL_FIXEDARRAY_H diff --git a/ext/spl/spl_functions.c b/ext/spl/spl_functions.c index 48481f326..2c91ba9e5 100755 --- a/ext/spl/spl_functions.c +++ b/ext/spl/spl_functions.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_functions.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_functions.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/spl/spl_functions.h b/ext/spl/spl_functions.h index eb96ff611..f5a4195ab 100755 --- a/ext/spl/spl_functions.h +++ b/ext/spl/spl_functions.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_functions.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_functions.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_FUNCTIONS_H #define PHP_FUNCTIONS_H diff --git a/ext/spl/spl_heap.c b/ext/spl/spl_heap.c index 1001b3b3c..5152ce63d 100644 --- a/ext/spl/spl_heap.c +++ b/ext/spl/spl_heap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_heap.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_heap.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_heap.h b/ext/spl/spl_heap.h index 43bba03e1..13592821f 100644 --- a/ext/spl/spl_heap.h +++ b/ext/spl/spl_heap.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_heap.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_heap.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_HEAP_H #define SPL_HEAP_H diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 3ef0595c3..369a17905 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: spl_iterators.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -1868,7 +1868,7 @@ SPL_METHOD(RegexIterator, accept) spl_dual_it_object *intern; char *subject, tmp[32], *result; int subject_len, use_copy, count = 0, result_len; - zval subject_copy, zcount, *replacement; + zval subject_copy, zcount, *replacement, tmp_replacement; if (zend_parse_parameters_none() == FAILURE) { return; @@ -1937,6 +1937,12 @@ SPL_METHOD(RegexIterator, accept) case REGIT_MODE_REPLACE: replacement = zend_read_property(intern->std.ce, getThis(), "replacement", sizeof("replacement")-1, 1 TSRMLS_CC); + if (Z_TYPE_P(replacement) != IS_STRING) { + tmp_replacement = *replacement; + zval_copy_ctor(&tmp_replacement); + convert_to_string(&tmp_replacement); + replacement = &tmp_replacement; + } result = php_pcre_replace_impl(intern->u.regex.pce, subject, subject_len, replacement, 0, &result_len, -1, &count TSRMLS_CC); if (intern->u.regex.flags & REGIT_USE_KEY) { @@ -1951,6 +1957,10 @@ SPL_METHOD(RegexIterator, accept) MAKE_STD_ZVAL(intern->current.data); ZVAL_STRINGL(intern->current.data, result, result_len, 0); } + + if (replacement == &tmp_replacement) { + zval_dtor(replacement); + } RETVAL_BOOL(count > 0); } diff --git a/ext/spl/spl_iterators.h b/ext/spl/spl_iterators.h index dadd3a555..95aba831a 100755 --- a/ext/spl/spl_iterators.h +++ b/ext/spl/spl_iterators.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_iterators.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_ITERATORS_H #define SPL_ITERATORS_H diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index b41853032..c692734fe 100755 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is SplSubject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_observer.c 308784 2011-03-01 00:13:23Z felipe $ */ +/* $Id: spl_observer.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/spl/spl_observer.h b/ext/spl/spl_observer.h index ef246a068..4e85ce8b2 100755 --- a/ext/spl/spl_observer.h +++ b/ext/spl/spl_observer.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_observer.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: spl_observer.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SPL_OBSERVER_H #define SPL_OBSERVER_H diff --git a/ext/spl/tests/DirectoryIterator_by_reference.phpt b/ext/spl/tests/DirectoryIterator_by_reference.phpt index 5352a5df1..06127ec37 100644 --- a/ext/spl/tests/DirectoryIterator_by_reference.phpt +++ b/ext/spl/tests/DirectoryIterator_by_reference.phpt @@ -5,10 +5,10 @@ Havard Eide <nucleuz@gmail.com> #PHPTestFest2009 Norway 2009-06-09 \o/ --FILE-- <?php -$it = new DirectoryIterator("/tmp"); +$it = new DirectoryIterator(__DIR__); foreach( $it as &$file ) { echo $file . "\n"; } ?> --EXPECTF-- -Fatal error: An iterator cannot be used with foreach by reference in %s on line %d
\ No newline at end of file +Fatal error: An iterator cannot be used with foreach by reference in %s on line %d diff --git a/ext/spl/tests/DirectoryIterator_getExtension_basic.phpt b/ext/spl/tests/DirectoryIterator_getExtension_basic.phpt index 20ef3bf36..7398d4b9d 100644 --- a/ext/spl/tests/DirectoryIterator_getExtension_basic.phpt +++ b/ext/spl/tests/DirectoryIterator_getExtension_basic.phpt @@ -1,5 +1,11 @@ --TEST-- SPL: DirectoryIterator::getExtension() basic test +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip.. only for Unix'); +} +?> --FILE-- <?php $dir = __DIR__ . DIRECTORY_SEPARATOR . md5('DirectoryIterator::getExtension') . DIRECTORY_SEPARATOR; diff --git a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt index 9cc9fadbe..0c75bf4c0 100644 --- a/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt +++ b/ext/spl/tests/DirectoryIterator_getGroup_basic.phpt @@ -1,15 +1,18 @@ ---TEST--
-SPL: DirectoryIterator test getGroup
---CREDITS--
+--TEST-- +SPL: DirectoryIterator test getGroup +--SKIPIF-- +<?php +if (posix_geteuid() == 0) die('SKIP Cannot run test as root.'); +--CREDITS-- Cesare D'Amico <cesare.damico@gruppovolta.it> Andrea Giorgini <agiorg@gmail.com> Filippo De Santis <fd@ideato.it> Daniel Londero <daniel.londero@gmail.com> Francesco Trucchia <ft@ideato.it> Jacopo Romei <jacopo@sviluppoagile.it> -#Test Fest Cesena (Italy) on 2009-06-20
---FILE--
-<?php
+#Test Fest Cesena (Italy) on 2009-06-20 +--FILE-- +<?php $dirname = 'DirectoryIterator_getGroup_basic'; mkdir($dirname); $dir = new DirectoryIterator($dirname); @@ -21,6 +24,6 @@ var_dump($expected == $actual); <?php $dirname = 'DirectoryIterator_getGroup_basic'; rmdir($dirname); -?>
---EXPECTF--
+?> +--EXPECTF-- bool(true) diff --git a/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt b/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt index c5e9f7c2c..a1092c2fe 100644 --- a/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt +++ b/ext/spl/tests/DirectoryIterator_getOwner_basic.phpt @@ -1,5 +1,8 @@ --TEST-- SPL: DirectoryIterator test getOwner +--SKIPIF-- +<?php +if (posix_geteuid() == 0) die('SKIP Cannot run test as root.'); --CREDITS-- Cesare D'Amico <cesare.damico@gruppovolta.it> Andrea Giorgini <agiorg@gmail.com> diff --git a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt index c5808c57d..d27993563 100644 --- a/ext/spl/tests/SplFileInfo_getGroup_basic.phpt +++ b/ext/spl/tests/SplFileInfo_getGroup_basic.phpt @@ -10,7 +10,7 @@ Jacopo Romei <jacopo@sviluppoagile.it> #Test Fest Cesena (Italy) on 2009-06-20 --FILE-- <?php -$filename = basename(__FILE__, 'phpt').'tmp'; +$filename = __DIR__ . "/SplFileInfo_getGroup_basic"; touch($filename); $fileInfo = new SplFileInfo($filename); $expected = filegroup($filename); @@ -19,7 +19,7 @@ var_dump($expected == $actual); ?> --CLEAN-- <?php -$filename = basename(__FILE__, 'phpt').'tmp'; +$filename = __DIR__ . "/SplFileInfo_getGroup_basic"; unlink($filename); ?> --EXPECTF-- diff --git a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt index 790dcc69b..3df8e4858 100644 --- a/ext/spl/tests/SplFileInfo_getOwner_basic.phpt +++ b/ext/spl/tests/SplFileInfo_getOwner_basic.phpt @@ -10,7 +10,7 @@ Jacopo Romei <jacopo@sviluppoagile.it> #Test Fest Cesena (Italy) on 2009-06-20 --FILE-- <?php -$filename = basename(__FILE__, 'phpt').'tmp'; +$filename = __DIR__ . "/SplFileInfo_getOwner_basic"; touch($filename); $fileInfo = new SplFileInfo($filename); $expected = fileowner($filename); @@ -19,7 +19,7 @@ var_dump($expected == $actual); ?> --CLEAN-- <?php -$filename = basename(__FILE__, 'phpt').'tmp'; +$filename = __DIR__ . "/SplFileInfo_getOwner_basic"; unlink($filename); ?> --EXPECTF-- diff --git a/ext/spl/tests/bug53071.phpt b/ext/spl/tests/bug53071.phpt index b0ea3aad8..c2c2605e2 100644 --- a/ext/spl/tests/bug53071.phpt +++ b/ext/spl/tests/bug53071.phpt @@ -1,26 +1,27 @@ ---TEST--
-Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles)
---FILE--
-<?php
-class myClass
-{
- public $member;
-}
-function LimitedScope()
-{
- $myA = new myClass();
- $myB = new SplObjectStorage();
- $myC = new myClass();
- $myC->member = $myA; // myC has a referece to myA
- $myB->Attach($myC); // myB attaches myC
- $myA->member = $myB; // myA has myB, comleting the cycle
-}
-LimitedScope();
-var_dump(gc_collect_cycles());
-
-echo "Done.\n";
-
-?>
---EXPECTF--
-int(5)
-Done.
+--TEST-- +Bug #53071 (Usage of SPLObjectStorage defeats gc_collect_cycles) +--FILE-- +<?php +gc_enable(); +class myClass +{ + public $member; +} +function LimitedScope() +{ + $myA = new myClass(); + $myB = new SplObjectStorage(); + $myC = new myClass(); + $myC->member = $myA; // myC has a referece to myA + $myB->Attach($myC); // myB attaches myC + $myA->member = $myB; // myA has myB, comleting the cycle +} +LimitedScope(); +var_dump(gc_collect_cycles()); + +echo "Done.\n"; + +?> +--EXPECTF-- +int(5) +Done. diff --git a/ext/spl/tests/bug54304.phpt b/ext/spl/tests/bug54304.phpt new file mode 100644 index 000000000..32cbe486a --- /dev/null +++ b/ext/spl/tests/bug54304.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #54304 (Setting replacement value for RegexIterator doesn't work) +--FILE-- +<?php +class foo extends ArrayIterator { + public function __construct( ) { + parent::__construct(array( + 'test3'=>'test999')); + } +} + +$h = new foo; +$i = new RegexIterator($h, '/^test(.*)/', RegexIterator::REPLACE); +$i->replacement = 42; +var_dump($i->replacement); +foreach ($i as $name=>$value) { + var_dump($name, $value); +} +var_dump($i->replacement); +?> +--EXPECT-- +int(42) +string(5) "test3" +string(2) "42" +int(42) + diff --git a/ext/spl/tests/bug54971.phpt b/ext/spl/tests/bug54971.phpt index 166613b43..07a470627 100644 --- a/ext/spl/tests/bug54971.phpt +++ b/ext/spl/tests/bug54971.phpt @@ -1,5 +1,9 @@ --TEST-- Bug #54971 (Wrong result when using iterator_to_array with use_keys on true) +--SKIPIF-- +<?php +if (!extension_loaded('dom')) die("skip this test needs --enable-dom"); +?> --FILE-- <?php diff --git a/ext/spl/tests/bug60082.phpt b/ext/spl/tests/bug60082.phpt new file mode 100755 index 000000000..7aff2c416 --- /dev/null +++ b/ext/spl/tests/bug60082.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #60082 (100% CPU / when using references with ArrayObject(&$ref)) +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if ((stristr(PHP_OS, 'freebsd'))) { + die('skip.. this test causes the run-tests.php to hang on Freebsd, see #60186'); +} +?> +--FILE-- +<?php +$test = array(); +$test = new ArrayObject(&$test); +$test['a'] = $test['b']; +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Deprecated: Call-time pass-by-reference has been deprecated in %sbug60082.php on line %d + +Fatal error: main(): Array was modified outside object and made a recursive object in %sbug60082.php on line %d diff --git a/ext/spl/tests/spl_autoload_call_basic.phpt b/ext/spl/tests/spl_autoload_call_basic.phpt new file mode 100644 index 000000000..2bd65c22b --- /dev/null +++ b/ext/spl/tests/spl_autoload_call_basic.phpt @@ -0,0 +1,18 @@ +--TEST-- +spl_autoload_call() function - basic test for spl_autoload_call() +--CREDITS-- +Jean-Marc Fontaine <jean-marc.fontaine@alterway.fr> +# Alter Way Contribution Day 2011 +--FILE-- +<?php +function customAutolader($class) { + require_once __DIR__ . '/testclass.class.inc'; +} +spl_autoload_register('customAutolader'); + +spl_autoload_call('TestClass'); +var_dump(class_exists('TestClass', false)); +?> +--EXPECTF-- +%stestclass.class.inc +bool(true) diff --git a/ext/sqlite/libsqlite/src/parse.c b/ext/sqlite/libsqlite/src/parse.c index 64ec3457d..ed00220ed 100644 --- a/ext/sqlite/libsqlite/src/parse.c +++ b/ext/sqlite/libsqlite/src/parse.c @@ -1,10 +1,10 @@ /* Driver template for the LEMON parser generator. ** The author disclaims copyright to this source code. */ -/* First off, code is include which follows the "include" declaration -** in the input file. */ +/* First off, code is included that follows the "include" declaration +** in the input grammar file. */ #include <stdio.h> -#line 33 "ext/sqlite/libsqlite/src/parse.y" +#line 33 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" #include "sqliteInt.h" #include "parse.h" @@ -29,7 +29,7 @@ struct LimitVal { */ struct TrigEvent { int a; IdList * b; }; -#line 34 "ext/sqlite/libsqlite/src/parse.c" +#line 33 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ @@ -68,7 +68,8 @@ struct TrigEvent { int a; IdList * b; }; ** This is typically a union of many types, one of ** which is sqliteParserTOKENTYPE. The entry in the union ** for base tokens is called "yy0". -** YYSTACKDEPTH is the maximum depth of the parser's stack. +** YYSTACKDEPTH is the maximum depth of the parser's stack. If +** zero the stack is dynamically sized using realloc() ** sqliteParserARG_SDECL A static variable declaration for the %extra_argument ** sqliteParserARG_PDECL A parameter declaration for the %extra_argument ** sqliteParserARG_STORE Code to store %extra_argument into yypParser @@ -83,6 +84,7 @@ struct TrigEvent { int a; IdList * b; }; #define YYACTIONTYPE unsigned short int #define sqliteParserTOKENTYPE Token typedef union { + int yyinit; sqliteParserTOKENTYPE yy0; TriggerStep * yy19; struct LimitVal yy124; @@ -90,29 +92,44 @@ typedef union { Expr * yy182; Expr* yy242; struct TrigEvent yy290; - Token yy298; SrcList* yy307; IdList* yy320; ExprList* yy322; int yy372; struct {int value; int mask;} yy407; - int yy441; } YYMINORTYPE; +#ifndef YYSTACKDEPTH #define YYSTACKDEPTH 100 +#endif #define sqliteParserARG_SDECL Parse *pParse; #define sqliteParserARG_PDECL ,Parse *pParse #define sqliteParserARG_FETCH Parse *pParse = yypParser->pParse #define sqliteParserARG_STORE yypParser->pParse = pParse #define YYNSTATE 563 #define YYNRULE 293 -#define YYERRORSYMBOL 131 -#define YYERRSYMDT yy441 #define YYFALLBACK 1 #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) #define YY_ERROR_ACTION (YYNSTATE+YYNRULE) -/* Next are that tables used to determine what action to take based on the +/* The yyzerominor constant is used to initialize instances of +** YYMINORTYPE objects to zero. */ +static const YYMINORTYPE yyzerominor = { 0 }; + +/* Define the yytestcase() macro to be a no-op if is not already defined +** otherwise. +** +** Applications can choose to define yytestcase() in the %include section +** to a macro that can assist in verifying code coverage. For production +** code the yytestcase() macro should be turned off. But it is useful +** for testing. +*/ +#ifndef yytestcase +# define yytestcase(X) +#endif + + +/* Next are the tables used to determine what action to take based on the ** current state and lookahead token. These tables are used to implement ** functions that take a state number and lookahead value and return an ** action integer. @@ -159,455 +176,386 @@ typedef union { ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. */ +#define YY_ACTTAB_COUNT (1143) static const YYACTIONTYPE yy_action[] = { - /* 0 */ 264, 5, 262, 119, 123, 117, 121, 129, 131, 133, - /* 10 */ 135, 144, 146, 148, 150, 152, 154, 568, 106, 106, - /* 20 */ 143, 857, 1, 562, 3, 142, 129, 131, 133, 135, - /* 30 */ 144, 146, 148, 150, 152, 154, 174, 103, 8, 115, - /* 40 */ 104, 139, 127, 125, 156, 161, 157, 162, 166, 119, - /* 50 */ 123, 117, 121, 129, 131, 133, 135, 144, 146, 148, - /* 60 */ 150, 152, 154, 31, 361, 392, 263, 143, 363, 369, - /* 70 */ 374, 97, 142, 148, 150, 152, 154, 68, 75, 377, - /* 80 */ 167, 64, 218, 46, 20, 289, 115, 104, 139, 127, - /* 90 */ 125, 156, 161, 157, 162, 166, 119, 123, 117, 121, - /* 100 */ 129, 131, 133, 135, 144, 146, 148, 150, 152, 154, - /* 110 */ 193, 41, 336, 563, 44, 54, 60, 62, 308, 331, - /* 120 */ 175, 20, 560, 561, 572, 333, 640, 18, 359, 144, - /* 130 */ 146, 148, 150, 152, 154, 143, 181, 179, 303, 18, - /* 140 */ 142, 84, 86, 20, 177, 66, 67, 111, 21, 22, - /* 150 */ 112, 105, 83, 792, 115, 104, 139, 127, 125, 156, - /* 160 */ 161, 157, 162, 166, 119, 123, 117, 121, 129, 131, - /* 170 */ 133, 135, 144, 146, 148, 150, 152, 154, 790, 560, - /* 180 */ 561, 46, 13, 113, 183, 21, 22, 534, 361, 2, - /* 190 */ 3, 14, 363, 369, 374, 338, 361, 690, 544, 542, - /* 200 */ 363, 369, 374, 377, 836, 143, 15, 21, 22, 16, - /* 210 */ 142, 377, 44, 54, 60, 62, 308, 331, 396, 535, - /* 220 */ 17, 9, 191, 333, 115, 104, 139, 127, 125, 156, - /* 230 */ 161, 157, 162, 166, 119, 123, 117, 121, 129, 131, - /* 240 */ 133, 135, 144, 146, 148, 150, 152, 154, 571, 230, - /* 250 */ 340, 343, 143, 20, 536, 537, 538, 142, 402, 337, - /* 260 */ 398, 339, 357, 68, 346, 347, 32, 64, 266, 391, - /* 270 */ 37, 115, 104, 139, 127, 125, 156, 161, 157, 162, - /* 280 */ 166, 119, 123, 117, 121, 129, 131, 133, 135, 144, - /* 290 */ 146, 148, 150, 152, 154, 839, 193, 651, 291, 298, - /* 300 */ 300, 221, 357, 43, 173, 689, 175, 251, 330, 36, - /* 310 */ 37, 106, 232, 40, 335, 58, 137, 21, 22, 330, - /* 320 */ 411, 143, 181, 179, 47, 59, 142, 358, 390, 174, - /* 330 */ 177, 66, 67, 111, 448, 49, 112, 105, 583, 213, - /* 340 */ 115, 104, 139, 127, 125, 156, 161, 157, 162, 166, - /* 350 */ 119, 123, 117, 121, 129, 131, 133, 135, 144, 146, - /* 360 */ 148, 150, 152, 154, 306, 301, 106, 249, 259, 113, - /* 370 */ 183, 793, 70, 253, 281, 219, 20, 106, 20, 11, - /* 380 */ 106, 482, 454, 444, 299, 143, 169, 10, 171, 172, - /* 390 */ 142, 169, 73, 171, 172, 103, 688, 69, 174, 169, - /* 400 */ 252, 171, 172, 12, 115, 104, 139, 127, 125, 156, - /* 410 */ 161, 157, 162, 166, 119, 123, 117, 121, 129, 131, - /* 420 */ 133, 135, 144, 146, 148, 150, 152, 154, 95, 237, - /* 430 */ 313, 20, 143, 295, 244, 424, 169, 142, 171, 172, - /* 440 */ 21, 22, 21, 22, 219, 386, 316, 323, 325, 837, - /* 450 */ 19, 115, 104, 139, 127, 125, 156, 161, 157, 162, - /* 460 */ 166, 119, 123, 117, 121, 129, 131, 133, 135, 144, - /* 470 */ 146, 148, 150, 152, 154, 106, 661, 20, 264, 143, - /* 480 */ 262, 844, 315, 169, 142, 171, 172, 333, 38, 842, - /* 490 */ 10, 356, 348, 184, 421, 21, 22, 282, 115, 104, - /* 500 */ 139, 127, 125, 156, 161, 157, 162, 166, 119, 123, - /* 510 */ 117, 121, 129, 131, 133, 135, 144, 146, 148, 150, - /* 520 */ 152, 154, 69, 254, 262, 251, 143, 639, 663, 35, - /* 530 */ 65, 142, 726, 313, 283, 259, 185, 417, 419, 418, - /* 540 */ 284, 21, 22, 690, 263, 115, 104, 139, 127, 125, - /* 550 */ 156, 161, 157, 162, 166, 119, 123, 117, 121, 129, - /* 560 */ 131, 133, 135, 144, 146, 148, 150, 152, 154, 256, - /* 570 */ 20, 791, 424, 143, 169, 52, 171, 172, 142, 169, - /* 580 */ 24, 171, 172, 247, 53, 315, 26, 169, 263, 171, - /* 590 */ 172, 253, 115, 164, 139, 127, 125, 156, 161, 157, - /* 600 */ 162, 166, 119, 123, 117, 121, 129, 131, 133, 135, - /* 610 */ 144, 146, 148, 150, 152, 154, 426, 349, 252, 425, - /* 620 */ 143, 262, 575, 297, 591, 142, 169, 296, 171, 172, - /* 630 */ 169, 471, 171, 172, 21, 22, 427, 221, 91, 115, - /* 640 */ 227, 139, 127, 125, 156, 161, 157, 162, 166, 119, - /* 650 */ 123, 117, 121, 129, 131, 133, 135, 144, 146, 148, - /* 660 */ 150, 152, 154, 388, 312, 106, 89, 143, 720, 376, - /* 670 */ 387, 170, 142, 487, 666, 248, 320, 216, 319, 217, - /* 680 */ 28, 459, 30, 305, 189, 263, 209, 104, 139, 127, - /* 690 */ 125, 156, 161, 157, 162, 166, 119, 123, 117, 121, - /* 700 */ 129, 131, 133, 135, 144, 146, 148, 150, 152, 154, - /* 710 */ 106, 106, 809, 494, 143, 489, 106, 816, 33, 142, - /* 720 */ 395, 234, 273, 217, 274, 420, 20, 545, 114, 481, - /* 730 */ 137, 429, 576, 321, 116, 139, 127, 125, 156, 161, - /* 740 */ 157, 162, 166, 119, 123, 117, 121, 129, 131, 133, - /* 750 */ 135, 144, 146, 148, 150, 152, 154, 7, 322, 23, - /* 760 */ 25, 27, 394, 68, 415, 416, 10, 64, 197, 477, - /* 770 */ 577, 533, 266, 548, 578, 831, 276, 201, 520, 4, - /* 780 */ 6, 245, 430, 557, 29, 266, 491, 106, 441, 497, - /* 790 */ 21, 22, 205, 168, 443, 195, 193, 531, 276, 448, - /* 800 */ 276, 808, 267, 272, 529, 174, 175, 318, 440, 341, - /* 810 */ 344, 106, 342, 345, 69, 286, 68, 582, 69, 69, - /* 820 */ 64, 540, 181, 179, 541, 328, 302, 366, 217, 118, - /* 830 */ 177, 66, 67, 111, 34, 143, 112, 105, 445, 510, - /* 840 */ 142, 215, 278, 800, 467, 276, 498, 503, 444, 193, - /* 850 */ 106, 219, 486, 443, 42, 73, 231, 73, 45, 175, - /* 860 */ 449, 39, 225, 229, 278, 451, 278, 68, 174, 113, - /* 870 */ 183, 64, 371, 55, 106, 181, 179, 292, 69, 276, - /* 880 */ 276, 69, 48, 177, 66, 67, 111, 224, 276, 112, - /* 890 */ 105, 106, 481, 393, 106, 106, 63, 106, 106, 106, - /* 900 */ 193, 653, 106, 467, 233, 51, 380, 437, 526, 120, - /* 910 */ 175, 278, 122, 124, 219, 126, 128, 130, 69, 453, - /* 920 */ 132, 106, 113, 183, 451, 106, 181, 179, 159, 106, - /* 930 */ 106, 106, 518, 106, 177, 66, 67, 111, 106, 134, - /* 940 */ 112, 105, 422, 136, 106, 278, 278, 138, 141, 145, - /* 950 */ 720, 147, 106, 329, 275, 274, 149, 106, 852, 158, - /* 960 */ 106, 106, 151, 106, 106, 351, 106, 352, 106, 464, - /* 970 */ 153, 106, 106, 113, 183, 155, 106, 106, 163, 165, - /* 980 */ 106, 176, 178, 106, 180, 106, 182, 106, 401, 190, - /* 990 */ 192, 106, 106, 293, 210, 212, 106, 367, 214, 274, - /* 1000 */ 372, 226, 274, 228, 381, 241, 274, 106, 106, 246, - /* 1010 */ 280, 290, 106, 69, 375, 438, 472, 274, 422, 832, - /* 1020 */ 106, 73, 474, 73, 458, 412, 462, 480, 464, 478, - /* 1030 */ 466, 690, 515, 519, 475, 478, 516, 50, 479, 221, - /* 1040 */ 690, 221, 56, 57, 61, 592, 71, 69, 593, 73, - /* 1050 */ 72, 74, 245, 242, 93, 81, 76, 69, 77, 240, - /* 1060 */ 78, 82, 79, 245, 85, 554, 80, 88, 87, 90, - /* 1070 */ 92, 94, 96, 102, 100, 99, 101, 107, 109, 160, - /* 1080 */ 154, 667, 98, 508, 108, 668, 110, 220, 211, 669, - /* 1090 */ 137, 140, 188, 194, 186, 196, 187, 199, 198, 200, - /* 1100 */ 203, 204, 202, 207, 206, 208, 221, 223, 222, 235, - /* 1110 */ 236, 239, 238, 217, 250, 258, 243, 261, 279, 270, - /* 1120 */ 271, 255, 257, 260, 269, 265, 285, 294, 277, 268, - /* 1130 */ 287, 304, 309, 307, 327, 312, 288, 354, 389, 314, - /* 1140 */ 364, 365, 370, 378, 379, 382, 310, 49, 311, 362, - /* 1150 */ 368, 373, 317, 324, 326, 332, 350, 355, 383, 400, - /* 1160 */ 353, 397, 399, 403, 404, 334, 405, 406, 407, 384, - /* 1170 */ 413, 409, 824, 414, 360, 385, 829, 423, 410, 431, - /* 1180 */ 428, 432, 830, 433, 434, 436, 439, 798, 799, 447, - /* 1190 */ 442, 450, 727, 728, 446, 823, 452, 838, 455, 445, - /* 1200 */ 456, 457, 408, 435, 460, 461, 463, 840, 465, 468, - /* 1210 */ 470, 469, 476, 841, 483, 485, 843, 660, 662, 493, - /* 1220 */ 806, 496, 473, 849, 499, 719, 501, 484, 488, 490, - /* 1230 */ 492, 502, 504, 495, 500, 507, 505, 506, 509, 722, - /* 1240 */ 513, 511, 512, 514, 517, 725, 528, 522, 524, 525, - /* 1250 */ 527, 523, 807, 530, 810, 532, 811, 812, 813, 814, - /* 1260 */ 817, 819, 539, 820, 818, 815, 521, 543, 546, 552, - /* 1270 */ 556, 550, 850, 547, 549, 851, 555, 558, 551, 855, - /* 1280 */ 553, 559, + /* 0 */ 186, 561, 483, 69, 67, 70, 68, 64, 63, 62, + /* 10 */ 61, 58, 57, 56, 55, 54, 53, 181, 180, 179, + /* 20 */ 514, 421, 334, 420, 468, 515, 64, 63, 62, 61, + /* 30 */ 58, 57, 56, 55, 54, 53, 9, 423, 422, 71, + /* 40 */ 72, 129, 65, 66, 513, 510, 305, 52, 138, 69, + /* 50 */ 67, 70, 68, 64, 63, 62, 61, 58, 57, 56, + /* 60 */ 55, 54, 53, 448, 469, 175, 482, 514, 470, 344, + /* 70 */ 342, 36, 515, 58, 57, 56, 55, 54, 53, 8, + /* 80 */ 341, 281, 285, 307, 437, 178, 71, 72, 129, 65, + /* 90 */ 66, 513, 510, 305, 52, 138, 69, 67, 70, 68, + /* 100 */ 64, 63, 62, 61, 58, 57, 56, 55, 54, 53, + /* 110 */ 130, 362, 360, 508, 507, 267, 551, 436, 298, 297, + /* 120 */ 369, 368, 50, 128, 543, 29, 266, 449, 537, 447, + /* 130 */ 591, 528, 442, 441, 187, 132, 514, 536, 47, 48, + /* 140 */ 472, 515, 122, 427, 331, 409, 49, 371, 370, 518, + /* 150 */ 328, 363, 517, 520, 45, 71, 72, 129, 65, 66, + /* 160 */ 513, 510, 305, 52, 138, 69, 67, 70, 68, 64, + /* 170 */ 63, 62, 61, 58, 57, 56, 55, 54, 53, 185, + /* 180 */ 550, 549, 512, 175, 467, 516, 18, 344, 342, 36, + /* 190 */ 194, 175, 320, 230, 231, 344, 342, 36, 341, 56, + /* 200 */ 55, 54, 53, 212, 531, 514, 341, 544, 551, 3, + /* 210 */ 515, 551, 362, 551, 508, 507, 184, 132, 195, 213, + /* 220 */ 551, 309, 348, 42, 71, 72, 129, 65, 66, 513, + /* 230 */ 510, 305, 52, 138, 69, 67, 70, 68, 64, 63, + /* 240 */ 62, 61, 58, 57, 56, 55, 54, 53, 243, 197, + /* 250 */ 282, 73, 268, 373, 264, 372, 183, 241, 2, 358, + /* 260 */ 7, 563, 551, 240, 551, 471, 385, 201, 356, 514, + /* 270 */ 379, 378, 550, 549, 515, 550, 549, 550, 549, 500, + /* 280 */ 506, 17, 172, 354, 550, 549, 359, 392, 71, 72, + /* 290 */ 129, 65, 66, 513, 510, 305, 52, 138, 69, 67, + /* 300 */ 70, 68, 64, 63, 62, 61, 58, 57, 56, 55, + /* 310 */ 54, 53, 486, 365, 416, 551, 514, 417, 493, 494, + /* 320 */ 17, 515, 169, 478, 171, 80, 550, 549, 550, 549, + /* 330 */ 466, 108, 17, 144, 332, 71, 72, 129, 65, 66, + /* 340 */ 513, 510, 305, 52, 138, 69, 67, 70, 68, 64, + /* 350 */ 63, 62, 61, 58, 57, 56, 55, 54, 53, 446, + /* 360 */ 182, 488, 445, 514, 366, 249, 490, 362, 515, 508, + /* 370 */ 507, 429, 463, 444, 375, 338, 443, 12, 430, 550, + /* 380 */ 549, 592, 71, 72, 129, 65, 66, 513, 510, 305, + /* 390 */ 52, 138, 69, 67, 70, 68, 64, 63, 62, 61, + /* 400 */ 58, 57, 56, 55, 54, 53, 362, 485, 508, 507, + /* 410 */ 514, 459, 286, 460, 436, 515, 388, 240, 269, 387, + /* 420 */ 182, 426, 29, 857, 82, 377, 1, 134, 593, 71, + /* 430 */ 51, 129, 65, 66, 513, 510, 305, 52, 138, 69, + /* 440 */ 67, 70, 68, 64, 63, 62, 61, 58, 57, 56, + /* 450 */ 55, 54, 53, 551, 487, 177, 365, 514, 87, 483, + /* 460 */ 542, 450, 515, 454, 160, 80, 453, 440, 239, 176, + /* 470 */ 80, 238, 286, 80, 106, 458, 71, 40, 129, 65, + /* 480 */ 66, 513, 510, 305, 52, 138, 69, 67, 70, 68, + /* 490 */ 64, 63, 62, 61, 58, 57, 56, 55, 54, 53, + /* 500 */ 457, 393, 534, 418, 514, 186, 527, 483, 156, 515, + /* 510 */ 351, 323, 533, 339, 232, 80, 80, 550, 549, 46, + /* 520 */ 498, 44, 526, 482, 72, 129, 65, 66, 513, 510, + /* 530 */ 305, 52, 138, 69, 67, 70, 68, 64, 63, 62, + /* 540 */ 61, 58, 57, 56, 55, 54, 53, 365, 153, 300, + /* 550 */ 155, 514, 405, 431, 165, 404, 515, 32, 396, 13, + /* 560 */ 32, 86, 333, 323, 38, 106, 205, 414, 391, 390, + /* 570 */ 202, 482, 129, 65, 66, 513, 510, 305, 52, 138, + /* 580 */ 69, 67, 70, 68, 64, 63, 62, 61, 58, 57, + /* 590 */ 56, 55, 54, 53, 274, 309, 272, 271, 270, 23, + /* 600 */ 8, 301, 211, 11, 307, 418, 212, 365, 483, 31, + /* 610 */ 217, 498, 562, 1, 60, 219, 480, 365, 204, 321, + /* 620 */ 215, 154, 207, 137, 480, 93, 268, 373, 264, 372, + /* 630 */ 183, 241, 365, 360, 203, 106, 409, 240, 365, 207, + /* 640 */ 365, 145, 541, 50, 412, 365, 247, 453, 531, 302, + /* 650 */ 105, 135, 173, 8, 245, 170, 106, 307, 108, 47, + /* 660 */ 48, 346, 19, 106, 290, 289, 299, 49, 371, 370, + /* 670 */ 518, 304, 482, 517, 520, 158, 531, 531, 193, 800, + /* 680 */ 531, 498, 207, 319, 223, 231, 360, 207, 475, 283, + /* 690 */ 514, 162, 257, 252, 212, 515, 50, 365, 511, 303, + /* 700 */ 531, 557, 499, 192, 8, 475, 516, 18, 307, 498, + /* 710 */ 556, 365, 47, 48, 295, 93, 531, 41, 136, 207, + /* 720 */ 49, 371, 370, 518, 148, 555, 517, 520, 554, 89, + /* 730 */ 376, 560, 365, 162, 509, 214, 480, 360, 365, 553, + /* 740 */ 152, 322, 495, 505, 141, 212, 294, 50, 477, 531, + /* 750 */ 112, 284, 207, 475, 504, 288, 90, 327, 531, 516, + /* 760 */ 18, 207, 326, 47, 48, 531, 473, 212, 365, 531, + /* 770 */ 191, 49, 371, 370, 518, 365, 365, 517, 520, 293, + /* 780 */ 316, 503, 365, 322, 60, 475, 109, 365, 291, 190, + /* 790 */ 317, 365, 502, 121, 120, 365, 189, 365, 365, 407, + /* 800 */ 119, 365, 365, 501, 326, 118, 365, 365, 365, 117, + /* 810 */ 516, 18, 365, 116, 365, 126, 125, 365, 475, 124, + /* 820 */ 123, 365, 365, 365, 115, 114, 140, 475, 365, 365, + /* 830 */ 139, 365, 255, 365, 365, 254, 365, 365, 365, 253, + /* 840 */ 280, 107, 365, 365, 10, 365, 113, 111, 365, 279, + /* 850 */ 365, 278, 277, 365, 92, 104, 103, 365, 365, 365, + /* 860 */ 91, 102, 365, 101, 365, 365, 110, 347, 100, 379, + /* 870 */ 378, 99, 17, 484, 28, 98, 30, 97, 79, 131, + /* 880 */ 96, 465, 95, 94, 439, 14, 343, 26, 25, 340, + /* 890 */ 24, 174, 266, 85, 166, 292, 78, 165, 415, 164, + /* 900 */ 163, 22, 6, 408, 5, 77, 34, 33, 159, 16, + /* 910 */ 157, 151, 75, 149, 146, 15, 312, 395, 384, 313, + /* 920 */ 143, 20, 206, 60, 21, 273, 198, 375, 559, 548, + /* 930 */ 547, 546, 4, 212, 538, 261, 308, 38, 540, 530, + /* 940 */ 260, 39, 352, 374, 539, 535, 532, 196, 367, 210, + /* 950 */ 256, 259, 522, 53, 258, 521, 529, 209, 188, 43, + /* 960 */ 27, 37, 349, 496, 492, 452, 81, 276, 246, 275, + /* 970 */ 479, 244, 208, 464, 474, 451, 433, 335, 432, 413, + /* 980 */ 234, 35, 127, 76, 381, 858, 410, 161, 858, 199, + /* 990 */ 858, 858, 858, 858, 858, 858, 403, 858, 235, 858, + /* 1000 */ 858, 858, 329, 858, 150, 398, 858, 545, 858, 858, + /* 1010 */ 400, 399, 858, 224, 858, 858, 84, 147, 858, 318, + /* 1020 */ 265, 858, 220, 858, 858, 858, 858, 552, 74, 424, + /* 1030 */ 858, 523, 858, 858, 491, 476, 287, 315, 858, 83, + /* 1040 */ 88, 262, 463, 364, 519, 310, 382, 357, 355, 353, + /* 1050 */ 858, 306, 497, 481, 525, 406, 524, 242, 462, 397, + /* 1060 */ 434, 237, 858, 425, 337, 168, 858, 438, 461, 858, + /* 1070 */ 296, 200, 236, 419, 456, 383, 330, 142, 263, 361, + /* 1080 */ 345, 858, 455, 233, 325, 324, 489, 229, 228, 402, + /* 1090 */ 401, 858, 227, 226, 225, 389, 386, 222, 221, 218, + /* 1100 */ 314, 394, 311, 216, 558, 380, 251, 250, 133, 350, + /* 1110 */ 248, 858, 435, 858, 858, 858, 858, 858, 858, 858, + /* 1120 */ 858, 858, 428, 858, 858, 411, 858, 858, 858, 858, + /* 1130 */ 59, 858, 858, 858, 858, 858, 858, 858, 858, 858, + /* 1140 */ 167, 858, 336, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 21, 9, 23, 70, 71, 72, 73, 74, 75, 76, - /* 10 */ 77, 78, 79, 80, 81, 82, 83, 9, 140, 140, - /* 20 */ 41, 132, 133, 134, 135, 46, 74, 75, 76, 77, - /* 30 */ 78, 79, 80, 81, 82, 83, 158, 158, 138, 60, + /* 10 */ 77, 78, 79, 80, 81, 82, 83, 100, 101, 102, + /* 20 */ 41, 100, 101, 102, 20, 46, 74, 75, 76, 77, + /* 30 */ 78, 79, 80, 81, 82, 83, 19, 55, 56, 60, /* 40 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, /* 50 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - /* 60 */ 81, 82, 83, 19, 90, 21, 87, 41, 94, 95, - /* 70 */ 96, 192, 46, 80, 81, 82, 83, 19, 174, 105, - /* 80 */ 19, 23, 204, 62, 23, 181, 60, 61, 62, 63, + /* 60 */ 81, 82, 83, 23, 108, 90, 87, 41, 112, 94, + /* 70 */ 95, 96, 46, 78, 79, 80, 81, 82, 83, 19, + /* 80 */ 105, 149, 143, 23, 152, 153, 60, 61, 62, 63, /* 90 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, /* 100 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - /* 110 */ 52, 90, 91, 0, 93, 94, 95, 96, 97, 98, - /* 120 */ 62, 23, 9, 10, 9, 104, 20, 12, 22, 78, - /* 130 */ 79, 80, 81, 82, 83, 41, 78, 79, 80, 12, - /* 140 */ 46, 78, 79, 23, 86, 87, 88, 89, 87, 88, - /* 150 */ 92, 93, 89, 127, 60, 61, 62, 63, 64, 65, - /* 160 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - /* 170 */ 76, 77, 78, 79, 80, 81, 82, 83, 14, 9, - /* 180 */ 10, 62, 15, 125, 126, 87, 88, 140, 90, 134, - /* 190 */ 135, 24, 94, 95, 96, 23, 90, 9, 78, 79, - /* 200 */ 94, 95, 96, 105, 11, 41, 39, 87, 88, 42, - /* 210 */ 46, 105, 93, 94, 95, 96, 97, 98, 17, 99, - /* 220 */ 53, 139, 128, 104, 60, 61, 62, 63, 64, 65, + /* 110 */ 31, 107, 52, 109, 110, 93, 23, 140, 78, 79, + /* 120 */ 78, 79, 62, 22, 147, 148, 104, 87, 34, 89, + /* 130 */ 113, 89, 92, 93, 183, 184, 41, 43, 78, 79, + /* 140 */ 80, 46, 165, 166, 205, 53, 86, 87, 88, 89, + /* 150 */ 211, 62, 92, 93, 128, 60, 61, 62, 63, 64, + /* 160 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + /* 170 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 146, + /* 180 */ 87, 88, 93, 90, 20, 125, 126, 94, 95, 96, + /* 190 */ 22, 90, 100, 101, 102, 94, 95, 96, 105, 80, + /* 200 */ 81, 82, 83, 111, 171, 41, 105, 20, 23, 19, + /* 210 */ 46, 23, 107, 23, 109, 110, 183, 184, 50, 48, + /* 220 */ 23, 62, 189, 128, 60, 61, 62, 63, 64, 65, /* 230 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - /* 240 */ 76, 77, 78, 79, 80, 81, 82, 83, 9, 19, - /* 250 */ 78, 79, 41, 23, 207, 208, 209, 46, 57, 87, - /* 260 */ 59, 89, 140, 19, 92, 93, 144, 23, 152, 147, - /* 270 */ 148, 60, 61, 62, 63, 64, 65, 66, 67, 68, - /* 280 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - /* 290 */ 79, 80, 81, 82, 83, 14, 52, 9, 182, 20, - /* 300 */ 20, 113, 140, 156, 20, 20, 62, 22, 161, 147, - /* 310 */ 148, 140, 20, 155, 156, 26, 200, 87, 88, 161, - /* 320 */ 127, 41, 78, 79, 93, 36, 46, 165, 166, 158, - /* 330 */ 86, 87, 88, 89, 53, 104, 92, 93, 9, 128, - /* 340 */ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, - /* 350 */ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, - /* 360 */ 80, 81, 82, 83, 20, 194, 140, 183, 184, 125, - /* 370 */ 126, 127, 146, 88, 19, 204, 23, 140, 23, 31, - /* 380 */ 140, 100, 101, 102, 158, 41, 107, 99, 109, 110, - /* 390 */ 46, 107, 111, 109, 110, 158, 20, 171, 158, 107, - /* 400 */ 115, 109, 110, 170, 60, 61, 62, 63, 64, 65, - /* 410 */ 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, - /* 420 */ 76, 77, 78, 79, 80, 81, 82, 83, 191, 192, - /* 430 */ 47, 23, 41, 80, 194, 140, 107, 46, 109, 110, - /* 440 */ 87, 88, 87, 88, 204, 62, 100, 101, 102, 11, - /* 450 */ 140, 60, 61, 62, 63, 64, 65, 66, 67, 68, - /* 460 */ 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, - /* 470 */ 79, 80, 81, 82, 83, 140, 9, 23, 21, 41, - /* 480 */ 23, 9, 99, 107, 46, 109, 110, 104, 149, 9, - /* 490 */ 99, 152, 153, 158, 199, 87, 88, 146, 60, 61, - /* 500 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, - /* 510 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - /* 520 */ 82, 83, 171, 115, 23, 22, 41, 20, 9, 22, - /* 530 */ 19, 46, 9, 47, 183, 184, 201, 100, 101, 102, - /* 540 */ 189, 87, 88, 19, 87, 60, 61, 62, 63, 64, - /* 550 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, - /* 560 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 115, - /* 570 */ 23, 14, 140, 41, 107, 34, 109, 110, 46, 107, - /* 580 */ 138, 109, 110, 22, 43, 99, 138, 107, 87, 109, - /* 590 */ 110, 88, 60, 61, 62, 63, 64, 65, 66, 67, - /* 600 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, - /* 610 */ 78, 79, 80, 81, 82, 83, 25, 19, 115, 28, - /* 620 */ 41, 23, 9, 108, 113, 46, 107, 112, 109, 110, - /* 630 */ 107, 199, 109, 110, 87, 88, 45, 113, 22, 60, - /* 640 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, - /* 650 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - /* 660 */ 81, 82, 83, 161, 162, 140, 50, 41, 9, 139, - /* 670 */ 168, 108, 46, 17, 111, 114, 91, 20, 93, 22, - /* 680 */ 138, 22, 142, 158, 127, 87, 129, 61, 62, 63, - /* 690 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, - /* 700 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - /* 710 */ 140, 140, 9, 57, 41, 59, 140, 9, 145, 46, - /* 720 */ 143, 20, 20, 22, 22, 49, 23, 19, 158, 158, - /* 730 */ 200, 18, 9, 29, 158, 62, 63, 64, 65, 66, - /* 740 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, - /* 750 */ 77, 78, 79, 80, 81, 82, 83, 11, 54, 13, - /* 760 */ 14, 15, 16, 19, 55, 56, 99, 23, 15, 198, - /* 770 */ 9, 63, 152, 27, 9, 99, 140, 24, 32, 136, - /* 780 */ 137, 122, 205, 37, 141, 152, 130, 140, 211, 146, - /* 790 */ 87, 88, 39, 146, 146, 42, 52, 51, 140, 53, - /* 800 */ 140, 9, 182, 167, 58, 158, 62, 103, 95, 89, - /* 810 */ 89, 140, 92, 92, 171, 182, 19, 9, 171, 171, - /* 820 */ 23, 89, 78, 79, 92, 167, 20, 167, 22, 158, - /* 830 */ 86, 87, 88, 89, 20, 41, 92, 93, 60, 196, - /* 840 */ 46, 194, 206, 130, 196, 140, 100, 101, 102, 52, - /* 850 */ 140, 204, 106, 146, 140, 111, 146, 111, 139, 62, - /* 860 */ 212, 150, 68, 69, 206, 217, 206, 19, 158, 125, - /* 870 */ 126, 23, 167, 48, 140, 78, 79, 80, 171, 140, - /* 880 */ 140, 171, 139, 86, 87, 88, 89, 93, 140, 92, - /* 890 */ 93, 140, 158, 146, 140, 140, 19, 140, 140, 140, - /* 900 */ 52, 123, 140, 196, 194, 44, 167, 167, 116, 158, - /* 910 */ 62, 206, 158, 158, 204, 158, 158, 158, 171, 212, - /* 920 */ 158, 140, 125, 126, 217, 140, 78, 79, 62, 140, - /* 930 */ 140, 140, 198, 140, 86, 87, 88, 89, 140, 158, - /* 940 */ 92, 93, 22, 158, 140, 206, 206, 158, 158, 158, - /* 950 */ 9, 158, 140, 20, 206, 22, 158, 140, 9, 93, - /* 960 */ 140, 140, 158, 140, 140, 20, 140, 22, 140, 140, - /* 970 */ 158, 140, 140, 125, 126, 158, 140, 140, 158, 158, - /* 980 */ 140, 158, 158, 140, 158, 140, 158, 140, 146, 158, - /* 990 */ 158, 140, 140, 140, 158, 158, 140, 20, 158, 22, - /* 1000 */ 20, 158, 22, 158, 20, 158, 22, 140, 140, 158, - /* 1010 */ 158, 158, 140, 171, 158, 20, 20, 22, 22, 99, - /* 1020 */ 140, 111, 146, 111, 195, 158, 158, 20, 140, 22, - /* 1030 */ 158, 103, 146, 20, 124, 22, 124, 164, 158, 113, - /* 1040 */ 114, 113, 157, 139, 139, 113, 172, 171, 113, 111, - /* 1050 */ 171, 173, 122, 119, 117, 180, 175, 171, 176, 120, - /* 1060 */ 177, 121, 178, 122, 89, 116, 179, 154, 89, 154, - /* 1070 */ 154, 118, 22, 151, 98, 157, 23, 113, 113, 93, - /* 1080 */ 83, 111, 193, 195, 140, 111, 140, 140, 127, 111, - /* 1090 */ 200, 200, 14, 19, 202, 20, 203, 140, 22, 20, - /* 1100 */ 140, 20, 22, 140, 22, 20, 113, 186, 140, 140, - /* 1110 */ 186, 157, 193, 22, 185, 115, 118, 186, 99, 116, - /* 1120 */ 19, 140, 140, 140, 188, 140, 20, 113, 157, 187, - /* 1130 */ 187, 20, 140, 139, 19, 162, 188, 20, 166, 140, - /* 1140 */ 48, 19, 19, 48, 19, 97, 159, 104, 160, 140, - /* 1150 */ 139, 139, 163, 163, 163, 151, 154, 152, 140, 21, - /* 1160 */ 154, 140, 140, 140, 213, 164, 214, 99, 140, 159, - /* 1170 */ 40, 215, 11, 38, 166, 160, 99, 140, 216, 130, - /* 1180 */ 49, 140, 99, 99, 140, 19, 139, 9, 130, 169, - /* 1190 */ 11, 14, 123, 123, 170, 9, 9, 14, 169, 60, - /* 1200 */ 140, 103, 186, 186, 140, 63, 176, 9, 63, 123, - /* 1210 */ 19, 140, 19, 9, 114, 176, 9, 9, 9, 186, - /* 1220 */ 9, 186, 197, 9, 114, 9, 186, 140, 140, 140, - /* 1230 */ 140, 176, 169, 140, 140, 103, 140, 186, 176, 9, - /* 1240 */ 186, 123, 140, 197, 19, 9, 87, 140, 114, 140, - /* 1250 */ 35, 186, 9, 140, 9, 152, 9, 9, 9, 9, - /* 1260 */ 9, 9, 210, 9, 9, 9, 169, 210, 140, 140, - /* 1270 */ 33, 152, 9, 20, 218, 9, 152, 218, 21, 9, - /* 1280 */ 219, 140, + /* 240 */ 76, 77, 78, 79, 80, 81, 82, 83, 20, 90, + /* 250 */ 91, 19, 93, 94, 95, 96, 97, 98, 19, 15, + /* 260 */ 19, 0, 23, 104, 23, 80, 78, 79, 24, 41, + /* 270 */ 9, 10, 87, 88, 46, 87, 88, 87, 88, 20, + /* 280 */ 20, 22, 17, 39, 87, 88, 42, 99, 60, 61, + /* 290 */ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, + /* 300 */ 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, + /* 310 */ 82, 83, 115, 140, 25, 23, 41, 28, 20, 20, + /* 320 */ 22, 46, 57, 20, 59, 22, 87, 88, 87, 88, + /* 330 */ 20, 158, 22, 19, 45, 60, 61, 62, 63, 64, + /* 340 */ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, + /* 350 */ 75, 76, 77, 78, 79, 80, 81, 82, 83, 89, + /* 360 */ 47, 22, 92, 41, 191, 192, 22, 107, 46, 109, + /* 370 */ 110, 161, 162, 89, 99, 62, 92, 63, 168, 87, + /* 380 */ 88, 113, 60, 61, 62, 63, 64, 65, 66, 67, + /* 390 */ 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, + /* 400 */ 78, 79, 80, 81, 82, 83, 107, 115, 109, 110, + /* 410 */ 41, 91, 99, 93, 140, 46, 89, 104, 144, 92, + /* 420 */ 47, 147, 148, 132, 133, 134, 135, 88, 113, 60, + /* 430 */ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, + /* 440 */ 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, + /* 450 */ 81, 82, 83, 23, 115, 19, 140, 41, 114, 23, + /* 460 */ 155, 156, 46, 20, 22, 22, 161, 20, 20, 22, + /* 470 */ 22, 20, 99, 22, 158, 29, 60, 61, 62, 63, + /* 480 */ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, + /* 490 */ 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, + /* 500 */ 54, 140, 26, 140, 41, 21, 89, 23, 17, 46, + /* 510 */ 194, 140, 36, 20, 20, 22, 22, 87, 88, 127, + /* 520 */ 204, 129, 89, 87, 61, 62, 63, 64, 65, 66, + /* 530 */ 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, + /* 540 */ 77, 78, 79, 80, 81, 82, 83, 140, 57, 103, + /* 550 */ 59, 41, 20, 139, 22, 20, 46, 22, 20, 19, + /* 560 */ 22, 21, 199, 140, 122, 158, 195, 18, 207, 208, + /* 570 */ 209, 87, 62, 63, 64, 65, 66, 67, 68, 69, + /* 580 */ 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, + /* 590 */ 80, 81, 82, 83, 11, 62, 13, 14, 15, 16, + /* 600 */ 19, 194, 174, 118, 23, 140, 111, 140, 23, 181, + /* 610 */ 27, 204, 134, 135, 200, 32, 152, 140, 195, 124, + /* 620 */ 37, 130, 140, 146, 152, 158, 93, 94, 95, 96, + /* 630 */ 97, 98, 140, 52, 51, 158, 53, 104, 140, 140, + /* 640 */ 140, 58, 156, 62, 95, 140, 182, 161, 171, 167, + /* 650 */ 158, 146, 146, 19, 182, 146, 158, 23, 158, 78, + /* 660 */ 79, 80, 22, 158, 199, 198, 167, 86, 87, 88, + /* 670 */ 89, 194, 87, 92, 93, 146, 171, 171, 113, 130, + /* 680 */ 171, 204, 140, 100, 101, 102, 52, 140, 206, 106, + /* 690 */ 41, 146, 192, 201, 111, 46, 62, 140, 93, 194, + /* 700 */ 171, 15, 204, 113, 19, 206, 125, 126, 23, 204, + /* 710 */ 24, 140, 78, 79, 167, 158, 171, 68, 69, 140, + /* 720 */ 86, 87, 88, 89, 146, 39, 92, 93, 42, 158, + /* 730 */ 136, 137, 140, 146, 108, 141, 152, 52, 140, 53, + /* 740 */ 146, 196, 93, 14, 146, 111, 167, 62, 206, 171, + /* 750 */ 158, 19, 140, 206, 20, 198, 158, 212, 171, 125, + /* 760 */ 126, 140, 217, 78, 79, 171, 182, 111, 140, 171, + /* 770 */ 22, 86, 87, 88, 89, 140, 140, 92, 93, 167, + /* 780 */ 124, 20, 140, 196, 200, 206, 158, 140, 167, 22, + /* 790 */ 196, 140, 20, 158, 158, 140, 22, 140, 140, 212, + /* 800 */ 158, 140, 140, 20, 217, 158, 140, 140, 140, 158, + /* 810 */ 125, 126, 140, 158, 140, 158, 158, 140, 206, 158, + /* 820 */ 158, 140, 140, 140, 158, 158, 158, 206, 140, 140, + /* 830 */ 158, 140, 158, 140, 140, 158, 140, 140, 140, 158, + /* 840 */ 158, 158, 140, 140, 118, 140, 158, 158, 140, 158, + /* 850 */ 140, 158, 158, 140, 158, 158, 158, 140, 140, 140, + /* 860 */ 158, 158, 140, 158, 140, 140, 158, 140, 158, 9, + /* 870 */ 10, 158, 22, 115, 19, 158, 158, 158, 20, 113, + /* 880 */ 158, 20, 158, 158, 20, 158, 48, 19, 19, 48, + /* 890 */ 19, 97, 104, 21, 99, 38, 49, 22, 49, 130, + /* 900 */ 99, 19, 11, 14, 9, 103, 63, 63, 123, 19, + /* 910 */ 114, 114, 103, 123, 114, 19, 35, 87, 20, 116, + /* 920 */ 21, 150, 160, 200, 160, 138, 12, 99, 139, 138, + /* 930 */ 138, 138, 22, 111, 164, 176, 44, 122, 139, 171, + /* 940 */ 177, 120, 119, 145, 139, 139, 139, 121, 117, 193, + /* 950 */ 98, 178, 23, 83, 179, 151, 180, 202, 113, 127, + /* 960 */ 19, 99, 116, 186, 186, 151, 186, 159, 187, 159, + /* 970 */ 188, 187, 193, 139, 188, 164, 139, 40, 139, 139, + /* 980 */ 215, 127, 60, 19, 33, 220, 169, 169, 220, 116, + /* 990 */ 220, 220, 220, 220, 220, 220, 176, 220, 186, 220, + /* 1000 */ 220, 220, 186, 220, 169, 176, 220, 142, 220, 220, + /* 1010 */ 186, 186, 220, 186, 220, 220, 197, 169, 220, 186, + /* 1020 */ 157, 220, 186, 220, 220, 220, 220, 140, 140, 216, + /* 1030 */ 220, 157, 220, 220, 157, 157, 152, 186, 220, 197, + /* 1040 */ 173, 175, 162, 140, 140, 152, 152, 140, 140, 140, + /* 1050 */ 220, 154, 140, 140, 154, 176, 154, 140, 140, 176, + /* 1060 */ 140, 140, 220, 140, 140, 140, 220, 152, 163, 220, + /* 1070 */ 154, 218, 140, 140, 163, 219, 140, 218, 172, 203, + /* 1080 */ 154, 220, 163, 140, 140, 140, 185, 140, 140, 140, + /* 1090 */ 140, 220, 140, 140, 140, 210, 210, 140, 140, 140, + /* 1100 */ 140, 140, 140, 140, 170, 140, 140, 140, 140, 140, + /* 1110 */ 140, 220, 166, 220, 220, 220, 220, 220, 220, 220, + /* 1120 */ 220, 220, 166, 220, 220, 170, 220, 220, 220, 220, + /* 1130 */ 200, 220, 220, 220, 220, 220, 220, 220, 220, 220, + /* 1140 */ 213, 220, 214, }; -#define YY_SHIFT_USE_DFLT (-68) +#define YY_SHIFT_USE_DFLT (-84) +#define YY_SHIFT_COUNT (376) +#define YY_SHIFT_MIN (-83) +#define YY_SHIFT_MAX (964) static const short yy_shift_ofst[] = { - /* 0 */ 170, 113, -68, 746, -8, -68, 8, 127, 288, 239, - /* 10 */ 348, 167, -68, -68, -68, -68, -68, -68, 547, -68, - /* 20 */ -68, -68, -68, 115, 613, 115, 723, 115, 761, 44, - /* 30 */ 765, 547, 507, 814, 808, 98, -68, 501, -68, 21, - /* 40 */ -68, 547, 119, -68, 667, -68, 231, 667, -68, 861, - /* 50 */ -68, 541, -68, -68, 825, 289, 667, -68, -68, -68, - /* 60 */ 667, -68, 877, 848, 511, 58, 932, 935, 744, -68, - /* 70 */ 279, 938, -68, 515, -68, 561, 930, 934, 939, 937, - /* 80 */ 940, -68, 63, -68, 975, -68, 979, -68, 616, 63, - /* 90 */ -68, 63, -68, 953, 848, 1050, 848, 976, 289, -68, - /* 100 */ 1053, -68, -68, 485, 848, -68, 964, 547, 965, 547, - /* 110 */ -68, -68, -68, -68, 673, 848, 626, 848, -48, 848, - /* 120 */ -48, 848, -48, 848, -48, 848, -67, 848, -67, 848, - /* 130 */ 51, 848, 51, 848, 51, 848, 51, 848, -67, 794, - /* 140 */ 848, -67, -68, -68, 848, -7, 848, -7, 848, 997, - /* 150 */ 848, 997, 848, 997, 848, -68, -68, 866, -68, 986, - /* 160 */ -68, -68, 848, 532, 848, -67, 61, 744, 284, 563, - /* 170 */ 970, 974, 978, -68, 485, 848, 673, 848, -68, 848, - /* 180 */ -68, 848, -68, 244, 26, 961, 557, 1078, -68, 848, - /* 190 */ 94, 848, 485, 1074, 753, 1075, -68, 1076, 547, 1079, - /* 200 */ -68, 1080, 547, 1081, -68, 1082, 547, 1085, -68, 848, - /* 210 */ 164, 848, 211, 848, 485, 657, -68, 848, -68, -68, - /* 220 */ 993, 547, -68, -68, -68, 848, 579, 848, 673, 230, - /* 230 */ 744, 292, -68, 701, -68, 993, -68, 976, 289, -68, - /* 240 */ 848, 485, 998, 848, 1091, 848, 485, -68, -68, 503, - /* 250 */ -68, -68, -68, 408, -68, 454, -68, 1000, -68, 355, - /* 260 */ 993, 457, -68, -68, 547, -68, -68, 1019, 1003, -68, - /* 270 */ 1101, 547, 702, -68, 547, -68, 289, -68, -68, 848, - /* 280 */ 485, 938, 376, 285, 1106, 457, 1019, 1003, -68, 797, - /* 290 */ -21, -68, -68, 1014, 353, -68, -68, -68, -68, 280, - /* 300 */ -68, 806, -68, 1111, -68, 344, 667, -68, 547, 1115, - /* 310 */ -68, 486, -68, 547, -68, 346, 704, -68, 585, -68, - /* 320 */ -68, -68, -68, 704, -68, 704, -68, 547, 933, -68, - /* 330 */ -68, 1053, -68, 861, -68, -68, 172, -68, -68, -68, - /* 340 */ 720, -68, -68, 721, -68, -68, -68, -68, 598, 63, - /* 350 */ 945, -68, 63, 1117, -68, -68, -68, -68, 106, -26, - /* 360 */ -68, 547, -68, 1092, 1122, 547, 977, 667, -68, 1123, - /* 370 */ 547, 980, 667, -68, 848, 391, -68, 1095, 1125, 547, - /* 380 */ 984, 1048, 547, 1115, -68, 383, 1043, -68, -68, -68, - /* 390 */ -68, -68, 938, 329, 713, 201, 547, -68, 547, 1138, - /* 400 */ 938, 467, 547, 591, 437, 1068, 547, 993, 1130, 193, - /* 410 */ 1161, 848, 438, 1135, 709, -68, -68, 1077, 1083, 676, - /* 420 */ 547, 920, 547, -68, -68, -68, -68, 1131, -68, -68, - /* 430 */ 1049, 547, 1084, 547, 524, 1166, 547, 995, 288, 1178, - /* 440 */ 1058, 1179, 281, 472, 778, 167, -68, 1069, 1070, 1177, - /* 450 */ 1186, 1187, 281, 1183, 1139, 547, 1098, 547, 659, 547, - /* 460 */ 1142, 848, 485, 1198, 1145, 848, 485, 1086, 547, 1191, - /* 470 */ 547, 996, -68, 910, 480, 1193, 848, 1007, 848, 485, - /* 480 */ 1204, 485, 1100, 547, 941, 1207, 656, 547, 1208, 547, - /* 490 */ 1209, 547, 188, 1211, 547, 188, 1214, 519, 1110, 547, - /* 500 */ 993, 941, 1216, 1139, 547, 928, 1132, 547, 659, 1230, - /* 510 */ 1118, 547, 993, 1191, 912, 523, 1225, 848, 1013, 1236, - /* 520 */ 1139, 547, 926, 1134, 547, 792, 1215, 1159, 1243, 703, - /* 530 */ 1245, 501, 708, 120, 1247, 1248, 1249, 1250, 732, 1251, - /* 540 */ 1252, 1254, 732, 1255, -68, 547, 1253, 1256, 1237, 501, - /* 550 */ 1257, 547, 949, 1263, 501, 1266, -68, 1237, 547, 1270, - /* 560 */ -68, -68, -68, + /* 0 */ 860, 583, 634, 634, 93, 92, 92, 822, 634, 581, + /* 10 */ 685, 685, 188, 430, -21, 685, 685, 685, 685, 685, + /* 20 */ 159, 313, 430, 549, 430, 430, 430, 430, 430, 585, + /* 30 */ 275, 60, 685, 685, 685, 685, 685, 685, 685, 685, + /* 40 */ 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, + /* 50 */ 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, + /* 60 */ 685, 685, 685, 685, 685, 685, 685, 685, 685, 685, + /* 70 */ 685, 685, 685, 685, 533, 430, 430, 430, 430, 484, + /* 80 */ 430, 484, 261, 656, 495, 822, 822, -84, -84, 228, + /* 90 */ 164, 95, 26, 322, 322, 322, 322, 322, 322, 322, + /* 100 */ 322, 416, 322, 322, 322, 322, 322, 369, 322, 463, + /* 110 */ 510, 510, 510, -67, -67, -67, -67, -67, -48, -48, + /* 120 */ -48, -48, 101, -5, -5, -5, -5, 686, -25, 649, + /* 130 */ 686, 185, 241, 292, 197, 299, 239, 260, 190, 119, + /* 140 */ 119, 4, 430, 430, 430, 430, 430, 430, 105, 430, + /* 150 */ 430, 430, 105, 430, 430, 430, 430, 430, 105, 430, + /* 160 */ 430, 430, 105, 430, 430, 430, 430, -79, 289, 430, + /* 170 */ 105, 430, 430, 105, 430, 430, 42, 42, 436, 446, + /* 180 */ 446, 446, 430, 430, 339, 105, 430, 339, 430, 430, + /* 190 */ 430, 430, 430, 430, 42, 42, 42, 430, 430, 585, + /* 200 */ 585, 327, 327, 585, 442, 442, 373, 476, 476, 392, + /* 210 */ 476, 344, -44, 476, 540, 951, 873, 951, 845, 922, + /* 220 */ 964, 845, 845, 922, 815, 845, 845, 845, 815, 964, + /* 230 */ 922, 922, 828, 845, 854, 937, 845, 941, 828, 828, + /* 240 */ 892, 929, 941, 828, 846, 862, 846, 862, 845, 852, + /* 250 */ 845, 845, 832, 870, 870, 870, 929, 852, 826, 831, + /* 260 */ 821, 823, 815, 822, 828, 828, 892, 828, 828, 910, + /* 270 */ 914, 914, 914, 828, 914, -84, -84, -84, -84, -84, + /* 280 */ -84, -84, 40, 491, 244, 265, -83, 314, 538, 535, + /* 290 */ 532, 494, -18, 493, 451, 448, 447, 284, 270, 443, + /* 300 */ 320, 310, 303, 298, 259, 89, 168, 17, 94, 22, + /* 310 */ 899, 898, 830, 881, 803, 800, 896, 790, 809, 797, + /* 320 */ 796, 890, 785, 844, 843, 802, 895, 889, 891, 882, + /* 330 */ 801, 769, 849, 875, 847, 857, 795, 872, 788, 794, + /* 340 */ 871, 841, 869, 868, 838, 864, 861, 766, 858, 855, + /* 350 */ 758, 850, 726, 783, 774, 772, 767, 761, 748, 734, + /* 360 */ 732, 729, 626, 605, 590, 565, 640, 485, 433, 417, + /* 370 */ 315, 268, 232, 171, 187, 79, -8, }; -#define YY_REDUCE_USE_DFLT (-123) +#define YY_REDUCE_USE_DFLT (-69) +#define YY_REDUCE_COUNT (281) +#define YY_REDUCE_MIN (-68) +#define YY_REDUCE_MAX (970) static const short yy_reduce_ofst[] = { - /* 0 */ -111, 55, -123, 643, -123, -123, -123, -100, 82, -123, - /* 10 */ -123, 233, -123, -123, -123, -123, -123, -123, 310, -123, - /* 20 */ -123, -123, -123, 442, -123, 448, -123, 542, -123, 540, - /* 30 */ -123, 122, 573, -123, -123, 162, -123, 339, 711, 158, - /* 40 */ -123, 714, 147, -123, 719, -123, -123, 743, -123, 873, - /* 50 */ -123, -123, -123, -123, -123, 885, 904, -123, -123, -123, - /* 60 */ 905, -123, -123, 525, -123, 171, -123, -123, 226, -123, - /* 70 */ 874, 879, -123, 878, -96, 881, 882, 883, 884, 887, - /* 80 */ 875, -123, 913, -123, -123, -123, -123, -123, -123, 915, - /* 90 */ -123, 916, -123, -123, 237, -123, -121, 889, 918, -123, - /* 100 */ 922, -123, -123, 890, 570, -123, -123, 944, -123, 946, - /* 110 */ -123, -123, -123, -123, 890, 576, 890, 671, 890, 751, - /* 120 */ 890, 754, 890, 755, 890, 757, 890, 758, 890, 759, - /* 130 */ 890, 762, 890, 781, 890, 785, 890, 789, 890, 891, - /* 140 */ 790, 890, -123, -123, 791, 890, 793, 890, 798, 890, - /* 150 */ 804, 890, 812, 890, 817, 890, -123, -123, -123, -123, - /* 160 */ -123, -123, 820, 890, 821, 890, 947, 647, 874, -123, - /* 170 */ -123, -123, -123, -123, 890, 823, 890, 824, 890, 826, - /* 180 */ 890, 828, 890, 335, 890, 892, 893, -123, -123, 831, - /* 190 */ 890, 832, 890, -123, -123, -123, -123, -123, 957, -123, - /* 200 */ -123, -123, 960, -123, -123, -123, 963, -123, -123, 836, - /* 210 */ 890, 837, 890, 840, 890, -123, -123, -122, -123, -123, - /* 220 */ 921, 968, -123, -123, -123, 843, 890, 845, 890, 969, - /* 230 */ 710, 874, -123, -123, -123, 924, -123, 919, 954, -123, - /* 240 */ 847, 890, -123, 240, -123, 851, 890, -123, 184, 929, - /* 250 */ -123, -123, -123, 981, -123, 982, -123, -123, -123, 983, - /* 260 */ 931, 620, -123, -123, 985, -123, -123, 942, 936, -123, - /* 270 */ -123, 636, -123, -123, 748, -123, 971, -123, -123, 852, - /* 280 */ 890, 351, 874, 929, -123, 633, 943, 948, -123, 853, - /* 290 */ 116, -123, -123, -123, 944, -123, -123, -123, -123, 890, - /* 300 */ -123, -123, -123, -123, -123, 890, 994, -123, 992, 987, - /* 310 */ 988, 973, -123, 999, -123, -123, 989, -123, -123, -123, - /* 320 */ -123, -123, -123, 990, -123, 991, -123, 658, -123, -123, - /* 330 */ -123, 1004, -123, 1001, -123, -123, -123, -123, -123, -123, - /* 340 */ -123, -123, -123, -123, -123, -123, -123, -123, 1005, 1002, - /* 350 */ -123, -123, 1006, -123, -123, -123, -123, -123, 972, 1008, - /* 360 */ -123, 1009, -123, -123, -123, 660, -123, 1011, -123, -123, - /* 370 */ 705, -123, 1012, -123, 856, 530, -123, -123, -123, 739, - /* 380 */ -123, -123, 1018, 1010, 1015, 502, -123, -123, -123, -123, - /* 390 */ -123, -123, 747, 874, 577, -123, 1021, -123, 1022, -123, - /* 400 */ 842, 874, 1023, 951, 952, -123, 1028, 1016, 956, 962, - /* 410 */ -123, 867, 890, -123, -123, -123, -123, -123, -123, -123, - /* 420 */ 295, -123, 1037, -123, -123, -123, -123, -123, -123, -123, - /* 430 */ -123, 1041, -123, 1044, 1017, -123, 740, -123, 1047, -123, - /* 440 */ -123, -123, 648, 874, 1020, 1024, -123, -123, -123, -123, - /* 450 */ -123, -123, 707, -123, 1029, 1060, -123, 829, 1030, 1064, - /* 460 */ -123, 868, 890, -123, -123, 872, 890, -123, 1071, 1025, - /* 470 */ 432, -123, -123, 876, 874, -123, 571, -123, 880, 890, - /* 480 */ -123, 890, -123, 1087, 1039, -123, -123, 1088, -123, 1089, - /* 490 */ -123, 1090, 1033, -123, 1093, 1035, -123, 874, -123, 1094, - /* 500 */ 1040, 1055, -123, 1063, 1096, 1051, -123, 888, 1062, -123, - /* 510 */ -123, 1102, 1054, 1046, 886, 874, -123, 734, -123, -123, - /* 520 */ 1097, 1107, 1065, -123, 1109, -123, -123, -123, -123, 1113, - /* 530 */ -123, 1103, -123, 47, -123, -123, -123, -123, 1052, -123, - /* 540 */ -123, -123, 1057, -123, -123, 1128, -123, -123, 1056, 1119, - /* 550 */ -123, 1129, 1061, -123, 1124, -123, -123, 1059, 1141, -123, - /* 560 */ -123, -123, -123, + /* 0 */ 291, 594, 505, 477, -23, 587, 545, 33, 598, 407, + /* 10 */ 316, 173, 361, 274, 584, 557, 467, 498, 492, 500, + /* 20 */ 305, 210, 621, -61, 612, 579, 547, 499, 482, -68, + /* 30 */ 414, 727, 725, 724, 722, 719, 718, 717, 713, 710, + /* 40 */ 708, 705, 703, 702, 698, 697, 696, 694, 693, 691, + /* 50 */ 689, 688, 683, 682, 681, 677, 674, 672, 668, 667, + /* 60 */ 666, 662, 661, 658, 657, 655, 651, 647, 642, 636, + /* 70 */ 635, 628, 592, 571, 486, 423, 465, 371, 363, 472, + /* 80 */ 542, 464, 478, 578, 529, 509, 506, -49, 428, 723, + /* 90 */ 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, + /* 100 */ 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, + /* 110 */ 723, 723, 723, 723, 723, 723, 723, 723, 723, 723, + /* 120 */ 723, 723, 956, 723, 723, 723, 723, 955, 946, 930, + /* 130 */ 934, 903, 970, 969, 968, 906, 967, 906, 966, 723, + /* 140 */ 723, 906, 965, 963, 962, 961, 960, 959, 906, 958, + /* 150 */ 957, 954, 906, 953, 952, 950, 949, 948, 906, 947, + /* 160 */ 945, 944, 906, 943, 936, 933, 932, 928, 927, 925, + /* 170 */ 906, 924, 923, 906, 921, 920, 926, 916, 915, 919, + /* 180 */ 911, 905, 918, 917, 901, 906, 913, 901, 912, 909, + /* 190 */ 908, 907, 904, 903, 902, 900, 897, 888, 887, 894, + /* 200 */ 893, 886, 885, 884, 883, 879, 880, 878, 877, 876, + /* 210 */ 874, 866, 867, 863, 865, 859, 856, 853, 851, 848, + /* 220 */ 842, 836, 833, 835, 829, 827, 825, 824, 820, 819, + /* 230 */ 818, 817, 840, 816, 813, 765, 812, 810, 839, 837, + /* 240 */ 811, 814, 808, 834, 786, 784, 782, 781, 780, 779, + /* 250 */ 778, 777, 755, 723, 723, 723, 804, 756, 776, 775, + /* 260 */ 773, 763, 759, 768, 807, 806, 770, 805, 799, 798, + /* 270 */ 793, 792, 791, 789, 787, 764, 762, 723, 723, 723, + /* 280 */ 723, 771, }; static const YYACTIONTYPE yy_default[] = { - /* 0 */ 570, 570, 564, 856, 856, 566, 856, 572, 856, 856, - /* 10 */ 856, 856, 652, 655, 656, 657, 658, 659, 573, 574, - /* 20 */ 591, 592, 593, 856, 856, 856, 856, 856, 856, 856, - /* 30 */ 856, 856, 856, 856, 856, 856, 584, 594, 604, 586, - /* 40 */ 603, 856, 856, 605, 651, 616, 856, 651, 617, 636, - /* 50 */ 634, 856, 637, 638, 856, 708, 651, 618, 706, 707, - /* 60 */ 651, 619, 856, 856, 737, 797, 743, 738, 856, 664, - /* 70 */ 856, 856, 665, 673, 675, 682, 720, 711, 713, 701, - /* 80 */ 715, 670, 856, 600, 856, 601, 856, 602, 716, 856, - /* 90 */ 717, 856, 718, 856, 856, 702, 856, 709, 708, 703, - /* 100 */ 856, 588, 710, 705, 856, 736, 856, 856, 739, 856, - /* 110 */ 740, 741, 742, 744, 747, 856, 748, 856, 749, 856, - /* 120 */ 750, 856, 751, 856, 752, 856, 753, 856, 754, 856, - /* 130 */ 755, 856, 756, 856, 757, 856, 758, 856, 759, 856, - /* 140 */ 856, 760, 761, 762, 856, 763, 856, 764, 856, 765, - /* 150 */ 856, 766, 856, 767, 856, 768, 769, 856, 770, 856, - /* 160 */ 773, 771, 856, 856, 856, 779, 856, 797, 856, 856, - /* 170 */ 856, 856, 856, 782, 796, 856, 774, 856, 775, 856, - /* 180 */ 776, 856, 777, 856, 856, 856, 856, 856, 787, 856, - /* 190 */ 856, 856, 788, 856, 856, 856, 845, 856, 856, 856, - /* 200 */ 846, 856, 856, 856, 847, 856, 856, 856, 848, 856, - /* 210 */ 856, 856, 856, 856, 789, 856, 781, 797, 794, 795, - /* 220 */ 690, 856, 691, 785, 772, 856, 856, 856, 780, 856, - /* 230 */ 797, 856, 784, 856, 783, 690, 786, 709, 708, 704, - /* 240 */ 856, 714, 856, 797, 712, 856, 721, 674, 685, 683, - /* 250 */ 684, 692, 693, 856, 694, 856, 695, 856, 696, 856, - /* 260 */ 690, 681, 589, 590, 856, 679, 680, 698, 700, 686, - /* 270 */ 856, 856, 856, 699, 856, 803, 708, 805, 804, 856, - /* 280 */ 697, 685, 856, 856, 856, 681, 698, 700, 687, 856, - /* 290 */ 681, 676, 677, 856, 856, 678, 671, 672, 778, 856, - /* 300 */ 735, 856, 745, 856, 746, 856, 651, 620, 856, 801, - /* 310 */ 624, 621, 625, 856, 626, 856, 856, 627, 856, 630, - /* 320 */ 631, 632, 633, 856, 628, 856, 629, 856, 856, 802, - /* 330 */ 622, 856, 623, 636, 635, 606, 856, 607, 608, 609, - /* 340 */ 856, 610, 613, 856, 611, 614, 612, 615, 595, 856, - /* 350 */ 856, 596, 856, 856, 597, 599, 598, 587, 856, 856, - /* 360 */ 641, 856, 644, 856, 856, 856, 856, 651, 645, 856, - /* 370 */ 856, 856, 651, 646, 856, 651, 647, 856, 856, 856, - /* 380 */ 856, 856, 856, 801, 624, 649, 856, 648, 650, 642, - /* 390 */ 643, 585, 856, 856, 581, 856, 856, 579, 856, 856, - /* 400 */ 856, 856, 856, 828, 856, 856, 856, 690, 833, 856, - /* 410 */ 856, 856, 856, 856, 856, 834, 835, 856, 856, 856, - /* 420 */ 856, 856, 856, 733, 734, 825, 826, 856, 827, 580, - /* 430 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 440 */ 856, 856, 856, 856, 856, 856, 654, 856, 856, 856, - /* 450 */ 856, 856, 856, 856, 653, 856, 856, 856, 856, 856, - /* 460 */ 856, 856, 723, 856, 856, 856, 724, 856, 856, 731, - /* 470 */ 856, 856, 732, 856, 856, 856, 856, 856, 856, 729, - /* 480 */ 856, 730, 856, 856, 856, 856, 856, 856, 856, 856, - /* 490 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 500 */ 690, 856, 856, 653, 856, 856, 856, 856, 856, 856, - /* 510 */ 856, 856, 690, 731, 856, 856, 856, 856, 856, 856, - /* 520 */ 653, 856, 856, 856, 856, 856, 856, 856, 856, 856, - /* 530 */ 856, 856, 856, 822, 856, 856, 856, 856, 856, 856, - /* 540 */ 856, 856, 856, 856, 821, 856, 856, 856, 854, 856, - /* 550 */ 856, 856, 856, 856, 856, 856, 853, 854, 856, 856, - /* 560 */ 567, 569, 565, + /* 0 */ 570, 856, 797, 797, 856, 839, 839, 685, 856, 797, + /* 10 */ 797, 856, 822, 856, 681, 856, 856, 797, 793, 856, + /* 20 */ 586, 649, 856, 581, 856, 856, 856, 856, 856, 594, + /* 30 */ 651, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 40 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 50 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 60 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 70 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 681, + /* 80 */ 856, 681, 570, 856, 856, 856, 856, 685, 675, 856, + /* 90 */ 856, 856, 856, 730, 729, 724, 723, 837, 697, 721, + /* 100 */ 714, 856, 789, 790, 788, 792, 796, 856, 705, 748, + /* 110 */ 780, 774, 747, 779, 760, 759, 754, 753, 752, 751, + /* 120 */ 750, 749, 640, 758, 757, 756, 755, 856, 856, 856, + /* 130 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 764, + /* 140 */ 763, 856, 856, 856, 856, 809, 856, 856, 726, 856, + /* 150 */ 856, 856, 663, 856, 856, 856, 856, 856, 842, 856, + /* 160 */ 856, 856, 844, 856, 856, 856, 856, 856, 828, 856, + /* 170 */ 661, 856, 856, 583, 856, 856, 856, 856, 595, 856, + /* 180 */ 856, 856, 856, 856, 689, 688, 856, 683, 856, 856, + /* 190 */ 856, 856, 856, 856, 856, 856, 856, 856, 573, 856, + /* 200 */ 856, 856, 856, 856, 720, 720, 621, 708, 708, 791, + /* 210 */ 708, 682, 673, 708, 856, 854, 852, 854, 690, 653, + /* 220 */ 731, 690, 690, 653, 720, 690, 690, 690, 720, 731, + /* 230 */ 653, 653, 651, 690, 836, 833, 690, 801, 651, 651, + /* 240 */ 636, 856, 801, 651, 700, 698, 700, 698, 690, 709, + /* 250 */ 690, 690, 856, 767, 766, 765, 856, 709, 715, 701, + /* 260 */ 713, 711, 720, 856, 651, 651, 636, 651, 651, 639, + /* 270 */ 572, 572, 572, 651, 572, 624, 624, 777, 776, 775, + /* 280 */ 768, 604, 856, 856, 856, 856, 856, 816, 856, 856, + /* 290 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 300 */ 856, 856, 856, 856, 856, 856, 716, 737, 856, 856, + /* 310 */ 856, 856, 856, 856, 808, 856, 856, 856, 856, 856, + /* 320 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 330 */ 856, 856, 856, 832, 831, 856, 856, 856, 856, 856, + /* 340 */ 856, 856, 856, 856, 856, 856, 856, 856, 856, 856, + /* 350 */ 856, 712, 856, 856, 856, 856, 856, 856, 856, 856, + /* 360 */ 856, 856, 666, 856, 739, 856, 702, 856, 856, 856, + /* 370 */ 738, 743, 856, 856, 856, 856, 856, 565, 569, 567, + /* 380 */ 855, 853, 851, 850, 815, 821, 818, 820, 819, 817, + /* 390 */ 814, 813, 812, 811, 810, 807, 725, 722, 719, 849, + /* 400 */ 806, 662, 660, 843, 841, 732, 840, 838, 823, 728, + /* 410 */ 727, 654, 799, 798, 580, 827, 826, 825, 734, 733, + /* 420 */ 830, 829, 835, 834, 824, 579, 585, 643, 642, 650, + /* 430 */ 648, 647, 646, 645, 644, 641, 587, 598, 599, 597, + /* 440 */ 596, 615, 612, 614, 611, 613, 610, 609, 608, 607, + /* 450 */ 606, 635, 623, 622, 802, 629, 628, 633, 632, 631, + /* 460 */ 630, 627, 626, 625, 620, 746, 745, 735, 778, 672, + /* 470 */ 671, 678, 677, 676, 687, 804, 805, 803, 699, 686, + /* 480 */ 680, 679, 590, 589, 696, 695, 694, 693, 692, 684, + /* 490 */ 674, 704, 786, 783, 784, 772, 785, 691, 795, 794, + /* 500 */ 781, 848, 847, 846, 845, 787, 782, 669, 668, 667, + /* 510 */ 771, 773, 770, 769, 762, 761, 744, 742, 741, 740, + /* 520 */ 736, 710, 588, 703, 718, 717, 602, 601, 600, 670, + /* 530 */ 665, 664, 619, 707, 706, 618, 638, 637, 634, 617, + /* 540 */ 616, 605, 603, 584, 582, 578, 577, 576, 575, 593, + /* 550 */ 592, 591, 574, 659, 658, 657, 656, 655, 652, 571, + /* 560 */ 568, 566, 564, }; -#define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0])) /* The next table maps tokens into fallback tokens. If a construct ** like the following: ** ** %fallback ID X Y Z. ** -** appears in the grammer, then ID becomes a fallback token for X, Y, +** appears in the grammar, then ID becomes a fallback token for X, Y, ** and Z. Whenever one of the tokens X, Y, or Z is input to the parser ** but it does not parse, the type of the token is changed to ID and ** the parse is retried before an error is thrown. @@ -674,77 +622,6 @@ static const YYCODETYPE yyFallback[] = { 23, /* TRIGGER => ID */ 23, /* VACUUM => ID */ 23, /* VIEW => ID */ - 0, /* OR => nothing */ - 0, /* AND => nothing */ - 0, /* NOT => nothing */ - 0, /* EQ => nothing */ - 0, /* NE => nothing */ - 0, /* ISNULL => nothing */ - 0, /* NOTNULL => nothing */ - 0, /* IS => nothing */ - 0, /* BETWEEN => nothing */ - 0, /* IN => nothing */ - 0, /* GT => nothing */ - 0, /* GE => nothing */ - 0, /* LT => nothing */ - 0, /* LE => nothing */ - 0, /* BITAND => nothing */ - 0, /* BITOR => nothing */ - 0, /* LSHIFT => nothing */ - 0, /* RSHIFT => nothing */ - 0, /* PLUS => nothing */ - 0, /* MINUS => nothing */ - 0, /* STAR => nothing */ - 0, /* SLASH => nothing */ - 0, /* REM => nothing */ - 0, /* CONCAT => nothing */ - 0, /* UMINUS => nothing */ - 0, /* UPLUS => nothing */ - 0, /* BITNOT => nothing */ - 0, /* STRING => nothing */ - 0, /* JOIN_KW => nothing */ - 0, /* INTEGER => nothing */ - 0, /* CONSTRAINT => nothing */ - 0, /* DEFAULT => nothing */ - 0, /* FLOAT => nothing */ - 0, /* NULL => nothing */ - 0, /* PRIMARY => nothing */ - 0, /* UNIQUE => nothing */ - 0, /* CHECK => nothing */ - 0, /* REFERENCES => nothing */ - 0, /* COLLATE => nothing */ - 0, /* ON => nothing */ - 0, /* DELETE => nothing */ - 0, /* UPDATE => nothing */ - 0, /* INSERT => nothing */ - 0, /* SET => nothing */ - 0, /* DEFERRABLE => nothing */ - 0, /* FOREIGN => nothing */ - 0, /* DROP => nothing */ - 0, /* UNION => nothing */ - 0, /* ALL => nothing */ - 0, /* INTERSECT => nothing */ - 0, /* EXCEPT => nothing */ - 0, /* SELECT => nothing */ - 0, /* DISTINCT => nothing */ - 0, /* DOT => nothing */ - 0, /* FROM => nothing */ - 0, /* JOIN => nothing */ - 0, /* USING => nothing */ - 0, /* ORDER => nothing */ - 0, /* BY => nothing */ - 0, /* GROUP => nothing */ - 0, /* HAVING => nothing */ - 0, /* LIMIT => nothing */ - 0, /* WHERE => nothing */ - 0, /* INTO => nothing */ - 0, /* VALUES => nothing */ - 0, /* VARIABLE => nothing */ - 0, /* CASE => nothing */ - 0, /* WHEN => nothing */ - 0, /* THEN => nothing */ - 0, /* ELSE => nothing */ - 0, /* INDEX => nothing */ }; #endif /* YYFALLBACK */ @@ -761,11 +638,11 @@ static const YYCODETYPE yyFallback[] = { ** It is sometimes called the "minor" token. */ struct yyStackEntry { - int stateno; /* The state-number */ - int major; /* The major token value. This is the code - ** number for the token at this stack level */ - YYMINORTYPE minor; /* The user-supplied minor token value. This - ** is the value of the token */ + YYACTIONTYPE stateno; /* The state-number */ + YYCODETYPE major; /* The major token value. This is the code + ** number for the token at this stack level */ + YYMINORTYPE minor; /* The user-supplied minor token value. This + ** is the value of the token */ }; typedef struct yyStackEntry yyStackEntry; @@ -773,9 +650,17 @@ typedef struct yyStackEntry yyStackEntry; ** the following structure */ struct yyParser { int yyidx; /* Index of top element in stack */ +#ifdef YYTRACKMAXSTACKDEPTH + int yyidxMax; /* Maximum value of yyidx */ +#endif int yyerrcnt; /* Shifts left before out of the error */ sqliteParserARG_SDECL /* A place to hold %extra_argument */ +#if YYSTACKDEPTH<=0 + int yystksz; /* Current side of the stack */ + yyStackEntry *yystack; /* The parser's stack */ +#else yyStackEntry yystack[YYSTACKDEPTH]; /* The parser's stack */ +#endif }; typedef struct yyParser yyParser; @@ -1173,21 +1058,29 @@ static const char *const yyRuleName[] = { }; #endif /* NDEBUG */ + +#if YYSTACKDEPTH<=0 /* -** This function returns the symbolic name associated with a token -** value. +** Try to increase the size of the parser stack. */ -const char *sqliteParserTokenName(int tokenType){ +static void yyGrowStack(yyParser *p){ + int newSize; + yyStackEntry *pNew; + + newSize = p->yystksz*2 + 100; + pNew = realloc(p->yystack, newSize*sizeof(pNew[0])); + if( pNew ){ + p->yystack = pNew; + p->yystksz = newSize; #ifndef NDEBUG - if( tokenType>0 && tokenType<(sizeof(yyTokenName)/sizeof(yyTokenName[0])) ){ - return yyTokenName[tokenType]; - }else{ - return "Unknown"; - } -#else - return ""; + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack grows to %d entries!\n", + yyTracePrompt, p->yystksz); + } #endif + } } +#endif /* ** This function allocates a new parser. @@ -1206,6 +1099,14 @@ void *sqliteParserAlloc(void *(*mallocProc)(size_t)){ pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) ); if( pParser ){ pParser->yyidx = -1; +#ifdef YYTRACKMAXSTACKDEPTH + pParser->yyidxMax = 0; +#endif +#if YYSTACKDEPTH<=0 + pParser->yystack = NULL; + pParser->yystksz = 0; + yyGrowStack(pParser); +#endif } return pParser; } @@ -1215,7 +1116,12 @@ void *sqliteParserAlloc(void *(*mallocProc)(size_t)){ ** "yymajor" is the symbol code, and "yypminor" is a pointer to ** the value. */ -static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ +static void yy_destructor( + yyParser *yypParser, /* The parser */ + YYCODETYPE yymajor, /* Type code for object to destroy */ + YYMINORTYPE *yypminor /* The object to be destroyed */ +){ + sqliteParserARG_FETCH; switch( yymajor ){ /* Here is inserted the actions which take place when a ** terminal or non-terminal is destroyed. This can happen @@ -1227,62 +1133,76 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ ** which appear on the RHS of the rule, but which are not used ** inside the C code. */ - case 146: - case 171: - case 189: -#line 286 "ext/sqlite/libsqlite/src/parse.y" -{sqliteSelectDelete((yypminor->yy179));} -#line 1237 "ext/sqlite/libsqlite/src/parse.c" + case 146: /* select */ + case 171: /* oneselect */ + case 189: /* seltablist_paren */ +{ +#line 286 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteSelectDelete((yypminor->yy179)); +#line 1143 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; - case 158: - case 176: - case 178: - case 187: - case 192: - case 204: -#line 533 "ext/sqlite/libsqlite/src/parse.y" -{sqliteExprDelete((yypminor->yy242));} -#line 1247 "ext/sqlite/libsqlite/src/parse.c" + case 158: /* expr */ + case 176: /* where_opt */ + case 178: /* having_opt */ + case 187: /* on_opt */ + case 192: /* sortitem */ + case 204: /* expritem */ +{ +#line 533 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteExprDelete((yypminor->yy242)); +#line 1155 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; - case 159: - case 167: - case 188: - case 197: - case 199: -#line 746 "ext/sqlite/libsqlite/src/parse.y" -{sqliteIdListDelete((yypminor->yy320));} -#line 1256 "ext/sqlite/libsqlite/src/parse.c" + case 159: /* idxlist_opt */ + case 167: /* idxlist */ + case 188: /* using_opt */ + case 197: /* inscollist_opt */ + case 199: /* inscollist */ +{ +#line 746 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteIdListDelete((yypminor->yy320)); +#line 1166 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; - case 174: - case 177: - case 179: - case 181: - case 191: - case 194: - case 195: - case 198: - case 202: -#line 322 "ext/sqlite/libsqlite/src/parse.y" -{sqliteExprListDelete((yypminor->yy322));} -#line 1269 "ext/sqlite/libsqlite/src/parse.c" + case 174: /* selcollist */ + case 177: /* groupby_opt */ + case 179: /* orderby_opt */ + case 181: /* sclp */ + case 191: /* sortlist */ + case 194: /* exprlist */ + case 195: /* setlist */ + case 198: /* itemlist */ + case 202: /* case_exprlist */ +{ +#line 322 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteExprListDelete((yypminor->yy322)); +#line 1181 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; - case 175: - case 183: - case 184: -#line 353 "ext/sqlite/libsqlite/src/parse.y" -{sqliteSrcListDelete((yypminor->yy307));} -#line 1276 "ext/sqlite/libsqlite/src/parse.c" + case 175: /* from */ + case 183: /* seltablist */ + case 184: /* stl_prefix */ +{ +#line 353 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteSrcListDelete((yypminor->yy307)); +#line 1190 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; - case 212: - case 217: -#line 828 "ext/sqlite/libsqlite/src/parse.y" -{sqliteDeleteTriggerStep((yypminor->yy19));} -#line 1282 "ext/sqlite/libsqlite/src/parse.c" + case 212: /* trigger_cmd_list */ + case 217: /* trigger_cmd */ +{ +#line 828 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteDeleteTriggerStep((yypminor->yy19)); +#line 1198 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; - case 214: -#line 812 "ext/sqlite/libsqlite/src/parse.y" -{sqliteIdListDelete((yypminor->yy290).b);} -#line 1287 "ext/sqlite/libsqlite/src/parse.c" + case 214: /* trigger_event */ +{ +#line 812 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +sqliteIdListDelete((yypminor->yy290).b); +#line 1205 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" +} break; default: break; /* If no destructor action specified: do nothing */ } @@ -1309,7 +1229,7 @@ static int yy_pop_parser_stack(yyParser *pParser){ } #endif yymajor = yytos->major; - yy_destructor( yymajor, &yytos->minor); + yy_destructor(pParser, yymajor, &yytos->minor); pParser->yyidx--; return yymajor; } @@ -1333,10 +1253,23 @@ void sqliteParserFree( yyParser *pParser = (yyParser*)p; if( pParser==0 ) return; while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser); +#if YYSTACKDEPTH<=0 + free(pParser->yystack); +#endif (*freeProc)((void*)pParser); } /* +** Return the peak depth of the stack for a parser. +*/ +#ifdef YYTRACKMAXSTACKDEPTH +int sqliteParserStackPeak(void *p){ + yyParser *pParser = (yyParser*)p; + return pParser->yyidxMax; +} +#endif + +/* ** Find the appropriate action for a parser given the terminal ** look-ahead token iLookAhead. ** @@ -1346,34 +1279,55 @@ void sqliteParserFree( */ static int yy_find_shift_action( yyParser *pParser, /* The parser */ - int iLookAhead /* The look-ahead token */ + YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; int stateno = pParser->yystack[pParser->yyidx].stateno; - /* if( pParser->yyidx<0 ) return YY_NO_ACTION; */ - i = yy_shift_ofst[stateno]; - if( i==YY_SHIFT_USE_DFLT ){ + if( stateno>YY_SHIFT_COUNT + || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){ return yy_default[stateno]; } - if( iLookAhead==YYNOCODE ){ - return YY_NO_ACTION; - } + assert( iLookAhead!=YYNOCODE ); i += iLookAhead; - if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){ + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ + if( iLookAhead>0 ){ #ifdef YYFALLBACK - int iFallback; /* Fallback token */ - if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) - && (iFallback = yyFallback[iLookAhead])!=0 ){ + YYCODETYPE iFallback; /* Fallback token */ + if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0]) + && (iFallback = yyFallback[iLookAhead])!=0 ){ #ifndef NDEBUG - if( yyTraceFILE ){ - fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n", - yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + if( yyTraceFILE ){ + fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n", + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]); + } +#endif + return yy_find_shift_action(pParser, iFallback); } #endif - return yy_find_shift_action(pParser, iFallback); - } +#ifdef YYWILDCARD + { + int j = i - iLookAhead + YYWILDCARD; + if( +#if YY_SHIFT_MIN+YYWILDCARD<0 + j>=0 && #endif +#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT + j<YY_ACTTAB_COUNT && +#endif + yy_lookahead[j]==YYWILDCARD + ){ +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n", + yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]); + } +#endif /* NDEBUG */ + return yy_action[j]; + } + } +#endif /* YYWILDCARD */ + } return yy_default[stateno]; }else{ return yy_action[i]; @@ -1390,24 +1344,46 @@ static int yy_find_shift_action( */ static int yy_find_reduce_action( int stateno, /* Current state number */ - int iLookAhead /* The look-ahead token */ + YYCODETYPE iLookAhead /* The look-ahead token */ ){ int i; - /* int stateno = pParser->yystack[pParser->yyidx].stateno; */ - - i = yy_reduce_ofst[stateno]; - if( i==YY_REDUCE_USE_DFLT ){ +#ifdef YYERRORSYMBOL + if( stateno>YY_REDUCE_COUNT ){ return yy_default[stateno]; } - if( iLookAhead==YYNOCODE ){ - return YY_NO_ACTION; - } +#else + assert( stateno<=YY_REDUCE_COUNT ); +#endif + i = yy_reduce_ofst[stateno]; + assert( i!=YY_REDUCE_USE_DFLT ); + assert( iLookAhead!=YYNOCODE ); i += iLookAhead; - if( i<0 || i>=YY_SZ_ACTTAB || yy_lookahead[i]!=iLookAhead ){ +#ifdef YYERRORSYMBOL + if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){ return yy_default[stateno]; - }else{ - return yy_action[i]; } +#else + assert( i>=0 && i<YY_ACTTAB_COUNT ); + assert( yy_lookahead[i]==iLookAhead ); +#endif + return yy_action[i]; +} + +/* +** The following routine is called if the stack overflows. +*/ +static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){ + sqliteParserARG_FETCH; + yypParser->yyidx--; +#ifndef NDEBUG + if( yyTraceFILE ){ + fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); + } +#endif + while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); + /* Here code is inserted which will execute if the parser + ** stack every overflows */ + sqliteParserARG_STORE; /* Suppress warning about unused %extra_argument var */ } /* @@ -1417,27 +1393,32 @@ static void yy_shift( yyParser *yypParser, /* The parser to be shifted */ int yyNewState, /* The new state to shift in */ int yyMajor, /* The major token to shift in */ - YYMINORTYPE *yypMinor /* Pointer ot the minor token to shift in */ + YYMINORTYPE *yypMinor /* Pointer to the minor token to shift in */ ){ yyStackEntry *yytos; yypParser->yyidx++; - if( yypParser->yyidx>=YYSTACKDEPTH ){ - sqliteParserARG_FETCH; - yypParser->yyidx--; -#ifndef NDEBUG - if( yyTraceFILE ){ - fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt); - } +#ifdef YYTRACKMAXSTACKDEPTH + if( yypParser->yyidx>yypParser->yyidxMax ){ + yypParser->yyidxMax = yypParser->yyidx; + } #endif - while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser); - /* Here code is inserted which will execute if the parser - ** stack every overflows */ - sqliteParserARG_STORE; /* Suppress warning about unused %extra_argument var */ - return; +#if YYSTACKDEPTH>0 + if( yypParser->yyidx>=YYSTACKDEPTH ){ + yyStackOverflow(yypParser, yypMinor); + return; + } +#else + if( yypParser->yyidx>=yypParser->yystksz ){ + yyGrowStack(yypParser); + if( yypParser->yyidx>=yypParser->yystksz ){ + yyStackOverflow(yypParser, yypMinor); + return; + } } +#endif yytos = &yypParser->yystack[yypParser->yyidx]; - yytos->stateno = yyNewState; - yytos->major = yyMajor; + yytos->stateno = (YYACTIONTYPE)yyNewState; + yytos->major = (YYCODETYPE)yyMajor; yytos->minor = *yypMinor; #ifndef NDEBUG if( yyTraceFILE && yypParser->yyidx>0 ){ @@ -1772,13 +1753,12 @@ static void yy_reduce( yymsp = &yypParser->yystack[yypParser->yyidx]; #ifndef NDEBUG if( yyTraceFILE && yyruleno>=0 - && yyruleno<sizeof(yyRuleName)/sizeof(yyRuleName[0]) ){ + && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){ fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt, yyRuleName[yyruleno]); } #endif /* NDEBUG */ -#ifndef NDEBUG /* Silence complaints from purify about yygotominor being uninitialized ** in some cases when it is copied into the stack after the following ** switch. yygotominor is uninitialized when a rule reduces that does @@ -1786,9 +1766,16 @@ static void yy_reduce( ** value of the nonterminal uninitialized is utterly harmless as long ** as the value is never used. So really the only thing this code ** accomplishes is to quieten purify. + ** + ** 2007-01-16: The wireshark project (www.wireshark.org) reports that + ** without this code, their parser segfaults. I'm not sure what there + ** parser is doing to make this happen. This is the second bug report + ** from wireshark this week. Clearly they are stressing Lemon in ways + ** that it has not been previously stressed... (SQLite ticket #2172) */ - memset(&yygotominor, 0, sizeof(yygotominor)); -#endif + /*memset(&yygotominor, 0, sizeof(yygotominor));*/ + yygotominor = yyzerominor; + switch( yyruleno ){ /* Beginning here are the reduction cases. A typical example @@ -1799,330 +1786,340 @@ static void yy_reduce( ** #line <lineno> <thisfile> ** break; */ - case 5: -#line 72 "ext/sqlite/libsqlite/src/parse.y" + case 5: /* cmdx ::= cmd */ +#line 72 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { sqliteExec(pParse); } -#line 1807 "ext/sqlite/libsqlite/src/parse.c" +#line 1793 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 6: -#line 73 "ext/sqlite/libsqlite/src/parse.y" + case 6: /* explain ::= EXPLAIN */ +#line 73 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { sqliteBeginParse(pParse, 1); } -#line 1812 "ext/sqlite/libsqlite/src/parse.c" +#line 1798 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 7: -#line 74 "ext/sqlite/libsqlite/src/parse.y" + case 7: /* explain ::= */ +#line 74 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { sqliteBeginParse(pParse, 0); } -#line 1817 "ext/sqlite/libsqlite/src/parse.c" +#line 1803 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 8: -#line 79 "ext/sqlite/libsqlite/src/parse.y" + case 8: /* cmd ::= BEGIN trans_opt onconf */ +#line 79 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteBeginTransaction(pParse,yymsp[0].minor.yy372);} -#line 1822 "ext/sqlite/libsqlite/src/parse.c" +#line 1808 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 12: - case 13: -#line 83 "ext/sqlite/libsqlite/src/parse.y" + case 12: /* cmd ::= COMMIT trans_opt */ + case 13: /* cmd ::= END trans_opt */ yytestcase(yyruleno==13); +#line 83 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteCommitTransaction(pParse);} -#line 1828 "ext/sqlite/libsqlite/src/parse.c" +#line 1814 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 14: -#line 85 "ext/sqlite/libsqlite/src/parse.y" + case 14: /* cmd ::= ROLLBACK trans_opt */ +#line 85 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteRollbackTransaction(pParse);} -#line 1833 "ext/sqlite/libsqlite/src/parse.c" +#line 1819 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 16: -#line 90 "ext/sqlite/libsqlite/src/parse.y" + case 16: /* create_table ::= CREATE temp TABLE nm */ +#line 90 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteStartTable(pParse,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy298,yymsp[-2].minor.yy372,0); + sqliteStartTable(pParse,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0,yymsp[-2].minor.yy372,0); } -#line 1840 "ext/sqlite/libsqlite/src/parse.c" +#line 1826 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 17: - case 74: - case 108: -#line 94 "ext/sqlite/libsqlite/src/parse.y" + case 17: /* temp ::= TEMP */ + case 74: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==74); + case 108: /* distinct ::= DISTINCT */ yytestcase(yyruleno==108); +#line 94 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = 1;} -#line 1847 "ext/sqlite/libsqlite/src/parse.c" - break; - case 18: - case 73: - case 75: - case 86: - case 109: - case 110: -#line 95 "ext/sqlite/libsqlite/src/parse.y" +#line 1833 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 18: /* temp ::= */ + case 73: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==73); + case 75: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==75); + case 86: /* defer_subclause_opt ::= */ yytestcase(yyruleno==86); + case 109: /* distinct ::= ALL */ yytestcase(yyruleno==109); + case 110: /* distinct ::= */ yytestcase(yyruleno==110); +#line 95 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = 0;} -#line 1857 "ext/sqlite/libsqlite/src/parse.c" +#line 1843 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 19: -#line 96 "ext/sqlite/libsqlite/src/parse.y" + case 19: /* create_table_args ::= LP columnlist conslist_opt RP */ +#line 96 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { sqliteEndTable(pParse,&yymsp[0].minor.yy0,0); } -#line 1864 "ext/sqlite/libsqlite/src/parse.c" +#line 1850 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 20: -#line 99 "ext/sqlite/libsqlite/src/parse.y" + case 20: /* create_table_args ::= AS select */ +#line 99 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { sqliteEndTable(pParse,0,yymsp[0].minor.yy179); sqliteSelectDelete(yymsp[0].minor.yy179); } -#line 1872 "ext/sqlite/libsqlite/src/parse.c" - break; - case 24: -#line 111 "ext/sqlite/libsqlite/src/parse.y" -{sqliteAddColumn(pParse,&yymsp[0].minor.yy298);} -#line 1877 "ext/sqlite/libsqlite/src/parse.c" - break; - case 25: - case 26: - case 27: - case 28: - case 29: - case 30: - case 256: - case 257: -#line 117 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy0;} -#line 1889 "ext/sqlite/libsqlite/src/parse.c" - break; - case 32: -#line 160 "ext/sqlite/libsqlite/src/parse.y" -{sqliteAddColumnType(pParse,&yymsp[0].minor.yy298,&yymsp[0].minor.yy298);} -#line 1894 "ext/sqlite/libsqlite/src/parse.c" - break; - case 33: -#line 161 "ext/sqlite/libsqlite/src/parse.y" -{sqliteAddColumnType(pParse,&yymsp[-3].minor.yy298,&yymsp[0].minor.yy0);} -#line 1899 "ext/sqlite/libsqlite/src/parse.c" - break; - case 34: -#line 163 "ext/sqlite/libsqlite/src/parse.y" -{sqliteAddColumnType(pParse,&yymsp[-5].minor.yy298,&yymsp[0].minor.yy0);} -#line 1904 "ext/sqlite/libsqlite/src/parse.c" - break; - case 35: - case 128: - case 254: - case 255: -#line 165 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy298 = yymsp[0].minor.yy298;} -#line 1912 "ext/sqlite/libsqlite/src/parse.c" - break; - case 36: - case 242: -#line 166 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy298 = yymsp[-1].minor.yy298;} -#line 1918 "ext/sqlite/libsqlite/src/parse.c" - break; - case 37: - case 38: -#line 168 "ext/sqlite/libsqlite/src/parse.y" +#line 1858 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 24: /* columnid ::= nm */ +#line 111 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteAddColumn(pParse,&yymsp[0].minor.yy0);} +#line 1863 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 25: /* id ::= ID */ + case 26: /* ids ::= ID */ yytestcase(yyruleno==26); + case 27: /* ids ::= STRING */ yytestcase(yyruleno==27); + case 28: /* nm ::= ID */ yytestcase(yyruleno==28); + case 29: /* nm ::= STRING */ yytestcase(yyruleno==29); + case 30: /* nm ::= JOIN_KW */ yytestcase(yyruleno==30); + case 35: /* typename ::= ids */ yytestcase(yyruleno==35); + case 128: /* dbnm ::= DOT nm */ yytestcase(yyruleno==128); + case 254: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==254); + case 255: /* minus_num ::= MINUS number */ yytestcase(yyruleno==255); + case 256: /* number ::= INTEGER */ yytestcase(yyruleno==256); + case 257: /* number ::= FLOAT */ yytestcase(yyruleno==257); +#line 117 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy0 = yymsp[0].minor.yy0;} +#line 1879 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 32: /* type ::= typename */ +#line 160 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteAddColumnType(pParse,&yymsp[0].minor.yy0,&yymsp[0].minor.yy0);} +#line 1884 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 33: /* type ::= typename LP signed RP */ +#line 161 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteAddColumnType(pParse,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);} +#line 1889 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 34: /* type ::= typename LP signed COMMA signed RP */ +#line 163 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteAddColumnType(pParse,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);} +#line 1894 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 36: /* typename ::= typename ids */ + case 242: /* idxitem ::= nm sortorder */ yytestcase(yyruleno==242); +#line 166 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy0 = yymsp[-1].minor.yy0;} +#line 1900 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 37: /* signed ::= INTEGER */ + case 38: /* signed ::= PLUS INTEGER */ yytestcase(yyruleno==38); +#line 168 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = atoi(yymsp[0].minor.yy0.z); } -#line 1924 "ext/sqlite/libsqlite/src/parse.c" +#line 1906 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 39: -#line 170 "ext/sqlite/libsqlite/src/parse.y" + case 39: /* signed ::= MINUS INTEGER */ +#line 170 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = -atoi(yymsp[0].minor.yy0.z); } -#line 1929 "ext/sqlite/libsqlite/src/parse.c" - break; - case 44: - case 45: - case 46: - case 47: - case 49: - case 50: -#line 175 "ext/sqlite/libsqlite/src/parse.y" +#line 1911 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 44: /* carg ::= DEFAULT STRING */ + case 45: /* carg ::= DEFAULT ID */ yytestcase(yyruleno==45); + case 46: /* carg ::= DEFAULT INTEGER */ yytestcase(yyruleno==46); + case 47: /* carg ::= DEFAULT PLUS INTEGER */ yytestcase(yyruleno==47); + case 49: /* carg ::= DEFAULT FLOAT */ yytestcase(yyruleno==49); + case 50: /* carg ::= DEFAULT PLUS FLOAT */ yytestcase(yyruleno==50); +#line 175 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,0);} -#line 1939 "ext/sqlite/libsqlite/src/parse.c" +#line 1921 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 48: - case 51: -#line 179 "ext/sqlite/libsqlite/src/parse.y" + case 48: /* carg ::= DEFAULT MINUS INTEGER */ + case 51: /* carg ::= DEFAULT MINUS FLOAT */ yytestcase(yyruleno==51); +#line 179 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteAddDefaultValue(pParse,&yymsp[0].minor.yy0,1);} -#line 1945 "ext/sqlite/libsqlite/src/parse.c" +#line 1927 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 54: -#line 189 "ext/sqlite/libsqlite/src/parse.y" + case 54: /* ccons ::= NOT NULL onconf */ +#line 189 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteAddNotNull(pParse, yymsp[0].minor.yy372);} -#line 1950 "ext/sqlite/libsqlite/src/parse.c" +#line 1932 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 55: -#line 190 "ext/sqlite/libsqlite/src/parse.y" + case 55: /* ccons ::= PRIMARY KEY sortorder onconf */ +#line 190 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteAddPrimaryKey(pParse,0,yymsp[0].minor.yy372);} -#line 1955 "ext/sqlite/libsqlite/src/parse.c" +#line 1937 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 56: -#line 191 "ext/sqlite/libsqlite/src/parse.y" + case 56: /* ccons ::= UNIQUE onconf */ +#line 191 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteCreateIndex(pParse,0,0,0,yymsp[0].minor.yy372,0,0);} -#line 1960 "ext/sqlite/libsqlite/src/parse.c" +#line 1942 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 58: -#line 194 "ext/sqlite/libsqlite/src/parse.y" -{sqliteCreateForeignKey(pParse,0,&yymsp[-2].minor.yy298,yymsp[-1].minor.yy320,yymsp[0].minor.yy372);} -#line 1965 "ext/sqlite/libsqlite/src/parse.c" + case 57: /* ccons ::= CHECK LP expr RP onconf */ +#line 192 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ + yy_destructor(yypParser,158,&yymsp[-2].minor); +} +#line 1949 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 58: /* ccons ::= REFERENCES nm idxlist_opt refargs */ +#line 194 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteCreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy320,yymsp[0].minor.yy372);} +#line 1954 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 59: -#line 195 "ext/sqlite/libsqlite/src/parse.y" + case 59: /* ccons ::= defer_subclause */ +#line 195 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteDeferForeignKey(pParse,yymsp[0].minor.yy372);} -#line 1970 "ext/sqlite/libsqlite/src/parse.c" +#line 1959 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 60: -#line 196 "ext/sqlite/libsqlite/src/parse.y" + case 60: /* ccons ::= COLLATE id */ +#line 196 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteAddCollateType(pParse, sqliteCollateType(yymsp[0].minor.yy298.z, yymsp[0].minor.yy298.n)); + sqliteAddCollateType(pParse, sqliteCollateType(yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n)); } -#line 1977 "ext/sqlite/libsqlite/src/parse.c" +#line 1966 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 61: -#line 206 "ext/sqlite/libsqlite/src/parse.y" + case 61: /* refargs ::= */ +#line 206 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Restrict * 0x010101; } -#line 1982 "ext/sqlite/libsqlite/src/parse.c" +#line 1971 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 62: -#line 207 "ext/sqlite/libsqlite/src/parse.y" + case 62: /* refargs ::= refargs refarg */ +#line 207 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = (yymsp[-1].minor.yy372 & yymsp[0].minor.yy407.mask) | yymsp[0].minor.yy407.value; } -#line 1987 "ext/sqlite/libsqlite/src/parse.c" +#line 1976 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 63: -#line 209 "ext/sqlite/libsqlite/src/parse.y" + case 63: /* refarg ::= MATCH nm */ +#line 209 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = 0; yygotominor.yy407.mask = 0x000000; } -#line 1992 "ext/sqlite/libsqlite/src/parse.c" +#line 1981 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 64: -#line 210 "ext/sqlite/libsqlite/src/parse.y" + case 64: /* refarg ::= ON DELETE refact */ +#line 210 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = yymsp[0].minor.yy372; yygotominor.yy407.mask = 0x0000ff; } -#line 1997 "ext/sqlite/libsqlite/src/parse.c" +#line 1986 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 65: -#line 211 "ext/sqlite/libsqlite/src/parse.y" + case 65: /* refarg ::= ON UPDATE refact */ +#line 211 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = yymsp[0].minor.yy372<<8; yygotominor.yy407.mask = 0x00ff00; } -#line 2002 "ext/sqlite/libsqlite/src/parse.c" +#line 1991 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 66: -#line 212 "ext/sqlite/libsqlite/src/parse.y" + case 66: /* refarg ::= ON INSERT refact */ +#line 212 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy407.value = yymsp[0].minor.yy372<<16; yygotominor.yy407.mask = 0xff0000; } -#line 2007 "ext/sqlite/libsqlite/src/parse.c" +#line 1996 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 67: -#line 214 "ext/sqlite/libsqlite/src/parse.y" + case 67: /* refact ::= SET NULL */ +#line 214 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_SetNull; } -#line 2012 "ext/sqlite/libsqlite/src/parse.c" +#line 2001 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 68: -#line 215 "ext/sqlite/libsqlite/src/parse.y" + case 68: /* refact ::= SET DEFAULT */ +#line 215 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_SetDflt; } -#line 2017 "ext/sqlite/libsqlite/src/parse.c" +#line 2006 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 69: -#line 216 "ext/sqlite/libsqlite/src/parse.y" + case 69: /* refact ::= CASCADE */ +#line 216 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Cascade; } -#line 2022 "ext/sqlite/libsqlite/src/parse.c" +#line 2011 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 70: -#line 217 "ext/sqlite/libsqlite/src/parse.y" + case 70: /* refact ::= RESTRICT */ +#line 217 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Restrict; } -#line 2027 "ext/sqlite/libsqlite/src/parse.c" +#line 2016 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 71: - case 72: - case 87: - case 164: -#line 219 "ext/sqlite/libsqlite/src/parse.y" + case 71: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ + case 72: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==72); + case 87: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==87); + case 164: /* insert_cmd ::= INSERT orconf */ yytestcase(yyruleno==164); +#line 219 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = yymsp[0].minor.yy372;} -#line 2035 "ext/sqlite/libsqlite/src/parse.c" +#line 2024 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 82: -#line 236 "ext/sqlite/libsqlite/src/parse.y" + case 82: /* tcons ::= PRIMARY KEY LP idxlist RP onconf */ +#line 236 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteAddPrimaryKey(pParse,yymsp[-2].minor.yy320,yymsp[0].minor.yy372);} -#line 2040 "ext/sqlite/libsqlite/src/parse.c" +#line 2029 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 83: -#line 238 "ext/sqlite/libsqlite/src/parse.y" + case 83: /* tcons ::= UNIQUE LP idxlist RP onconf */ +#line 238 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteCreateIndex(pParse,0,0,yymsp[-2].minor.yy320,yymsp[0].minor.yy372,0,0);} -#line 2045 "ext/sqlite/libsqlite/src/parse.c" +#line 2034 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 84: /* tcons ::= CHECK expr onconf */ +#line 239 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ + yy_destructor(yypParser,158,&yymsp[-1].minor); +} +#line 2041 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 85: -#line 241 "ext/sqlite/libsqlite/src/parse.y" + case 85: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */ +#line 241 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteCreateForeignKey(pParse, yymsp[-6].minor.yy320, &yymsp[-3].minor.yy298, yymsp[-2].minor.yy320, yymsp[-1].minor.yy372); + sqliteCreateForeignKey(pParse, yymsp[-6].minor.yy320, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy320, yymsp[-1].minor.yy372); sqliteDeferForeignKey(pParse, yymsp[0].minor.yy372); } -#line 2053 "ext/sqlite/libsqlite/src/parse.c" +#line 2049 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 88: - case 90: -#line 255 "ext/sqlite/libsqlite/src/parse.y" + case 88: /* onconf ::= */ + case 90: /* orconf ::= */ yytestcase(yyruleno==90); +#line 255 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Default; } -#line 2059 "ext/sqlite/libsqlite/src/parse.c" +#line 2055 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 89: - case 91: -#line 256 "ext/sqlite/libsqlite/src/parse.y" + case 89: /* onconf ::= ON CONFLICT resolvetype */ + case 91: /* orconf ::= OR resolvetype */ yytestcase(yyruleno==91); +#line 256 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = yymsp[0].minor.yy372; } -#line 2065 "ext/sqlite/libsqlite/src/parse.c" +#line 2061 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 92: -#line 259 "ext/sqlite/libsqlite/src/parse.y" + case 92: /* resolvetype ::= ROLLBACK */ +#line 259 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Rollback; } -#line 2070 "ext/sqlite/libsqlite/src/parse.c" +#line 2066 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 93: - case 236: -#line 260 "ext/sqlite/libsqlite/src/parse.y" + case 93: /* resolvetype ::= ABORT */ + case 236: /* uniqueflag ::= UNIQUE */ yytestcase(yyruleno==236); +#line 260 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Abort; } -#line 2076 "ext/sqlite/libsqlite/src/parse.c" +#line 2072 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 94: -#line 261 "ext/sqlite/libsqlite/src/parse.y" + case 94: /* resolvetype ::= FAIL */ +#line 261 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Fail; } -#line 2081 "ext/sqlite/libsqlite/src/parse.c" +#line 2077 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 95: -#line 262 "ext/sqlite/libsqlite/src/parse.y" + case 95: /* resolvetype ::= IGNORE */ +#line 262 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Ignore; } -#line 2086 "ext/sqlite/libsqlite/src/parse.c" +#line 2082 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 96: -#line 263 "ext/sqlite/libsqlite/src/parse.y" + case 96: /* resolvetype ::= REPLACE */ +#line 263 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_Replace; } -#line 2091 "ext/sqlite/libsqlite/src/parse.c" +#line 2087 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 97: -#line 267 "ext/sqlite/libsqlite/src/parse.y" -{sqliteDropTable(pParse,&yymsp[0].minor.yy298,0);} -#line 2096 "ext/sqlite/libsqlite/src/parse.c" + case 97: /* cmd ::= DROP TABLE nm */ +#line 267 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteDropTable(pParse,&yymsp[0].minor.yy0,0);} +#line 2092 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 98: -#line 271 "ext/sqlite/libsqlite/src/parse.y" + case 98: /* cmd ::= CREATE temp VIEW nm AS select */ +#line 271 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteCreateView(pParse, &yymsp[-5].minor.yy0, &yymsp[-2].minor.yy298, yymsp[0].minor.yy179, yymsp[-4].minor.yy372); + sqliteCreateView(pParse, &yymsp[-5].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy179, yymsp[-4].minor.yy372); } -#line 2103 "ext/sqlite/libsqlite/src/parse.c" +#line 2099 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 99: -#line 274 "ext/sqlite/libsqlite/src/parse.y" + case 99: /* cmd ::= DROP VIEW nm */ +#line 274 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteDropTable(pParse, &yymsp[0].minor.yy298, 1); + sqliteDropTable(pParse, &yymsp[0].minor.yy0, 1); } -#line 2110 "ext/sqlite/libsqlite/src/parse.c" +#line 2106 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 100: -#line 280 "ext/sqlite/libsqlite/src/parse.y" + case 100: /* cmd ::= select */ +#line 280 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { sqliteSelect(pParse, yymsp[0].minor.yy179, SRT_Callback, 0, 0, 0, 0); sqliteSelectDelete(yymsp[0].minor.yy179); } -#line 2118 "ext/sqlite/libsqlite/src/parse.c" +#line 2114 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 101: - case 125: -#line 290 "ext/sqlite/libsqlite/src/parse.y" + case 101: /* select ::= oneselect */ + case 125: /* seltablist_paren ::= select */ yytestcase(yyruleno==125); +#line 290 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy179 = yymsp[0].minor.yy179;} -#line 2124 "ext/sqlite/libsqlite/src/parse.c" +#line 2120 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 102: -#line 291 "ext/sqlite/libsqlite/src/parse.y" + case 102: /* select ::= select multiselect_op oneselect */ +#line 291 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { if( yymsp[0].minor.yy179 ){ yymsp[0].minor.yy179->op = yymsp[-1].minor.yy372; @@ -2130,110 +2127,110 @@ static void yy_reduce( } yygotominor.yy179 = yymsp[0].minor.yy179; } -#line 2135 "ext/sqlite/libsqlite/src/parse.c" +#line 2131 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 103: -#line 299 "ext/sqlite/libsqlite/src/parse.y" + case 103: /* multiselect_op ::= UNION */ +#line 299 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_UNION;} -#line 2140 "ext/sqlite/libsqlite/src/parse.c" +#line 2136 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 104: -#line 300 "ext/sqlite/libsqlite/src/parse.y" + case 104: /* multiselect_op ::= UNION ALL */ +#line 300 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_ALL;} -#line 2145 "ext/sqlite/libsqlite/src/parse.c" +#line 2141 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 105: -#line 301 "ext/sqlite/libsqlite/src/parse.y" + case 105: /* multiselect_op ::= INTERSECT */ +#line 301 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_INTERSECT;} -#line 2150 "ext/sqlite/libsqlite/src/parse.c" +#line 2146 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 106: -#line 302 "ext/sqlite/libsqlite/src/parse.y" + case 106: /* multiselect_op ::= EXCEPT */ +#line 302 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_EXCEPT;} -#line 2155 "ext/sqlite/libsqlite/src/parse.c" +#line 2151 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 107: -#line 304 "ext/sqlite/libsqlite/src/parse.y" + case 107: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */ +#line 304 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy179 = sqliteSelectNew(yymsp[-6].minor.yy322,yymsp[-5].minor.yy307,yymsp[-4].minor.yy242,yymsp[-3].minor.yy322,yymsp[-2].minor.yy242,yymsp[-1].minor.yy322,yymsp[-7].minor.yy372,yymsp[0].minor.yy124.limit,yymsp[0].minor.yy124.offset); } -#line 2162 "ext/sqlite/libsqlite/src/parse.c" +#line 2158 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 111: -#line 325 "ext/sqlite/libsqlite/src/parse.y" + case 111: /* sclp ::= selcollist COMMA */ +#line 325 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = yymsp[-1].minor.yy322;} -#line 2167 "ext/sqlite/libsqlite/src/parse.c" +#line 2163 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 112: - case 138: - case 148: -#line 326 "ext/sqlite/libsqlite/src/parse.y" + case 112: /* sclp ::= */ + case 138: /* orderby_opt ::= */ yytestcase(yyruleno==138); + case 148: /* groupby_opt ::= */ yytestcase(yyruleno==148); +#line 326 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = 0;} -#line 2174 "ext/sqlite/libsqlite/src/parse.c" +#line 2170 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 113: -#line 327 "ext/sqlite/libsqlite/src/parse.y" + case 113: /* selcollist ::= sclp expr as */ +#line 327 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - yygotominor.yy322 = sqliteExprListAppend(yymsp[-2].minor.yy322,yymsp[-1].minor.yy242,yymsp[0].minor.yy298.n?&yymsp[0].minor.yy298:0); + yygotominor.yy322 = sqliteExprListAppend(yymsp[-2].minor.yy322,yymsp[-1].minor.yy242,yymsp[0].minor.yy0.n?&yymsp[0].minor.yy0:0); } -#line 2181 "ext/sqlite/libsqlite/src/parse.c" +#line 2177 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 114: -#line 330 "ext/sqlite/libsqlite/src/parse.y" + case 114: /* selcollist ::= sclp STAR */ +#line 330 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-1].minor.yy322, sqliteExpr(TK_ALL, 0, 0, 0), 0); } -#line 2188 "ext/sqlite/libsqlite/src/parse.c" +#line 2184 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 115: -#line 333 "ext/sqlite/libsqlite/src/parse.y" + case 115: /* selcollist ::= sclp nm DOT STAR */ +#line 333 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { Expr *pRight = sqliteExpr(TK_ALL, 0, 0, 0); - Expr *pLeft = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy298); + Expr *pLeft = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy0); yygotominor.yy322 = sqliteExprListAppend(yymsp[-3].minor.yy322, sqliteExpr(TK_DOT, pLeft, pRight, 0), 0); } -#line 2197 "ext/sqlite/libsqlite/src/parse.c" +#line 2193 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 116: - case 117: - case 288: -#line 343 "ext/sqlite/libsqlite/src/parse.y" -{ yygotominor.yy298 = yymsp[0].minor.yy298; } -#line 2204 "ext/sqlite/libsqlite/src/parse.c" + case 116: /* as ::= AS nm */ + case 117: /* as ::= ids */ yytestcase(yyruleno==117); + case 288: /* key_opt ::= USING ids */ yytestcase(yyruleno==288); +#line 343 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ yygotominor.yy0 = yymsp[0].minor.yy0; } +#line 2200 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 118: -#line 345 "ext/sqlite/libsqlite/src/parse.y" -{ yygotominor.yy298.n = 0; } -#line 2209 "ext/sqlite/libsqlite/src/parse.c" + case 118: /* as ::= */ +#line 345 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ yygotominor.yy0.n = 0; } +#line 2205 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 119: -#line 357 "ext/sqlite/libsqlite/src/parse.y" + case 119: /* from ::= */ +#line 357 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy307 = sqliteMalloc(sizeof(*yygotominor.yy307));} -#line 2214 "ext/sqlite/libsqlite/src/parse.c" +#line 2210 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 120: -#line 358 "ext/sqlite/libsqlite/src/parse.y" + case 120: /* from ::= FROM seltablist */ +#line 358 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy307 = yymsp[0].minor.yy307;} -#line 2219 "ext/sqlite/libsqlite/src/parse.c" +#line 2215 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 121: -#line 363 "ext/sqlite/libsqlite/src/parse.y" + case 121: /* stl_prefix ::= seltablist joinop */ +#line 363 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy307 = yymsp[-1].minor.yy307; if( yygotominor.yy307 && yygotominor.yy307->nSrc>0 ) yygotominor.yy307->a[yygotominor.yy307->nSrc-1].jointype = yymsp[0].minor.yy372; } -#line 2227 "ext/sqlite/libsqlite/src/parse.c" +#line 2223 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 122: -#line 367 "ext/sqlite/libsqlite/src/parse.y" + case 122: /* stl_prefix ::= */ +#line 367 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy307 = 0;} -#line 2232 "ext/sqlite/libsqlite/src/parse.c" +#line 2228 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 123: -#line 368 "ext/sqlite/libsqlite/src/parse.y" + case 123: /* seltablist ::= stl_prefix nm dbnm as on_opt using_opt */ +#line 368 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - yygotominor.yy307 = sqliteSrcListAppend(yymsp[-5].minor.yy307,&yymsp[-4].minor.yy298,&yymsp[-3].minor.yy298); - if( yymsp[-2].minor.yy298.n ) sqliteSrcListAddAlias(yygotominor.yy307,&yymsp[-2].minor.yy298); + yygotominor.yy307 = sqliteSrcListAppend(yymsp[-5].minor.yy307,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0); + if( yymsp[-2].minor.yy0.n ) sqliteSrcListAddAlias(yygotominor.yy307,&yymsp[-2].minor.yy0); if( yymsp[-1].minor.yy242 ){ if( yygotominor.yy307 && yygotominor.yy307->nSrc>1 ){ yygotominor.yy307->a[yygotominor.yy307->nSrc-2].pOn = yymsp[-1].minor.yy242; } else { sqliteExprDelete(yymsp[-1].minor.yy242); } @@ -2243,14 +2240,14 @@ static void yy_reduce( else { sqliteIdListDelete(yymsp[0].minor.yy320); } } } -#line 2248 "ext/sqlite/libsqlite/src/parse.c" +#line 2244 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 124: -#line 381 "ext/sqlite/libsqlite/src/parse.y" + case 124: /* seltablist ::= stl_prefix LP seltablist_paren RP as on_opt using_opt */ +#line 381 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy307 = sqliteSrcListAppend(yymsp[-6].minor.yy307,0,0); yygotominor.yy307->a[yygotominor.yy307->nSrc-1].pSelect = yymsp[-4].minor.yy179; - if( yymsp[-2].minor.yy298.n ) sqliteSrcListAddAlias(yygotominor.yy307,&yymsp[-2].minor.yy298); + if( yymsp[-2].minor.yy0.n ) sqliteSrcListAddAlias(yygotominor.yy307,&yymsp[-2].minor.yy0); if( yymsp[-1].minor.yy242 ){ if( yygotominor.yy307 && yygotominor.yy307->nSrc>1 ){ yygotominor.yy307->a[yygotominor.yy307->nSrc-2].pOn = yymsp[-1].minor.yy242; } else { sqliteExprDelete(yymsp[-1].minor.yy242); } @@ -2260,337 +2257,337 @@ static void yy_reduce( else { sqliteIdListDelete(yymsp[0].minor.yy320); } } } -#line 2265 "ext/sqlite/libsqlite/src/parse.c" +#line 2261 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 126: -#line 402 "ext/sqlite/libsqlite/src/parse.y" + case 126: /* seltablist_paren ::= seltablist */ +#line 402 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy179 = sqliteSelectNew(0,yymsp[0].minor.yy307,0,0,0,0,0,-1,0); } -#line 2272 "ext/sqlite/libsqlite/src/parse.c" +#line 2268 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 127: -#line 407 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy298.z=0; yygotominor.yy298.n=0;} -#line 2277 "ext/sqlite/libsqlite/src/parse.c" + case 127: /* dbnm ::= */ +#line 407 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy0.z=0; yygotominor.yy0.n=0;} +#line 2273 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 129: - case 130: -#line 412 "ext/sqlite/libsqlite/src/parse.y" + case 129: /* joinop ::= COMMA */ + case 130: /* joinop ::= JOIN */ yytestcase(yyruleno==130); +#line 412 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = JT_INNER; } -#line 2283 "ext/sqlite/libsqlite/src/parse.c" +#line 2279 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 131: -#line 414 "ext/sqlite/libsqlite/src/parse.y" + case 131: /* joinop ::= JOIN_KW JOIN */ +#line 414 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-1].minor.yy0,0,0); } -#line 2288 "ext/sqlite/libsqlite/src/parse.c" - break; - case 132: -#line 415 "ext/sqlite/libsqlite/src/parse.y" -{ yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy298,0); } -#line 2293 "ext/sqlite/libsqlite/src/parse.c" - break; - case 133: -#line 417 "ext/sqlite/libsqlite/src/parse.y" -{ yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy298,&yymsp[-1].minor.yy298); } -#line 2298 "ext/sqlite/libsqlite/src/parse.c" - break; - case 134: - case 142: - case 151: - case 158: - case 227: - case 229: - case 233: -#line 421 "ext/sqlite/libsqlite/src/parse.y" +#line 2284 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 132: /* joinop ::= JOIN_KW nm JOIN */ +#line 415 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); } +#line 2289 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 133: /* joinop ::= JOIN_KW nm nm JOIN */ +#line 417 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ yygotominor.yy372 = sqliteJoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); } +#line 2294 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 134: /* on_opt ::= ON expr */ + case 142: /* sortitem ::= expr */ yytestcase(yyruleno==142); + case 151: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==151); + case 158: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==158); + case 227: /* case_else ::= ELSE expr */ yytestcase(yyruleno==227); + case 229: /* case_operand ::= expr */ yytestcase(yyruleno==229); + case 233: /* expritem ::= expr */ yytestcase(yyruleno==233); +#line 421 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = yymsp[0].minor.yy242;} -#line 2309 "ext/sqlite/libsqlite/src/parse.c" - break; - case 135: - case 150: - case 157: - case 228: - case 230: - case 234: -#line 422 "ext/sqlite/libsqlite/src/parse.y" +#line 2305 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 135: /* on_opt ::= */ + case 150: /* having_opt ::= */ yytestcase(yyruleno==150); + case 157: /* where_opt ::= */ yytestcase(yyruleno==157); + case 228: /* case_else ::= */ yytestcase(yyruleno==228); + case 230: /* case_operand ::= */ yytestcase(yyruleno==230); + case 234: /* expritem ::= */ yytestcase(yyruleno==234); +#line 422 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = 0;} -#line 2319 "ext/sqlite/libsqlite/src/parse.c" +#line 2315 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 136: - case 169: - case 239: -#line 426 "ext/sqlite/libsqlite/src/parse.y" + case 136: /* using_opt ::= USING LP idxlist RP */ + case 169: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==169); + case 239: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==239); +#line 426 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy320 = yymsp[-1].minor.yy320;} -#line 2326 "ext/sqlite/libsqlite/src/parse.c" +#line 2322 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 137: - case 168: - case 238: -#line 427 "ext/sqlite/libsqlite/src/parse.y" + case 137: /* using_opt ::= */ + case 168: /* inscollist_opt ::= */ yytestcase(yyruleno==168); + case 238: /* idxlist_opt ::= */ yytestcase(yyruleno==238); +#line 427 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy320 = 0;} -#line 2333 "ext/sqlite/libsqlite/src/parse.c" +#line 2329 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 139: - case 149: -#line 438 "ext/sqlite/libsqlite/src/parse.y" + case 139: /* orderby_opt ::= ORDER BY sortlist */ + case 149: /* groupby_opt ::= GROUP BY exprlist */ yytestcase(yyruleno==149); +#line 438 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = yymsp[0].minor.yy322;} -#line 2339 "ext/sqlite/libsqlite/src/parse.c" +#line 2335 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 140: -#line 439 "ext/sqlite/libsqlite/src/parse.y" + case 140: /* sortlist ::= sortlist COMMA sortitem collate sortorder */ +#line 439 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322,yymsp[-2].minor.yy242,0); if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = yymsp[-1].minor.yy372+yymsp[0].minor.yy372; } -#line 2347 "ext/sqlite/libsqlite/src/parse.c" +#line 2343 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 141: -#line 443 "ext/sqlite/libsqlite/src/parse.y" + case 141: /* sortlist ::= sortitem collate sortorder */ +#line 443 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(0,yymsp[-2].minor.yy242,0); if( yygotominor.yy322 ) yygotominor.yy322->a[0].sortOrder = yymsp[-1].minor.yy372+yymsp[0].minor.yy372; } -#line 2355 "ext/sqlite/libsqlite/src/parse.c" +#line 2351 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 143: - case 145: -#line 452 "ext/sqlite/libsqlite/src/parse.y" + case 143: /* sortorder ::= ASC */ + case 145: /* sortorder ::= */ yytestcase(yyruleno==145); +#line 452 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = SQLITE_SO_ASC;} -#line 2361 "ext/sqlite/libsqlite/src/parse.c" +#line 2357 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 144: -#line 453 "ext/sqlite/libsqlite/src/parse.y" + case 144: /* sortorder ::= DESC */ +#line 453 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = SQLITE_SO_DESC;} -#line 2366 "ext/sqlite/libsqlite/src/parse.c" +#line 2362 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 146: -#line 455 "ext/sqlite/libsqlite/src/parse.y" + case 146: /* collate ::= */ +#line 455 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = SQLITE_SO_UNK;} -#line 2371 "ext/sqlite/libsqlite/src/parse.c" +#line 2367 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 147: -#line 456 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy372 = sqliteCollateType(yymsp[0].minor.yy298.z, yymsp[0].minor.yy298.n);} -#line 2376 "ext/sqlite/libsqlite/src/parse.c" + case 147: /* collate ::= COLLATE id */ +#line 456 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy372 = sqliteCollateType(yymsp[0].minor.yy0.z, yymsp[0].minor.yy0.n);} +#line 2372 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 152: -#line 469 "ext/sqlite/libsqlite/src/parse.y" + case 152: /* limit_opt ::= */ +#line 469 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = -1; yygotominor.yy124.offset = 0;} -#line 2381 "ext/sqlite/libsqlite/src/parse.c" +#line 2377 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 153: -#line 470 "ext/sqlite/libsqlite/src/parse.y" + case 153: /* limit_opt ::= LIMIT signed */ +#line 470 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = yymsp[0].minor.yy372; yygotominor.yy124.offset = 0;} -#line 2386 "ext/sqlite/libsqlite/src/parse.c" +#line 2382 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 154: -#line 472 "ext/sqlite/libsqlite/src/parse.y" + case 154: /* limit_opt ::= LIMIT signed OFFSET signed */ +#line 472 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = yymsp[-2].minor.yy372; yygotominor.yy124.offset = yymsp[0].minor.yy372;} -#line 2391 "ext/sqlite/libsqlite/src/parse.c" +#line 2387 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 155: -#line 474 "ext/sqlite/libsqlite/src/parse.y" + case 155: /* limit_opt ::= LIMIT signed COMMA signed */ +#line 474 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy124.limit = yymsp[0].minor.yy372; yygotominor.yy124.offset = yymsp[-2].minor.yy372;} -#line 2396 "ext/sqlite/libsqlite/src/parse.c" +#line 2392 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 156: -#line 478 "ext/sqlite/libsqlite/src/parse.y" + case 156: /* cmd ::= DELETE FROM nm dbnm where_opt */ +#line 478 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteDeleteFrom(pParse, sqliteSrcListAppend(0,&yymsp[-2].minor.yy298,&yymsp[-1].minor.yy298), yymsp[0].minor.yy242); + sqliteDeleteFrom(pParse, sqliteSrcListAppend(0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0), yymsp[0].minor.yy242); } -#line 2403 "ext/sqlite/libsqlite/src/parse.c" +#line 2399 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 159: -#line 494 "ext/sqlite/libsqlite/src/parse.y" -{sqliteUpdate(pParse,sqliteSrcListAppend(0,&yymsp[-4].minor.yy298,&yymsp[-3].minor.yy298),yymsp[-1].minor.yy322,yymsp[0].minor.yy242,yymsp[-5].minor.yy372);} -#line 2408 "ext/sqlite/libsqlite/src/parse.c" + case 159: /* cmd ::= UPDATE orconf nm dbnm SET setlist where_opt */ +#line 494 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteUpdate(pParse,sqliteSrcListAppend(0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0),yymsp[-1].minor.yy322,yymsp[0].minor.yy242,yymsp[-5].minor.yy372);} +#line 2404 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 160: -#line 497 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322,yymsp[0].minor.yy242,&yymsp[-2].minor.yy298);} -#line 2413 "ext/sqlite/libsqlite/src/parse.c" + case 160: /* setlist ::= setlist COMMA nm EQ expr */ +#line 497 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322,yymsp[0].minor.yy242,&yymsp[-2].minor.yy0);} +#line 2409 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 161: -#line 498 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy322 = sqliteExprListAppend(0,yymsp[0].minor.yy242,&yymsp[-2].minor.yy298);} -#line 2418 "ext/sqlite/libsqlite/src/parse.c" + case 161: /* setlist ::= nm EQ expr */ +#line 498 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy322 = sqliteExprListAppend(0,yymsp[0].minor.yy242,&yymsp[-2].minor.yy0);} +#line 2414 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 162: -#line 504 "ext/sqlite/libsqlite/src/parse.y" -{sqliteInsert(pParse, sqliteSrcListAppend(0,&yymsp[-6].minor.yy298,&yymsp[-5].minor.yy298), yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy320, yymsp[-8].minor.yy372);} -#line 2423 "ext/sqlite/libsqlite/src/parse.c" + case 162: /* cmd ::= insert_cmd INTO nm dbnm inscollist_opt VALUES LP itemlist RP */ +#line 504 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteInsert(pParse, sqliteSrcListAppend(0,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0), yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy320, yymsp[-8].minor.yy372);} +#line 2419 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 163: -#line 506 "ext/sqlite/libsqlite/src/parse.y" -{sqliteInsert(pParse, sqliteSrcListAppend(0,&yymsp[-3].minor.yy298,&yymsp[-2].minor.yy298), 0, yymsp[0].minor.yy179, yymsp[-1].minor.yy320, yymsp[-5].minor.yy372);} -#line 2428 "ext/sqlite/libsqlite/src/parse.c" + case 163: /* cmd ::= insert_cmd INTO nm dbnm inscollist_opt select */ +#line 506 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteInsert(pParse, sqliteSrcListAppend(0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0), 0, yymsp[0].minor.yy179, yymsp[-1].minor.yy320, yymsp[-5].minor.yy372);} +#line 2424 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 165: -#line 510 "ext/sqlite/libsqlite/src/parse.y" + case 165: /* insert_cmd ::= REPLACE */ +#line 510 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = OE_Replace;} -#line 2433 "ext/sqlite/libsqlite/src/parse.c" +#line 2429 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 166: - case 231: -#line 516 "ext/sqlite/libsqlite/src/parse.y" + case 166: /* itemlist ::= itemlist COMMA expr */ + case 231: /* exprlist ::= exprlist COMMA expritem */ yytestcase(yyruleno==231); +#line 516 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = sqliteExprListAppend(yymsp[-2].minor.yy322,yymsp[0].minor.yy242,0);} -#line 2439 "ext/sqlite/libsqlite/src/parse.c" +#line 2435 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 167: - case 232: -#line 517 "ext/sqlite/libsqlite/src/parse.y" + case 167: /* itemlist ::= expr */ + case 232: /* exprlist ::= expritem */ yytestcase(yyruleno==232); +#line 517 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy322 = sqliteExprListAppend(0,yymsp[0].minor.yy242,0);} -#line 2445 "ext/sqlite/libsqlite/src/parse.c" - break; - case 170: - case 240: -#line 526 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy320 = sqliteIdListAppend(yymsp[-2].minor.yy320,&yymsp[0].minor.yy298);} -#line 2451 "ext/sqlite/libsqlite/src/parse.c" - break; - case 171: - case 241: -#line 527 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy320 = sqliteIdListAppend(0,&yymsp[0].minor.yy298);} -#line 2457 "ext/sqlite/libsqlite/src/parse.c" - break; - case 172: -#line 535 "ext/sqlite/libsqlite/src/parse.y" +#line 2441 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 170: /* inscollist ::= inscollist COMMA nm */ + case 240: /* idxlist ::= idxlist COMMA idxitem */ yytestcase(yyruleno==240); +#line 526 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy320 = sqliteIdListAppend(yymsp[-2].minor.yy320,&yymsp[0].minor.yy0);} +#line 2447 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 171: /* inscollist ::= nm */ + case 241: /* idxlist ::= idxitem */ yytestcase(yyruleno==241); +#line 527 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy320 = sqliteIdListAppend(0,&yymsp[0].minor.yy0);} +#line 2453 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 172: /* expr ::= LP expr RP */ +#line 535 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = yymsp[-1].minor.yy242; sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); } -#line 2462 "ext/sqlite/libsqlite/src/parse.c" +#line 2458 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 173: -#line 536 "ext/sqlite/libsqlite/src/parse.y" + case 173: /* expr ::= NULL */ +#line 536 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_NULL, 0, 0, &yymsp[0].minor.yy0);} -#line 2467 "ext/sqlite/libsqlite/src/parse.c" +#line 2463 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 174: - case 175: -#line 537 "ext/sqlite/libsqlite/src/parse.y" + case 174: /* expr ::= ID */ + case 175: /* expr ::= JOIN_KW */ yytestcase(yyruleno==175); +#line 537 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0);} -#line 2473 "ext/sqlite/libsqlite/src/parse.c" +#line 2469 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 176: -#line 539 "ext/sqlite/libsqlite/src/parse.y" + case 176: /* expr ::= nm DOT nm */ +#line 539 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy298); - Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy298); + Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy0); + Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0); yygotominor.yy242 = sqliteExpr(TK_DOT, temp1, temp2, 0); } -#line 2482 "ext/sqlite/libsqlite/src/parse.c" +#line 2478 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 177: -#line 544 "ext/sqlite/libsqlite/src/parse.y" + case 177: /* expr ::= nm DOT nm DOT nm */ +#line 544 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-4].minor.yy298); - Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy298); - Expr *temp3 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy298); + Expr *temp1 = sqliteExpr(TK_ID, 0, 0, &yymsp[-4].minor.yy0); + Expr *temp2 = sqliteExpr(TK_ID, 0, 0, &yymsp[-2].minor.yy0); + Expr *temp3 = sqliteExpr(TK_ID, 0, 0, &yymsp[0].minor.yy0); Expr *temp4 = sqliteExpr(TK_DOT, temp2, temp3, 0); yygotominor.yy242 = sqliteExpr(TK_DOT, temp1, temp4, 0); } -#line 2493 "ext/sqlite/libsqlite/src/parse.c" +#line 2489 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 178: -#line 551 "ext/sqlite/libsqlite/src/parse.y" + case 178: /* expr ::= INTEGER */ +#line 551 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_INTEGER, 0, 0, &yymsp[0].minor.yy0);} -#line 2498 "ext/sqlite/libsqlite/src/parse.c" +#line 2494 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 179: -#line 552 "ext/sqlite/libsqlite/src/parse.y" + case 179: /* expr ::= FLOAT */ +#line 552 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_FLOAT, 0, 0, &yymsp[0].minor.yy0);} -#line 2503 "ext/sqlite/libsqlite/src/parse.c" +#line 2499 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 180: -#line 553 "ext/sqlite/libsqlite/src/parse.y" + case 180: /* expr ::= STRING */ +#line 553 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_STRING, 0, 0, &yymsp[0].minor.yy0);} -#line 2508 "ext/sqlite/libsqlite/src/parse.c" +#line 2504 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 181: -#line 554 "ext/sqlite/libsqlite/src/parse.y" + case 181: /* expr ::= VARIABLE */ +#line 554 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_VARIABLE, 0, 0, &yymsp[0].minor.yy0); if( yygotominor.yy242 ) yygotominor.yy242->iTable = ++pParse->nVar; } -#line 2516 "ext/sqlite/libsqlite/src/parse.c" +#line 2512 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 182: -#line 558 "ext/sqlite/libsqlite/src/parse.y" + case 182: /* expr ::= ID LP exprlist RP */ +#line 558 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExprFunction(yymsp[-1].minor.yy322, &yymsp[-3].minor.yy0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } -#line 2524 "ext/sqlite/libsqlite/src/parse.c" +#line 2520 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 183: -#line 562 "ext/sqlite/libsqlite/src/parse.y" + case 183: /* expr ::= ID LP STAR RP */ +#line 562 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExprFunction(0, &yymsp[-3].minor.yy0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0); } -#line 2532 "ext/sqlite/libsqlite/src/parse.c" +#line 2528 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 184: -#line 566 "ext/sqlite/libsqlite/src/parse.y" + case 184: /* expr ::= expr AND expr */ +#line 566 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_AND, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2537 "ext/sqlite/libsqlite/src/parse.c" +#line 2533 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 185: -#line 567 "ext/sqlite/libsqlite/src/parse.y" + case 185: /* expr ::= expr OR expr */ +#line 567 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_OR, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2542 "ext/sqlite/libsqlite/src/parse.c" +#line 2538 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 186: -#line 568 "ext/sqlite/libsqlite/src/parse.y" + case 186: /* expr ::= expr LT expr */ +#line 568 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_LT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2547 "ext/sqlite/libsqlite/src/parse.c" +#line 2543 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 187: -#line 569 "ext/sqlite/libsqlite/src/parse.y" + case 187: /* expr ::= expr GT expr */ +#line 569 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_GT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2552 "ext/sqlite/libsqlite/src/parse.c" +#line 2548 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 188: -#line 570 "ext/sqlite/libsqlite/src/parse.y" + case 188: /* expr ::= expr LE expr */ +#line 570 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_LE, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2557 "ext/sqlite/libsqlite/src/parse.c" +#line 2553 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 189: -#line 571 "ext/sqlite/libsqlite/src/parse.y" + case 189: /* expr ::= expr GE expr */ +#line 571 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_GE, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2562 "ext/sqlite/libsqlite/src/parse.c" +#line 2558 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 190: -#line 572 "ext/sqlite/libsqlite/src/parse.y" + case 190: /* expr ::= expr NE expr */ +#line 572 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_NE, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2567 "ext/sqlite/libsqlite/src/parse.c" +#line 2563 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 191: -#line 573 "ext/sqlite/libsqlite/src/parse.y" + case 191: /* expr ::= expr EQ expr */ +#line 573 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_EQ, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2572 "ext/sqlite/libsqlite/src/parse.c" +#line 2568 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 192: -#line 574 "ext/sqlite/libsqlite/src/parse.y" + case 192: /* expr ::= expr BITAND expr */ +#line 574 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_BITAND, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2577 "ext/sqlite/libsqlite/src/parse.c" +#line 2573 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 193: -#line 575 "ext/sqlite/libsqlite/src/parse.y" + case 193: /* expr ::= expr BITOR expr */ +#line 575 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_BITOR, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2582 "ext/sqlite/libsqlite/src/parse.c" +#line 2578 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 194: -#line 576 "ext/sqlite/libsqlite/src/parse.y" + case 194: /* expr ::= expr LSHIFT expr */ +#line 576 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_LSHIFT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2587 "ext/sqlite/libsqlite/src/parse.c" +#line 2583 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 195: -#line 577 "ext/sqlite/libsqlite/src/parse.y" + case 195: /* expr ::= expr RSHIFT expr */ +#line 577 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_RSHIFT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2592 "ext/sqlite/libsqlite/src/parse.c" +#line 2588 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 196: -#line 578 "ext/sqlite/libsqlite/src/parse.y" + case 196: /* expr ::= expr likeop expr */ +#line 578 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[0].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[-2].minor.yy242, 0); @@ -2598,10 +2595,10 @@ static void yy_reduce( if( yygotominor.yy242 ) yygotominor.yy242->op = yymsp[-1].minor.yy372; sqliteExprSpan(yygotominor.yy242, &yymsp[-2].minor.yy242->span, &yymsp[0].minor.yy242->span); } -#line 2603 "ext/sqlite/libsqlite/src/parse.c" +#line 2599 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 197: -#line 585 "ext/sqlite/libsqlite/src/parse.y" + case 197: /* expr ::= expr NOT likeop expr */ +#line 585 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[0].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[-3].minor.yy242, 0); @@ -2610,131 +2607,131 @@ static void yy_reduce( yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,&yymsp[0].minor.yy242->span); } -#line 2615 "ext/sqlite/libsqlite/src/parse.c" +#line 2611 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 198: -#line 594 "ext/sqlite/libsqlite/src/parse.y" + case 198: /* likeop ::= LIKE */ +#line 594 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_LIKE;} -#line 2620 "ext/sqlite/libsqlite/src/parse.c" +#line 2616 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 199: -#line 595 "ext/sqlite/libsqlite/src/parse.y" + case 199: /* likeop ::= GLOB */ +#line 595 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy372 = TK_GLOB;} -#line 2625 "ext/sqlite/libsqlite/src/parse.c" +#line 2621 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 200: -#line 596 "ext/sqlite/libsqlite/src/parse.y" + case 200: /* expr ::= expr PLUS expr */ +#line 596 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_PLUS, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2630 "ext/sqlite/libsqlite/src/parse.c" +#line 2626 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 201: -#line 597 "ext/sqlite/libsqlite/src/parse.y" + case 201: /* expr ::= expr MINUS expr */ +#line 597 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_MINUS, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2635 "ext/sqlite/libsqlite/src/parse.c" +#line 2631 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 202: -#line 598 "ext/sqlite/libsqlite/src/parse.y" + case 202: /* expr ::= expr STAR expr */ +#line 598 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_STAR, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2640 "ext/sqlite/libsqlite/src/parse.c" +#line 2636 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 203: -#line 599 "ext/sqlite/libsqlite/src/parse.y" + case 203: /* expr ::= expr SLASH expr */ +#line 599 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_SLASH, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2645 "ext/sqlite/libsqlite/src/parse.c" +#line 2641 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 204: -#line 600 "ext/sqlite/libsqlite/src/parse.y" + case 204: /* expr ::= expr REM expr */ +#line 600 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_REM, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2650 "ext/sqlite/libsqlite/src/parse.c" +#line 2646 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 205: -#line 601 "ext/sqlite/libsqlite/src/parse.y" + case 205: /* expr ::= expr CONCAT expr */ +#line 601 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy242 = sqliteExpr(TK_CONCAT, yymsp[-2].minor.yy242, yymsp[0].minor.yy242, 0);} -#line 2655 "ext/sqlite/libsqlite/src/parse.c" +#line 2651 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 206: -#line 602 "ext/sqlite/libsqlite/src/parse.y" + case 206: /* expr ::= expr ISNULL */ +#line 602 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_ISNULL, yymsp[-1].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2663 "ext/sqlite/libsqlite/src/parse.c" +#line 2659 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 207: -#line 606 "ext/sqlite/libsqlite/src/parse.y" + case 207: /* expr ::= expr IS NULL */ +#line 606 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_ISNULL, yymsp[-2].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2671 "ext/sqlite/libsqlite/src/parse.c" +#line 2667 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 208: -#line 610 "ext/sqlite/libsqlite/src/parse.y" + case 208: /* expr ::= expr NOTNULL */ +#line 610 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOTNULL, yymsp[-1].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2679 "ext/sqlite/libsqlite/src/parse.c" +#line 2675 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 209: -#line 614 "ext/sqlite/libsqlite/src/parse.y" + case 209: /* expr ::= expr NOT NULL */ +#line 614 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOTNULL, yymsp[-2].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2687 "ext/sqlite/libsqlite/src/parse.c" +#line 2683 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 210: -#line 618 "ext/sqlite/libsqlite/src/parse.y" + case 210: /* expr ::= expr IS NOT NULL */ +#line 618 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOTNULL, yymsp[-3].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2695 "ext/sqlite/libsqlite/src/parse.c" +#line 2691 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 211: -#line 622 "ext/sqlite/libsqlite/src/parse.y" + case 211: /* expr ::= NOT expr */ +#line 622 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_NOT, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 2703 "ext/sqlite/libsqlite/src/parse.c" +#line 2699 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 212: -#line 626 "ext/sqlite/libsqlite/src/parse.y" + case 212: /* expr ::= BITNOT expr */ +#line 626 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_BITNOT, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 2711 "ext/sqlite/libsqlite/src/parse.c" +#line 2707 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 213: -#line 630 "ext/sqlite/libsqlite/src/parse.y" + case 213: /* expr ::= MINUS expr */ +#line 630 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_UMINUS, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 2719 "ext/sqlite/libsqlite/src/parse.c" +#line 2715 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 214: -#line 634 "ext/sqlite/libsqlite/src/parse.y" + case 214: /* expr ::= PLUS expr */ +#line 634 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_UPLUS, yymsp[0].minor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy242->span); } -#line 2727 "ext/sqlite/libsqlite/src/parse.c" +#line 2723 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 215: -#line 638 "ext/sqlite/libsqlite/src/parse.y" + case 215: /* expr ::= LP select RP */ +#line 638 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_SELECT, 0, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = yymsp[-1].minor.yy179; sqliteExprSpan(yygotominor.yy242,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0); } -#line 2736 "ext/sqlite/libsqlite/src/parse.c" +#line 2732 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 216: -#line 643 "ext/sqlite/libsqlite/src/parse.y" + case 216: /* expr ::= expr BETWEEN expr AND expr */ +#line 643 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[-2].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[0].minor.yy242, 0); @@ -2742,10 +2739,10 @@ static void yy_reduce( if( yygotominor.yy242 ) yygotominor.yy242->pList = pList; sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,&yymsp[0].minor.yy242->span); } -#line 2747 "ext/sqlite/libsqlite/src/parse.c" +#line 2743 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 217: -#line 650 "ext/sqlite/libsqlite/src/parse.y" + case 217: /* expr ::= expr NOT BETWEEN expr AND expr */ +#line 650 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { ExprList *pList = sqliteExprListAppend(0, yymsp[-2].minor.yy242, 0); pList = sqliteExprListAppend(pList, yymsp[0].minor.yy242, 0); @@ -2754,340 +2751,367 @@ static void yy_reduce( yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-5].minor.yy242->span,&yymsp[0].minor.yy242->span); } -#line 2759 "ext/sqlite/libsqlite/src/parse.c" +#line 2755 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 218: -#line 658 "ext/sqlite/libsqlite/src/parse.y" + case 218: /* expr ::= expr IN LP exprlist RP */ +#line 658 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-4].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pList = yymsp[-1].minor.yy322; sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2768 "ext/sqlite/libsqlite/src/parse.c" +#line 2764 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 219: -#line 663 "ext/sqlite/libsqlite/src/parse.y" + case 219: /* expr ::= expr IN LP select RP */ +#line 663 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-4].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = yymsp[-1].minor.yy179; sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2777 "ext/sqlite/libsqlite/src/parse.c" +#line 2773 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 220: -#line 668 "ext/sqlite/libsqlite/src/parse.y" + case 220: /* expr ::= expr NOT IN LP exprlist RP */ +#line 668 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-5].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pList = yymsp[-1].minor.yy322; yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-5].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2787 "ext/sqlite/libsqlite/src/parse.c" +#line 2783 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 221: -#line 674 "ext/sqlite/libsqlite/src/parse.y" + case 221: /* expr ::= expr NOT IN LP select RP */ +#line 674 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-5].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = yymsp[-1].minor.yy179; yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); sqliteExprSpan(yygotominor.yy242,&yymsp[-5].minor.yy242->span,&yymsp[0].minor.yy0); } -#line 2797 "ext/sqlite/libsqlite/src/parse.c" +#line 2793 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 222: -#line 680 "ext/sqlite/libsqlite/src/parse.y" + case 222: /* expr ::= expr IN nm dbnm */ +#line 680 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-1].minor.yy298, &yymsp[0].minor.yy298); + SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-3].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = sqliteSelectNew(0,pSrc,0,0,0,0,0,-1,0); - sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,yymsp[0].minor.yy298.z?&yymsp[0].minor.yy298:&yymsp[-1].minor.yy298); + sqliteExprSpan(yygotominor.yy242,&yymsp[-3].minor.yy242->span,yymsp[0].minor.yy0.z?&yymsp[0].minor.yy0:&yymsp[-1].minor.yy0); } -#line 2807 "ext/sqlite/libsqlite/src/parse.c" +#line 2803 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 223: -#line 686 "ext/sqlite/libsqlite/src/parse.y" + case 223: /* expr ::= expr NOT IN nm dbnm */ +#line 686 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-1].minor.yy298, &yymsp[0].minor.yy298); + SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); yygotominor.yy242 = sqliteExpr(TK_IN, yymsp[-4].minor.yy242, 0, 0); if( yygotominor.yy242 ) yygotominor.yy242->pSelect = sqliteSelectNew(0,pSrc,0,0,0,0,0,-1,0); yygotominor.yy242 = sqliteExpr(TK_NOT, yygotominor.yy242, 0, 0); - sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,yymsp[0].minor.yy298.z?&yymsp[0].minor.yy298:&yymsp[-1].minor.yy298); + sqliteExprSpan(yygotominor.yy242,&yymsp[-4].minor.yy242->span,yymsp[0].minor.yy0.z?&yymsp[0].minor.yy0:&yymsp[-1].minor.yy0); } -#line 2818 "ext/sqlite/libsqlite/src/parse.c" +#line 2814 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 224: -#line 696 "ext/sqlite/libsqlite/src/parse.y" + case 224: /* expr ::= CASE case_operand case_exprlist case_else END */ +#line 696 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_CASE, yymsp[-3].minor.yy242, yymsp[-1].minor.yy242, 0); if( yygotominor.yy242 ) yygotominor.yy242->pList = yymsp[-2].minor.yy322; sqliteExprSpan(yygotominor.yy242, &yymsp[-4].minor.yy0, &yymsp[0].minor.yy0); } -#line 2827 "ext/sqlite/libsqlite/src/parse.c" +#line 2823 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 225: -#line 703 "ext/sqlite/libsqlite/src/parse.y" + case 225: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */ +#line 703 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(yymsp[-4].minor.yy322, yymsp[-2].minor.yy242, 0); yygotominor.yy322 = sqliteExprListAppend(yygotominor.yy322, yymsp[0].minor.yy242, 0); } -#line 2835 "ext/sqlite/libsqlite/src/parse.c" +#line 2831 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 226: -#line 707 "ext/sqlite/libsqlite/src/parse.y" + case 226: /* case_exprlist ::= WHEN expr THEN expr */ +#line 707 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy322 = sqliteExprListAppend(0, yymsp[-2].minor.yy242, 0); yygotominor.yy322 = sqliteExprListAppend(yygotominor.yy322, yymsp[0].minor.yy242, 0); } -#line 2843 "ext/sqlite/libsqlite/src/parse.c" +#line 2839 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 235: -#line 732 "ext/sqlite/libsqlite/src/parse.y" + case 235: /* cmd ::= CREATE uniqueflag INDEX nm ON nm dbnm LP idxlist RP onconf */ +#line 732 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-5].minor.yy298, &yymsp[-4].minor.yy298); + SrcList *pSrc = sqliteSrcListAppend(0, &yymsp[-5].minor.yy0, &yymsp[-4].minor.yy0); if( yymsp[-9].minor.yy372!=OE_None ) yymsp[-9].minor.yy372 = yymsp[0].minor.yy372; if( yymsp[-9].minor.yy372==OE_Default) yymsp[-9].minor.yy372 = OE_Abort; - sqliteCreateIndex(pParse, &yymsp[-7].minor.yy298, pSrc, yymsp[-2].minor.yy320, yymsp[-9].minor.yy372, &yymsp[-10].minor.yy0, &yymsp[-1].minor.yy0); + sqliteCreateIndex(pParse, &yymsp[-7].minor.yy0, pSrc, yymsp[-2].minor.yy320, yymsp[-9].minor.yy372, &yymsp[-10].minor.yy0, &yymsp[-1].minor.yy0); } -#line 2853 "ext/sqlite/libsqlite/src/parse.c" +#line 2849 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 237: -#line 741 "ext/sqlite/libsqlite/src/parse.y" + case 237: /* uniqueflag ::= */ +#line 741 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = OE_None; } -#line 2858 "ext/sqlite/libsqlite/src/parse.c" +#line 2854 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 243: -#line 758 "ext/sqlite/libsqlite/src/parse.y" + case 243: /* cmd ::= DROP INDEX nm dbnm */ +#line 758 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteDropIndex(pParse, sqliteSrcListAppend(0,&yymsp[-1].minor.yy298,&yymsp[0].minor.yy298)); + sqliteDropIndex(pParse, sqliteSrcListAppend(0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0)); } -#line 2865 "ext/sqlite/libsqlite/src/parse.c" +#line 2861 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 244: -#line 766 "ext/sqlite/libsqlite/src/parse.y" -{sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-6].minor.yy298,&yymsp[-5].minor.yy298),&yymsp[-3].minor.yy298,&yymsp[0].minor.yy0,yymsp[-7].minor.yy372);} -#line 2870 "ext/sqlite/libsqlite/src/parse.c" + case 244: /* cmd ::= COPY orconf nm dbnm FROM nm USING DELIMITERS STRING */ +#line 766 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-6].minor.yy0,&yymsp[-5].minor.yy0),&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0,yymsp[-7].minor.yy372);} +#line 2866 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 245: -#line 768 "ext/sqlite/libsqlite/src/parse.y" -{sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-3].minor.yy298,&yymsp[-2].minor.yy298),&yymsp[0].minor.yy298,0,yymsp[-4].minor.yy372);} -#line 2875 "ext/sqlite/libsqlite/src/parse.c" + case 245: /* cmd ::= COPY orconf nm dbnm FROM nm */ +#line 768 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteCopy(pParse,sqliteSrcListAppend(0,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0),&yymsp[0].minor.yy0,0,yymsp[-4].minor.yy372);} +#line 2871 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 246: -#line 772 "ext/sqlite/libsqlite/src/parse.y" + case 246: /* cmd ::= VACUUM */ +#line 772 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {sqliteVacuum(pParse,0);} -#line 2880 "ext/sqlite/libsqlite/src/parse.c" - break; - case 247: -#line 773 "ext/sqlite/libsqlite/src/parse.y" -{sqliteVacuum(pParse,&yymsp[0].minor.yy298);} -#line 2885 "ext/sqlite/libsqlite/src/parse.c" - break; - case 248: - case 250: -#line 777 "ext/sqlite/libsqlite/src/parse.y" -{sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy298,0);} -#line 2891 "ext/sqlite/libsqlite/src/parse.c" - break; - case 249: -#line 778 "ext/sqlite/libsqlite/src/parse.y" -{sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy0,0);} -#line 2896 "ext/sqlite/libsqlite/src/parse.c" - break; - case 251: -#line 780 "ext/sqlite/libsqlite/src/parse.y" -{sqlitePragma(pParse,&yymsp[-2].minor.yy298,&yymsp[0].minor.yy298,1);} -#line 2901 "ext/sqlite/libsqlite/src/parse.c" - break; - case 252: -#line 781 "ext/sqlite/libsqlite/src/parse.y" -{sqlitePragma(pParse,&yymsp[-3].minor.yy298,&yymsp[-1].minor.yy298,0);} -#line 2906 "ext/sqlite/libsqlite/src/parse.c" - break; - case 253: -#line 782 "ext/sqlite/libsqlite/src/parse.y" -{sqlitePragma(pParse,&yymsp[0].minor.yy298,&yymsp[0].minor.yy298,0);} -#line 2911 "ext/sqlite/libsqlite/src/parse.c" - break; - case 260: -#line 792 "ext/sqlite/libsqlite/src/parse.y" +#line 2876 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 247: /* cmd ::= VACUUM nm */ +#line 773 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqliteVacuum(pParse,&yymsp[0].minor.yy0);} +#line 2881 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 248: /* cmd ::= PRAGMA ids EQ nm */ + case 249: /* cmd ::= PRAGMA ids EQ ON */ yytestcase(yyruleno==249); + case 250: /* cmd ::= PRAGMA ids EQ plus_num */ yytestcase(yyruleno==250); +#line 777 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqlitePragma(pParse,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);} +#line 2888 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 251: /* cmd ::= PRAGMA ids EQ minus_num */ +#line 780 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqlitePragma(pParse,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);} +#line 2893 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 252: /* cmd ::= PRAGMA ids LP nm RP */ +#line 781 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqlitePragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);} +#line 2898 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 253: /* cmd ::= PRAGMA ids */ +#line 782 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{sqlitePragma(pParse,&yymsp[0].minor.yy0,&yymsp[0].minor.yy0,0);} +#line 2903 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 260: /* cmd ::= CREATE trigger_decl BEGIN trigger_cmd_list END */ +#line 792 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { Token all; all.z = yymsp[-4].minor.yy0.z; all.n = (yymsp[0].minor.yy0.z - yymsp[-4].minor.yy0.z) + yymsp[0].minor.yy0.n; sqliteFinishTrigger(pParse, yymsp[-1].minor.yy19, &all); } -#line 2921 "ext/sqlite/libsqlite/src/parse.c" +#line 2913 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 261: -#line 800 "ext/sqlite/libsqlite/src/parse.y" + case 261: /* trigger_decl ::= temp TRIGGER nm trigger_time trigger_event ON nm dbnm foreach_clause when_clause */ +#line 800 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - SrcList *pTab = sqliteSrcListAppend(0, &yymsp[-3].minor.yy298, &yymsp[-2].minor.yy298); - sqliteBeginTrigger(pParse, &yymsp[-7].minor.yy298, yymsp[-6].minor.yy372, yymsp[-5].minor.yy290.a, yymsp[-5].minor.yy290.b, pTab, yymsp[-1].minor.yy372, yymsp[0].minor.yy182, yymsp[-9].minor.yy372); + SrcList *pTab = sqliteSrcListAppend(0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0); + sqliteBeginTrigger(pParse, &yymsp[-7].minor.yy0, yymsp[-6].minor.yy372, yymsp[-5].minor.yy290.a, yymsp[-5].minor.yy290.b, pTab, yymsp[-1].minor.yy372, yymsp[0].minor.yy182, yymsp[-9].minor.yy372); } -#line 2929 "ext/sqlite/libsqlite/src/parse.c" +#line 2921 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 262: - case 265: -#line 806 "ext/sqlite/libsqlite/src/parse.y" + case 262: /* trigger_time ::= BEFORE */ + case 265: /* trigger_time ::= */ yytestcase(yyruleno==265); +#line 806 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_BEFORE; } -#line 2935 "ext/sqlite/libsqlite/src/parse.c" +#line 2927 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 263: -#line 807 "ext/sqlite/libsqlite/src/parse.y" + case 263: /* trigger_time ::= AFTER */ +#line 807 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_AFTER; } -#line 2940 "ext/sqlite/libsqlite/src/parse.c" +#line 2932 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 264: -#line 808 "ext/sqlite/libsqlite/src/parse.y" + case 264: /* trigger_time ::= INSTEAD OF */ +#line 808 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_INSTEAD;} -#line 2945 "ext/sqlite/libsqlite/src/parse.c" +#line 2937 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 266: -#line 813 "ext/sqlite/libsqlite/src/parse.y" + case 266: /* trigger_event ::= DELETE */ +#line 813 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy290.a = TK_DELETE; yygotominor.yy290.b = 0; } -#line 2950 "ext/sqlite/libsqlite/src/parse.c" +#line 2942 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 267: -#line 814 "ext/sqlite/libsqlite/src/parse.y" + case 267: /* trigger_event ::= INSERT */ +#line 814 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy290.a = TK_INSERT; yygotominor.yy290.b = 0; } -#line 2955 "ext/sqlite/libsqlite/src/parse.c" +#line 2947 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 268: -#line 815 "ext/sqlite/libsqlite/src/parse.y" + case 268: /* trigger_event ::= UPDATE */ +#line 815 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy290.a = TK_UPDATE; yygotominor.yy290.b = 0;} -#line 2960 "ext/sqlite/libsqlite/src/parse.c" +#line 2952 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 269: -#line 816 "ext/sqlite/libsqlite/src/parse.y" + case 269: /* trigger_event ::= UPDATE OF inscollist */ +#line 816 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy290.a = TK_UPDATE; yygotominor.yy290.b = yymsp[0].minor.yy320; } -#line 2965 "ext/sqlite/libsqlite/src/parse.c" +#line 2957 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 270: - case 271: -#line 819 "ext/sqlite/libsqlite/src/parse.y" + case 270: /* foreach_clause ::= */ + case 271: /* foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==271); +#line 819 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_ROW; } -#line 2971 "ext/sqlite/libsqlite/src/parse.c" +#line 2963 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 272: -#line 821 "ext/sqlite/libsqlite/src/parse.y" + case 272: /* foreach_clause ::= FOR EACH STATEMENT */ +#line 821 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy372 = TK_STATEMENT; } -#line 2976 "ext/sqlite/libsqlite/src/parse.c" +#line 2968 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 273: -#line 824 "ext/sqlite/libsqlite/src/parse.y" + case 273: /* when_clause ::= */ +#line 824 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy182 = 0; } -#line 2981 "ext/sqlite/libsqlite/src/parse.c" +#line 2973 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 274: -#line 825 "ext/sqlite/libsqlite/src/parse.y" + case 274: /* when_clause ::= WHEN expr */ +#line 825 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy182 = yymsp[0].minor.yy242; } -#line 2986 "ext/sqlite/libsqlite/src/parse.c" +#line 2978 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 275: -#line 829 "ext/sqlite/libsqlite/src/parse.y" + case 275: /* trigger_cmd_list ::= trigger_cmd SEMI trigger_cmd_list */ +#line 829 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yymsp[-2].minor.yy19->pNext = yymsp[0].minor.yy19; yygotominor.yy19 = yymsp[-2].minor.yy19; } -#line 2994 "ext/sqlite/libsqlite/src/parse.c" +#line 2986 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 276: -#line 833 "ext/sqlite/libsqlite/src/parse.y" + case 276: /* trigger_cmd_list ::= */ +#line 833 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy19 = 0; } -#line 2999 "ext/sqlite/libsqlite/src/parse.c" - break; - case 277: -#line 839 "ext/sqlite/libsqlite/src/parse.y" -{ yygotominor.yy19 = sqliteTriggerUpdateStep(&yymsp[-3].minor.yy298, yymsp[-1].minor.yy322, yymsp[0].minor.yy242, yymsp[-4].minor.yy372); } -#line 3004 "ext/sqlite/libsqlite/src/parse.c" - break; - case 278: -#line 844 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy19 = sqliteTriggerInsertStep(&yymsp[-5].minor.yy298, yymsp[-4].minor.yy320, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy372);} -#line 3009 "ext/sqlite/libsqlite/src/parse.c" - break; - case 279: -#line 847 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy19 = sqliteTriggerInsertStep(&yymsp[-2].minor.yy298, yymsp[-1].minor.yy320, 0, yymsp[0].minor.yy179, yymsp[-4].minor.yy372);} -#line 3014 "ext/sqlite/libsqlite/src/parse.c" - break; - case 280: -#line 851 "ext/sqlite/libsqlite/src/parse.y" -{yygotominor.yy19 = sqliteTriggerDeleteStep(&yymsp[-1].minor.yy298, yymsp[0].minor.yy242);} -#line 3019 "ext/sqlite/libsqlite/src/parse.c" - break; - case 281: -#line 854 "ext/sqlite/libsqlite/src/parse.y" +#line 2991 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 277: /* trigger_cmd ::= UPDATE orconf nm SET setlist where_opt */ +#line 839 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ yygotominor.yy19 = sqliteTriggerUpdateStep(&yymsp[-3].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy242, yymsp[-4].minor.yy372); } +#line 2996 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 278: /* trigger_cmd ::= insert_cmd INTO nm inscollist_opt VALUES LP itemlist RP */ +#line 844 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy19 = sqliteTriggerInsertStep(&yymsp[-5].minor.yy0, yymsp[-4].minor.yy320, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy372);} +#line 3001 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 279: /* trigger_cmd ::= insert_cmd INTO nm inscollist_opt select */ +#line 847 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy19 = sqliteTriggerInsertStep(&yymsp[-2].minor.yy0, yymsp[-1].minor.yy320, 0, yymsp[0].minor.yy179, yymsp[-4].minor.yy372);} +#line 3006 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 280: /* trigger_cmd ::= DELETE FROM nm where_opt */ +#line 851 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{yygotominor.yy19 = sqliteTriggerDeleteStep(&yymsp[-1].minor.yy0, yymsp[0].minor.yy242);} +#line 3011 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + case 281: /* trigger_cmd ::= select */ +#line 854 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" {yygotominor.yy19 = sqliteTriggerSelectStep(yymsp[0].minor.yy179); } -#line 3024 "ext/sqlite/libsqlite/src/parse.c" +#line 3016 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 282: -#line 857 "ext/sqlite/libsqlite/src/parse.y" + case 282: /* expr ::= RAISE LP IGNORE RP */ +#line 857 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, 0); yygotominor.yy242->iColumn = OE_Ignore; sqliteExprSpan(yygotominor.yy242, &yymsp[-3].minor.yy0, &yymsp[0].minor.yy0); } -#line 3033 "ext/sqlite/libsqlite/src/parse.c" +#line 3025 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 283: -#line 862 "ext/sqlite/libsqlite/src/parse.y" + case 283: /* expr ::= RAISE LP ROLLBACK COMMA nm RP */ +#line 862 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy298); + yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); yygotominor.yy242->iColumn = OE_Rollback; sqliteExprSpan(yygotominor.yy242, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3042 "ext/sqlite/libsqlite/src/parse.c" +#line 3034 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 284: -#line 867 "ext/sqlite/libsqlite/src/parse.y" + case 284: /* expr ::= RAISE LP ABORT COMMA nm RP */ +#line 867 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy298); + yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); yygotominor.yy242->iColumn = OE_Abort; sqliteExprSpan(yygotominor.yy242, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3051 "ext/sqlite/libsqlite/src/parse.c" +#line 3043 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 285: -#line 872 "ext/sqlite/libsqlite/src/parse.y" + case 285: /* expr ::= RAISE LP FAIL COMMA nm RP */ +#line 872 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy298); + yygotominor.yy242 = sqliteExpr(TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); yygotominor.yy242->iColumn = OE_Fail; sqliteExprSpan(yygotominor.yy242, &yymsp[-5].minor.yy0, &yymsp[0].minor.yy0); } -#line 3060 "ext/sqlite/libsqlite/src/parse.c" +#line 3052 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 286: -#line 879 "ext/sqlite/libsqlite/src/parse.y" + case 286: /* cmd ::= DROP TRIGGER nm dbnm */ +#line 879 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteDropTrigger(pParse,sqliteSrcListAppend(0,&yymsp[-1].minor.yy298,&yymsp[0].minor.yy298)); + sqliteDropTrigger(pParse,sqliteSrcListAppend(0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0)); } -#line 3067 "ext/sqlite/libsqlite/src/parse.c" +#line 3059 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 287: -#line 884 "ext/sqlite/libsqlite/src/parse.y" + case 287: /* cmd ::= ATTACH database_kw_opt ids AS nm key_opt */ +#line 884 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteAttach(pParse, &yymsp[-3].minor.yy298, &yymsp[-1].minor.yy298, &yymsp[0].minor.yy298); + sqliteAttach(pParse, &yymsp[-3].minor.yy0, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0); } -#line 3074 "ext/sqlite/libsqlite/src/parse.c" +#line 3066 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 289: -#line 889 "ext/sqlite/libsqlite/src/parse.y" -{ yygotominor.yy298.z = 0; yygotominor.yy298.n = 0; } -#line 3079 "ext/sqlite/libsqlite/src/parse.c" + case 289: /* key_opt ::= */ +#line 889 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" +{ yygotominor.yy0.z = 0; yygotominor.yy0.n = 0; } +#line 3071 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" break; - case 292: -#line 895 "ext/sqlite/libsqlite/src/parse.y" + case 292: /* cmd ::= DETACH database_kw_opt nm */ +#line 895 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" { - sqliteDetach(pParse, &yymsp[0].minor.yy298); -} -#line 3086 "ext/sqlite/libsqlite/src/parse.c" + sqliteDetach(pParse, &yymsp[0].minor.yy0); +} +#line 3078 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" + break; + default: + /* (0) input ::= cmdlist */ yytestcase(yyruleno==0); + /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1); + /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2); + /* (3) ecmd ::= explain cmdx SEMI */ yytestcase(yyruleno==3); + /* (4) ecmd ::= SEMI */ yytestcase(yyruleno==4); + /* (9) trans_opt ::= */ yytestcase(yyruleno==9); + /* (10) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==10); + /* (11) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==11); + /* (15) cmd ::= create_table create_table_args */ yytestcase(yyruleno==15); + /* (21) columnlist ::= columnlist COMMA column */ yytestcase(yyruleno==21); + /* (22) columnlist ::= column */ yytestcase(yyruleno==22); + /* (23) column ::= columnid type carglist */ yytestcase(yyruleno==23); + /* (31) type ::= */ yytestcase(yyruleno==31); + /* (40) carglist ::= carglist carg */ yytestcase(yyruleno==40); + /* (41) carglist ::= */ yytestcase(yyruleno==41); + /* (42) carg ::= CONSTRAINT nm ccons */ yytestcase(yyruleno==42); + /* (43) carg ::= ccons */ yytestcase(yyruleno==43); + /* (52) carg ::= DEFAULT NULL */ yytestcase(yyruleno==52); + /* (53) ccons ::= NULL onconf */ yytestcase(yyruleno==53); + /* (76) conslist_opt ::= */ yytestcase(yyruleno==76); + /* (77) conslist_opt ::= COMMA conslist */ yytestcase(yyruleno==77); + /* (78) conslist ::= conslist COMMA tcons */ yytestcase(yyruleno==78); + /* (79) conslist ::= conslist tcons */ yytestcase(yyruleno==79); + /* (80) conslist ::= tcons */ yytestcase(yyruleno==80); + /* (81) tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==81); + /* (258) plus_opt ::= PLUS */ yytestcase(yyruleno==258); + /* (259) plus_opt ::= */ yytestcase(yyruleno==259); + /* (290) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==290); + /* (291) database_kw_opt ::= */ yytestcase(yyruleno==291); break; }; yygoto = yyRuleInfo[yyruleno].lhs; yysize = yyRuleInfo[yyruleno].nrhs; yypParser->yyidx -= yysize; - yyact = yy_find_reduce_action(yymsp[-yysize].stateno,yygoto); + yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto); if( yyact < YYNSTATE ){ #ifdef NDEBUG /* If we are not debugging and the reduce action popped at least @@ -3097,15 +3121,16 @@ static void yy_reduce( if( yysize ){ yypParser->yyidx++; yymsp -= yysize-1; - yymsp->stateno = yyact; - yymsp->major = yygoto; + yymsp->stateno = (YYACTIONTYPE)yyact; + yymsp->major = (YYCODETYPE)yygoto; yymsp->minor = yygotominor; }else #endif { yy_shift(yypParser,yyact,yygoto,&yygotominor); } - }else if( yyact == YYNSTATE + YYNRULE + 1 ){ + }else{ + assert( yyact == YYNSTATE + YYNRULE + 1 ); yy_accept(yypParser); } } @@ -3113,6 +3138,7 @@ static void yy_reduce( /* ** The following code executes when the parse fails */ +#ifndef YYNOERRORRECOVERY static void yy_parse_failed( yyParser *yypParser /* The parser */ ){ @@ -3127,6 +3153,7 @@ static void yy_parse_failed( ** parser fails */ sqliteParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ } +#endif /* YYNOERRORRECOVERY */ /* ** The following code executes when a syntax error first occurs. @@ -3138,7 +3165,7 @@ static void yy_syntax_error( ){ sqliteParserARG_FETCH; #define TOKEN (yyminor.yy0) -#line 23 "ext/sqlite/libsqlite/src/parse.y" +#line 23 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.y" if( pParse->zErrMsg==0 ){ if( TOKEN.z[0] ){ @@ -3147,7 +3174,7 @@ static void yy_syntax_error( sqliteErrorMsg(pParse, "incomplete SQL statement"); } } -#line 3153 "ext/sqlite/libsqlite/src/parse.c" +#line 3178 "/home/felipe/dev/php5/ext/sqlite/libsqlite/src/parse.c" sqliteParserARG_STORE; /* Suppress warning about unused %extra_argument variable */ } @@ -3197,13 +3224,22 @@ void sqliteParser( YYMINORTYPE yyminorunion; int yyact; /* The parser action. */ int yyendofinput; /* True if we are at the end of input */ +#ifdef YYERRORSYMBOL int yyerrorhit = 0; /* True if yymajor has invoked an error */ +#endif yyParser *yypParser; /* The parser */ /* (re)initialize the parser, if necessary */ yypParser = (yyParser*)yyp; if( yypParser->yyidx<0 ){ - /* if( yymajor==0 ) return; // not sure why this was here... */ +#if YYSTACKDEPTH<=0 + if( yypParser->yystksz <=0 ){ + /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/ + yyminorunion = yyzerominor; + yyStackOverflow(yypParser, &yyminorunion); + return; + } +#endif yypParser->yyidx = 0; yypParser->yyerrcnt = -1; yypParser->yystack[0].stateno = 0; @@ -3220,19 +3256,19 @@ void sqliteParser( #endif do{ - yyact = yy_find_shift_action(yypParser,yymajor); + yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor); if( yyact<YYNSTATE ){ + assert( !yyendofinput ); /* Impossible to shift the $ token */ yy_shift(yypParser,yyact,yymajor,&yyminorunion); yypParser->yyerrcnt--; - if( yyendofinput && yypParser->yyidx>=0 ){ - yymajor = 0; - }else{ - yymajor = YYNOCODE; - } + yymajor = YYNOCODE; }else if( yyact < YYNSTATE + YYNRULE ){ yy_reduce(yypParser,yyact-YYNSTATE); - }else if( yyact == YY_ERROR_ACTION ){ + }else{ + assert( yyact == YY_ERROR_ACTION ); +#ifdef YYERRORSYMBOL int yymx; +#endif #ifndef NDEBUG if( yyTraceFILE ){ fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt); @@ -3269,18 +3305,20 @@ void sqliteParser( yyTracePrompt,yyTokenName[yymajor]); } #endif - yy_destructor(yymajor,&yyminorunion); + yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion); yymajor = YYNOCODE; }else{ while( yypParser->yyidx >= 0 && yymx != YYERRORSYMBOL && - (yyact = yy_find_shift_action(yypParser,YYERRORSYMBOL)) >= YYNSTATE + (yyact = yy_find_reduce_action( + yypParser->yystack[yypParser->yyidx].stateno, + YYERRORSYMBOL)) >= YYNSTATE ){ yy_pop_parser_stack(yypParser); } if( yypParser->yyidx < 0 || yymajor==0 ){ - yy_destructor(yymajor,&yyminorunion); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); yy_parse_failed(yypParser); yymajor = YYNOCODE; }else if( yymx!=YYERRORSYMBOL ){ @@ -3291,6 +3329,18 @@ void sqliteParser( } yypParser->yyerrcnt = 3; yyerrorhit = 1; +#elif defined(YYNOERRORRECOVERY) + /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to + ** do any kind of error recovery. Instead, simply invoke the syntax + ** error routine and continue going as if nothing had happened. + ** + ** Applications can set this macro (for example inside %include) if + ** they intend to abandon the parse upon the first syntax error seen. + */ + yy_syntax_error(yypParser,yymajor,yyminorunion); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); + yymajor = YYNOCODE; + #else /* YYERRORSYMBOL is not defined */ /* This is what we do if the grammar does not define ERROR: ** @@ -3305,15 +3355,12 @@ void sqliteParser( yy_syntax_error(yypParser,yymajor,yyminorunion); } yypParser->yyerrcnt = 3; - yy_destructor(yymajor,&yyminorunion); + yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion); if( yyendofinput ){ yy_parse_failed(yypParser); } yymajor = YYNOCODE; #endif - }else{ - yy_accept(yypParser); - yymajor = YYNOCODE; } }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 ); return; diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c index 07a6d9c0c..4bfa15678 100644 --- a/ext/sqlite/pdo_sqlite2.c +++ b/ext/sqlite/pdo_sqlite2.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlite2.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pdo_sqlite2.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif diff --git a/ext/sqlite/php_sqlite.h b/ext/sqlite/php_sqlite.h index aac75f0d3..69e46d79c 100644 --- a/ext/sqlite/php_sqlite.h +++ b/ext/sqlite/php_sqlite.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: php_sqlite.h 306939 2011-01-01 02:19:59Z felipe $ + $Id: php_sqlite.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SQLITE_H diff --git a/ext/sqlite/sess_sqlite.c b/ext/sqlite/sess_sqlite.c index ca082bcaf..56a9f12eb 100644 --- a/ext/sqlite/sess_sqlite.c +++ b/ext/sqlite/sess_sqlite.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sess_sqlite.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: sess_sqlite.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index f01e0b77a..08ff53b4d 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: sqlite.c 306939 2011-01-01 02:19:59Z felipe $ + $Id: sqlite.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H @@ -1458,7 +1458,7 @@ PHP_MINFO_FUNCTION(sqlite) { php_info_print_table_start(); php_info_print_table_header(2, "SQLite support", "enabled"); - php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c 306939 2011-01-01 02:19:59Z felipe $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c 321634 2012-01-01 13:15:04Z felipe $"); php_info_print_table_row(2, "SQLite Library", sqlite_libversion()); php_info_print_table_row(2, "SQLite Encoding", sqlite_libencoding()); php_info_print_table_end(); diff --git a/ext/sqlite3/php_sqlite3.h b/ext/sqlite3/php_sqlite3.h index db063bca4..c402e6ff9 100644 --- a/ext/sqlite3/php_sqlite3.h +++ b/ext/sqlite3/php_sqlite3.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sqlite3.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sqlite3.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SQLITE3_H #define PHP_SQLITE3_H diff --git a/ext/sqlite3/php_sqlite3_structs.h b/ext/sqlite3/php_sqlite3_structs.h index d08c31db8..41d545b41 100644 --- a/ext/sqlite3/php_sqlite3_structs.h +++ b/ext/sqlite3/php_sqlite3_structs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sqlite3_structs.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sqlite3_structs.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SQLITE_STRUCTS_H #define PHP_SQLITE_STRUCTS_H diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index aa01d89cc..5ec2c2995 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite3.c 314749 2011-08-10 15:30:07Z iliaa $ */ +/* $Id: sqlite3.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/sqlite3/tests/bug53463.phpt b/ext/sqlite3/tests/bug53463.phpt index c9216e660..dcfc13d5b 100644 --- a/ext/sqlite3/tests/bug53463.phpt +++ b/ext/sqlite3/tests/bug53463.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #53463 (sqlite3 columnName() segfaults on bad column_number) +--SKIPIF-- +<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/sqlite3/tests/sqlite3_15_open_error.phpt b/ext/sqlite3/tests/sqlite3_15_open_error.phpt index 49168fd19..f296f8277 100644 --- a/ext/sqlite3/tests/sqlite3_15_open_error.phpt +++ b/ext/sqlite3/tests/sqlite3_15_open_error.phpt @@ -1,7 +1,12 @@ --TEST-- SQLite3::open error test --SKIPIF-- -<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> +<?php +require_once(dirname(__FILE__) . '/skipif.inc'); +if (posix_geteuid() == 0) { + die('SKIP Cannot run test as root.'); +} +?> --FILE-- <?php $unreadable = dirname(__FILE__) . '/unreadable.db'; diff --git a/ext/sqlite3/tests/sqlite3_prepare_001.phpt b/ext/sqlite3/tests/sqlite3_prepare_001.phpt index 7cd4e4ccf..f9e5fadce 100644 --- a/ext/sqlite3/tests/sqlite3_prepare_001.phpt +++ b/ext/sqlite3/tests/sqlite3_prepare_001.phpt @@ -1,5 +1,7 @@ --TEST-- SQLite3 - memory leak on SQLite3Result and SQLite3Stmt +--SKIPIF-- +<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> --FILE-- <?php diff --git a/ext/standard/array.c b/ext/standard/array.c index f0ed03b0c..e0f2f308b 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c 309986 2011-04-06 10:23:06Z aharvey $ */ +/* $Id: array.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_ini.h" diff --git a/ext/standard/assert.c b/ext/standard/assert.c index c0f8cd4b5..8a60eb185 100644 --- a/ext/standard/assert.c +++ b/ext/standard/assert.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: assert.c 311451 2011-05-26 18:17:43Z iliaa $ */ +/* $Id: assert.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes */ #include "php.h" diff --git a/ext/standard/base64.c b/ext/standard/base64.c index 7cd108b36..bee528ad1 100644 --- a/ext/standard/base64.c +++ b/ext/standard/base64.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: base64.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: base64.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <string.h> @@ -153,6 +153,14 @@ PHPAPI unsigned char *php_base64_decode_ex(const unsigned char *str, int length, while ((ch = *current++) != '\0' && length-- > 0) { if (ch == base64_pad) { if (*current != '=' && ((i % 4) == 1 || (strict && length > 0))) { + if ((i % 4) != 1) { + while (isspace(*(++current))) { + continue; + } + if (*current == '\0') { + continue; + } + } efree(result); return NULL; } diff --git a/ext/standard/base64.h b/ext/standard/base64.h index 33ce1cb30..841ffcdd9 100644 --- a/ext/standard/base64.h +++ b/ext/standard/base64.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: base64.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: base64.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef BASE64_H #define BASE64_H diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 6df993858..47b24ac74 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c 314452 2011-08-08 00:47:40Z laruence $ */ +/* $Id: basic_functions.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_streams.h" @@ -4022,7 +4022,13 @@ PHP_FUNCTION(getenv) ptr = emalloc(size); size = GetEnvironmentVariableA(str, ptr, size); - RETURN_STRING(ptr, 0); + if (size == 0) { + /* has been removed between the two calls */ + efree(ptr); + RETURN_EMPTY_STRING(); + } else { + RETURN_STRING(ptr, 0); + } } #else /* system method returns a const */ @@ -4819,7 +4825,9 @@ PHP_FUNCTION(call_user_method) Z_TYPE_P(object) != IS_STRING ) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Second argument is not an object or class name"); - efree(params); + if (params) { + efree(params); + } RETURN_FALSE; } @@ -5849,7 +5857,6 @@ PHP_FUNCTION(move_uploaded_file) RETURN_FALSE; } - VCWD_UNLINK(new_path); if (VCWD_RENAME(path, new_path) == 0) { successful = 1; #ifndef PHP_WIN32 @@ -6032,6 +6039,10 @@ PHP_FUNCTION(parse_ini_string) RETURN_FALSE; } + if (INT_MAX - str_len < ZEND_MMAP_AHEAD) { + RETVAL_FALSE; + } + /* Set callback function */ if (process_sections) { BG(active_ini_file_section) = NULL; diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 248a4aa53..330c4aae7 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.h 310691 2011-05-01 18:37:20Z cataphract $ */ +/* $Id: basic_functions.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef BASIC_FUNCTIONS_H #define BASIC_FUNCTIONS_H diff --git a/ext/standard/browscap.c b/ext/standard/browscap.c index 68b5c5c8c..18cdf0c5c 100644 --- a/ext/standard/browscap.c +++ b/ext/standard/browscap.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: browscap.c 311764 2011-06-03 09:39:45Z cataphract $ */ +/* $Id: browscap.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_browscap.h" diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c index 4390c42d6..55b491b5e 100644 --- a/ext/standard/crc32.c +++ b/ext/standard/crc32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: crc32.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: crc32.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "basic_functions.h" diff --git a/ext/standard/crc32.h b/ext/standard/crc32.h index 48eb22e70..9f4c0f791 100644 --- a/ext/standard/crc32.h +++ b/ext/standard/crc32.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: crc32.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: crc32.h 321634 2012-01-01 13:15:04Z felipe $ */ /* * This code implements the AUTODIN II polynomial diff --git a/ext/standard/credits.c b/ext/standard/credits.c index d4bf4116b..a4179e5a2 100644 --- a/ext/standard/credits.c +++ b/ext/standard/credits.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: credits.c 311822 2011-06-05 06:57:13Z philip $ */ +/* $Id: credits.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "info.h" diff --git a/ext/standard/credits.h b/ext/standard/credits.h index 2aa2f8c39..153b3d4d1 100644 --- a/ext/standard/credits.h +++ b/ext/standard/credits.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: credits.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: credits.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef CREDITS_H #define CREDITS_H diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index cda330b5d..1692360e3 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: crypt.c 314641 2011-08-09 12:16:58Z laruence $ */ +/* $Id: crypt.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> diff --git a/ext/standard/css.c b/ext/standard/css.c index ad2b2d64e..05bbb7e42 100644 --- a/ext/standard/css.c +++ b/ext/standard/css.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: css.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: css.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "info.h" diff --git a/ext/standard/css.h b/ext/standard/css.h index 8ac13a673..414bdcb0f 100644 --- a/ext/standard/css.h +++ b/ext/standard/css.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: css.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: css.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef CSS_H #define CSS_H diff --git a/ext/standard/cyr_convert.c b/ext/standard/cyr_convert.c index 7547aabfc..8080e78e3 100644 --- a/ext/standard/cyr_convert.c +++ b/ext/standard/cyr_convert.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cyr_convert.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: cyr_convert.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> diff --git a/ext/standard/cyr_convert.h b/ext/standard/cyr_convert.h index fbe514a6e..9770a1e3d 100644 --- a/ext/standard/cyr_convert.h +++ b/ext/standard/cyr_convert.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: cyr_convert.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: cyr_convert.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef CYR_CONVERT_H #define CYR_CONVERT_H diff --git a/ext/standard/datetime.c b/ext/standard/datetime.c index 9881df1fd..6538b1850 100644 --- a/ext/standard/datetime.c +++ b/ext/standard/datetime.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: datetime.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: datetime.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "zend_operators.h" diff --git a/ext/standard/datetime.h b/ext/standard/datetime.h index fae5a9308..e15b84a15 100644 --- a/ext/standard/datetime.h +++ b/ext/standard/datetime.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: datetime.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: datetime.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef DATETIME_H #define DATETIME_H diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 6c93a1981..82b04bde5 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dir.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes/startup/misc */ diff --git a/ext/standard/dl.c b/ext/standard/dl.c index 81b12838d..425ae1a40 100644 --- a/ext/standard/dl.c +++ b/ext/standard/dl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dl.c 311444 2011-05-26 14:37:13Z pajoye $ */ +/* $Id: dl.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "dl.h" diff --git a/ext/standard/dl.h b/ext/standard/dl.h index c60550443..76628efd8 100644 --- a/ext/standard/dl.h +++ b/ext/standard/dl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dl.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: dl.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef DL_H #define DL_H diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 8453ad887..2b974ad70 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c 314766 2011-08-10 17:40:56Z rasmus $ */ +/* $Id: dns.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes */ #include "php.h" diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index a6e5b0a48..e20b19d0a 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -103,6 +103,11 @@ PHP_FUNCTION(dns_check_record) return; } + if (hostname_len == 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Host cannot be empty"); + RETURN_FALSE; + } + if (rectype) { if (!strcasecmp("A", rectype)) type = DNS_TYPE_A; else if (!strcasecmp("NS", rectype)) type = DNS_TYPE_NS; diff --git a/ext/standard/exec.c b/ext/standard/exec.c index efe18e797..d56009f63 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ | Ilia Alshanetsky <iliaa@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: exec.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: exec.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdio.h> #include "php.h" diff --git a/ext/standard/exec.h b/ext/standard/exec.h index a8e809df3..7da109b25 100644 --- a/ext/standard/exec.h +++ b/ext/standard/exec.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: exec.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: exec.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef EXEC_H #define EXEC_H diff --git a/ext/standard/file.c b/ext/standard/file.c index 091eb4390..2fa1ecc6d 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c 312285 2011-06-19 14:50:44Z felipe $ */ +/* $Id: file.c 321634 2012-01-01 13:15:04Z felipe $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -876,7 +876,7 @@ PHP_FUNCTION(tempnam) RETVAL_FALSE; - if ((fd = php_open_temporary_fd(dir, p, &opened_path TSRMLS_CC)) >= 0) { + if ((fd = php_open_temporary_fd_ex(dir, p, &opened_path, 1 TSRMLS_CC)) >= 0) { close(fd); RETVAL_STRING(opened_path, 0); } @@ -2199,7 +2199,7 @@ PHPAPI void php_fgetcsv(php_stream *stream, char delimiter, char enclosure, char inc_len = (bptr < limit ? (*bptr == '\0' ? 1: php_mblen(bptr, limit - bptr)): 0); if (inc_len == 1) { char *tmp = bptr; - while (isspace((int)*(unsigned char *)tmp)) { + while ((*tmp != delimiter) && isspace((int)*(unsigned char *)tmp)) { tmp++; } if (*tmp == enclosure) { diff --git a/ext/standard/file.h b/ext/standard/file.h index b4c0e6287..fd9c51030 100644 --- a/ext/standard/file.h +++ b/ext/standard/file.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: file.h 321634 2012-01-01 13:15:04Z felipe $ */ /* Synced with php 3.0 revision 1.30 1999-06-16 [ssb] */ diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index d961f0e65..bf980a3dd 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filestat.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: filestat.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "safe_mode.h" diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 80ce98f34..5bad4cefe 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filters.c 311407 2011-05-24 23:49:26Z felipe $ */ +/* $Id: filters.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_globals.h" @@ -1897,7 +1897,6 @@ php_stream_filter_factory consumed_filter_factory = { typedef enum _php_chunked_filter_state { CHUNK_SIZE_START, CHUNK_SIZE, - CHUNK_SIZE_EXT_START, CHUNK_SIZE_EXT, CHUNK_SIZE_CR, CHUNK_SIZE_LF, @@ -1937,7 +1936,7 @@ static int php_dechunk(char *buf, int len, php_chunked_filter_data *data) data->state = CHUNK_ERROR; break; } else { - data->state = CHUNK_SIZE_EXT_START; + data->state = CHUNK_SIZE_EXT; break; } data->state = CHUNK_SIZE; @@ -1948,13 +1947,6 @@ static int php_dechunk(char *buf, int len, php_chunked_filter_data *data) } else if (p == end) { return out_len; } - case CHUNK_SIZE_EXT_START: - if (*p == ';'|| *p == '\r' || *p == '\n') { - data->state = CHUNK_SIZE_EXT; - } else { - data->state = CHUNK_ERROR; - continue; - } case CHUNK_SIZE_EXT: /* skip extension */ while (p < end && *p != '\r' && *p != '\n') { diff --git a/ext/standard/flock_compat.c b/ext/standard/flock_compat.c index 2c9bcdb22..4e7a061f2 100644 --- a/ext/standard/flock_compat.c +++ b/ext/standard/flock_compat.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flock_compat.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: flock_compat.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include <errno.h> diff --git a/ext/standard/flock_compat.h b/ext/standard/flock_compat.h index 4d2ac3bb4..d8ff83b4a 100644 --- a/ext/standard/flock_compat.h +++ b/ext/standard/flock_compat.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: flock_compat.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: flock_compat.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef FLOCK_COMPAT_H #define FLOCK_COMPAT_H diff --git a/ext/standard/formatted_print.c b/ext/standard/formatted_print.c index 78663bc5d..a3bbbf2d0 100644 --- a/ext/standard/formatted_print.c +++ b/ext/standard/formatted_print.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: formatted_print.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: formatted_print.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <math.h> /* modf() */ #include "php.h" diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index a7b8c846d..556f83763 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: fsock.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/fsock.h b/ext/standard/fsock.h index 08422c103..dba7e80c6 100644 --- a/ext/standard/fsock.h +++ b/ext/standard/fsock.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fsock.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: fsock.h 321634 2012-01-01 13:15:04Z felipe $ */ /* Synced with php 3.0 revision 1.24 1999-06-18 [ssb] */ diff --git a/ext/standard/ftok.c b/ext/standard/ftok.c index 27eb839b4..133b2a3b3 100644 --- a/ext/standard/ftok.c +++ b/ext/standard/ftok.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftok.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: ftok.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index b8f3fe100..b1e90c834 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: ftp_fopen_wrapper.c 308734 2011-02-27 20:23:54Z cataphract $ */ +/* $Id: ftp_fopen_wrapper.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/head.c b/ext/standard/head.c index 3ad04b04a..2392d7eb0 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: head.c 314486 2011-08-08 12:10:27Z iliaa $ */ +/* $Id: head.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdio.h> #include "php.h" diff --git a/ext/standard/head.h b/ext/standard/head.h index 5458e028a..71f307d3c 100644 --- a/ext/standard/head.h +++ b/ext/standard/head.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: head.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: head.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef HEAD_H #define HEAD_H diff --git a/ext/standard/html.c b/ext/standard/html.c index a65456bf5..d0ed4a26f 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: html.c 321634 2012-01-01 13:15:04Z felipe $ */ /* * HTML entity resources: @@ -1020,8 +1020,8 @@ PHPAPI char *php_unescape_html_entities(unsigned char *old, int oldlen, int *new code = strtol(p + 2, &next, 10); } - if (code == '\'' && !(quote_style & ENT_HTML_QUOTE_SINGLE) || - code == '"' && !(quote_style & ENT_HTML_QUOTE_DOUBLE)) { + if ((code == '\'' && !(quote_style & ENT_HTML_QUOTE_SINGLE)) || + (code == '"' && !(quote_style & ENT_HTML_QUOTE_DOUBLE))) { invalid_code = 1; } diff --git a/ext/standard/html.h b/ext/standard/html.h index 20256a3a5..497bf403a 100644 --- a/ext/standard/html.h +++ b/ext/standard/html.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: html.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef HTML_H #define HTML_H diff --git a/ext/standard/http.c b/ext/standard/http.c index 5ddfbf055..d55de8a58 100644 --- a/ext/standard/http.c +++ b/ext/standard/http.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: http.c 307432 2011-01-13 07:27:46Z stas $ */ +/* $Id: http.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php_http.h" #include "php_ini.h" diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 2fd25e0da..74df28404 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: http_fopen_wrapper.c 314641 2011-08-09 12:16:58Z laruence $ */ +/* $Id: http_fopen_wrapper.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_globals.h" @@ -719,7 +719,10 @@ finish: char *e = http_header_line + http_header_line_length - 1; if (*e != '\n') { do { /* partial header */ - php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length); + if (php_stream_get_line(stream, http_header_line, HTTP_HEADER_BLOCK_SIZE, &http_header_line_length) == NULL) { + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "Failed to read HTTP headers"); + goto out; + } e = http_header_line + http_header_line_length - 1; } while (*e != '\n'); continue; @@ -787,9 +790,6 @@ finish: if (location[0] != '\0') php_stream_notify_info(context, PHP_STREAM_NOTIFY_REDIRECTED, location, 0); - if (context) { /* keep the context for the next try */ - zend_list_addref(context->rsrc_id); - } php_stream_close(stream); stream = NULL; diff --git a/ext/standard/image.c b/ext/standard/image.c index fc17ff67e..201b5f5f7 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: image.c 310980 2011-05-13 05:06:48Z scottmac $ */ +/* $Id: image.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include <stdio.h> diff --git a/ext/standard/incomplete_class.c b/ext/standard/incomplete_class.c index 9e45e4915..2a5988bee 100644 --- a/ext/standard/incomplete_class.c +++ b/ext/standard/incomplete_class.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: incomplete_class.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: incomplete_class.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "basic_functions.h" diff --git a/ext/standard/info.c b/ext/standard/info.c index f7b697773..c46e068d2 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c 313538 2011-07-21 14:49:55Z pajoye $ */ +/* $Id: info.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_ini.h" @@ -626,7 +626,7 @@ PHPAPI void php_print_info_htmlhead(TSRMLS_D) PUTS("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"DTD/xhtml1-transitional.dtd\">\n"); - PUTS("<html>"); + PUTS("<html xmlns=\"http://www.w3.org/1999/xhtml\">"); PUTS("<head>\n"); php_info_print_style(TSRMLS_C); PUTS("<title>phpinfo()</title>"); diff --git a/ext/standard/info.h b/ext/standard/info.h index 977e305e1..ed5a61193 100644 --- a/ext/standard/info.h +++ b/ext/standard/info.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: info.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef INFO_H #define INFO_H diff --git a/ext/standard/iptc.c b/ext/standard/iptc.c index dafbfa5f7..405c1a71d 100644 --- a/ext/standard/iptc.c +++ b/ext/standard/iptc.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iptc.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: iptc.c 321634 2012-01-01 13:15:04Z felipe $ */ /* * Functions to parse & compse IPTC data. diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index 6db3f6fe4..6d63f59e1 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: lcg.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: lcg.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_lcg.h" diff --git a/ext/standard/levenshtein.c b/ext/standard/levenshtein.c index a84b155f8..43d1a14ac 100644 --- a/ext/standard/levenshtein.c +++ b/ext/standard/levenshtein.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Hartmut Holzgraefe <hholzgra@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: levenshtein.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: levenshtein.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include <stdlib.h> diff --git a/ext/standard/link.c b/ext/standard/link.c index 1f8be4c1b..b75441879 100644 --- a/ext/standard/link.c +++ b/ext/standard/link.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: link.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: link.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_filestat.h" diff --git a/ext/standard/link_win32.c b/ext/standard/link_win32.c index 37a5fd252..2d1723941 100644 --- a/ext/standard/link_win32.c +++ b/ext/standard/link_win32.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: link_win32.c 313176 2011-07-12 15:15:17Z pajoye $ */ +/* $Id: link_win32.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef PHP_WIN32 #include "php.h" diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 984b84e37..8258e1150 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: mail.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> #include <ctype.h> diff --git a/ext/standard/math.c b/ext/standard/math.c index b656fafae..4651b21fd 100644 --- a/ext/standard/math.c +++ b/ext/standard/math.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: math.c 312074 2011-06-12 00:56:18Z cataphract $ */ +/* $Id: math.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_math.h" diff --git a/ext/standard/md5.c b/ext/standard/md5.c index b9c9b3ab8..8ceeed8cf 100644 --- a/ext/standard/md5.c +++ b/ext/standard/md5.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: md5.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: md5.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "md5.h" diff --git a/ext/standard/md5.h b/ext/standard/md5.h index 6ffbc2fca..508b493fb 100644 --- a/ext/standard/md5.h +++ b/ext/standard/md5.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: md5.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: md5.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MD5_H #define MD5_H diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c index 468f26758..4774b7ca4 100644 --- a/ext/standard/metaphone.c +++ b/ext/standard/metaphone.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: metaphone.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: metaphone.c 321634 2012-01-01 13:15:04Z felipe $ */ /* Based on CPANs "Text-Metaphone-1.96" by Michael G Schwern <schwern@pobox.com> diff --git a/ext/standard/microtime.c b/ext/standard/microtime.c index 92248a22e..897a14e20 100644 --- a/ext/standard/microtime.c +++ b/ext/standard/microtime.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: microtime.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/standard/microtime.h b/ext/standard/microtime.h index b0019dbf9..7a1c8825d 100644 --- a/ext/standard/microtime.h +++ b/ext/standard/microtime.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: microtime.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: microtime.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef MICROTIME_H #define MICROTIME_H diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 9eca312a6..8bc95fc7c 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Chris Schneider <cschneid@relog.ch> | +----------------------------------------------------------------------+ */ -/* $Id: pack.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pack.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/standard/pack.h b/ext/standard/pack.h index 81c96dc9d..5ed9c5e4b 100644 --- a/ext/standard/pack.h +++ b/ext/standard/pack.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pack.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pack.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PACK_H #define PACK_H diff --git a/ext/standard/pageinfo.c b/ext/standard/pageinfo.c index 09182dd7e..6fe112b36 100644 --- a/ext/standard/pageinfo.c +++ b/ext/standard/pageinfo.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pageinfo.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pageinfo.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "pageinfo.h" diff --git a/ext/standard/pageinfo.h b/ext/standard/pageinfo.h index 672179503..bc6528346 100644 --- a/ext/standard/pageinfo.h +++ b/ext/standard/pageinfo.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pageinfo.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: pageinfo.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PAGEINFO_H #define PAGEINFO_H diff --git a/ext/standard/php_array.h b/ext/standard/php_array.h index ddd267096..dd4ae69ed 100644 --- a/ext/standard/php_array.h +++ b/ext/standard/php_array.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_array.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_array.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ARRAY_H #define PHP_ARRAY_H diff --git a/ext/standard/php_assert.h b/ext/standard/php_assert.h index 6cc5d76d3..5a61b515c 100644 --- a/ext/standard/php_assert.h +++ b/ext/standard/php_assert.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_assert.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_assert.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ASSERT_H #define PHP_ASSERT_H diff --git a/ext/standard/php_browscap.h b/ext/standard/php_browscap.h index 523b2de13..5efd371a3 100644 --- a/ext/standard/php_browscap.h +++ b/ext/standard/php_browscap.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_browscap.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_browscap.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_BROWSCAP_H #define PHP_BROWSCAP_H diff --git a/ext/standard/php_crypt.h b/ext/standard/php_crypt.h index 02c6d564d..9d5805f39 100644 --- a/ext/standard/php_crypt.h +++ b/ext/standard/php_crypt.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_crypt.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_crypt.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_CRYPT_H #define PHP_CRYPT_H diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index 86076e8bf..e8d59b99a 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -1,9 +1,9 @@ -/* $Id: php_crypt_r.c 315338 2011-08-23 08:09:55Z johannes $ */ +/* $Id: php_crypt_r.c 321634 2012-01-01 13:15:04Z felipe $ */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -94,8 +94,7 @@ void _crypt_extended_init_r(void) if (!initialized) { #ifdef PHP_WIN32 InterlockedIncrement(&initialized); -#elif (defined(__GNUC__) && !defined(__hpux) && (__GNUC__ > 4 || \ - (__GNUC__ == 4 && (__GNUC_MINOR__ > 1 || (__GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ > 1))))) +#elif defined(HAVE_SYNC_FETCH_AND_ADD) __sync_fetch_and_add(&initialized, 1); #elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ membar_producer(); diff --git a/ext/standard/php_crypt_r.h b/ext/standard/php_crypt_r.h index f153ac322..06f269987 100644 --- a/ext/standard/php_crypt_r.h +++ b/ext/standard/php_crypt_r.h @@ -1,9 +1,9 @@ -/* $Id: php_crypt_r.h 313406 2011-07-18 21:26:29Z pajoye $ */ +/* $Id: php_crypt_r.h 321634 2012-01-01 13:15:04Z felipe $ */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/standard/php_dir.h b/ext/standard/php_dir.h index a76615300..98cd5f932 100644 --- a/ext/standard/php_dir.h +++ b/ext/standard/php_dir.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dir.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_dir.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_DIR_H #define PHP_DIR_H diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h index e24caf538..0f015d1ce 100644 --- a/ext/standard/php_dns.h +++ b/ext/standard/php_dns.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dns.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_dns.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_DNS_H #define PHP_DNS_H diff --git a/ext/standard/php_ext_syslog.h b/ext/standard/php_ext_syslog.h index cf697593a..988f47942 100644 --- a/ext/standard/php_ext_syslog.h +++ b/ext/standard/php_ext_syslog.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ext_syslog.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_ext_syslog.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_EXT_SYSLOG_H #define PHP_EXT_SYSLOG_H diff --git a/ext/standard/php_filestat.h b/ext/standard/php_filestat.h index 6103f2cb9..f1b894d4f 100644 --- a/ext/standard/php_filestat.h +++ b/ext/standard/php_filestat.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filestat.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_filestat.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_FILESTAT_H #define PHP_FILESTAT_H diff --git a/ext/standard/php_fopen_wrapper.c b/ext/standard/php_fopen_wrapper.c index 1360bab6c..999bc1f13 100644 --- a/ext/standard/php_fopen_wrapper.c +++ b/ext/standard/php_fopen_wrapper.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ | Hartmut Holzgraefe <hholzgra@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: php_fopen_wrapper.c 307536 2011-01-17 13:44:54Z iliaa $ */ +/* $Id: php_fopen_wrapper.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdio.h> #include <stdlib.h> diff --git a/ext/standard/php_fopen_wrappers.h b/ext/standard/php_fopen_wrappers.h index 96beaea30..0d53bfa19 100644 --- a/ext/standard/php_fopen_wrappers.h +++ b/ext/standard/php_fopen_wrappers.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_fopen_wrappers.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_fopen_wrappers.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_FOPEN_WRAPPERS_H #define PHP_FOPEN_WRAPPERS_H diff --git a/ext/standard/php_ftok.h b/ext/standard/php_ftok.h index 51860c809..b2b7a14a0 100644 --- a/ext/standard/php_ftok.h +++ b/ext/standard/php_ftok.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ftok.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_ftok.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_FTOK_H #define PHP_FTOK_H diff --git a/ext/standard/php_http.h b/ext/standard/php_http.h index 7330248c0..29279cb5f 100644 --- a/ext/standard/php_http.h +++ b/ext/standard/php_http.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_http.h 307432 2011-01-13 07:27:46Z stas $ */ +/* $Id: php_http.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_HTTP_H #define PHP_HTTP_H diff --git a/ext/standard/php_image.h b/ext/standard/php_image.h index ed52ec9c7..c2f8f3347 100644 --- a/ext/standard/php_image.h +++ b/ext/standard/php_image.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_image.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_image.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_IMAGE_H #define PHP_IMAGE_H diff --git a/ext/standard/php_incomplete_class.h b/ext/standard/php_incomplete_class.h index ed52210c2..e1faf3e13 100644 --- a/ext/standard/php_incomplete_class.h +++ b/ext/standard/php_incomplete_class.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_incomplete_class.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_incomplete_class.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_INCOMPLETE_CLASS_H #define PHP_INCOMPLETE_CLASS_H diff --git a/ext/standard/php_iptc.h b/ext/standard/php_iptc.h index 859ad6862..981cc7f49 100644 --- a/ext/standard/php_iptc.h +++ b/ext/standard/php_iptc.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_iptc.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_iptc.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_IPTC_H #define PHP_IPTC_H diff --git a/ext/standard/php_lcg.h b/ext/standard/php_lcg.h index 7d57d69c2..cead367ab 100644 --- a/ext/standard/php_lcg.h +++ b/ext/standard/php_lcg.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_lcg.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_lcg.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_LCG_H #define PHP_LCG_H diff --git a/ext/standard/php_link.h b/ext/standard/php_link.h index 8126a6304..57bc46a74 100644 --- a/ext/standard/php_link.h +++ b/ext/standard/php_link.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_link.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_link.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_LINK_H #define PHP_LINK_H diff --git a/ext/standard/php_mail.h b/ext/standard/php_mail.h index 8164af8ac..88ba00ac1 100644 --- a/ext/standard/php_mail.h +++ b/ext/standard/php_mail.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mail.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_mail.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MAIL_H #define PHP_MAIL_H diff --git a/ext/standard/php_math.h b/ext/standard/php_math.h index 77fe6540e..2076caf80 100644 --- a/ext/standard/php_math.h +++ b/ext/standard/php_math.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_math.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_math.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_MATH_H #define PHP_MATH_H diff --git a/ext/standard/php_metaphone.h b/ext/standard/php_metaphone.h index 1067e8b77..287b750bf 100644 --- a/ext/standard/php_metaphone.h +++ b/ext/standard/php_metaphone.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_metaphone.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_metaphone.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_METAPHONE_H #define PHP_METAPHONE_H diff --git a/ext/standard/php_rand.h b/ext/standard/php_rand.h index 9a0dceff4..7e66dc22b 100644 --- a/ext/standard/php_rand.h +++ b/ext/standard/php_rand.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -20,7 +20,7 @@ | Based on code from: Shawn Cokus <Cokus@math.washington.edu> | +----------------------------------------------------------------------+ */ -/* $Id: php_rand.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_rand.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_RAND_H #define PHP_RAND_H diff --git a/ext/standard/php_smart_str.h b/ext/standard/php_smart_str.h index 6b4c1a95c..0347be2d9 100644 --- a/ext/standard/php_smart_str.h +++ b/ext/standard/php_smart_str.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_smart_str.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_smart_str.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SMART_STR_H #define PHP_SMART_STR_H diff --git a/ext/standard/php_smart_str_public.h b/ext/standard/php_smart_str_public.h index 98da8b564..fe90c5e62 100644 --- a/ext/standard/php_smart_str_public.h +++ b/ext/standard/php_smart_str_public.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_smart_str_public.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_smart_str_public.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SMART_STR_PUBLIC_H #define PHP_SMART_STR_PUBLIC_H diff --git a/ext/standard/php_standard.h b/ext/standard/php_standard.h index 7595d45ec..9fa04f4e0 100644 --- a/ext/standard/php_standard.h +++ b/ext/standard/php_standard.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_standard.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_standard.h 321634 2012-01-01 13:15:04Z felipe $ */ #include "basic_functions.h" #include "php_math.h" diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 0901ec491..fbc64a13a 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_string.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_string.h 321634 2012-01-01 13:15:04Z felipe $ */ /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */ diff --git a/ext/standard/php_type.h b/ext/standard/php_type.h index c2e5aa90d..f745cc040 100644 --- a/ext/standard/php_type.h +++ b/ext/standard/php_type.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_type.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_type.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_TYPE_H #define PHP_TYPE_H diff --git a/ext/standard/php_uuencode.h b/ext/standard/php_uuencode.h index 7514ced0d..c6a42d78e 100644 --- a/ext/standard/php_uuencode.h +++ b/ext/standard/php_uuencode.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_uuencode.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_uuencode.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_UUENCODE_H #define PHP_UUENCODE_H diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h index 94934183b..771d4876b 100644 --- a/ext/standard/php_var.h +++ b/ext/standard/php_var.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_var.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_var.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_VAR_H #define PHP_VAR_H diff --git a/ext/standard/php_versioning.h b/ext/standard/php_versioning.h index d3e9aee82..7a464f081 100644 --- a/ext/standard/php_versioning.h +++ b/ext/standard/php_versioning.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_versioning.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_versioning.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_VERSIONING_H #define PHP_VERSIONING_H diff --git a/ext/standard/proc_open.c b/ext/standard/proc_open.c index b9411aebc..89109813a 100644 --- a/ext/standard/proc_open.c +++ b/ext/standard/proc_open.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Wez Furlong <wez@thebrainroom.com> | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.c 314641 2011-08-09 12:16:58Z laruence $ */ +/* $Id: proc_open.c 321634 2012-01-01 13:15:04Z felipe $ */ #if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__)) # define _BSD_SOURCE /* linux wants this when XOPEN mode is on */ @@ -451,10 +451,9 @@ PHP_FUNCTION(proc_get_status) /* {{{ handy definitions for portability/readability */ #ifdef PHP_WIN32 -# define pipe(pair) (CreatePipe(&pair[0], &pair[1], &security, 2048L) ? 0 : -1) +# define pipe(pair) (CreatePipe(&pair[0], &pair[1], &security, 0) ? 0 : -1) # define COMSPEC_NT "cmd.exe" -# define COMSPEC_9X "command.com" static inline HANDLE dup_handle(HANDLE src, BOOL inherit, BOOL closeorig) { @@ -800,7 +799,7 @@ PHP_FUNCTION(proc_open) if (bypass_shell) { newprocok = CreateProcess(NULL, command, &security, &security, TRUE, dwCreateFlags, env.envp, cwd, &si, &pi); } else { - spprintf(&command_with_cmd, 0, "%s /c %s", GetVersion() < 0x80000000 ? COMSPEC_NT : COMSPEC_9X, command); + spprintf(&command_with_cmd, 0, "%s /c %s", COMSPEC_NT, command); newprocok = CreateProcess(NULL, command_with_cmd, &security, &security, TRUE, dwCreateFlags, env.envp, cwd, &si, &pi); diff --git a/ext/standard/proc_open.h b/ext/standard/proc_open.h index 3ff92eb73..d870e38b0 100644 --- a/ext/standard/proc_open.h +++ b/ext/standard/proc_open.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Wez Furlong <wez@thebrainroom.com> | +----------------------------------------------------------------------+ */ -/* $Id: proc_open.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: proc_open.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef PHP_WIN32 typedef HANDLE php_file_descriptor_t; diff --git a/ext/standard/quot_print.c b/ext/standard/quot_print.c index e4caaa4f5..cab811812 100644 --- a/ext/standard/quot_print.c +++ b/ext/standard/quot_print.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: quot_print.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: quot_print.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> diff --git a/ext/standard/quot_print.h b/ext/standard/quot_print.h index acbe736de..a01820c2a 100644 --- a/ext/standard/quot_print.h +++ b/ext/standard/quot_print.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: quot_print.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: quot_print.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef QUOT_PRINT_H #define QUOT_PRINT_H diff --git a/ext/standard/rand.c b/ext/standard/rand.c index 2be932046..c2925f817 100644 --- a/ext/standard/rand.c +++ b/ext/standard/rand.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -23,7 +23,7 @@ | Shawn Cokus <Cokus@math.washington.edu> | +----------------------------------------------------------------------+ */ -/* $Id: rand.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: rand.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index 161fd6d26..989cfe404 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: scanf.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: scanf.c 321634 2012-01-01 13:15:04Z felipe $ */ /* scanf.c -- diff --git a/ext/standard/scanf.h b/ext/standard/scanf.h index 0d5858717..b5191f7f2 100644 --- a/ext/standard/scanf.h +++ b/ext/standard/scanf.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: scanf.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: scanf.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SCANF_H #define SCANF_H diff --git a/ext/standard/sha1.c b/ext/standard/sha1.c index 0a9447993..50290303b 100644 --- a/ext/standard/sha1.c +++ b/ext/standard/sha1.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sha1.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: sha1.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/standard/sha1.h b/ext/standard/sha1.h index 9cfef1e64..7f4e67526 100644 --- a/ext/standard/sha1.h +++ b/ext/standard/sha1.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sha1.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: sha1.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef SHA1_H #define SHA1_H diff --git a/ext/standard/soundex.c b/ext/standard/soundex.c index 0096a712c..c6a05480a 100644 --- a/ext/standard/soundex.c +++ b/ext/standard/soundex.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Bjørn Borud - Guardian Networks AS <borud@guardian.no> | +----------------------------------------------------------------------+ */ -/* $Id: soundex.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: soundex.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include <stdlib.h> diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index 3a90b885b..e6ad6ebc1 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c 307922 2011-02-01 18:10:35Z cataphract $ */ +/* $Id: streamsfuncs.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h index 804501e99..aece3d458 100644 --- a/ext/standard/streamsfuncs.h +++ b/ext/standard/streamsfuncs.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: streamsfuncs.h 321634 2012-01-01 13:15:04Z felipe $ */ /* Flags for stream_socket_client */ #define PHP_STREAM_CLIENT_PERSISTENT 1 diff --git a/ext/standard/string.c b/ext/standard/string.c index 9d9e5b3f4..896a54566 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c 310401 2011-04-21 01:51:24Z pierrick $ */ +/* $Id: string.c 321634 2012-01-01 13:15:04Z felipe $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -2336,6 +2336,10 @@ PHP_FUNCTION(substr_replace) RETURN_STRINGL(Z_STRVAL_PP(str), Z_STRLEN_PP(str), 1); } } else { /* str is array of strings */ + char *str_index = NULL; + uint str_index_len; + ulong num_index; + array_init(return_value); if (Z_TYPE_PP(from) == IS_ARRAY) { @@ -2471,7 +2475,13 @@ PHP_FUNCTION(substr_replace) } result[result_len] = '\0'; - add_next_index_stringl(return_value, result, result_len, 0); + + if (zend_hash_get_current_key_ex(Z_ARRVAL_PP(str), &str_index, &str_index_len, &num_index, 0, &pos_str) == HASH_KEY_IS_STRING) { + add_assoc_stringl_ex(return_value, str_index, str_index_len, result, result_len, 0); + } else { + add_index_stringl(return_value, num_index, result, result_len, 0); + } + if(Z_TYPE_PP(tmp_str) != IS_STRING) { zval_dtor(orig_str); } diff --git a/ext/standard/syslog.c b/ext/standard/syslog.c index 4cd54d687..39e01771d 100644 --- a/ext/standard/syslog.c +++ b/ext/standard/syslog.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: syslog.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: syslog.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/standard/tests/array/array_change_key_case_variation8.phpt b/ext/standard/tests/array/array_change_key_case_variation8.phpt index f9893da79..3dc22ce0e 100644 --- a/ext/standard/tests/array/array_change_key_case_variation8.phpt +++ b/ext/standard/tests/array/array_change_key_case_variation8.phpt @@ -1,5 +1,10 @@ --TEST-- Test array_change_key_case() function : usage variations - Different strings as keys +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : array array_change_key_case(array $input [, int $case]) diff --git a/ext/standard/tests/array/arsort_variation5.phpt b/ext/standard/tests/array/arsort_variation5.phpt index e69c26988..55c0882db 100644 --- a/ext/standard/tests/array/arsort_variation5.phpt +++ b/ext/standard/tests/array/arsort_variation5.phpt @@ -1,5 +1,10 @@ --TEST-- -Test arsort() function : usage variations - sort strings +Test arsort() function : usage variations - sort strings +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool arsort ( array &$array [, int $asort_flags] ) @@ -76,8 +81,10 @@ array(12) { string(3) "\cx" ["\a"]=> string(2) "\a" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" [""]=> string(1) "" [""]=> @@ -106,8 +113,10 @@ array(12) { string(3) "\cx" ["\a"]=> string(2) "\a" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" [""]=> string(1) "" [""]=> @@ -136,8 +145,10 @@ array(12) { string(3) "\cx" ["\a"]=> string(2) "\a" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" [""]=> string(1) "" [""]=> diff --git a/ext/standard/tests/array/asort_variation5.phpt b/ext/standard/tests/array/asort_variation5.phpt index faf7a5de5..bb27dd692 100644 --- a/ext/standard/tests/array/asort_variation5.phpt +++ b/ext/standard/tests/array/asort_variation5.phpt @@ -1,5 +1,10 @@ --TEST-- -Test asort() function : usage variations - sort strings +Test asort() function : usage variations - sort strings +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool asort ( array &$array [, int $asort_flags] ) diff --git a/ext/standard/tests/array/krsort_variation5.phpt b/ext/standard/tests/array/krsort_variation5.phpt index 59621654c..0dffc1956 100644 --- a/ext/standard/tests/array/krsort_variation5.phpt +++ b/ext/standard/tests/array/krsort_variation5.phpt @@ -1,5 +1,10 @@ --TEST-- -Test krsort() function : usage variations - sort strings +Test krsort() function : usage variations - sort strings +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool krsort ( array &$array [, int $sort_flags] ) @@ -76,8 +81,10 @@ array(11) { string(3) "\cx" ["\a"]=> string(2) "\a" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" [""]=> string(1) "" [""]=> @@ -104,8 +111,10 @@ array(11) { string(3) "\cx" ["\a"]=> string(2) "\a" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" [""]=> string(1) "" [""]=> @@ -132,8 +141,10 @@ array(11) { string(3) "\cx" ["\a"]=> string(2) "\a" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" [""]=> string(1) "" [""]=> diff --git a/ext/standard/tests/array/ksort_variation5.phpt b/ext/standard/tests/array/ksort_variation5.phpt index 958476c01..d83591aae 100644 --- a/ext/standard/tests/array/ksort_variation5.phpt +++ b/ext/standard/tests/array/ksort_variation5.phpt @@ -1,5 +1,10 @@ --TEST-- -Test ksort() function : usage variations - sort strings +Test ksort() function : usage variations - sort strings +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool ksort ( array &$array [, int $sort_flags] ) @@ -78,8 +83,10 @@ array(11) { string(1) "" [""]=> string(1) "" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" ["\a"]=> string(2) "\a" ["\cx"]=> @@ -106,8 +113,10 @@ array(11) { string(1) "" [""]=> string(1) "" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" ["\a"]=> string(2) "\a" ["\cx"]=> @@ -134,8 +143,10 @@ array(11) { string(1) "" [""]=> string(1) "" - ["
"]=> - string(1) "
" + [" +"]=> + string(1) " +" ["\a"]=> string(2) "\a" ["\cx"]=> diff --git a/ext/standard/tests/array/natcasesort_variation4.phpt b/ext/standard/tests/array/natcasesort_variation4.phpt index 81276ef1c..2a189f337 100644 --- a/ext/standard/tests/array/natcasesort_variation4.phpt +++ b/ext/standard/tests/array/natcasesort_variation4.phpt @@ -1,5 +1,10 @@ --TEST-- Test natcasesort() function : usage variations - different string types +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool natcasesort(array &$array_arg) diff --git a/ext/standard/tests/array/rsort_variation5.phpt b/ext/standard/tests/array/rsort_variation5.phpt index eba6bc420..e955cb34f 100644 --- a/ext/standard/tests/array/rsort_variation5.phpt +++ b/ext/standard/tests/array/rsort_variation5.phpt @@ -1,5 +1,10 @@ --TEST-- Test rsort() function : usage variations - String values +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool rsort(array &$array_arg [, int $sort_flags]) diff --git a/ext/standard/tests/array/sort_variation5.phpt b/ext/standard/tests/array/sort_variation5.phpt index 061a1cbac..7384c7402 100644 --- a/ext/standard/tests/array/sort_variation5.phpt +++ b/ext/standard/tests/array/sort_variation5.phpt @@ -1,5 +1,10 @@ --TEST-- -Test sort() function : usage variations - sort strings +Test sort() function : usage variations - sort strings +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) == 'WIN') { + die("skip Output tested contains chars that are not shown the same on windows concole (ESC and co)"); +} --FILE-- <?php /* Prototype : bool sort ( array &$array [, int $sort_flags] ) @@ -74,7 +79,8 @@ array(12) { [5]=> string(1) "" [6]=> - string(1) "
" + string(1) " +" [7]=> string(2) "\a" [8]=> @@ -103,7 +109,8 @@ array(12) { [5]=> string(1) "" [6]=> - string(1) "
" + string(1) " +" [7]=> string(2) "\a" [8]=> @@ -132,7 +139,8 @@ array(12) { [5]=> string(1) "" [6]=> - string(1) "
" + string(1) " +" [7]=> string(2) "\a" [8]=> diff --git a/ext/standard/tests/class_object/is_a.phpt b/ext/standard/tests/class_object/is_a.phpt new file mode 100644 index 000000000..832d5550f --- /dev/null +++ b/ext/standard/tests/class_object/is_a.phpt @@ -0,0 +1,378 @@ +--TEST-- +is_a and is_subclass_of behaviour (with and without autoload) +--SKIPIF-- +<?php if (version_compare(zend_version(), '2.0.0-dev', '<')) die('skip ZendEngine 2 needed'); ?> +--FILE-- +<?php + +interface if_a { + function f_a(); +} + +interface if_b extends if_a { + function f_b(); +} + +class base { + function _is_a($sub) { + + echo "\n>>> With Defined class\n"; + echo str_pad('is_a( OBJECT:'.get_class($this).', '.$sub.') = ', 60) . (is_a($this, $sub) ? 'yes' : 'no')."\n"; + echo str_pad('is_a( STRING:'.get_class($this).', '.$sub.') = ', 60). (is_a(get_class($this), $sub) ? 'yes' : 'no')."\n"; + echo str_pad('is_a( STRING:'.get_class($this).', '.$sub.', true) = ', 60). (is_a(get_class($this), $sub, true) ? 'yes' : 'no')."\n"; + echo str_pad('is_subclass_of( OBJECT:'.get_class($this).', '.$sub.') = ', 60). (is_subclass_of($this, $sub) ? 'yes' : 'no')."\n"; + echo str_pad('is_subclass_of( STRING:'.get_class($this).', '.$sub.') = ', 60). (is_subclass_of(get_class($this), $sub) ? 'yes' : 'no')."\n"; + echo str_pad('is_subclass_of( STRING:'.get_class($this).', '.$sub.',false) = ', 60). (is_subclass_of(get_class($this), $sub , false) ? 'yes' : 'no')."\n"; + + // with autoload options.. + echo ">>> With Undefined\n"; + echo str_pad('is_a( STRING:undefB, '.$sub.',true) = ', 60). (is_a('undefB', $sub, true) ? 'yes' : 'no')."\n"; + echo str_pad('is_a( STRING:undefB, '.$sub.') = ', 60). (is_a('undefB', $sub) ? 'yes' : 'no')."\n"; + echo str_pad('is_subclass_of( STRING:undefB, '.$sub.',false) = ', 60). (is_subclass_of('undefB', $sub, false) ? 'yes' : 'no')."\n"; + echo str_pad('is_subclass_of( STRING:undefB, '.$sub.') = ', 60). (is_subclass_of('undefB', $sub) ? 'yes' : 'no')."\n"; + } + function test() { + echo $this->_is_a('base'); + echo $this->_is_a('derived_a'); + echo $this->_is_a('if_a'); + echo $this->_is_a('undefA'); + echo "\n"; + } +} + +class derived_a extends base implements if_a { + function f_a() {} +} + +class derived_b extends base implements if_a, if_b { + function f_a() {} + function f_b() {} +} + +class derived_c extends derived_a implements if_b { + function f_b() {} +} + +class derived_d extends derived_c { +} + +$t = new base(); +$t->test(); + +$t = new derived_a(); +$t->test(); + +eval(' + function __autoload($name) + { + echo ">>>> In __autoload: "; + var_dump($name); + } +'); + +echo "NOW WITH AUTOLOAD\n\n"; + +$t = new base(); +$t->test(); + +$t = new derived_a(); +$t->test(); + +$t = new derived_b(); +$t->test(); + + + + + +?> +--EXPECTF-- +>>> With Defined class +is_a( OBJECT:base, base) = yes +is_a( STRING:base, base) = no +is_a( STRING:base, base, true) = yes +is_subclass_of( OBJECT:base, base) = no +is_subclass_of( STRING:base, base) = no +is_subclass_of( STRING:base, base,false) = no +>>> With Undefined +is_a( STRING:undefB, base,true) = no +is_a( STRING:undefB, base) = no +is_subclass_of( STRING:undefB, base,false) = no +is_subclass_of( STRING:undefB, base) = no + +>>> With Defined class +is_a( OBJECT:base, derived_a) = no +is_a( STRING:base, derived_a) = no +is_a( STRING:base, derived_a, true) = no +is_subclass_of( OBJECT:base, derived_a) = no +is_subclass_of( STRING:base, derived_a) = no +is_subclass_of( STRING:base, derived_a,false) = no +>>> With Undefined +is_a( STRING:undefB, derived_a,true) = no +is_a( STRING:undefB, derived_a) = no +is_subclass_of( STRING:undefB, derived_a,false) = no +is_subclass_of( STRING:undefB, derived_a) = no + +>>> With Defined class +is_a( OBJECT:base, if_a) = no +is_a( STRING:base, if_a) = no +is_a( STRING:base, if_a, true) = no +is_subclass_of( OBJECT:base, if_a) = no +is_subclass_of( STRING:base, if_a) = no +is_subclass_of( STRING:base, if_a,false) = no +>>> With Undefined +is_a( STRING:undefB, if_a,true) = no +is_a( STRING:undefB, if_a) = no +is_subclass_of( STRING:undefB, if_a,false) = no +is_subclass_of( STRING:undefB, if_a) = no + +>>> With Defined class +is_a( OBJECT:base, undefA) = no +is_a( STRING:base, undefA) = no +is_a( STRING:base, undefA, true) = no +is_subclass_of( OBJECT:base, undefA) = no +is_subclass_of( STRING:base, undefA) = no +is_subclass_of( STRING:base, undefA,false) = no +>>> With Undefined +is_a( STRING:undefB, undefA,true) = no +is_a( STRING:undefB, undefA) = no +is_subclass_of( STRING:undefB, undefA,false) = no +is_subclass_of( STRING:undefB, undefA) = no + + +>>> With Defined class +is_a( OBJECT:derived_a, base) = yes +is_a( STRING:derived_a, base) = no +is_a( STRING:derived_a, base, true) = yes +is_subclass_of( OBJECT:derived_a, base) = yes +is_subclass_of( STRING:derived_a, base) = yes +is_subclass_of( STRING:derived_a, base,false) = no +>>> With Undefined +is_a( STRING:undefB, base,true) = no +is_a( STRING:undefB, base) = no +is_subclass_of( STRING:undefB, base,false) = no +is_subclass_of( STRING:undefB, base) = no + +>>> With Defined class +is_a( OBJECT:derived_a, derived_a) = yes +is_a( STRING:derived_a, derived_a) = no +is_a( STRING:derived_a, derived_a, true) = yes +is_subclass_of( OBJECT:derived_a, derived_a) = no +is_subclass_of( STRING:derived_a, derived_a) = no +is_subclass_of( STRING:derived_a, derived_a,false) = no +>>> With Undefined +is_a( STRING:undefB, derived_a,true) = no +is_a( STRING:undefB, derived_a) = no +is_subclass_of( STRING:undefB, derived_a,false) = no +is_subclass_of( STRING:undefB, derived_a) = no + +>>> With Defined class +is_a( OBJECT:derived_a, if_a) = yes +is_a( STRING:derived_a, if_a) = no +is_a( STRING:derived_a, if_a, true) = yes +is_subclass_of( OBJECT:derived_a, if_a) = yes +is_subclass_of( STRING:derived_a, if_a) = yes +is_subclass_of( STRING:derived_a, if_a,false) = no +>>> With Undefined +is_a( STRING:undefB, if_a,true) = no +is_a( STRING:undefB, if_a) = no +is_subclass_of( STRING:undefB, if_a,false) = no +is_subclass_of( STRING:undefB, if_a) = no + +>>> With Defined class +is_a( OBJECT:derived_a, undefA) = no +is_a( STRING:derived_a, undefA) = no +is_a( STRING:derived_a, undefA, true) = no +is_subclass_of( OBJECT:derived_a, undefA) = no +is_subclass_of( STRING:derived_a, undefA) = no +is_subclass_of( STRING:derived_a, undefA,false) = no +>>> With Undefined +is_a( STRING:undefB, undefA,true) = no +is_a( STRING:undefB, undefA) = no +is_subclass_of( STRING:undefB, undefA,false) = no +is_subclass_of( STRING:undefB, undefA) = no + +NOW WITH AUTOLOAD + + +>>> With Defined class +is_a( OBJECT:base, base) = yes +is_a( STRING:base, base) = no +is_a( STRING:base, base, true) = yes +is_subclass_of( OBJECT:base, base) = no +is_subclass_of( STRING:base, base) = no +is_subclass_of( STRING:base, base,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, base,true) = no +is_a( STRING:undefB, base) = no +is_subclass_of( STRING:undefB, base,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, base) = no + +>>> With Defined class +is_a( OBJECT:base, derived_a) = no +is_a( STRING:base, derived_a) = no +is_a( STRING:base, derived_a, true) = no +is_subclass_of( OBJECT:base, derived_a) = no +is_subclass_of( STRING:base, derived_a) = no +is_subclass_of( STRING:base, derived_a,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, derived_a,true) = no +is_a( STRING:undefB, derived_a) = no +is_subclass_of( STRING:undefB, derived_a,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, derived_a) = no + +>>> With Defined class +is_a( OBJECT:base, if_a) = no +is_a( STRING:base, if_a) = no +is_a( STRING:base, if_a, true) = no +is_subclass_of( OBJECT:base, if_a) = no +is_subclass_of( STRING:base, if_a) = no +is_subclass_of( STRING:base, if_a,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, if_a,true) = no +is_a( STRING:undefB, if_a) = no +is_subclass_of( STRING:undefB, if_a,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, if_a) = no + +>>> With Defined class +is_a( OBJECT:base, undefA) = no +is_a( STRING:base, undefA) = no +is_a( STRING:base, undefA, true) = no +is_subclass_of( OBJECT:base, undefA) = no +is_subclass_of( STRING:base, undefA) = no +is_subclass_of( STRING:base, undefA,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, undefA,true) = no +is_a( STRING:undefB, undefA) = no +is_subclass_of( STRING:undefB, undefA,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, undefA) = no + + +>>> With Defined class +is_a( OBJECT:derived_a, base) = yes +is_a( STRING:derived_a, base) = no +is_a( STRING:derived_a, base, true) = yes +is_subclass_of( OBJECT:derived_a, base) = yes +is_subclass_of( STRING:derived_a, base) = yes +is_subclass_of( STRING:derived_a, base,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, base,true) = no +is_a( STRING:undefB, base) = no +is_subclass_of( STRING:undefB, base,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, base) = no + +>>> With Defined class +is_a( OBJECT:derived_a, derived_a) = yes +is_a( STRING:derived_a, derived_a) = no +is_a( STRING:derived_a, derived_a, true) = yes +is_subclass_of( OBJECT:derived_a, derived_a) = no +is_subclass_of( STRING:derived_a, derived_a) = no +is_subclass_of( STRING:derived_a, derived_a,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, derived_a,true) = no +is_a( STRING:undefB, derived_a) = no +is_subclass_of( STRING:undefB, derived_a,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, derived_a) = no + +>>> With Defined class +is_a( OBJECT:derived_a, if_a) = yes +is_a( STRING:derived_a, if_a) = no +is_a( STRING:derived_a, if_a, true) = yes +is_subclass_of( OBJECT:derived_a, if_a) = yes +is_subclass_of( STRING:derived_a, if_a) = yes +is_subclass_of( STRING:derived_a, if_a,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, if_a,true) = no +is_a( STRING:undefB, if_a) = no +is_subclass_of( STRING:undefB, if_a,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, if_a) = no + +>>> With Defined class +is_a( OBJECT:derived_a, undefA) = no +is_a( STRING:derived_a, undefA) = no +is_a( STRING:derived_a, undefA, true) = no +is_subclass_of( OBJECT:derived_a, undefA) = no +is_subclass_of( STRING:derived_a, undefA) = no +is_subclass_of( STRING:derived_a, undefA,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, undefA,true) = no +is_a( STRING:undefB, undefA) = no +is_subclass_of( STRING:undefB, undefA,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, undefA) = no + + +>>> With Defined class +is_a( OBJECT:derived_b, base) = yes +is_a( STRING:derived_b, base) = no +is_a( STRING:derived_b, base, true) = yes +is_subclass_of( OBJECT:derived_b, base) = yes +is_subclass_of( STRING:derived_b, base) = yes +is_subclass_of( STRING:derived_b, base,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, base,true) = no +is_a( STRING:undefB, base) = no +is_subclass_of( STRING:undefB, base,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, base) = no + +>>> With Defined class +is_a( OBJECT:derived_b, derived_a) = no +is_a( STRING:derived_b, derived_a) = no +is_a( STRING:derived_b, derived_a, true) = no +is_subclass_of( OBJECT:derived_b, derived_a) = no +is_subclass_of( STRING:derived_b, derived_a) = no +is_subclass_of( STRING:derived_b, derived_a,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, derived_a,true) = no +is_a( STRING:undefB, derived_a) = no +is_subclass_of( STRING:undefB, derived_a,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, derived_a) = no + +>>> With Defined class +is_a( OBJECT:derived_b, if_a) = yes +is_a( STRING:derived_b, if_a) = no +is_a( STRING:derived_b, if_a, true) = yes +is_subclass_of( OBJECT:derived_b, if_a) = yes +is_subclass_of( STRING:derived_b, if_a) = yes +is_subclass_of( STRING:derived_b, if_a,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, if_a,true) = no +is_a( STRING:undefB, if_a) = no +is_subclass_of( STRING:undefB, if_a,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, if_a) = no + +>>> With Defined class +is_a( OBJECT:derived_b, undefA) = no +is_a( STRING:derived_b, undefA) = no +is_a( STRING:derived_b, undefA, true) = no +is_subclass_of( OBJECT:derived_b, undefA) = no +is_subclass_of( STRING:derived_b, undefA) = no +is_subclass_of( STRING:derived_b, undefA,false) = no +>>> With Undefined +>>>> In __autoload: string(6) "undefB" +is_a( STRING:undefB, undefA,true) = no +is_a( STRING:undefB, undefA) = no +is_subclass_of( STRING:undefB, undefA,false) = no +>>>> In __autoload: string(6) "undefB" +is_subclass_of( STRING:undefB, undefA) = no diff --git a/ext/standard/tests/class_object/is_a_error_001.phpt b/ext/standard/tests/class_object/is_a_error_001.phpt index 921e3a260..6518a03c0 100644 --- a/ext/standard/tests/class_object/is_a_error_001.phpt +++ b/ext/standard/tests/class_object/is_a_error_001.phpt @@ -4,7 +4,7 @@ Test is_a() function : error conditions - wrong number of args error_reporting=E_ALL | E_STRICT | E_DEPRECATED --FILE-- <?php -/* Prototype : proto bool is_a(object object, string class_name) +/* Prototype : proto bool is_a(object object, string class_name, bool allow_string) * Description: Returns true if the object is of this class or has this class as one of its parents * Source code: Zend/zend_builtin_functions.c * Alias to functions: @@ -12,13 +12,19 @@ error_reporting=E_ALL | E_STRICT | E_DEPRECATED echo "*** Testing is_a() : error conditions ***\n"; - //Test is_a with one more than the expected number of arguments echo "\n-- Testing is_a() function with more than expected no. of arguments --\n"; $object = new stdclass(); $class_name = 'string_val'; +$allow_string = false; $extra_arg = 10; -var_dump( is_a($object, $class_name, $extra_arg) ); + +var_dump( is_a($object, $class_name, $allow_string, $object) ); + +//Test is_a with one more than the expected number of arguments +echo "\n-- Testing is_a() function with non-boolean in last position --\n"; +var_dump( is_a($object, $class_name, $object) ); + // Testing is_a with one less than the expected number of arguments echo "\n-- Testing is_a() function with less than expected no. of arguments --\n"; @@ -28,15 +34,21 @@ var_dump( is_a($object) ); echo "Done"; ?> --EXPECTF-- + *** Testing is_a() : error conditions *** -- Testing is_a() function with more than expected no. of arguments -- -Warning: is_a() expects exactly 2 parameters, 3 given in %s on line 16 +Warning: is_a() expects at most 3 parameters, 4 given in %s on line 17 +NULL + +-- Testing is_a() function with non-boolean in last position -- + +Warning: is_a() expects parameter 3 to be boolean, object given in %s on line 21 NULL -- Testing is_a() function with less than expected no. of arguments -- -Warning: is_a() expects exactly 2 parameters, 1 given in %s on line 21 +Warning: is_a() expects at least 2 parameters, 1 given in %s on line 27 NULL -Done +Done
\ No newline at end of file diff --git a/ext/standard/tests/class_object/is_subclass_of_error_001.phpt b/ext/standard/tests/class_object/is_subclass_of_error_001.phpt index bc657866d..987dcd47b 100644 --- a/ext/standard/tests/class_object/is_subclass_of_error_001.phpt +++ b/ext/standard/tests/class_object/is_subclass_of_error_001.phpt @@ -15,8 +15,18 @@ echo "*** Testing is_subclass_of() : error conditions ***\n"; echo "\n-- Testing is_subclass_of() function with more than expected no. of arguments --\n"; $object = new stdclass(); $class_name = 'string_val'; +$allow_string = false; $extra_arg = 10; -var_dump( is_subclass_of($object, $class_name, $extra_arg) ); +var_dump( is_subclass_of($object, $class_name, $allow_string, $extra_arg) ); + +//Test is_subclass_of with invalid last argument +echo "\n-- Testing is_subclass_of() function with more than typo style invalid 3rd argument --\n"; +var_dump( is_subclass_of($object, $class_name, $class_name) ); + + +//Test is_subclass_of with invalid last argument +echo "\n-- Testing is_subclass_of() function with more than invalid 3rd argument --\n"; +var_dump( is_subclass_of($object, $class_name, $object) ); // Testing is_subclass_of with one less than the expected number of arguments echo "\n-- Testing is_subclass_of() function with less than expected no. of arguments --\n"; @@ -30,11 +40,19 @@ echo "Done"; -- Testing is_subclass_of() function with more than expected no. of arguments -- -Warning: is_subclass_of() expects exactly 2 parameters, 3 given in %s on line 16 +Warning: is_subclass_of() expects at most 3 parameters, 4 given in %s on line 17 +NULL + +-- Testing is_subclass_of() function with more than typo style invalid 3rd argument -- +bool(false) + +-- Testing is_subclass_of() function with more than invalid 3rd argument -- + +Warning: is_subclass_of() expects parameter 3 to be boolean, object given in %s on line 26 NULL -- Testing is_subclass_of() function with less than expected no. of arguments -- -Warning: is_subclass_of() expects exactly 2 parameters, 1 given in %s on line 21 +Warning: is_subclass_of() expects at least 2 parameters, 1 given in %s on line 31 NULL Done diff --git a/ext/standard/tests/dir/opendir_variation6-win32.phpt b/ext/standard/tests/dir/opendir_variation6-win32.phpt new file mode 100644 index 000000000..f54a2ad4a --- /dev/null +++ b/ext/standard/tests/dir/opendir_variation6-win32.phpt @@ -0,0 +1,75 @@ +--TEST-- +Test opendir() function : usage variations - Different wildcards +--SKIPIF-- +<?php +if (substr(PHP_OS, 0, 3) != 'WIN') { + die("skip Valid only on Windows"); +} +?> +--FILE-- +<?php +/* Prototype : mixed opendir(string $path[, resource $context]) + * Description: Open a directory and return a dir_handle + * Source code: ext/standard/dir.c + */ + +/* + * Pass paths containing wildcards to test if opendir() recognises them + */ + +echo "*** Testing opendir() : usage variations ***\n"; +// create the temporary directories +$file_path = dirname(__FILE__); +$dir_path = $file_path . "/opendir_variation6"; +$sub_dir_path = $dir_path . "/sub_dir1"; + +mkdir($dir_path); +mkdir($sub_dir_path); + +// with different wildcard characters + +echo "\n-- Wildcard = '*' --\n"; +var_dump( opendir($file_path . "/opendir_var*") ); +var_dump( opendir($file_path . "/*") ); + +echo "\n-- Wildcard = '?' --\n"; +var_dump( opendir($dir_path . "/sub_dir?") ); +var_dump( opendir($dir_path . "/sub?dir1") ); + +?> +===DONE=== +--CLEAN-- +<?php +$dir_path = dirname(__FILE__) . "/opendir_variation6"; +$sub_dir_path = $dir_path . "/sub_dir1"; + +rmdir($sub_dir_path); +rmdir($dir_path); +?> +--EXPECTF-- +*** Testing opendir() : usage variations *** + +-- Wildcard = '*' -- + +Warning: opendir(%s/opendir_var*,%s/opendir_var*): %s in %s on line %d + +Warning: opendir(%s/opendir_var*): failed to open dir: %s in %s on line %d +bool(false) + +Warning: opendir(%s/*,%s/*): %s in %s on line %d + +Warning: opendir(%s/*): failed to open dir: %s in %s on line %d +bool(false) + +-- Wildcard = '?' -- + +Warning: opendir(%s/opendir_variation6/sub_dir?,%s/opendir_variation6/sub_dir?): %s in %s on line %d + +Warning: opendir(%s/opendir_variation6/sub_dir?): failed to open dir: %s in %s on line %d +bool(false) + +Warning: opendir(%s/opendir_variation6/sub?dir1,%s/opendir_variation6/sub?dir1): %s in %s on line %d + +Warning: opendir(%s/opendir_variation6/sub?dir1): failed to open dir: %s in %s on line %d +bool(false) +===DONE=== diff --git a/ext/standard/tests/directory/open_basedir_001.phpt b/ext/standard/tests/directory/open_basedir_001.phpt deleted file mode 100644 index 092eac27f..000000000 --- a/ext/standard/tests/directory/open_basedir_001.phpt +++ /dev/null @@ -1,17 +0,0 @@ ---TEST-- -openbase_dir runtime tightning ---INI-- -open_basedir=/usr/local ---FILE-- -<?php -var_dump(ini_set("open_basedir", "/usr/local/bin")); -var_dump(ini_get("open_basedir")); -var_dump(ini_set("open_basedir", "/usr")); -var_dump(ini_get("open_basedir")); -?> ---EXPECT-- -string(10) "/usr/local" -string(14) "/usr/local/bin" -bool(false) -string(14) "/usr/local/bin" - diff --git a/ext/standard/tests/file/bug20424.phpt b/ext/standard/tests/file/bug20424.phpt index df10d4abd..b8f9dfd8f 100644 --- a/ext/standard/tests/file/bug20424.phpt +++ b/ext/standard/tests/file/bug20424.phpt @@ -2,7 +2,7 @@ Bug #20424 (stream_get_meta_data crashes on a normal file stream) --FILE-- <?php -$f = fopen(dirname(__FILE__) . "/../../../../run-tests.php", "r"); +$f = fopen(__FILE__, "r"); $dummy = var_export(stream_get_meta_data($f), TRUE); echo "I'm alive!\n"; ?> diff --git a/ext/standard/tests/file/bug52624.phpt b/ext/standard/tests/file/bug52624.phpt new file mode 100644 index 000000000..ee61eb90e --- /dev/null +++ b/ext/standard/tests/file/bug52624.phpt @@ -0,0 +1,12 @@ +--TEST-- +Bug #52624 (tempnam() by-pass open_basedir with inexistent directory) +--INI-- +open_basedir=. +--FILE-- +<?php + +echo tempnam("directory_that_not_exists", "prefix_"); + +?> +--EXPECTF-- +Warning: tempnam(): open_basedir restriction in effect. File(%s) is not within the allowed path(s): (%s) in %s on line %d diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt new file mode 100644 index 000000000..8915bb833 --- /dev/null +++ b/ext/standard/tests/file/bug60120.phpt @@ -0,0 +1,74 @@ +--TEST--
+Bug #60120 (proc_open hangs when data in stdin/out/err is getting larger or equal to 2048)
+--SKIPIF--
+<?php
+if (substr(PHP_OS, 0, 3) != 'WIN') {
+ die('skip only for Windows');
+}
+$php = getenv('TEST_PHP_EXECUTABLE');
+if (!$php) {
+ die("No php executable defined\n");
+}
+?>
+--FILE--
+<?php
+
+error_reporting(E_ALL);
+
+$php = getenv('TEST_PHP_EXECUTABLE');
+if (!$php) {
+ die("No php executable defined\n");
+}
+$cmd = 'php -r "fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);"';
+$descriptors = array(array('pipe', 'r'), array('pipe', 'w'), array('pipe', 'w'));
+$stdin = str_repeat('*', 1024 * 16) . '!';
+$stdin = str_repeat('*', 2049 );
+
+$options = array_merge(array('suppress_errors' => true, 'binary_pipes' => true, 'bypass_shell' => false));
+$process = proc_open($cmd, $descriptors, $pipes, getcwd(), array(), $options);
+
+foreach ($pipes as $pipe) {
+ stream_set_blocking($pipe, false);
+}
+$writePipes = array($pipes[0]);
+$stdinLen = strlen($stdin);
+$stdinOffset = 0;
+
+unset($pipes[0]);
+
+while ($pipes || $writePipes) {
+ $r = $pipes;
+ $w = $writePipes;
+ $e = null;
+ $n = stream_select($r, $w, $e, 60);
+
+ if (false === $n) {
+ break;
+ } elseif ($n === 0) {
+ proc_terminate($process);
+
+ }
+ if ($w) {
+ $written = fwrite($writePipes[0], (binary)substr($stdin, $stdinOffset), 8192);
+ if (false !== $written) {
+ $stdinOffset += $written;
+ }
+ if ($stdinOffset >= $stdinLen) {
+ fclose($writePipes[0]);
+ $writePipes = null;
+ }
+ }
+
+ foreach ($r as $pipe) {
+ $type = array_search($pipe, $pipes);
+ $data = fread($pipe, 8192);
+ if (false === $data || feof($pipe)) {
+ fclose($pipe);
+ unset($pipes[$type]);
+ }
+ }
+}
+echo "OK.";
+?>
+--EXPECT--
+OK.
diff --git a/ext/standard/tests/file/file_get_contents_error001.phpt b/ext/standard/tests/file/file_get_contents_error001.phpt index ced0da032..127901ad7 100644 --- a/ext/standard/tests/file/file_get_contents_error001.phpt +++ b/ext/standard/tests/file/file_get_contents_error001.phpt @@ -7,6 +7,7 @@ file_get_contents() test using offset parameter out of range display_errors=false --SKIPIF-- <?php + if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (!function_exists("file_get_contents")) die ("skip file_get_contents function is not found"); ?> diff --git a/ext/standard/tests/file/fread_socket_variation1.phpt b/ext/standard/tests/file/fread_socket_variation1.phpt index 50ee79bbf..a615d2f41 100644 --- a/ext/standard/tests/file/fread_socket_variation1.phpt +++ b/ext/standard/tests/file/fread_socket_variation1.phpt @@ -1,15 +1,11 @@ --TEST-- Testing fread() on a TCP server socket ---SKIPIF-- -<?php -if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); -?> --FILE-- <?php $tcp_socket = stream_socket_server('tcp://127.0.0.1:31337'); -socket_set_timeout($tcp_socket, 1); +socket_set_timeout($tcp_socket, 0, 1000); var_dump(fread($tcp_socket, 1)); diff --git a/ext/standard/tests/file/lstat_stat_basic.phpt b/ext/standard/tests/file/lstat_stat_basic.phpt index 362fcfe86..0d1476d68 100644 --- a/ext/standard/tests/file/lstat_stat_basic.phpt +++ b/ext/standard/tests/file/lstat_stat_basic.phpt @@ -2,6 +2,7 @@ Test lstat() & stat() functions: basic functionality --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. lstat() not available on Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation10.phpt b/ext/standard/tests/file/lstat_stat_variation10.phpt index a30b3c51f..51ebc25e7 100644 --- a/ext/standard/tests/file/lstat_stat_variation10.phpt +++ b/ext/standard/tests/file/lstat_stat_variation10.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects of is_dir() --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation11.phpt b/ext/standard/tests/file/lstat_stat_variation11.phpt index df1b8ac12..a75504b47 100644 --- a/ext/standard/tests/file/lstat_stat_variation11.phpt +++ b/ext/standard/tests/file/lstat_stat_variation11.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effect of is_file() --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation12.phpt b/ext/standard/tests/file/lstat_stat_variation12.phpt index c1e37b543..8e1edd66c 100644 --- a/ext/standard/tests/file/lstat_stat_variation12.phpt +++ b/ext/standard/tests/file/lstat_stat_variation12.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects of is_link() --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. lstat() not available on Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation13.phpt b/ext/standard/tests/file/lstat_stat_variation13.phpt index 474ddc516..288e0b5ec 100644 --- a/ext/standard/tests/file/lstat_stat_variation13.phpt +++ b/ext/standard/tests/file/lstat_stat_variation13.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - file opened using w and r mode --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation15.phpt b/ext/standard/tests/file/lstat_stat_variation15.phpt index 45912ae58..8b67338ab 100644 --- a/ext/standard/tests/file/lstat_stat_variation15.phpt +++ b/ext/standard/tests/file/lstat_stat_variation15.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects changing permissions of link --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. lstat() not available on Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation16.phpt b/ext/standard/tests/file/lstat_stat_variation16.phpt index 641ccd58d..9f1276548 100644 --- a/ext/standard/tests/file/lstat_stat_variation16.phpt +++ b/ext/standard/tests/file/lstat_stat_variation16.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects changing permissions of file --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation17.phpt b/ext/standard/tests/file/lstat_stat_variation17.phpt index e50abf3f8..f2306de79 100644 --- a/ext/standard/tests/file/lstat_stat_variation17.phpt +++ b/ext/standard/tests/file/lstat_stat_variation17.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects changing permissions of dir --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation21.phpt b/ext/standard/tests/file/lstat_stat_variation21.phpt index 1009c92c5..8620ab00d 100644 --- a/ext/standard/tests/file/lstat_stat_variation21.phpt +++ b/ext/standard/tests/file/lstat_stat_variation21.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects of truncate() --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation4.phpt b/ext/standard/tests/file/lstat_stat_variation4.phpt index 7407a63bf..259beca00 100755 --- a/ext/standard/tests/file/lstat_stat_variation4.phpt +++ b/ext/standard/tests/file/lstat_stat_variation4.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects of touch() on file --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation5.phpt b/ext/standard/tests/file/lstat_stat_variation5.phpt index 895e606b9..d0c096ef1 100755 --- a/ext/standard/tests/file/lstat_stat_variation5.phpt +++ b/ext/standard/tests/file/lstat_stat_variation5.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects of touch() on dir --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/lstat_stat_variation6.phpt b/ext/standard/tests/file/lstat_stat_variation6.phpt index b7913e0b3..7e557d034 100755 --- a/ext/standard/tests/file/lstat_stat_variation6.phpt +++ b/ext/standard/tests/file/lstat_stat_variation6.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - effects of touch() on link --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (!(stristr(PHP_OS, 'linux'))) { die('skip.. test valid for linux only'); } @@ -47,7 +48,7 @@ clearstatcache(); var_dump( touch($link_name) ); -$new_stat = lstat($link_name); +$new_stat = stat($file_name); // compare self stats var_dump( compare_self_stat($old_stat) ); diff --git a/ext/standard/tests/file/lstat_stat_variation8.phpt b/ext/standard/tests/file/lstat_stat_variation8.phpt index 412c3bf03..b0f170d1f 100644 --- a/ext/standard/tests/file/lstat_stat_variation8.phpt +++ b/ext/standard/tests/file/lstat_stat_variation8.phpt @@ -2,6 +2,7 @@ Test lstat() and stat() functions: usage variations - creating file/subdir --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. Not valid for Windows'); } diff --git a/ext/standard/tests/file/readlink_realpath_variation3.phpt b/ext/standard/tests/file/readlink_realpath_variation3.phpt index 70e8d0c94..3766a5b43 100644 --- a/ext/standard/tests/file/readlink_realpath_variation3.phpt +++ b/ext/standard/tests/file/readlink_realpath_variation3.phpt @@ -46,32 +46,32 @@ echo "Done\n"; *** Testing readlink() and realpath() with linkname as empty string, NULL and single space *** -- Iteration1 -- -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) %s -- Iteration2 -- -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) %s -- Iteration3 -- -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) string(%d) "%s" -- Iteration4 -- -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) string(%d) "%s" -- Iteration5 -- -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) string(%d) "%s" -- Iteration6 -- -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) string(%d) "%s" Done diff --git a/ext/standard/tests/file/readlink_variation1.phpt b/ext/standard/tests/file/readlink_variation1.phpt index 49dc6a540..1dae17cbd 100644 --- a/ext/standard/tests/file/readlink_variation1.phpt +++ b/ext/standard/tests/file/readlink_variation1.phpt @@ -50,28 +50,28 @@ unlink($file_path."/readlink_variation2.tmp"); --EXPECTF-- *** Testing Invalid file types *** -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) Warning: readlink() expects parameter 1 to be string, resource given in %s on line %d NULL -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) -Warning: readlink(): No such file or directory in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) *** Done *** diff --git a/ext/standard/tests/file/rename_variation13-win32.phpt b/ext/standard/tests/file/rename_variation13-win32.phpt index 2cd9dbdd9..8e86d27a2 100644 --- a/ext/standard/tests/file/rename_variation13-win32.phpt +++ b/ext/standard/tests/file/rename_variation13-win32.phpt @@ -36,6 +36,9 @@ $names_arr = array( ); +/* disable notice so we don't get the array to string conversion notice for "$name" where $name = array() */ +error_reporting(E_ALL ^ E_NOTICE); + echo "*** Testing rename() with obscure files ***\n"; $file_path = dirname(__FILE__)."/renameVar13"; $aFile = $file_path.'/afile.tmp'; diff --git a/ext/standard/tests/file/rename_variation6-win32.phpt b/ext/standard/tests/file/rename_variation6-win32.phpt index 14d59d0ad..9aab0a7a8 100644 --- a/ext/standard/tests/file/rename_variation6-win32.phpt +++ b/ext/standard/tests/file/rename_variation6-win32.phpt @@ -33,7 +33,7 @@ var_dump(file_exists($tmp_file)); echo "Done\n"; ?> --EXPECTF-- -Warning: readlink(): Could not open file (error 2) in %s on line %d +Warning: readlink(): %s in %s on line %d bool(false) string(%d) "%srename_variation6-win32.php.tmp" bool(true) diff --git a/ext/standard/tests/file/touch_basic.phpt b/ext/standard/tests/file/touch_basic.phpt index fb042df67..c41fdf1d7 100644 --- a/ext/standard/tests/file/touch_basic.phpt +++ b/ext/standard/tests/file/touch_basic.phpt @@ -4,6 +4,7 @@ Test touch() function : basic functionality Dave Kelsey <d_kelsey@uk.ibm.com> --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for Non Windows'); } diff --git a/ext/standard/tests/general_functions/bug39322.phpt b/ext/standard/tests/general_functions/bug39322.phpt index 6ba740dc8..a9f83c75b 100644 --- a/ext/standard/tests/general_functions/bug39322.phpt +++ b/ext/standard/tests/general_functions/bug39322.phpt @@ -2,6 +2,7 @@ Bug #39322 (proc_terminate() loosing process resource) --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (!is_executable('/bin/sleep')) echo 'skip sleep not found'; ?> --FILE-- @@ -15,7 +16,7 @@ $pipes = array(); $process = proc_open('/bin/sleep 120', $descriptors, $pipes); -proc_terminate($process); +proc_terminate($process, 9); sleep(1); // wait a bit to let the process finish var_dump(proc_get_status($process)); @@ -37,7 +38,7 @@ array(8) { ["exitcode"]=> int(-1) ["termsig"]=> - int(15) + int(9) ["stopsig"]=> int(0) } diff --git a/ext/standard/tests/general_functions/call_user_method_002.phpt b/ext/standard/tests/general_functions/call_user_method_002.phpt new file mode 100644 index 000000000..054bc3ede --- /dev/null +++ b/ext/standard/tests/general_functions/call_user_method_002.phpt @@ -0,0 +1,12 @@ +--TEST-- +call_user_method() Invalid free +--FILE-- +<?php + +call_user_method("1", $arr1); + +?> +--EXPECTF-- +Deprecated: Function call_user_method() is deprecated in %s on line %d + +Warning: call_user_method(): Second argument is not an object or class name in %s on line %d diff --git a/ext/standard/tests/general_functions/parse_ini_file-win32.phpt b/ext/standard/tests/general_functions/parse_ini_file-win32.phpt deleted file mode 100644 index 7a1d63010..000000000 --- a/ext/standard/tests/general_functions/parse_ini_file-win32.phpt +++ /dev/null @@ -1,196 +0,0 @@ ---TEST-- -parse_ini_file() multiple calls ---SKIPIF-- -<?php if( substr(PHP_OS, 0, 3) != 'WIN' ) die("skip non Windows systems have different error message");?> ---FILE-- -<?php - -$filename = dirname(__FILE__)."/parse_ini_file.dat"; -@unlink($filename); /* Make sure the file really does not exist! */ - -var_dump(parse_ini_file()); -var_dump(parse_ini_file(1,1,1,1)); -var_dump(parse_ini_file($filename)); -var_dump(parse_ini_file($filename, true)); - -$ini = " -test = -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename)); -$ini = " -test== -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename)); - -$ini = " -test=test= -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename)); - -$ini = " -test= \"new -line\" -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename)); - -define("TEST_CONST", "test const value"); -$ini = " -test=TEST_CONST -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename)); - -$ini = " -[section] -test=hello -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -$ini = " -[section] -test=hello -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, false)); - -$ini = " -section.test=hello -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -$ini = " -[section] -section.test=hello -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -$ini = " -[section] -1=2 -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -$ini = " -1=2 -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); -$ini = " -test=test2 -test=test3 -test=test4 -"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -/* From bug #44574 */ -$ini = "[section1]\nname = value"; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -/* #44842, labels starting with underscore */ -$ini = <<<'INI' -foo=bar1 -_foo=bar2 -foo_=bar3 -INI; -file_put_contents($filename, $ini); -var_dump(parse_ini_file($filename, true)); - -@unlink($filename); -echo "Done\n"; -?> ---EXPECTF-- -Warning: parse_ini_file() expects at least 1 parameter, 0 given in %s on line 6 -bool(false) - -Warning: parse_ini_file() expects at most 3 parameters, 4 given in %s on line 7 -bool(false) - -Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %s.php on line 8 -bool(false) - -Warning: parse_ini_file(%sparse_ini_file.dat): failed to open stream: No such file or directory in %s.php on line 9 -bool(false) -array(1) { - ["test"]=> - string(0) "" -} - -Warning: parse error in %s on line %d - in %s on line 20 -bool(false) - -Warning: parse error in %s on line %d - in %s on line 26 -bool(false) -array(1) { - ["test"]=> - string(8) "new -line" -} -array(1) { - ["test"]=> - string(16) "test const value" -} -array(1) { - ["section"]=> - array(1) { - ["test"]=> - string(5) "hello" - } -} -array(1) { - ["test"]=> - string(5) "hello" -} -array(1) { - ["section.test"]=> - string(5) "hello" -} -array(1) { - ["section"]=> - array(1) { - ["section.test"]=> - string(5) "hello" - } -} -array(1) { - ["section"]=> - array(1) { - [1]=> - string(1) "2" - } -} -array(1) { - [1]=> - string(1) "2" -} -array(1) { - ["test"]=> - string(5) "test4" -} -array(1) { - ["section1"]=> - array(1) { - ["name"]=> - string(5) "value" - } -} -array(3) { - ["foo"]=> - string(4) "bar1" - ["_foo"]=> - string(4) "bar2" - ["foo_"]=> - string(4) "bar3" -} -Done diff --git a/ext/standard/tests/general_functions/parse_ini_file.phpt b/ext/standard/tests/general_functions/parse_ini_file.phpt index 8523c83cf..240b0f3b1 100644 --- a/ext/standard/tests/general_functions/parse_ini_file.phpt +++ b/ext/standard/tests/general_functions/parse_ini_file.phpt @@ -137,11 +137,11 @@ array(1) { string(0) "" } -Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2 +Warning: syntax error, unexpected '='%sparse_ini_file.dat on line 2 in %sparse_ini_file.php on line 20 bool(false) -Warning: syntax error, unexpected '=' in %sparse_ini_file.dat on line 2 +Warning: syntax error, unexpected '='%sparse_ini_file.dat on line 2 in %sparse_ini_file.php on line 26 bool(false) array(1) { diff --git a/ext/standard/tests/general_functions/parse_ini_string_002.phpt b/ext/standard/tests/general_functions/parse_ini_string_002.phpt index 0da959ab8..733409c84 100644 --- a/ext/standard/tests/general_functions/parse_ini_string_002.phpt +++ b/ext/standard/tests/general_functions/parse_ini_string_002.phpt @@ -97,11 +97,11 @@ array(1) { %unicode|string%(0) "" } -Warning: syntax error, unexpected '=' in Unknown on line 2 +Warning: syntax error, unexpected '='%sin Unknown on line 2 in %s bool(false) -Warning: syntax error, unexpected '=' in Unknown on line 2 +Warning: syntax error, unexpected '='%sin Unknown on line 2 in %s bool(false) array(1) { diff --git a/ext/standard/tests/general_functions/proc_open02.phpt b/ext/standard/tests/general_functions/proc_open02.phpt index 3406f6806..d5d878ed2 100644 --- a/ext/standard/tests/general_functions/proc_open02.phpt +++ b/ext/standard/tests/general_functions/proc_open02.phpt @@ -3,7 +3,6 @@ proc_open --SKIPIF-- <?php if (!is_executable('/bin/sleep')) echo 'skip no sleep'; -if (!is_executable('/usr/bin/nohup')) echo 'skip no nohup'; if (getenv('SKIP_SLOW_TESTS')) echo 'skip slow test'; ?> --FILE-- @@ -11,19 +10,19 @@ if (getenv('SKIP_SLOW_TESTS')) echo 'skip slow test'; $ds = array(array('pipe', 'r')); $cat = proc_open( - '/usr/bin/nohup /bin/sleep 50', + '/bin/sleep 2', $ds, $pipes ); -sleep(1); // let the OS run the nohup process before sending the signal +usleep(20000); // let the OS run the sleep process before sending the signal -var_dump(proc_terminate($cat, 1)); // send a SIGHUP -sleep(1); +var_dump(proc_terminate($cat, 0)); // status check +usleep(20000); var_dump(proc_get_status($cat)); var_dump(proc_terminate($cat)); // now really quit it -sleep(1); +usleep(20000); var_dump(proc_get_status($cat)); proc_close($cat); @@ -35,7 +34,7 @@ echo "Done!\n"; bool(true) array(8) { ["command"]=> - string(28) "/usr/bin/nohup /bin/sleep 50" + string(12) "/bin/sleep 2" ["pid"]=> int(%d) ["running"]=> @@ -54,7 +53,7 @@ array(8) { bool(true) array(8) { ["command"]=> - string(28) "/usr/bin/nohup /bin/sleep 50" + string(12) "/bin/sleep 2" ["pid"]=> int(%d) ["running"]=> diff --git a/ext/standard/tests/general_functions/sleep_basic.phpt b/ext/standard/tests/general_functions/sleep_basic.phpt index cfc00c6ea..5d7fe536f 100644 --- a/ext/standard/tests/general_functions/sleep_basic.phpt +++ b/ext/standard/tests/general_functions/sleep_basic.phpt @@ -1,5 +1,9 @@ --TEST-- Test sleep() function : basic functionality +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +?> --FILE-- <?php /* Prototype : int sleep ( int $seconds ) diff --git a/ext/standard/tests/general_functions/usleep_basic.phpt b/ext/standard/tests/general_functions/usleep_basic.phpt index 22c3e658b..d6f312e15 100644 --- a/ext/standard/tests/general_functions/usleep_basic.phpt +++ b/ext/standard/tests/general_functions/usleep_basic.phpt @@ -1,5 +1,9 @@ --TEST-- Test usleep() function +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +?> --FILE-- <?php /* Prototype : void usleep ( int $micro_seconds ) diff --git a/ext/standard/tests/http/bug38802.phpt b/ext/standard/tests/http/bug38802.phpt index 91fd1cce9..73b41183a 100644 --- a/ext/standard/tests/http/bug38802.phpt +++ b/ext/standard/tests/http/bug38802.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #38802 (ignore_errors and max_redirects) +--INI-- +allow_url_fopen=1 --SKIPIF-- <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> --FILE-- diff --git a/ext/standard/tests/http/bug43510.phpt b/ext/standard/tests/http/bug43510.phpt index 7358ee12c..d97361237 100644 --- a/ext/standard/tests/http/bug43510.phpt +++ b/ext/standard/tests/http/bug43510.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #43510 (stream_get_meta_data() does not return same mode as used in fopen) +--INI-- +allow_url_fopen=1 --SKIPIF-- <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> --FILE-- diff --git a/ext/standard/tests/http/bug48929.phpt b/ext/standard/tests/http/bug48929.phpt index 035ebb12b..2d1e45917 100644 --- a/ext/standard/tests/http/bug48929.phpt +++ b/ext/standard/tests/http/bug48929.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #48929 (duplicate \r\n sent after last header line) +--INI-- +allow_url_fopen=1 --SKIPIF-- <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> --FILE-- diff --git a/ext/standard/tests/http/bug53198.phpt b/ext/standard/tests/http/bug53198.phpt index fe26bc952..3c640fa9c 100644 --- a/ext/standard/tests/http/bug53198.phpt +++ b/ext/standard/tests/http/bug53198.phpt @@ -1,56 +1,57 @@ ---TEST--
-Bug #53198 (From: header cannot be changed with ini_set)
---SKIPIF--
-<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?>
---INI--
-from=teste@teste.pt
---FILE--
-<?php
-require 'server.inc';
-
-function do_test() {
-
- $responses = array(
- "data://text/plain,HTTP/1.0 200 OK\r\n\r\n",
- );
-
- $pid = http_server("tcp://127.0.0.1:12342", $responses, $output);
-
- foreach($responses as $r) {
-
- $fd = fopen('http://127.0.0.1:12342/', 'rb', false);
-
- fseek($output, 0, SEEK_SET);
- var_dump(stream_get_contents($output));
- fseek($output, 0, SEEK_SET);
- }
-
- http_server_kill($pid);
-
-}
-
-echo "-- Test: leave default --\n";
-
-do_test();
-
-echo "-- Test: after ini_set --\n";
-
-ini_set('from', 'junk@junk.com');
-
-do_test();
-
-?>
---EXPECT--
--- Test: leave default --
-string(63) "GET / HTTP/1.0
-From: teste@teste.pt
-Host: 127.0.0.1:12342
-
-"
--- Test: after ini_set --
-string(62) "GET / HTTP/1.0
-From: junk@junk.com
-Host: 127.0.0.1:12342
-
-"
-
+--TEST-- +Bug #53198 (From: header cannot be changed with ini_set) +--SKIPIF-- +<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> +--INI-- +allow_url_fopen=1 +from=teste@teste.pt +--FILE-- +<?php +require 'server.inc'; + +function do_test() { + + $responses = array( + "data://text/plain,HTTP/1.0 200 OK\r\n\r\n", + ); + + $pid = http_server("tcp://127.0.0.1:12342", $responses, $output); + + foreach($responses as $r) { + + $fd = fopen('http://127.0.0.1:12342/', 'rb', false); + + fseek($output, 0, SEEK_SET); + var_dump(stream_get_contents($output)); + fseek($output, 0, SEEK_SET); + } + + http_server_kill($pid); + +} + +echo "-- Test: leave default --\n"; + +do_test(); + +echo "-- Test: after ini_set --\n"; + +ini_set('from', 'junk@junk.com'); + +do_test(); + +?> +--EXPECT-- +-- Test: leave default -- +string(63) "GET / HTTP/1.0 +From: teste@teste.pt +Host: 127.0.0.1:12342 + +" +-- Test: after ini_set -- +string(62) "GET / HTTP/1.0 +From: junk@junk.com +Host: 127.0.0.1:12342 + +" + diff --git a/ext/standard/tests/http/bug60570.phpt b/ext/standard/tests/http/bug60570.phpt new file mode 100644 index 000000000..d1784b055 --- /dev/null +++ b/ext/standard/tests/http/bug60570.phpt @@ -0,0 +1,53 @@ +--TEST-- +Bug #60570 (Stream context leaks when http request fails) +--SKIPIF-- +<?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> +--INI-- +allow_url_fopen=1 +allow_url_include=1 +--FILE-- +<?php +require 'server.inc'; + +function do_test() { + + $responses = array( + "data://text/plain,HTTP/1.0 404 Not Found\r\n\r\n", + "data://text/plain,HTTP/1.0 404 Not Found\r\n\r\n", + "data://text/plain,HTTP/1.0 404 Not Found\r\n\r\n" + ); + + $pid = http_server("tcp://127.0.0.1:12342", $responses, $output); + + $a = $b = null; + + $i = 3; + while ($i--) { + $context = stream_context_create(array('http'=>array('timeout'=>1))); + file_get_contents('http://127.0.0.1:12342/', 0, $context); + unset($context); + + $b = $a; + $a = memory_get_usage(); + } + + http_server_kill($pid); + + echo "leak? penultimate iteration: $b, last one: $a\n"; + var_dump($a == $b); +} + +do_test(); + +--EXPECTF-- +Warning: file_get_contents(http://127.0.0.1:12342/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found + in %s on line %d + +Warning: file_get_contents(http://127.0.0.1:12342/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found + in %s on line %d + +Warning: file_get_contents(http://127.0.0.1:12342/): failed to open stream: HTTP request failed! HTTP/1.0 404 Not Found + in %s on line %d +leak? penultimate iteration: %d, last one: %d +bool(true) + diff --git a/ext/standard/tests/http/ignore_errors.phpt b/ext/standard/tests/http/ignore_errors.phpt index c7e1acbfe..ab5421890 100644 --- a/ext/standard/tests/http/ignore_errors.phpt +++ b/ext/standard/tests/http/ignore_errors.phpt @@ -1,5 +1,7 @@ --TEST-- http:// and ignore_errors +--INI-- +allow_url_fopen=1 --SKIPIF-- <?php require 'server.inc'; http_server_skipif('tcp://127.0.0.1:12342'); ?> --FILE-- diff --git a/ext/gd/tests/image_type_to_mime_type_basic.phpt b/ext/standard/tests/image/image_type_to_mime_type_basic.phpt index b81bdbde5..b81bdbde5 100644 --- a/ext/gd/tests/image_type_to_mime_type_basic.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type_basic.phpt diff --git a/ext/gd/tests/image_type_to_mime_type_error.phpt b/ext/standard/tests/image/image_type_to_mime_type_error.phpt index 88aacbf17..88aacbf17 100644 --- a/ext/gd/tests/image_type_to_mime_type_error.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type_error.phpt diff --git a/ext/gd/tests/image_type_to_mime_type_variation1.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt index 0023b7125..0023b7125 100644 --- a/ext/gd/tests/image_type_to_mime_type_variation1.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type_variation1.phpt diff --git a/ext/gd/tests/image_type_to_mime_type_variation2.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation2.phpt index 141bc576f..141bc576f 100644 --- a/ext/gd/tests/image_type_to_mime_type_variation2.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type_variation2.phpt diff --git a/ext/gd/tests/image_type_to_mime_type_variation4.phpt b/ext/standard/tests/image/image_type_to_mime_type_variation4.phpt index a67bb86a6..a67bb86a6 100644 --- a/ext/gd/tests/image_type_to_mime_type_variation4.phpt +++ b/ext/standard/tests/image/image_type_to_mime_type_variation4.phpt diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt b/ext/standard/tests/misc/time_sleep_until_basic.phpt index 956985a62..9ae912881 100644 --- a/ext/standard/tests/misc/time_sleep_until_basic.phpt +++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt @@ -1,16 +1,20 @@ --TEST-- time_sleep_until() function - basic test for time_sleep_until() --SKIPIF-- -<?php if (!function_exists("time_sleep_until")) die('skip time_sleep_until() not available');?> +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (!function_exists("time_sleep_until")) die('skip time_sleep_until() not available'); +?> --CREDITS-- Manuel Baldassarri mb@ideato.it Michele Orselli mo@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 --FILE-- <?php - $time = time() + 2; - time_sleep_until( $time ); - var_dump( time() >= $time ); + $time = microtime(true) + 2; + var_dump(time_sleep_until( (int)$time )); + var_dump(microtime(true) >= (int)$time); ?> --EXPECT-- bool(true) +bool(true) diff --git a/ext/standard/tests/network/bug41347.phpt b/ext/standard/tests/network/bug41347.phpt index 21fc002fa..6ece09819 100644 --- a/ext/standard/tests/network/bug41347.phpt +++ b/ext/standard/tests/network/bug41347.phpt @@ -1,11 +1,5 @@ --TEST-- dns_check_record() segfault with empty host ---SKIPIF-- -<?php -if (substr(PHP_OS, 0, 3) == 'WIN') { - die('skip No windows support'); -} -?> --FILE-- <?php var_dump(dns_check_record('')); diff --git a/ext/standard/tests/network/gethostbyaddr_basic1.phpt b/ext/standard/tests/network/gethostbyaddr_basic1.phpt index 2232d3626..a20b4756c 100644 --- a/ext/standard/tests/network/gethostbyaddr_basic1.phpt +++ b/ext/standard/tests/network/gethostbyaddr_basic1.phpt @@ -14,5 +14,5 @@ echo gethostbyaddr("127.0.0.1")."\n"; ===DONE=== --EXPECTF-- *** Testing gethostbyaddr() : basic functionality *** -%rloopback|localhost(\.localdomain)?%r -===DONE===
\ No newline at end of file +%rloopback|localhost(\.localdomain)?|%s%r +===DONE=== diff --git a/ext/standard/tests/network/gethostbyname_basic001.phpt b/ext/standard/tests/network/gethostbyname_basic001.phpt index 0cfc1b4f5..e917b5992 100644 --- a/ext/standard/tests/network/gethostbyname_basic001.phpt +++ b/ext/standard/tests/network/gethostbyname_basic001.phpt @@ -2,6 +2,10 @@ gethostbyname() function - basic type return test --CREDITS-- "Sylvain R." <sracine@phpquebec.org> +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +?> --FILE-- <?php var_dump(is_string(gethostbyname("www.php.net"))); diff --git a/ext/standard/tests/network/gethostbyname_basic002.phpt b/ext/standard/tests/network/gethostbyname_basic002.phpt index b4e191bfc..983faa929 100644 --- a/ext/standard/tests/network/gethostbyname_basic002.phpt +++ b/ext/standard/tests/network/gethostbyname_basic002.phpt @@ -2,6 +2,10 @@ gethostbyname() function - basic invalid parameter test --CREDITS-- "Sylvain R." <sracine@phpquebec.org> +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +?> --FILE-- <?php $ip = gethostbyname("www.php.net"); diff --git a/ext/standard/tests/network/gethostbyname_error004.phpt b/ext/standard/tests/network/gethostbyname_error004.phpt index 1d0f7d7a1..7aac17292 100644 --- a/ext/standard/tests/network/gethostbyname_error004.phpt +++ b/ext/standard/tests/network/gethostbyname_error004.phpt @@ -2,6 +2,10 @@ gethostbyname() function - basic return valid ip address test --CREDITS-- "Sylvain R." <sracine@phpquebec.org> +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +?> --FILE-- <?php $ip = gethostbyname("www.php.net"); diff --git a/ext/standard/tests/network/getmxrr.phpt b/ext/standard/tests/network/getmxrr.phpt index b6753f0d6..29cea1d71 100644 --- a/ext/standard/tests/network/getmxrr.phpt +++ b/ext/standard/tests/network/getmxrr.phpt @@ -2,13 +2,14 @@ getmxrr() test --SKIPIF-- <?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip: no Windows support'); } ?> --FILE-- <?php -$domains = array( 'php.net', 'lists.php.net' ); +$domains = array( 'mx1.tests.php.net', 'mx2.tests.php.net' ); foreach ( $domains as $domain ) { if ( getmxrr( $domain, $hosts, $weights ) ) @@ -18,5 +19,5 @@ foreach ( $domains as $domain ) } ?> --EXPECT-- -Hosts: 2, weights: 2 Hosts: 1, weights: 1 +Hosts: 2, weights: 2 diff --git a/ext/standard/tests/network/http-stream.phpt b/ext/standard/tests/network/http-stream.phpt index e70caf982..6ee035a24 100644 --- a/ext/standard/tests/network/http-stream.phpt +++ b/ext/standard/tests/network/http-stream.phpt @@ -1,7 +1,10 @@ --TEST-- http-stream test --SKIPIF-- -<?php if (!extension_loaded("dom")) die("skip dom extension is not present"); ?> +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (!extension_loaded("dom")) die("skip dom extension is not present"); +?> --INI-- allow_url_fopen=1 --FILE-- diff --git a/ext/standard/tests/network/ip2long_variation1.phpt b/ext/standard/tests/network/ip2long_variation1.phpt index ac3c9c81e..ca67aa41a 100644 --- a/ext/standard/tests/network/ip2long_variation1.phpt +++ b/ext/standard/tests/network/ip2long_variation1.phpt @@ -1,5 +1,10 @@ --TEST-- Test ip2long() function : usage variation +--SKIPIF-- +<?php +if(substr(PHP_OS, 0, 3) == "WIN") + die("skip. Windows is more compliant (like 0 for localhost, etc.)"); +?> --FILE-- <?php /* Prototype : int ip2long(string ip_address) diff --git a/ext/standard/tests/php_ini_loaded_file.phpt b/ext/standard/tests/php_ini_loaded_file.phpt index 7958eb127..747e0196f 100644 --- a/ext/standard/tests/php_ini_loaded_file.phpt +++ b/ext/standard/tests/php_ini_loaded_file.phpt @@ -11,4 +11,4 @@ precision=12 var_dump(php_ini_loaded_file()); ?> --EXPECTF-- -string(%d) "%s/tmp-php.ini" +string(%d) "%sphp.ini" diff --git a/ext/standard/tests/serialize/bug55798.phpt b/ext/standard/tests/serialize/bug55798.phpt new file mode 100644 index 000000000..df8443b1f --- /dev/null +++ b/ext/standard/tests/serialize/bug55798.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #55798 (serialize followed by unserialize with numeric object prop. gives integer prop) +--FILE-- +<?php + +$a = new stdClass(); +$a->{0} = 'X'; +$a->{1} = 'Y'; +var_dump(serialize($a)); +var_dump($a->{0}); +$b = unserialize(serialize($a)); +var_dump(serialize($b)); +var_dump($b->{0}); +--EXPECT-- +string(51) "O:8:"stdClass":2:{s:1:"0";s:1:"X";s:1:"1";s:1:"Y";}" +string(1) "X" +string(51) "O:8:"stdClass":2:{s:1:"0";s:1:"X";s:1:"1";s:1:"Y";}" +string(1) "X" diff --git a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt Binary files differindex 038068249..8b974d475 100644 --- a/ext/standard/tests/serialize/serialization_miscTypes_001.phpt +++ b/ext/standard/tests/serialize/serialization_miscTypes_001.phpt diff --git a/ext/standard/tests/streams/bug46024.phpt b/ext/standard/tests/streams/bug46024.phpt index 3f2a5f836..fdfd03ee2 100644 --- a/ext/standard/tests/streams/bug46024.phpt +++ b/ext/standard/tests/streams/bug46024.phpt @@ -4,7 +4,7 @@ Bug #46024 stream_select() doesn't return the correct number <?php if (!getenv('TEST_PHP_EXECUTABLE')) die("skip TEST_PHP_EXECUTABLE not defined"); ?> --FILE-- <?php -$php = getenv('TEST_PHP_EXECUTABLE'); +$php = realpath(getenv('TEST_PHP_EXECUTABLE')); $pipes = array(); $proc = proc_open( "$php -n -i" diff --git a/ext/standard/tests/streams/bug54946.phpt b/ext/standard/tests/streams/bug54946.phpt index b3fa73df5..b51d593a9 100644 --- a/ext/standard/tests/streams/bug54946.phpt +++ b/ext/standard/tests/streams/bug54946.phpt @@ -2,33 +2,32 @@ Bug#54946 stream_get_contents infinite loop --FILE-- <?php -$filename = tempnam(sys_get_temp_dir(), "phpbug"); - +$filename = tempnam(__DIR__, "phpbug"); $stream = fopen($filename, "w"); // w or a $retval = stream_get_contents($stream, 1, 1); - +fclose($stream); var_dump($retval); unlink($filename); -$filename = tempnam(sys_get_temp_dir(), "phpbug2"); +$filename = tempnam(__DIR__, "phpbug2"); $stream = fopen($filename, "a"); $retval = stream_get_contents($stream, 1, 1); - var_dump($retval); +fclose($stream); unlink($filename); -$filename = tempnam(sys_get_temp_dir(), "phpbug3"); +$filename = tempnam(__DIR__, "phpbug3"); $stream = fopen($filename, "a"); fseek($stream, 1); $retval = stream_get_contents($stream, 1); - var_dump($retval); +fclose($stream); unlink($filename); ?> ===DONE=== diff --git a/ext/standard/tests/streams/bug60455_01.phpt b/ext/standard/tests/streams/bug60455_01.phpt new file mode 100644 index 000000000..466998201 --- /dev/null +++ b/ext/standard/tests/streams/bug60455_01.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #60455: stream_get_line and 1-line noeol input +--FILE-- +<?php + +//It's critical the read on the stream returns the input but doesn't set EOF +//flag the first time. This is why we need to use sockets. + +$domain = (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' ? STREAM_PF_INET : STREAM_PF_UNIX); +$sockets = stream_socket_pair($domain, STREAM_SOCK_STREAM, STREAM_IPPROTO_IP) + or die("stream_socket_pair"); +fwrite($sockets[0], "a"); +stream_socket_shutdown($sockets[0], STREAM_SHUT_RDWR); + +$f = $sockets[1]; +while (!feof($f)) { + $line = stream_get_line($f, 99, "\n"); + var_dump($line); +} +--EXPECT-- +string(1) "a" diff --git a/ext/standard/tests/streams/bug60455_02.phpt b/ext/standard/tests/streams/bug60455_02.phpt new file mode 100644 index 000000000..6e06e9fa3 --- /dev/null +++ b/ext/standard/tests/streams/bug60455_02.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #60455: stream_get_line and 1-line followed by eol input +--FILE-- +<?php +class TestStream { + private $s = 0; + function stream_open($path, $mode, $options, &$opened_path) { + return true; + } + function stream_read($count) { + if ($this->s++ == 0) + return "a\n"; + + return ""; + } + function stream_eof() { + return $this->s >= 2; + } + +} + +stream_wrapper_register("test", "TestStream"); + +$f = fopen("test://", "r"); +while (!feof($f)) { + $line = stream_get_line($f, 99, "\n"); + var_dump($line); +} +--EXPECT-- +string(1) "a" diff --git a/ext/standard/tests/streams/bug60455_03.phpt b/ext/standard/tests/streams/bug60455_03.phpt new file mode 100644 index 000000000..5d7ba1f24 --- /dev/null +++ b/ext/standard/tests/streams/bug60455_03.phpt @@ -0,0 +1,53 @@ +--TEST-- +Bug #60455: stream_get_line and 2 lines, one possibly empty +--FILE-- +<?php +class TestStream { + private $lines = array(); + private $s = 0; + private $eofth = 3; + function stream_open($path, $mode, $options, &$opened_path) { + $this->lines[] = "a\n"; + $this->lines[] = ($path == "test://nonempty2nd" ? "b\n" : "\n"); + if ($path == "test://eofafter2nd") + $this->eofth = 2; + return true; + } + function stream_read($count) { + if (key_exists($this->s++, $this->lines)) + return $this->lines[$this->s - 1]; + + return ""; + } + function stream_eof() { + return $this->s >= $this->eofth; + } + +} + +stream_wrapper_register("test", "TestStream"); + +$f = fopen("test://nonempty2nd", "r"); +while (!feof($f)) { + $line = stream_get_line($f, 99, "\n"); + var_dump($line); +} +$f = fopen("test://", "r"); +while (!feof($f)) { + $line = stream_get_line($f, 99, "\n"); + var_dump($line); +} +$f = fopen("test://eofafter2nd", "r"); +while (!feof($f)) { + $line = stream_get_line($f, 99, "\n"); + var_dump($line); +} + + +--EXPECT-- +string(1) "a" +string(1) "b" +string(1) "a" +string(0) "" +string(1) "a" +string(0) "" diff --git a/ext/standard/tests/streams/stream_context_set_option_basic.phpt b/ext/standard/tests/streams/stream_context_set_option_basic.phpt new file mode 100644 index 000000000..63730ee99 --- /dev/null +++ b/ext/standard/tests/streams/stream_context_set_option_basic.phpt @@ -0,0 +1,37 @@ +--TEST-- +stream_context_set_option() function - basic test for stream_context_set_option() +--CREDITS-- +Jean-Marc Fontaine <jean-marc.fontaine@alterway.fr> +# Alter Way Contribution Day 2011 +--FILE-- +<?php +$context = stream_context_create(); + +// Single option +var_dump(stream_context_set_option($context, 'http', 'method', 'POST')); + +// Array of options +$options = array( + 'http' => array( + 'protocol_version' => 1.1, + 'user_agent' => 'PHPT Agent', + ), +); +var_dump(stream_context_set_option($context, $options)); + +var_dump(stream_context_get_options($context)); +?> +--EXPECT-- +bool(true) +bool(true) +array(1) { + ["http"]=> + array(3) { + ["method"]=> + string(4) "POST" + ["protocol_version"]=> + float(1.1) + ["user_agent"]=> + string(10) "PHPT Agent" + } +} diff --git a/ext/standard/tests/streams/stream_context_set_option_error_001.phpt b/ext/standard/tests/streams/stream_context_set_option_error_001.phpt new file mode 100644 index 000000000..04b37ca11 --- /dev/null +++ b/ext/standard/tests/streams/stream_context_set_option_error_001.phpt @@ -0,0 +1,21 @@ +--TEST-- +stream_context_set_option() function - error : invalid argument +--CREDITS-- +Jean-Marc Fontaine <jean-marc.fontaine@alterway.fr> +# Alter Way Contribution Day 2011 +--FILE-- +<?php +$context = stream_context_create(); + +// Single option +var_dump(stream_context_set_option($context, 'http')); + +// Array of options +var_dump(stream_context_set_option($context, array(), 'foo', 'bar')); +?> +--EXPECTF-- +Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d +bool(false) + +Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d +bool(false) diff --git a/ext/standard/tests/streams/stream_context_set_option_error_002.phpt b/ext/standard/tests/streams/stream_context_set_option_error_002.phpt new file mode 100644 index 000000000..e80fd39ed --- /dev/null +++ b/ext/standard/tests/streams/stream_context_set_option_error_002.phpt @@ -0,0 +1,18 @@ +--TEST-- +stream_context_set_option() function - error : missing argument +--CREDITS-- +Jean-Marc Fontaine <jean-marc.fontaine@alterway.fr> +# Alter Way Contribution Day 2011 +--FILE-- +<?php +var_dump(stream_context_set_option()); + +$context = stream_context_create(); +var_dump(stream_context_set_option($context)); +?> +--EXPECTF-- +Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d +bool(false) + +Warning: stream_context_set_option(): called with wrong number or type of parameters; please RTM in %s on line %d +bool(false) diff --git a/ext/standard/tests/strings/bug55674.phpt b/ext/standard/tests/strings/bug55674.phpt new file mode 100644 index 000000000..72ece642a --- /dev/null +++ b/ext/standard/tests/strings/bug55674.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #55674 (fgetcsv & str_getcsv skip empty fields in some tab-separated records) +--FILE-- +<?php +var_dump(str_getcsv("0\t\t\"2\"\n", "\t")); +var_dump(str_getcsv("0\t \t'2'\n", "\t", "'")); +var_dump(str_getcsv(",,,,")); +var_dump(str_getcsv(" \t \t\t\t ", "\t")); +?> +--EXPECT-- +array(3) { + [0]=> + string(1) "0" + [1]=> + string(0) "" + [2]=> + string(1) "2" +} +array(3) { + [0]=> + string(1) "0" + [1]=> + string(1) " " + [2]=> + string(1) "2" +} +array(5) { + [0]=> + string(0) "" + [1]=> + string(0) "" + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(0) "" +} +array(5) { + [0]=> + string(1) " " + [1]=> + string(2) " " + [2]=> + string(0) "" + [3]=> + string(0) "" + [4]=> + string(1) " " +} diff --git a/ext/standard/tests/strings/htmlentities_html4.phpt b/ext/standard/tests/strings/htmlentities_html4.phpt index d7bff707f..22b0305ce 100644 --- a/ext/standard/tests/strings/htmlentities_html4.phpt +++ b/ext/standard/tests/strings/htmlentities_html4.phpt @@ -1,9 +1,5 @@ --TEST-- htmlentities() conformance check (HTML 4) ---SKIPIF-- -<?php -if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); -?> --FILE-- <?php function utf32_utf8($k) { @@ -43,15 +39,23 @@ function utf32_utf8($k) { return $retval; } -for ($i = 0; $i < 0x110000; $i++) { +$table = get_html_translation_table(HTML_ENTITIES, ENT_QUOTES, 'UTF-8'); + +for ($i = 0; $i < 0x2710; $i++) { if ($i >= 0xd800 && $i < 0xe000) continue; $str = utf32_utf8($i); - $result = htmlentities($str, ENT_QUOTES, 'UTF-8'); - if ($str != $result) { - printf("%s\tU+%05X\n", $result, $i); - } + if (isset($table[$str])) { + printf("%s\tU+%05X\n", $table[$str], $i); + unset($table[$str]); + } } + +if (!empty($table)) { + echo "Not matched entities: "; + var_dump($table); +} + ?> --EXPECT-- " U+00022 diff --git a/ext/standard/tests/strings/md5_file.phpt b/ext/standard/tests/strings/md5_file.phpt Binary files differindex 879cd59aa..e5d015cdd 100644 --- a/ext/standard/tests/strings/md5_file.phpt +++ b/ext/standard/tests/strings/md5_file.phpt diff --git a/ext/standard/tests/strings/sha1_file.phpt b/ext/standard/tests/strings/sha1_file.phpt index 3013adc34..574d384c2 100644 --- a/ext/standard/tests/strings/sha1_file.phpt +++ b/ext/standard/tests/strings/sha1_file.phpt @@ -1,17 +1,5 @@ --TEST-- Test sha1_file() function with ASCII output and raw binary output. Based on ext/standard/tests/strings/md5_file.phpt ---SKIPIF-- -<?php - -$path = dirname(__FILE__); -$data_file = "$path/EmptyFile.txt"; -$data_file1 = "$path/DataFile.txt"; -if !(($fp = fopen($data_file, 'w')) || ($fp1 = fopen($data_file1, 'w')) { - echo "File could not be created ,hence exiting from testcase due to pre-requisite failure\n"; -} -fclose( $fp ); -fclose( $fp1 ); - --FILE-- <?php diff --git a/ext/standard/tests/strings/substr_replace_array.phpt b/ext/standard/tests/strings/substr_replace_array.phpt new file mode 100644 index 000000000..dbb8b1714 --- /dev/null +++ b/ext/standard/tests/strings/substr_replace_array.phpt @@ -0,0 +1,19 @@ +--TEST-- +substr_replace() function - array +--FILE-- +<?php + +$arr = array('abc' => 'llsskdkk','def' => 'llsskjkkdd', 4 => 'hello', 42 => 'world'); +$newarr = substr_replace($arr, 'zzz', 0, -2); + +print_r($newarr); + +?> +--EXPECTF-- +Array +( + [abc] => zzzkk + [def] => zzzdd + [4] => zzzlo + [42] => zzzld +) diff --git a/ext/standard/tests/url/bug55273.phpt b/ext/standard/tests/url/bug55273.phpt new file mode 100644 index 000000000..1408506b4 --- /dev/null +++ b/ext/standard/tests/url/bug55273.phpt @@ -0,0 +1,25 @@ +--TEST-- +Bug #55273 (base64_decode() with strict rejects whitespace after pad) +--FILE-- +<?php +function test($s) { + $v = chunk_split(base64_encode($s)); + $r = base64_decode($v, True); + var_dump($v, $r); +} + +test('PHP'); +test('PH'); +test('P'); + +?> +--EXPECT-- +string(6) "UEhQ +" +string(3) "PHP" +string(6) "UEg= +" +string(2) "PH" +string(6) "UA== +" +string(1) "P" diff --git a/ext/standard/type.c b/ext/standard/type.c index 9f28c2874..e49711969 100644 --- a/ext/standard/type.c +++ b/ext/standard/type.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: type.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: type.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_incomplete_class.h" diff --git a/ext/standard/uniqid.c b/ext/standard/uniqid.c index 5c969fb48..7aafd7d22 100644 --- a/ext/standard/uniqid.c +++ b/ext/standard/uniqid.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uniqid.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: uniqid.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" diff --git a/ext/standard/uniqid.h b/ext/standard/uniqid.h index e78308392..a218efa9b 100644 --- a/ext/standard/uniqid.h +++ b/ext/standard/uniqid.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uniqid.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: uniqid.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef UNIQID_H #define UNIQID_H diff --git a/ext/standard/url.c b/ext/standard/url.c index 22a8471be..365415e08 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: url.c 314783 2011-08-11 13:01:52Z iliaa $ */ +/* $Id: url.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdlib.h> #include <string.h> diff --git a/ext/standard/url.h b/ext/standard/url.h index 9a2bcfaaa..66b3ad893 100644 --- a/ext/standard/url.h +++ b/ext/standard/url.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: url.h 307432 2011-01-13 07:27:46Z stas $ */ +/* $Id: url.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef URL_H #define URL_H diff --git a/ext/standard/url_scanner_ex.c.orig b/ext/standard/url_scanner_ex.c.orig deleted file mode 100644 index 1ffa3698f..000000000 --- a/ext/standard/url_scanner_ex.c.orig +++ /dev/null @@ -1,1109 +0,0 @@ -/* Generated by re2c 0.13.5 on Fri Dec 31 23:52:51 2010 */ -#line 1 "ext/standard/url_scanner_ex.re" -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Sascha Schumann <sascha@schumann.cx> | - +----------------------------------------------------------------------+ -*/ - -/* $Id: url_scanner_ex.c 313832 2011-07-28 10:52:45Z pajoye $ */ - -#include "php.h" - -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif -#ifdef HAVE_LIMITS_H -#include <limits.h> -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "php_ini.h" -#include "php_globals.h" -#define STATE_TAG SOME_OTHER_STATE_TAG -#include "basic_functions.h" -#include "url.h" -#undef STATE_TAG - -#define url_scanner url_scanner_ex - -#include "php_smart_str.h" - -static PHP_INI_MH(OnUpdateTags) -{ - url_adapt_state_ex_t *ctx; - char *key; - char *lasts; - char *tmp; - - ctx = &BG(url_adapt_state_ex); - - tmp = estrndup(new_value, new_value_length); - - if (ctx->tags) - zend_hash_destroy(ctx->tags); - else { - ctx->tags = malloc(sizeof(HashTable)); - if (!ctx->tags) { - return FAILURE; - } - } - zend_hash_init(ctx->tags, 0, NULL, NULL, 1); - - for (key = php_strtok_r(tmp, ",", &lasts); - key; - key = php_strtok_r(NULL, ",", &lasts)) { - char *val; - - val = strchr(key, '='); - if (val) { - char *q; - int keylen; - - *val++ = '\0'; - for (q = key; *q; q++) - *q = tolower(*q); - keylen = q - key; - /* key is stored withOUT NUL - val is stored WITH NUL */ - zend_hash_add(ctx->tags, key, keylen, val, strlen(val)+1, NULL); - } - } - - efree(tmp); - - return SUCCESS; -} - -PHP_INI_BEGIN() - STD_PHP_INI_ENTRY("url_rewriter.tags", "a=href,area=href,frame=src,form=,fieldset=", PHP_INI_ALL, OnUpdateTags, url_adapt_state_ex, php_basic_globals, basic_globals) -PHP_INI_END() - -#line 98 "ext/standard/url_scanner_ex.re" - - -#define YYFILL(n) goto done -#define YYCTYPE unsigned char -#define YYCURSOR p -#define YYLIMIT q -#define YYMARKER r - -static inline void append_modified_url(smart_str *url, smart_str *dest, smart_str *url_app, const char *separator) -{ - register const char *p, *q; - const char *bash = NULL; - const char *sep = "?"; - - q = (p = url->c) + url->len; - -scan: - -#line 114 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 128, 128, 128, 128, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy8; - } - if (yych <= '9') goto yy6; - if (yych >= ';') goto yy4; - ++YYCURSOR; -#line 116 "ext/standard/url_scanner_ex.re" - { smart_str_append(dest, url); return; } -#line 162 "ext/standard/url_scanner_ex.c" -yy4: - ++YYCURSOR; -#line 117 "ext/standard/url_scanner_ex.re" - { sep = separator; goto scan; } -#line 167 "ext/standard/url_scanner_ex.c" -yy6: - ++YYCURSOR; -#line 118 "ext/standard/url_scanner_ex.re" - { bash = p - 1; goto done; } -#line 172 "ext/standard/url_scanner_ex.c" -yy8: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy8; - } -#line 119 "ext/standard/url_scanner_ex.re" - { goto scan; } -#line 182 "ext/standard/url_scanner_ex.c" -} -#line 120 "ext/standard/url_scanner_ex.re" - -done: - - /* Don't modify URLs of the format "#mark" */ - if (bash && bash - url->c == 0) { - smart_str_append(dest, url); - return; - } - - if (bash) - smart_str_appendl(dest, url->c, bash - url->c); - else - smart_str_append(dest, url); - - smart_str_appends(dest, sep); - smart_str_append(dest, url_app); - - if (bash) - smart_str_appendl(dest, bash, q - bash); -} - - -#undef YYFILL -#undef YYCTYPE -#undef YYCURSOR -#undef YYLIMIT -#undef YYMARKER - -static inline void tag_arg(url_adapt_state_ex_t *ctx, char quotes, char type TSRMLS_DC) -{ - char f = 0; - - if (strncasecmp(ctx->arg.c, ctx->lookup_data, ctx->arg.len) == 0) - f = 1; - - if (quotes) - smart_str_appendc(&ctx->result, type); - if (f) { - append_modified_url(&ctx->val, &ctx->result, &ctx->url_app, PG(arg_separator).output); - } else { - smart_str_append(&ctx->result, &ctx->val); - } - if (quotes) - smart_str_appendc(&ctx->result, type); -} - -enum { - STATE_PLAIN = 0, - STATE_TAG, - STATE_NEXT_ARG, - STATE_ARG, - STATE_BEFORE_VAL, - STATE_VAL -}; - -#define YYFILL(n) goto stop -#define YYCTYPE unsigned char -#define YYCURSOR xp -#define YYLIMIT end -#define YYMARKER q -#define STATE ctx->state - -#define STD_PARA url_adapt_state_ex_t *ctx, char *start, char *YYCURSOR TSRMLS_DC -#define STD_ARGS ctx, start, xp TSRMLS_CC - -#if SCANNER_DEBUG -#define scdebug(x) printf x -#else -#define scdebug(x) -#endif - -static inline void passthru(STD_PARA) -{ - scdebug(("appending %d chars, starting with %c\n", YYCURSOR-start, *start)); - smart_str_appendl(&ctx->result, start, YYCURSOR - start); -} - -/* - * This function appends a hidden input field after a <form> or - * <fieldset>. The latter is important for XHTML. - */ - -static void handle_form(STD_PARA) -{ - int doit = 0; - - if (ctx->form_app.len > 0) { - switch (ctx->tag.len) { - case sizeof("form") - 1: - if (!strncasecmp(ctx->tag.c, "form", sizeof("form") - 1)) { - doit = 1; - } - if (doit && ctx->val.c && ctx->lookup_data && *ctx->lookup_data) { - char *e, *p = zend_memnstr(ctx->val.c, "://", sizeof("://") - 1, ctx->val.c + ctx->val.len); - if (p) { - e = memchr(p, '/', (ctx->val.c + ctx->val.len) - p); - if (!e) { - e = ctx->val.c + ctx->val.len; - } - if ((e - p) && strncasecmp(p, ctx->lookup_data, (e - p))) { - doit = 0; - } - } - } - break; - - case sizeof("fieldset") - 1: - if (!strncasecmp(ctx->tag.c, "fieldset", sizeof("fieldset") - 1)) { - doit = 1; - } - break; - } - - if (doit) - smart_str_append(&ctx->result, &ctx->form_app); - } -} - -/* - * HANDLE_TAG copies the HTML Tag and checks whether we - * have that tag in our table. If we might modify it, - * we continue to scan the tag, otherwise we simply copy the complete - * HTML stuff to the result buffer. - */ - -static inline void handle_tag(STD_PARA) -{ - int ok = 0; - int i; - - ctx->tag.len = 0; - smart_str_appendl(&ctx->tag, start, YYCURSOR - start); - for (i = 0; i < ctx->tag.len; i++) - ctx->tag.c[i] = tolower((int)(unsigned char)ctx->tag.c[i]); - if (zend_hash_find(ctx->tags, ctx->tag.c, ctx->tag.len, (void **) &ctx->lookup_data) == SUCCESS) - ok = 1; - STATE = ok ? STATE_NEXT_ARG : STATE_PLAIN; -} - -static inline void handle_arg(STD_PARA) -{ - ctx->arg.len = 0; - smart_str_appendl(&ctx->arg, start, YYCURSOR - start); -} - -static inline void handle_val(STD_PARA, char quotes, char type) -{ - smart_str_setl(&ctx->val, start + quotes, YYCURSOR - start - quotes * 2); - tag_arg(ctx, quotes, type TSRMLS_CC); -} - -static inline void xx_mainloop(url_adapt_state_ex_t *ctx, const char *newdata, size_t newlen TSRMLS_DC) -{ - char *end, *q; - char *xp; - char *start; - int rest; - - smart_str_appendl(&ctx->buf, newdata, newlen); - - YYCURSOR = ctx->buf.c; - YYLIMIT = ctx->buf.c + ctx->buf.len; - - switch (STATE) { - case STATE_PLAIN: goto state_plain; - case STATE_TAG: goto state_tag; - case STATE_NEXT_ARG: goto state_next_arg; - case STATE_ARG: goto state_arg; - case STATE_BEFORE_VAL: goto state_before_val; - case STATE_VAL: goto state_val; - } - - -state_plain_begin: - STATE = STATE_PLAIN; - -state_plain: - start = YYCURSOR; - -#line 364 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 0, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - }; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy15; - } - ++YYCURSOR; -#line 299 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); STATE = STATE_TAG; goto state_tag; } -#line 409 "ext/standard/url_scanner_ex.c" -yy15: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy15; - } -#line 300 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); goto state_plain; } -#line 419 "ext/standard/url_scanner_ex.c" -} -#line 301 "ext/standard/url_scanner_ex.re" - - -state_tag: - start = YYCURSOR; - -#line 427 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 128, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= '@') { - if (yych != ':') goto yy22; - } else { - if (yych <= 'Z') goto yy20; - if (yych <= '`') goto yy22; - if (yych >= '{') goto yy22; - } -yy20: - ++YYCURSOR; - yych = *YYCURSOR; - goto yy25; -yy21: -#line 306 "ext/standard/url_scanner_ex.re" - { handle_tag(STD_ARGS); /* Sets STATE */; passthru(STD_ARGS); if (STATE == STATE_PLAIN) goto state_plain; else goto state_next_arg; } -#line 480 "ext/standard/url_scanner_ex.c" -yy22: - ++YYCURSOR; -#line 307 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); goto state_plain_begin; } -#line 485 "ext/standard/url_scanner_ex.c" -yy24: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy25: - if (yybm[0+yych] & 128) { - goto yy24; - } - goto yy21; -} -#line 308 "ext/standard/url_scanner_ex.re" - - -state_next_arg_begin: - STATE = STATE_NEXT_ARG; - -state_next_arg: - start = YYCURSOR; - -#line 505 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= ' ') { - if (yych <= '\f') { - if (yych <= 0x08) goto yy34; - if (yych <= '\v') goto yy30; - goto yy34; - } else { - if (yych <= '\r') goto yy30; - if (yych <= 0x1F) goto yy34; - goto yy30; - } - } else { - if (yych <= '@') { - if (yych != '>') goto yy34; - } else { - if (yych <= 'Z') goto yy32; - if (yych <= '`') goto yy34; - if (yych <= 'z') goto yy32; - goto yy34; - } - } - ++YYCURSOR; -#line 316 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); handle_form(STD_ARGS); goto state_plain_begin; } -#line 567 "ext/standard/url_scanner_ex.c" -yy30: - ++YYCURSOR; - yych = *YYCURSOR; - goto yy37; -yy31: -#line 317 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); goto state_next_arg; } -#line 575 "ext/standard/url_scanner_ex.c" -yy32: - ++YYCURSOR; -#line 318 "ext/standard/url_scanner_ex.re" - { --YYCURSOR; STATE = STATE_ARG; goto state_arg; } -#line 580 "ext/standard/url_scanner_ex.c" -yy34: - ++YYCURSOR; -#line 319 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); goto state_plain_begin; } -#line 585 "ext/standard/url_scanner_ex.c" -yy36: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy37: - if (yybm[0+yych] & 128) { - goto yy36; - } - goto yy31; -} -#line 320 "ext/standard/url_scanner_ex.re" - - -state_arg: - start = YYCURSOR; - -#line 602 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 128, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 0, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 128, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= '@') goto yy42; - if (yych <= 'Z') goto yy40; - if (yych <= '`') goto yy42; - if (yych >= '{') goto yy42; -yy40: - ++YYCURSOR; - yych = *YYCURSOR; - goto yy45; -yy41: -#line 325 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); handle_arg(STD_ARGS); STATE = STATE_BEFORE_VAL; goto state_before_val; } -#line 652 "ext/standard/url_scanner_ex.c" -yy42: - ++YYCURSOR; -#line 326 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); STATE = STATE_NEXT_ARG; goto state_next_arg; } -#line 657 "ext/standard/url_scanner_ex.c" -yy44: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy45: - if (yybm[0+yych] & 128) { - goto yy44; - } - goto yy41; -} -#line 327 "ext/standard/url_scanner_ex.re" - - -state_before_val: - start = YYCURSOR; - -#line 674 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych == ' ') goto yy48; - if (yych == '=') goto yy50; - goto yy52; -yy48: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ' ') goto yy55; - if (yych == '=') goto yy53; -yy49: -#line 333 "ext/standard/url_scanner_ex.re" - { --YYCURSOR; goto state_next_arg_begin; } -#line 723 "ext/standard/url_scanner_ex.c" -yy50: - ++YYCURSOR; - yych = *YYCURSOR; - goto yy54; -yy51: -#line 332 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); STATE = STATE_VAL; goto state_val; } -#line 731 "ext/standard/url_scanner_ex.c" -yy52: - yych = *++YYCURSOR; - goto yy49; -yy53: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy54: - if (yybm[0+yych] & 128) { - goto yy53; - } - goto yy51; -yy55: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych == ' ') goto yy55; - if (yych == '=') goto yy53; - YYCURSOR = YYMARKER; - goto yy49; -} -#line 334 "ext/standard/url_scanner_ex.re" - - - -state_val: - start = YYCURSOR; - -#line 760 "ext/standard/url_scanner_ex.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 160, 160, 248, 248, 160, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 160, 248, 56, 248, 248, 248, 248, 200, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 0, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, - }; - if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3); - yych = *YYCURSOR; - if (yych <= ' ') { - if (yych <= '\f') { - if (yych <= 0x08) goto yy63; - if (yych <= '\n') goto yy64; - goto yy63; - } else { - if (yych <= '\r') goto yy64; - if (yych <= 0x1F) goto yy63; - goto yy64; - } - } else { - if (yych <= '&') { - if (yych != '"') goto yy63; - } else { - if (yych <= '\'') goto yy62; - if (yych == '>') goto yy64; - goto yy63; - } - } - yych = *(YYMARKER = ++YYCURSOR); - goto yy77; -yy61: -#line 342 "ext/standard/url_scanner_ex.re" - { handle_val(STD_ARGS, 0, ' '); goto state_next_arg_begin; } -#line 823 "ext/standard/url_scanner_ex.c" -yy62: - yych = *(YYMARKER = ++YYCURSOR); - goto yy69; -yy63: - yych = *++YYCURSOR; - goto yy67; -yy64: - ++YYCURSOR; -#line 343 "ext/standard/url_scanner_ex.re" - { passthru(STD_ARGS); goto state_next_arg_begin; } -#line 834 "ext/standard/url_scanner_ex.c" -yy66: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; -yy67: - if (yybm[0+yych] & 8) { - goto yy66; - } - goto yy61; -yy68: - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; -yy69: - if (yybm[0+yych] & 16) { - goto yy68; - } - if (yych <= '&') goto yy72; - if (yych >= '(') goto yy61; - ++YYCURSOR; - if (yybm[0+(yych = *YYCURSOR)] & 8) { - goto yy66; - } -yy71: -#line 341 "ext/standard/url_scanner_ex.re" - { handle_val(STD_ARGS, 1, '\''); goto state_next_arg_begin; } -#line 861 "ext/standard/url_scanner_ex.c" -yy72: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 32) { - goto yy72; - } - if (yych <= '=') goto yy75; -yy74: - YYCURSOR = YYMARKER; - goto yy61; -yy75: - yych = *++YYCURSOR; - goto yy71; -yy76: - YYMARKER = ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; -yy77: - if (yybm[0+yych] & 64) { - goto yy76; - } - if (yych <= '!') goto yy80; - if (yych >= '#') goto yy61; - ++YYCURSOR; - if (yybm[0+(yych = *YYCURSOR)] & 8) { - goto yy66; - } -yy79: -#line 340 "ext/standard/url_scanner_ex.re" - { handle_val(STD_ARGS, 1, '"'); goto state_next_arg_begin; } -#line 893 "ext/standard/url_scanner_ex.c" -yy80: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy80; - } - if (yych >= '>') goto yy74; - ++YYCURSOR; - yych = *YYCURSOR; - goto yy79; -} -#line 344 "ext/standard/url_scanner_ex.re" - - -stop: - rest = YYLIMIT - start; - scdebug(("stopped in state %d at pos %d (%d:%c) %d\n", STATE, YYCURSOR - ctx->buf.c, *YYCURSOR, *YYCURSOR, rest)); - /* XXX: Crash avoidance. Need to work with reporter to figure out what goes wrong */ - if (rest < 0) rest = 0; - - if (rest) memmove(ctx->buf.c, start, rest); - ctx->buf.len = rest; -} - -char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen TSRMLS_DC) -{ - smart_str surl = {0}; - smart_str buf = {0}; - smart_str url_app = {0}; - - smart_str_setl(&surl, url, urllen); - - smart_str_appends(&url_app, name); - smart_str_appendc(&url_app, '='); - smart_str_appends(&url_app, value); - - append_modified_url(&surl, &buf, &url_app, PG(arg_separator).output); - - smart_str_0(&buf); - if (newlen) *newlen = buf.len; - - smart_str_free(&url_app); - - return buf.c; -} - - -static char *url_adapt_ext(const char *src, size_t srclen, size_t *newlen, zend_bool do_flush TSRMLS_DC) -{ - url_adapt_state_ex_t *ctx; - char *retval; - - ctx = &BG(url_adapt_state_ex); - - xx_mainloop(ctx, src, srclen TSRMLS_CC); - - *newlen = ctx->result.len; - if (!ctx->result.c) { - smart_str_appendl(&ctx->result, "", 0); - } - smart_str_0(&ctx->result); - if (do_flush) { - smart_str_appendl(&ctx->result, ctx->buf.c, ctx->buf.len); - *newlen += ctx->buf.len; - smart_str_free(&ctx->buf); - } - retval = ctx->result.c; - ctx->result.c = NULL; - ctx->result.len = 0; - return retval; -} - -static int php_url_scanner_ex_activate(TSRMLS_D) -{ - url_adapt_state_ex_t *ctx; - - ctx = &BG(url_adapt_state_ex); - - memset(ctx, 0, ((size_t) &((url_adapt_state_ex_t *)0)->tags)); - - return SUCCESS; -} - -static int php_url_scanner_ex_deactivate(TSRMLS_D) -{ - url_adapt_state_ex_t *ctx; - - ctx = &BG(url_adapt_state_ex); - - smart_str_free(&ctx->result); - smart_str_free(&ctx->buf); - smart_str_free(&ctx->tag); - smart_str_free(&ctx->arg); - - return SUCCESS; -} - -static void php_url_scanner_output_handler(char *output, uint output_len, char **handled_output, uint *handled_output_len, int mode TSRMLS_DC) -{ - size_t len; - - if (BG(url_adapt_state_ex).url_app.len != 0) { - *handled_output = url_adapt_ext(output, output_len, &len, (zend_bool) (mode & (PHP_OUTPUT_HANDLER_END | PHP_OUTPUT_HANDLER_CONT) ? 1 : 0) TSRMLS_CC); - if (sizeof(uint) < sizeof(size_t)) { - if (len > UINT_MAX) - len = UINT_MAX; - } - *handled_output_len = len; - } else if (BG(url_adapt_state_ex).url_app.len == 0) { - url_adapt_state_ex_t *ctx = &BG(url_adapt_state_ex); - if (ctx->buf.len) { - smart_str_appendl(&ctx->result, ctx->buf.c, ctx->buf.len); - smart_str_appendl(&ctx->result, output, output_len); - - *handled_output = ctx->result.c; - *handled_output_len = ctx->buf.len + output_len; - - ctx->result.c = NULL; - ctx->result.len = 0; - smart_str_free(&ctx->buf); - } else { - *handled_output = NULL; - } - } else { - *handled_output = NULL; - } -} - -PHPAPI int php_url_scanner_add_var(char *name, int name_len, char *value, int value_len, int urlencode TSRMLS_DC) -{ - char *encoded; - int encoded_len; - smart_str val; - - if (! BG(url_adapt_state_ex).active) { - php_url_scanner_ex_activate(TSRMLS_C); - php_ob_set_internal_handler(php_url_scanner_output_handler, 0, "URL-Rewriter", 1 TSRMLS_CC); - BG(url_adapt_state_ex).active = 1; - } - - - if (BG(url_adapt_state_ex).url_app.len != 0) { - smart_str_appends(&BG(url_adapt_state_ex).url_app, PG(arg_separator).output); - } - - if (urlencode) { - encoded = php_url_encode(value, value_len, &encoded_len); - smart_str_setl(&val, encoded, encoded_len); - } else { - smart_str_setl(&val, value, value_len); - } - - smart_str_appendl(&BG(url_adapt_state_ex).url_app, name, name_len); - smart_str_appendc(&BG(url_adapt_state_ex).url_app, '='); - smart_str_append(&BG(url_adapt_state_ex).url_app, &val); - - smart_str_appends(&BG(url_adapt_state_ex).form_app, "<input type=\"hidden\" name=\""); - smart_str_appendl(&BG(url_adapt_state_ex).form_app, name, name_len); - smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" value=\""); - smart_str_append(&BG(url_adapt_state_ex).form_app, &val); - smart_str_appends(&BG(url_adapt_state_ex).form_app, "\" />"); - - if (urlencode) - efree(encoded); - - return SUCCESS; -} - -PHPAPI int php_url_scanner_reset_vars(TSRMLS_D) -{ - BG(url_adapt_state_ex).form_app.len = 0; - BG(url_adapt_state_ex).url_app.len = 0; - - return SUCCESS; -} - -PHP_MINIT_FUNCTION(url_scanner) -{ - BG(url_adapt_state_ex).tags = NULL; - - BG(url_adapt_state_ex).form_app.c = BG(url_adapt_state_ex).url_app.c = 0; - BG(url_adapt_state_ex).form_app.len = BG(url_adapt_state_ex).url_app.len = 0; - - REGISTER_INI_ENTRIES(); - return SUCCESS; -} - -PHP_MSHUTDOWN_FUNCTION(url_scanner) -{ - UNREGISTER_INI_ENTRIES(); - - return SUCCESS; -} - -PHP_RINIT_FUNCTION(url_scanner) -{ - BG(url_adapt_state_ex).active = 0; - - return SUCCESS; -} - -PHP_RSHUTDOWN_FUNCTION(url_scanner) -{ - if (BG(url_adapt_state_ex).active) { - php_url_scanner_ex_deactivate(TSRMLS_C); - BG(url_adapt_state_ex).active = 0; - } - - smart_str_free(&BG(url_adapt_state_ex).form_app); - smart_str_free(&BG(url_adapt_state_ex).url_app); - - return SUCCESS; -} diff --git a/ext/standard/url_scanner_ex.h b/ext/standard/url_scanner_ex.h index 692f05af1..d4aea269f 100644 --- a/ext/standard/url_scanner_ex.h +++ b/ext/standard/url_scanner_ex.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: url_scanner_ex.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef URL_SCANNER_EX_H #define URL_SCANNER_EX_H diff --git a/ext/standard/user_filters.c b/ext/standard/user_filters.c index 449c42db1..ba145b559 100644 --- a/ext/standard/user_filters.c +++ b/ext/standard/user_filters.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: user_filters.c 314641 2011-08-09 12:16:58Z laruence $ */ +/* $Id: user_filters.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/uuencode.c b/ext/standard/uuencode.c index cdd73aaa5..60f59c12e 100644 --- a/ext/standard/uuencode.c +++ b/ext/standard/uuencode.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: uuencode.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: uuencode.c 321634 2012-01-01 13:15:04Z felipe $ */ /* * Portions of this code are based on Berkeley's uuencode/uudecode diff --git a/ext/standard/var.c b/ext/standard/var.c index c8a89b746..ea156e859 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c 314403 2011-08-07 06:04:11Z pierrick $ */ +/* $Id: var.c 321634 2012-01-01 13:15:04Z felipe $ */ /* {{{ includes */ @@ -598,7 +598,7 @@ static inline zend_bool php_var_serialize_class_name(smart_str *buf, zval *struc PHP_SET_CLASS_ATTRIBUTES(struc); smart_str_appendl(buf, "O:", 2); - smart_str_append_long(buf, (long)name_len); + smart_str_append_long(buf, (int)name_len); smart_str_appendl(buf, ":\"", 2); smart_str_appendl(buf, class_name, name_len); smart_str_appendl(buf, "\":", 2); @@ -764,12 +764,12 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var if (ce->serialize(struc, &serialized_data, &serialized_length, (zend_serialize_data *)var_hash TSRMLS_CC) == SUCCESS) { smart_str_appendl(buf, "C:", 2); - smart_str_append_long(buf, (long)Z_OBJCE_P(struc)->name_length); + smart_str_append_long(buf, (int)Z_OBJCE_P(struc)->name_length); smart_str_appendl(buf, ":\"", 2); smart_str_appendl(buf, Z_OBJCE_P(struc)->name, Z_OBJCE_P(struc)->name_length); smart_str_appendl(buf, "\":", 2); - smart_str_append_long(buf, (long)serialized_length); + smart_str_append_long(buf, (int)serialized_length); smart_str_appendl(buf, ":{", 2); smart_str_appendl(buf, serialized_data, serialized_length); smart_str_appendc(buf, '}'); diff --git a/ext/standard/var_unserializer.c b/ext/standard/var_unserializer.c index 015f92d9e..8bacdfed3 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -1,9 +1,9 @@ -/* Generated by re2c 0.13.5 on Fri Dec 31 23:52:55 2010 */ +/* Generated by re2c 0.13.5 on Wed Sep 28 15:40:15 2011 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: var_unserializer.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -251,7 +251,7 @@ static inline size_t parse_uiv(const unsigned char *p) #define UNSERIALIZE_PARAMETER zval **rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC #define UNSERIALIZE_PASSTHRU rval, p, max, var_hash TSRMLS_CC -static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements) +static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements, int objprops) { while (elements-- > 0) { zval *key, *data, **old_data; @@ -280,7 +280,8 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long return 0; } - switch (Z_TYPE_P(key)) { + if (!objprops) { + switch (Z_TYPE_P(key)) { case IS_LONG: if (zend_hash_index_find(ht, Z_LVAL_P(key), (void **)&old_data)==SUCCESS) { var_push_dtor(var_hash, old_data); @@ -293,6 +294,12 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long } zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL); break; + } + } else { + /* object properties should include no integers */ + convert_to_string(key); + zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, + sizeof data, NULL); } zval_dtor(key); @@ -360,7 +367,7 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) zval *retval_ptr = NULL; zval fname; - if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements)) { + if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements, 1)) { return 0; } @@ -710,7 +717,7 @@ yy34: array_init_size(*rval, elements); - if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_PP(rval), elements)) { + if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_PP(rval), elements, 0)) { return 0; } diff --git a/ext/standard/var_unserializer.c.orig b/ext/standard/var_unserializer.c.orig deleted file mode 100644 index ad7823e99..000000000 --- a/ext/standard/var_unserializer.c.orig +++ /dev/null @@ -1,1177 +0,0 @@ -/* Generated by re2c 0.13.5 on Fri Dec 31 23:52:55 2010 */ -#line 1 "ext/standard/var_unserializer.re" -/* - +----------------------------------------------------------------------+ - | PHP Version 5 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 3.01 of the PHP license, | - | that is bundled with this package in the file LICENSE, and is | - | available through the world-wide-web at the following url: | - | http://www.php.net/license/3_01.txt | - | If you did not receive a copy of the PHP license and are unable to | - | obtain it through the world-wide-web, please send a note to | - | license@php.net so we can mail you a copy immediately. | - +----------------------------------------------------------------------+ - | Author: Sascha Schumann <sascha@schumann.cx> | - +----------------------------------------------------------------------+ -*/ - -/* $Id: var_unserializer.c 306939 2011-01-01 02:19:59Z felipe $ */ - -#include "php.h" -#include "ext/standard/php_var.h" -#include "php_incomplete_class.h" - -/* {{{ reference-handling for unserializer: var_* */ -#define VAR_ENTRIES_MAX 1024 - -typedef struct { - zval *data[VAR_ENTRIES_MAX]; - long used_slots; - void *next; -} var_entries; - -static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval) -{ - var_entries *var_hash = var_hashx->first, *prev = NULL; - - while (var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { - prev = var_hash; - var_hash = var_hash->next; - } - - if (!var_hash) { - var_hash = emalloc(sizeof(var_entries)); - var_hash->used_slots = 0; - var_hash->next = 0; - - if (!var_hashx->first) - var_hashx->first = var_hash; - else - prev->next = var_hash; - } - - var_hash->data[var_hash->used_slots++] = *rval; -} - -PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) -{ - var_entries *var_hash = var_hashx->first_dtor, *prev = NULL; - - while (var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { - prev = var_hash; - var_hash = var_hash->next; - } - - if (!var_hash) { - var_hash = emalloc(sizeof(var_entries)); - var_hash->used_slots = 0; - var_hash->next = 0; - - if (!var_hashx->first_dtor) - var_hashx->first_dtor = var_hash; - else - prev->next = var_hash; - } - - Z_ADDREF_PP(rval); - var_hash->data[var_hash->used_slots++] = *rval; -} - -PHPAPI void var_replace(php_unserialize_data_t *var_hashx, zval *ozval, zval **nzval) -{ - long i; - var_entries *var_hash = var_hashx->first; - - while (var_hash) { - for (i = 0; i < var_hash->used_slots; i++) { - if (var_hash->data[i] == ozval) { - var_hash->data[i] = *nzval; - /* do not break here */ - } - } - var_hash = var_hash->next; - } -} - -static int var_access(php_unserialize_data_t *var_hashx, long id, zval ***store) -{ - var_entries *var_hash = var_hashx->first; - - while (id >= VAR_ENTRIES_MAX && var_hash && var_hash->used_slots == VAR_ENTRIES_MAX) { - var_hash = var_hash->next; - id -= VAR_ENTRIES_MAX; - } - - if (!var_hash) return !SUCCESS; - - if (id < 0 || id >= var_hash->used_slots) return !SUCCESS; - - *store = &var_hash->data[id]; - - return SUCCESS; -} - -PHPAPI void var_destroy(php_unserialize_data_t *var_hashx) -{ - void *next; - long i; - var_entries *var_hash = var_hashx->first; - - while (var_hash) { - next = var_hash->next; - efree(var_hash); - var_hash = next; - } - - var_hash = var_hashx->first_dtor; - - while (var_hash) { - for (i = 0; i < var_hash->used_slots; i++) { - zval_ptr_dtor(&var_hash->data[i]); - } - next = var_hash->next; - efree(var_hash); - var_hash = next; - } -} - -/* }}} */ - -static char *unserialize_str(const unsigned char **p, size_t *len, size_t maxlen) -{ - size_t i, j; - char *str = safe_emalloc(*len, 1, 1); - unsigned char *end = *(unsigned char **)p+maxlen; - - if (end < *p) { - efree(str); - return NULL; - } - - for (i = 0; i < *len; i++) { - if (*p >= end) { - efree(str); - return NULL; - } - if (**p != '\\') { - str[i] = (char)**p; - } else { - unsigned char ch = 0; - - for (j = 0; j < 2; j++) { - (*p)++; - if (**p >= '0' && **p <= '9') { - ch = (ch << 4) + (**p -'0'); - } else if (**p >= 'a' && **p <= 'f') { - ch = (ch << 4) + (**p -'a'+10); - } else if (**p >= 'A' && **p <= 'F') { - ch = (ch << 4) + (**p -'A'+10); - } else { - efree(str); - return NULL; - } - } - str[i] = (char)ch; - } - (*p)++; - } - str[i] = 0; - *len = i; - return str; -} - -#define YYFILL(n) do { } while (0) -#define YYCTYPE unsigned char -#define YYCURSOR cursor -#define YYLIMIT limit -#define YYMARKER marker - - -#line 198 "ext/standard/var_unserializer.re" - - - - -static inline long parse_iv2(const unsigned char *p, const unsigned char **q) -{ - char cursor; - long result = 0; - int neg = 0; - - switch (*p) { - case '-': - neg++; - /* fall-through */ - case '+': - p++; - } - - while (1) { - cursor = (char)*p; - if (cursor >= '0' && cursor <= '9') { - result = result * 10 + (size_t)(cursor - (unsigned char)'0'); - } else { - break; - } - p++; - } - if (q) *q = p; - if (neg) return -result; - return result; -} - -static inline long parse_iv(const unsigned char *p) -{ - return parse_iv2(p, NULL); -} - -/* no need to check for length - re2c already did */ -static inline size_t parse_uiv(const unsigned char *p) -{ - unsigned char cursor; - size_t result = 0; - - if (*p == '+') { - p++; - } - - while (1) { - cursor = *p; - if (cursor >= '0' && cursor <= '9') { - result = result * 10 + (size_t)(cursor - (unsigned char)'0'); - } else { - break; - } - p++; - } - return result; -} - -#define UNSERIALIZE_PARAMETER zval **rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC -#define UNSERIALIZE_PASSTHRU rval, p, max, var_hash TSRMLS_CC - -static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements) -{ - while (elements-- > 0) { - zval *key, *data, **old_data; - - ALLOC_INIT_ZVAL(key); - - if (!php_var_unserialize(&key, p, max, NULL TSRMLS_CC)) { - zval_dtor(key); - FREE_ZVAL(key); - return 0; - } - - if (Z_TYPE_P(key) != IS_LONG && Z_TYPE_P(key) != IS_STRING) { - zval_dtor(key); - FREE_ZVAL(key); - return 0; - } - - ALLOC_INIT_ZVAL(data); - - if (!php_var_unserialize(&data, p, max, var_hash TSRMLS_CC)) { - zval_dtor(key); - FREE_ZVAL(key); - zval_dtor(data); - FREE_ZVAL(data); - return 0; - } - - switch (Z_TYPE_P(key)) { - case IS_LONG: - if (zend_hash_index_find(ht, Z_LVAL_P(key), (void **)&old_data)==SUCCESS) { - var_push_dtor(var_hash, old_data); - } - zend_hash_index_update(ht, Z_LVAL_P(key), &data, sizeof(data), NULL); - break; - case IS_STRING: - if (zend_symtable_find(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, (void **)&old_data)==SUCCESS) { - var_push_dtor(var_hash, old_data); - } - zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL); - break; - } - - zval_dtor(key); - FREE_ZVAL(key); - - if (elements && *(*p-1) != ';' && *(*p-1) != '}') { - (*p)--; - return 0; - } - } - - return 1; -} - -static inline int finish_nested_data(UNSERIALIZE_PARAMETER) -{ - if (*((*p)++) == '}') - return 1; - -#if SOMETHING_NEW_MIGHT_LEAD_TO_CRASH_ENABLE_IF_YOU_ARE_BRAVE - zval_ptr_dtor(rval); -#endif - return 0; -} - -static inline int object_custom(UNSERIALIZE_PARAMETER, zend_class_entry *ce) -{ - long datalen; - - datalen = parse_iv2((*p) + 2, p); - - (*p) += 2; - - if (datalen < 0 || (*p) + datalen >= max) { - zend_error(E_WARNING, "Insufficient data for unserializing - %ld required, %ld present", datalen, (long)(max - (*p))); - return 0; - } - - if (ce->unserialize == NULL) { - zend_error(E_WARNING, "Class %s has no unserializer", ce->name); - object_init_ex(*rval, ce); - } else if (ce->unserialize(rval, ce, (const unsigned char*)*p, datalen, (zend_unserialize_data *)var_hash TSRMLS_CC) != SUCCESS) { - return 0; - } - - (*p) += datalen; - - return finish_nested_data(UNSERIALIZE_PASSTHRU); -} - -static inline long object_common1(UNSERIALIZE_PARAMETER, zend_class_entry *ce) -{ - long elements; - - elements = parse_iv2((*p) + 2, p); - - (*p) += 2; - - object_init_ex(*rval, ce); - return elements; -} - -static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) -{ - zval *retval_ptr = NULL; - zval fname; - - if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements)) { - return 0; - } - - if (Z_OBJCE_PP(rval) != PHP_IC_ENTRY && - zend_hash_exists(&Z_OBJCE_PP(rval)->function_table, "__wakeup", sizeof("__wakeup"))) { - INIT_PZVAL(&fname); - ZVAL_STRINGL(&fname, "__wakeup", sizeof("__wakeup") - 1, 0); - call_user_function_ex(CG(function_table), rval, &fname, &retval_ptr, 0, 0, 1, NULL TSRMLS_CC); - } - - if (retval_ptr) - zval_ptr_dtor(&retval_ptr); - - return finish_nested_data(UNSERIALIZE_PASSTHRU); - -} - -PHPAPI int php_var_unserialize(UNSERIALIZE_PARAMETER) -{ - const unsigned char *cursor, *limit, *marker, *start; - zval **rval_ref; - - limit = cursor = *p; - - if (var_hash && cursor[0] != 'R') { - var_push(var_hash, rval); - } - - start = cursor; - - - - -#line 400 "ext/standard/var_unserializer.c" -{ - YYCTYPE yych; - static const unsigned char yybm[] = { - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 128, 128, 128, 128, 128, 128, 128, 128, - 128, 128, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - }; - - if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7); - yych = *YYCURSOR; - switch (yych) { - case 'C': - case 'O': goto yy13; - case 'N': goto yy5; - case 'R': goto yy2; - case 'S': goto yy10; - case 'a': goto yy11; - case 'b': goto yy6; - case 'd': goto yy8; - case 'i': goto yy7; - case 'o': goto yy12; - case 'r': goto yy4; - case 's': goto yy9; - case '}': goto yy14; - default: goto yy16; - } -yy2: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy95; -yy3: -#line 722 "ext/standard/var_unserializer.re" - { return 0; } -#line 462 "ext/standard/var_unserializer.c" -yy4: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy89; - goto yy3; -yy5: - yych = *++YYCURSOR; - if (yych == ';') goto yy87; - goto yy3; -yy6: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy83; - goto yy3; -yy7: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy77; - goto yy3; -yy8: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy53; - goto yy3; -yy9: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy46; - goto yy3; -yy10: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy39; - goto yy3; -yy11: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy32; - goto yy3; -yy12: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy25; - goto yy3; -yy13: - yych = *(YYMARKER = ++YYCURSOR); - if (yych == ':') goto yy17; - goto yy3; -yy14: - ++YYCURSOR; -#line 716 "ext/standard/var_unserializer.re" - { - /* this is the case where we have less data than planned */ - php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Unexpected end of serialized data"); - return 0; /* not sure if it should be 0 or 1 here? */ -} -#line 511 "ext/standard/var_unserializer.c" -yy16: - yych = *++YYCURSOR; - goto yy3; -yy17: - yych = *++YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy20; - } - if (yych == '+') goto yy19; -yy18: - YYCURSOR = YYMARKER; - goto yy3; -yy19: - yych = *++YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy20; - } - goto yy18; -yy20: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yybm[0+yych] & 128) { - goto yy20; - } - if (yych != ':') goto yy18; - yych = *++YYCURSOR; - if (yych != '"') goto yy18; - ++YYCURSOR; -#line 599 "ext/standard/var_unserializer.re" - { - size_t len, len2, len3, maxlen; - long elements; - char *class_name; - zend_class_entry *ce; - zend_class_entry **pce; - int incomplete_class = 0; - - int custom_object = 0; - - zval *user_func; - zval *retval_ptr; - zval **args[1]; - zval *arg_func_name; - - if (*start == 'C') { - custom_object = 1; - } - - INIT_PZVAL(*rval); - len2 = len = parse_uiv(start + 2); - maxlen = max - YYCURSOR; - if (maxlen < len || len == 0) { - *p = start + 2; - return 0; - } - - class_name = (char*)YYCURSOR; - - YYCURSOR += len; - - if (*(YYCURSOR) != '"') { - *p = YYCURSOR; - return 0; - } - if (*(YYCURSOR+1) != ':') { - *p = YYCURSOR+1; - return 0; - } - - len3 = strspn(class_name, "0123456789_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\177\200\201\202\203\204\205\206\207\210\211\212\213\214\215\216\217\220\221\222\223\224\225\226\227\230\231\232\233\234\235\236\237\240\241\242\243\244\245\246\247\250\251\252\253\254\255\256\257\260\261\262\263\264\265\266\267\270\271\272\273\274\275\276\277\300\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326\327\330\331\332\333\334\335\336\337\340\341\342\343\344\345\346\347\350\351\352\353\354\355\356\357\360\361\362\363\364\365\366\367\370\371\372\373\374\375\376\377\\"); - if (len3 != len) - { - *p = YYCURSOR + len3 - len; - return 0; - } - - class_name = estrndup(class_name, len); - - do { - /* Try to find class directly */ - if (zend_lookup_class(class_name, len2, &pce TSRMLS_CC) == SUCCESS) { - ce = *pce; - break; - } - - /* Check for unserialize callback */ - if ((PG(unserialize_callback_func) == NULL) || (PG(unserialize_callback_func)[0] == '\0')) { - incomplete_class = 1; - ce = PHP_IC_ENTRY; - break; - } - - /* Call unserialize callback */ - MAKE_STD_ZVAL(user_func); - ZVAL_STRING(user_func, PG(unserialize_callback_func), 1); - args[0] = &arg_func_name; - MAKE_STD_ZVAL(arg_func_name); - ZVAL_STRING(arg_func_name, class_name, 1); - if (call_user_function_ex(CG(function_table), NULL, user_func, &retval_ptr, 1, args, 0, NULL TSRMLS_CC) != SUCCESS) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "defined (%s) but not found", user_func->value.str.val); - incomplete_class = 1; - ce = PHP_IC_ENTRY; - zval_ptr_dtor(&user_func); - zval_ptr_dtor(&arg_func_name); - break; - } - if (retval_ptr) { - zval_ptr_dtor(&retval_ptr); - } - - /* The callback function may have defined the class */ - if (zend_lookup_class(class_name, len2, &pce TSRMLS_CC) == SUCCESS) { - ce = *pce; - } else { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Function %s() hasn't defined the class it was called for", user_func->value.str.val); - incomplete_class = 1; - ce = PHP_IC_ENTRY; - } - - zval_ptr_dtor(&user_func); - zval_ptr_dtor(&arg_func_name); - break; - } while (1); - - *p = YYCURSOR; - - if (custom_object) { - int ret = object_custom(UNSERIALIZE_PASSTHRU, ce); - - if (ret && incomplete_class) { - php_store_class_name(*rval, class_name, len2); - } - efree(class_name); - return ret; - } - - elements = object_common1(UNSERIALIZE_PASSTHRU, ce); - - if (incomplete_class) { - php_store_class_name(*rval, class_name, len2); - } - efree(class_name); - - return object_common2(UNSERIALIZE_PASSTHRU, elements); -} -#line 658 "ext/standard/var_unserializer.c" -yy25: - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych != '+') goto yy18; - } else { - if (yych <= '-') goto yy26; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy27; - goto yy18; - } -yy26: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy27: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy27; - if (yych >= ';') goto yy18; - yych = *++YYCURSOR; - if (yych != '"') goto yy18; - ++YYCURSOR; -#line 591 "ext/standard/var_unserializer.re" - { - - INIT_PZVAL(*rval); - - return object_common2(UNSERIALIZE_PASSTHRU, - object_common1(UNSERIALIZE_PASSTHRU, ZEND_STANDARD_CLASS_DEF_PTR)); -} -#line 691 "ext/standard/var_unserializer.c" -yy32: - yych = *++YYCURSOR; - if (yych == '+') goto yy33; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy34; - goto yy18; -yy33: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy34: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy34; - if (yych >= ';') goto yy18; - yych = *++YYCURSOR; - if (yych != '{') goto yy18; - ++YYCURSOR; -#line 571 "ext/standard/var_unserializer.re" - { - long elements = parse_iv(start + 2); - /* use iv() not uiv() in order to check data range */ - *p = YYCURSOR; - - if (elements < 0) { - return 0; - } - - INIT_PZVAL(*rval); - - array_init_size(*rval, elements); - - if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_PP(rval), elements)) { - return 0; - } - - return finish_nested_data(UNSERIALIZE_PASSTHRU); -} -#line 732 "ext/standard/var_unserializer.c" -yy39: - yych = *++YYCURSOR; - if (yych == '+') goto yy40; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy41; - goto yy18; -yy40: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy41: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy41; - if (yych >= ';') goto yy18; - yych = *++YYCURSOR; - if (yych != '"') goto yy18; - ++YYCURSOR; -#line 542 "ext/standard/var_unserializer.re" - { - size_t len, maxlen; - char *str; - - len = parse_uiv(start + 2); - maxlen = max - YYCURSOR; - if (maxlen < len) { - *p = start + 2; - return 0; - } - - if ((str = unserialize_str(&YYCURSOR, &len, maxlen)) == NULL) { - return 0; - } - - if (*(YYCURSOR) != '"') { - efree(str); - *p = YYCURSOR; - return 0; - } - - YYCURSOR += 2; - *p = YYCURSOR; - - INIT_PZVAL(*rval); - ZVAL_STRINGL(*rval, str, len, 0); - return 1; -} -#line 782 "ext/standard/var_unserializer.c" -yy46: - yych = *++YYCURSOR; - if (yych == '+') goto yy47; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy48; - goto yy18; -yy47: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy48: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy48; - if (yych >= ';') goto yy18; - yych = *++YYCURSOR; - if (yych != '"') goto yy18; - ++YYCURSOR; -#line 514 "ext/standard/var_unserializer.re" - { - size_t len, maxlen; - char *str; - - len = parse_uiv(start + 2); - maxlen = max - YYCURSOR; - if (maxlen < len) { - *p = start + 2; - return 0; - } - - str = (char*)YYCURSOR; - - YYCURSOR += len; - - if (*(YYCURSOR) != '"') { - *p = YYCURSOR; - return 0; - } - - YYCURSOR += 2; - *p = YYCURSOR; - - INIT_PZVAL(*rval); - ZVAL_STRINGL(*rval, str, len, 1); - return 1; -} -#line 831 "ext/standard/var_unserializer.c" -yy53: - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych <= ',') { - if (yych == '+') goto yy57; - goto yy18; - } else { - if (yych <= '-') goto yy55; - if (yych <= '.') goto yy60; - goto yy18; - } - } else { - if (yych <= 'I') { - if (yych <= '9') goto yy58; - if (yych <= 'H') goto yy18; - goto yy56; - } else { - if (yych != 'N') goto yy18; - } - } - yych = *++YYCURSOR; - if (yych == 'A') goto yy76; - goto yy18; -yy55: - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy60; - goto yy18; - } else { - if (yych <= '9') goto yy58; - if (yych != 'I') goto yy18; - } -yy56: - yych = *++YYCURSOR; - if (yych == 'N') goto yy72; - goto yy18; -yy57: - yych = *++YYCURSOR; - if (yych == '.') goto yy60; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy58: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - if (yych <= ':') { - if (yych <= '.') { - if (yych <= '-') goto yy18; - goto yy70; - } else { - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy58; - goto yy18; - } - } else { - if (yych <= 'E') { - if (yych <= ';') goto yy63; - if (yych <= 'D') goto yy18; - goto yy65; - } else { - if (yych == 'e') goto yy65; - goto yy18; - } - } -yy60: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy61: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - if (yych <= ';') { - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy61; - if (yych <= ':') goto yy18; - } else { - if (yych <= 'E') { - if (yych <= 'D') goto yy18; - goto yy65; - } else { - if (yych == 'e') goto yy65; - goto yy18; - } - } -yy63: - ++YYCURSOR; -#line 504 "ext/standard/var_unserializer.re" - { -#if SIZEOF_LONG == 4 -use_double: -#endif - *p = YYCURSOR; - INIT_PZVAL(*rval); - ZVAL_DOUBLE(*rval, zend_strtod((const char *)start + 2, NULL)); - return 1; -} -#line 929 "ext/standard/var_unserializer.c" -yy65: - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych != '+') goto yy18; - } else { - if (yych <= '-') goto yy66; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy67; - goto yy18; - } -yy66: - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych == '+') goto yy69; - goto yy18; - } else { - if (yych <= '-') goto yy69; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; - } -yy67: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy67; - if (yych == ';') goto yy63; - goto yy18; -yy69: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy67; - goto yy18; -yy70: - ++YYCURSOR; - if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); - yych = *YYCURSOR; - if (yych <= ';') { - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy70; - if (yych <= ':') goto yy18; - goto yy63; - } else { - if (yych <= 'E') { - if (yych <= 'D') goto yy18; - goto yy65; - } else { - if (yych == 'e') goto yy65; - goto yy18; - } - } -yy72: - yych = *++YYCURSOR; - if (yych != 'F') goto yy18; -yy73: - yych = *++YYCURSOR; - if (yych != ';') goto yy18; - ++YYCURSOR; -#line 489 "ext/standard/var_unserializer.re" - { - *p = YYCURSOR; - INIT_PZVAL(*rval); - - if (!strncmp(start + 2, "NAN", 3)) { - ZVAL_DOUBLE(*rval, php_get_nan()); - } else if (!strncmp(start + 2, "INF", 3)) { - ZVAL_DOUBLE(*rval, php_get_inf()); - } else if (!strncmp(start + 2, "-INF", 4)) { - ZVAL_DOUBLE(*rval, -php_get_inf()); - } - - return 1; -} -#line 1003 "ext/standard/var_unserializer.c" -yy76: - yych = *++YYCURSOR; - if (yych == 'N') goto yy73; - goto yy18; -yy77: - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych != '+') goto yy18; - } else { - if (yych <= '-') goto yy78; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy79; - goto yy18; - } -yy78: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy79: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy79; - if (yych != ';') goto yy18; - ++YYCURSOR; -#line 462 "ext/standard/var_unserializer.re" - { -#if SIZEOF_LONG == 4 - int digits = YYCURSOR - start - 3; - - if (start[2] == '-' || start[2] == '+') { - digits--; - } - - /* Use double for large long values that were serialized on a 64-bit system */ - if (digits >= MAX_LENGTH_OF_LONG - 1) { - if (digits == MAX_LENGTH_OF_LONG - 1) { - int cmp = strncmp(YYCURSOR - MAX_LENGTH_OF_LONG, long_min_digits, MAX_LENGTH_OF_LONG - 1); - - if (!(cmp < 0 || (cmp == 0 && start[2] == '-'))) { - goto use_double; - } - } else { - goto use_double; - } - } -#endif - *p = YYCURSOR; - INIT_PZVAL(*rval); - ZVAL_LONG(*rval, parse_iv(start + 2)); - return 1; -} -#line 1057 "ext/standard/var_unserializer.c" -yy83: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= '2') goto yy18; - yych = *++YYCURSOR; - if (yych != ';') goto yy18; - ++YYCURSOR; -#line 455 "ext/standard/var_unserializer.re" - { - *p = YYCURSOR; - INIT_PZVAL(*rval); - ZVAL_BOOL(*rval, parse_iv(start + 2)); - return 1; -} -#line 1072 "ext/standard/var_unserializer.c" -yy87: - ++YYCURSOR; -#line 448 "ext/standard/var_unserializer.re" - { - *p = YYCURSOR; - INIT_PZVAL(*rval); - ZVAL_NULL(*rval); - return 1; -} -#line 1082 "ext/standard/var_unserializer.c" -yy89: - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych != '+') goto yy18; - } else { - if (yych <= '-') goto yy90; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy91; - goto yy18; - } -yy90: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy91: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy91; - if (yych != ';') goto yy18; - ++YYCURSOR; -#line 425 "ext/standard/var_unserializer.re" - { - long id; - - *p = YYCURSOR; - if (!var_hash) return 0; - - id = parse_iv(start + 2) - 1; - if (id == -1 || var_access(var_hash, id, &rval_ref) != SUCCESS) { - return 0; - } - - if (*rval == *rval_ref) return 0; - - if (*rval != NULL) { - zval_ptr_dtor(rval); - } - *rval = *rval_ref; - Z_ADDREF_PP(rval); - Z_UNSET_ISREF_PP(rval); - - return 1; -} -#line 1128 "ext/standard/var_unserializer.c" -yy95: - yych = *++YYCURSOR; - if (yych <= ',') { - if (yych != '+') goto yy18; - } else { - if (yych <= '-') goto yy96; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy97; - goto yy18; - } -yy96: - yych = *++YYCURSOR; - if (yych <= '/') goto yy18; - if (yych >= ':') goto yy18; -yy97: - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '/') goto yy18; - if (yych <= '9') goto yy97; - if (yych != ';') goto yy18; - ++YYCURSOR; -#line 404 "ext/standard/var_unserializer.re" - { - long id; - - *p = YYCURSOR; - if (!var_hash) return 0; - - id = parse_iv(start + 2) - 1; - if (id == -1 || var_access(var_hash, id, &rval_ref) != SUCCESS) { - return 0; - } - - if (*rval != NULL) { - zval_ptr_dtor(rval); - } - *rval = *rval_ref; - Z_ADDREF_PP(rval); - Z_SET_ISREF_PP(rval); - - return 1; -} -#line 1172 "ext/standard/var_unserializer.c" -} -#line 724 "ext/standard/var_unserializer.re" - - - return 0; -} diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 500025d4d..c6ae65d29 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.re 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: var_unserializer.re 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -257,7 +257,7 @@ static inline size_t parse_uiv(const unsigned char *p) #define UNSERIALIZE_PARAMETER zval **rval, const unsigned char **p, const unsigned char *max, php_unserialize_data_t *var_hash TSRMLS_DC #define UNSERIALIZE_PASSTHRU rval, p, max, var_hash TSRMLS_CC -static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements) +static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long elements, int objprops) { while (elements-- > 0) { zval *key, *data, **old_data; @@ -286,7 +286,8 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long return 0; } - switch (Z_TYPE_P(key)) { + if (!objprops) { + switch (Z_TYPE_P(key)) { case IS_LONG: if (zend_hash_index_find(ht, Z_LVAL_P(key), (void **)&old_data)==SUCCESS) { var_push_dtor(var_hash, old_data); @@ -299,6 +300,12 @@ static inline int process_nested_data(UNSERIALIZE_PARAMETER, HashTable *ht, long } zend_symtable_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, sizeof(data), NULL); break; + } + } else { + /* object properties should include no integers */ + convert_to_string(key); + zend_hash_update(ht, Z_STRVAL_P(key), Z_STRLEN_P(key) + 1, &data, + sizeof data, NULL); } zval_dtor(key); @@ -366,7 +373,7 @@ static inline int object_common2(UNSERIALIZE_PARAMETER, long elements) zval *retval_ptr = NULL; zval fname; - if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements)) { + if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_OBJPROP_PP(rval), elements, 1)) { return 0; } @@ -581,7 +588,7 @@ use_double: array_init_size(*rval, elements); - if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_PP(rval), elements)) { + if (!process_nested_data(UNSERIALIZE_PASSTHRU, Z_ARRVAL_PP(rval), elements, 0)) { return 0; } diff --git a/ext/standard/versioning.c b/ext/standard/versioning.c index 759cbb8f1..1cb9d4507 100644 --- a/ext/standard/versioning.c +++ b/ext/standard/versioning.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: versioning.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: versioning.c 321634 2012-01-01 13:15:04Z felipe $ */ #include <stdio.h> #include <sys/types.h> diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 256ef31d3..24cb0ca9b 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.c 313903 2011-07-28 21:16:51Z pajoye $ */ +/* $Id: php_sybase_ct.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H diff --git a/ext/sybase_ct/php_sybase_ct.h b/ext/sybase_ct/php_sybase_ct.h index 0e01bc475..f848b5528 100644 --- a/ext/sybase_ct/php_sybase_ct.h +++ b/ext/sybase_ct/php_sybase_ct.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sybase_ct.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SYBASE_CT_H #define PHP_SYBASE_CT_H diff --git a/ext/sysvmsg/php_sysvmsg.h b/ext/sysvmsg/php_sysvmsg.h index 226bbc79b..56b187dcc 100644 --- a/ext/sysvmsg/php_sysvmsg.h +++ b/ext/sysvmsg/php_sysvmsg.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sysvmsg.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sysvmsg.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SYSVMSG_H #define PHP_SYSVMSG_H diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index 21ab6f713..a48c69b2e 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvmsg.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: sysvmsg.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -145,7 +145,7 @@ PHP_MINFO_FUNCTION(sysvmsg) { php_info_print_table_start(); php_info_print_table_row(2, "sysvmsg support", "enabled"); - php_info_print_table_row(2, "Revision", "$Revision: 313665 $"); + php_info_print_table_row(2, "Revision", "$Revision: 321634 $"); php_info_print_table_end(); } /* }}} */ diff --git a/ext/sysvsem/php_sysvsem.h b/ext/sysvsem/php_sysvsem.h index ea40fd8bb..d7de8e698 100644 --- a/ext/sysvsem/php_sysvsem.h +++ b/ext/sysvsem/php_sysvsem.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sysvsem.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sysvsem.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SYSVSEM_H #define PHP_SYSVSEM_H diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c index 72e6aa2ac..c5a1d541e 100644 --- a/ext/sysvsem/sysvsem.c +++ b/ext/sysvsem/sysvsem.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvsem.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: sysvsem.c 321634 2012-01-01 13:15:04Z felipe $ */ /* Latest update build anc tested on Linux 2.2.14 * diff --git a/ext/sysvshm/php_sysvshm.h b/ext/sysvshm/php_sysvshm.h index 3c84aa198..b7ca5e181 100644 --- a/ext/sysvshm/php_sysvshm.h +++ b/ext/sysvshm/php_sysvshm.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sysvshm.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_sysvshm.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_SYSVSHM_H #define PHP_SYSVSHM_H diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index 2d1156536..213b5dcf3 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvshm.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: sysvshm.c 321634 2012-01-01 13:15:04Z felipe $ */ /* This has been built and tested on Linux 2.2.14 * @@ -424,7 +424,7 @@ static int php_remove_shm_data(sysvshm_chunk_head *ptr, long shm_varpos) ptr->free += chunk_ptr->next; ptr->end -= chunk_ptr->next; if (memcpy_len > 0) { - memcpy(chunk_ptr, next_chunk_ptr, memcpy_len); + memmove(chunk_ptr, next_chunk_ptr, memcpy_len); } return 0; } diff --git a/ext/sysvshm/tests/001.phpt b/ext/sysvshm/tests/001.phpt index ba45286af..4b1525b69 100644 --- a/ext/sysvshm/tests/001.phpt +++ b/ext/sysvshm/tests/001.phpt @@ -1,5 +1,7 @@ --TEST-- ftok() tests +--SKIPIF-- +<?php if (!extension_loaded("sysvshm")) print "skip"; ?> --FILE-- <?php diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h index 9c1a73e21..e48ffd259 100644 --- a/ext/tidy/php_tidy.h +++ b/ext/tidy/php_tidy.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tidy.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_tidy.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H diff --git a/ext/tidy/tests/010.phpt b/ext/tidy/tests/010.phpt index eabbc0391..9d5ab825a 100644 --- a/ext/tidy/tests/010.phpt +++ b/ext/tidy/tests/010.phpt @@ -4,12 +4,12 @@ Accessing root, body, html, and head nodes.. <?php if (!extension_loaded("tidy")) print "skip"; ?> --FILE-- <?php - $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>"); - var_dump($a->root()); - var_dump($a->body()); - var_dump($a->html()); - var_dump($a->head()); - +$a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000></BODY></HTML>", array('newline' => 'LF')); +var_dump($a->root()); +var_dump($a->body()); +var_dump($a->html()); +var_dump($a->head()); + ?> --EXPECT-- object(tidyNode)#2 (8) { diff --git a/ext/tidy/tests/012.phpt b/ext/tidy/tests/012.phpt index 43fff38df..120581233 100644 --- a/ext/tidy/tests/012.phpt +++ b/ext/tidy/tests/012.phpt @@ -25,7 +25,7 @@ Accessing children nodes } - $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000><B>Hi</B><I>Bye<U>Test</U></I></BODY></HTML>"); + $a = tidy_parse_string("<HTML><BODY BGCOLOR=#FFFFFF ALINK=#000000><B>Hi</B><I>Bye<U>Test</U></I></BODY></HTML>", array('newline' => 'LF')); $html = $a->html(); dump_nodes($html); diff --git a/ext/tidy/tests/024.phpt b/ext/tidy/tests/024.phpt index f69b962ae..b09f5b464 100644 --- a/ext/tidy/tests/024.phpt +++ b/ext/tidy/tests/024.phpt @@ -18,7 +18,8 @@ $contents = ' </wps:block>'; $config = array( -'new-blocklevel-tags' => 'wps:block,wps:var,wps:value' +'new-blocklevel-tags' => 'wps:block,wps:var,wps:value', +'newline' => 'LF' ); $tidy = tidy_parse_string($contents, $config, 'utf8'); diff --git a/ext/tidy/tests/025.phpt b/ext/tidy/tests/025.phpt index 631ec2e5e..df9392eb2 100644 --- a/ext/tidy/tests/025.phpt +++ b/ext/tidy/tests/025.phpt @@ -5,16 +5,16 @@ tidyNode tests --FILE-- <?php -$tidy=tidy_parse_string('<% %>'); +$tidy=tidy_parse_string('<% %>', array('newline' => 'LF')); var_dump($tidy->Root()->child[0]->isAsp()); -$tidy=tidy_parse_string('<# #>'); +$tidy=tidy_parse_string('<# #>', array('newline' => 'LF')); var_dump($tidy->Root()->child[0]->isJste()); $tidy=tidy_parse_string('<html><body>text</body></html>'); var_dump($tidy->Root()->child[0]->child[1]->child[0]->isText()); -$tidy=tidy_parse_string('<html><body><!-- comment --></body></html>'); +$tidy=tidy_parse_string('<html><body><!-- comment --></body></html>', array('newline' => 'LF')); $n = $tidy->Root()->child[0]->child[1]->child[0]; var_dump($n->isComment()); var_dump((string)$n); diff --git a/ext/tidy/tests/bug54682.phpt b/ext/tidy/tests/bug54682.phpt new file mode 100644 index 000000000..99f40cf9d --- /dev/null +++ b/ext/tidy/tests/bug54682.phpt @@ -0,0 +1,13 @@ +--TEST-- +Tidy::diagnose() NULL pointer dereference +--SKIPIF-- +<?php if (!extension_loaded("tidy")) print "skip"; ?> +--FILE-- +<?php + +$nx = new Tidy("*"); +$nx->diagnose(); + +?> +--EXPECTF-- +Warning: tidy::__construct(): Cannot Load '*' into memory in %s on line %d diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index de3f0bd62..745762cba 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: tidy.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1092,7 +1092,7 @@ static PHP_MINFO_FUNCTION(tidy) php_info_print_table_start(); php_info_print_table_header(2, "Tidy support", "enabled"); php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate()); - php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c 313665 2011-07-25 11:42:53Z felipe $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c 321634 2012-01-01 13:15:04Z felipe $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); @@ -1288,7 +1288,7 @@ static PHP_FUNCTION(tidy_diagnose) { TIDY_FETCH_OBJECT; - if (tidyRunDiagnostics(obj->ptdoc->doc) >= 0) { + if (tidyStatus(obj->ptdoc->doc) != 0 && tidyRunDiagnostics(obj->ptdoc->doc) >= 0) { tidy_doc_update_properties(obj TSRMLS_CC); RETURN_TRUE; } diff --git a/ext/tokenizer/php_tokenizer.h b/ext/tokenizer/php_tokenizer.h index 2cba9a733..593137411 100644 --- a/ext/tokenizer/php_tokenizer.h +++ b/ext/tokenizer/php_tokenizer.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tokenizer.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_tokenizer.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_TOKENIZER_H #define PHP_TOKENIZER_H diff --git a/ext/tokenizer/tokenizer.c b/ext/tokenizer/tokenizer.c index 596b91ee7..0ae51c6c7 100644 --- a/ext/tokenizer/tokenizer.c +++ b/ext/tokenizer/tokenizer.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tokenizer.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: tokenizer.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/tokenizer/tokenizer_data.c b/ext/tokenizer/tokenizer_data.c index f1738fda0..10236afae 100644 --- a/ext/tokenizer/tokenizer_data.c +++ b/ext/tokenizer/tokenizer_data.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tokenizer_data.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: tokenizer_data.c 321634 2012-01-01 13:15:04Z felipe $ */ /* DO NOT EDIT THIS FILE! diff --git a/ext/tokenizer/tokenizer_data_gen.sh b/ext/tokenizer/tokenizer_data_gen.sh index 5cd148b71..22d8110ae 100755 --- a/ext/tokenizer/tokenizer_data_gen.sh +++ b/ext/tokenizer/tokenizer_data_gen.sh @@ -16,7 +16,7 @@ echo '/* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/wddx/php_wddx.h b/ext/wddx/php_wddx.h index 4627a154d..2932b28be 100644 --- a/ext/wddx/php_wddx.h +++ b/ext/wddx/php_wddx.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_wddx.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_wddx.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_WDDX_H #define PHP_WDDX_H diff --git a/ext/wddx/php_wddx_api.h b/ext/wddx/php_wddx_api.h index bcf4ec9bd..b5febd46c 100644 --- a/ext/wddx/php_wddx_api.h +++ b/ext/wddx/php_wddx_api.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_wddx_api.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_wddx_api.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_WDDX_API_H #define PHP_WDDX_API_H diff --git a/ext/wddx/tests/bug48562.phpt b/ext/wddx/tests/bug48562.phpt index d9ae376c5..ebd2004e0 100644 --- a/ext/wddx/tests/bug48562.phpt +++ b/ext/wddx/tests/bug48562.phpt @@ -1,5 +1,11 @@ --TEST-- Bug #48562 (Reference recursion causes segfault when used in wddx_serialize_vars()) +--SKIPIF-- +<?php +if (!extension_loaded('wddx')) { + die('skip. wddx not available'); +} +?> --FILE-- <?php diff --git a/ext/wddx/tests/bug52468.phpt b/ext/wddx/tests/bug52468.phpt index 151c23639..b0d8eb329 100644 --- a/ext/wddx/tests/bug52468.phpt +++ b/ext/wddx/tests/bug52468.phpt @@ -1,5 +1,11 @@ --TEST-- Bug #52468 (wddx_deserialize corrupts integer field value when left empty) +--SKIPIF-- +<?php +if (!extension_loaded('wddx')) { + die('skip. wddx not available'); +} +?> --FILE-- <?php diff --git a/ext/wddx/wddx.c b/ext/wddx/wddx.c index 619ebc255..b429b0bec 100644 --- a/ext/wddx/wddx.c +++ b/ext/wddx/wddx.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: wddx.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: wddx.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/xml/compat.c b/ext/xml/compat.c index 72b29d05c..40da824ad 100644 --- a/ext/xml/compat.c +++ b/ext/xml/compat.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | diff --git a/ext/xml/expat_compat.h b/ext/xml/expat_compat.h index 56a77e653..e109a1faf 100644 --- a/ext/xml/expat_compat.h +++ b/ext/xml/expat_compat.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: expat_compat.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: expat_compat.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_EXPAT_COMPAT_H #define PHP_EXPAT_COMPAT_H diff --git a/ext/xml/php_xml.h b/ext/xml/php_xml.h index eabfb6018..1db074725 100644 --- a/ext/xml/php_xml.h +++ b/ext/xml/php_xml.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xml.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xml.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_XML_H #define PHP_XML_H diff --git a/ext/xml/xml.c b/ext/xml/xml.c index a360c3ce8..3427face1 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml.c 314641 2011-08-09 12:16:58Z laruence $ */ +/* $Id: xml.c 321634 2012-01-01 13:15:04Z felipe $ */ #define IS_EXT_MODULE diff --git a/ext/xmlreader/php_xmlreader.c b/ext/xmlreader/php_xmlreader.c index 2fd5c9978..a39f98df4 100644 --- a/ext/xmlreader/php_xmlreader.c +++ b/ext/xmlreader/php_xmlreader.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlreader.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: php_xmlreader.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/xmlreader/php_xmlreader.h b/ext/xmlreader/php_xmlreader.h index ab90ea1e0..0e46a4510 100644 --- a/ext/xmlreader/php_xmlreader.h +++ b/ext/xmlreader/php_xmlreader.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlreader.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xmlreader.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_XMLREADER_H #define PHP_XMLREADER_H diff --git a/ext/xmlreader/tests/012.phpt b/ext/xmlreader/tests/012.phpt index efc42350d..3aae4c0e6 100755 --- a/ext/xmlreader/tests/012.phpt +++ b/ext/xmlreader/tests/012.phpt @@ -4,7 +4,7 @@ XMLReader: accessing empty and non existing attributes <?php if (!extension_loaded("xmlreader")) print "skip"; ?> --FILE-- <?php -/* $Id: 012.phpt 210441 2006-03-30 21:47:21Z helly $ */ +/* $Id: 012.phpt 316311 2011-09-07 09:19:28Z pajoye $ */ $xmlstring =<<<EOF <?xml version="1.0" encoding="UTF-8"?> @@ -25,7 +25,9 @@ $xmlstring =<<<EOF EOF; $xmlstring = str_replace('012.dtd', dirname(__FILE__).'/012.dtd', $xmlstring); - +if (DIRECTORY_SEPARATOR == '\\') { + $xmlstring = str_replace('\\',"/", $xmlstring); +} $reader = new XMLReader(); $reader->XML($xmlstring); $reader->setParserProperty(XMLReader::DEFAULTATTRS, true); @@ -34,12 +36,15 @@ var_dump($reader->getAttribute('bar')); var_dump($reader->getAttribute('baz')); $reader->close(); -?> -===FILE=== -<?php - +echo "\nUsing URI:\n"; $reader = new XMLReader(); -$reader->open(dirname(__FILE__) . '/012.xml'); +$file = dirname(__FILE__) . '/012.xml'; +if (DIRECTORY_SEPARATOR == '\\') { + $file = str_replace('\\',"/", $file); +} + +$reader->open($file); + //$reader->setParserProperty(XMLReader::DEFAULTATTRS, true); while($reader->read() && $reader->nodeType != XMLReader::ELEMENT); var_dump($reader->getAttribute('bar')); @@ -61,7 +66,8 @@ string(0) "" NULL string(0) "" string(0) "" -===FILE=== + +Using URI: string(0) "" NULL string(0) "" diff --git a/ext/xmlrpc/php_xmlrpc.h b/ext/xmlrpc/php_xmlrpc.h index 754fabfa2..663d51661 100644 --- a/ext/xmlrpc/php_xmlrpc.h +++ b/ext/xmlrpc/php_xmlrpc.h @@ -37,7 +37,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlrpc.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xmlrpc.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef _PHP_XMLRPC_H #define _PHP_XMLRPC_H diff --git a/ext/xmlrpc/tests/bug51288.phpt b/ext/xmlrpc/tests/bug51288.phpt index d9bdef822..ba341369b 100644 --- a/ext/xmlrpc/tests/bug51288.phpt +++ b/ext/xmlrpc/tests/bug51288.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #51288 (CVE-2010-0397, NULL pointer deref when no <methodName> in request) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php $method = NULL; diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index b14b5584b..4952b61f7 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -37,7 +37,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xmlrpc-epi-php.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: xmlrpc-epi-php.c 321634 2012-01-01 13:15:04Z felipe $ */ /********************************************************************** * BUGS: * diff --git a/ext/xmlwriter/php_xmlwriter.c b/ext/xmlwriter/php_xmlwriter.c index e57009e1a..ee14ab850 100644 --- a/ext/xmlwriter/php_xmlwriter.c +++ b/ext/xmlwriter/php_xmlwriter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlwriter.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: php_xmlwriter.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/xmlwriter/php_xmlwriter.h b/ext/xmlwriter/php_xmlwriter.h index 5552a17d7..db60c1c96 100644 --- a/ext/xmlwriter/php_xmlwriter.h +++ b/ext/xmlwriter/php_xmlwriter.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xmlwriter.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xmlwriter.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_XMLWRITER_H #define PHP_XMLWRITER_H diff --git a/ext/xmlwriter/tests/004.phpt b/ext/xmlwriter/tests/004.phpt index 0a85e8d7f..7c51ea229 100644 --- a/ext/xmlwriter/tests/004.phpt +++ b/ext/xmlwriter/tests/004.phpt @@ -4,7 +4,7 @@ XMLWriter: libxml2 XML Writer, file buffer, flush <?php if (!extension_loaded("xmlwriter")) print "skip"; ?> --FILE-- <?php -/* $Id: 004.phpt 201860 2005-12-02 02:05:26Z iliaa $ */ +/* $Id: 004.phpt 316312 2011-09-07 09:37:56Z pajoye $ */ $doc_dest = '001.xml'; $xw = xmlwriter_open_uri($doc_dest); diff --git a/ext/xmlwriter/tests/OO_004.phpt b/ext/xmlwriter/tests/OO_004.phpt index ab69e5a79..afc4343c5 100644 --- a/ext/xmlwriter/tests/OO_004.phpt +++ b/ext/xmlwriter/tests/OO_004.phpt @@ -4,7 +4,7 @@ XMLWriter: libxml2 XML Writer, file buffer, flush <?php if (!extension_loaded("xmlwriter")) print "skip"; ?> --FILE-- <?php -/* $Id: OO_004.phpt 201860 2005-12-02 02:05:26Z iliaa $ */ +/* $Id: OO_004.phpt 316312 2011-09-07 09:37:56Z pajoye $ */ $doc_dest = '001.xml'; $xw = new XMLWriter(); diff --git a/ext/xsl/php_xsl.c b/ext/xsl/php_xsl.c index b484303d5..e14da5cbe 100644 --- a/ext/xsl/php_xsl.c +++ b/ext/xsl/php_xsl.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.c 314376 2011-08-06 14:47:44Z felipe $ */ +/* $Id: php_xsl.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -141,6 +141,13 @@ zend_object_value xsl_objects_new(zend_class_entry *class_type TSRMLS_DC) } /* }}} */ +PHP_INI_BEGIN() +/* Default is not allowing any write operations. + XSL_SECPREF_CREATE_DIRECTORY | XSL_SECPREF_WRITE_NETWORK |Â XSL_SECPREF_WRITE_FILE == 44 +*/ +PHP_INI_ENTRY("xsl.security_prefs", "44", PHP_INI_ALL, NULL) +PHP_INI_END() + /* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(xsl) @@ -167,6 +174,14 @@ PHP_MINIT_FUNCTION(xsl) REGISTER_LONG_CONSTANT("XSL_CLONE_NEVER", -1, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("XSL_CLONE_ALWAYS", 1, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_NONE", XSL_SECPREF_NONE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_FILE", XSL_SECPREF_READ_FILE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_FILE", XSL_SECPREF_WRITE_FILE, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_CREATE_DIRECTORY", XSL_SECPREF_CREATE_DIRECTORY, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_READ_NETWORK", XSL_SECPREF_READ_NETWORK, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_WRITE_NETWORK", XSL_SECPREF_WRITE_NETWORK, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("XSL_SECPREF_DEFAULT", XSL_SECPREF_DEFAULT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("LIBXSLT_VERSION", LIBXSLT_VERSION, CONST_CS | CONST_PERSISTENT); REGISTER_STRING_CONSTANT("LIBXSLT_DOTTED_VERSION", LIBXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT); @@ -175,6 +190,8 @@ PHP_MINIT_FUNCTION(xsl) REGISTER_STRING_CONSTANT("LIBEXSLT_DOTTED_VERSION", LIBEXSLT_DOTTED_VERSION, CONST_CS | CONST_PERSISTENT); #endif + REGISTER_INI_ENTRIES(); + return SUCCESS; } /* }}} */ @@ -258,6 +275,8 @@ PHP_MSHUTDOWN_FUNCTION(xsl) xsltCleanupGlobals(); + UNREGISTER_INI_ENTRIES(); + return SUCCESS; } /* }}} */ diff --git a/ext/xsl/php_xsl.h b/ext/xsl/php_xsl.h index 09238b2ff..d8597c18d 100644 --- a/ext/xsl/php_xsl.h +++ b/ext/xsl/php_xsl.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_xsl.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_xsl.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_XSL_H #define PHP_XSL_H @@ -32,6 +32,7 @@ extern zend_module_entry xsl_module_entry; #include <libxslt/xsltInternals.h> #include <libxslt/xsltutils.h> #include <libxslt/transform.h> +#include <libxslt/security.h> #if HAVE_XSL_EXSLT #include <libexslt/exslt.h> #include <libexslt/exsltconfig.h> @@ -43,6 +44,15 @@ extern zend_module_entry xsl_module_entry; #include <libxslt/extensions.h> #include <libxml/xpathInternals.h> +#define XSL_SECPREF_NONE 0 +#define XSL_SECPREF_READ_FILE 2 +#define XSL_SECPREF_WRITE_FILE 4 +#define XSL_SECPREF_CREATE_DIRECTORY 8 +#define XSL_SECPREF_READ_NETWORK 16 +#define XSL_SECPREF_WRITE_NETWORK 32 +/* Default == disable all write access == XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY |Â XSL_SECPREF_WRITE_FILE */ +#define XSL_SECPREF_DEFAULT 44 + typedef struct _xsl_object { zend_object std; void *ptr; diff --git a/ext/xsl/tests/bug54446_with_ini.phpt b/ext/xsl/tests/bug54446_with_ini.phpt new file mode 100644 index 000000000..31cd1d43b --- /dev/null +++ b/ext/xsl/tests/bug54446_with_ini.phpt @@ -0,0 +1,95 @@ +--TEST-- +Bug #54446 (Arbitrary file creation via libxslt 'output' extension with php.ini setting) +--SKIPIF-- +<?php +if (!extension_loaded('xsl')) die("skip Extension XSL is required\n"); +?> +--FILE-- +<?php +include("prepare.inc"); + +$outputfile = dirname(__FILE__)."/bug54446test.txt"; +if (file_exists($outputfile)) { + unlink($outputfile); +} + +$sXsl = <<<EOT +<xsl:stylesheet version="1.0" + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:sax="http://icl.com/saxon" + extension-element-prefixes="sax"> + + <xsl:template match="/"> + <sax:output href="$outputfile" method="text"> + <xsl:value-of select="'0wn3d via PHP and libxslt ...'"/> + </sax:output> + </xsl:template> + +</xsl:stylesheet> +EOT; + +$xsl->loadXML( $sXsl ); + +# START XSLT +$proc->importStylesheet( $xsl ); + +# TRASNFORM & PRINT +print $proc->transformToXML( $dom ); + + +if (file_exists($outputfile)) { + print "$outputfile exists, but shouldn't!\n"; +} else { + print "OK, no file created\n"; +} + +#SET NO SECURITY PREFS +ini_set("xsl.security_prefs", XSL_SECPREF_NONE); + +# TRASNFORM & PRINT +print $proc->transformToXML( $dom ); + + +if (file_exists($outputfile)) { + print "OK, file exists\n"; +} else { + print "$outputfile doesn't exist, but should!\n"; +} + +unlink($outputfile); + +#SET SECURITY PREFS AGAIN +ini_set("xsl.security_prefs", XSL_SECPREF_WRITE_FILE | XSL_SECPREF_WRITE_NETWORK | XSL_SECPREF_CREATE_DIRECTORY); + +# TRASNFORM & PRINT +print $proc->transformToXML( $dom ); + +if (file_exists($outputfile)) { + print "$outputfile exists, but shouldn't!\n"; +} else { + print "OK, no file created\n"; +} + + +--EXPECTF-- +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %s element output in %s on line %d + +Warning: XSLTProcessor::transformToXml(): File write for %s/bug54446test.txt refused in %s on line %s + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element output in %s on line %d + +Warning: XSLTProcessor::transformToXml(): xsltDocumentElem: write rights for %s/bug54446test.txt denied in %s on line %d +OK, no file created +OK, file exists + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %s element output in %s on line %d + +Warning: XSLTProcessor::transformToXml(): File write for %s/bug54446test.txt refused in %s on line %s + +Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element output in %s on line %d + +Warning: XSLTProcessor::transformToXml(): xsltDocumentElem: write rights for %s/bug54446test.txt denied in %s on line %d +OK, no file created +--CREDITS-- +Christian Stocker, chregu@php.net + diff --git a/ext/xsl/tests/exslt.xml b/ext/xsl/tests/exslt.xml index 54913c6f5..562e08e82 100644 --- a/ext/xsl/tests/exslt.xml +++ b/ext/xsl/tests/exslt.xml @@ -6,4 +6,10 @@ <date date="2000-02-29"/> <date date="9990001-12-31Z"/> <date date="-0004-02-29"/> + <date date="1999-01-02"/> + <date date="1999-01-03"/> + <date date="2004-01-01"/> + <date date="2006-01-01"/> + <date date="2007-12-31"/> </page> + diff --git a/ext/xsl/tests/xslt010.phpt b/ext/xsl/tests/xslt010.phpt index 75729c270..96ef8c627 100644 --- a/ext/xsl/tests/xslt010.phpt +++ b/ext/xsl/tests/xslt010.phpt @@ -30,7 +30,7 @@ Test 10: EXSLT Support month-in-year : 12 month-name : December month-abbreviation : Dec - week-in-year : 53 + week-in-year : 1 day-in-year : 365 day-in-month : 31 day-of-week-in-month : 5 @@ -84,7 +84,7 @@ Test 10: EXSLT Support month-in-year : 12 month-name : December month-abbreviation : Dec - week-in-year : 53 + week-in-year : 1 day-in-year : 365 day-in-month : 31 day-of-week-in-month : 5 @@ -102,7 +102,7 @@ Test 10: EXSLT Support month-in-year : 2 month-name : February month-abbreviation : Feb - week-in-year : 10 + week-in-year : 9 day-in-year : 60 day-in-month : 29 day-of-week-in-month : 5 @@ -113,4 +113,94 @@ Test 10: EXSLT Support hour-in-day : NaN minute-in-hour : NaN second-in-minute : NaN + + Test Date : 1999-01-02 + year : 1999 + leap-year : false + month-in-year : 1 + month-name : January + month-abbreviation : Jan + week-in-year : 53 + day-in-year : 2 + day-in-month : 2 + day-of-week-in-month : 1 + day-in-week : 7 + day-name : Saturday + day-abbreviation : Sat + time : + hour-in-day : NaN + minute-in-hour : NaN + second-in-minute : NaN + + Test Date : 1999-01-03 + year : 1999 + leap-year : false + month-in-year : 1 + month-name : January + month-abbreviation : Jan + week-in-year : 53 + day-in-year : 3 + day-in-month : 3 + day-of-week-in-month : 1 + day-in-week : 1 + day-name : Sunday + day-abbreviation : Sun + time : + hour-in-day : NaN + minute-in-hour : NaN + second-in-minute : NaN + + Test Date : 2004-01-01 + year : 2004 + leap-year : true + month-in-year : 1 + month-name : January + month-abbreviation : Jan + week-in-year : 1 + day-in-year : 1 + day-in-month : 1 + day-of-week-in-month : 1 + day-in-week : 5 + day-name : Thursday + day-abbreviation : Thu + time : + hour-in-day : NaN + minute-in-hour : NaN + second-in-minute : NaN + + Test Date : 2006-01-01 + year : 2006 + leap-year : false + month-in-year : 1 + month-name : January + month-abbreviation : Jan + week-in-year : 52 + day-in-year : 1 + day-in-month : 1 + day-of-week-in-month : 1 + day-in-week : 1 + day-name : Sunday + day-abbreviation : Sun + time : + hour-in-day : NaN + minute-in-hour : NaN + second-in-minute : NaN + + Test Date : 2007-12-31 + year : 2007 + leap-year : false + month-in-year : 12 + month-name : December + month-abbreviation : Dec + week-in-year : 1 + day-in-year : 365 + day-in-month : 31 + day-of-week-in-month : 5 + day-in-week : 2 + day-name : Monday + day-abbreviation : Mon + time : + hour-in-day : NaN + minute-in-hour : NaN + second-in-minute : NaN diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt index d9a70517e..a0d6bf6b7 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcnostring.phpt @@ -30,8 +30,8 @@ Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation faile Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d -Warning: XSLTProcessor::transformToXml(): xsltValueOf: text copy failed in %s on line %d -bool(false) +Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d +NULL --CREDITS-- Christian Weiske, cweiske@php.net PHP Testfest Berlin 2009-05-09 diff --git a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt index a0ddf96a6..1aa7bb051 100644 --- a/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt +++ b/ext/xsl/tests/xsltprocessor_registerPHPFunctions-funcundef.phpt @@ -29,8 +29,8 @@ Warning: XSLTProcessor::transformToXml(): xmlXPathCompiledEval: evaluation faile Warning: XSLTProcessor::transformToXml(): runtime error: file %s line %d element value-of in %s on line %d -Warning: XSLTProcessor::transformToXml(): xsltValueOf: text copy failed in %s on line %d -bool(false) +Warning: XSLTProcessor::transformToXml(): XPath evaluation returned no result. in %s on line %d +NULL --CREDITS-- Christian Weiske, cweiske@php.net PHP Testfest Berlin 2009-05-09 diff --git a/ext/xsl/xsl_fe.h b/ext/xsl/xsl_fe.h index a02292e55..f49bc43cb 100644 --- a/ext/xsl/xsl_fe.h +++ b/ext/xsl/xsl_fe.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xsl_fe.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: xsl_fe.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef XSL_FE_H #define XSL_FE_H diff --git a/ext/xsl/xsltprocessor.c b/ext/xsl/xsltprocessor.c index ef3cc383f..af5cd8fe0 100644 --- a/ext/xsl/xsltprocessor.c +++ b/ext/xsl/xsltprocessor.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xsltprocessor.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: xsltprocessor.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -475,6 +475,9 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl zval *doXInclude, *member; zend_object_handlers *std_hnd; FILE *f; + int secPrefsError = 0; + int secPrefsValue; + xsltSecurityPrefsPtr secPrefs = NULL; node = php_libxml_import_node(docp TSRMLS_CC); @@ -531,11 +534,56 @@ static xmlDocPtr php_xsl_apply_stylesheet(zval *id, xsl_object *intern, xsltStyl } efree(member); - newdocp = xsltApplyStylesheetUser(style, doc, (const char**) params, NULL, f, ctxt); + + secPrefsValue = INI_INT("xsl.security_prefs"); + + /* if securityPrefs is set to NONE, we don't have to do any checks, but otherwise... */ + if (secPrefsValue != XSL_SECPREF_NONE) { + secPrefs = xsltNewSecurityPrefs(); + if (secPrefsValue & XSL_SECPREF_READ_FILE ) { + if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_READ_FILE, xsltSecurityForbid)) { + secPrefsError = 1; + } + } + if (secPrefsValue & XSL_SECPREF_WRITE_FILE ) { + if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_WRITE_FILE, xsltSecurityForbid)) { + secPrefsError = 1; + } + } + if (secPrefsValue & XSL_SECPREF_CREATE_DIRECTORY ) { + if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_CREATE_DIRECTORY, xsltSecurityForbid)) { + secPrefsError = 1; + } + } + if (secPrefsValue & XSL_SECPREF_READ_NETWORK) { + if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_READ_NETWORK, xsltSecurityForbid)) { + secPrefsError = 1; + } + } + if (secPrefsValue & XSL_SECPREF_WRITE_NETWORK) { + if (0 != xsltSetSecurityPrefs(secPrefs, XSLT_SECPREF_WRITE_NETWORK, xsltSecurityForbid)) { + secPrefsError = 1; + } + } + + if (0 != xsltSetCtxtSecurityPrefs(secPrefs, ctxt)) { + secPrefsError = 1; + } + } + + if (secPrefsError == 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Can't set libxslt security properties, not doing transformation for security reasons"); + } else { + newdocp = xsltApplyStylesheetUser(style, doc, (const char**) params, NULL, f, ctxt); + } if (f) { fclose(f); } + xsltFreeTransformContext(ctxt); + if (secPrefs) { + xsltFreeSecurityPrefs(secPrefs); + } if (intern->node_list != NULL) { zend_hash_destroy(intern->node_list); diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index f86fa6310..4765e8b66 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zip.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: php_zip.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2872,7 +2872,7 @@ static PHP_MINFO_FUNCTION(zip) php_info_print_table_start(); php_info_print_table_row(2, "Zip", "enabled"); - php_info_print_table_row(2, "Extension Version","$Id: php_zip.c 313665 2011-07-25 11:42:53Z felipe $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c 321634 2012-01-01 13:15:04Z felipe $"); php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION_STRING); php_info_print_table_row(2, "Libzip version", "0.9.0"); diff --git a/ext/zip/php_zip.h b/ext/zip/php_zip.h index beaae7f9d..f3634e77b 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zip.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_zip.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ZIP_H #define PHP_ZIP_H diff --git a/ext/zip/tests/bug38943.inc b/ext/zip/tests/bug38943.inc deleted file mode 100644 index a6f45e829..000000000 --- a/ext/zip/tests/bug38943.inc +++ /dev/null @@ -1,16 +0,0 @@ -<?php -class myZip extends ZipArchive { - private $test = 0; - public $testp = 1; - private $testarray = array(); - - public function __construct() { - $this->testarray[] = 1; - var_dump($this->testarray); - } -} - -$z = new myZip; -$z->testp = "foobar"; -var_dump($z); - diff --git a/ext/zip/tests/bug38943.phpt b/ext/zip/tests/bug38943.phpt index 856818275..c5e228471 100644 --- a/ext/zip/tests/bug38943.phpt +++ b/ext/zip/tests/bug38943.phpt @@ -1,14 +1,26 @@ --TEST-- -#38943, properties in extended class cannot be set (< 5.3) +#38943, properties in extended class cannot be set (5.3+) --SKIPIF-- <?php -/* $Id: bug38943.phpt 260091 2008-05-21 09:27:41Z pajoye $ */ if(!extension_loaded('zip')) die('skip'); -if (!defined('PHP_VERSION_MAJOR')) die('skip'); ?> --FILE-- <?php -include dirname(__FILE__) . '/bug38943.inc'; +class myZip extends ZipArchive { + private $test = 0; + public $testp = 1; + private $testarray = array(); + + public function __construct() { + $this->testarray[] = 1; + var_dump($this->testarray); + } +} + +$z = new myZip; +$z->testp = "foobar"; +var_dump($z); + ?> --EXPECTF-- array(1) { @@ -16,11 +28,11 @@ array(1) { int(1) } object(myZip)#1 (%d) { - ["test:private"]=> + ["test":"myZip":private]=> int(0) ["testp"]=> string(6) "foobar" - ["testarray:private"]=> + ["testarray":"myZip":private]=> array(1) { [0]=> int(1) diff --git a/ext/zip/tests/bug38943_2.phpt b/ext/zip/tests/bug38943_2.phpt deleted file mode 100644 index 0045f0d1c..000000000 --- a/ext/zip/tests/bug38943_2.phpt +++ /dev/null @@ -1,38 +0,0 @@ ---TEST-- -#38943, properties in extended class cannot be set (5.3) ---SKIPIF-- -<?php -/* $Id: bug38943_2.phpt 268872 2008-11-12 17:16:51Z felipe $ */ -if(!extension_loaded('zip')) die('skip'); -if (version_compare(PHP_VERSION, "5.3", "<")) die('skip test for5.3+ only'); -?> ---FILE-- -<?php -include 'bug38943.inc'; -?> ---EXPECTF-- -array(1) { - [0]=> - int(1) -} -object(myZip)#1 (%d) { - ["test":"myZip":private]=> - int(0) - ["testp"]=> - string(6) "foobar" - ["testarray":"myZip":private]=> - array(1) { - [0]=> - int(1) - } - ["status"]=> - int(0) - ["statusSys"]=> - int(0) - ["numFiles"]=> - int(0) - ["filename"]=> - string(0) "" - ["comment"]=> - string(0) "" -} diff --git a/ext/zip/tests/bug53885.phpt b/ext/zip/tests/bug53885.phpt index d59bf8f03..1b3fcb9e4 100644 --- a/ext/zip/tests/bug53885.phpt +++ b/ext/zip/tests/bug53885.phpt @@ -15,5 +15,10 @@ $nx->locateName("a",ZIPARCHIVE::FL_UNCHANGED); $nx->statName("a",ZIPARCHIVE::FL_UNCHANGED); ?> ==DONE== +--CLEAN-- +<?php +$fname = dirname(__FILE__)."/test53885.zip"; +unlink($fname); +?> --EXPECTF-- ==DONE== diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index 6f2a1edf6..fc8d4d192 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zlib.h 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: php_zlib.h 321634 2012-01-01 13:15:04Z felipe $ */ #ifndef PHP_ZLIB_H #define PHP_ZLIB_H diff --git a/ext/zlib/tests/003.phpt b/ext/zlib/tests/003.phpt index 2732d4cea..9fe943659 100644 --- a/ext/zlib/tests/003.phpt +++ b/ext/zlib/tests/003.phpt @@ -1,13 +1,13 @@ --TEST-- -gzencode()/base64_encode() +gzencode() --SKIPIF-- -<?php if (!extension_loaded("zlib")) print "skip"; ?> +<?php if (!extension_loaded("zlib") || !function_exists("gzdecode")) print "skip"; ?> --FILE-- <?php $original = str_repeat("hallo php",4096); -$packed=gzencode($original); -echo strlen($packed)." ".strlen($original)."\n"; -if (strcmp(base64_encode($packed),"H4sIAAAAAAAAA+3GoQ0AQAgEsFV+NdwJEthf/R6kVU11z9tsRERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERERETu5gPlQAe9AJAAAA==")==0) echo "Strings are equal"; +$packed = gzencode($original); +echo strlen($packed)." ".strlen($original). "\n"; +if (strcmp($original, gzdecode($packed)) == 0) echo "Strings are equal"; ?> --EXPECT-- 118 36864 diff --git a/ext/zlib/tests/gzfilegzreadfile.phpt b/ext/zlib/tests/gzfilegzreadfile.phpt index 433fcab14..f8550c2d1 100644 --- a/ext/zlib/tests/gzfilegzreadfile.phpt +++ b/ext/zlib/tests/gzfilegzreadfile.phpt @@ -1,7 +1,7 @@ --TEST-- gzfile(), gzreadfile() --SKIPIF-- -<?php /* $Id: gzfilegzreadfile.phpt 296107 2010-03-12 10:28:59Z jani $ */ +<?php /* $Id: gzfilegzreadfile.phpt 316410 2011-09-08 10:20:38Z pajoye $ */ if (!extension_loaded("zlib")) print "skip"; ?> --FILE-- <?php diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 584c54c3a..2e41ea6f2 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib.c 313665 2011-07-25 11:42:53Z felipe $ */ +/* $Id: zlib.c 321634 2012-01-01 13:15:04Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index b39aa6bbf..bc382cae2 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib_filter.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: zlib_filter.c 321634 2012-01-01 13:15:04Z felipe $ */ #include "php.h" #include "php_zlib.h" diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index 01315d3ec..43e993db6 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2011 The PHP Group | + | Copyright (c) 1997-2012 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib_fopen_wrapper.c 306939 2011-01-01 02:19:59Z felipe $ */ +/* $Id: zlib_fopen_wrapper.c 321634 2012-01-01 13:15:04Z felipe $ */ #define _GNU_SOURCE |
