diff options
author | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2010-10-21 08:52:46 +0200 |
commit | 01fcdff3849c3691d9aaeaab735846ab6d8895ca (patch) | |
tree | 6460876d356113fa7053df36f2aa00baa7db24a9 /ext | |
parent | 855a09f4eded707941180c9d90acd17c25e29447 (diff) | |
download | php-upstream/5.3.3.tar.gz |
Imported Upstream version 5.3.3upstream/5.3.3
Diffstat (limited to 'ext')
691 files changed, 53076 insertions, 36499 deletions
diff --git a/ext/bcmath/tests/bcadd_error1.phpt b/ext/bcmath/tests/bcadd_error1.phpt new file mode 100644 index 000000000..c7d526eec --- /dev/null +++ b/ext/bcmath/tests/bcadd_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcadd() incorrect argument count +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcadd(); +?> +--EXPECTF-- +Warning: bcadd() expects at least 2 parameters, 0 given in %s on line %d
\ No newline at end of file diff --git a/ext/bcmath/tests/bcadd_variation001.phpt b/ext/bcmath/tests/bcadd_variation001.phpt new file mode 100644 index 000000000..a0a64f634 --- /dev/null +++ b/ext/bcmath/tests/bcadd_variation001.phpt @@ -0,0 +1,16 @@ +--TEST-- +bcadd() with non-integers +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=5 +--FILE-- +<?php +echo bcadd("2.2", "4.3", "2")."\n"; +echo bcadd("2.2", "-7.3", "1")."\n"; +echo bcadd("-4.27", "7.3"); +?> +--EXPECTF-- +6.50 +-5.1 +3.03000
\ No newline at end of file diff --git a/ext/bcmath/tests/bccomp_variation001.phpt b/ext/bcmath/tests/bccomp_variation001.phpt new file mode 100644 index 000000000..456f235ef --- /dev/null +++ b/ext/bcmath/tests/bccomp_variation001.phpt @@ -0,0 +1,16 @@ +--TEST-- +bccomp() with non-integers +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bccomp("2.2", "2.2", "2")."\n"; +echo bccomp("2.32", "2.2", "2")."\n"; +echo bccomp("2.29", "2.3", "2"); +?> +--EXPECTF-- +0 +1 +-1
\ No newline at end of file diff --git a/ext/bcmath/tests/bccomp_variation002.phpt b/ext/bcmath/tests/bccomp_variation002.phpt new file mode 100644 index 000000000..73fbc8217 --- /dev/null +++ b/ext/bcmath/tests/bccomp_variation002.phpt @@ -0,0 +1,16 @@ +--TEST-- +bccomp() with negative value +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bccomp("-2", "-2")."\n"; +echo bccomp("-2", "2", "1")."\n"; +echo bccomp("-2.29", "-2.3", "2"); +?> +--EXPECTF-- +0 +-1 +1
\ No newline at end of file diff --git a/ext/bcmath/tests/bcmod_error2.phpt b/ext/bcmath/tests/bcmod_error2.phpt new file mode 100644 index 000000000..bac49c8e9 --- /dev/null +++ b/ext/bcmath/tests/bcmod_error2.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcmod() - mod by 0 +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcmod("10", "0"); +?> +--EXPECTF-- +Warning: bcmod(): Division by zero in %s on line %d
\ No newline at end of file diff --git a/ext/bcmath/tests/bcmul_error1.phpt b/ext/bcmath/tests/bcmul_error1.phpt new file mode 100644 index 000000000..ec366336c --- /dev/null +++ b/ext/bcmath/tests/bcmul_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcmul() incorrect argument count +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcmul(); +?> +--EXPECTF-- +Warning: bcmul() expects at least 2 parameters, 0 given in %s on line %d
\ No newline at end of file diff --git a/ext/bcmath/tests/bcpow_error3.phpt b/ext/bcmath/tests/bcpow_error3.phpt new file mode 100644 index 000000000..4b937a180 --- /dev/null +++ b/ext/bcmath/tests/bcpow_error3.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcpow() incorrect argument count +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcpow(); +?> +--EXPECTF-- +Warning: bcpow() expects at least 2 parameters, 0 given in %s on line %d
\ No newline at end of file diff --git a/ext/bcmath/tests/bcpow_variation001.phpt b/ext/bcmath/tests/bcpow_variation001.phpt new file mode 100644 index 000000000..58e96b3c6 --- /dev/null +++ b/ext/bcmath/tests/bcpow_variation001.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcpow() with a negative exponent +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcpow("2", "-4"); +?> +--EXPECTF-- +0
\ No newline at end of file diff --git a/ext/bcmath/tests/bcpowmod.phpt b/ext/bcmath/tests/bcpowmod.phpt new file mode 100644 index 000000000..6b1f30e57 --- /dev/null +++ b/ext/bcmath/tests/bcpowmod.phpt @@ -0,0 +1,16 @@ +--TEST-- +bcpowmod() - Raise an arbitrary precision number to another, reduced by a specified modulus +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcpowmod("5", "2", "7") . "\n"; +echo bcpowmod("-2", "5", "7") . "\n"; +echo bcpowmod("10", "2147483648", "2047"); +?> +--EXPECT-- +4 +-4 +790
\ No newline at end of file diff --git a/ext/bcmath/tests/bcscale_variation001.phpt b/ext/bcmath/tests/bcscale_variation001.phpt new file mode 100644 index 000000000..2a7b8db5e --- /dev/null +++ b/ext/bcmath/tests/bcscale_variation001.phpt @@ -0,0 +1,13 @@ +--TEST-- +bcscale() with negative argument +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +bcscale(-4); +echo bcdiv("20.56", "4"); +?> +--EXPECTF-- +5
\ No newline at end of file diff --git a/ext/bcmath/tests/bcscale_variation002.phpt b/ext/bcmath/tests/bcscale_variation002.phpt new file mode 100644 index 000000000..0db6cff9f --- /dev/null +++ b/ext/bcmath/tests/bcscale_variation002.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcadd() incorrect argument count +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=-2 +--FILE-- +<?php +echo bcadd("-4.27", "7.3"); +?> +--EXPECTF-- +3
\ No newline at end of file diff --git a/ext/bcmath/tests/bcsqrt_error2.phpt b/ext/bcmath/tests/bcsqrt_error2.phpt new file mode 100644 index 000000000..c52e2f3cf --- /dev/null +++ b/ext/bcmath/tests/bcsqrt_error2.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcsqrt() incorrect argument count +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcsqrt(); +?> +--EXPECTF-- +Warning: bcsqrt() expects at least 1 parameter, 0 given in %s on line %d
\ No newline at end of file diff --git a/ext/bcmath/tests/bcsqrt_variation001.phpt b/ext/bcmath/tests/bcsqrt_variation001.phpt new file mode 100644 index 000000000..5e9ec1edb --- /dev/null +++ b/ext/bcmath/tests/bcsqrt_variation001.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcsqrt() with argument of 0 +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcsqrt("0"); +?> +--EXPECTF-- +0
\ No newline at end of file diff --git a/ext/bcmath/tests/bcsub_error1.phpt b/ext/bcmath/tests/bcsub_error1.phpt new file mode 100644 index 000000000..51c020e78 --- /dev/null +++ b/ext/bcmath/tests/bcsub_error1.phpt @@ -0,0 +1,12 @@ +--TEST-- +bcsub() incorrect argument count +--SKIPIF-- +<?php if(!extension_loaded("bcmath")) print "skip"; ?> +--INI-- +bcmath.scale=0 +--FILE-- +<?php +echo bcsub(); +?> +--EXPECTF-- +Warning: bcsub() expects at least 2 parameters, 0 given in %s on line %d
\ No newline at end of file diff --git a/ext/bz2/bz2.c b/ext/bz2/bz2.c index 9ecaf29e1..e2497389c 100644 --- a/ext/bz2/bz2.c +++ b/ext/bz2/bz2.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: bz2.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: bz2.c 300764 2010-06-26 16:03:39Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -85,14 +85,23 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_bzdecompress, 0, 0, 1) ZEND_ARG_INFO(0, small) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO_EX(arginfo_bzwrite, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_bzflush, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() /* }}} */ static const zend_function_entry bz2_functions[] = { PHP_FE(bzopen, arginfo_bzopen) PHP_FE(bzread, arginfo_bzread) - PHP_FALIAS(bzwrite, fwrite, NULL) - PHP_FALIAS(bzflush, fflush, NULL) - PHP_FALIAS(bzclose, fclose, NULL) + PHP_FALIAS(bzwrite, fwrite, arginfo_bzwrite) + PHP_FALIAS(bzflush, fflush, arginfo_bzflush) + PHP_FALIAS(bzclose, fclose, arginfo_bzflush) PHP_FE(bzerrno, arginfo_bzerrno) PHP_FE(bzerrstr, arginfo_bzerrstr) PHP_FE(bzerror, arginfo_bzerror) diff --git a/ext/com_dotnet/tests/bug49192.phpt b/ext/com_dotnet/tests/bug49192.phpt new file mode 100644 index 000000000..7bae1d749 --- /dev/null +++ b/ext/com_dotnet/tests/bug49192.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #49192 (PHP crashes when GC invoked on COM object) +--SKIPIF-- +<?php +if (!extension_loaded("com_dotnet")) print "skip COM/.Net support not present"; ?> +--FILE-- +<?php + +$dbConnection = new Com('ADODB.Connection'); +var_dump(gc_collect_cycles()); +?> +--EXPECT-- +int(0) diff --git a/ext/curl/interface.c b/ext/curl/interface.c index 1f6f6a928..35cc1d996 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interface.c 294464 2010-02-03 20:53:31Z pajoye $ */ +/* $Id: interface.c 298299 2010-04-22 08:58:07Z pajoye $ */ #define ZEND_INCLUDE_FULL_WINDOWS_HEADERS @@ -370,7 +370,7 @@ PHP_MINFO_FUNCTION(curl) #ifdef CURL_VERSION_IPV6 {"IPv6", CURL_VERSION_IPV6}, #endif -#if LIBCURL_VERSION_NUM > 0x070a09 /* 7.10.1 */ +#if LIBCURL_VERSION_NUM > 0x070b00 /* 7.11.1 */ {"Largefile", CURL_VERSION_LARGEFILE}, #endif #if LIBCURL_VERSION_NUM > 0x070a05 /* 7.10.6 */ @@ -1678,7 +1678,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu convert_to_long_ex(zvalue); if ((PG(open_basedir) && *PG(open_basedir)) || PG(safe_mode)) { if (Z_LVAL_PP(zvalue) != 0) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set"); RETVAL_FALSE; return 1; } @@ -1970,7 +1970,7 @@ static int _php_curl_setopt(php_curl *ch, long option, zval **zvalue, zval *retu SAVE_CURL_ERROR(ch, error); if (error != CURLE_OK) { - RETVAL_FALSE + RETVAL_FALSE; return 1; } @@ -2095,6 +2095,11 @@ PHP_FUNCTION(curl_setopt) ZEND_FETCH_RESOURCE(ch, php_curl *, &zid, -1, le_curl_name, le_curl); + if (options <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid curl configuration option"); + RETURN_FALSE; + } + if (!_php_curl_setopt(ch, options, zvalue, return_value TSRMLS_CC)) { RETURN_TRUE; } else { diff --git a/ext/curl/streams.c b/ext/curl/streams.c index 39d78f740..4b591e2f8 100644 --- a/ext/curl/streams.c +++ b/ext/curl/streams.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streams.c 294462 2010-02-03 20:49:03Z pajoye $ */ +/* $Id: streams.c 293732 2010-01-19 13:44:08Z jani $ */ /* This file implements cURL based wrappers. * NOTE: If you are implementing your own streams that are intended to diff --git a/ext/curl/tests/curl_setopt_CURLOPT_FOLLOWLOCATION_open_basedir.phpt b/ext/curl/tests/curl_setopt_CURLOPT_FOLLOWLOCATION_open_basedir.phpt index 68465e6da..c00e1d208 100644 --- a/ext/curl/tests/curl_setopt_CURLOPT_FOLLOWLOCATION_open_basedir.phpt +++ b/ext/curl/tests/curl_setopt_CURLOPT_FOLLOWLOCATION_open_basedir.phpt @@ -17,6 +17,6 @@ curl_close($ch); var_dump($succes); ?> --EXPECTF-- -Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when %r(in safe_mode or an )?%ropen_basedir is set in %s.php on line %d +Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when %r(safe_mode is enabled or an )?%ropen_basedir is set in %s.php on line %d bool(false) diff --git a/ext/curl/tests/curl_setopt_basic001.phpt b/ext/curl/tests/curl_setopt_basic001.phpt index 99cb538d3..178fbf7c1 100644 --- a/ext/curl/tests/curl_setopt_basic001.phpt +++ b/ext/curl/tests/curl_setopt_basic001.phpt @@ -30,6 +30,6 @@ var_dump( $curl_content ); Warning: Directive 'safe_mode' is deprecated in PHP 5.3 and greater in Unknown on line 0 *** Testing curl_setopt with CURLOPT_FOLLOWLOCATION in safemode -Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when in safe_mode or an open_basedir is set in %s on line %d +Warning: curl_setopt(): CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in %s on line %d bool(false) diff --git a/ext/date/config0.m4 b/ext/date/config0.m4 index 1d5ed74a8..56e358913 100644 --- a/ext/date/config0.m4 +++ b/ext/date/config0.m4 @@ -1,4 +1,4 @@ -dnl $Id: config0.m4 294880 2010-02-11 11:11:47Z pajoye $ +dnl $Id: config0.m4 294854 2010-02-10 16:23:30Z derick $ dnl config.m4 for date extension sinclude(ext/date/lib/timelib.m4) diff --git a/ext/date/lib/fallbackmap.h b/ext/date/lib/fallbackmap.h index 7189eb88e..4e4c23c96 100644 --- a/ext/date/lib/fallbackmap.h +++ b/ext/date/lib/fallbackmap.h @@ -26,7 +26,7 @@ { "msd", 1, 4, "Europe/Moscow" }, { "gst", 0, 4, "Asia/Dubai" }, { "pkt", 0, 5, "Asia/Karachi" }, - { "ist", 0, 5.5, "Asia/Calcutta" }, + { "ist", 0, 5.5, "Asia/Kolkata" }, { "npt", 0, 5.75, "Asia/Katmandu" }, { "yekt", 1, 6, "Asia/Yekaterinburg" }, { "novst", 1, 7, "Asia/Novosibirsk" }, diff --git a/ext/date/lib/interval.c b/ext/date/lib/interval.c index 42bb13b00..efd92bd4f 100644 --- a/ext/date/lib/interval.c +++ b/ext/date/lib/interval.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interval.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: interval.c 298973 2010-05-04 15:11:41Z derick $ */ #include "timelib.h" @@ -56,7 +56,7 @@ timelib_rel_time *timelib_diff(timelib_time *one, timelib_time *two) rt->s = two->s - one->s; rt->days = abs(floor((one->sse - two->sse - (dst_h_corr * 3600) - (dst_m_corr * 60)) / 86400)); - timelib_do_rel_normalize(one, rt); + timelib_do_rel_normalize(rt->invert ? one : two, rt); timelib_apply_localtime(one, 1); timelib_apply_localtime(two, 1); diff --git a/ext/date/lib/parse_date.c b/ext/date/lib/parse_date.c index 1f08a951e..641a32901 100644 --- a/ext/date/lib/parse_date.c +++ b/ext/date/lib/parse_date.c @@ -1,9 +1,9 @@ -/* Generated by re2c 0.13.5 on Wed Feb 10 15:19:23 2010 */ +/* Generated by re2c 0.13.5 on Fri Mar 26 12:00:44 2010 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | 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 | @@ -17,12 +17,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.c 294880 2010-02-11 11:11:47Z pajoye $ */ +/* $Id: parse_date.c 301252 2010-07-13 23:59:54Z kalle $ */ #include "timelib.h" #include <stdio.h> #include <ctype.h> +#include <math.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -89,6 +90,8 @@ #define TIMELIB_ERROR 999 +/* Some compilers like AIX, defines uchar in sys/types.h */ +#undef uchar typedef unsigned char uchar; #define BSIZE 8192 @@ -524,7 +527,7 @@ static long timelib_parse_tz_cor(char **ptr) char *begin = *ptr, *end; long tmp; - while (**ptr != '\0') { + while (isdigit(**ptr) || **ptr == ':') { ++*ptr; } end = *ptr; @@ -847,21 +850,21 @@ std: unsigned int yyaccept = 0; static const unsigned char yybm[] = { 0, 0, 0, 0, 0, 0, 0, 0, - 0, 104, 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, - 104, 0, 0, 0, 0, 0, 0, 0, + 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 160, 96, 0, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 16, 16, 80, 16, 16, 16, - 80, 16, 16, 16, 16, 16, 80, 16, - 16, 16, 80, 80, 80, 16, 16, 16, - 16, 16, 16, 0, 0, 0, 0, 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, @@ -881,58 +884,58 @@ std: }; YYDEBUG(0, *YYCURSOR); - if ((YYLIMIT - YYCURSOR) < 30) YYFILL(30); + if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31); yych = *YYCURSOR; YYDEBUG(-1, yych); switch (yych) { case 0x00: - case '\n': goto yy51; + case '\n': goto yy52; case '\t': - case ' ': goto yy48; - case '(': goto yy45; + case ' ': goto yy49; + case '(': goto yy46; case '+': - case '-': goto yy30; + case '-': goto yy31; case ',': - case '.': goto yy50; - case '0': goto yy25; - case '1': goto yy26; - case '2': goto yy27; - case '3': goto yy28; + 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 yy29; - case '@': goto yy11; - case 'A': goto yy36; - case 'B': goto yy17; + 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 yy46; - case 'D': goto yy40; - case 'E': goto yy21; - case 'F': goto yy13; - case 'G': goto yy44; - case 'I': goto yy31; - case 'J': goto yy34; - case 'L': goto yy15; - case 'M': goto yy7; - case 'N': goto yy5; - case 'O': goto yy38; - case 'P': goto yy23; - case 'S': goto yy19; - case 'T': goto yy9; - case 'V': goto yy32; - case 'W': goto yy42; - case 'X': goto yy33; - case 'Y': goto yy2; - case 'a': goto yy37; - case 'b': goto yy18; + 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': @@ -943,44 +946,61 @@ std: case 'u': case 'v': case 'x': - case 'z': goto yy47; - case 'd': goto yy41; - case 'e': goto yy22; - case 'f': goto yy14; - 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 'w': goto yy43; - case 'y': goto yy4; - default: goto yy53; + 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); + { + 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; + } +yy3: + YYDEBUG(3, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= 'E') { if (yych <= ')') { - if (yych >= ')') goto yy139; + if (yych >= ')') goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1523; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych >= 'a') goto yy145; + if (yych <= 'Z') goto yy141; + if (yych >= 'a') goto yy146; } else { if (yych <= 'e') goto yy1532; - if (yych <= 'z') goto yy145; + if (yych <= 'z') goto yy146; } } -yy3: - YYDEBUG(3, *YYCURSOR); +yy4: + YYDEBUG(4, *YYCURSOR); { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -993,172 +1013,172 @@ yy3: TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -yy4: - YYDEBUG(4, *YYCURSOR); +yy5: + YYDEBUG(5, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1523; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy1523; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy5: - YYDEBUG(5, *YYCURSOR); +yy6: + YYDEBUG(6, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'D') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'H') { if (yych <= 'E') goto yy1494; - goto yy140; + goto yy141; } else { if (yych <= 'I') goto yy1495; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1493; } } } else { if (yych <= 'h') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { if (yych == 'e') goto yy1510; - goto yy145; + goto yy146; } } else { if (yych <= 'n') { if (yych <= 'i') goto yy1511; - goto yy145; + goto yy146; } else { if (yych <= 'o') goto yy1509; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy6: - YYDEBUG(6, *YYCURSOR); +yy7: + YYDEBUG(7, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'D') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'H') { if (yych <= 'E') goto yy1494; - goto yy140; + goto yy141; } else { if (yych <= 'I') goto yy1495; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1493; } } } else { if (yych <= 'h') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { if (yych == 'e') goto yy1494; - goto yy140; + goto yy141; } } else { if (yych <= 'n') { if (yych <= 'i') goto yy1495; - goto yy140; + goto yy141; } else { if (yych <= 'o') goto yy1493; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy7: - YYDEBUG(7, *YYCURSOR); +yy8: + YYDEBUG(8, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; goto yy1463; } else { if (yych == 'I') goto yy1464; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1465; } } else { if (yych <= 'h') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1478; - goto yy145; + goto yy146; } else { if (yych <= 'n') { if (yych <= 'i') goto yy1479; - goto yy145; + goto yy146; } else { if (yych <= 'o') goto yy1480; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy8: - YYDEBUG(8, *YYCURSOR); +yy9: + YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; goto yy1463; } else { if (yych == 'I') goto yy1464; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1465; } } else { if (yych <= 'h') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1463; - goto yy140; + goto yy141; } else { if (yych <= 'n') { if (yych <= 'i') goto yy1464; - goto yy140; + goto yy141; } else { if (yych <= 'o') goto yy1465; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy9: - YYDEBUG(9, *YYCURSOR); +yy10: + YYDEBUG(10, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case ')': goto yy139; + case ')': goto yy140; case '0': case '1': goto yy1393; case '2': goto yy1394; @@ -1189,7 +1209,7 @@ yy9: case 'V': case 'X': case 'Y': - case 'Z': goto yy140; + case 'Z': goto yy141; case 'E': goto yy1388; case 'H': goto yy1389; case 'O': goto yy1390; @@ -1215,21 +1235,21 @@ yy9: case 'v': case 'x': case 'y': - case 'z': goto yy145; + 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 yy3; + default: goto yy4; } -yy10: - YYDEBUG(10, *YYCURSOR); +yy11: + YYDEBUG(11, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case ')': goto yy139; + case ')': goto yy140; case '0': case '1': goto yy1393; case '2': goto yy1394; @@ -1281,7 +1301,7 @@ yy10: case 'v': case 'x': case 'y': - case 'z': goto yy140; + case 'z': goto yy141; case 'E': case 'e': goto yy1388; case 'H': @@ -1292,368 +1312,368 @@ yy10: case 'u': goto yy1391; case 'W': case 'w': goto yy1392; - default: goto yy3; + default: goto yy4; } -yy11: - YYDEBUG(11, *YYCURSOR); +yy12: + YYDEBUG(12, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if (yych == '-') goto yy1384; - if (yych <= '/') goto yy12; + if (yych <= '/') goto yy13; if (yych <= '9') goto yy1385; -yy12: - YYDEBUG(12, *YYCURSOR); +yy13: + YYDEBUG(13, *YYCURSOR); { add_error(s, "Unexpected character"); goto std; } -yy13: - YYDEBUG(13, *YYCURSOR); +yy14: + YYDEBUG(14, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1320; } } else { if (yych <= 'N') { if (yych == 'I') goto yy1321; - goto yy140; + goto yy141; } else { if (yych <= 'O') goto yy1322; - if (yych <= 'Q') goto yy140; + if (yych <= 'Q') goto yy141; goto yy1323; } } } else { if (yych <= 'i') { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { if (yych <= 'e') goto yy1361; - if (yych <= 'h') goto yy145; + if (yych <= 'h') goto yy146; goto yy1362; } } else { if (yych <= 'q') { if (yych == 'o') goto yy1363; - goto yy145; + goto yy146; } else { if (yych <= 'r') goto yy1364; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy14: - YYDEBUG(14, *YYCURSOR); +yy15: + YYDEBUG(15, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1320; } } else { if (yych <= 'N') { if (yych == 'I') goto yy1321; - goto yy140; + goto yy141; } else { if (yych <= 'O') goto yy1322; - if (yych <= 'Q') goto yy140; + if (yych <= 'Q') goto yy141; goto yy1323; } } } else { if (yych <= 'i') { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy1320; - if (yych <= 'h') goto yy140; + if (yych <= 'h') goto yy141; goto yy1321; } } else { if (yych <= 'q') { if (yych == 'o') goto yy1322; - goto yy140; + goto yy141; } else { if (yych <= 'r') goto yy1323; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy15: - YYDEBUG(15, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1306; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; - } else { - if (yych <= 'a') goto yy1317; - if (yych <= 'z') goto yy145; - goto yy3; - } - } yy16: YYDEBUG(16, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1306; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy1307; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1306; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'a') goto yy1317; + if (yych <= 'z') goto yy146; + goto yy4; } } yy17: YYDEBUG(17, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1286; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy1307; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1303; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'a') goto yy1307; + if (yych <= 'z') goto yy141; + goto yy4; } } yy18: YYDEBUG(18, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1286; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy1287; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1286; - if (yych <= 'z') goto yy140; - goto yy3; + 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 yy3; - goto yy139; - } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy1229; + 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 yy1228; - goto yy140; + if (yych <= 'E') goto yy1229; + goto yy141; } else { - if (yych <= 'I') goto yy1230; - if (yych <= 'T') goto yy140; - goto yy1231; + if (yych <= 'I') goto yy1231; + if (yych <= 'T') goto yy141; + goto yy1232; } } } else { if (yych <= 'e') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1258; - if (yych <= 'd') goto yy145; - goto yy1257; + if (yych <= 'a') goto yy1259; + if (yych <= 'd') goto yy146; + goto yy1258; } } else { if (yych <= 't') { - if (yych == 'i') goto yy1259; - goto yy145; + if (yych == 'i') goto yy1260; + goto yy146; } else { - if (yych <= 'u') goto yy1260; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'u') goto yy1261; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy20: - YYDEBUG(20, *YYCURSOR); +yy21: + YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; - } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy1229; + 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 yy1228; - goto yy140; + if (yych <= 'E') goto yy1229; + goto yy141; } else { - if (yych <= 'I') goto yy1230; - if (yych <= 'T') goto yy140; - goto yy1231; + if (yych <= 'I') goto yy1231; + if (yych <= 'T') goto yy141; + goto yy1232; } } } else { if (yych <= 'e') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1229; - if (yych <= 'd') goto yy140; - goto yy1228; + if (yych <= 'a') goto yy1230; + if (yych <= 'd') goto yy141; + goto yy1229; } } else { if (yych <= 't') { - if (yych == 'i') goto yy1230; - goto yy140; + if (yych == 'i') goto yy1231; + goto yy141; } else { - if (yych <= 'u') goto yy1231; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'u') goto yy1232; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy21: - YYDEBUG(21, *YYCURSOR); +yy22: + YYDEBUG(22, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == 'I') goto yy1198; - if (yych <= 'K') goto yy140; - goto yy1199; + if (yych == 'I') goto yy1199; + if (yych <= 'K') goto yy141; + goto yy1200; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy145; - goto yy1216; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + if (yych <= 'h') goto yy146; + goto yy1217; } else { - if (yych == 'l') goto yy1217; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych == 'l') goto yy1218; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy22: - YYDEBUG(22, *YYCURSOR); +yy23: + YYDEBUG(23, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == 'I') goto yy1198; - if (yych <= 'K') goto yy140; - goto yy1199; + if (yych == 'I') goto yy1199; + if (yych <= 'K') goto yy141; + goto yy1200; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy140; - goto yy1198; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + if (yych <= 'h') goto yy141; + goto yy1199; } else { - if (yych == 'l') goto yy1199; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych == 'l') goto yy1200; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy23: - YYDEBUG(23, *YYCURSOR); +yy24: + YYDEBUG(24, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy140; - goto yy1097; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy141; + goto yy1098; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { - if (yych <= 'r') goto yy1191; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'r') goto yy1192; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy24: - YYDEBUG(24, *YYCURSOR); +yy25: + YYDEBUG(25, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy140; - goto yy1097; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy141; + goto yy1098; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { - if (yych <= 'r') goto yy1097; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'r') goto yy1098; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy25: - YYDEBUG(25, *YYCURSOR); +yy26: + YYDEBUG(26, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy1051; + case '\t': goto yy1052; case ' ': case 'A': case 'D': @@ -1678,11 +1698,11 @@ yy25: case 'm': case 'o': case 'w': - case 'y': goto yy1053; - case '-': goto yy472; - case '.': goto yy1063; - case '/': goto yy471; - case '0': goto yy1096; + case 'y': goto yy1054; + case '-': goto yy473; + case '.': goto yy1064; + case '/': goto yy472; + case '0': goto yy1097; case '1': case '2': case '3': @@ -1691,21 +1711,21 @@ yy25: case '6': case '7': case '8': - case '9': goto yy1095; - case ':': goto yy1064; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy26: - YYDEBUG(26, *YYCURSOR); +yy27: + YYDEBUG(27, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1732,34 +1752,34 @@ yy26: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': case '1': - case '2': goto yy1095; + case '2': goto yy1096; case '3': case '4': case '5': case '6': case '7': case '8': - case '9': goto yy1062; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy27: - YYDEBUG(27, *YYCURSOR); +yy28: + YYDEBUG(28, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1786,34 +1806,34 @@ yy27: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': case '1': case '2': case '3': - case '4': goto yy1062; + case '4': goto yy1063; case '5': case '6': case '7': case '8': - case '9': goto yy1049; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy28: - YYDEBUG(28, *YYCURSOR); +yy29: + YYDEBUG(29, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1840,12 +1860,12 @@ yy28: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': - case '1': goto yy1049; + case '1': goto yy1050; case '2': case '3': case '4': @@ -1853,21 +1873,21 @@ yy28: case '6': case '7': case '8': - case '9': goto yy468; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy29: - YYDEBUG(29, *YYCURSOR); +yy30: + YYDEBUG(30, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1894,10 +1914,10 @@ yy29: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': case '1': case '2': @@ -1907,558 +1927,558 @@ yy29: case '6': case '7': case '8': - case '9': goto yy468; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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); +yy31: + YYDEBUG(31, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; + if (yybm[0+yych] & 4) { + goto yy58; } YYDEBUG(-1, yych); switch (yych) { case '+': - case '-': goto yy439; + case '-': goto yy440; case '0': - case '1': goto yy436; - case '2': goto yy437; + case '1': goto yy437; + case '2': goto yy438; case '3': case '4': case '5': case '6': case '7': case '8': - case '9': goto yy438; - default: goto yy12; + case '9': goto yy439; + default: goto yy13; } -yy31: - YYDEBUG(31, *YYCURSOR); +yy32: + YYDEBUG(32, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; + if (yych <= 0x08) goto yy4; goto yy196; } else { if (yych == ' ') goto yy196; - goto yy3; + goto yy4; } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; - goto yy3; + if (yych <= ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; goto yy196; } } } else { if (yych <= 'V') { if (yych <= 'H') { - if (yych <= '@') goto yy3; - goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { - if (yych <= 'I') goto yy435; - if (yych <= 'U') goto yy140; - goto yy434; + if (yych <= 'I') goto yy436; + if (yych <= 'U') goto yy141; + goto yy435; } } else { if (yych <= 'Z') { - if (yych == 'X') goto yy434; - goto yy140; + if (yych == 'X') goto yy435; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy32: - YYDEBUG(32, *YYCURSOR); +yy33: + YYDEBUG(33, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'Z') { - if (yych <= 'I') goto yy431; - goto yy140; + if (yych <= 'I') goto yy432; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy33: - YYDEBUG(33, *YYCURSOR); +yy34: + YYDEBUG(34, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'Z') { - if (yych <= 'I') goto yy429; - goto yy140; + if (yych <= 'I') goto yy430; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy34: - YYDEBUG(34, *YYCURSOR); +yy35: + YYDEBUG(35, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'A') goto yy412; - if (yych <= 'T') goto yy140; - goto yy411; + if (yych <= 'A') goto yy413; + if (yych <= 'T') goto yy141; + goto yy412; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy421; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy422; } else { - if (yych == 'u') goto yy420; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych == 'u') goto yy421; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy35: - YYDEBUG(35, *YYCURSOR); +yy36: + YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'A') goto yy412; - if (yych <= 'T') goto yy140; - goto yy411; + if (yych <= 'A') goto yy413; + if (yych <= 'T') goto yy141; + goto yy412; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy412; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy413; } else { - if (yych == 'u') goto yy411; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych == 'u') goto yy412; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy36: - YYDEBUG(36, *YYCURSOR); +yy37: + YYDEBUG(37, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'F') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'O') { - if (yych <= 'G') goto yy390; - goto yy140; + if (yych <= 'G') goto yy391; + goto yy141; } else { - if (yych <= 'P') goto yy389; - if (yych <= 'T') goto yy140; - goto yy388; + if (yych <= 'P') goto yy390; + if (yych <= 'T') goto yy141; + goto yy389; } } } else { if (yych <= 'o') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych == 'g') goto yy402; - goto yy145; + if (yych == 'g') goto yy403; + goto yy146; } } else { if (yych <= 't') { - if (yych <= 'p') goto yy401; - goto yy145; + if (yych <= 'p') goto yy402; + goto yy146; } else { - if (yych <= 'u') goto yy400; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'u') goto yy401; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy37: - YYDEBUG(37, *YYCURSOR); +yy38: + YYDEBUG(38, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'F') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'O') { - if (yych <= 'G') goto yy390; - goto yy140; + if (yych <= 'G') goto yy391; + goto yy141; } else { - if (yych <= 'P') goto yy389; - if (yych <= 'T') goto yy140; - goto yy388; + if (yych <= 'P') goto yy390; + if (yych <= 'T') goto yy141; + goto yy389; } } } else { if (yych <= 'o') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych == 'g') goto yy390; - goto yy140; + if (yych == 'g') goto yy391; + goto yy141; } } else { if (yych <= 't') { - if (yych <= 'p') goto yy389; - goto yy140; + if (yych <= 'p') goto yy390; + goto yy141; } else { - if (yych <= 'u') goto yy388; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'u') goto yy389; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy38: - YYDEBUG(38, *YYCURSOR); +yy39: + YYDEBUG(39, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy140; - goto yy378; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy141; + goto yy379; } } else { if (yych <= 'b') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { - if (yych <= 'c') goto yy383; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'c') goto yy384; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy39: - YYDEBUG(39, *YYCURSOR); +yy40: + YYDEBUG(40, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy140; - goto yy378; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy141; + goto yy379; } } else { if (yych <= 'b') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { - if (yych <= 'c') goto yy378; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'c') goto yy379; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy40: - YYDEBUG(40, *YYCURSOR); +yy41: + YYDEBUG(41, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy192; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { - if (yych <= 'e') goto yy371; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'e') goto yy370; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy41: - YYDEBUG(41, *YYCURSOR); +yy42: + YYDEBUG(42, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy192; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy192; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy42: - YYDEBUG(42, *YYCURSOR); +yy43: + YYDEBUG(43, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy165; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { if (yych <= 'e') goto yy179; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy43: - YYDEBUG(43, *YYCURSOR); +yy44: + YYDEBUG(44, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy165; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy165; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy44: - YYDEBUG(44, *YYCURSOR); +yy45: + YYDEBUG(45, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'Z') { if (yych <= 'M') goto yy157; - goto yy140; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy45: - YYDEBUG(45, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') goto yy12; - if (yych <= 'Z') goto yy156; - if (yych <= '`') goto yy12; - if (yych <= 'z') goto yy156; - goto yy12; yy46: YYDEBUG(46, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; - } + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } yy48: YYDEBUG(48, *YYCURSOR); - yyaccept = 2; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; + 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; } - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy54; yy49: YYDEBUG(49, *YYCURSOR); - { - goto std; + 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); - yych = *++YYCURSOR; - goto yy49; + { + goto std; + } yy51: YYDEBUG(51, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + goto yy50; +yy52: YYDEBUG(52, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(53, *YYCURSOR); { s->pos = cursor; s->line++; goto std; } -yy53: - YYDEBUG(53, *YYCURSOR); - yych = *++YYCURSOR; - goto yy12; yy54: YYDEBUG(54, *YYCURSOR); + yych = *++YYCURSOR; + goto yy13; +yy55: + YYDEBUG(55, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 11) YYFILL(11); yych = *YYCURSOR; - YYDEBUG(55, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy54; + YYDEBUG(56, *YYCURSOR); + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy59; - if (yych >= ' ') goto yy59; + if (yych == '\t') goto yy60; + if (yych >= ' ') goto yy60; } else { - if (yych == 'D') goto yy64; - if (yych >= 'F') goto yy65; + if (yych == 'D') goto yy65; + if (yych >= 'F') goto yy66; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy63; - if (yych >= 'M') goto yy62; + if (yych == 'H') goto yy64; + if (yych >= 'M') goto yy63; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy61; + if (yych >= 'S') goto yy62; } else { - if (yych <= 'T') goto yy68; - if (yych >= 'W') goto yy67; + if (yych <= 'T') goto yy69; + if (yych >= 'W') goto yy68; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy66; - if (yych >= 'd') goto yy64; + if (yych == 'Y') goto yy67; + if (yych >= 'd') goto yy65; } else { if (yych <= 'f') { - if (yych >= 'f') goto yy65; + if (yych >= 'f') goto yy66; } else { - if (yych == 'h') goto yy63; + if (yych == 'h') goto yy64; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy62; - if (yych <= 'r') goto yy56; - if (yych <= 's') goto yy61; - goto yy68; + 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 yy67; + if (yych >= 'w') goto yy68; } else { - if (yych == 'y') goto yy66; + if (yych == 'y') goto yy67; } } } } -yy56: - YYDEBUG(56, *YYCURSOR); +yy57: + YYDEBUG(57, *YYCURSOR); YYCURSOR = YYMARKER; - if (yyaccept <= 17) { + if (yyaccept <= 16) { if (yyaccept <= 8) { if (yyaccept <= 4) { if (yyaccept <= 2) { if (yyaccept <= 1) { if (yyaccept <= 0) { - goto yy3; + goto yy4; } else { - goto yy12; + goto yy13; } } else { - goto yy49; + goto yy50; } } else { if (yyaccept <= 3) { - goto yy72; + goto yy73; } else { goto yy167; } @@ -2474,104 +2494,100 @@ yy56: if (yyaccept <= 7) { goto yy223; } else { - goto yy296; + goto yy295; } } } } else { - if (yyaccept <= 13) { - if (yyaccept <= 11) { - if (yyaccept <= 10) { - if (yyaccept <= 9) { - goto yy392; - } else { - goto yy475; - } + if (yyaccept <= 12) { + if (yyaccept <= 10) { + if (yyaccept <= 9) { + goto yy393; } else { - goto yy490; + goto yy476; } } else { - if (yyaccept <= 12) { - goto yy611; + if (yyaccept <= 11) { + goto yy491; } else { - goto yy656; + goto yy612; } } } else { - if (yyaccept <= 15) { - if (yyaccept <= 14) { - goto yy666; + if (yyaccept <= 14) { + if (yyaccept <= 13) { + goto yy657; } else { - goto yy763; + goto yy667; } } else { - if (yyaccept <= 16) { - goto yy783; + if (yyaccept <= 15) { + goto yy764; } else { - goto yy814; + goto yy784; } } } } } else { - if (yyaccept <= 26) { - if (yyaccept <= 22) { - if (yyaccept <= 20) { - if (yyaccept <= 19) { - if (yyaccept <= 18) { - goto yy821; + if (yyaccept <= 25) { + if (yyaccept <= 21) { + if (yyaccept <= 19) { + if (yyaccept <= 18) { + if (yyaccept <= 17) { + goto yy815; } else { - goto yy848; + goto yy822; } } else { - goto yy793; + goto yy849; } } else { - if (yyaccept <= 21) { - goto yy454; + if (yyaccept <= 20) { + goto yy794; } else { - goto yy973; + goto yy455; } } } else { - if (yyaccept <= 24) { - if (yyaccept <= 23) { - goto yy842; + if (yyaccept <= 23) { + if (yyaccept <= 22) { + goto yy974; } else { - goto yy1067; + goto yy843; } } else { - if (yyaccept <= 25) { - goto yy1075; + if (yyaccept <= 24) { + goto yy1068; } else { - goto yy1117; + goto yy1076; } } } } else { - if (yyaccept <= 30) { - if (yyaccept <= 28) { - if (yyaccept <= 27) { - goto yy1141; + if (yyaccept <= 29) { + if (yyaccept <= 27) { + if (yyaccept <= 26) { + goto yy1118; } else { - goto yy1294; + goto yy1142; } } else { - if (yyaccept <= 29) { - goto yy1313; + if (yyaccept <= 28) { + goto yy1295; } else { goto yy1417; } } } else { - if (yyaccept <= 32) { - if (yyaccept <= 31) { + if (yyaccept <= 31) { + if (yyaccept <= 30) { goto yy1420; } else { goto yy1500; } } else { - if (yyaccept <= 33) { + if (yyaccept <= 32) { goto yy1508; } else { goto yy1531; @@ -2580,194 +2596,194 @@ yy56: } } } -yy57: - YYDEBUG(57, *YYCURSOR); +yy58: + YYDEBUG(58, *YYCURSOR); ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - YYDEBUG(58, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; - } - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy54; - goto yy56; -yy59: 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; -yy60: - YYDEBUG(60, *YYCURSOR); +yy61: + YYDEBUG(61, *YYCURSOR); if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy59; - if (yych <= 0x1F) goto yy56; - goto yy59; + if (yych == '\t') goto yy60; + if (yych <= 0x1F) goto yy57; + goto yy60; } else { - if (yych == 'D') goto yy64; - if (yych <= 'E') goto yy56; - goto yy65; + if (yych == 'D') goto yy65; + if (yych <= 'E') goto yy57; + goto yy66; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy63; - if (yych <= 'L') goto yy56; - goto yy62; + if (yych == 'H') goto yy64; + if (yych <= 'L') goto yy57; + goto yy63; } else { if (yych <= 'S') { - if (yych <= 'R') goto yy56; + if (yych <= 'R') goto yy57; } else { - if (yych <= 'T') goto yy68; - if (yych <= 'V') goto yy56; - goto yy67; + if (yych <= 'T') goto yy69; + if (yych <= 'V') goto yy57; + goto yy68; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy66; - if (yych <= 'c') goto yy56; - goto yy64; + if (yych == 'Y') goto yy67; + if (yych <= 'c') goto yy57; + goto yy65; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy56; - goto yy65; + if (yych <= 'e') goto yy57; + goto yy66; } else { - if (yych == 'h') goto yy63; - goto yy56; + if (yych == 'h') goto yy64; + goto yy57; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy62; - if (yych <= 'r') goto yy56; - if (yych >= 't') goto yy68; + if (yych <= 'm') goto yy63; + if (yych <= 'r') goto yy57; + if (yych >= 't') goto yy69; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy56; - goto yy67; + if (yych <= 'v') goto yy57; + goto yy68; } else { - if (yych == 'y') goto yy66; - goto yy56; + if (yych == 'y') goto yy67; + goto yy57; } } } } -yy61: - YYDEBUG(61, *YYCURSOR); +yy62: + YYDEBUG(62, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy127; - if (yych <= 'T') goto yy56; - goto yy125; + if (yych <= 'E') goto yy128; + if (yych <= 'T') goto yy57; + goto yy126; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy126; - goto yy56; + if (yych == 'a') goto yy127; + goto yy57; } else { - if (yych <= 'e') goto yy127; - if (yych == 'u') goto yy125; - goto yy56; + if (yych <= 'e') goto yy128; + if (yych == 'u') goto yy126; + goto yy57; } } -yy62: - YYDEBUG(62, *YYCURSOR); +yy63: + YYDEBUG(63, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { - if (yych == 'I') goto yy117; - if (yych <= 'N') goto yy56; - goto yy116; + if (yych == 'I') goto yy118; + if (yych <= 'N') goto yy57; + goto yy117; } else { if (yych <= 'i') { - if (yych <= 'h') goto yy56; - goto yy117; + if (yych <= 'h') goto yy57; + goto yy118; } else { - if (yych == 'o') goto yy116; - goto yy56; + if (yych == 'o') goto yy117; + goto yy57; } } -yy63: - YYDEBUG(63, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy114; - if (yych == 'o') goto yy114; - goto yy56; yy64: YYDEBUG(64, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy113; - if (yych == 'a') goto yy113; - goto yy56; + 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 yy98; - if (yych <= 'Q') goto yy56; - goto yy97; + if (yych == 'O') goto yy99; + if (yych <= 'Q') goto yy57; + goto yy98; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy56; - goto yy98; + if (yych <= 'n') goto yy57; + goto yy99; } else { - if (yych == 'r') goto yy97; - goto yy56; + if (yych == 'r') goto yy98; + goto yy57; } } -yy66: - YYDEBUG(66, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy94; - if (yych == 'e') goto yy94; - goto yy56; yy67: YYDEBUG(67, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy82; - if (yych == 'e') goto yy82; - goto yy56; + 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 yy69; - if (yych <= 'T') goto yy56; - goto yy70; + if (yych == 'H') goto yy70; + if (yych <= 'T') goto yy57; + goto yy71; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; + if (yych <= 'g') goto yy57; } else { - if (yych == 'u') goto yy70; - goto yy56; + if (yych == 'u') goto yy71; + goto yy57; } } -yy69: - YYDEBUG(69, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy77; - if (yych == 'u') goto yy77; - goto yy56; yy70: YYDEBUG(70, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy71; - if (yych != 'e') goto yy56; + if (yych == 'U') goto yy78; + if (yych == 'u') goto yy78; + goto yy57; yy71: YYDEBUG(71, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy73; - if (yych == 's') goto yy73; + 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); { timelib_ull i; DEBUG_OUTPUT("relative"); @@ -2782,528 +2798,525 @@ yy72: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -yy73: - YYDEBUG(73, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy74; - if (yych != 'd') goto yy56; yy74: YYDEBUG(74, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy75; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy75; + if (yych != 'd') goto yy57; yy75: YYDEBUG(75, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy76; + if (yych != 'a') goto yy57; yy76: YYDEBUG(76, *YYCURSOR); yych = *++YYCURSOR; - goto yy72; + if (yych == 'Y') goto yy77; + if (yych != 'y') goto yy57; yy77: YYDEBUG(77, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy78; - if (yych != 'r') goto yy72; + yych = *++YYCURSOR; + goto yy73; yy78: YYDEBUG(78, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy79; - if (yych != 's') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'R') goto yy79; + if (yych != 'r') goto yy73; yy79: YYDEBUG(79, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy80; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy80; + if (yych != 's') goto yy57; yy80: YYDEBUG(80, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy81; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy81; + if (yych != 'd') goto yy57; yy81: YYDEBUG(81, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + 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 yy56; - if (yych <= 'D') goto yy84; + if (yych <= 'C') goto yy57; + if (yych <= 'D') goto yy85; } else { - if (yych <= 'c') goto yy56; - if (yych <= 'd') goto yy84; - if (yych >= 'f') goto yy56; + if (yych <= 'c') goto yy57; + if (yych <= 'd') goto yy85; + if (yych >= 'f') goto yy57; } - YYDEBUG(83, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy90; - if (yych == 'k') goto yy90; - goto yy56; -yy84: YYDEBUG(84, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'N') goto yy85; - if (yych != 'n') goto yy72; + yych = *++YYCURSOR; + if (yych == 'K') goto yy91; + if (yych == 'k') goto yy91; + goto yy57; yy85: YYDEBUG(85, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy86; - if (yych != 'e') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'N') goto yy86; + if (yych != 'n') goto yy73; yy86: YYDEBUG(86, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy87; - if (yych != 's') goto yy56; + if (yych == 'E') goto yy87; + if (yych != 'e') goto yy57; yy87: YYDEBUG(87, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy88; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy88; + if (yych != 's') goto yy57; yy88: YYDEBUG(88, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy89; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy89; + if (yych != 'd') goto yy57; yy89: YYDEBUG(89, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + 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 yy91; - if (yych <= 'R') goto yy72; - goto yy76; + if (yych == 'D') goto yy92; + if (yych <= 'R') goto yy73; + goto yy77; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy72; + if (yych <= 'c') goto yy73; } else { - if (yych == 's') goto yy76; - goto yy72; + if (yych == 's') goto yy77; + goto yy73; } } -yy91: - YYDEBUG(91, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy92; - if (yych != 'a') goto yy56; yy92: YYDEBUG(92, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy93; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy93; + if (yych != 'a') goto yy57; yy93: YYDEBUG(93, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy76; - if (yych == 's') goto yy76; - goto yy72; + if (yych == 'Y') goto yy94; + if (yych != 'y') goto yy57; yy94: YYDEBUG(94, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy95; - if (yych != 'a') goto yy56; + if (yych == 'S') goto yy77; + if (yych == 's') goto yy77; + goto yy73; yy95: YYDEBUG(95, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy96; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy96; + if (yych != 'a') goto yy57; yy96: YYDEBUG(96, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy76; - if (yych == 's') goto yy76; - goto yy72; + if (yych == 'R') goto yy97; + if (yych != 'r') goto yy57; yy97: YYDEBUG(97, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy110; - if (yych == 'i') goto yy110; - goto yy56; + if (yych == 'S') goto yy77; + if (yych == 's') goto yy77; + goto yy73; yy98: YYDEBUG(98, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy99; - if (yych != 'r') goto yy56; + if (yych == 'I') goto yy111; + if (yych == 'i') goto yy111; + goto yy57; yy99: YYDEBUG(99, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy100; - if (yych != 't') goto yy56; + 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 yy102; - if (yych <= 'M') goto yy56; + if (yych == 'H') goto yy103; + if (yych <= 'M') goto yy57; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; - goto yy102; + if (yych <= 'g') goto yy57; + goto yy103; } else { - if (yych != 'n') goto yy56; + if (yych != 'n') goto yy57; } } - YYDEBUG(101, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy107; - if (yych == 'i') goto yy107; - goto yy56; -yy102: YYDEBUG(102, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy103; - if (yych != 'n') goto yy56; + if (yych == 'I') goto yy108; + if (yych == 'i') goto yy108; + goto yy57; yy103: YYDEBUG(103, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy104; - if (yych != 'i') goto yy56; + if (yych == 'N') goto yy104; + if (yych != 'n') goto yy57; yy104: YYDEBUG(104, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy105; - if (yych != 'g') goto yy56; + if (yych == 'I') goto yy105; + if (yych != 'i') goto yy57; yy105: YYDEBUG(105, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy106; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy106; + if (yych != 'g') goto yy57; yy106: YYDEBUG(106, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy96; - if (yych == 't') goto yy96; - goto yy56; + if (yych == 'H') goto yy107; + if (yych != 'h') goto yy57; yy107: YYDEBUG(107, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy108; - if (yych != 'g') goto yy56; + if (yych == 'T') goto yy97; + if (yych == 't') goto yy97; + goto yy57; yy108: YYDEBUG(108, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy109; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy109; + if (yych != 'g') goto yy57; yy109: YYDEBUG(109, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy96; - if (yych == 't') goto yy96; - goto yy56; + if (yych == 'H') goto yy110; + if (yych != 'h') goto yy57; yy110: YYDEBUG(110, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy111; - if (yych != 'd') goto yy72; + yych = *++YYCURSOR; + if (yych == 'T') goto yy97; + if (yych == 't') goto yy97; + goto yy57; yy111: YYDEBUG(111, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy112; - if (yych != 'a') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy112; + if (yych != 'd') goto yy73; yy112: YYDEBUG(112, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'A') goto yy113; + if (yych != 'a') goto yy57; yy113: YYDEBUG(113, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy96; - if (yych == 'y') goto yy96; - goto yy56; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy114: YYDEBUG(114, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'U') goto yy115; - if (yych != 'u') goto yy56; + if (yych == 'Y') goto yy97; + if (yych == 'y') goto yy97; + goto yy57; yy115: YYDEBUG(115, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy96; - if (yych == 'r') goto yy96; - goto yy56; + if (yych == 'U') goto yy116; + if (yych != 'u') goto yy57; yy116: YYDEBUG(116, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy121; - if (yych == 'n') goto yy121; - goto yy56; + if (yych == 'R') goto yy97; + if (yych == 'r') goto yy97; + goto yy57; yy117: YYDEBUG(117, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy118; - if (yych != 'n') goto yy56; + 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 yy76; - if (yych <= 'T') goto yy72; + if (yych == 'S') goto yy77; + if (yych <= 'T') goto yy73; } else { if (yych <= 's') { - if (yych <= 'r') goto yy72; - goto yy76; + if (yych <= 'r') goto yy73; + goto yy77; } else { - if (yych != 'u') goto yy72; + if (yych != 'u') goto yy73; } } - YYDEBUG(119, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy120; - if (yych != 't') goto yy56; -yy120: YYDEBUG(120, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy96; - if (yych == 'e') goto yy96; - goto yy56; + 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 yy122; - if (yych <= 'S') goto yy72; - goto yy123; + if (yych == 'D') goto yy123; + if (yych <= 'S') goto yy73; + goto yy124; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy72; + if (yych <= 'c') goto yy73; } else { - if (yych == 't') goto yy123; - goto yy72; + if (yych == 't') goto yy124; + goto yy73; } } -yy122: - YYDEBUG(122, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy124; - if (yych == 'a') goto yy124; - goto yy56; yy123: YYDEBUG(123, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy96; - if (yych == 'h') goto yy96; - goto yy56; + if (yych == 'A') goto yy125; + if (yych == 'a') goto yy125; + goto yy57; yy124: YYDEBUG(124, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'H') goto yy97; + if (yych == 'h') goto yy97; + goto yy57; yy125: YYDEBUG(125, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy136; - if (yych == 'n') goto yy136; - goto yy56; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy126: YYDEBUG(126, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy131; - if (yych == 't') goto yy131; - goto yy56; + if (yych == 'N') goto yy137; + if (yych == 'n') goto yy137; + goto yy57; yy127: YYDEBUG(127, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy128; - if (yych != 'c') goto yy56; + 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 yy129; - if (yych <= 'R') goto yy72; - goto yy76; + if (yych == 'O') goto yy130; + if (yych <= 'R') goto yy73; + goto yy77; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy72; + if (yych <= 'n') goto yy73; } else { - if (yych == 's') goto yy76; - goto yy72; + if (yych == 's') goto yy77; + goto yy73; } } -yy129: - YYDEBUG(129, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy130; - if (yych != 'n') goto yy56; yy130: YYDEBUG(130, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy96; - if (yych == 'd') goto yy96; - goto yy56; + if (yych == 'N') goto yy131; + if (yych != 'n') goto yy57; yy131: YYDEBUG(131, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy132; - if (yych != 'u') goto yy72; + yych = *++YYCURSOR; + if (yych == 'D') goto yy97; + if (yych == 'd') goto yy97; + goto yy57; yy132: YYDEBUG(132, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy133; - if (yych != 'r') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy133; + if (yych != 'u') goto yy73; yy133: YYDEBUG(133, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy134; - if (yych != 'd') goto yy56; + if (yych == 'R') goto yy134; + if (yych != 'r') goto yy57; yy134: YYDEBUG(134, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy135; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy135; + if (yych != 'd') goto yy57; yy135: YYDEBUG(135, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'A') goto yy136; + if (yych != 'a') goto yy57; yy136: YYDEBUG(136, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy137; - if (yych != 'd') goto yy72; + yych = *++YYCURSOR; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy137: YYDEBUG(137, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy138; - if (yych != 'a') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy138; + if (yych != 'd') goto yy73; yy138: YYDEBUG(138, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'A') goto yy139; + if (yych != 'a') goto yy57; yy139: YYDEBUG(139, *YYCURSOR); yych = *++YYCURSOR; - goto yy3; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy140: YYDEBUG(140, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; - } + goto yy4; yy141: YYDEBUG(141, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } yy142: YYDEBUG(142, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } yy143: YYDEBUG(143, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } yy144: YYDEBUG(144, *YYCURSOR); yych = *++YYCURSOR; - if (yych == ')') goto yy139; - goto yy3; + 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 yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy141; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } } -yy146: - YYDEBUG(146, *YYCURSOR); +yy147: + YYDEBUG(147, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych != '/') goto yy3; + if (yych == '.') goto yy4; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy3; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy143; + goto yy4; } else { - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; if (yych <= 'z') goto yy151; - goto yy3; + goto yy4; } } -yy147: - YYDEBUG(147, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '@') goto yy56; - if (yych >= '[') goto yy56; +yy148: YYDEBUG(148, *YYCURSOR); ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if (yybm[0+yych] & 16) { + if (yybm[0+yych] & 8) { goto yy149; } - goto yy56; + goto yy57; yy149: YYDEBUG(149, *YYCURSOR); yyaccept = 0; @@ -3311,71 +3324,81 @@ yy149: if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; YYDEBUG(150, *YYCURSOR); - if (yybm[0+yych] & 16) { + if (yybm[0+yych] & 8) { goto yy149; } - if (yych == '/') goto yy147; - if (yych == '_') goto yy147; - goto yy3; + 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 yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + 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 yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy145; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } } yy153: YYDEBUG(153, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + 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 yy3; - goto yy147; + if (yych <= '/') { + if (yych <= '.') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych == '_') goto yy148; + goto yy4; } } yy154: @@ -3385,41 +3408,43 @@ yy154: yych = *YYCURSOR; yy155: YYDEBUG(155, *YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; - goto yy56; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; + goto yy57; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy56; - if (yych <= 'z') goto yy154; - goto yy56; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; + goto yy57; } yy156: YYDEBUG(156, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy140; - goto yy3; + 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 yy139; - if (yych <= '@') goto yy3; - goto yy141; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych >= 'U') goto yy141; + if (yych >= 'U') goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } YYDEBUG(158, *YYCURSOR); @@ -3427,89 +3452,89 @@ yy157: yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych != '+') goto yy3; + if (yych != '+') goto yy4; } } else { if (yych <= 'Z') { if (yych <= '-') goto yy159; - if (yych <= '@') goto yy3; - goto yy142; + if (yych <= '@') goto yy4; + goto yy143; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy143; + goto yy4; } } yy159: YYDEBUG(159, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '1') goto yy160; if (yych <= '2') goto yy161; if (yych <= '9') goto yy162; - goto yy56; + goto yy57; yy160: YYDEBUG(160, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy162; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; yy161: YYDEBUG(161, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '5') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych >= '5') goto yy164; } else { - if (yych <= '9') goto yy139; + if (yych <= '9') goto yy140; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; } yy162: YYDEBUG(162, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '5') goto yy164; - if (yych <= '9') goto yy139; - if (yych >= ';') goto yy3; + if (yych <= '9') goto yy140; + if (yych >= ';') goto yy4; yy163: YYDEBUG(163, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '5') goto yy164; - if (yych <= '9') goto yy139; - goto yy3; + if (yych <= '9') goto yy140; + goto yy4; yy164: YYDEBUG(164, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy139; - goto yy3; + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'C') goto yy141; + if (yych <= 'C') goto yy142; if (yych >= 'E') goto yy168; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy166: @@ -3517,19 +3542,19 @@ yy166: ++YYCURSOR; if ((yych = *YYCURSOR) <= 'N') { if (yych <= ')') { - if (yych >= ')') goto yy139; + if (yych >= ')') goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'M') goto yy142; + if (yych <= 'M') goto yy143; goto yy174; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych >= 'a') goto yy142; + if (yych <= 'Z') goto yy143; + if (yych >= 'a') goto yy143; } else { if (yych <= 'n') goto yy174; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; } } yy167: @@ -3555,21 +3580,21 @@ yy168: yych = *++YYCURSOR; if (yych <= 'K') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'J') goto yy143; } } else { if (yych <= 'j') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'k') goto yy169; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy169: @@ -3577,48 +3602,48 @@ yy169: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy144; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'd') goto yy170; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy170: YYDEBUG(170, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') goto yy145; + goto yy4; } else { if (yych <= 'a') goto yy171; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy171: YYDEBUG(171, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Y') goto yy172; - if (yych != 'y') goto yy3; + if (yych != 'y') goto yy4; } yy172: YYDEBUG(172, *YYCURSOR); @@ -3634,21 +3659,21 @@ yy174: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy144; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'e') goto yy175; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy175: @@ -3656,21 +3681,21 @@ yy175: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy145; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 's') goto yy176; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy176: @@ -3678,194 +3703,222 @@ yy176: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'C') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'D') goto yy177; - if (yych != 'd') goto yy3; + if (yych != 'd') goto yy4; } yy177: YYDEBUG(177, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy178; - if (yych != 'a') goto yy56; + if (yych != 'a') goto yy57; yy178: YYDEBUG(178, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy56; + goto yy57; yy179: YYDEBUG(179, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy141; - if (yych <= 'D') goto yy166; - goto yy168; + 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') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + 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 yy146; + if (yych <= 'c') goto yy147; } else { if (yych <= 'e') goto yy181; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } YYDEBUG(180, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'M') goto yy142; - goto yy174; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'N') goto yy174; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'n') goto yy187; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'K') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'J') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; - goto yy169; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'K') goto yy169; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'k') goto yy182; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy170; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy170; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy183; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy171; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy171; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy184; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy184: YYDEBUG(184, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'X') goto yy3; - goto yy172; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'Y') goto yy172; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'y') goto yy185; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy185: YYDEBUG(185, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych <= '/') { - if (yych <= '.') goto yy167; - goto yy147; - } else { - if (yych == 'S') goto yy173; + 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 <= 'r') { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy167; - goto yy154; + if (yych <= '`') { + if (yych == '_') goto yy148; + goto yy167; } else { - if (yych <= 's') goto yy186; + if (yych == 's') goto yy186; if (yych <= 'z') goto yy154; goto yy167; } @@ -3874,86 +3927,101 @@ yy186: YYDEBUG(186, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy167; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy167; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy167; } yy187: YYDEBUG(187, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; - goto yy175; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy175; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy188; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy144; - goto yy176; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy176; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy189; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'C') goto yy3; - goto yy177; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'D') goto yy177; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'd') goto yy190; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy190: @@ -3971,21 +4039,21 @@ yy192: yych = *++YYCURSOR; if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy142; } } else { if (yych <= 'b') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'c') goto yy193; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy193: @@ -4001,7 +4069,7 @@ yy193: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; } else { if (yych <= '-') goto yy197; if (yych <= '.') goto yy196; @@ -4013,14 +4081,14 @@ yy193: if (yych <= '9') goto yy196; } else { if (yych == 'E') goto yy202; - goto yy142; + goto yy143; } } else { if (yych <= 'd') { - if (yych >= 'a') goto yy142; + if (yych >= 'a') goto yy143; } else { if (yych <= 'e') goto yy202; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; } } } @@ -4044,18 +4112,18 @@ yy196: if (yybm[0+yych] & 32) { goto yy195; } - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '2') goto yy198; if (yych <= '3') goto yy200; if (yych <= '9') goto yy201; - goto yy56; + goto yy57; yy197: YYDEBUG(197, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy196; - if (yych <= '0') goto yy358; - if (yych <= '2') goto yy359; - if (yych <= '3') goto yy360; + if (yych <= '0') goto yy357; + if (yych <= '2') goto yy358; + if (yych <= '3') goto yy359; goto yy196; yy198: YYDEBUG(198, *YYCURSOR); @@ -4064,11 +4132,11 @@ yy198: if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy299; - goto yy300; + if (yych <= '0') goto yy298; + goto yy299; } else { - if (yych <= '2') goto yy356; - if (yych <= '9') goto yy357; + if (yych <= '2') goto yy355; + if (yych <= '9') goto yy356; goto yy216; } } else { @@ -4102,8 +4170,8 @@ yy200: if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy299; - goto yy300; + if (yych <= '0') goto yy298; + goto yy299; } else { if (yych <= '2') goto yy209; if (yych <= '9') goto yy210; @@ -4150,21 +4218,21 @@ yy202: yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'L') goto yy144; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'm') goto yy203; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy203: @@ -4172,21 +4240,21 @@ yy203: yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy145; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'b') goto yy204; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy204: @@ -4194,17 +4262,17 @@ yy204: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'E') goto yy205; - if (yych != 'e') goto yy3; + if (yych != 'e') goto yy4; } yy205: YYDEBUG(205, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'R') goto yy206; - if (yych != 'r') goto yy56; + if (yych != 'r') goto yy57; yy206: YYDEBUG(206, *YYCURSOR); yyaccept = 5; @@ -4228,47 +4296,47 @@ yy207: yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { - if (yych <= '0') goto yy297; - if (yych <= '9') goto yy298; + if (yych <= '0') goto yy296; + if (yych <= '9') goto yy297; if (yych <= ':') goto yy221; - goto yy56; + goto yy57; } yy208: YYDEBUG(208, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '2') goto yy298; - if (yych <= '9') goto yy297; - if (yych <= ':') goto yy265; - goto yy56; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '4') goto yy297; - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy265; - goto yy56; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy265; - goto yy56; + if (yych <= '9') goto yy293; + if (yych <= ':') goto yy264; + goto yy57; } yy211: YYDEBUG(211, *YYCURSOR); @@ -4303,54 +4371,54 @@ yy216: } if (yych <= '2') { if (yych <= '/') goto yy199; - if (yych <= '0') goto yy260; - if (yych <= '1') goto yy261; - goto yy262; + if (yych <= '0') goto yy259; + if (yych <= '1') goto yy260; + goto yy261; } else { - if (yych <= '9') goto yy263; + if (yych <= '9') goto yy262; if (yych != 'T') goto yy199; } YYDEBUG(217, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '1') goto yy218; if (yych <= '2') goto yy219; if (yych <= '9') goto yy220; - goto yy56; + goto yy57; yy218: YYDEBUG(218, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { if (yych <= '9') goto yy220; if (yych <= ':') goto yy221; - goto yy56; + goto yy57; } yy219: YYDEBUG(219, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { if (yych <= '4') goto yy220; if (yych == ':') goto yy221; - goto yy56; + goto yy57; } yy220: YYDEBUG(220, *YYCURSOR); yych = *++YYCURSOR; if (yych == '.') goto yy221; - if (yych != ':') goto yy56; + if (yych != ':') goto yy57; yy221: YYDEBUG(221, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '5') goto yy222; if (yych <= '9') goto yy224; - goto yy56; + goto yy57; yy222: YYDEBUG(222, *YYCURSOR); yyaccept = 7; @@ -4400,11 +4468,11 @@ yy224: yy225: YYDEBUG(225, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '5') goto yy226; if (yych <= '6') goto yy227; if (yych <= '9') goto yy228; - goto yy56; + goto yy57; yy226: YYDEBUG(226, *YYCURSOR); yych = *++YYCURSOR; @@ -4455,25 +4523,25 @@ yy231: if (yych <= '+') { if (yych <= ' ') { if (yych == '\t') goto yy230; - if (yych <= 0x1F) goto yy56; + if (yych <= 0x1F) goto yy57; goto yy230; } else { if (yych == '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } } else { if (yych <= 'F') { if (yych == '-') goto yy233; - if (yych <= '@') goto yy56; + if (yych <= '@') goto yy57; goto yy235; } else { if (yych <= 'Z') { if (yych >= 'H') goto yy235; } else { - if (yych <= '`') goto yy56; + if (yych <= '`') goto yy57; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } @@ -4486,7 +4554,7 @@ yy232: goto yy237; } else { if (yych <= 'Z') { - if (yych <= 'M') goto yy258; + if (yych <= 'M') goto yy257; goto yy237; } else { if (yych <= '`') goto yy223; @@ -4497,19 +4565,19 @@ yy232: yy233: YYDEBUG(233, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy253; - if (yych <= '2') goto yy254; - if (yych <= '9') goto yy255; - goto yy56; + 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 yy56; + if (yych <= '@') goto yy57; if (yych <= 'Z') goto yy236; - if (yych <= '`') goto yy56; + if (yych <= '`') goto yy57; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; yy235: YYDEBUG(235, *YYCURSOR); yych = *++YYCURSOR; @@ -4586,20 +4654,21 @@ yy242: YYDEBUG(242, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; - } else { - if (yych == '/') goto yy244; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy228; goto yy223; + } else { + if (yych == '.') goto yy223; + goto yy244; } } else { - if (yych <= '_') { + if (yych <= '^') { + if (yych <= '@') goto yy223; if (yych <= 'Z') goto yy238; - if (yych <= '^') goto yy223; - goto yy244; + goto yy223; } else { + if (yych <= '_') goto yy244; if (yych <= '`') goto yy223; if (yych >= '{') goto yy223; } @@ -4608,20 +4677,22 @@ yy243: YYDEBUG(243, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy228; + goto yy223; } else { - if (yych != '/') goto yy223; + if (yych == '.') goto yy223; } } else { - if (yych <= '_') { + if (yych <= '^') { + if (yych <= '@') goto yy223; if (yych <= 'Z') goto yy239; - if (yych <= '^') goto yy223; + goto yy223; } else { + if (yych <= '_') goto yy244; if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy248; + if (yych <= 'z') goto yy247; goto yy223; } } @@ -4630,66 +4701,95 @@ yy244: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if (yych <= '@') goto yy56; - if (yych >= '[') goto yy56; + if (yych <= '@') goto yy57; + if (yych <= 'Z') goto yy245; + if (yych <= '`') goto yy57; + if (yych >= '{') goto yy57; +yy245: YYDEBUG(245, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '`') goto yy56; - if (yych >= '{') goto yy56; -yy246: - YYDEBUG(246, *YYCURSOR); yyaccept = 7; YYMARKER = ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - YYDEBUG(247, *YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy244; - goto yy223; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy246; - goto yy223; - } -yy248: - YYDEBUG(248, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(246, *YYCURSOR); if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; + if (yych <= '-') { + if (yych <= ',') goto yy223; + goto yy244; } else { if (yych == '/') goto yy244; goto yy223; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy240; + 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 <= ')') { if (yych <= '(') goto yy223; goto yy228; } else { - if (yych == '/') goto yy244; + if (yych == '-') goto yy244; goto yy223; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy241; + if (yych <= '/') goto yy244; if (yych <= '^') goto yy223; goto yy244; } else { @@ -4697,78 +4797,67 @@ yy248: if (yych >= '{') goto yy223; } } +yy250: YYDEBUG(250, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + YYDEBUG(251, *YYCURSOR); if (yych <= '/') { - if (yych == ')') goto yy228; - if (yych <= '.') goto yy223; + if (yych == '-') goto yy244; + if (yych <= '.') goto yy57; goto yy244; } else { if (yych <= '_') { - if (yych <= '^') goto yy223; + if (yych <= '^') goto yy57; goto yy244; } else { - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; + if (yych <= '`') goto yy57; + if (yych <= 'z') goto yy250; + goto yy57; } } -yy251: - YYDEBUG(251, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy252: YYDEBUG(252, *YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy244; - goto yy56; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy56; - if (yych <= 'z') goto yy251; - goto yy56; - } -yy253: - YYDEBUG(253, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy223; - if (yych <= '9') goto yy255; - if (yych <= ':') goto yy256; + if (yych <= '9') goto yy254; + if (yych <= ':') goto yy255; goto yy223; -yy254: - YYDEBUG(254, *YYCURSOR); +yy253: + YYDEBUG(253, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '5') { if (yych <= '/') goto yy223; - if (yych >= '5') goto yy257; + if (yych >= '5') goto yy256; } else { if (yych <= '9') goto yy228; - if (yych <= ':') goto yy256; + 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 yy257; + if (yych <= '5') goto yy256; if (yych <= '9') goto yy228; - if (yych >= ';') goto yy223; + goto yy223; yy256: YYDEBUG(256, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy223; - if (yych <= '5') goto yy257; if (yych <= '9') goto yy228; goto yy223; yy257: YYDEBUG(257, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy228; - goto yy223; -yy258: - YYDEBUG(258, *YYCURSOR); - yych = *++YYCURSOR; if (yych <= 'S') { if (yych == ')') goto yy228; if (yych <= '@') goto yy223; @@ -4782,7 +4871,7 @@ yy258: goto yy223; } } - YYDEBUG(259, *YYCURSOR); + YYDEBUG(258, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -4804,161 +4893,161 @@ yy258: goto yy223; } } -yy260: - YYDEBUG(260, *YYCURSOR); +yy259: + YYDEBUG(259, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy221; goto yy199; } else { - if (yych <= '0') goto yy292; - if (yych <= '9') goto yy293; + if (yych <= '0') goto yy291; + if (yych <= '9') goto yy292; if (yych <= ':') goto yy221; goto yy199; } -yy261: - YYDEBUG(261, *YYCURSOR); +yy260: + YYDEBUG(260, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '2') goto yy293; - if (yych <= '9') goto yy292; - if (yych <= ':') goto yy265; + if (yych <= '2') goto yy292; + if (yych <= '9') goto yy291; + if (yych <= ':') goto yy264; goto yy199; } -yy262: - YYDEBUG(262, *YYCURSOR); +yy261: + YYDEBUG(261, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '4') goto yy292; - if (yych <= '9') goto yy264; - if (yych <= ':') goto yy265; + if (yych <= '4') goto yy291; + if (yych <= '9') goto yy263; + if (yych <= ':') goto yy264; goto yy199; } -yy263: - YYDEBUG(263, *YYCURSOR); +yy262: + YYDEBUG(262, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '9') goto yy264; - if (yych <= ':') goto yy265; + if (yych <= '9') goto yy263; + if (yych <= ':') goto yy264; goto yy199; } -yy264: - YYDEBUG(264, *YYCURSOR); +yy263: + YYDEBUG(263, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy266; - if (yych <= '9') goto yy267; - goto yy56; -yy266: - YYDEBUG(266, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '9') goto yy283; - if (yych <= ':') goto yy268; + if (yych <= '9') goto yy282; + if (yych <= ':') goto yy267; goto yy223; } -yy267: - YYDEBUG(267, *YYCURSOR); +yy266: + YYDEBUG(266, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy268; + 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 yy56; - if (yych <= '5') goto yy269; - if (yych <= '6') goto yy270; - if (yych <= '9') goto yy228; - goto yy56; + if (yych <= '/') goto yy223; + if (yych <= '9') goto yy270; + goto yy223; yy269: YYDEBUG(269, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy271; - goto yy223; + if (yych != '0') goto yy223; yy270: YYDEBUG(270, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy223; -yy271: - YYDEBUG(271, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '*') { if (yych <= 0x1F) { - if (yych == '\t') goto yy273; + if (yych == '\t') goto yy272; goto yy223; } else { - if (yych <= ' ') goto yy273; - if (yych == '(') goto yy273; + if (yych <= ' ') goto yy272; + if (yych == '(') goto yy272; goto yy223; } } else { if (yych <= '@') { if (yych == ',') goto yy223; - if (yych <= '-') goto yy273; + if (yych <= '-') goto yy272; goto yy223; } else { - if (yych <= 'Z') goto yy273; + if (yych <= 'Z') goto yy272; if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy273; + if (yych <= 'z') goto yy272; goto yy223; } } -yy272: - YYDEBUG(272, *YYCURSOR); +yy271: + YYDEBUG(271, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; -yy273: - YYDEBUG(273, *YYCURSOR); +yy272: + YYDEBUG(272, *YYCURSOR); if (yych <= '@') { if (yych <= '\'') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy272; + if (yych <= 0x08) goto yy57; + goto yy271; } else { - if (yych == ' ') goto yy272; - goto yy56; + if (yych == ' ') goto yy271; + goto yy57; } } else { if (yych <= '+') { if (yych <= '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } else { if (yych == '-') goto yy233; - goto yy56; + goto yy57; } } } else { if (yych <= 'Z') { if (yych <= 'G') { - if (yych <= 'A') goto yy274; + if (yych <= 'A') goto yy273; if (yych <= 'F') goto yy235; goto yy232; } else { @@ -4966,18 +5055,18 @@ yy273: } } else { if (yych <= 'o') { - if (yych <= '`') goto yy56; - if (yych <= 'a') goto yy275; + if (yych <= '`') goto yy57; + if (yych <= 'a') goto yy274; goto yy236; } else { - if (yych <= 'p') goto yy275; + if (yych <= 'p') goto yy274; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } -yy274: - YYDEBUG(274, *YYCURSOR); +yy273: + YYDEBUG(273, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -4985,23 +5074,23 @@ yy274: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy276; + if (yych <= '.') goto yy275; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy277; + if (yych <= 'M') goto yy276; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy282; + if (yych == 'm') goto yy281; if (yych <= 'z') goto yy242; goto yy223; } } -yy275: - YYDEBUG(275, *YYCURSOR); +yy274: + YYDEBUG(274, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5009,38 +5098,38 @@ yy275: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy276; + if (yych <= '.') goto yy275; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy277; + if (yych <= 'M') goto yy276; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy277; + 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); - yych = *++YYCURSOR; - if (yych == 'M') goto yy281; - if (yych == 'm') goto yy281; - goto yy56; -yy277: - YYDEBUG(277, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych <= '\t') { - if (yych <= 0x00) goto yy279; + if (yych <= 0x00) goto yy278; if (yych <= 0x08) goto yy223; - goto yy279; + goto yy278; } else { - if (yych == ' ') goto yy279; + if (yych == ' ') goto yy278; if (yych <= '(') goto yy223; goto yy228; } @@ -5054,19 +5143,19 @@ yy277: goto yy223; } } -yy278: - YYDEBUG(278, *YYCURSOR); +yy277: + YYDEBUG(277, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy279; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy278; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy279: - YYDEBUG(279, *YYCURSOR); +yy278: + YYDEBUG(278, *YYCURSOR); ++YYCURSOR; - YYDEBUG(280, *YYCURSOR); + YYDEBUG(279, *YYCURSOR); { DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); TIMELIB_INIT; @@ -5089,35 +5178,40 @@ yy279: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -yy281: - YYDEBUG(281, *YYCURSOR); +yy280: + YYDEBUG(280, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; - goto yy56; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; + goto yy57; } else { - if (yych <= ' ') goto yy279; - if (yych == '.') goto yy278; - goto yy56; + if (yych <= ' ') goto yy278; + if (yych == '.') goto yy277; + goto yy57; } -yy282: - YYDEBUG(282, *YYCURSOR); +yy281: + YYDEBUG(281, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '-') { if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; goto yy223; } else { - if (yych <= ' ') goto yy279; - if (yych == ')') goto yy228; - goto yy223; + 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 yy278; + if (yych <= '.') goto yy277; if (yych <= '/') goto yy244; if (yych <= '@') goto yy223; goto yy238; @@ -5132,135 +5226,135 @@ yy282: } } } -yy283: - YYDEBUG(283, *YYCURSOR); +yy282: + YYDEBUG(282, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy223; } else { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; if (yych <= '9') goto yy223; - goto yy268; + goto yy267; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy223; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy223; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy223; } } } -yy284: - YYDEBUG(284, *YYCURSOR); +yy283: + YYDEBUG(283, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(285, *YYCURSOR); + YYDEBUG(284, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy284; - goto yy56; + if (yych == '\t') goto yy283; + goto yy57; } else { - if (yych <= ' ') goto yy284; - if (yych <= '@') goto yy56; + if (yych <= ' ') goto yy283; + if (yych <= '@') goto yy57; } } else { if (yych <= '`') { - if (yych != 'P') goto yy56; + if (yych != 'P') goto yy57; } else { - if (yych <= 'a') goto yy286; - if (yych != 'p') goto yy56; + if (yych <= 'a') goto yy285; + if (yych != 'p') goto yy57; } } -yy286: - YYDEBUG(286, *YYCURSOR); +yy285: + YYDEBUG(285, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy288; - if (yych == 'm') goto yy288; - goto yy56; + 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 == 'M') goto yy288; - if (yych != 'm') goto yy56; -yy288: - YYDEBUG(288, *YYCURSOR); - yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; - goto yy56; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; + goto yy57; } else { - if (yych <= ' ') goto yy279; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy278; + if (yych != '.') goto yy57; } -yy289: - YYDEBUG(289, *YYCURSOR); +yy288: + YYDEBUG(288, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy279; - if (yych <= 0x08) goto yy56; - goto yy279; + if (yych <= 0x00) goto yy278; + if (yych <= 0x08) goto yy57; + goto yy278; } else { - if (yych == ' ') goto yy279; - goto yy56; + if (yych == ' ') goto yy278; + goto yy57; } -yy290: - YYDEBUG(290, *YYCURSOR); +yy289: + YYDEBUG(289, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy199; if (yych >= ':') goto yy199; - YYDEBUG(291, *YYCURSOR); + YYDEBUG(290, *YYCURSOR); yych = *++YYCURSOR; goto yy199; -yy292: - YYDEBUG(292, *YYCURSOR); +yy291: + YYDEBUG(291, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy221; goto yy199; } else { - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; if (yych <= ':') goto yy221; goto yy199; } -yy293: - YYDEBUG(293, *YYCURSOR); +yy292: + YYDEBUG(292, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '9') goto yy290; - if (yych <= ':') goto yy265; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + ++YYCURSOR; yy295: YYDEBUG(295, *YYCURSOR); - ++YYCURSOR; -yy296: - YYDEBUG(296, *YYCURSOR); { DEBUG_OUTPUT("datenoday"); TIMELIB_INIT; @@ -5272,41 +5366,41 @@ yy296: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -yy297: - YYDEBUG(297, *YYCURSOR); +yy296: + YYDEBUG(296, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { - if (yych <= '9') goto yy295; + if (yych <= '9') goto yy294; if (yych <= ':') goto yy221; - goto yy56; + goto yy57; } -yy298: - YYDEBUG(298, *YYCURSOR); +yy297: + YYDEBUG(297, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '9') goto yy295; - if (yych <= ':') goto yy265; - goto yy56; + if (yych <= '9') goto yy294; + if (yych <= ':') goto yy264; + goto yy57; } -yy299: - YYDEBUG(299, *YYCURSOR); +yy298: + YYDEBUG(298, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { - if (yych == '.') goto yy332; + if (yych == '.') goto yy331; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { @@ -5320,22 +5414,22 @@ yy299: goto yy216; } } -yy300: - YYDEBUG(300, *YYCURSOR); +yy299: + YYDEBUG(299, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych != '.') goto yy216; } else { - if (yych <= '0') goto yy302; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy301; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -5345,81 +5439,94 @@ yy300: goto yy216; } } -yy301: - YYDEBUG(301, *YYCURSOR); +yy300: + YYDEBUG(300, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy307; - goto yy308; + if (yych <= '0') goto yy306; + goto yy307; } else { - if (yych <= '2') goto yy309; - if (yych <= '5') goto yy310; - if (yych <= '9') goto yy311; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '0') goto yy305; - if (yych <= '9') goto yy306; - if (yych <= ':') goto yy265; - goto yy56; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '2') goto yy306; - if (yych <= '9') goto yy305; - if (yych <= ':') goto yy265; - goto yy56; + if (yych <= '4') goto yy304; + if (yych <= '9') goto yy294; + if (yych <= ':') goto yy264; + goto yy57; } yy304: YYDEBUG(304, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy265; - goto yy56; - } else { - if (yych <= '4') goto yy305; - if (yych <= '9') goto yy295; - if (yych <= ':') goto yy265; - goto yy56; - } -yy305: - YYDEBUG(305, *YYCURSOR); yyaccept = 8; yych = *(YYMARKER = ++YYCURSOR); if (yych == '.') goto yy221; if (yych == ':') goto yy221; - goto yy296; + 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 = 8; + yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy265; - if (yych == ':') goto yy265; - goto yy296; + 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 yy327; + if (yych == '.') goto yy311; goto yy199; } else { - if (yych <= '0') goto yy326; - if (yych <= '9') goto yy331; - if (yych <= ':') goto yy327; + if (yych <= '2') goto yy330; + if (yych <= '9') goto yy325; + if (yych <= ':') goto yy311; goto yy199; } yy308: @@ -5427,12 +5534,12 @@ yy308: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy312; + if (yych == '.') goto yy311; goto yy199; } else { - if (yych <= '2') goto yy331; - if (yych <= '9') goto yy326; - if (yych <= ':') goto yy312; + if (yych <= '4') goto yy325; + if (yych <= '9') goto yy324; + if (yych <= ':') goto yy311; goto yy199; } yy309: @@ -5440,12 +5547,11 @@ yy309: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy312; + if (yych == '.') goto yy311; goto yy199; } else { - if (yych <= '4') goto yy326; - if (yych <= '9') goto yy325; - if (yych <= ':') goto yy312; + if (yych <= '9') goto yy324; + if (yych <= ':') goto yy311; goto yy199; } yy310: @@ -5453,120 +5559,108 @@ yy310: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy312; - goto yy199; - } else { - if (yych <= '9') goto yy325; - if (yych <= ':') goto yy312; - goto yy199; - } -yy311: - YYDEBUG(311, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { if (yych != '.') goto yy199; } else { - if (yych <= '9') goto yy264; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy313; - if (yych <= '6') goto yy314; - if (yych <= '9') goto yy267; - goto yy56; -yy313: - YYDEBUG(313, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '9') goto yy315; - if (yych <= ':') goto yy268; + if (yych <= '9') goto yy314; + if (yych <= ':') goto yy267; goto yy223; } -yy314: - YYDEBUG(314, *YYCURSOR); +yy313: + YYDEBUG(313, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '0') goto yy271; - if (yych == ':') goto yy268; + if (yych <= '0') goto yy270; + if (yych == ':') goto yy267; goto yy223; } -yy315: - YYDEBUG(315, *YYCURSOR); +yy314: + YYDEBUG(314, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ' ') { - if (yych == '\t') goto yy317; + if (yych == '\t') goto yy316; if (yych <= 0x1F) goto yy223; - goto yy317; + goto yy316; } else { if (yych <= '(') { if (yych <= '\'') goto yy223; - goto yy317; + goto yy316; } else { - if (yych == '+') goto yy317; + if (yych == '+') goto yy316; goto yy223; } } } else { if (yych <= ':') { - if (yych <= '-') goto yy317; - if (yych <= '.') goto yy268; + if (yych <= '-') goto yy316; + if (yych <= '.') goto yy267; if (yych <= '9') goto yy223; - goto yy268; + goto yy267; } else { if (yych <= 'Z') { if (yych <= '@') goto yy223; - goto yy317; + goto yy316; } else { if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy317; + if (yych <= 'z') goto yy316; goto yy223; } } } -yy316: - YYDEBUG(316, *YYCURSOR); +yy315: + YYDEBUG(315, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; -yy317: - YYDEBUG(317, *YYCURSOR); +yy316: + YYDEBUG(316, *YYCURSOR); if (yych <= '@') { if (yych <= '\'') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy316; + if (yych <= 0x08) goto yy57; + goto yy315; } else { - if (yych == ' ') goto yy316; - goto yy56; + if (yych == ' ') goto yy315; + goto yy57; } } else { if (yych <= '+') { if (yych <= '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } else { if (yych == '-') goto yy233; - goto yy56; + goto yy57; } } } else { if (yych <= 'Z') { if (yych <= 'G') { - if (yych <= 'A') goto yy318; + if (yych <= 'A') goto yy317; if (yych <= 'F') goto yy235; goto yy232; } else { @@ -5574,18 +5668,18 @@ yy317: } } else { if (yych <= 'o') { - if (yych <= '`') goto yy56; - if (yych <= 'a') goto yy319; + if (yych <= '`') goto yy57; + if (yych <= 'a') goto yy318; goto yy236; } else { - if (yych <= 'p') goto yy319; + if (yych <= 'p') goto yy318; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } -yy318: - YYDEBUG(318, *YYCURSOR); +yy317: + YYDEBUG(317, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5593,23 +5687,23 @@ yy318: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy321; + if (yych <= '.') goto yy320; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy320; + if (yych <= 'M') goto yy319; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy324; + if (yych == 'm') goto yy323; if (yych <= 'z') goto yy242; goto yy223; } } -yy319: - YYDEBUG(319, *YYCURSOR); +yy318: + YYDEBUG(318, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5617,38 +5711,38 @@ yy319: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy321; + if (yych <= '.') goto yy320; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy320; + if (yych <= 'M') goto yy319; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy320; + if (yych == 'm') goto yy319; if (yych <= 'z') goto yy237; goto yy223; } } -yy320: - YYDEBUG(320, *YYCURSOR); +yy319: + YYDEBUG(319, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych <= '\t') { - if (yych <= 0x00) goto yy279; + if (yych <= 0x00) goto yy278; if (yych <= 0x08) goto yy223; - goto yy279; + goto yy278; } else { - if (yych == ' ') goto yy279; + if (yych == ' ') goto yy278; if (yych <= '(') goto yy223; goto yy228; } } else { if (yych <= '@') { - if (yych == '.') goto yy323; + if (yych == '.') goto yy322; goto yy223; } else { if (yych <= 'Z') goto yy238; @@ -5657,50 +5751,55 @@ yy320: 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 == 'M') goto yy322; - if (yych != 'm') goto yy56; -yy322: - YYDEBUG(322, *YYCURSOR); - yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; - goto yy56; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; + goto yy57; } else { - if (yych <= ' ') goto yy279; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy278; + if (yych != '.') goto yy57; } -yy323: - YYDEBUG(323, *YYCURSOR); +yy322: + YYDEBUG(322, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy279; - if (yych <= 0x08) goto yy56; - goto yy279; + if (yych <= 0x00) goto yy278; + if (yych <= 0x08) goto yy57; + goto yy278; } else { - if (yych == ' ') goto yy279; - goto yy56; + if (yych == ' ') goto yy278; + goto yy57; } -yy324: - YYDEBUG(324, *YYCURSOR); +yy323: + YYDEBUG(323, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '-') { if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; goto yy223; } else { - if (yych <= ' ') goto yy279; - if (yych == ')') goto yy228; - goto yy223; + 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 yy323; + if (yych <= '.') goto yy322; if (yych <= '/') goto yy244; if (yych <= '@') goto yy223; goto yy238; @@ -5715,210 +5814,223 @@ yy324: } } } -yy325: - YYDEBUG(325, *YYCURSOR); +yy324: + YYDEBUG(324, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy199; - goto yy284; + goto yy283; } else { if (yych <= '.') { if (yych <= '-') goto yy199; - goto yy268; + goto yy267; } else { if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; - goto yy268; + if (yych <= '9') goto yy289; + goto yy267; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy199; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy199; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy199; } } } -yy326: - YYDEBUG(326, *YYCURSOR); +yy325: + YYDEBUG(325, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy199; - goto yy284; + goto yy283; } else { if (yych <= '.') { if (yych <= '-') goto yy199; } else { if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy199; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy199; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy199; } } } -yy327: - YYDEBUG(327, *YYCURSOR); +yy326: + YYDEBUG(326, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy328; - if (yych <= '6') goto yy329; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy327; + if (yych <= '6') goto yy328; if (yych <= '9') goto yy224; - goto yy56; -yy328: - YYDEBUG(328, *YYCURSOR); + goto yy57; +yy327: + YYDEBUG(327, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy223; } else { - if (yych <= '9') goto yy330; + if (yych <= '9') goto yy329; if (yych <= ':') goto yy225; goto yy223; } -yy329: - YYDEBUG(329, *YYCURSOR); +yy328: + YYDEBUG(328, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy223; } else { - if (yych <= '0') goto yy271; + if (yych <= '0') goto yy270; if (yych == ':') goto yy225; goto yy223; } -yy330: - YYDEBUG(330, *YYCURSOR); +yy329: + YYDEBUG(329, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ' ') { - if (yych == '\t') goto yy273; + if (yych == '\t') goto yy272; if (yych <= 0x1F) goto yy223; - goto yy273; + goto yy272; } else { if (yych <= '(') { if (yych <= '\'') goto yy223; - goto yy273; + goto yy272; } else { - if (yych == '+') goto yy273; + if (yych == '+') goto yy272; goto yy223; } } } else { if (yych <= ':') { - if (yych <= '-') goto yy273; + if (yych <= '-') goto yy272; if (yych <= '.') goto yy225; if (yych <= '9') goto yy223; goto yy225; } else { if (yych <= 'Z') { if (yych <= '@') goto yy223; - goto yy273; + goto yy272; } else { if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy273; + if (yych <= 'z') goto yy272; goto yy223; } } } -yy331: - YYDEBUG(331, *YYCURSOR); +yy330: + YYDEBUG(330, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy199; - goto yy284; + goto yy283; } else { if (yych <= '.') { if (yych <= '-') goto yy199; - goto yy312; + goto yy311; } else { if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; - goto yy312; + if (yych <= '9') goto yy289; + goto yy311; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy199; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy199; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy199; } } } -yy332: - YYDEBUG(332, *YYCURSOR); +yy331: + YYDEBUG(331, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy334; - goto yy335; + if (yych <= '0') goto yy333; + goto yy334; } else { - if (yych <= '2') goto yy336; - if (yych <= '5') goto yy337; - if (yych <= '9') goto yy338; + if (yych <= '2') goto yy335; + if (yych <= '5') goto yy336; + if (yych <= '9') goto yy337; goto yy216; } -yy333: - YYDEBUG(333, *YYCURSOR); +yy332: + YYDEBUG(332, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { - if (yych <= '0') goto yy305; - if (yych <= '9') goto yy306; + if (yych <= '0') goto yy304; + if (yych <= '9') goto yy305; if (yych <= ':') goto yy221; - goto yy56; + 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 yy351; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '0') goto yy350; - if (yych <= '9') goto yy355; - if (yych <= ':') goto yy351; + if (yych <= '2') goto yy354; + if (yych <= '9') goto yy349; + if (yych <= ':') goto yy338; goto yy199; } yy335: @@ -5926,12 +6038,12 @@ yy335: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '2') goto yy355; - if (yych <= '9') goto yy350; - if (yych <= ':') goto yy339; + if (yych <= '4') goto yy349; + if (yych <= '9') goto yy348; + if (yych <= ':') goto yy338; goto yy199; } yy336: @@ -5939,12 +6051,11 @@ yy336: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '4') goto yy350; - if (yych <= '9') goto yy349; - if (yych <= ':') goto yy339; + if (yych <= '9') goto yy348; + if (yych <= ':') goto yy338; goto yy199; } yy337: @@ -5952,120 +6063,108 @@ yy337: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; - goto yy199; - } else { - if (yych <= '9') goto yy349; - if (yych <= ':') goto yy339; - goto yy199; - } -yy338: - YYDEBUG(338, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { if (yych != '.') goto yy199; } else { - if (yych <= '9') goto yy264; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy340; - if (yych <= '6') goto yy341; - if (yych <= '9') goto yy267; - goto yy56; -yy340: - YYDEBUG(340, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '9') goto yy342; - if (yych <= ':') goto yy268; + if (yych <= '9') goto yy341; + if (yych <= ':') goto yy267; goto yy223; } -yy341: - YYDEBUG(341, *YYCURSOR); +yy340: + YYDEBUG(340, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { if (yych <= '0') goto yy229; - if (yych == ':') goto yy268; + if (yych == ':') goto yy267; goto yy223; } -yy342: - YYDEBUG(342, *YYCURSOR); +yy341: + YYDEBUG(341, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ' ') { - if (yych == '\t') goto yy344; + if (yych == '\t') goto yy343; if (yych <= 0x1F) goto yy223; - goto yy344; + goto yy343; } else { if (yych <= '(') { if (yych <= '\'') goto yy223; - goto yy344; + goto yy343; } else { - if (yych == '+') goto yy344; + if (yych == '+') goto yy343; goto yy223; } } } else { if (yych <= ':') { - if (yych <= '-') goto yy344; - if (yych <= '.') goto yy268; + if (yych <= '-') goto yy343; + if (yych <= '.') goto yy267; if (yych <= '9') goto yy223; - goto yy268; + goto yy267; } else { if (yych <= 'Z') { if (yych <= '@') goto yy223; - goto yy344; + goto yy343; } else { if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy344; + if (yych <= 'z') goto yy343; goto yy223; } } } -yy343: - YYDEBUG(343, *YYCURSOR); +yy342: + YYDEBUG(342, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; -yy344: - YYDEBUG(344, *YYCURSOR); +yy343: + YYDEBUG(343, *YYCURSOR); if (yych <= '@') { if (yych <= '\'') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy343; + if (yych <= 0x08) goto yy57; + goto yy342; } else { - if (yych == ' ') goto yy343; - goto yy56; + if (yych == ' ') goto yy342; + goto yy57; } } else { if (yych <= '+') { if (yych <= '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } else { if (yych == '-') goto yy233; - goto yy56; + goto yy57; } } } else { if (yych <= 'Z') { if (yych <= 'G') { - if (yych <= 'A') goto yy345; + if (yych <= 'A') goto yy344; if (yych <= 'F') goto yy235; goto yy232; } else { @@ -6073,18 +6172,18 @@ yy344: } } else { if (yych <= 'o') { - if (yych <= '`') goto yy56; - if (yych <= 'a') goto yy346; + if (yych <= '`') goto yy57; + if (yych <= 'a') goto yy345; goto yy236; } else { - if (yych <= 'p') goto yy346; + if (yych <= 'p') goto yy345; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } -yy345: - YYDEBUG(345, *YYCURSOR); +yy344: + YYDEBUG(344, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -6092,23 +6191,23 @@ yy345: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy287; + if (yych <= '.') goto yy286; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy347; + if (yych <= 'M') goto yy346; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy348; + if (yych == 'm') goto yy347; if (yych <= 'z') goto yy242; goto yy223; } } -yy346: - YYDEBUG(346, *YYCURSOR); +yy345: + YYDEBUG(345, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -6116,38 +6215,38 @@ yy346: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy287; + if (yych <= '.') goto yy286; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy347; + if (yych <= 'M') goto yy346; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy347; + if (yych == 'm') goto yy346; if (yych <= 'z') goto yy237; goto yy223; } } -yy347: - YYDEBUG(347, *YYCURSOR); +yy346: + YYDEBUG(346, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych <= '\t') { - if (yych <= 0x00) goto yy279; + if (yych <= 0x00) goto yy278; if (yych <= 0x08) goto yy223; - goto yy279; + goto yy278; } else { - if (yych == ' ') goto yy279; + if (yych == ' ') goto yy278; if (yych <= '(') goto yy223; goto yy228; } } else { if (yych <= '@') { - if (yych == '.') goto yy289; + if (yych == '.') goto yy288; goto yy223; } else { if (yych <= 'Z') goto yy238; @@ -6156,23 +6255,28 @@ yy347: goto yy223; } } -yy348: - YYDEBUG(348, *YYCURSOR); +yy347: + YYDEBUG(347, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '-') { if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; goto yy223; } else { - if (yych <= ' ') goto yy279; - if (yych == ')') goto yy228; - goto yy223; + 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 yy289; + if (yych <= '.') goto yy288; if (yych <= '/') goto yy244; if (yych <= '@') goto yy223; goto yy238; @@ -6187,50 +6291,50 @@ yy348: } } } -yy349: - YYDEBUG(349, *YYCURSOR); +yy348: + YYDEBUG(348, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy199; } else { - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; if (yych <= ':') goto yy225; goto yy199; } -yy350: - YYDEBUG(350, *YYCURSOR); +yy349: + YYDEBUG(349, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych != '.') goto yy199; } else { - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; if (yych >= ';') goto yy199; } -yy351: - YYDEBUG(351, *YYCURSOR); +yy350: + YYDEBUG(350, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy352; - if (yych <= '6') goto yy353; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy351; + if (yych <= '6') goto yy352; if (yych <= '9') goto yy224; - goto yy56; -yy352: - YYDEBUG(352, *YYCURSOR); + goto yy57; +yy351: + YYDEBUG(351, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy223; } else { - if (yych <= '9') goto yy354; + if (yych <= '9') goto yy353; if (yych <= ':') goto yy225; goto yy223; } -yy353: - YYDEBUG(353, *YYCURSOR); +yy352: + YYDEBUG(352, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -6241,8 +6345,8 @@ yy353: if (yych == ':') goto yy225; goto yy223; } -yy354: - YYDEBUG(354, *YYCURSOR); +yy353: + YYDEBUG(353, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -6276,35 +6380,35 @@ yy354: } } } -yy355: - YYDEBUG(355, *YYCURSOR); +yy354: + YYDEBUG(354, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '9') goto yy290; - if (yych <= ':') goto yy339; + if (yych <= '9') goto yy289; + if (yych <= ':') goto yy338; goto yy199; } -yy356: - YYDEBUG(356, *YYCURSOR); +yy355: + YYDEBUG(355, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { - if (yych == '.') goto yy301; + if (yych == '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6314,23 +6418,23 @@ yy356: goto yy216; } } -yy357: - YYDEBUG(357, *YYCURSOR); +yy356: + YYDEBUG(356, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { - if (yych == '.') goto yy301; + if (yych == '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6340,18 +6444,18 @@ yy357: goto yy216; } } -yy358: - YYDEBUG(358, *YYCURSOR); +yy357: + YYDEBUG(357, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy361; - goto yy362; + if (yych <= '0') goto yy360; + goto yy361; } else { - if (yych <= '2') goto yy369; - if (yych <= '9') goto yy370; + if (yych <= '2') goto yy368; + if (yych <= '9') goto yy369; goto yy216; } } else { @@ -6365,18 +6469,18 @@ yy358: goto yy216; } } -yy359: - YYDEBUG(359, *YYCURSOR); +yy358: + YYDEBUG(358, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy361; - goto yy362; + if (yych <= '0') goto yy360; + goto yy361; } else { - if (yych <= '2') goto yy369; - if (yych <= '9') goto yy370; + if (yych <= '2') goto yy368; + if (yych <= '9') goto yy369; goto yy216; } } else { @@ -6390,14 +6494,14 @@ yy359: goto yy216; } } -yy360: - YYDEBUG(360, *YYCURSOR); +yy359: + YYDEBUG(359, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych >= '1') goto yy362; + if (yych >= '1') goto yy361; } else { if (yych <= '2') goto yy209; if (yych <= '9') goto yy210; @@ -6414,21 +6518,21 @@ yy360: goto yy216; } } -yy361: - YYDEBUG(361, *YYCURSOR); +yy360: + YYDEBUG(360, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy332; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy331; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { @@ -6442,25 +6546,25 @@ yy361: goto yy216; } } -yy362: - YYDEBUG(362, *YYCURSOR); +yy361: + YYDEBUG(361, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy301; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy302; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy301; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6470,17 +6574,17 @@ yy362: goto yy216; } } -yy363: - YYDEBUG(363, *YYCURSOR); +yy362: + YYDEBUG(362, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; - YYDEBUG(364, *YYCURSOR); + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; + YYDEBUG(363, *YYCURSOR); ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy365; - if (yych <= '9') goto yy366; -yy365: - YYDEBUG(365, *YYCURSOR); + if ((yych = *YYCURSOR) <= '/') goto yy364; + if (yych <= '9') goto yy365; +yy364: + YYDEBUG(364, *YYCURSOR); { DEBUG_OUTPUT("pgtextshort"); TIMELIB_INIT; @@ -6492,37 +6596,37 @@ yy365: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -yy366: +yy365: + YYDEBUG(365, *YYCURSOR); + yych = *++YYCURSOR; + if (yych <= '/') goto yy364; + if (yych >= ':') goto yy364; YYDEBUG(366, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy365; - if (yych >= ':') goto yy365; + if (yych <= '/') goto yy364; + if (yych >= ':') goto yy364; YYDEBUG(367, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy365; - if (yych >= ':') goto yy365; + goto yy364; +yy368: YYDEBUG(368, *YYCURSOR); - yych = *++YYCURSOR; - goto yy365; -yy369: - YYDEBUG(369, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy301; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6532,25 +6636,25 @@ yy369: goto yy216; } } -yy370: - YYDEBUG(370, *YYCURSOR); +yy369: + YYDEBUG(369, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy301; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6560,33 +6664,39 @@ yy370: goto yy216; } } -yy371: - YYDEBUG(371, *YYCURSOR); +yy370: + YYDEBUG(370, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'B') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; - goto yy193; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'C') goto yy193; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'c') goto yy372; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'b') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 'c') goto yy371; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy372: - YYDEBUG(372, *YYCURSOR); +yy371: + YYDEBUG(371, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -6600,11 +6710,10 @@ yy372: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -6612,15 +6721,15 @@ yy372: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'E') goto yy202; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -6630,77 +6739,101 @@ yy372: } } } +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 <= 'M') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'L') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; - goto yy203; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'M') goto yy203; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'm') goto yy374; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; - goto yy204; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy204; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy375; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'D') goto yy3; - goto yy205; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'E') goto yy205; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'e') goto yy376; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy376: @@ -6712,51 +6845,57 @@ yy377: YYDEBUG(377, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { + 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; - goto yy196; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '9') goto yy196; - goto yy194; + if (yych <= '9') { + if (yych == '/') goto yy148; + goto yy196; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy154; + 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 yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy142; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 't') goto yy379; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 't') goto yy380; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy379: - YYDEBUG(379, *YYCURSOR); +yy380: + YYDEBUG(380, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -6770,7 +6909,7 @@ yy379: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -6784,101 +6923,107 @@ yy379: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'O') goto yy142; + if (yych != 'O') goto yy143; } } else { if (yych <= 'n') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'o') goto yy380; - if (yych <= 'z') goto yy142; + if (yych <= 'o') goto yy381; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy380: - YYDEBUG(380, *YYCURSOR); +yy381: + YYDEBUG(381, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy144; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'b') goto yy381; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'b') goto yy382; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy381: - YYDEBUG(381, *YYCURSOR); +yy382: + YYDEBUG(382, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy145; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'e') goto yy382; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'e') goto yy383; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy382: - YYDEBUG(382, *YYCURSOR); +yy383: + YYDEBUG(383, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Q') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'R') goto yy206; if (yych == 'r') goto yy206; - goto yy3; + goto yy4; } -yy383: - YYDEBUG(383, *YYCURSOR); +yy384: + YYDEBUG(384, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; - goto yy379; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy380; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy384; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 's') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 't') goto yy385; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy384: - YYDEBUG(384, *YYCURSOR); +yy385: + YYDEBUG(385, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -6892,11 +7037,11 @@ yy384: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -6904,177 +7049,190 @@ yy384: if (yych <= '^') { if (yych <= 'N') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'O') goto yy380; - if (yych <= 'Z') goto yy142; + if (yych <= 'O') goto yy381; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'n') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'o') goto yy385; + if (yych <= 'o') goto yy386; if (yych <= 'z') goto yy151; goto yy194; } } } -yy385: - YYDEBUG(385, *YYCURSOR); +yy386: + YYDEBUG(386, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy143; - goto yy381; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy382; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy386; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'a') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'b') goto yy387; + if (yych <= 'z') goto yy152; + goto yy4; + } } } -yy386: - YYDEBUG(386, *YYCURSOR); +yy387: + YYDEBUG(387, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy144; - goto yy382; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy383; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy387; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 'd') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 'e') goto yy388; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy387: - YYDEBUG(387, *YYCURSOR); +yy388: + YYDEBUG(388, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'Q') goto yy3; - goto yy206; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'R') goto yy206; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'r') goto yy377; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } -yy388: - YYDEBUG(388, *YYCURSOR); +yy389: + YYDEBUG(389, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'G') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy396; + if (yych <= '@') goto yy4; + if (yych <= 'F') goto yy142; + goto yy397; } } else { if (yych <= 'f') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'g') goto yy396; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'g') goto yy397; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy389: - YYDEBUG(389, *YYCURSOR); +yy390: + YYDEBUG(390, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy141; - goto yy393; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy142; + goto yy394; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'r') goto yy393; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'r') goto yy394; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy390: - YYDEBUG(390, *YYCURSOR); +yy391: + YYDEBUG(391, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'N') goto yy142; } } else { if (yych <= 'n') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'o') goto yy391; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'o') goto yy392; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy391: - YYDEBUG(391, *YYCURSOR); +yy392: + YYDEBUG(392, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy392; - if (yych <= 'z') goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy393; + if (yych <= 'z') goto yy143; } -yy392: - YYDEBUG(392, *YYCURSOR); +yy393: + YYDEBUG(393, *YYCURSOR); { DEBUG_OUTPUT("ago"); TIMELIB_INIT; @@ -7094,8 +7252,8 @@ yy392: TIMELIB_DEINIT; return TIMELIB_AGO; } -yy393: - YYDEBUG(393, *YYCURSOR); +yy394: + YYDEBUG(394, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7109,7 +7267,7 @@ yy393: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7123,43 +7281,43 @@ yy393: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'I') goto yy142; + if (yych != 'I') goto yy143; } } else { if (yych <= 'h') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'i') goto yy394; - if (yych <= 'z') goto yy142; + if (yych <= 'i') goto yy395; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy394: - YYDEBUG(394, *YYCURSOR); +yy395: + YYDEBUG(395, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'K') goto yy144; } } else { if (yych <= 'k') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'l') goto yy395; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'l') goto yy396; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy395: - YYDEBUG(395, *YYCURSOR); +yy396: + YYDEBUG(396, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -7168,7 +7326,7 @@ yy395: goto yy194; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; goto yy194; } } else { @@ -7177,14 +7335,14 @@ yy395: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych <= 'Z') goto yy144; + if (yych <= 'Z') goto yy145; if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy144; + if (yych <= 'z') goto yy145; goto yy194; } } -yy396: - YYDEBUG(396, *YYCURSOR); +yy397: + YYDEBUG(397, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7198,7 +7356,7 @@ yy396: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7212,65 +7370,65 @@ yy396: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'U') goto yy142; + if (yych != 'U') goto yy143; } } else { if (yych <= 't') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'u') goto yy397; - if (yych <= 'z') goto yy142; + if (yych <= 'u') goto yy398; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy397: - YYDEBUG(397, *YYCURSOR); +yy398: + YYDEBUG(398, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy144; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 's') goto yy398; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 's') goto yy399; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy398: - YYDEBUG(398, *YYCURSOR); +yy399: + YYDEBUG(399, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy145; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 't') goto yy399; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 't') goto yy400; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy399: - YYDEBUG(399, *YYCURSOR); +yy400: + YYDEBUG(400, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { @@ -7283,7 +7441,7 @@ yy399: } } else { if (yych <= '.') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; goto yy196; } else { @@ -7292,106 +7450,125 @@ yy399: goto yy194; } } -yy400: - YYDEBUG(400, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy396; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'g') goto yy407; - if (yych <= 'z') goto yy146; - goto yy3; - } - } yy401: YYDEBUG(401, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'F') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy141; - goto yy393; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'G') goto yy397; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy404; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy141; - goto yy391; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy394; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy403; - if (yych <= 'z') goto yy146; - goto yy3; + 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 = 9; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy392; - goto yy139; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych == '/') goto yy147; - goto yy392; + 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 yy392; - goto yy147; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy392; - if (yych <= 'z') goto yy151; - goto yy392; + 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') { @@ -7405,11 +7582,11 @@ yy404: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -7417,51 +7594,57 @@ yy404: if (yych <= '^') { if (yych <= 'H') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'I') goto yy394; - if (yych <= 'Z') goto yy142; + if (yych <= 'I') goto yy395; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'h') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'i') goto yy405; + if (yych <= 'i') goto yy406; if (yych <= 'z') goto yy151; goto yy194; } } } -yy405: - YYDEBUG(405, *YYCURSOR); +yy406: + YYDEBUG(406, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'K') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy143; - goto yy395; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'L') goto yy396; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'l') goto yy406; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'k') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'l') goto yy407; + if (yych <= 'z') goto yy152; + goto yy4; + } } } -yy406: - YYDEBUG(406, *YYCURSOR); +yy407: + YYDEBUG(407, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { @@ -7470,20 +7653,25 @@ yy406: if (yych <= 0x1F) goto yy194; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy194; - goto yy196; + 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 yy147; + if (yych <= '/') goto yy148; if (yych <= '9') goto yy196; if (yych <= '@') goto yy194; - goto yy144; + goto yy145; } else { if (yych <= '_') { if (yych <= '^') goto yy194; - goto yy147; + goto yy148; } else { if (yych <= '`') goto yy194; if (yych <= 'z') goto yy153; @@ -7491,8 +7679,8 @@ yy406: } } } -yy407: - YYDEBUG(407, *YYCURSOR); +yy408: + YYDEBUG(408, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -7506,11 +7694,11 @@ yy407: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -7518,147 +7706,161 @@ yy407: if (yych <= '^') { if (yych <= 'T') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'U') goto yy397; - if (yych <= 'Z') goto yy142; + if (yych <= 'U') goto yy398; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 't') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'u') goto yy408; + if (yych <= 'u') goto yy409; if (yych <= 'z') goto yy151; goto yy194; } } } -yy408: - YYDEBUG(408, *YYCURSOR); +yy409: + YYDEBUG(409, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; - goto yy398; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy399; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy409; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'r') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 's') goto yy410; + if (yych <= 'z') goto yy152; + goto yy4; + } } } -yy409: - YYDEBUG(409, *YYCURSOR); +yy410: + YYDEBUG(410, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; - goto yy399; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy400; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy410; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 's') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 't') goto yy411; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy410: - YYDEBUG(410, *YYCURSOR); +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 yy139; + if (yych == ')') goto yy140; goto yy194; } } else { - if (yych <= '^') { - if (yych == '/') goto yy147; - if (yych <= '9') goto yy196; - goto yy194; + if (yych <= '/') { + if (yych <= '-') goto yy378; + if (yych <= '.') goto yy196; + goto yy148; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy154; + if (yych <= '9') goto yy196; + if (yych == '_') goto yy148; goto yy194; } } -yy411: - YYDEBUG(411, *YYCURSOR); +yy412: + YYDEBUG(412, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == 'L') goto yy418; - if (yych <= 'M') goto yy141; - goto yy417; + if (yych == 'L') goto yy419; + if (yych <= 'M') goto yy142; + goto yy418; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'k') goto yy141; - goto yy418; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + if (yych <= 'k') goto yy142; + goto yy419; } else { - if (yych == 'n') goto yy417; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych == 'n') goto yy418; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy412: - YYDEBUG(412, *YYCURSOR); +yy413: + YYDEBUG(413, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'n') goto yy413; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'n') goto yy414; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy413: - YYDEBUG(413, *YYCURSOR); +yy414: + YYDEBUG(414, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7672,7 +7874,7 @@ yy413: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7686,70 +7888,70 @@ yy413: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'U') goto yy142; + if (yych != 'U') goto yy143; } } else { if (yych <= 't') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'u') goto yy414; - if (yych <= 'z') goto yy142; + if (yych <= 'u') goto yy415; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy414: - YYDEBUG(414, *YYCURSOR); +yy415: + YYDEBUG(415, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= 'a') goto yy415; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'a') goto yy416; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy415: - YYDEBUG(415, *YYCURSOR); +yy416: + YYDEBUG(416, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy145; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'r') goto yy416; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'r') goto yy417; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy416: - YYDEBUG(416, *YYCURSOR); +yy417: + YYDEBUG(417, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Y') goto yy206; if (yych == 'y') goto yy206; - goto yy3; + goto yy4; } -yy417: - YYDEBUG(417, *YYCURSOR); +yy418: + YYDEBUG(418, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7763,7 +7965,7 @@ yy417: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7777,22 +7979,22 @@ yy417: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych == 'E') goto yy419; - goto yy142; + if (yych == 'E') goto yy420; + goto yy143; } } else { if (yych <= 'd') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'e') goto yy419; - if (yych <= 'z') goto yy142; + if (yych <= 'e') goto yy420; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy418: - YYDEBUG(418, *YYCURSOR); +yy419: + YYDEBUG(419, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7806,7 +8008,7 @@ yy418: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7820,21 +8022,21 @@ yy418: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'Y') goto yy142; + if (yych != 'Y') goto yy143; } } else { if (yych <= 'x') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'y') goto yy419; - if (yych <= 'z') goto yy142; + if (yych <= 'y') goto yy420; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy419: - YYDEBUG(419, *YYCURSOR); +yy420: + YYDEBUG(420, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -7843,7 +8045,7 @@ yy419: goto yy194; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; goto yy194; } } else { @@ -7852,79 +8054,87 @@ yy419: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych <= 'Z') goto yy143; + if (yych <= 'Z') goto yy144; if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy143; + if (yych <= 'z') goto yy144; goto yy194; } } -yy420: - YYDEBUG(420, *YYCURSOR); +yy421: + YYDEBUG(421, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'M') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'K') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'L') goto yy418; - if (yych <= 'M') goto yy141; - goto yy417; + if (yych == 'L') goto yy419; + goto yy142; } } } else { - if (yych <= 'k') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'N') goto yy418; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'm') { - if (yych <= 'l') goto yy427; - goto yy146; + if (yych == 'l') goto yy428; + goto yy147; } else { - if (yych <= 'n') goto yy426; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'n') goto yy427; + if (yych <= 'z') goto yy147; + goto yy4; } } } -yy421: - YYDEBUG(421, *YYCURSOR); +yy422: + YYDEBUG(422, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy413; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy414; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy422; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'm') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 'n') goto yy423; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy422: - YYDEBUG(422, *YYCURSOR); +yy423: + YYDEBUG(423, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -7938,11 +8148,11 @@ yy422: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -7950,99 +8160,107 @@ yy422: if (yych <= '^') { if (yych <= 'T') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'U') goto yy414; - if (yych <= 'Z') goto yy142; + if (yych <= 'U') goto yy415; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 't') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'u') goto yy423; + if (yych <= 'u') goto yy424; if (yych <= 'z') goto yy151; goto yy194; } } } -yy423: - YYDEBUG(423, *YYCURSOR); +yy424: + YYDEBUG(424, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy415; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy416; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; - if (yych <= 'a') goto yy424; + if (yych <= '`') goto yy4; + if (yych <= 'a') goto yy425; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } -yy424: - YYDEBUG(424, *YYCURSOR); +yy425: + YYDEBUG(425, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; - goto yy416; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy417; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy425; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 'q') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 'r') goto yy426; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy425: - YYDEBUG(425, *YYCURSOR); +yy426: + YYDEBUG(426, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'X') goto yy3; - goto yy206; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'Y') goto yy206; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'y') goto yy377; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } -yy426: - YYDEBUG(426, *YYCURSOR); +yy427: + YYDEBUG(427, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -8056,11 +8274,11 @@ yy426: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -8068,26 +8286,26 @@ yy426: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'E') goto yy419; - if (yych <= 'Z') goto yy142; + if (yych <= 'E') goto yy420; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'e') goto yy428; + if (yych <= 'e') goto yy429; if (yych <= 'z') goto yy151; goto yy194; } } } -yy427: - YYDEBUG(427, *YYCURSOR); +yy428: + YYDEBUG(428, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -8101,11 +8319,11 @@ yy427: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -8113,26 +8331,26 @@ yy427: if (yych <= '^') { if (yych <= 'X') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'Y') goto yy419; - if (yych <= 'Z') goto yy142; + if (yych <= 'Y') goto yy420; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'x') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'y') goto yy428; + if (yych <= 'y') goto yy429; if (yych <= 'z') goto yy151; goto yy194; } } } -yy428: - YYDEBUG(428, *YYCURSOR); +yy429: + YYDEBUG(429, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { @@ -8141,20 +8359,25 @@ yy428: if (yych <= 0x1F) goto yy194; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy194; - goto yy196; + 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 yy147; + if (yych <= '/') goto yy148; if (yych <= '9') goto yy196; if (yych <= '@') goto yy194; - goto yy143; + goto yy144; } else { if (yych <= '_') { if (yych <= '^') goto yy194; - goto yy147; + goto yy148; } else { if (yych <= '`') goto yy194; if (yych <= 'z') goto yy152; @@ -8162,622 +8385,622 @@ yy428: } } } -yy429: - YYDEBUG(429, *YYCURSOR); +yy430: + YYDEBUG(430, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych >= 'J') goto yy141; + if (yych >= 'J') goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } } -yy430: - YYDEBUG(430, *YYCURSOR); +yy431: + YYDEBUG(431, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= 0x1F) { if (yych == '\t') goto yy196; - goto yy3; + goto yy4; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '@') { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; if (yych <= '9') goto yy196; - goto yy3; + goto yy4; } else { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy431: - YYDEBUG(431, *YYCURSOR); +yy432: + YYDEBUG(432, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych >= 'J') goto yy141; + if (yych >= 'J') goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } } - YYDEBUG(432, *YYCURSOR); + YYDEBUG(433, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy142; + if (yych <= '@') goto yy4; + goto yy143; } else { if (yych <= 'Z') { - if (yych >= 'J') goto yy142; + if (yych >= 'J') goto yy143; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy143; + goto yy4; } } } - YYDEBUG(433, *YYCURSOR); + YYDEBUG(434, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= 0x1F) { if (yych == '\t') goto yy196; - goto yy3; + goto yy4; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '@') { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; if (yych <= '9') goto yy196; - goto yy3; + goto yy4; } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy434: - YYDEBUG(434, *YYCURSOR); +yy435: + YYDEBUG(435, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= 0x1F) { if (yych == '\t') goto yy196; - goto yy3; + goto yy4; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '@') { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; if (yych <= '9') goto yy196; - goto yy3; + goto yy4; } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy435: - YYDEBUG(435, *YYCURSOR); +yy436: + YYDEBUG(436, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych <= 'I') goto yy430; - goto yy141; + if (yych <= 'I') goto yy431; + goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } } -yy436: - YYDEBUG(436, *YYCURSOR); +yy437: + YYDEBUG(437, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '9') { - if (yych <= '/') goto yy3; - goto yy456; + if (yych <= '/') goto yy4; + goto yy457; } else { if (yych <= ':') goto yy163; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= 'C') goto yy4; + goto yy61; } } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy437: - YYDEBUG(437, *YYCURSOR); +yy438: + YYDEBUG(438, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '4') { - if (yych <= '/') goto yy3; - goto yy456; + if (yych <= '/') goto yy4; + goto yy457; } else { - if (yych <= '5') goto yy441; - if (yych <= '9') goto yy442; + if (yych <= '5') goto yy442; + if (yych <= '9') goto yy443; goto yy163; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= 'C') goto yy4; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy3; + if (yych == 'F') goto yy61; + goto yy4; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy3; + if (yych <= 'H') goto yy61; + goto yy4; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy3; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy4; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy3; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy4; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy3; - goto yy60; + if (yych <= 'c') goto yy4; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy3; + if (yych == 'f') goto yy61; + goto yy4; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy3; + if (yych <= 'h') goto yy61; + goto yy4; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy438: - YYDEBUG(438, *YYCURSOR); +yy439: + YYDEBUG(439, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= 'C') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '5') { - if (yych <= '/') goto yy3; - goto yy441; + if (yych <= '/') goto yy4; + goto yy442; } else { - if (yych <= '9') goto yy442; + if (yych <= '9') goto yy443; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; } } } else { if (yych <= 'G') { - if (yych == 'E') goto yy3; - if (yych <= 'F') goto yy60; - goto yy3; + if (yych == 'E') goto yy4; + if (yych <= 'F') goto yy61; + goto yy4; } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy3; + if (yych <= 'H') goto yy61; + goto yy4; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy3; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy4; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy3; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy4; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy3; - goto yy60; + if (yych <= 'c') goto yy4; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy3; + if (yych == 'f') goto yy61; + goto yy4; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy3; + if (yych <= 'h') goto yy61; + goto yy4; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy439: - YYDEBUG(439, *YYCURSOR); +yy440: + YYDEBUG(440, *YYCURSOR); ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - YYDEBUG(440, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; + YYDEBUG(441, *YYCURSOR); + if (yybm[0+yych] & 4) { + goto yy58; } if (yych <= ',') { - if (yych == '+') goto yy439; - goto yy56; + if (yych == '+') goto yy440; + goto yy57; } else { - if (yych <= '-') goto yy439; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy54; - goto yy56; + if (yych <= '-') goto yy440; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy55; + goto yy57; } -yy441: - YYDEBUG(441, *YYCURSOR); +yy442: + YYDEBUG(442, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy455; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy456; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy442: - YYDEBUG(442, *YYCURSOR); +yy443: + YYDEBUG(443, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy443; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy444; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy443: - YYDEBUG(443, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych >= ':') goto yy60; yy444: YYDEBUG(444, *YYCURSOR); yych = *++YYCURSOR; - if (yybm[0+yych] & 4) { - goto yy54; - } - if (yych != '-') goto yy60; + if (yych <= '/') goto yy61; + if (yych >= ':') goto yy61; yy445: YYDEBUG(445, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy446; - if (yych <= '1') goto yy447; - goto yy56; + if (yybm[0+yych] & 2) { + goto yy55; + } + if (yych != '-') goto yy61; yy446: YYDEBUG(446, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy448; - goto yy56; + 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 yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy449; + goto yy57; yy448: YYDEBUG(448, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '-') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '3') goto yy57; +yy449: YYDEBUG(449, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy450; - if (yych <= '2') goto yy451; - if (yych <= '3') goto yy452; - goto yy56; -yy450: + if (yych != '-') goto yy57; YYDEBUG(450, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy453; - goto yy56; + 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 yy56; - if (yych <= '9') goto yy453; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy454; + goto yy57; yy452: YYDEBUG(452, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy454; + goto yy57; yy453: YYDEBUG(453, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy57; yy454: YYDEBUG(454, *YYCURSOR); + ++YYCURSOR; +yy455: + YYDEBUG(455, *YYCURSOR); { DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); TIMELIB_INIT; @@ -8788,504 +9011,504 @@ yy454: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -yy455: - YYDEBUG(455, *YYCURSOR); +yy456: + YYDEBUG(456, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy444; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy445; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy456: - YYDEBUG(456, *YYCURSOR); +yy457: + YYDEBUG(457, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= 'C') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '5') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; } else { - if (yych <= '9') goto yy455; + if (yych <= '9') goto yy456; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; } } } else { if (yych <= 'G') { - if (yych == 'E') goto yy3; - if (yych <= 'F') goto yy60; - goto yy3; + if (yych == 'E') goto yy4; + if (yych <= 'F') goto yy61; + goto yy4; } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy3; + if (yych <= 'H') goto yy61; + goto yy4; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy3; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy4; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy3; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy4; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy3; - goto yy60; + if (yych <= 'c') goto yy4; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy3; + if (yych == 'f') goto yy61; + goto yy4; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy3; + if (yych <= 'h') goto yy61; + goto yy4; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } - YYDEBUG(457, *YYCURSOR); + YYDEBUG(458, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy458; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy459; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy458: - YYDEBUG(458, *YYCURSOR); +yy459: + YYDEBUG(459, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych == '-') goto yy445; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych == '-') goto yy446; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy459: - YYDEBUG(459, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy461; - if (yych <= '0') goto yy735; - if (yych <= '1') goto yy736; - if (yych <= '9') goto yy737; - goto yy461; 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; -yy461: - YYDEBUG(461, *YYCURSOR); +yy462: + YYDEBUG(462, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': - case ' ': goto yy460; + case ' ': goto yy461; case '-': - case '.': goto yy576; + case '.': goto yy577; case 'A': - case 'a': goto yy479; + case 'a': goto yy480; case 'D': - case 'd': goto yy465; + case 'd': goto yy466; case 'F': - case 'f': goto yy466; + case 'f': goto yy467; case 'H': - case 'h': goto yy63; - case 'I': goto yy474; + case 'h': goto yy64; + case 'I': goto yy475; case 'J': - case 'j': goto yy478; + case 'j': goto yy479; case 'M': - case 'm': goto yy464; + case 'm': goto yy465; case 'N': - case 'n': goto yy481; + case 'n': goto yy482; case 'O': - case 'o': goto yy480; + case 'o': goto yy481; case 'P': - case 'p': goto yy483; + case 'p': goto yy484; case 'S': - case 's': goto yy462; + case 's': goto yy463; case 'T': - case 't': goto yy68; - case 'V': goto yy476; + case 't': goto yy69; + case 'V': goto yy477; case 'W': - case 'w': goto yy67; - case 'X': goto yy477; + case 'w': goto yy68; + case 'X': goto yy478; case 'Y': - case 'y': goto yy66; - default: goto yy56; + case 'y': goto yy67; + default: goto yy57; } -yy462: - YYDEBUG(462, *YYCURSOR); +yy463: + YYDEBUG(463, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy1048; - if (yych <= 'T') goto yy56; - goto yy125; + if (yych <= 'E') goto yy1049; + if (yych <= 'T') goto yy57; + goto yy126; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy126; - goto yy56; + if (yych == 'a') goto yy127; + goto yy57; } else { - if (yych <= 'e') goto yy1048; - if (yych == 'u') goto yy125; - goto yy56; + if (yych <= 'e') goto yy1049; + if (yych == 'u') goto yy126; + goto yy57; } } -yy463: - YYDEBUG(463, *YYCURSOR); +yy464: + YYDEBUG(464, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '`') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy1048; - if (yych == 'U') goto yy125; - goto yy56; + if (yych <= 'E') goto yy1049; + if (yych == 'U') goto yy126; + goto yy57; } } else { if (yych <= 'e') { - if (yych <= 'a') goto yy126; - if (yych <= 'd') goto yy56; - goto yy1048; + if (yych <= 'a') goto yy127; + if (yych <= 'd') goto yy57; + goto yy1049; } else { - if (yych <= 's') goto yy56; - if (yych <= 't') goto yy728; - if (yych <= 'u') goto yy125; - goto yy56; + if (yych <= 's') goto yy57; + if (yych <= 't') goto yy729; + if (yych <= 'u') goto yy126; + goto yy57; } } -yy464: - YYDEBUG(464, *YYCURSOR); +yy465: + YYDEBUG(465, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'H') { - if (yych == 'A') goto yy591; - goto yy56; + if (yych == 'A') goto yy592; + goto yy57; } else { - if (yych <= 'I') goto yy117; - if (yych <= 'N') goto yy56; - goto yy116; + if (yych <= 'I') goto yy118; + if (yych <= 'N') goto yy57; + goto yy117; } } else { if (yych <= 'h') { - if (yych == 'a') goto yy591; - goto yy56; + if (yych == 'a') goto yy592; + goto yy57; } else { - if (yych <= 'i') goto yy117; - if (yych == 'o') goto yy116; - goto yy56; + if (yych <= 'i') goto yy118; + if (yych == 'o') goto yy117; + goto yy57; } } -yy465: - YYDEBUG(465, *YYCURSOR); +yy466: + YYDEBUG(466, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { - if (yych == 'A') goto yy113; - if (yych <= 'D') goto yy56; - goto yy578; + if (yych == 'A') goto yy114; + if (yych <= 'D') goto yy57; + goto yy579; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy113; + if (yych <= '`') goto yy57; + goto yy114; } else { - if (yych == 'e') goto yy578; - goto yy56; + if (yych == 'e') goto yy579; + goto yy57; } } -yy466: - YYDEBUG(466, *YYCURSOR); +yy467: + YYDEBUG(467, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'N') { - if (yych == 'E') goto yy594; - goto yy56; + if (yych == 'E') goto yy595; + goto yy57; } else { - if (yych <= 'O') goto yy98; - if (yych <= 'Q') goto yy56; - goto yy97; + if (yych <= 'O') goto yy99; + if (yych <= 'Q') goto yy57; + goto yy98; } } else { if (yych <= 'n') { - if (yych == 'e') goto yy594; - goto yy56; + if (yych == 'e') goto yy595; + goto yy57; } else { - if (yych <= 'o') goto yy98; - if (yych == 'r') goto yy97; - goto yy56; + if (yych <= 'o') goto yy99; + if (yych == 'r') goto yy98; + goto yy57; } } -yy467: - YYDEBUG(467, *YYCURSOR); +yy468: + YYDEBUG(468, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'H') goto yy69; - if (yych <= 'T') goto yy56; - goto yy70; + if (yych == 'H') goto yy70; + if (yych <= 'T') goto yy57; + goto yy71; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; - goto yy1047; + if (yych <= 'g') goto yy57; + goto yy1048; } else { - if (yych == 'u') goto yy70; - goto yy56; + if (yych == 'u') goto yy71; + goto yy57; } } -yy468: - YYDEBUG(468, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy741; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy740; - goto yy60; yy469: YYDEBUG(469, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'c') { - if (yych == 'O') goto yy529; - goto yy56; - } else { - if (yych <= 'd') goto yy728; - if (yych == 'o') goto yy529; - goto yy56; - } + if (yych == '-') goto yy742; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy741; + goto yy61; yy470: YYDEBUG(470, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy728; - goto yy56; + 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 yy665; - case '3': goto yy667; + case '2': goto yy666; + case '3': goto yy668; case '4': case '5': case '6': case '7': case '8': - case '9': goto yy668; + case '9': goto yy669; case 'A': - case 'a': goto yy672; + case 'a': goto yy673; case 'D': - case 'd': goto yy676; + case 'd': goto yy677; case 'F': - case 'f': goto yy670; + case 'f': goto yy671; case 'J': - case 'j': goto yy669; + case 'j': goto yy670; case 'M': - case 'm': goto yy671; + case 'm': goto yy672; case 'N': - case 'n': goto yy675; + case 'n': goto yy676; case 'O': - case 'o': goto yy674; + case 'o': goto yy675; case 'S': - case 's': goto yy673; - default: goto yy56; + case 's': goto yy674; + default: goto yy57; } -yy472: - YYDEBUG(472, *YYCURSOR); +yy473: + YYDEBUG(473, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { - case '0': goto yy615; - case '1': goto yy616; + case '0': goto yy616; + case '1': goto yy617; case '2': case '3': case '4': @@ -9293,60 +9516,60 @@ yy472: case '6': case '7': case '8': - case '9': goto yy617; + case '9': goto yy618; case 'A': - case 'a': goto yy621; + case 'a': goto yy622; case 'D': - case 'd': goto yy625; + case 'd': goto yy626; case 'F': - case 'f': goto yy619; + case 'f': goto yy620; case 'J': - case 'j': goto yy618; + case 'j': goto yy619; case 'M': - case 'm': goto yy620; + case 'm': goto yy621; case 'N': - case 'n': goto yy624; + case 'n': goto yy625; case 'O': - case 'o': goto yy623; + case 'o': goto yy624; case 'S': - case 's': goto yy622; - default: goto yy577; + case 's': goto yy623; + default: goto yy578; } -yy473: - YYDEBUG(473, *YYCURSOR); +yy474: + YYDEBUG(474, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '1') { - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy567; - goto yy568; + if (yych <= '/') goto yy578; + if (yych <= '0') goto yy568; + goto yy569; } else { - if (yych <= '5') goto yy569; - if (yych <= '9') goto yy570; - goto yy577; + if (yych <= '5') goto yy570; + if (yych <= '9') goto yy571; + goto yy578; } -yy474: - YYDEBUG(474, *YYCURSOR); +yy475: + YYDEBUG(475, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; + if (yych == '\t') goto yy532; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '.') goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '.') goto yy532; } } else { if (yych <= 'U') { - if (yych <= '9') goto yy533; - if (yych == 'I') goto yy566; + if (yych <= '9') goto yy534; + if (yych == 'I') goto yy567; } else { - if (yych == 'W') goto yy475; - if (yych <= 'X') goto yy539; + if (yych == 'W') goto yy476; + if (yych <= 'X') goto yy540; } } -yy475: - YYDEBUG(475, *YYCURSOR); +yy476: + YYDEBUG(476, *YYCURSOR); { DEBUG_OUTPUT("datenoyearrev"); TIMELIB_INIT; @@ -9357,146 +9580,146 @@ yy475: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -yy476: - YYDEBUG(476, *YYCURSOR); +yy477: + YYDEBUG(477, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy564; - goto yy475; + if (yych == 'I') goto yy565; + goto yy476; } } -yy477: - YYDEBUG(477, *YYCURSOR); +yy478: + YYDEBUG(478, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy563; - goto yy475; + if (yych == 'I') goto yy564; + goto yy476; } } -yy478: - YYDEBUG(478, *YYCURSOR); +yy479: + YYDEBUG(479, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy556; - if (yych <= 'T') goto yy56; - goto yy555; + if (yych == 'A') goto yy557; + if (yych <= 'T') goto yy57; + goto yy556; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy556; + if (yych <= '`') goto yy57; + goto yy557; } else { - if (yych == 'u') goto yy555; - goto yy56; + if (yych == 'u') goto yy556; + goto yy57; } } -yy479: - YYDEBUG(479, *YYCURSOR); +yy480: + YYDEBUG(480, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= 'L') { - if (yych == '.') goto yy484; - goto yy56; + if (yych == '.') goto yy485; + goto yy57; } else { - if (yych <= 'M') goto yy485; - if (yych == 'P') goto yy549; - goto yy56; + if (yych <= 'M') goto yy486; + if (yych == 'P') goto yy550; + goto yy57; } } else { if (yych <= 'o') { - if (yych <= 'U') goto yy548; - if (yych == 'm') goto yy485; - goto yy56; + if (yych <= 'U') goto yy549; + if (yych == 'm') goto yy486; + goto yy57; } else { - if (yych <= 'p') goto yy549; - if (yych == 'u') goto yy548; - goto yy56; + if (yych <= 'p') goto yy550; + if (yych == 'u') goto yy549; + goto yy57; } } -yy480: - YYDEBUG(480, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy543; - if (yych == 'c') goto yy543; - goto yy56; yy481: YYDEBUG(481, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy529; - if (yych == 'o') goto yy529; - goto yy56; + if (yych == 'C') goto yy544; + if (yych == 'c') goto yy544; + goto yy57; yy482: YYDEBUG(482, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy489; - if (yych <= '9') goto yy491; - goto yy56; + if (yych == 'O') goto yy530; + if (yych == 'o') goto yy530; + goto yy57; yy483: YYDEBUG(483, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy56; - } else { - if (yych <= 'M') goto yy485; - if (yych == 'm') goto yy485; - goto yy56; - } + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy490; + if (yych <= '9') goto yy492; + goto yy57; yy484: YYDEBUG(484, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'M') goto yy485; - if (yych != 'm') goto yy56; + 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 yy487; - if (yych == '\t') goto yy487; - goto yy56; + if (yych <= 0x00) goto yy488; + if (yych == '\t') goto yy488; + goto yy57; } else { - if (yych <= ' ') goto yy487; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy488; + if (yych != '.') goto yy57; } - YYDEBUG(486, *YYCURSOR); + YYDEBUG(487, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy487; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy488; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy487: - YYDEBUG(487, *YYCURSOR); - ++YYCURSOR; +yy488: YYDEBUG(488, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(489, *YYCURSOR); { DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); TIMELIB_INIT; @@ -9512,18 +9735,18 @@ yy487: TIMELIB_DEINIT; return TIMELIB_TIME12; } -yy489: - YYDEBUG(489, *YYCURSOR); +yy490: + YYDEBUG(490, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy492; + if (yych == '.') goto yy493; } else { - if (yych <= '9') goto yy506; - if (yych <= ':') goto yy492; + if (yych <= '9') goto yy507; + if (yych <= ':') goto yy493; } -yy490: - YYDEBUG(490, *YYCURSOR); +yy491: + YYDEBUG(491, *YYCURSOR); { int tz_not_found; DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); @@ -9548,315 +9771,315 @@ yy490: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -yy491: - YYDEBUG(491, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy492; - if (yych != ':') goto yy490; yy492: YYDEBUG(492, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy493; - if (yych <= '6') goto yy494; - if (yych <= '9') goto yy495; - goto yy56; -yy493: - YYDEBUG(493, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy499; - goto yy490; + 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 yy496; - if (yych == '0') goto yy499; - goto yy490; + 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 yy490; + if (yych == '.') goto yy497; + if (yych == '0') goto yy500; + goto yy491; yy496: YYDEBUG(496, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + 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(498, *YYCURSOR); - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy497; - goto yy490; -yy499: 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 yy490; + if (yych != '\t') goto yy491; } else { - if (yych <= ' ') goto yy500; - if (yych == '.') goto yy496; - goto yy490; + if (yych <= ' ') goto yy501; + if (yych == '.') goto yy497; + goto yy491; } } else { if (yych <= '`') { - if (yych <= 'A') goto yy502; - if (yych == 'P') goto yy502; - goto yy490; + if (yych <= 'A') goto yy503; + if (yych == 'P') goto yy503; + goto yy491; } else { - if (yych <= 'a') goto yy502; - if (yych == 'p') goto yy502; - goto yy490; + if (yych <= 'a') goto yy503; + if (yych == 'p') goto yy503; + goto yy491; } } -yy500: - YYDEBUG(500, *YYCURSOR); +yy501: + YYDEBUG(501, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(501, *YYCURSOR); + YYDEBUG(502, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy500; - goto yy56; + if (yych == '\t') goto yy501; + goto yy57; } else { - if (yych <= ' ') goto yy500; - if (yych <= '@') goto yy56; + if (yych <= ' ') goto yy501; + if (yych <= '@') goto yy57; } } else { if (yych <= '`') { - if (yych != 'P') goto yy56; + if (yych != 'P') goto yy57; } else { - if (yych <= 'a') goto yy502; - if (yych != 'p') goto yy56; + if (yych <= 'a') goto yy503; + if (yych != 'p') goto yy57; } } -yy502: - YYDEBUG(502, *YYCURSOR); +yy503: + YYDEBUG(503, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy504; - if (yych == 'm') goto yy504; - goto yy56; + if (yych <= 'M') goto yy505; + if (yych == 'm') goto yy505; + goto yy57; } - YYDEBUG(503, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy504; - if (yych != 'm') goto yy56; -yy504: 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 yy487; - if (yych == '\t') goto yy487; - goto yy56; + if (yych <= 0x00) goto yy488; + if (yych == '\t') goto yy488; + goto yy57; } else { - if (yych <= ' ') goto yy487; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy488; + if (yych != '.') goto yy57; } - YYDEBUG(505, *YYCURSOR); + YYDEBUG(506, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy487; - if (yych <= 0x08) goto yy56; - goto yy487; + if (yych <= 0x00) goto yy488; + if (yych <= 0x08) goto yy57; + goto yy488; } else { - if (yych == ' ') goto yy487; - goto yy56; + if (yych == ' ') goto yy488; + goto yy57; } -yy506: - YYDEBUG(506, *YYCURSOR); +yy507: + YYDEBUG(507, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy507; - if (yych <= 0x1F) goto yy490; + if (yych == '\t') goto yy508; + if (yych <= 0x1F) goto yy491; } else { - if (yych == '.') goto yy492; - if (yych <= '9') goto yy490; - goto yy510; + if (yych == '.') goto yy493; + if (yych <= '9') goto yy491; + goto yy511; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy509; - if (yych <= 'O') goto yy490; - goto yy509; + if (yych == 'A') goto yy510; + if (yych <= 'O') goto yy491; + goto yy510; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy509; + if (yych <= '`') goto yy491; + goto yy510; } else { - if (yych == 'p') goto yy509; - goto yy490; + if (yych == 'p') goto yy510; + goto yy491; } } } -yy507: - YYDEBUG(507, *YYCURSOR); +yy508: + YYDEBUG(508, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(508, *YYCURSOR); + YYDEBUG(509, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy507; - goto yy56; + if (yych == '\t') goto yy508; + goto yy57; } else { - if (yych <= ' ') goto yy507; - if (yych <= '@') goto yy56; + if (yych <= ' ') goto yy508; + if (yych <= '@') goto yy57; } } else { if (yych <= '`') { - if (yych != 'P') goto yy56; + if (yych != 'P') goto yy57; } else { - if (yych <= 'a') goto yy509; - if (yych != 'p') goto yy56; + if (yych <= 'a') goto yy510; + if (yych != 'p') goto yy57; } } -yy509: - YYDEBUG(509, *YYCURSOR); +yy510: + YYDEBUG(510, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych == '.') goto yy526; - goto yy56; + if (yych == '.') goto yy527; + goto yy57; } else { - if (yych <= 'M') goto yy527; - if (yych == 'm') goto yy527; - goto yy56; + if (yych <= 'M') goto yy528; + if (yych == 'm') goto yy528; + goto yy57; } -yy510: - YYDEBUG(510, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy511; - if (yych <= '6') goto yy512; - if (yych <= '9') goto yy495; - goto yy56; yy511: YYDEBUG(511, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy513; - goto yy490; + 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 yy496; - if (yych != '0') goto yy490; + 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 yy500; - if (yych <= 0x1F) goto yy490; - goto yy500; + if (yych == '\t') goto yy501; + if (yych <= 0x1F) goto yy491; + goto yy501; } else { - if (yych == '.') goto yy514; - if (yych <= '9') goto yy490; - goto yy515; + if (yych == '.') goto yy515; + if (yych <= '9') goto yy491; + goto yy516; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy502; - if (yych <= 'O') goto yy490; - goto yy502; + if (yych == 'A') goto yy503; + if (yych <= 'O') goto yy491; + goto yy503; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy502; + if (yych <= '`') goto yy491; + goto yy503; } else { - if (yych == 'p') goto yy502; - goto yy490; + if (yych == 'p') goto yy503; + goto yy491; } } } -yy514: - YYDEBUG(514, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy524; - goto yy56; yy515: YYDEBUG(515, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + 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(517, *YYCURSOR); + YYDEBUG(518, *YYCURSOR); if (yych <= 'O') { if (yych <= '9') { - if (yych <= '/') goto yy56; - goto yy516; + if (yych <= '/') goto yy57; + goto yy517; } else { - if (yych != 'A') goto yy56; + if (yych != 'A') goto yy57; } } else { if (yych <= 'a') { - if (yych <= 'P') goto yy518; - if (yych <= '`') goto yy56; + if (yych <= 'P') goto yy519; + if (yych <= '`') goto yy57; } else { - if (yych != 'p') goto yy56; + if (yych != 'p') goto yy57; } } -yy518: - YYDEBUG(518, *YYCURSOR); +yy519: + YYDEBUG(519, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy520; - if (yych == 'm') goto yy520; - goto yy56; + if (yych <= 'M') goto yy521; + if (yych == 'm') goto yy521; + goto yy57; } - YYDEBUG(519, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy520; - if (yych != 'm') goto yy56; -yy520: 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 yy522; - if (yych == '\t') goto yy522; - goto yy56; + if (yych <= 0x00) goto yy523; + if (yych == '\t') goto yy523; + goto yy57; } else { - if (yych <= ' ') goto yy522; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy523; + if (yych != '.') goto yy57; } - YYDEBUG(521, *YYCURSOR); + YYDEBUG(522, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy522; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy523; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy522: - YYDEBUG(522, *YYCURSOR); - ++YYCURSOR; +yy523: YYDEBUG(523, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(524, *YYCURSOR); { DEBUG_OUTPUT("mssqltime"); TIMELIB_INIT; @@ -9875,111 +10098,111 @@ yy522: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -yy524: - YYDEBUG(524, *YYCURSOR); +yy525: + YYDEBUG(525, *YYCURSOR); yyaccept = 11; YYMARKER = ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(525, *YYCURSOR); + YYDEBUG(526, *YYCURSOR); if (yych <= 'O') { if (yych <= '9') { - if (yych <= '/') goto yy490; - goto yy524; + if (yych <= '/') goto yy491; + goto yy525; } else { - if (yych == 'A') goto yy518; - goto yy490; + if (yych == 'A') goto yy519; + goto yy491; } } else { if (yych <= 'a') { - if (yych <= 'P') goto yy518; - if (yych <= '`') goto yy490; - goto yy518; + if (yych <= 'P') goto yy519; + if (yych <= '`') goto yy491; + goto yy519; } else { - if (yych == 'p') goto yy518; - goto yy490; + if (yych == 'p') goto yy519; + goto yy491; } } -yy526: - YYDEBUG(526, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy527; - if (yych != 'm') goto yy56; 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 yy487; - if (yych == '\t') goto yy487; - goto yy56; + if (yych <= 0x00) goto yy488; + if (yych == '\t') goto yy488; + goto yy57; } else { - if (yych <= ' ') goto yy487; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy488; + if (yych != '.') goto yy57; } - YYDEBUG(528, *YYCURSOR); + YYDEBUG(529, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy487; - if (yych <= 0x08) goto yy56; - goto yy487; + if (yych <= 0x00) goto yy488; + if (yych <= 0x08) goto yy57; + goto yy488; } else { - if (yych == ' ') goto yy487; - goto yy56; + if (yych == ' ') goto yy488; + goto yy57; } -yy529: - YYDEBUG(529, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy530; - if (yych != 'v') goto yy56; 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 yy475; + if (yych != '\t') goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy535; - if (yych == 'e') goto yy535; - goto yy475; + if (yych <= 'E') goto yy536; + if (yych == 'e') goto yy536; + goto yy476; } } -yy531: - YYDEBUG(531, *YYCURSOR); +yy532: + YYDEBUG(532, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); yych = *YYCURSOR; -yy532: - YYDEBUG(532, *YYCURSOR); +yy533: + YYDEBUG(533, *YYCURSOR); if (yych <= ' ') { - if (yych == '\t') goto yy531; - if (yych <= 0x1F) goto yy56; - goto yy531; + if (yych == '\t') goto yy532; + if (yych <= 0x1F) goto yy57; + goto yy532; } else { if (yych <= '.') { - if (yych <= ',') goto yy56; - goto yy531; + if (yych <= ',') goto yy57; + goto yy532; } else { - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; } } -yy533: - YYDEBUG(533, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy534; - if (yych <= '9') goto yy540; yy534: YYDEBUG(534, *YYCURSOR); + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '/') goto yy535; + if (yych <= '9') goto yy541; +yy535: + YYDEBUG(535, *YYCURSOR); { DEBUG_OUTPUT("datefull"); TIMELIB_INIT; @@ -9992,742 +10215,742 @@ yy534: TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -yy535: - YYDEBUG(535, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy536; - if (yych != 'm') goto yy56; yy536: YYDEBUG(536, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy537; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy537; + if (yych != 'm') goto yy57; yy537: YYDEBUG(537, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy538; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy538; + if (yych != 'b') goto yy57; yy538: YYDEBUG(538, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych != 'r') goto yy56; + 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 yy531; - if (yych <= 0x1F) goto yy475; - goto yy531; + if (yych == '\t') goto yy532; + if (yych <= 0x1F) goto yy476; + goto yy532; } else { if (yych <= '.') { - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ',') goto yy476; + goto yy532; } else { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } } -yy540: - YYDEBUG(540, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych >= ':') goto yy534; yy541: YYDEBUG(541, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych >= ':') goto yy534; + if (yych <= '/') goto yy535; + if (yych >= ':') goto yy535; +yy542: YYDEBUG(542, *YYCURSOR); yych = *++YYCURSOR; - goto yy534; -yy543: + if (yych <= '/') goto yy535; + if (yych >= ':') goto yy535; YYDEBUG(543, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy544; - if (yych != 't') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'N') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'O') goto yy545; - if (yych != 'o') goto yy475; + if (yych <= 'O') goto yy546; + if (yych != 'o') goto yy476; } } -yy545: - YYDEBUG(545, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy546; - if (yych != 'b') goto yy56; yy546: YYDEBUG(546, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy547; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy547; + if (yych != 'b') goto yy57; yy547: YYDEBUG(547, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych == 'r') goto yy539; - goto yy56; + if (yych == 'E') goto yy548; + if (yych != 'e') goto yy57; yy548: YYDEBUG(548, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy552; - if (yych == 'g') goto yy552; - goto yy56; + if (yych == 'R') goto yy540; + if (yych == 'r') goto yy540; + goto yy57; yy549: YYDEBUG(549, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy550; - if (yych != 'r') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'I') goto yy551; - if (yych != 'i') goto yy475; + if (yych <= 'I') goto yy552; + if (yych != 'i') goto yy476; } } -yy551: - YYDEBUG(551, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy539; - if (yych == 'l') goto yy539; - goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy553; - if (yych != 'u') goto yy475; + if (yych <= 'U') goto yy554; + if (yych != 'u') goto yy476; } } -yy553: - YYDEBUG(553, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy554; - if (yych != 's') goto yy56; yy554: YYDEBUG(554, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy539; - if (yych == 't') goto yy539; - goto yy56; + 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 yy562; - if (yych <= 'M') goto yy56; - goto yy561; + if (yych == 'L') goto yy563; + if (yych <= 'M') goto yy57; + goto yy562; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy562; + if (yych <= 'k') goto yy57; + goto yy563; } else { - if (yych == 'n') goto yy561; - goto yy56; + if (yych == 'n') goto yy562; + goto yy57; } } -yy556: - YYDEBUG(556, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy557; - if (yych != 'n') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy558; - if (yych != 'u') goto yy475; + if (yych <= 'U') goto yy559; + if (yych != 'u') goto yy476; } } -yy558: - YYDEBUG(558, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy559; - if (yych != 'a') goto yy56; yy559: YYDEBUG(559, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy560; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy560; + if (yych != 'a') goto yy57; yy560: YYDEBUG(560, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy539; - if (yych == 'e') goto yy539; - goto yy475; + if (yych <= 'E') goto yy540; + if (yych == 'e') goto yy540; + goto yy476; } } -yy562: - YYDEBUG(562, *YYCURSOR); +yy563: + YYDEBUG(563, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'X') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy475; + if (yych <= 'Y') goto yy540; + if (yych == 'y') goto yy540; + goto yy476; } } -yy563: - YYDEBUG(563, *YYCURSOR); +yy564: + YYDEBUG(564, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy539; - goto yy475; + if (yych == 'I') goto yy540; + goto yy476; } } -yy564: - YYDEBUG(564, *YYCURSOR); +yy565: + YYDEBUG(565, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych != 'I') goto yy475; + if (yych != 'I') goto yy476; } } - YYDEBUG(565, *YYCURSOR); + YYDEBUG(566, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy539; - goto yy475; + if (yych == 'I') goto yy540; + goto yy476; } } -yy566: - YYDEBUG(566, *YYCURSOR); +yy567: + YYDEBUG(567, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy539; - goto yy475; + if (yych == 'I') goto yy540; + goto yy476; } } -yy567: - YYDEBUG(567, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy490; - if (yych <= '-') goto yy601; - goto yy600; - } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy614; - if (yych <= ':') goto yy492; - goto yy490; - } yy568: YYDEBUG(568, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') goto yy490; - if (yych <= '-') goto yy601; - if (yych <= '.') goto yy600; - goto yy490; + if (yych <= '.') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy601; } else { - if (yych <= '2') goto yy614; - if (yych <= '9') goto yy613; - if (yych <= ':') goto yy492; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; - goto yy600; + if (yych <= '/') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + if (yych <= '.') goto yy601; + goto yy491; } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy613; - if (yych <= ':') goto yy492; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; - goto yy600; + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy601; } else { - if (yych == ':') goto yy492; - goto yy490; + if (yych <= '/') goto yy491; + if (yych <= '9') goto yy614; + if (yych <= ':') goto yy493; + goto yy491; } yy571: YYDEBUG(571, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy594; - if (yych == 'e') goto yy594; - goto yy56; + 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 == 'A') goto yy591; - if (yych == 'a') goto yy591; - goto yy56; + 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 yy549; - if (yych <= 'T') goto yy56; - goto yy548; + if (yych == 'P') goto yy550; + if (yych <= 'T') goto yy57; + goto yy549; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy549; + if (yych <= 'o') goto yy57; + goto yy550; } else { - if (yych == 'u') goto yy548; - goto yy56; + if (yych == 'u') goto yy549; + goto yy57; } } -yy574: - YYDEBUG(574, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy584; - if (yych == 'e') goto yy584; - goto yy56; yy575: YYDEBUG(575, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy578; - if (yych == 'e') goto yy578; - goto yy56; + 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; -yy577: - YYDEBUG(577, *YYCURSOR); +yy578: + YYDEBUG(578, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': case ' ': case '-': - case '.': goto yy576; + case '.': goto yy577; case 'A': - case 'a': goto yy573; + case 'a': goto yy574; case 'D': - case 'd': goto yy575; + case 'd': goto yy576; case 'F': - case 'f': goto yy571; - case 'I': goto yy474; + case 'f': goto yy572; + case 'I': goto yy475; case 'J': - case 'j': goto yy478; + case 'j': goto yy479; case 'M': - case 'm': goto yy572; + case 'm': goto yy573; case 'N': - case 'n': goto yy481; + case 'n': goto yy482; case 'O': - case 'o': goto yy480; + case 'o': goto yy481; case 'S': - case 's': goto yy574; - case 'V': goto yy476; - case 'X': goto yy477; - default: goto yy56; + case 's': goto yy575; + case 'V': goto yy477; + case 'X': goto yy478; + default: goto yy57; } -yy578: - YYDEBUG(578, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy579; - if (yych != 'c') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy580; - if (yych != 'e') goto yy475; + if (yych <= 'E') goto yy581; + if (yych != 'e') goto yy476; } } -yy580: - YYDEBUG(580, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy581; - if (yych != 'm') goto yy56; yy581: YYDEBUG(581, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy582; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy582; + if (yych != 'm') goto yy57; yy582: YYDEBUG(582, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy583; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy583; + if (yych != 'b') goto yy57; yy583: YYDEBUG(583, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych == 'r') goto yy539; - goto yy56; + if (yych == 'E') goto yy584; + if (yych != 'e') goto yy57; yy584: YYDEBUG(584, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'P') goto yy585; - if (yych != 'p') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'S') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'T') goto yy586; - if (yych != 't') goto yy475; + if (yych <= 'T') goto yy587; + if (yych != 't') goto yy476; } } -yy586: - YYDEBUG(586, *YYCURSOR); +yy587: + YYDEBUG(587, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy587; - if (yych != 'e') goto yy475; + if (yych <= 'E') goto yy588; + if (yych != 'e') goto yy476; } } -yy587: - YYDEBUG(587, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy588; - if (yych != 'm') goto yy56; yy588: YYDEBUG(588, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy589; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy589; + if (yych != 'm') goto yy57; yy589: YYDEBUG(589, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy590; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy590; + if (yych != 'b') goto yy57; yy590: YYDEBUG(590, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych == 'r') goto yy539; - goto yy56; + 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 yy592; - if (yych <= 'X') goto yy56; - goto yy539; + if (yych == 'R') goto yy593; + if (yych <= 'X') goto yy57; + goto yy540; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy539; - goto yy56; + if (yych == 'y') goto yy540; + goto yy57; } } -yy592: - YYDEBUG(592, *YYCURSOR); +yy593: + YYDEBUG(593, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'B') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'C') goto yy593; - if (yych != 'c') goto yy475; + if (yych <= 'C') goto yy594; + if (yych != 'c') goto yy476; } } -yy593: - YYDEBUG(593, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy539; - if (yych == 'h') goto yy539; - goto yy56; yy594: YYDEBUG(594, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy595; - if (yych != 'b') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'Q') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'R') goto yy596; - if (yych != 'r') goto yy475; + if (yych <= 'R') goto yy597; + if (yych != 'r') goto yy476; } } -yy596: - YYDEBUG(596, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy597; - if (yych != 'u') goto yy56; yy597: YYDEBUG(597, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy598; - if (yych != 'a') goto yy56; + if (yych == 'U') goto yy598; + if (yych != 'u') goto yy57; yy598: YYDEBUG(598, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy599; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy599; + if (yych != 'a') goto yy57; yy599: YYDEBUG(599, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy56; + if (yych == 'R') goto yy600; + if (yych != 'r') goto yy57; yy600: YYDEBUG(600, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy607; - if (yych <= '6') goto yy608; - if (yych <= '9') goto yy609; - goto yy56; + if (yych == 'Y') goto yy540; + if (yych == 'y') goto yy540; + goto yy57; yy601: YYDEBUG(601, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + 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 yy56; - if (yych >= ':') goto yy56; -yy603: + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(603, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy604: YYDEBUG(604, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; +yy605: YYDEBUG(605, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(606, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(607, *YYCURSOR); { DEBUG_OUTPUT("pointed date YYYY"); TIMELIB_INIT; @@ -10738,41 +10961,41 @@ yy604: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -yy607: - YYDEBUG(607, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy612; - goto yy490; yy608: YYDEBUG(608, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy496; - goto yy490; - } else { - if (yych <= '0') goto yy612; - if (yych <= '9') goto yy610; - goto yy490; - } + 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 == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych >= ':') goto yy490; + 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 = 12; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy611; - if (yych <= '9') goto yy604; + 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); { DEBUG_OUTPUT("pointed date YY"); TIMELIB_INIT; @@ -10784,646 +11007,646 @@ yy611: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -yy612: - YYDEBUG(612, *YYCURSOR); +yy613: + YYDEBUG(613, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy500; - if (yych <= 0x1F) goto yy490; - goto yy500; + if (yych == '\t') goto yy501; + if (yych <= 0x1F) goto yy491; + goto yy501; } else { - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - goto yy604; + if (yych == '.') goto yy497; + if (yych <= '/') goto yy491; + goto yy605; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy502; - if (yych <= 'O') goto yy490; - goto yy502; + if (yych == 'A') goto yy503; + if (yych <= 'O') goto yy491; + goto yy503; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy502; + if (yych <= '`') goto yy491; + goto yy503; } else { - if (yych == 'p') goto yy502; - goto yy490; + if (yych == 'p') goto yy503; + goto yy491; } } } -yy613: - YYDEBUG(613, *YYCURSOR); +yy614: + YYDEBUG(614, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy507; - if (yych <= 0x1F) goto yy490; - goto yy507; + if (yych == '\t') goto yy508; + if (yych <= 0x1F) goto yy491; + goto yy508; } else { - if (yych == '.') goto yy492; - if (yych <= '9') goto yy490; - goto yy492; + if (yych == '.') goto yy493; + if (yych <= '9') goto yy491; + goto yy493; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy509; - if (yych <= 'O') goto yy490; - goto yy509; + if (yych == 'A') goto yy510; + if (yych <= 'O') goto yy491; + goto yy510; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy509; + if (yych <= '`') goto yy491; + goto yy510; } else { - if (yych == 'p') goto yy509; - goto yy490; + if (yych == 'p') goto yy510; + goto yy491; } } } -yy614: - YYDEBUG(614, *YYCURSOR); +yy615: + YYDEBUG(615, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy507; - if (yych <= 0x1F) goto yy490; - goto yy507; + if (yych == '\t') goto yy508; + if (yych <= 0x1F) goto yy491; + goto yy508; } else { if (yych <= '-') { - if (yych <= ',') goto yy490; - goto yy601; + if (yych <= ',') goto yy491; + goto yy602; } else { - if (yych <= '.') goto yy600; - if (yych <= '9') goto yy490; - goto yy492; + if (yych <= '.') goto yy601; + if (yych <= '9') goto yy491; + goto yy493; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy509; - if (yych <= 'O') goto yy490; - goto yy509; + if (yych == 'A') goto yy510; + if (yych <= 'O') goto yy491; + goto yy510; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy509; + if (yych <= '`') goto yy491; + goto yy510; } else { - if (yych == 'p') goto yy509; - goto yy490; + if (yych == 'p') goto yy510; + goto yy491; } } } -yy615: - YYDEBUG(615, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; - } else { - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy617; - goto yy56; - } yy616: YYDEBUG(616, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy655; + goto yy602; } else { - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy618; + goto yy57; } yy617: YYDEBUG(617, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - if (yych <= '.') goto yy601; - goto yy56; + 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 yy650; - if (yych <= 'T') goto yy56; - goto yy649; + if (yych == 'A') goto yy651; + if (yych <= 'T') goto yy57; + goto yy650; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy650; + if (yych <= '`') goto yy57; + goto yy651; } else { - if (yych == 'u') goto yy649; - goto yy56; + if (yych == 'u') goto yy650; + goto yy57; } } -yy619: - YYDEBUG(619, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy647; - if (yych == 'e') goto yy647; - goto yy56; yy620: YYDEBUG(620, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy644; - if (yych == 'a') goto yy644; - goto yy56; + 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 yy641; - if (yych <= 'T') goto yy56; - goto yy640; + if (yych == 'P') goto yy642; + if (yych <= 'T') goto yy57; + goto yy641; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy641; + if (yych <= 'o') goto yy57; + goto yy642; } else { - if (yych == 'u') goto yy640; - goto yy56; + if (yych == 'u') goto yy641; + goto yy57; } } -yy622: - YYDEBUG(622, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy637; - if (yych == 'e') goto yy637; - goto yy56; yy623: YYDEBUG(623, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy635; - if (yych == 'c') goto yy635; - goto yy56; + if (yych == 'E') goto yy638; + if (yych == 'e') goto yy638; + goto yy57; yy624: YYDEBUG(624, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy633; - if (yych == 'o') goto yy633; - goto yy56; + if (yych == 'C') goto yy636; + if (yych == 'c') goto yy636; + goto yy57; yy625: YYDEBUG(625, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy626; - if (yych != 'e') goto yy56; + if (yych == 'O') goto yy634; + if (yych == 'o') goto yy634; + goto yy57; yy626: YYDEBUG(626, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy627; - if (yych != 'c') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych >= '.') goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych >= '.') goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy580; - if (yych == 'e') goto yy580; - goto yy475; + if (yych <= 'E') goto yy581; + if (yych == 'e') goto yy581; + goto yy476; } } -yy628: - YYDEBUG(628, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy532; - if (yych <= '0') goto yy629; - if (yych <= '2') goto yy630; - if (yych <= '3') goto yy631; - goto yy532; yy629: YYDEBUG(629, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych <= '9') goto yy632; - goto yy534; + 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 yy534; - if (yych <= '9') goto yy632; - goto yy534; + if (yych <= '/') goto yy535; + if (yych <= '9') goto yy633; + goto yy535; yy631: YYDEBUG(631, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych <= '1') goto yy632; - if (yych <= '9') goto yy540; - goto yy534; + if (yych <= '/') goto yy535; + if (yych <= '9') goto yy633; + goto yy535; yy632: YYDEBUG(632, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; + if (yych <= '/') goto yy535; + if (yych <= '1') goto yy633; if (yych <= '9') goto yy541; - goto yy534; + goto yy535; yy633: YYDEBUG(633, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'V') goto yy634; - if (yych != 'v') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy535; - if (yych == 'e') goto yy535; - goto yy475; + if (yych <= 'E') goto yy536; + if (yych == 'e') goto yy536; + goto yy476; } } -yy635: - YYDEBUG(635, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy636; - if (yych != 't') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'N') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'O') goto yy545; - if (yych == 'o') goto yy545; - goto yy475; + if (yych <= 'O') goto yy546; + if (yych == 'o') goto yy546; + goto yy476; } } -yy637: - YYDEBUG(637, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy638; - if (yych != 'p') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'S') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'T') goto yy639; - if (yych != 't') goto yy475; + if (yych <= 'T') goto yy640; + if (yych != 't') goto yy476; } } -yy639: - YYDEBUG(639, *YYCURSOR); +yy640: + YYDEBUG(640, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy587; - if (yych == 'e') goto yy587; - goto yy475; + if (yych <= 'E') goto yy588; + if (yych == 'e') goto yy588; + goto yy476; } } -yy640: - YYDEBUG(640, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy643; - if (yych == 'g') goto yy643; - goto yy56; yy641: YYDEBUG(641, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy642; - if (yych != 'r') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'I') goto yy551; - if (yych == 'i') goto yy551; - goto yy475; + if (yych <= 'I') goto yy552; + if (yych == 'i') goto yy552; + goto yy476; } } -yy643: - YYDEBUG(643, *YYCURSOR); +yy644: + YYDEBUG(644, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy553; - if (yych == 'u') goto yy553; - goto yy475; + if (yych <= 'U') goto yy554; + if (yych == 'u') goto yy554; + goto yy476; } } -yy644: - YYDEBUG(644, *YYCURSOR); +yy645: + YYDEBUG(645, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { - if (yych == 'R') goto yy645; - if (yych <= 'X') goto yy56; - goto yy646; + if (yych == 'R') goto yy646; + if (yych <= 'X') goto yy57; + goto yy647; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy646; - goto yy56; + if (yych == 'y') goto yy647; + goto yy57; } } -yy645: - YYDEBUG(645, *YYCURSOR); +yy646: + YYDEBUG(646, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'B') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'C') goto yy593; - if (yych == 'c') goto yy593; - goto yy475; + if (yych <= 'C') goto yy594; + if (yych == 'c') goto yy594; + goto yy476; } } -yy646: - YYDEBUG(646, *YYCURSOR); +yy647: + YYDEBUG(647, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '.') { - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= '-') goto yy629; + goto yy532; } else { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } } -yy647: - YYDEBUG(647, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy648; - if (yych != 'b') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'Q') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'R') goto yy596; - if (yych == 'r') goto yy596; - goto yy475; + if (yych <= 'R') goto yy597; + if (yych == 'r') goto yy597; + goto yy476; } } -yy649: - YYDEBUG(649, *YYCURSOR); +yy650: + YYDEBUG(650, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { - if (yych == 'L') goto yy653; - if (yych <= 'M') goto yy56; - goto yy652; + if (yych == 'L') goto yy654; + if (yych <= 'M') goto yy57; + goto yy653; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy653; + if (yych <= 'k') goto yy57; + goto yy654; } else { - if (yych == 'n') goto yy652; - goto yy56; + if (yych == 'n') goto yy653; + goto yy57; } } -yy650: - YYDEBUG(650, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy651; - if (yych != 'n') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy558; - if (yych == 'u') goto yy558; - goto yy475; + if (yych <= 'U') goto yy559; + if (yych == 'u') goto yy559; + goto yy476; } } -yy652: - YYDEBUG(652, *YYCURSOR); +yy653: + YYDEBUG(653, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy539; - if (yych == 'e') goto yy539; - goto yy475; + if (yych <= 'E') goto yy540; + if (yych == 'e') goto yy540; + goto yy476; } } -yy653: - YYDEBUG(653, *YYCURSOR); +yy654: + YYDEBUG(654, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'X') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy475; + if (yych <= 'Y') goto yy540; + if (yych == 'y') goto yy540; + goto yy476; } } -yy654: - YYDEBUG(654, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy655; - if (yych <= '3') goto yy657; - if (yych <= '9') goto yy658; - goto yy56; 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 yy656; - if (yych <= '9') goto yy664; - if (yych >= 'n') goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy665; + if (yych >= 'n') goto yy661; } else { if (yych <= 'r') { - if (yych >= 'r') goto yy661; + if (yych >= 'r') goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; } } -yy656: - YYDEBUG(656, *YYCURSOR); +yy657: + YYDEBUG(657, *YYCURSOR); { DEBUG_OUTPUT("gnudateshort"); TIMELIB_INIT; @@ -11435,111 +11658,111 @@ yy656: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -yy657: - YYDEBUG(657, *YYCURSOR); +yy658: + YYDEBUG(658, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '1') { - if (yych <= '/') goto yy656; - goto yy664; + if (yych <= '/') goto yy657; + goto yy665; } else { - if (yych <= '9') goto yy603; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '9') goto yy604; + if (yych <= 'm') goto yy657; + goto yy661; } } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy658: - YYDEBUG(658, *YYCURSOR); +yy659: + YYDEBUG(659, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy603; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy604; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy659: - YYDEBUG(659, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy663; - goto yy56; yy660: YYDEBUG(660, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy663; - goto yy56; + if (yych == 't') goto yy664; + goto yy57; yy661: YYDEBUG(661, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy663; - goto yy56; + if (yych == 'd') goto yy664; + goto yy57; yy662: YYDEBUG(662, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'h') goto yy56; + if (yych == 'd') goto yy664; + goto yy57; yy663: YYDEBUG(663, *YYCURSOR); yych = *++YYCURSOR; - goto yy656; + 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 yy656; - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy605; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy665: - YYDEBUG(665, *YYCURSOR); +yy666: + YYDEBUG(666, *YYCURSOR); yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '/') { - if (yych >= '/') goto yy722; + if (yych >= '/') goto yy723; } else { - if (yych <= '9') goto yy668; - if (yych >= 'n') goto yy719; + if (yych <= '9') goto yy669; + if (yych >= 'n') goto yy720; } } else { if (yych <= 'r') { - if (yych >= 'r') goto yy720; + if (yych >= 'r') goto yy721; } else { - if (yych <= 's') goto yy718; - if (yych <= 't') goto yy721; + if (yych <= 's') goto yy719; + if (yych <= 't') goto yy722; } } -yy666: - YYDEBUG(666, *YYCURSOR); +yy667: + YYDEBUG(667, *YYCURSOR); { DEBUG_OUTPUT("americanshort | american"); TIMELIB_INIT; @@ -11553,238 +11776,238 @@ yy666: TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -yy667: - YYDEBUG(667, *YYCURSOR); +yy668: + YYDEBUG(668, *YYCURSOR); yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '/') { - if (yych <= '.') goto yy666; - goto yy722; + if (yych <= '.') goto yy667; + goto yy723; } else { - if (yych <= '1') goto yy668; - if (yych <= 'm') goto yy666; - goto yy719; + if (yych <= '1') goto yy669; + if (yych <= 'm') goto yy667; + goto yy720; } } else { if (yych <= 'r') { - if (yych <= 'q') goto yy666; - goto yy720; + if (yych <= 'q') goto yy667; + goto yy721; } else { - if (yych <= 's') goto yy718; - if (yych <= 't') goto yy721; - goto yy666; + if (yych <= 's') goto yy719; + if (yych <= 't') goto yy722; + goto yy667; } } -yy668: - YYDEBUG(668, *YYCURSOR); +yy669: + YYDEBUG(669, *YYCURSOR); yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == '/') goto yy722; - if (yych <= 'm') goto yy666; - goto yy719; + if (yych == '/') goto yy723; + if (yych <= 'm') goto yy667; + goto yy720; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy666; - goto yy720; + if (yych <= 'q') goto yy667; + goto yy721; } else { - if (yych <= 's') goto yy718; - if (yych <= 't') goto yy721; - goto yy666; + if (yych <= 's') goto yy719; + if (yych <= 't') goto yy722; + goto yy667; } } -yy669: - YYDEBUG(669, *YYCURSOR); +yy670: + YYDEBUG(670, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy717; - if (yych <= 'T') goto yy56; - goto yy716; + if (yych == 'A') goto yy718; + if (yych <= 'T') goto yy57; + goto yy717; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy717; + if (yych <= '`') goto yy57; + goto yy718; } else { - if (yych == 'u') goto yy716; - goto yy56; + if (yych == 'u') goto yy717; + goto yy57; } } -yy670: - YYDEBUG(670, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy715; - if (yych == 'e') goto yy715; - goto yy56; yy671: YYDEBUG(671, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy714; - if (yych == 'a') goto yy714; - goto yy56; + 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 yy713; - if (yych <= 'T') goto yy56; - goto yy712; + if (yych == 'P') goto yy714; + if (yych <= 'T') goto yy57; + goto yy713; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy713; + if (yych <= 'o') goto yy57; + goto yy714; } else { - if (yych == 'u') goto yy712; - goto yy56; + if (yych == 'u') goto yy713; + goto yy57; } } -yy673: - YYDEBUG(673, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy710; - if (yych == 'e') goto yy710; - goto yy56; yy674: YYDEBUG(674, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy709; - if (yych == 'c') goto yy709; - goto yy56; + if (yych == 'E') goto yy711; + if (yych == 'e') goto yy711; + goto yy57; yy675: YYDEBUG(675, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy708; - if (yych == 'o') goto yy708; - goto yy56; + if (yych == 'C') goto yy710; + if (yych == 'c') goto yy710; + goto yy57; yy676: YYDEBUG(676, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy677; - if (yych != 'e') goto yy56; + if (yych == 'O') goto yy709; + if (yych == 'o') goto yy709; + goto yy57; yy677: YYDEBUG(677, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy678; - if (yych != 'c') goto yy56; + if (yych == 'E') goto yy678; + if (yych != 'e') goto yy57; yy678: YYDEBUG(678, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy56; + if (yych == 'C') goto yy679; + if (yych != 'c') goto yy57; yy679: YYDEBUG(679, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych != '/') goto yy57; +yy680: YYDEBUG(680, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(681, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(682, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(683, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(684, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy685; - if (yych <= '2') goto yy686; - goto yy56; -yy685: + if (yych != ':') goto yy57; YYDEBUG(685, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy687; - goto yy56; + 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 yy56; - if (yych >= '5') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy688; + goto yy57; yy687: YYDEBUG(687, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '5') goto yy57; +yy688: YYDEBUG(688, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '6') goto yy56; + if (yych != ':') goto yy57; YYDEBUG(689, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; YYDEBUG(690, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(691, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy692; - if (yych <= '6') goto yy693; - goto yy56; -yy692: + if (yych != ':') goto yy57; YYDEBUG(692, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy694; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy693; + if (yych <= '6') goto yy694; + goto yy57; yy693: YYDEBUG(693, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '0') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy695; + goto yy57; yy694: YYDEBUG(694, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\t') goto yy695; - if (yych != ' ') goto yy56; + 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(696, *YYCURSOR); + YYDEBUG(697, *YYCURSOR); if (yych <= '*') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy695; + if (yych <= 0x08) goto yy57; + goto yy696; } else { - if (yych == ' ') goto yy695; - goto yy56; + if (yych == ' ') goto yy696; + goto yy57; } } else { if (yych <= '-') { - if (yych == ',') goto yy56; - goto yy698; + if (yych == ',') goto yy57; + goto yy699; } else { - if (yych != 'G') goto yy56; + if (yych != 'G') goto yy57; } } - YYDEBUG(697, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy706; - goto yy56; -yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy699; - if (yych <= '2') goto yy701; - if (yych <= '9') goto yy702; - goto yy56; + if (yych == 'M') goto yy707; + goto yy57; yy699: YYDEBUG(699, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy700; - if (yych <= '9') goto yy702; - if (yych <= ':') goto yy703; + 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); { int tz_not_found; DEBUG_OUTPUT("clf"); @@ -11804,303 +12027,303 @@ yy700: TIMELIB_DEINIT; return TIMELIB_CLF; } -yy701: - YYDEBUG(701, *YYCURSOR); +yy702: + YYDEBUG(702, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '5') { - if (yych <= '/') goto yy700; - if (yych >= '5') goto yy704; + if (yych <= '/') goto yy701; + if (yych >= '5') goto yy705; } else { - if (yych <= '9') goto yy705; - if (yych <= ':') goto yy703; - goto yy700; + if (yych <= '9') goto yy706; + if (yych <= ':') goto yy704; + goto yy701; } -yy702: - YYDEBUG(702, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy700; - if (yych <= '5') goto yy704; - if (yych <= '9') goto yy705; - if (yych >= ';') goto yy700; yy703: YYDEBUG(703, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy700; - if (yych <= '5') goto yy704; - if (yych <= '9') goto yy705; - goto yy700; + 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 yy700; - if (yych >= ':') goto yy700; + if (yych <= '/') goto yy701; + if (yych <= '5') goto yy705; + if (yych <= '9') goto yy706; + goto yy701; yy705: YYDEBUG(705, *YYCURSOR); yych = *++YYCURSOR; - goto yy700; + if (yych <= '/') goto yy701; + if (yych >= ':') goto yy701; yy706: YYDEBUG(706, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'T') goto yy56; + goto yy701; +yy707: YYDEBUG(707, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '+') goto yy698; - if (yych == '-') goto yy698; - goto yy56; -yy708: + if (yych != 'T') goto yy57; YYDEBUG(708, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'V') goto yy678; - if (yych == 'v') goto yy678; - goto yy56; + if (yych == '+') goto yy699; + if (yych == '-') goto yy699; + goto yy57; yy709: YYDEBUG(709, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy678; - if (yych == 't') goto yy678; - goto yy56; + if (yych == 'V') goto yy679; + if (yych == 'v') goto yy679; + goto yy57; yy710: YYDEBUG(710, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'P') goto yy711; - if (yych != 'p') goto yy56; + if (yych == 'T') goto yy679; + if (yych == 't') goto yy679; + goto yy57; yy711: YYDEBUG(711, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == '/') goto yy679; - goto yy56; - } else { - if (yych <= 'T') goto yy678; - if (yych == 't') goto yy678; - goto yy56; - } + if (yych == 'P') goto yy712; + if (yych != 'p') goto yy57; yy712: YYDEBUG(712, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy678; - if (yych == 'g') goto yy678; - goto yy56; + 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 == 'R') goto yy678; - if (yych == 'r') goto yy678; - goto yy56; + 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 yy678; - if (yych <= 'X') goto yy56; - goto yy678; + if (yych == 'R') goto yy679; + if (yych <= 'X') goto yy57; + goto yy679; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; - goto yy678; + if (yych <= 'q') goto yy57; + goto yy679; } else { - if (yych == 'y') goto yy678; - goto yy56; + if (yych == 'y') goto yy679; + goto yy57; } } -yy715: - YYDEBUG(715, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy678; - if (yych == 'b') goto yy678; - goto yy56; 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 yy678; - if (yych <= 'M') goto yy56; - goto yy678; + if (yych == 'L') goto yy679; + if (yych <= 'M') goto yy57; + goto yy679; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy678; + if (yych <= 'k') goto yy57; + goto yy679; } else { - if (yych == 'n') goto yy678; - goto yy56; + if (yych == 'n') goto yy679; + goto yy57; } } -yy717: - YYDEBUG(717, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy678; - if (yych == 'n') goto yy678; - goto yy56; yy718: YYDEBUG(718, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 't') goto yy727; - goto yy56; + if (yych == 'N') goto yy679; + if (yych == 'n') goto yy679; + goto yy57; yy719: YYDEBUG(719, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy727; - goto yy56; + if (yych == 't') goto yy728; + goto yy57; yy720: YYDEBUG(720, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy727; - goto yy56; + if (yych == 'd') goto yy728; + goto yy57; yy721: YYDEBUG(721, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'h') goto yy727; - goto yy56; + if (yych == 'd') goto yy728; + goto yy57; yy722: YYDEBUG(722, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych == 'h') goto yy728; + goto yy57; +yy723: YYDEBUG(723, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy666; - if (yych >= ':') goto yy666; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(724, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy666; - if (yych >= ':') goto yy666; + if (yych <= '/') goto yy667; + if (yych >= ':') goto yy667; YYDEBUG(725, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy666; - if (yych >= ':') goto yy666; + if (yych <= '/') goto yy667; + if (yych >= ':') goto yy667; YYDEBUG(726, *YYCURSOR); yych = *++YYCURSOR; - goto yy666; -yy727: + if (yych <= '/') goto yy667; + if (yych >= ':') goto yy667; YYDEBUG(727, *YYCURSOR); - yyaccept = 14; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '/') goto yy722; - goto yy666; + 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 yy730; - goto yy577; + if (yych == '\t') goto yy731; + goto yy578; } else { - if (yych <= '-') goto yy731; - if (yych <= '.') goto yy730; - if (yych >= '0') goto yy577; + if (yych <= '-') goto yy732; + if (yych <= '.') goto yy731; + if (yych >= '0') goto yy578; } -yy729: - YYDEBUG(729, *YYCURSOR); +yy730: + YYDEBUG(730, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { case 'A': - case 'a': goto yy672; + case 'a': goto yy673; case 'D': - case 'd': goto yy676; + case 'd': goto yy677; case 'F': - case 'f': goto yy670; + case 'f': goto yy671; case 'J': - case 'j': goto yy669; + case 'j': goto yy670; case 'M': - case 'm': goto yy671; + case 'm': goto yy672; case 'N': - case 'n': goto yy675; + case 'n': goto yy676; case 'O': - case 'o': goto yy674; + case 'o': goto yy675; case 'S': - case 's': goto yy673; - default: goto yy56; + case 's': goto yy674; + default: goto yy57; } -yy730: - YYDEBUG(730, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy735; - if (yych <= '1') goto yy736; - if (yych <= '9') goto yy737; - goto yy577; yy731: YYDEBUG(731, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy732; - if (yych <= '1') goto yy733; - if (yych <= '9') goto yy734; - goto yy577; + 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 yy56; - if (yych <= '.') goto yy601; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy734; - goto yy56; + 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 yy56; - if (yych <= '.') goto yy601; - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + 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 yy56; - if (yych <= '.') goto yy601; - goto yy56; + 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 <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy601; - goto yy738; - } else { - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy737; - goto yy56; - } + if (yych <= ',') goto yy57; + if (yych <= '.') goto yy602; + goto yy57; yy736: YYDEBUG(736, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy601; - goto yy738; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy602; + goto yy739; } else { - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy738; + goto yy57; } yy737: YYDEBUG(737, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy601; - if (yych >= '/') goto yy56; + 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 yy56; - if (yych >= ':') goto yy56; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy602; + if (yych >= '/') goto yy57; +yy739: YYDEBUG(739, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy610; - goto yy56; -yy740: + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(740, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy784; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy782; - goto yy60; + 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 yy750; - case '1': goto yy751; + case '0': goto yy751; + case '1': goto yy752; case '2': case '3': case '4': @@ -12108,253 +12331,253 @@ yy741: case '6': case '7': case '8': - case '9': goto yy752; + case '9': goto yy753; case 'A': - case 'a': goto yy745; + case 'a': goto yy746; case 'D': - case 'd': goto yy749; + case 'd': goto yy750; case 'F': - case 'f': goto yy743; + case 'f': goto yy744; case 'J': - case 'j': goto yy742; + case 'j': goto yy743; case 'M': - case 'm': goto yy744; + case 'm': goto yy745; case 'N': - case 'n': goto yy748; + case 'n': goto yy749; case 'O': - case 'o': goto yy747; + case 'o': goto yy748; case 'S': - case 's': goto yy746; - default: goto yy56; + case 's': goto yy747; + default: goto yy57; } -yy742: - YYDEBUG(742, *YYCURSOR); +yy743: + YYDEBUG(743, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy781; - if (yych <= 'T') goto yy56; - goto yy780; + if (yych == 'A') goto yy782; + if (yych <= 'T') goto yy57; + goto yy781; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy781; + if (yych <= '`') goto yy57; + goto yy782; } else { - if (yych == 'u') goto yy780; - goto yy56; + if (yych == 'u') goto yy781; + goto yy57; } } -yy743: - YYDEBUG(743, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy779; - if (yych == 'e') goto yy779; - goto yy56; yy744: YYDEBUG(744, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy778; - if (yych == 'a') goto yy778; - goto yy56; + 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 yy777; - if (yych <= 'T') goto yy56; - goto yy776; + if (yych == 'P') goto yy778; + if (yych <= 'T') goto yy57; + goto yy777; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy777; + if (yych <= 'o') goto yy57; + goto yy778; } else { - if (yych == 'u') goto yy776; - goto yy56; + if (yych == 'u') goto yy777; + goto yy57; } } -yy746: - YYDEBUG(746, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy774; - if (yych == 'e') goto yy774; - goto yy56; yy747: YYDEBUG(747, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy773; - if (yych == 'c') goto yy773; - goto yy56; + if (yych == 'E') goto yy775; + if (yych == 'e') goto yy775; + goto yy57; yy748: YYDEBUG(748, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy772; - if (yych == 'o') goto yy772; - goto yy56; + if (yych == 'C') goto yy774; + if (yych == 'c') goto yy774; + goto yy57; yy749: YYDEBUG(749, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy764; - if (yych == 'e') goto yy764; - goto yy56; + if (yych == 'O') goto yy773; + if (yych == 'o') goto yy773; + goto yy57; yy750: YYDEBUG(750, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy757; - goto yy56; + if (yych == 'E') goto yy765; + if (yych == 'e') goto yy765; + goto yy57; yy751: YYDEBUG(751, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy757; - goto yy56; + if (yych == '-') goto yy754; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy758; + goto yy57; yy752: YYDEBUG(752, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '-') goto yy56; + if (yych == '-') goto yy754; + if (yych <= '/') goto yy57; + if (yych <= '2') goto yy758; + goto yy57; yy753: YYDEBUG(753, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy754; - if (yych <= '3') goto yy755; - if (yych <= '9') goto yy756; - goto yy56; + 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 yy656; - if (yych <= '9') goto yy756; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy757; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy755: - YYDEBUG(755, *YYCURSOR); +yy756: + YYDEBUG(756, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '1') goto yy756; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '1') goto yy757; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy756: - YYDEBUG(756, *YYCURSOR); +yy757: + YYDEBUG(757, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'q') { - if (yych == 'n') goto yy660; - goto yy656; + if (yych == 'n') goto yy661; + goto yy657; } else { - if (yych <= 'r') goto yy661; - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 'r') goto yy662; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } -yy757: - YYDEBUG(757, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '-') goto yy56; +yy758: YYDEBUG(758, *YYCURSOR); yych = *++YYCURSOR; + if (yych != '-') goto yy57; + YYDEBUG(759, *YYCURSOR); + yych = *++YYCURSOR; if (yych <= '2') { - if (yych <= '/') goto yy56; - if (yych >= '1') goto yy760; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy761; } else { - if (yych <= '3') goto yy761; - if (yych <= '9') goto yy756; - goto yy56; + if (yych <= '3') goto yy762; + if (yych <= '9') goto yy757; + goto yy57; } - YYDEBUG(759, *YYCURSOR); + YYDEBUG(760, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy762; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy763; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy760: - YYDEBUG(760, *YYCURSOR); +yy761: + YYDEBUG(761, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy762; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy763; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy761: - YYDEBUG(761, *YYCURSOR); +yy762: + YYDEBUG(762, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '1') goto yy762; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '1') goto yy763; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy762: - YYDEBUG(762, *YYCURSOR); +yy763: + YYDEBUG(763, *YYCURSOR); yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'q') { - if (yych == 'n') goto yy660; + if (yych == 'n') goto yy661; } else { - if (yych <= 'r') goto yy661; - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; + if (yych <= 'r') goto yy662; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; } -yy763: - YYDEBUG(763, *YYCURSOR); +yy764: + YYDEBUG(764, *YYCURSOR); { DEBUG_OUTPUT("iso8601date2"); TIMELIB_INIT; @@ -12366,44 +12589,44 @@ yy763: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -yy764: - YYDEBUG(764, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy765; - if (yych != 'c') goto yy56; yy765: YYDEBUG(765, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '-') goto yy56; + if (yych == 'C') goto yy766; + if (yych != 'c') goto yy57; yy766: YYDEBUG(766, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy767; - if (yych <= '2') goto yy768; - if (yych <= '3') goto yy769; - goto yy56; + if (yych != '-') goto yy57; yy767: YYDEBUG(767, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy770; - goto yy56; + 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 yy56; - if (yych <= '9') goto yy770; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy771; + goto yy57; yy769: YYDEBUG(769, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy771; + goto yy57; yy770: YYDEBUG(770, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy57; +yy771: YYDEBUG(771, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(772, *YYCURSOR); { DEBUG_OUTPUT("pgtextreverse"); TIMELIB_INIT; @@ -12415,92 +12638,92 @@ yy770: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -yy772: - YYDEBUG(772, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy765; - if (yych == 'v') goto yy765; - goto yy56; yy773: YYDEBUG(773, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy765; - if (yych == 't') goto yy765; - goto yy56; + if (yych == 'V') goto yy766; + if (yych == 'v') goto yy766; + goto yy57; yy774: YYDEBUG(774, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'P') goto yy775; - if (yych != 'p') goto yy56; + if (yych == 'T') goto yy766; + if (yych == 't') goto yy766; + goto yy57; yy775: YYDEBUG(775, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == '-') goto yy766; - goto yy56; - } else { - if (yych <= 'T') goto yy765; - if (yych == 't') goto yy765; - goto yy56; - } + if (yych == 'P') goto yy776; + if (yych != 'p') goto yy57; yy776: YYDEBUG(776, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy765; - if (yych == 'g') goto yy765; - goto yy56; + 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 == 'R') goto yy765; - if (yych == 'r') goto yy765; - goto yy56; + 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 yy765; - if (yych <= 'X') goto yy56; - goto yy765; + if (yych == 'R') goto yy766; + if (yych <= 'X') goto yy57; + goto yy766; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; - goto yy765; + if (yych <= 'q') goto yy57; + goto yy766; } else { - if (yych == 'y') goto yy765; - goto yy56; + if (yych == 'y') goto yy766; + goto yy57; } } -yy779: - YYDEBUG(779, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy765; - if (yych == 'b') goto yy765; - goto yy56; 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 yy765; - if (yych <= 'M') goto yy56; - goto yy765; + if (yych == 'L') goto yy766; + if (yych <= 'M') goto yy57; + goto yy766; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy765; + if (yych <= 'k') goto yy57; + goto yy766; } else { - if (yych == 'n') goto yy765; - goto yy56; + if (yych == 'n') goto yy766; + goto yy57; } } -yy781: - YYDEBUG(781, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy765; - if (yych == 'n') goto yy765; - goto yy56; 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); @@ -12532,26 +12755,26 @@ yy782: case 's': case 't': case 'w': - case 'y': goto yy790; - case '-': goto yy787; - case '.': goto yy791; - case '/': goto yy788; - case '0': goto yy804; - case '1': goto yy805; - case '2': goto yy807; - case '3': goto yy808; + 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 yy54; - case ':': goto yy806; - case 'W': goto yy809; - default: goto yy783; + case '9': goto yy55; + case ':': goto yy807; + case 'W': goto yy810; + default: goto yy784; } -yy783: - YYDEBUG(783, *YYCURSOR); +yy784: + YYDEBUG(784, *YYCURSOR); { DEBUG_OUTPUT("year4"); TIMELIB_INIT; @@ -12559,13 +12782,13 @@ yy783: TIMELIB_DEINIT; return TIMELIB_CLF; } -yy784: - YYDEBUG(784, *YYCURSOR); +yy785: + YYDEBUG(785, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { - case '0': goto yy785; - case '1': goto yy786; + case '0': goto yy786; + case '1': goto yy787; case '2': case '3': case '4': @@ -12573,46 +12796,46 @@ yy784: case '6': case '7': case '8': - case '9': goto yy752; + case '9': goto yy753; case 'A': - case 'a': goto yy745; + case 'a': goto yy746; case 'D': - case 'd': goto yy749; + case 'd': goto yy750; case 'F': - case 'f': goto yy743; + case 'f': goto yy744; case 'J': - case 'j': goto yy742; + case 'j': goto yy743; case 'M': - case 'm': goto yy744; + case 'm': goto yy745; case 'N': - case 'n': goto yy748; + case 'n': goto yy749; case 'O': - case 'o': goto yy747; + case 'o': goto yy748; case 'S': - case 's': goto yy746; - default: goto yy56; + case 's': goto yy747; + default: goto yy57; } -yy785: - YYDEBUG(785, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy752; - goto yy56; yy786: YYDEBUG(786, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy752; - goto yy56; + 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 yy972; - case '1': goto yy974; + case '0': goto yy973; + case '1': goto yy975; case '2': case '3': case '4': @@ -12620,95 +12843,95 @@ yy787: case '6': case '7': case '8': - case '9': goto yy975; + case '9': goto yy976; case 'A': - case 'a': goto yy966; + case 'a': goto yy967; case 'D': - case 'd': goto yy970; + case 'd': goto yy971; case 'F': - case 'f': goto yy964; + case 'f': goto yy965; case 'J': - case 'j': goto yy963; + case 'j': goto yy964; case 'M': - case 'm': goto yy965; + case 'm': goto yy966; case 'N': - case 'n': goto yy969; + case 'n': goto yy970; case 'O': - case 'o': goto yy968; + case 'o': goto yy969; case 'S': - case 's': goto yy967; - case 'W': goto yy971; - default: goto yy938; + case 's': goto yy968; + case 'W': goto yy972; + default: goto yy939; } -yy788: - YYDEBUG(788, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy946; - if (yych <= '1') goto yy947; - if (yych <= '9') goto yy948; - goto yy56; 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; -yy790: - YYDEBUG(790, *YYCURSOR); +yy791: + YYDEBUG(791, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': - case ' ': goto yy789; + case ' ': goto yy790; case '-': - case '.': goto yy937; + case '.': goto yy938; case 'A': - case 'a': goto yy799; + case 'a': goto yy800; case 'D': - case 'd': goto yy803; + case 'd': goto yy804; case 'F': - case 'f': goto yy797; + case 'f': goto yy798; case 'H': - case 'h': goto yy63; - case 'I': goto yy792; + case 'h': goto yy64; + case 'I': goto yy793; case 'J': - case 'j': goto yy796; + case 'j': goto yy797; case 'M': - case 'm': goto yy798; + case 'm': goto yy799; case 'N': - case 'n': goto yy802; + case 'n': goto yy803; case 'O': - case 'o': goto yy801; + case 'o': goto yy802; case 'S': - case 's': goto yy800; + case 's': goto yy801; case 'T': - case 't': goto yy68; - case 'V': goto yy794; + case 't': goto yy69; + case 'V': goto yy795; case 'W': - case 'w': goto yy67; - case 'X': goto yy795; + case 'w': goto yy68; + case 'X': goto yy796; case 'Y': - case 'y': goto yy66; - default: goto yy56; + case 'y': goto yy67; + default: goto yy57; } -yy791: - YYDEBUG(791, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy938; - if (yych <= '0') goto yy930; - if (yych <= '2') goto yy931; - if (yych <= '3') goto yy932; - goto yy938; 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 yy929; + if (yych == 'I') goto yy930; } else { - if (yych == 'W') goto yy793; - if (yych <= 'X') goto yy883; + if (yych == 'W') goto yy794; + if (yych <= 'X') goto yy884; } -yy793: - YYDEBUG(793, *YYCURSOR); +yy794: + YYDEBUG(794, *YYCURSOR); { DEBUG_OUTPUT("datenodayrev"); TIMELIB_INIT; @@ -12720,220 +12943,220 @@ yy793: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -yy794: - YYDEBUG(794, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy927; - goto yy793; yy795: YYDEBUG(795, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy926; - goto yy793; + 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 yy919; - if (yych <= 'T') goto yy56; - goto yy918; + if (yych == 'A') goto yy920; + if (yych <= 'T') goto yy57; + goto yy919; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy919; + if (yych <= '`') goto yy57; + goto yy920; } else { - if (yych == 'u') goto yy918; - goto yy56; + if (yych == 'u') goto yy919; + goto yy57; } } -yy797: - YYDEBUG(797, *YYCURSOR); +yy798: + YYDEBUG(798, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'N') { - if (yych == 'E') goto yy912; - goto yy56; + if (yych == 'E') goto yy913; + goto yy57; } else { - if (yych <= 'O') goto yy98; - if (yych <= 'Q') goto yy56; - goto yy97; + if (yych <= 'O') goto yy99; + if (yych <= 'Q') goto yy57; + goto yy98; } } else { if (yych <= 'n') { - if (yych == 'e') goto yy912; - goto yy56; + if (yych == 'e') goto yy913; + goto yy57; } else { - if (yych <= 'o') goto yy98; - if (yych == 'r') goto yy97; - goto yy56; + if (yych <= 'o') goto yy99; + if (yych == 'r') goto yy98; + goto yy57; } } -yy798: - YYDEBUG(798, *YYCURSOR); +yy799: + YYDEBUG(799, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'H') { - if (yych == 'A') goto yy909; - goto yy56; + if (yych == 'A') goto yy910; + goto yy57; } else { - if (yych <= 'I') goto yy117; - if (yych <= 'N') goto yy56; - goto yy116; + if (yych <= 'I') goto yy118; + if (yych <= 'N') goto yy57; + goto yy117; } } else { if (yych <= 'h') { - if (yych == 'a') goto yy909; - goto yy56; + if (yych == 'a') goto yy910; + goto yy57; } else { - if (yych <= 'i') goto yy117; - if (yych == 'o') goto yy116; - goto yy56; + if (yych <= 'i') goto yy118; + if (yych == 'o') goto yy117; + goto yy57; } } -yy799: - YYDEBUG(799, *YYCURSOR); +yy800: + YYDEBUG(800, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'P') goto yy903; - if (yych <= 'T') goto yy56; - goto yy902; + if (yych == 'P') goto yy904; + if (yych <= 'T') goto yy57; + goto yy903; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy903; + if (yych <= 'o') goto yy57; + goto yy904; } else { - if (yych == 'u') goto yy902; - goto yy56; + if (yych == 'u') goto yy903; + goto yy57; } } -yy800: - YYDEBUG(800, *YYCURSOR); +yy801: + YYDEBUG(801, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy895; - if (yych <= 'T') goto yy56; - goto yy125; + if (yych <= 'E') goto yy896; + if (yych <= 'T') goto yy57; + goto yy126; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy126; - goto yy56; + if (yych == 'a') goto yy127; + goto yy57; } else { - if (yych <= 'e') goto yy895; - if (yych == 'u') goto yy125; - goto yy56; + if (yych <= 'e') goto yy896; + if (yych == 'u') goto yy126; + goto yy57; } } -yy801: - YYDEBUG(801, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy890; - if (yych == 'c') goto yy890; - goto yy56; yy802: YYDEBUG(802, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy884; - if (yych == 'o') goto yy884; - goto yy56; + 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 yy113; - if (yych <= 'D') goto yy56; - goto yy877; + if (yych == 'A') goto yy114; + if (yych <= 'D') goto yy57; + goto yy878; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy113; + if (yych <= '`') goto yy57; + goto yy114; } else { - if (yych == 'e') goto yy877; - goto yy56; + if (yych == 'e') goto yy878; + goto yy57; } } -yy804: - YYDEBUG(804, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '0') goto yy874; - if (yych <= '9') goto yy875; - goto yy60; yy805: YYDEBUG(805, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '2') goto yy843; - if (yych <= '9') goto yy822; - goto yy60; + 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 yy56; - if (yych <= '0') goto yy823; - if (yych <= '1') goto yy824; - goto yy56; + 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 yy60; - if (yych <= '9') goto yy822; - goto yy60; + 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 yy60; - if (yych <= '5') goto yy818; - if (yych <= '6') goto yy819; - if (yych <= '9') goto yy54; - goto yy60; + 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 yy56; - if (yych <= '0') goto yy810; - if (yych <= '4') goto yy811; - goto yy812; + if (yych <= '/') goto yy57; + if (yych <= '0') goto yy811; + if (yych <= '4') goto yy812; + goto yy813; } else { if (yych <= 'E') { - if (yych <= 'D') goto yy56; - goto yy82; + if (yych <= 'D') goto yy57; + goto yy83; } else { - if (yych == 'e') goto yy82; - goto yy56; + if (yych == 'e') goto yy83; + goto yy57; } } -yy810: - YYDEBUG(810, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '0') goto yy56; - if (yych <= '9') goto yy813; - goto yy56; yy811: YYDEBUG(811, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy813; - goto yy56; + if (yych <= '0') goto yy57; + if (yych <= '9') goto yy814; + goto yy57; yy812: YYDEBUG(812, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '4') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy814; + goto yy57; yy813: YYDEBUG(813, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy815; - if (yych <= '/') goto yy814; - if (yych <= '7') goto yy816; + 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); { timelib_sll w, d; DEBUG_OUTPUT("isoweek"); @@ -12951,15 +13174,15 @@ yy814: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -yy815: - YYDEBUG(815, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '8') goto yy56; yy816: YYDEBUG(816, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '8') goto yy57; +yy817: YYDEBUG(817, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(818, *YYCURSOR); { timelib_sll w, d; DEBUG_OUTPUT("isoweekday"); @@ -12977,69 +13200,69 @@ yy816: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -yy818: - YYDEBUG(818, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy820; - goto yy60; yy819: YYDEBUG(819, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '6') goto yy820; - if (yych <= '9') goto yy54; - goto yy60; + 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] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych >= ' ') goto yy60; + if (yych == '\t') goto yy61; + if (yych >= ' ') goto yy61; } else { - if (yych == 'D') goto yy60; - if (yych >= 'F') goto yy60; + if (yych == 'D') goto yy61; + if (yych >= 'F') goto yy61; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy60; - if (yych >= 'M') goto yy60; + if (yych == 'H') goto yy61; + if (yych >= 'M') goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - if (yych >= 'W') goto yy60; + 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 yy60; - if (yych >= 'd') goto yy60; + if (yych == 'Y') goto yy61; + if (yych >= 'd') goto yy61; } else { - if (yych == 'f') goto yy60; - if (yych >= 'h') goto yy60; + if (yych == 'f') goto yy61; + if (yych >= 'h') goto yy61; } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych >= 's') goto yy60; + if (yych == 'm') goto yy61; + if (yych >= 's') goto yy61; } else { if (yych <= 'w') { - if (yych >= 'w') goto yy60; + if (yych >= 'w') goto yy61; } else { - if (yych == 'y') goto yy60; + if (yych == 'y') goto yy61; } } } } -yy821: - YYDEBUG(821, *YYCURSOR); +yy822: + YYDEBUG(822, *YYCURSOR); { DEBUG_OUTPUT("pgydotd"); TIMELIB_INIT; @@ -13051,108 +13274,108 @@ yy821: TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -yy822: - YYDEBUG(822, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy820; - goto yy60; yy823: YYDEBUG(823, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy825; - goto yy56; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy821; + goto yy61; yy824: YYDEBUG(824, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy826; + goto yy57; yy825: YYDEBUG(825, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '3') goto yy57; +yy826: YYDEBUG(826, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy827; - if (yych <= '2') goto yy828; - if (yych <= '3') goto yy829; - goto yy56; -yy827: + if (yych != ':') goto yy57; YYDEBUG(827, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy830; - goto yy56; + 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 yy56; - if (yych <= '9') goto yy830; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy831; + goto yy57; yy829: YYDEBUG(829, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy831; + goto yy57; yy830: YYDEBUG(830, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ' ') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy57; +yy831: YYDEBUG(831, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy832; - if (yych <= '2') goto yy833; - goto yy56; -yy832: + if (yych != ' ') goto yy57; YYDEBUG(832, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy834; - goto yy56; + 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 yy56; - if (yych >= '5') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy835; + goto yy57; yy834: YYDEBUG(834, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '5') goto yy57; +yy835: YYDEBUG(835, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '6') goto yy56; + if (yych != ':') goto yy57; YYDEBUG(836, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; YYDEBUG(837, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(838, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy839; - if (yych <= '6') goto yy840; - goto yy56; -yy839: + if (yych != ':') goto yy57; YYDEBUG(839, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy840; + if (yych <= '6') goto yy841; + goto yy57; yy840: YYDEBUG(840, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '0') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy842; + goto yy57; yy841: YYDEBUG(841, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych != '0') goto yy57; yy842: YYDEBUG(842, *YYCURSOR); + ++YYCURSOR; +yy843: + YYDEBUG(843, *YYCURSOR); { int tz_not_found; DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); @@ -13177,267 +13400,267 @@ yy842: TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -yy843: - YYDEBUG(843, *YYCURSOR); +yy844: + YYDEBUG(844, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '2') { - if (yych <= '/') goto yy60; - if (yych >= '1') goto yy845; + if (yych <= '/') goto yy61; + if (yych >= '1') goto yy846; } else { - if (yych <= '3') goto yy846; - if (yych <= '9') goto yy820; - goto yy60; + if (yych <= '3') goto yy847; + if (yych <= '9') goto yy821; + goto yy61; } -yy844: - YYDEBUG(844, *YYCURSOR); +yy845: + YYDEBUG(845, *YYCURSOR); yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy821; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy822; + goto yy61; } else { - if (yych <= '/') goto yy821; - if (yych <= '9') goto yy847; - if (yych <= 'C') goto yy821; - goto yy60; + if (yych <= '/') goto yy822; + if (yych <= '9') goto yy848; + if (yych <= 'C') goto yy822; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy821; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy822; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy821; - goto yy60; + if (yych <= 'L') goto yy822; + goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - goto yy821; + if (yych <= 'R') goto yy822; + if (yych <= 'T') goto yy61; + goto yy822; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy821; - if (yych <= 'Y') goto yy60; - goto yy821; + if (yych == 'X') goto yy822; + if (yych <= 'Y') goto yy61; + goto yy822; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy821; + if (yych <= 'd') goto yy61; + goto yy822; } else { - if (yych == 'g') goto yy821; - goto yy60; + if (yych == 'g') goto yy822; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy821; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy822; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy821; - goto yy60; + if (yych <= 'v') goto yy822; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy821; + if (yych == 'y') goto yy61; + goto yy822; } } } } -yy845: - YYDEBUG(845, *YYCURSOR); +yy846: + YYDEBUG(846, *YYCURSOR); yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy821; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy822; + goto yy61; } else { - if (yych <= '/') goto yy821; - if (yych <= '9') goto yy847; - if (yych <= 'C') goto yy821; - goto yy60; + if (yych <= '/') goto yy822; + if (yych <= '9') goto yy848; + if (yych <= 'C') goto yy822; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy821; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy822; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy821; - goto yy60; + if (yych <= 'L') goto yy822; + goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - goto yy821; + if (yych <= 'R') goto yy822; + if (yych <= 'T') goto yy61; + goto yy822; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy821; - if (yych <= 'Y') goto yy60; - goto yy821; + if (yych == 'X') goto yy822; + if (yych <= 'Y') goto yy61; + goto yy822; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy821; + if (yych <= 'd') goto yy61; + goto yy822; } else { - if (yych == 'g') goto yy821; - goto yy60; + if (yych == 'g') goto yy822; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy821; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy822; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy821; - goto yy60; + if (yych <= 'v') goto yy822; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy821; + if (yych == 'y') goto yy61; + goto yy822; } } } } -yy846: - YYDEBUG(846, *YYCURSOR); +yy847: + YYDEBUG(847, *YYCURSOR); yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy821; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy822; + goto yy61; } else { if (yych <= '1') { - if (yych <= '/') goto yy821; + if (yych <= '/') goto yy822; } else { - if (yych <= '9') goto yy54; - if (yych <= 'C') goto yy821; - goto yy60; + if (yych <= '9') goto yy55; + if (yych <= 'C') goto yy822; + goto yy61; } } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy821; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy822; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy821; - goto yy60; + if (yych <= 'L') goto yy822; + goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - goto yy821; + if (yych <= 'R') goto yy822; + if (yych <= 'T') goto yy61; + goto yy822; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy821; - if (yych <= 'Y') goto yy60; - goto yy821; + if (yych == 'X') goto yy822; + if (yych <= 'Y') goto yy61; + goto yy822; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy821; + if (yych <= 'd') goto yy61; + goto yy822; } else { - if (yych == 'g') goto yy821; - goto yy60; + if (yych == 'g') goto yy822; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy821; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy822; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy821; - goto yy60; + if (yych <= 'v') goto yy822; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy821; + if (yych == 'y') goto yy61; + goto yy822; } } } } -yy847: - YYDEBUG(847, *YYCURSOR); +yy848: + YYDEBUG(848, *YYCURSOR); yyaccept = 19; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy59; - if (yych >= ' ') goto yy59; + if (yych == '\t') goto yy60; + if (yych >= ' ') goto yy60; } else { - if (yych == 'D') goto yy64; - if (yych >= 'F') goto yy65; + if (yych == 'D') goto yy65; + if (yych >= 'F') goto yy66; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy63; - if (yych >= 'M') goto yy62; + if (yych == 'H') goto yy64; + if (yych >= 'M') goto yy63; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy61; + if (yych >= 'S') goto yy62; } else { - if (yych <= 'T') goto yy849; - if (yych >= 'W') goto yy67; + if (yych <= 'T') goto yy850; + if (yych >= 'W') goto yy68; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy66; - if (yych >= 'd') goto yy64; + if (yych == 'Y') goto yy67; + if (yych >= 'd') goto yy65; } else { if (yych <= 'f') { - if (yych >= 'f') goto yy65; + if (yych >= 'f') goto yy66; } else { - if (yych == 'h') goto yy63; + if (yych == 'h') goto yy64; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy62; - if (yych <= 'r') goto yy848; - if (yych <= 's') goto yy61; - goto yy850; + 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 yy67; + if (yych >= 'w') goto yy68; } else { - if (yych == 'y') goto yy66; + if (yych == 'y') goto yy67; } } } } -yy848: - YYDEBUG(848, *YYCURSOR); +yy849: + YYDEBUG(849, *YYCURSOR); { DEBUG_OUTPUT("datenocolon"); TIMELIB_INIT; @@ -13448,925 +13671,925 @@ yy848: TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -yy849: - YYDEBUG(849, *YYCURSOR); +yy850: + YYDEBUG(850, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= '2') { - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy864; - goto yy865; + if (yych <= '/') goto yy57; + if (yych <= '1') goto yy865; + goto yy866; } else { - if (yych <= '9') goto yy866; - if (yych <= 'G') goto yy56; - goto yy69; + if (yych <= '9') goto yy867; + if (yych <= 'G') goto yy57; + goto yy70; } } else { if (yych <= 'g') { - if (yych == 'U') goto yy70; - goto yy56; + if (yych == 'U') goto yy71; + goto yy57; } else { - if (yych <= 'h') goto yy69; - if (yych == 'u') goto yy70; - goto yy56; + if (yych <= 'h') goto yy70; + if (yych == 'u') goto yy71; + goto yy57; } } -yy850: - YYDEBUG(850, *YYCURSOR); +yy851: + YYDEBUG(851, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= '2') { - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy852; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy853; } else { - if (yych <= '9') goto yy853; - if (yych <= 'G') goto yy56; - goto yy69; + if (yych <= '9') goto yy854; + if (yych <= 'G') goto yy57; + goto yy70; } } else { if (yych <= 'g') { - if (yych == 'U') goto yy70; - goto yy56; + if (yych == 'U') goto yy71; + goto yy57; } else { - if (yych <= 'h') goto yy69; - if (yych == 'u') goto yy70; - goto yy56; + if (yych <= 'h') goto yy70; + if (yych == 'u') goto yy71; + goto yy57; } } - YYDEBUG(851, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy858; - if (yych <= '9') goto yy853; - goto yy56; -yy852: YYDEBUG(852, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '4') goto yy858; - if (yych <= '5') goto yy854; - goto yy56; + 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 yy56; - if (yych >= '6') goto yy56; + 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 yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; yy855: YYDEBUG(855, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy856; - if (yych <= '6') goto yy857; - goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy856: YYDEBUG(856, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy857; + if (yych <= '6') goto yy858; + goto yy57; yy857: YYDEBUG(857, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '0') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy842; + goto yy57; yy858: YYDEBUG(858, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy859; - if (yych <= '9') goto yy855; - goto yy56; + if (yych == '0') goto yy842; + goto yy57; yy859: YYDEBUG(859, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '5') goto yy860; - if (yych <= '6') goto yy861; - if (yych <= '9') goto yy855; - goto yy56; + if (yych <= '9') goto yy856; + goto yy57; yy860: YYDEBUG(860, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy862; - if (yych <= '6') goto yy863; - if (yych <= '9') goto yy841; - goto yy56; + 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 yy56; - if (yych <= '0') goto yy862; - if (yych <= '5') goto yy856; - if (yych <= '6') goto yy857; - goto yy56; + 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 yy842; - if (yych <= '9') goto yy841; - goto yy842; + 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 == '0') goto yy841; - goto yy842; + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy842; + goto yy843; yy864: YYDEBUG(864, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy873; - if (yych <= '9') goto yy866; - if (yych <= ':') goto yy867; - goto yy56; + if (yych == '0') goto yy842; + goto yy843; yy865: YYDEBUG(865, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy56; - if (yych <= '4') goto yy873; - goto yy854; - } else { - if (yych == ':') goto yy867; - goto yy56; - } + 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 <= '/') goto yy56; - if (yych <= '5') goto yy854; - if (yych != ':') goto yy56; + 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 yy56; - if (yych >= '6') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy855; + if (yych != ':') goto yy57; +yy868: YYDEBUG(868, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; YYDEBUG(869, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(870, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy871; - if (yych <= '6') goto yy872; - goto yy56; -yy871: + if (yych != ':') goto yy57; YYDEBUG(871, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy872; + if (yych <= '6') goto yy873; + goto yy57; yy872: YYDEBUG(872, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '0') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy842; + goto yy57; yy873: YYDEBUG(873, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy859; - if (yych <= '9') goto yy855; - if (yych <= ':') goto yy867; - goto yy56; + if (yych == '0') goto yy842; + goto yy57; yy874: YYDEBUG(874, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy60; - if (yych <= '0') goto yy876; - goto yy845; - } else { - if (yych <= '3') goto yy846; - if (yych <= '9') goto yy820; - goto yy60; - } + 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 yy60; - if (yych <= '0') goto yy844; - goto yy845; + if (yych <= '/') goto yy61; + if (yych <= '0') goto yy877; + goto yy846; } else { - if (yych <= '3') goto yy846; - if (yych <= '9') goto yy820; - goto yy60; + if (yych <= '3') goto yy847; + if (yych <= '9') goto yy821; + goto yy61; } yy876: YYDEBUG(876, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy847; - goto yy60; + 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 == 'C') goto yy878; - if (yych != 'c') goto yy56; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy848; + goto yy61; yy878: YYDEBUG(878, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy879; - if (yych != 'e') goto yy793; + yych = *++YYCURSOR; + if (yych == 'C') goto yy879; + if (yych != 'c') goto yy57; yy879: YYDEBUG(879, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy880; - if (yych != 'm') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy880; + if (yych != 'e') goto yy794; yy880: YYDEBUG(880, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy881; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy881; + if (yych != 'm') goto yy57; yy881: YYDEBUG(881, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy882; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy882; + if (yych != 'b') goto yy57; yy882: YYDEBUG(882, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych != 'r') goto yy56; + if (yych == 'E') goto yy883; + if (yych != 'e') goto yy57; yy883: YYDEBUG(883, *YYCURSOR); yych = *++YYCURSOR; - goto yy793; + if (yych == 'R') goto yy884; + if (yych != 'r') goto yy57; yy884: YYDEBUG(884, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'V') goto yy885; - if (yych != 'v') goto yy56; + goto yy794; yy885: YYDEBUG(885, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy886; - if (yych != 'e') goto yy793; + yych = *++YYCURSOR; + if (yych == 'V') goto yy886; + if (yych != 'v') goto yy57; yy886: YYDEBUG(886, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy887; - if (yych != 'm') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy887; + if (yych != 'e') goto yy794; yy887: YYDEBUG(887, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy888; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy888; + if (yych != 'm') goto yy57; yy888: YYDEBUG(888, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy889; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy889; + if (yych != 'b') goto yy57; yy889: YYDEBUG(889, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych == 'r') goto yy883; - goto yy56; + if (yych == 'E') goto yy890; + if (yych != 'e') goto yy57; yy890: YYDEBUG(890, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy891; - if (yych != 't') goto yy56; + if (yych == 'R') goto yy884; + if (yych == 'r') goto yy884; + goto yy57; yy891: YYDEBUG(891, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'O') goto yy892; - if (yych != 'o') goto yy793; + yych = *++YYCURSOR; + if (yych == 'T') goto yy892; + if (yych != 't') goto yy57; yy892: YYDEBUG(892, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy893; - if (yych != 'b') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'O') goto yy893; + if (yych != 'o') goto yy794; yy893: YYDEBUG(893, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy894; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy894; + if (yych != 'b') goto yy57; yy894: YYDEBUG(894, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych == 'r') goto yy883; - goto yy56; + 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 yy128; - if (yych <= 'O') goto yy56; + if (yych == 'C') goto yy129; + if (yych <= 'O') goto yy57; } else { if (yych <= 'c') { - if (yych <= 'b') goto yy56; - goto yy128; + if (yych <= 'b') goto yy57; + goto yy129; } else { - if (yych != 'p') goto yy56; + if (yych != 'p') goto yy57; } } -yy896: - YYDEBUG(896, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy897; - if (yych != 't') goto yy793; yy897: YYDEBUG(897, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy898; - if (yych != 'e') goto yy793; + yych = *++YYCURSOR; + if (yych == 'T') goto yy898; + if (yych != 't') goto yy794; yy898: YYDEBUG(898, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy899; - if (yych != 'm') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy899; + if (yych != 'e') goto yy794; yy899: YYDEBUG(899, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy900; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy900; + if (yych != 'm') goto yy57; yy900: YYDEBUG(900, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy901; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy901; + if (yych != 'b') goto yy57; yy901: YYDEBUG(901, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych == 'r') goto yy883; - goto yy56; + if (yych == 'E') goto yy902; + if (yych != 'e') goto yy57; yy902: YYDEBUG(902, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy906; - if (yych == 'g') goto yy906; - goto yy56; + if (yych == 'R') goto yy884; + if (yych == 'r') goto yy884; + goto yy57; yy903: YYDEBUG(903, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy904; - if (yych != 'r') goto yy56; + if (yych == 'G') goto yy907; + if (yych == 'g') goto yy907; + goto yy57; yy904: YYDEBUG(904, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'I') goto yy905; - if (yych != 'i') goto yy793; + yych = *++YYCURSOR; + if (yych == 'R') goto yy905; + if (yych != 'r') goto yy57; yy905: YYDEBUG(905, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy883; - if (yych == 'l') goto yy883; - goto yy56; -yy906: - YYDEBUG(906, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy907; - if (yych != 'u') goto yy793; + 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); - yych = *++YYCURSOR; - if (yych == 'S') goto yy908; - if (yych != 's') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy908; + if (yych != 'u') goto yy794; yy908: YYDEBUG(908, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy883; - if (yych == 't') goto yy883; - goto yy56; + 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 yy910; - if (yych <= 'X') goto yy56; - goto yy883; + if (yych == 'R') goto yy911; + if (yych <= 'X') goto yy57; + goto yy884; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy883; - goto yy56; + if (yych == 'y') goto yy884; + goto yy57; } } -yy910: - YYDEBUG(910, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'C') goto yy911; - if (yych != 'c') goto yy793; yy911: YYDEBUG(911, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy883; - if (yych == 'h') goto yy883; - goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'C') goto yy912; + if (yych != 'c') goto yy794; yy912: YYDEBUG(912, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy913; - if (yych != 'b') goto yy56; + if (yych == 'H') goto yy884; + if (yych == 'h') goto yy884; + goto yy57; yy913: YYDEBUG(913, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy914; - if (yych != 'r') goto yy793; + yych = *++YYCURSOR; + if (yych == 'B') goto yy914; + if (yych != 'b') goto yy57; yy914: YYDEBUG(914, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy915; - if (yych != 'u') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'R') goto yy915; + if (yych != 'r') goto yy794; yy915: YYDEBUG(915, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy916; - if (yych != 'a') goto yy56; + if (yych == 'U') goto yy916; + if (yych != 'u') goto yy57; yy916: YYDEBUG(916, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy917; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy917; + if (yych != 'a') goto yy57; yy917: YYDEBUG(917, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy56; + 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 yy925; - if (yych <= 'M') goto yy56; - goto yy924; + if (yych == 'L') goto yy926; + if (yych <= 'M') goto yy57; + goto yy925; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy925; + if (yych <= 'k') goto yy57; + goto yy926; } else { - if (yych == 'n') goto yy924; - goto yy56; + if (yych == 'n') goto yy925; + goto yy57; } } -yy919: - YYDEBUG(919, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy920; - if (yych != 'n') goto yy56; yy920: YYDEBUG(920, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy921; - if (yych != 'u') goto yy793; + yych = *++YYCURSOR; + if (yych == 'N') goto yy921; + if (yych != 'n') goto yy57; yy921: YYDEBUG(921, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy922; - if (yych != 'a') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy922; + if (yych != 'u') goto yy794; yy922: YYDEBUG(922, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy923; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy923; + if (yych != 'a') goto yy57; yy923: YYDEBUG(923, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy56; + if (yych == 'R') goto yy924; + if (yych != 'r') goto yy57; yy924: YYDEBUG(924, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy883; - if (yych == 'e') goto yy883; - goto yy793; + if (yych == 'Y') goto yy884; + if (yych == 'y') goto yy884; + goto yy57; yy925: YYDEBUG(925, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy793; + if (yych == 'E') goto yy884; + if (yych == 'e') goto yy884; + goto yy794; yy926: YYDEBUG(926, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy883; - goto yy793; + if (yych == 'Y') goto yy884; + if (yych == 'y') goto yy884; + goto yy794; yy927: YYDEBUG(927, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'I') goto yy793; + if (yych == 'I') goto yy884; + goto yy794; +yy928: YYDEBUG(928, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy883; - goto yy793; -yy929: + if (yych != 'I') goto yy794; YYDEBUG(929, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy883; - goto yy793; + if (yych == 'I') goto yy884; + goto yy794; yy930: YYDEBUG(930, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy945; - if (yych <= '9') goto yy944; - goto yy56; + if (yych == 'I') goto yy884; + goto yy794; yy931: YYDEBUG(931, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy943; - goto yy56; + 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 yy56; - if (yych <= '5') goto yy941; - if (yych <= '6') goto yy940; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy944; + goto yy57; yy933: YYDEBUG(933, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy912; - if (yych == 'e') goto yy912; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy942; + if (yych <= '6') goto yy941; + goto yy57; yy934: YYDEBUG(934, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy909; - if (yych == 'a') goto yy909; - goto yy56; + if (yych == 'E') goto yy913; + if (yych == 'e') goto yy913; + goto yy57; yy935: YYDEBUG(935, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy939; - if (yych == 'e') goto yy939; - goto yy56; + if (yych == 'A') goto yy910; + if (yych == 'a') goto yy910; + goto yy57; yy936: YYDEBUG(936, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy877; - if (yych == 'e') goto yy877; - goto yy56; + 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; -yy938: - YYDEBUG(938, *YYCURSOR); +yy939: + YYDEBUG(939, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': case ' ': case '-': - case '.': goto yy937; + case '.': goto yy938; case 'A': - case 'a': goto yy799; + case 'a': goto yy800; case 'D': - case 'd': goto yy936; + case 'd': goto yy937; case 'F': - case 'f': goto yy933; - case 'I': goto yy792; + case 'f': goto yy934; + case 'I': goto yy793; case 'J': - case 'j': goto yy796; + case 'j': goto yy797; case 'M': - case 'm': goto yy934; + case 'm': goto yy935; case 'N': - case 'n': goto yy802; + case 'n': goto yy803; case 'O': - case 'o': goto yy801; + case 'o': goto yy802; case 'S': - case 's': goto yy935; - case 'V': goto yy794; - case 'X': goto yy795; - default: goto yy56; + case 's': goto yy936; + case 'V': goto yy795; + case 'X': goto yy796; + default: goto yy57; } -yy939: - YYDEBUG(939, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy896; - if (yych == 'p') goto yy896; - goto yy56; yy940: YYDEBUG(940, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '6') goto yy942; - goto yy56; + if (yych == 'P') goto yy897; + if (yych == 'p') goto yy897; + goto yy57; yy941: YYDEBUG(941, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '6') goto yy943; + goto yy57; yy942: YYDEBUG(942, *YYCURSOR); yych = *++YYCURSOR; - goto yy821; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy943: YYDEBUG(943, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy942; - goto yy56; + goto yy822; yy944: YYDEBUG(944, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy942; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy943; + goto yy57; yy945: YYDEBUG(945, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '0') goto yy56; - if (yych <= '9') goto yy942; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy943; + goto yy57; yy946: YYDEBUG(946, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '.') goto yy56; - if (yych <= '/') goto yy949; - if (yych <= '9') goto yy957; - goto yy56; + if (yych <= '0') goto yy57; + if (yych <= '9') goto yy943; + goto yy57; yy947: YYDEBUG(947, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '.') goto yy56; - if (yych <= '/') goto yy949; - if (yych <= '2') goto yy957; - goto yy56; + if (yych <= '.') goto yy57; + if (yych <= '/') goto yy950; + if (yych <= '9') goto yy958; + goto yy57; yy948: YYDEBUG(948, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy56; + if (yych <= '.') goto yy57; + if (yych <= '/') goto yy950; + if (yych <= '2') goto yy958; + goto yy57; yy949: YYDEBUG(949, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy950; - if (yych <= '3') goto yy951; - if (yych <= '9') goto yy952; - goto yy56; + 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 yy454; - if (yych <= '9') goto yy952; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '9') goto yy953; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy951: - YYDEBUG(951, *YYCURSOR); +yy952: + YYDEBUG(952, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '1') goto yy952; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '1') goto yy953; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy952: - YYDEBUG(952, *YYCURSOR); +yy953: + YYDEBUG(953, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'q') { - if (yych == 'n') goto yy954; - goto yy454; + if (yych == 'n') goto yy955; + goto yy455; } else { - if (yych <= 'r') goto yy955; - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 'r') goto yy956; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } -yy953: - YYDEBUG(953, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy453; - goto yy56; yy954: YYDEBUG(954, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy453; - goto yy56; + if (yych == 't') goto yy454; + goto yy57; yy955: YYDEBUG(955, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy453; - goto yy56; + if (yych == 'd') goto yy454; + goto yy57; yy956: YYDEBUG(956, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'h') goto yy453; - goto yy56; + if (yych == 'd') goto yy454; + goto yy57; yy957: YYDEBUG(957, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy56; + 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 yy56; - if (yych >= '1') goto yy960; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy961; } else { - if (yych <= '3') goto yy961; - if (yych <= '9') goto yy952; - goto yy56; + if (yych <= '3') goto yy962; + if (yych <= '9') goto yy953; + goto yy57; } - YYDEBUG(959, *YYCURSOR); + YYDEBUG(960, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '9') goto yy962; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '9') goto yy963; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy960: - YYDEBUG(960, *YYCURSOR); +yy961: + YYDEBUG(961, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '9') goto yy962; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '9') goto yy963; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy961: - YYDEBUG(961, *YYCURSOR); +yy962: + YYDEBUG(962, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '1') goto yy962; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '1') goto yy963; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy962: - YYDEBUG(962, *YYCURSOR); +yy963: + YYDEBUG(963, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == '/') goto yy453; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych == '/') goto yy454; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy963: - YYDEBUG(963, *YYCURSOR); +yy964: + YYDEBUG(964, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy1043; - if (yych <= 'T') goto yy56; - goto yy1042; + if (yych == 'A') goto yy1044; + if (yych <= 'T') goto yy57; + goto yy1043; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy1043; + if (yych <= '`') goto yy57; + goto yy1044; } else { - if (yych == 'u') goto yy1042; - goto yy56; + if (yych == 'u') goto yy1043; + goto yy57; } } -yy964: - YYDEBUG(964, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1040; - if (yych == 'e') goto yy1040; - goto yy56; yy965: YYDEBUG(965, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1037; - if (yych == 'a') goto yy1037; - goto yy56; + 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 yy1034; - if (yych <= 'T') goto yy56; - goto yy1033; + if (yych == 'P') goto yy1035; + if (yych <= 'T') goto yy57; + goto yy1034; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy1034; + if (yych <= 'o') goto yy57; + goto yy1035; } else { - if (yych == 'u') goto yy1033; - goto yy56; + if (yych == 'u') goto yy1034; + goto yy57; } } -yy967: - YYDEBUG(967, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1030; - if (yych == 'e') goto yy1030; - goto yy56; yy968: YYDEBUG(968, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy1028; - if (yych == 'c') goto yy1028; - goto yy56; + if (yych == 'E') goto yy1031; + if (yych == 'e') goto yy1031; + goto yy57; yy969: YYDEBUG(969, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy1026; - if (yych == 'o') goto yy1026; - goto yy56; + if (yych == 'C') goto yy1029; + if (yych == 'c') goto yy1029; + goto yy57; yy970: YYDEBUG(970, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1024; - if (yych == 'e') goto yy1024; - goto yy56; + if (yych == 'O') goto yy1027; + if (yych == 'o') goto yy1027; + goto yy57; yy971: YYDEBUG(971, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy810; - if (yych <= '4') goto yy811; - if (yych <= '5') goto yy812; - goto yy56; + if (yych == 'E') goto yy1025; + if (yych == 'e') goto yy1025; + goto yy57; yy972: YYDEBUG(972, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy976; - if (yych <= '/') goto yy973; - if (yych <= '9') goto yy995; + 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); { DEBUG_OUTPUT("gnudateshorter"); TIMELIB_INIT; @@ -14378,716 +14601,716 @@ yy973: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -yy974: - YYDEBUG(974, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy976; - if (yych <= '/') goto yy973; - if (yych <= '2') goto yy995; - goto yy973; yy975: YYDEBUG(975, *YYCURSOR); yyaccept = 22; yych = *(YYMARKER = ++YYCURSOR); - if (yych != '-') goto yy973; + if (yych == '-') goto yy977; + if (yych <= '/') goto yy974; + if (yych <= '2') goto yy996; + goto yy974; yy976: YYDEBUG(976, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy977; - if (yych <= '3') goto yy978; - if (yych <= '9') goto yy979; - goto yy56; + 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 yy656; - goto yy979; + if (yych <= '/') goto yy657; + goto yy980; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy978: - YYDEBUG(978, *YYCURSOR); +yy979: + YYDEBUG(979, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { - if (yych <= '/') goto yy656; + if (yych <= '/') goto yy657; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy979: - YYDEBUG(979, *YYCURSOR); +yy980: + YYDEBUG(980, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == 'T') goto yy984; - if (yych <= 'm') goto yy656; - goto yy981; + if (yych == 'T') goto yy985; + if (yych <= 'm') goto yy657; + goto yy982; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy980: - YYDEBUG(980, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy994; - goto yy56; yy981: YYDEBUG(981, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy994; - goto yy56; + if (yych == 't') goto yy995; + goto yy57; yy982: YYDEBUG(982, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy994; - goto yy56; + if (yych == 'd') goto yy995; + goto yy57; yy983: YYDEBUG(983, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'h') goto yy994; - goto yy56; + if (yych == 'd') goto yy995; + goto yy57; yy984: YYDEBUG(984, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy985; - if (yych <= '2') goto yy986; - if (yych <= '9') goto yy987; - goto yy56; + if (yych == 'h') goto yy995; + goto yy57; yy985: YYDEBUG(985, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy987; - if (yych <= ':') goto yy988; - goto yy56; + 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 yy56; - if (yych <= '4') goto yy987; - if (yych == ':') goto yy988; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy988; + if (yych <= ':') goto yy989; + goto yy57; yy987: YYDEBUG(987, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '4') goto yy988; + if (yych == ':') goto yy989; + goto yy57; yy988: YYDEBUG(988, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy989; - if (yych <= '9') goto yy990; - goto yy56; + if (yych != ':') goto yy57; yy989: YYDEBUG(989, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy990; - if (yych <= ':') goto yy991; - goto yy56; + 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 yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy991; + if (yych <= ':') goto yy992; + goto yy57; yy991: YYDEBUG(991, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy992; - if (yych <= '6') goto yy993; - if (yych <= '9') goto yy841; - goto yy56; + if (yych != ':') goto yy57; yy992: YYDEBUG(992, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '9') goto yy841; - goto yy842; + 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 == '0') goto yy841; - goto yy842; + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy842; + goto yy843; yy994: YYDEBUG(994, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'T') goto yy984; - goto yy656; + yych = *++YYCURSOR; + if (yych == '0') goto yy842; + goto yy843; yy995: YYDEBUG(995, *YYCURSOR); - yyaccept = 22; + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if (yych != '-') goto yy973; + 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 yy56; - if (yych >= '1') goto yy998; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy999; } else { - if (yych <= '3') goto yy999; - if (yych <= '9') goto yy979; - goto yy56; + if (yych <= '3') goto yy1000; + if (yych <= '9') goto yy980; + goto yy57; } - YYDEBUG(997, *YYCURSOR); + YYDEBUG(998, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '9') { - if (yych <= '/') goto yy656; - goto yy1000; + if (yych <= '/') goto yy657; + goto yy1001; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy998: - YYDEBUG(998, *YYCURSOR); +yy999: + YYDEBUG(999, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '9') { - if (yych <= '/') goto yy656; - goto yy1000; + if (yych <= '/') goto yy657; + goto yy1001; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy999: - YYDEBUG(999, *YYCURSOR); +yy1000: + YYDEBUG(1000, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { - if (yych <= '/') goto yy656; + if (yych <= '/') goto yy657; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy1000: - YYDEBUG(1000, *YYCURSOR); +yy1001: + YYDEBUG(1001, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == 'T') goto yy1001; - if (yych <= 'm') goto yy454; - goto yy981; + if (yych == 'T') goto yy1002; + if (yych <= 'm') goto yy455; + goto yy982; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy982; + if (yych <= 'q') goto yy455; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy454; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy455; } } -yy1001: - YYDEBUG(1001, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy1002; - if (yych <= '2') goto yy1003; - if (yych <= '9') goto yy987; - goto yy56; yy1002: YYDEBUG(1002, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy1004; - if (yych <= ':') goto yy988; - goto yy56; + 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 yy56; - if (yych <= '4') goto yy1004; - if (yych == ':') goto yy988; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy1005; + if (yych <= ':') goto yy989; + goto yy57; yy1004: YYDEBUG(1004, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '4') goto yy1005; + if (yych == ':') goto yy989; + goto yy57; +yy1005: YYDEBUG(1005, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1006; - if (yych <= '9') goto yy990; - goto yy56; -yy1006: + if (yych != ':') goto yy57; YYDEBUG(1006, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy1007; - if (yych <= ':') goto yy991; - goto yy56; + 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 yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy1008; + if (yych <= ':') goto yy992; + goto yy57; +yy1008: YYDEBUG(1008, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1009; - if (yych <= '6') goto yy1010; - if (yych <= '9') goto yy841; - goto yy56; -yy1009: + if (yych != ':') goto yy57; YYDEBUG(1009, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '9') goto yy1011; - goto yy842; + 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 != '0') goto yy842; + 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 yy842; - YYDEBUG(1012, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; -yy1013: + 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(1014, *YYCURSOR); + YYDEBUG(1015, *YYCURSOR); if (yych <= '-') { - if (yych == '+') goto yy1016; - if (yych <= ',') goto yy842; - goto yy1016; + if (yych == '+') goto yy1017; + if (yych <= ',') goto yy843; + goto yy1017; } else { if (yych <= '9') { - if (yych <= '/') goto yy842; - goto yy1013; + if (yych <= '/') goto yy843; + goto yy1014; } else { - if (yych != 'G') goto yy842; + if (yych != 'G') goto yy843; } } - YYDEBUG(1015, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1022; - goto yy56; -yy1016: YYDEBUG(1016, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy1017; - if (yych <= '2') goto yy1018; - if (yych <= '9') goto yy1019; - goto yy56; + if (yych == 'M') goto yy1023; + goto yy57; yy1017: YYDEBUG(1017, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '9') goto yy1019; - if (yych <= ':') goto yy1020; - goto yy842; + 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 <= '5') { - if (yych <= '/') goto yy842; - if (yych >= '5') goto yy1021; - } else { - if (yych <= '9') goto yy841; - if (yych <= ':') goto yy1020; - goto yy842; - } + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy1020; + if (yych <= ':') goto yy1021; + goto yy843; yy1019: YYDEBUG(1019, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '5') goto yy1021; - if (yych <= '9') goto yy841; - if (yych >= ';') goto yy842; + 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 yy842; - if (yych <= '5') goto yy1021; - if (yych <= '9') goto yy841; - goto yy842; + 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 yy842; - if (yych <= '9') goto yy841; - goto yy842; + if (yych <= '/') goto yy843; + if (yych <= '5') goto yy1022; + if (yych <= '9') goto yy842; + goto yy843; yy1022: YYDEBUG(1022, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'T') goto yy56; + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy842; + goto yy843; +yy1023: YYDEBUG(1023, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '+') goto yy1016; - if (yych == '-') goto yy1016; - goto yy56; -yy1024: + if (yych != 'T') goto yy57; YYDEBUG(1024, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy1025; - if (yych != 'c') goto yy56; + 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy879; - if (yych == 'e') goto yy879; - goto yy793; + if (yych <= 'E') goto yy880; + if (yych == 'e') goto yy880; + goto yy794; } -yy1026: - YYDEBUG(1026, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy1027; - if (yych != 'v') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy886; - if (yych == 'e') goto yy886; - goto yy793; + if (yych <= 'E') goto yy887; + if (yych == 'e') goto yy887; + goto yy794; } -yy1028: - YYDEBUG(1028, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1029; - if (yych != 't') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'O') goto yy892; - if (yych == 'o') goto yy892; - goto yy793; + if (yych <= 'O') goto yy893; + if (yych == 'o') goto yy893; + goto yy794; } -yy1030: - YYDEBUG(1030, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy1031; - if (yych != 'p') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'T') goto yy1032; - if (yych != 't') goto yy793; + if (yych <= 'T') goto yy1033; + if (yych != 't') goto yy794; } -yy1032: - YYDEBUG(1032, *YYCURSOR); +yy1033: + YYDEBUG(1033, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy898; - if (yych == 'e') goto yy898; - goto yy793; + if (yych <= 'E') goto yy899; + if (yych == 'e') goto yy899; + goto yy794; } -yy1033: - YYDEBUG(1033, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy1036; - if (yych == 'g') goto yy1036; - goto yy56; yy1034: YYDEBUG(1034, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1035; - if (yych != 'r') goto yy56; + 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'I') goto yy905; - if (yych == 'i') goto yy905; - goto yy793; + if (yych <= 'I') goto yy906; + if (yych == 'i') goto yy906; + goto yy794; } -yy1036: - YYDEBUG(1036, *YYCURSOR); +yy1037: + YYDEBUG(1037, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'U') goto yy907; - if (yych == 'u') goto yy907; - goto yy793; + if (yych <= 'U') goto yy908; + if (yych == 'u') goto yy908; + goto yy794; } -yy1037: - YYDEBUG(1037, *YYCURSOR); +yy1038: + YYDEBUG(1038, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { - if (yych == 'R') goto yy1038; - if (yych <= 'X') goto yy56; - goto yy1039; + if (yych == 'R') goto yy1039; + if (yych <= 'X') goto yy57; + goto yy1040; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy1039; - goto yy56; + if (yych == 'y') goto yy1040; + goto yy57; } } -yy1038: - YYDEBUG(1038, *YYCURSOR); +yy1039: + YYDEBUG(1039, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'B') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'C') goto yy911; - if (yych == 'c') goto yy911; - goto yy793; + if (yych <= 'C') goto yy912; + if (yych == 'c') goto yy912; + goto yy794; } -yy1039: - YYDEBUG(1039, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy766; - goto yy793; yy1040: YYDEBUG(1040, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy1041; - if (yych != 'b') goto yy56; + 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'R') goto yy914; - if (yych == 'r') goto yy914; - goto yy793; + if (yych <= 'R') goto yy915; + if (yych == 'r') goto yy915; + goto yy794; } -yy1042: - YYDEBUG(1042, *YYCURSOR); +yy1043: + YYDEBUG(1043, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { - if (yych == 'L') goto yy1046; - if (yych <= 'M') goto yy56; - goto yy1045; + if (yych == 'L') goto yy1047; + if (yych <= 'M') goto yy57; + goto yy1046; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy1046; + if (yych <= 'k') goto yy57; + goto yy1047; } else { - if (yych == 'n') goto yy1045; - goto yy56; + if (yych == 'n') goto yy1046; + goto yy57; } } -yy1043: - YYDEBUG(1043, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1044; - if (yych != 'n') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'U') goto yy921; - if (yych == 'u') goto yy921; - goto yy793; + if (yych <= 'U') goto yy922; + if (yych == 'u') goto yy922; + goto yy794; } -yy1045: - YYDEBUG(1045, *YYCURSOR); +yy1046: + YYDEBUG(1046, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy883; - if (yych == 'e') goto yy883; - goto yy793; + if (yych <= 'E') goto yy884; + if (yych == 'e') goto yy884; + goto yy794; } -yy1046: - YYDEBUG(1046, *YYCURSOR); +yy1047: + YYDEBUG(1047, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'X') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy793; + if (yych <= 'Y') goto yy884; + if (yych == 'y') goto yy884; + goto yy794; } -yy1047: - YYDEBUG(1047, *YYCURSOR); +yy1048: + YYDEBUG(1048, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { if (yych <= '\t') { - if (yych <= 0x08) goto yy577; - goto yy730; + if (yych <= 0x08) goto yy578; + goto yy731; } else { - if (yych <= ',') goto yy577; - if (yych <= '-') goto yy731; - goto yy730; + if (yych <= ',') goto yy578; + if (yych <= '-') goto yy732; + goto yy731; } } else { if (yych <= 'U') { - if (yych <= '/') goto yy729; - if (yych <= 'T') goto yy577; - goto yy77; + if (yych <= '/') goto yy730; + if (yych <= 'T') goto yy578; + goto yy78; } else { - if (yych == 'u') goto yy77; - goto yy577; + if (yych == 'u') goto yy78; + goto yy578; } } -yy1048: - YYDEBUG(1048, *YYCURSOR); +yy1049: + YYDEBUG(1049, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'P') { - if (yych == 'C') goto yy128; - if (yych <= 'O') goto yy56; - goto yy585; + if (yych == 'C') goto yy129; + if (yych <= 'O') goto yy57; + goto yy586; } else { if (yych <= 'c') { - if (yych <= 'b') goto yy56; - goto yy128; + if (yych <= 'b') goto yy57; + goto yy129; } else { - if (yych == 'p') goto yy585; - goto yy56; + if (yych == 'p') goto yy586; + goto yy57; } } -yy1049: - YYDEBUG(1049, *YYCURSOR); +yy1050: + YYDEBUG(1050, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '9') { if (yych <= ',') { - if (yych == '\t') goto yy1051; - goto yy1053; + if (yych == '\t') goto yy1052; + goto yy1054; } else { - if (yych <= '-') goto yy1050; - if (yych <= '.') goto yy730; - if (yych <= '/') goto yy729; - goto yy740; + if (yych <= '-') goto yy1051; + if (yych <= '.') goto yy731; + if (yych <= '/') goto yy730; + goto yy741; } } else { if (yych <= 'q') { - if (yych == 'n') goto yy469; - goto yy1053; + if (yych == 'n') goto yy470; + goto yy1054; } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy1053; + if (yych <= 'r') goto yy471; + if (yych <= 's') goto yy464; + if (yych <= 't') goto yy468; + goto yy1054; } } -yy1050: - YYDEBUG(1050, *YYCURSOR); +yy1051: + YYDEBUG(1051, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { - case '0': goto yy1054; - case '1': goto yy1055; + case '0': goto yy1055; + case '1': goto yy1056; case '2': case '3': case '4': @@ -15095,246 +15318,246 @@ yy1050: case '6': case '7': case '8': - case '9': goto yy617; + case '9': goto yy618; case 'A': - case 'a': goto yy621; + case 'a': goto yy622; case 'D': - case 'd': goto yy625; + case 'd': goto yy626; case 'F': - case 'f': goto yy619; + case 'f': goto yy620; case 'J': - case 'j': goto yy618; + case 'j': goto yy619; case 'M': - case 'm': goto yy620; + case 'm': goto yy621; case 'N': - case 'n': goto yy624; + case 'n': goto yy625; case 'O': - case 'o': goto yy623; + case 'o': goto yy624; case 'S': - case 's': goto yy622; - default: goto yy577; + case 's': goto yy623; + default: goto yy578; } -yy1051: - YYDEBUG(1051, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy1053; - if (yych <= '0') goto yy735; - if (yych <= '1') goto yy736; - if (yych <= '9') goto yy737; - goto yy1053; 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; -yy1053: - YYDEBUG(1053, *YYCURSOR); +yy1054: + YYDEBUG(1054, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': - case ' ': goto yy1052; + case ' ': goto yy1053; case '-': - case '.': goto yy576; + case '.': goto yy577; case 'A': - case 'a': goto yy573; + case 'a': goto yy574; case 'D': - case 'd': goto yy465; + case 'd': goto yy466; case 'F': - case 'f': goto yy466; + case 'f': goto yy467; case 'H': - case 'h': goto yy63; - case 'I': goto yy474; + case 'h': goto yy64; + case 'I': goto yy475; case 'J': - case 'j': goto yy478; + case 'j': goto yy479; case 'M': - case 'm': goto yy464; + case 'm': goto yy465; case 'N': - case 'n': goto yy481; + case 'n': goto yy482; case 'O': - case 'o': goto yy480; + case 'o': goto yy481; case 'S': - case 's': goto yy462; + case 's': goto yy463; case 'T': - case 't': goto yy68; - case 'V': goto yy476; + case 't': goto yy69; + case 'V': goto yy477; case 'W': - case 'w': goto yy67; - case 'X': goto yy477; + case 'w': goto yy68; + case 'X': goto yy478; case 'Y': - case 'y': goto yy66; - default: goto yy56; - } -yy1054: - YYDEBUG(1054, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; - } else { - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy1056; - goto yy56; + case 'y': goto yy67; + default: goto yy57; } yy1055: YYDEBUG(1055, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy655; + goto yy602; } else { - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy1057; + goto yy57; } yy1056: YYDEBUG(1056, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy1057; - if (yych <= '.') goto yy601; - goto yy56; + 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 yy56; - if (yych >= '1') goto yy1059; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy1060; } else { - if (yych <= '3') goto yy1060; - if (yych <= '9') goto yy658; - goto yy56; + if (yych <= '3') goto yy1061; + if (yych <= '9') goto yy659; + goto yy57; } - YYDEBUG(1058, *YYCURSOR); + YYDEBUG(1059, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy1061; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy1062; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy1059: - YYDEBUG(1059, *YYCURSOR); +yy1060: + YYDEBUG(1060, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy1061; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy1062; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy1060: - YYDEBUG(1060, *YYCURSOR); +yy1061: + YYDEBUG(1061, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '1') { - if (yych <= '/') goto yy656; + if (yych <= '/') goto yy657; } else { - if (yych <= '9') goto yy603; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '9') goto yy604; + if (yych <= 'm') goto yy657; + goto yy661; } } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy1061: - YYDEBUG(1061, *YYCURSOR); +yy1062: + YYDEBUG(1062, *YYCURSOR); yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy763; - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy763; - goto yy660; + if (yych <= '/') goto yy764; + if (yych <= '9') goto yy605; + if (yych <= 'm') goto yy764; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy763; - goto yy661; + if (yych <= 'q') goto yy764; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy763; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy764; } } -yy1062: - YYDEBUG(1062, *YYCURSOR); +yy1063: + YYDEBUG(1063, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '9') { if (yych <= '-') { - if (yych == '\t') goto yy1051; - if (yych <= ',') goto yy1053; - goto yy1050; + if (yych == '\t') goto yy1052; + if (yych <= ',') goto yy1054; + goto yy1051; } else { - if (yych <= '.') goto yy1063; - if (yych <= '/') goto yy729; - if (yych <= '5') goto yy1065; - goto yy740; + if (yych <= '.') goto yy1064; + if (yych <= '/') goto yy730; + if (yych <= '5') goto yy1066; + goto yy741; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy1064; - if (yych == 'n') goto yy469; - goto yy1053; + if (yych <= ':') goto yy1065; + if (yych == 'n') goto yy470; + goto yy1054; } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy1053; + if (yych <= 'r') goto yy471; + if (yych <= 's') goto yy464; + if (yych <= 't') goto yy468; + goto yy1054; } } -yy1063: - YYDEBUG(1063, *YYCURSOR); +yy1064: + YYDEBUG(1064, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '1') { - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy1087; - goto yy1088; + if (yych <= '/') goto yy578; + if (yych <= '0') goto yy1088; + goto yy1089; } else { - if (yych <= '5') goto yy1089; - if (yych <= '9') goto yy1090; - goto yy577; + if (yych <= '5') goto yy1090; + if (yych <= '9') goto yy1091; + goto yy578; } -yy1064: - YYDEBUG(1064, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1082; - if (yych <= '9') goto yy1083; - goto yy56; yy1065: YYDEBUG(1065, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy784; - if (yych <= '/') goto yy60; - if (yych >= ':') goto yy60; + 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); @@ -15366,26 +15589,26 @@ yy1065: case 's': case 't': case 'w': - case 'y': goto yy790; - case '-': goto yy787; - case '.': goto yy791; - case '/': goto yy788; - case '0': goto yy1068; - case '1': goto yy1069; - case '2': goto yy1070; - case '3': goto yy1071; + 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 yy1072; - case '6': goto yy1073; + case '5': goto yy1073; + case '6': goto yy1074; case '7': case '8': - case '9': goto yy54; - case ':': goto yy806; - case 'W': goto yy809; - default: goto yy1067; + case '9': goto yy55; + case ':': goto yy807; + case 'W': goto yy810; + default: goto yy1068; } -yy1067: - YYDEBUG(1067, *YYCURSOR); +yy1068: + YYDEBUG(1068, *YYCURSOR); { DEBUG_OUTPUT("gnunocolon"); TIMELIB_INIT; @@ -15407,97 +15630,97 @@ yy1067: TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -yy1068: - YYDEBUG(1068, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '0') goto yy1080; - if (yych <= '9') goto yy1081; - goto yy60; yy1069: YYDEBUG(1069, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '2') goto yy1079; - if (yych <= '9') goto yy1078; - goto yy60; + 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 yy60; - if (yych <= '9') goto yy1078; - goto yy60; + 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 yy60; - if (yych <= '5') goto yy1076; - if (yych <= '6') goto yy1077; - if (yych <= '9') goto yy1074; - goto yy60; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy1079; + goto yy61; yy1072: YYDEBUG(1072, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy1074; - goto yy60; + 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 yy60; - if (yych <= '0') goto yy1074; - if (yych <= '9') goto yy54; - goto yy60; + 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] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych >= ' ') goto yy60; + if (yych == '\t') goto yy61; + if (yych >= ' ') goto yy61; } else { - if (yych == 'D') goto yy60; - if (yych >= 'F') goto yy60; + if (yych == 'D') goto yy61; + if (yych >= 'F') goto yy61; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy60; - if (yych >= 'M') goto yy60; + if (yych == 'H') goto yy61; + if (yych >= 'M') goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - if (yych >= 'W') goto yy60; + 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 yy60; - if (yych >= 'd') goto yy60; + if (yych == 'Y') goto yy61; + if (yych >= 'd') goto yy61; } else { - if (yych == 'f') goto yy60; - if (yych >= 'h') goto yy60; + if (yych == 'f') goto yy61; + if (yych >= 'h') goto yy61; } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych >= 's') goto yy60; + if (yych == 'm') goto yy61; + if (yych >= 's') goto yy61; } else { if (yych <= 'w') { - if (yych >= 'w') goto yy60; + if (yych >= 'w') goto yy61; } else { - if (yych == 'y') goto yy60; + if (yych == 'y') goto yy61; } } } } -yy1075: - YYDEBUG(1075, *YYCURSOR); +yy1076: + YYDEBUG(1076, *YYCURSOR); { int tz_not_found; DEBUG_OUTPUT("iso8601nocolon"); @@ -15516,903 +15739,903 @@ yy1075: TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -yy1076: - YYDEBUG(1076, *YYCURSOR); +yy1077: + YYDEBUG(1077, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { - if (yych <= '/') goto yy1075; - if (yych <= '9') goto yy820; - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= '/') goto yy1076; + if (yych <= '9') goto yy821; + if (yych <= 'C') goto yy1076; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy1075; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy1076; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy1075; - goto yy60; + if (yych <= 'L') goto yy1076; + goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - goto yy1075; + if (yych <= 'R') goto yy1076; + if (yych <= 'T') goto yy61; + goto yy1076; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy1075; - if (yych <= 'Y') goto yy60; - goto yy1075; + if (yych == 'X') goto yy1076; + if (yych <= 'Y') goto yy61; + goto yy1076; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy1075; + if (yych <= 'd') goto yy61; + goto yy1076; } else { - if (yych == 'g') goto yy1075; - goto yy60; + if (yych == 'g') goto yy1076; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1077: - YYDEBUG(1077, *YYCURSOR); +yy1078: + YYDEBUG(1078, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '6') { - if (yych <= '/') goto yy1075; - goto yy820; + if (yych <= '/') goto yy1076; + goto yy821; } else { - if (yych <= '9') goto yy54; - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= '9') goto yy55; + if (yych <= 'C') goto yy1076; + goto yy61; } } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy1075; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy1076; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy1075; - goto yy60; + if (yych <= 'L') goto yy1076; + goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - goto yy1075; + if (yych <= 'R') goto yy1076; + if (yych <= 'T') goto yy61; + goto yy1076; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy1075; - if (yych <= 'Y') goto yy60; - goto yy1075; + if (yych == 'X') goto yy1076; + if (yych <= 'Y') goto yy61; + goto yy1076; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy1075; + if (yych <= 'd') goto yy61; + goto yy1076; } else { - if (yych == 'g') goto yy1075; - goto yy60; + if (yych == 'g') goto yy1076; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1078: - YYDEBUG(1078, *YYCURSOR); +yy1079: + YYDEBUG(1079, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { - if (yych <= '/') goto yy1075; - if (yych <= '9') goto yy820; - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= '/') goto yy1076; + if (yych <= '9') goto yy821; + if (yych <= 'C') goto yy1076; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy1075; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy1076; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy1075; - goto yy60; + if (yych <= 'L') goto yy1076; + goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - goto yy1075; + if (yych <= 'R') goto yy1076; + if (yych <= 'T') goto yy61; + goto yy1076; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy1075; - if (yych <= 'Y') goto yy60; - goto yy1075; + if (yych == 'X') goto yy1076; + if (yych <= 'Y') goto yy61; + goto yy1076; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy1075; + if (yych <= 'd') goto yy61; + goto yy1076; } else { - if (yych == 'g') goto yy1075; - goto yy60; + if (yych == 'g') goto yy1076; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1079: - YYDEBUG(1079, *YYCURSOR); +yy1080: + YYDEBUG(1080, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '0') { - if (yych <= '/') goto yy1075; - goto yy844; + if (yych <= '/') goto yy1076; + goto yy845; } else { - if (yych <= '2') goto yy845; - if (yych <= '3') goto yy846; - goto yy820; + if (yych <= '2') goto yy846; + if (yych <= '3') goto yy847; + goto yy821; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= 'C') goto yy1076; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy1075; + if (yych == 'F') goto yy61; + goto yy1076; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy1075; + if (yych <= 'H') goto yy61; + goto yy1076; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy1075; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy1076; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy1075; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy1076; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy1075; - goto yy60; + if (yych <= 'c') goto yy1076; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy1075; + if (yych == 'f') goto yy61; + goto yy1076; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy1075; + if (yych <= 'h') goto yy61; + goto yy1076; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1080: - YYDEBUG(1080, *YYCURSOR); +yy1081: + YYDEBUG(1081, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '0') { - if (yych <= '/') goto yy1075; - goto yy876; + if (yych <= '/') goto yy1076; + goto yy877; } else { - if (yych <= '2') goto yy845; - if (yych <= '3') goto yy846; - goto yy820; + if (yych <= '2') goto yy846; + if (yych <= '3') goto yy847; + goto yy821; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= 'C') goto yy1076; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy1075; + if (yych == 'F') goto yy61; + goto yy1076; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy1075; + if (yych <= 'H') goto yy61; + goto yy1076; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy1075; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy1076; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy1075; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy1076; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy1075; - goto yy60; + if (yych <= 'c') goto yy1076; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy1075; + if (yych == 'f') goto yy61; + goto yy1076; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy1075; + if (yych <= 'h') goto yy61; + goto yy1076; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1081: - YYDEBUG(1081, *YYCURSOR); +yy1082: + YYDEBUG(1082, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '0') { - if (yych <= '/') goto yy1075; - goto yy844; + if (yych <= '/') goto yy1076; + goto yy845; } else { - if (yych <= '2') goto yy845; - if (yych <= '3') goto yy846; - goto yy820; + if (yych <= '2') goto yy846; + if (yych <= '3') goto yy847; + goto yy821; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= 'C') goto yy1076; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy1075; + if (yych == 'F') goto yy61; + goto yy1076; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy1075; + if (yych <= 'H') goto yy61; + goto yy1076; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy1075; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy1076; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy1075; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy1076; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy1075; - goto yy60; + if (yych <= 'c') goto yy1076; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy1075; + if (yych == 'f') goto yy61; + goto yy1076; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy1075; + if (yych <= 'h') goto yy61; + goto yy1076; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1082: - YYDEBUG(1082, *YYCURSOR); +yy1083: + YYDEBUG(1083, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy1084; - goto yy490; + if (yych == '.') goto yy1085; + goto yy491; } else { - if (yych <= '9') goto yy1083; - if (yych <= ':') goto yy1084; - goto yy490; + if (yych <= '9') goto yy1084; + if (yych <= ':') goto yy1085; + goto yy491; } -yy1083: - YYDEBUG(1083, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy1084; - if (yych != ':') goto yy490; yy1084: YYDEBUG(1084, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1085; - if (yych <= '6') goto yy1086; - if (yych <= '9') goto yy495; - goto yy56; -yy1085: - YYDEBUG(1085, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy495; - goto yy490; + 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 yy496; - if (yych == '0') goto yy495; - goto yy490; + 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 <= '.') { - if (yych <= ',') goto yy490; - if (yych <= '-') goto yy601; - goto yy1091; - } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy1090; - if (yych <= ':') goto yy1084; - goto yy490; - } + 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 yy490; - if (yych <= '-') goto yy601; - if (yych <= '.') goto yy1091; - goto yy490; + if (yych <= '.') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy1092; } else { - if (yych <= '2') goto yy1090; - if (yych <= '9') goto yy1083; - if (yych <= ':') goto yy1084; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; - goto yy1091; + if (yych <= '/') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + if (yych <= '.') goto yy1092; + goto yy491; } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy1083; - if (yych <= ':') goto yy1084; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy1092; } else { - if (yych == ':') goto yy1084; - goto yy490; + if (yych <= '/') goto yy491; + if (yych <= '9') goto yy1084; + if (yych <= ':') goto yy1085; + goto yy491; } yy1091: YYDEBUG(1091, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1092; - if (yych <= '6') goto yy1093; - if (yych <= '9') goto yy609; - goto yy56; -yy1092: - YYDEBUG(1092, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy1094; - goto yy490; + 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 <= '/') { - if (yych == '.') goto yy496; - goto yy490; - } else { - if (yych <= '0') goto yy1094; - if (yych <= '9') goto yy610; - goto yy490; - } + 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 == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy604; - goto yy490; -yy1095: - YYDEBUG(1095, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '9') { - if (yych <= '-') { - if (yych == '\t') goto yy459; - if (yych <= ',') goto yy461; - goto yy1050; - } else { - if (yych <= '.') goto yy473; - if (yych <= '/') goto yy471; - if (yych <= '5') goto yy1065; - goto yy740; - } + if (yych <= '/') { + if (yych == '.') goto yy497; + goto yy491; } else { - if (yych <= 'q') { - if (yych <= ':') goto yy482; - if (yych == 'n') goto yy469; - goto yy461; - } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy461; - } + 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 yy1051; - if (yych <= ',') goto yy1053; - goto yy1050; + if (yych == '\t') goto yy460; + if (yych <= ',') goto yy462; + goto yy1051; } else { - if (yych <= '.') goto yy1063; - if (yych <= '/') goto yy471; - if (yych <= '5') goto yy1065; - goto yy740; + if (yych <= '.') goto yy474; + if (yych <= '/') goto yy472; + if (yych <= '5') goto yy1066; + goto yy741; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy1064; - if (yych == 'n') goto yy469; - goto yy1053; + if (yych <= ':') goto yy483; + if (yych == 'n') goto yy470; + goto yy462; } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy1053; + 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 <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '9') { + if (yych <= '-') { + if (yych == '\t') goto yy1052; + if (yych <= ',') goto yy1054; + goto yy1051; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '.') goto yy1064; + if (yych <= '/') goto yy472; + if (yych <= '5') goto yy1066; + goto yy741; } } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'q') { + if (yych <= ':') goto yy1065; + if (yych == 'n') goto yy470; + goto yy1054; } else { - if (yych <= 'e') goto yy1098; - if (yych <= 'z') goto yy141; - goto yy3; + 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 <= 'V') { + if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; } } else { - if (yych <= 'u') { + if (yych <= 'd') { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy142; } else { - if (yych <= 'v') goto yy1099; + if (yych <= 'e') goto yy1099; if (yych <= 'z') goto yy142; - goto yy3; + goto yy4; } } yy1099: YYDEBUG(1099, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'I') { + if (yych <= 'V') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'U') goto yy143; } } else { - if (yych <= 'h') { + if (yych <= 'u') { if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy143; } else { - if (yych <= 'i') goto yy1100; + if (yych <= 'v') goto yy1100; if (yych <= 'z') goto yy143; - goto yy3; + goto yy4; } } yy1100: YYDEBUG(1100, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'O') { + if (yych <= 'I') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'H') goto yy144; } } else { - if (yych <= 'n') { + if (yych <= 'h') { if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy144; } else { - if (yych <= 'o') goto yy1101; + if (yych <= 'i') goto yy1101; if (yych <= 'z') goto yy144; - goto yy3; + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'U') goto yy1102; - if (yych != 'u') goto yy3; + if (yych <= 'U') goto yy1103; + if (yych != 'u') goto yy4; } -yy1102: - YYDEBUG(1102, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1103; - if (yych != 's') goto yy56; yy1103: YYDEBUG(1103, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\t') goto yy1104; - if (yych != ' ') goto yy56; + 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; -yy1105: - YYDEBUG(1105, *YYCURSOR); +yy1106: + YYDEBUG(1106, *YYCURSOR); if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy1104; - if (yych <= 0x1F) goto yy56; - goto yy1104; + if (yych == '\t') goto yy1105; + if (yych <= 0x1F) goto yy57; + goto yy1105; } else { - if (yych == 'D') goto yy1109; - if (yych <= 'E') goto yy56; - goto yy1110; + if (yych == 'D') goto yy1110; + if (yych <= 'E') goto yy57; + goto yy1111; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy1108; - if (yych <= 'L') goto yy56; - goto yy1107; + if (yych == 'H') goto yy1109; + if (yych <= 'L') goto yy57; + goto yy1108; } else { if (yych <= 'S') { - if (yych <= 'R') goto yy56; + if (yych <= 'R') goto yy57; } else { - if (yych <= 'T') goto yy1113; - if (yych <= 'V') goto yy56; - goto yy1112; + if (yych <= 'T') goto yy1114; + if (yych <= 'V') goto yy57; + goto yy1113; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy1111; - if (yych <= 'c') goto yy56; - goto yy1109; + if (yych == 'Y') goto yy1112; + if (yych <= 'c') goto yy57; + goto yy1110; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy56; - goto yy1110; + if (yych <= 'e') goto yy57; + goto yy1111; } else { - if (yych == 'h') goto yy1108; - goto yy56; + if (yych == 'h') goto yy1109; + goto yy57; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy1107; - if (yych <= 'r') goto yy56; - if (yych >= 't') goto yy1113; + if (yych <= 'm') goto yy1108; + if (yych <= 'r') goto yy57; + if (yych >= 't') goto yy1114; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy56; - goto yy1112; + if (yych <= 'v') goto yy57; + goto yy1113; } else { - if (yych == 'y') goto yy1111; - goto yy56; + if (yych == 'y') goto yy1112; + goto yy57; } } } } -yy1106: - YYDEBUG(1106, *YYCURSOR); +yy1107: + YYDEBUG(1107, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy1178; - goto yy56; + if (yych == 'A') goto yy1179; + goto yy57; } else { - if (yych <= 'E') goto yy1179; - if (yych <= 'T') goto yy56; - goto yy1177; + if (yych <= 'E') goto yy1180; + if (yych <= 'T') goto yy57; + goto yy1178; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy1178; - goto yy56; + if (yych == 'a') goto yy1179; + goto yy57; } else { - if (yych <= 'e') goto yy1179; - if (yych == 'u') goto yy1177; - goto yy56; + if (yych <= 'e') goto yy1180; + if (yych == 'u') goto yy1178; + goto yy57; } } -yy1107: - YYDEBUG(1107, *YYCURSOR); +yy1108: + YYDEBUG(1108, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { - if (yych == 'I') goto yy1169; - if (yych <= 'N') goto yy56; - goto yy1168; + if (yych == 'I') goto yy1170; + if (yych <= 'N') goto yy57; + goto yy1169; } else { if (yych <= 'i') { - if (yych <= 'h') goto yy56; - goto yy1169; + if (yych <= 'h') goto yy57; + goto yy1170; } else { - if (yych == 'o') goto yy1168; - goto yy56; + if (yych == 'o') goto yy1169; + goto yy57; } } -yy1108: - YYDEBUG(1108, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1166; - if (yych == 'o') goto yy1166; - goto yy56; yy1109: YYDEBUG(1109, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1165; - if (yych == 'a') goto yy1165; - goto yy56; + 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 yy1150; - if (yych <= 'Q') goto yy56; - goto yy1149; + if (yych == 'O') goto yy1151; + if (yych <= 'Q') goto yy57; + goto yy1150; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy56; - goto yy1150; + if (yych <= 'n') goto yy57; + goto yy1151; } else { - if (yych == 'r') goto yy1149; - goto yy56; + if (yych == 'r') goto yy1150; + goto yy57; } } -yy1111: - YYDEBUG(1111, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1146; - if (yych == 'e') goto yy1146; - goto yy56; yy1112: YYDEBUG(1112, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1132; - if (yych == 'e') goto yy1132; - goto yy56; + 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 yy1114; - if (yych <= 'T') goto yy56; - goto yy1115; + if (yych == 'H') goto yy1115; + if (yych <= 'T') goto yy57; + goto yy1116; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; + if (yych <= 'g') goto yy57; } else { - if (yych == 'u') goto yy1115; - goto yy56; + if (yych == 'u') goto yy1116; + goto yy57; } } -yy1114: - YYDEBUG(1114, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy1127; - if (yych == 'u') goto yy1127; - goto yy56; yy1115: YYDEBUG(1115, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1116; - if (yych != 'e') goto yy56; + 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 yy1118; - if (yych >= ' ') goto yy1118; + if (yych == '\t') goto yy1119; + if (yych >= ' ') goto yy1119; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy1120; + if (yych >= 'S') goto yy1121; } else { - if (yych == 's') goto yy1120; + if (yych == 's') goto yy1121; } } -yy1117: - YYDEBUG(1117, *YYCURSOR); +yy1118: + YYDEBUG(1118, *YYCURSOR); { timelib_sll i; int behavior = 0; @@ -16428,56 +16651,56 @@ yy1117: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -yy1118: - YYDEBUG(1118, *YYCURSOR); +yy1119: + YYDEBUG(1119, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - YYDEBUG(1119, *YYCURSOR); + YYDEBUG(1120, *YYCURSOR); if (yych <= ' ') { - if (yych == '\t') goto yy1118; - if (yych <= 0x1F) goto yy56; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy57; + goto yy1119; } else { if (yych <= 'O') { - if (yych <= 'N') goto yy56; - goto yy1124; + if (yych <= 'N') goto yy57; + goto yy1125; } else { - if (yych == 'o') goto yy1124; - goto yy56; + if (yych == 'o') goto yy1125; + goto yy57; } } -yy1120: - YYDEBUG(1120, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1121; - if (yych != 'd') goto yy56; yy1121: YYDEBUG(1121, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1122; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1122; + if (yych != 'd') goto yy57; yy1122: YYDEBUG(1122, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy1123; + if (yych != 'a') goto yy57; yy1123: YYDEBUG(1123, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '\t') goto yy1118; - if (yych == ' ') goto yy1118; - goto yy1117; + yych = *++YYCURSOR; + if (yych == 'Y') goto yy1124; + if (yych != 'y') goto yy57; yy1124: YYDEBUG(1124, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1125; - if (yych != 'f') goto yy56; + yyaccept = 26; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '\t') goto yy1119; + if (yych == ' ') goto yy1119; + goto yy1118; yy1125: YYDEBUG(1125, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych == 'F') goto yy1126; + if (yych != 'f') goto yy57; +yy1126: YYDEBUG(1126, *YYCURSOR); + ++YYCURSOR; + YYDEBUG(1127, *YYCURSOR); { timelib_sll i; int behavior = 0; @@ -16498,113 +16721,113 @@ yy1125: TIMELIB_DEINIT; return TIMELIB_WEEK_DAY_OF_MONTH; } -yy1127: - YYDEBUG(1127, *YYCURSOR); +yy1128: + YYDEBUG(1128, *YYCURSOR); yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ' ') { - if (yych == '\t') goto yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'R') { - if (yych <= 'Q') goto yy1117; + if (yych <= 'Q') goto yy1118; } else { - if (yych != 'r') goto yy1117; + if (yych != 'r') goto yy1118; } } - YYDEBUG(1128, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1129; - if (yych != 's') goto yy56; -yy1129: YYDEBUG(1129, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1130; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy1130; + if (yych != 's') goto yy57; yy1130: YYDEBUG(1130, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1131; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1131; + if (yych != 'd') goto yy57; yy1131: YYDEBUG(1131, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + 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 yy56; - if (yych <= 'D') goto yy1134; + if (yych <= 'C') goto yy57; + if (yych <= 'D') goto yy1135; } else { - if (yych <= 'c') goto yy56; - if (yych <= 'd') goto yy1134; - if (yych >= 'f') goto yy56; + if (yych <= 'c') goto yy57; + if (yych <= 'd') goto yy1135; + if (yych >= 'f') goto yy57; } - YYDEBUG(1133, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy1140; - if (yych == 'k') goto yy1140; - goto yy56; -yy1134: 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'N') { - if (yych <= 'M') goto yy1117; + if (yych <= 'M') goto yy1118; } else { - if (yych != 'n') goto yy1117; + if (yych != 'n') goto yy1118; } } - YYDEBUG(1135, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1136; - if (yych != 'e') goto yy56; -yy1136: YYDEBUG(1136, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy1137; - if (yych != 's') goto yy56; + if (yych == 'E') goto yy1137; + if (yych != 'e') goto yy57; yy1137: YYDEBUG(1137, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1138; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy1138; + if (yych != 's') goto yy57; yy1138: YYDEBUG(1138, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1139; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1139; + if (yych != 'd') goto yy57; yy1139: YYDEBUG(1139, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + 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 yy1143; - if (yych >= 'S') goto yy1142; + if (yych == 'D') goto yy1144; + if (yych >= 'S') goto yy1143; } else { if (yych <= 'd') { - if (yych >= 'd') goto yy1143; + if (yych >= 'd') goto yy1144; } else { - if (yych == 's') goto yy1142; + if (yych == 's') goto yy1143; } } -yy1141: - YYDEBUG(1141, *YYCURSOR); +yy1142: + YYDEBUG(1142, *YYCURSOR); { timelib_sll i; int behavior = 0; @@ -16627,1458 +16850,1535 @@ yy1141: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -yy1142: - YYDEBUG(1142, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1117; yy1143: YYDEBUG(1143, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1144; - if (yych != 'a') goto yy56; + goto yy1118; yy1144: YYDEBUG(1144, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1145; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy1145; + if (yych != 'a') goto yy57; yy1145: YYDEBUG(1145, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy1142; - if (yych == 's') goto yy1142; - goto yy1117; + if (yych == 'Y') goto yy1146; + if (yych != 'y') goto yy57; yy1146: YYDEBUG(1146, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1147; - if (yych != 'a') goto yy56; + if (yych == 'S') goto yy1143; + if (yych == 's') goto yy1143; + goto yy1118; yy1147: YYDEBUG(1147, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1148; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy1148; + if (yych != 'a') goto yy57; yy1148: YYDEBUG(1148, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy1142; - if (yych == 's') goto yy1142; - goto yy1117; + if (yych == 'R') goto yy1149; + if (yych != 'r') goto yy57; yy1149: YYDEBUG(1149, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy1162; - if (yych == 'i') goto yy1162; - goto yy56; + if (yych == 'S') goto yy1143; + if (yych == 's') goto yy1143; + goto yy1118; yy1150: YYDEBUG(1150, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1151; - if (yych != 'r') goto yy56; + if (yych == 'I') goto yy1163; + if (yych == 'i') goto yy1163; + goto yy57; yy1151: YYDEBUG(1151, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1152; - if (yych != 't') goto yy56; + 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 yy1154; - if (yych <= 'M') goto yy56; + if (yych == 'H') goto yy1155; + if (yych <= 'M') goto yy57; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; - goto yy1154; + if (yych <= 'g') goto yy57; + goto yy1155; } else { - if (yych != 'n') goto yy56; + if (yych != 'n') goto yy57; } } - YYDEBUG(1153, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy1159; - if (yych == 'i') goto yy1159; - goto yy56; -yy1154: YYDEBUG(1154, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1155; - if (yych != 'n') goto yy56; + if (yych == 'I') goto yy1160; + if (yych == 'i') goto yy1160; + goto yy57; yy1155: YYDEBUG(1155, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy1156; - if (yych != 'i') goto yy56; + if (yych == 'N') goto yy1156; + if (yych != 'n') goto yy57; yy1156: YYDEBUG(1156, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy1157; - if (yych != 'g') goto yy56; + if (yych == 'I') goto yy1157; + if (yych != 'i') goto yy57; yy1157: YYDEBUG(1157, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy1158; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy1158; + if (yych != 'g') goto yy57; yy1158: YYDEBUG(1158, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1148; - if (yych == 't') goto yy1148; - goto yy56; + if (yych == 'H') goto yy1159; + if (yych != 'h') goto yy57; yy1159: YYDEBUG(1159, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy1160; - if (yych != 'g') goto yy56; + if (yych == 'T') goto yy1149; + if (yych == 't') goto yy1149; + goto yy57; yy1160: YYDEBUG(1160, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy1161; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy1161; + if (yych != 'g') goto yy57; yy1161: YYDEBUG(1161, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1148; - if (yych == 't') goto yy1148; - goto yy56; + 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'D') { - if (yych <= 'C') goto yy1117; + if (yych <= 'C') goto yy1118; } else { - if (yych != 'd') goto yy1117; + if (yych != 'd') goto yy1118; } } - YYDEBUG(1163, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1164; - if (yych != 'a') goto yy56; -yy1164: YYDEBUG(1164, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + if (yych == 'A') goto yy1165; + if (yych != 'a') goto yy57; yy1165: YYDEBUG(1165, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1148; - if (yych == 'y') goto yy1148; - goto yy56; + if (yych == 'Y') goto yy1124; + if (yych == 'y') goto yy1124; + goto yy57; yy1166: YYDEBUG(1166, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'U') goto yy1167; - if (yych != 'u') goto yy56; + if (yych == 'Y') goto yy1149; + if (yych == 'y') goto yy1149; + goto yy57; yy1167: YYDEBUG(1167, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1148; - if (yych == 'r') goto yy1148; - goto yy56; + if (yych == 'U') goto yy1168; + if (yych != 'u') goto yy57; yy1168: YYDEBUG(1168, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1173; - if (yych == 'n') goto yy1173; - goto yy56; + if (yych == 'R') goto yy1149; + if (yych == 'r') goto yy1149; + goto yy57; yy1169: YYDEBUG(1169, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1170; - if (yych != 'n') goto yy56; + 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 yy1142; - if (yych <= 'T') goto yy1117; + if (yych == 'S') goto yy1143; + if (yych <= 'T') goto yy1118; } else { if (yych <= 's') { - if (yych <= 'r') goto yy1117; - goto yy1142; + if (yych <= 'r') goto yy1118; + goto yy1143; } else { - if (yych != 'u') goto yy1117; + if (yych != 'u') goto yy1118; } } - YYDEBUG(1171, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1172; - if (yych != 't') goto yy56; -yy1172: YYDEBUG(1172, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1148; - if (yych == 'e') goto yy1148; - goto yy56; + 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 yy1118; - goto yy1117; + if (yych == '\t') goto yy1119; + goto yy1118; } else { - if (yych <= ' ') goto yy1118; - if (yych <= 'C') goto yy1117; + if (yych <= ' ') goto yy1119; + if (yych <= 'C') goto yy1118; } } else { if (yych <= 'c') { - if (yych == 'T') goto yy1175; - goto yy1117; + if (yych == 'T') goto yy1176; + goto yy1118; } else { - if (yych <= 'd') goto yy1174; - if (yych == 't') goto yy1175; - goto yy1117; + if (yych <= 'd') goto yy1175; + if (yych == 't') goto yy1176; + goto yy1118; } } -yy1174: - YYDEBUG(1174, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1176; - if (yych == 'a') goto yy1176; - goto yy56; yy1175: YYDEBUG(1175, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy1148; - if (yych == 'h') goto yy1148; - goto yy56; + if (yych == 'A') goto yy1177; + if (yych == 'a') goto yy1177; + goto yy57; yy1176: YYDEBUG(1176, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + if (yych == 'H') goto yy1149; + if (yych == 'h') goto yy1149; + goto yy57; yy1177: YYDEBUG(1177, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1188; - if (yych == 'n') goto yy1188; - goto yy56; + if (yych == 'Y') goto yy1124; + if (yych == 'y') goto yy1124; + goto yy57; yy1178: YYDEBUG(1178, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1183; - if (yych == 't') goto yy1183; - goto yy56; + if (yych == 'N') goto yy1189; + if (yych == 'n') goto yy1189; + goto yy57; yy1179: YYDEBUG(1179, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy1180; - if (yych != 'c') goto yy56; + 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 yy1181; - if (yych <= 'R') goto yy1117; - goto yy1142; + if (yych == 'O') goto yy1182; + if (yych <= 'R') goto yy1118; + goto yy1143; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy1117; + if (yych <= 'n') goto yy1118; } else { - if (yych == 's') goto yy1142; - goto yy1117; + if (yych == 's') goto yy1143; + goto yy1118; } } -yy1181: - YYDEBUG(1181, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1182; - if (yych != 'n') goto yy56; yy1182: YYDEBUG(1182, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1148; - if (yych == 'd') goto yy1148; - goto yy56; + 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'U') { - if (yych <= 'T') goto yy1117; + if (yych <= 'T') goto yy1118; } else { - if (yych != 'u') goto yy1117; + if (yych != 'u') goto yy1118; } } - YYDEBUG(1184, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1185; - if (yych != 'r') goto yy56; -yy1185: YYDEBUG(1185, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1186; - if (yych != 'd') goto yy56; + if (yych == 'R') goto yy1186; + if (yych != 'r') goto yy57; yy1186: YYDEBUG(1186, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1187; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1187; + if (yych != 'd') goto yy57; yy1187: YYDEBUG(1187, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'D') { - if (yych <= 'C') goto yy1117; + if (yych <= 'C') goto yy1118; } else { - if (yych != 'd') goto yy1117; + if (yych != 'd') goto yy1118; } } - YYDEBUG(1189, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1190; - if (yych != 'a') goto yy56; -yy1190: YYDEBUG(1190, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + if (yych == 'A') goto yy1191; + if (yych != 'a') goto yy57; yy1191: YYDEBUG(1191, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1098; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'e') goto yy1192; - if (yych <= 'z') goto yy146; - goto yy3; - } - } + 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 <= 'V') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; - goto yy1099; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'E') goto yy1099; if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'v') goto yy1193; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'I') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'U') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; - goto yy1100; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'V') goto yy1100; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'i') goto yy1194; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'H') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy144; - goto yy1101; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'I') goto yy1101; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy1195; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= 'T') goto yy3; - goto yy1102; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'O') goto yy1102; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'u') goto yy1196; - if (yych <= 'z') goto yy154; - goto yy3; + 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); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1103; - if (yych != 's') goto yy155; - YYDEBUG(1197, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy1104; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'T') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == ' ') goto yy1104; - goto yy56; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '_') { - if (yych <= '/') goto yy147; - if (yych <= '^') goto yy56; - goto yy147; + if (yych <= '`') { + if (yych <= 'U') goto yy1103; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych <= '`') goto yy56; + if (yych == 'u') goto yy1197; if (yych <= 'z') goto yy154; - goto yy56; + goto yy4; } } -yy1198: +yy1197: + YYDEBUG(1197, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == 'S') goto yy1104; + if (yych != 's') goto yy155; YYDEBUG(1198, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'G') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= ',') { + if (yych <= '\t') { + if (yych <= 0x08) goto yy57; + goto yy1105; } else { - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy1212; + if (yych == ' ') goto yy1105; + goto yy57; } } else { - if (yych <= 'f') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= '/') { + if (yych == '.') goto yy57; + goto yy148; } else { - if (yych <= 'g') goto yy1212; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych == '_') goto yy148; + goto yy57; } } yy1199: YYDEBUG(1199, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'E') { + if (yych <= 'G') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'F') goto yy142; + goto yy1213; } } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'f') { + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'e') goto yy1200; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'g') goto yy1213; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1200: YYDEBUG(1200, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'V') { + if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; } } else { - if (yych <= 'u') { + if (yych <= 'd') { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy142; } else { - if (yych <= 'v') goto yy1201; + if (yych <= 'e') goto yy1201; if (yych <= 'z') goto yy142; - goto yy3; + goto yy4; } } yy1201: YYDEBUG(1201, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'E') { + if (yych <= 'V') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'U') goto yy143; } } else { - if (yych <= 'd') { + if (yych <= 'u') { if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy143; } else { - if (yych <= 'e') goto yy1202; + if (yych <= 'v') goto yy1202; if (yych <= 'z') goto yy143; - goto yy3; + goto yy4; } } yy1202: YYDEBUG(1202, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'N') { + if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy144; } } else { - if (yych <= 'm') { + if (yych <= 'd') { if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy144; } else { - if (yych <= 'n') goto yy1203; + if (yych <= 'e') goto yy1203; if (yych <= 'z') goto yy144; - goto yy3; + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'T') goto yy1204; - if (yych != 't') goto yy3; + if (yych <= 'T') goto yy1205; + if (yych != 't') goto yy4; } -yy1204: - YYDEBUG(1204, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1205; - if (yych != 'h') goto yy56; yy1205: YYDEBUG(1205, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\t') goto yy1206; - if (yych != ' ') goto yy56; + 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; -yy1207: - YYDEBUG(1207, *YYCURSOR); +yy1208: + YYDEBUG(1208, *YYCURSOR); if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy1206; - if (yych <= 0x1F) goto yy56; - goto yy1206; + if (yych == '\t') goto yy1207; + if (yych <= 0x1F) goto yy57; + goto yy1207; } else { - if (yych == 'D') goto yy1109; - if (yych <= 'E') goto yy56; - goto yy1110; + if (yych == 'D') goto yy1110; + if (yych <= 'E') goto yy57; + goto yy1111; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy1108; - if (yych <= 'L') goto yy56; - goto yy1107; + if (yych == 'H') goto yy1109; + if (yych <= 'L') goto yy57; + goto yy1108; } else { if (yych <= 'S') { - if (yych <= 'R') goto yy56; - goto yy1106; + if (yych <= 'R') goto yy57; + goto yy1107; } else { - if (yych <= 'T') goto yy1113; - if (yych <= 'V') goto yy56; + if (yych <= 'T') goto yy1114; + if (yych <= 'V') goto yy57; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy1111; - if (yych <= 'c') goto yy56; - goto yy1109; + if (yych == 'Y') goto yy1112; + if (yych <= 'c') goto yy57; + goto yy1110; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy56; - goto yy1110; + if (yych <= 'e') goto yy57; + goto yy1111; } else { - if (yych == 'h') goto yy1108; - goto yy56; + if (yych == 'h') goto yy1109; + goto yy57; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy1107; - if (yych <= 'r') goto yy56; - if (yych <= 's') goto yy1106; - goto yy1113; + 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 yy56; + if (yych <= 'v') goto yy57; } else { - if (yych == 'y') goto yy1111; - goto yy56; + if (yych == 'y') goto yy1112; + goto yy57; } } } } - YYDEBUG(1208, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1209; - if (yych != 'e') goto yy56; -yy1209: 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 yy56; - if (yych <= 'D') goto yy1134; + if (yych <= 'C') goto yy57; + if (yych <= 'D') goto yy1135; } else { - if (yych <= 'c') goto yy56; - if (yych <= 'd') goto yy1134; - if (yych >= 'f') goto yy56; + if (yych <= 'c') goto yy57; + if (yych <= 'd') goto yy1135; + if (yych >= 'f') goto yy57; } - YYDEBUG(1210, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy1211; - if (yych != 'k') goto yy56; -yy1211: 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 yy1143; - if (yych <= 'R') goto yy56; - goto yy1142; + if (yych == 'D') goto yy1144; + if (yych <= 'R') goto yy57; + goto yy1143; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy56; - goto yy1143; + if (yych <= 'c') goto yy57; + goto yy1144; } else { - if (yych == 's') goto yy1142; - goto yy56; + if (yych == 's') goto yy1143; + goto yy57; } } -yy1212: - YYDEBUG(1212, *YYCURSOR); +yy1213: + YYDEBUG(1213, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy143; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 'h') goto yy1213; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'h') goto yy1214; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1213: - YYDEBUG(1213, *YYCURSOR); +yy1214: + YYDEBUG(1214, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 't') goto yy1214; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 't') goto yy1215; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1214: - YYDEBUG(1214, *YYCURSOR); +yy1215: + YYDEBUG(1215, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; + if (yych == '\t') goto yy1207; + goto yy4; } else { - if (yych <= ' ') goto yy1206; - if (yych == ')') goto yy139; - goto yy3; + if (yych <= ' ') goto yy1207; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '`') { - if (yych == 'H') goto yy1215; - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych == 'H') goto yy1216; + if (yych <= 'Z') goto yy145; + goto yy4; } else { - if (yych == 'h') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych == 'h') goto yy1216; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1215: - YYDEBUG(1215, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; - } else { - if (yych <= ' ') goto yy1206; - if (yych == ')') goto yy139; - goto yy3; - } yy1216: YYDEBUG(1216, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy1212; - } + if (yych <= 0x1F) { + if (yych == '\t') goto yy1207; + goto yy4; } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'g') goto yy1224; - if (yych <= 'z') goto yy146; - goto yy3; - } + if (yych <= ' ') goto yy1207; + if (yych == ')') goto yy140; + goto yy4; } yy1217: YYDEBUG(1217, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'F') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1200; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'G') goto yy1213; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1218; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'V') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; - goto yy1201; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'E') goto yy1201; if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'v') goto yy1219; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'U') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; - goto yy1202; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'V') goto yy1202; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1220; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy144; - goto yy1203; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'E') goto yy1203; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1221; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= 'S') goto yy3; - goto yy1204; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1204; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1222; - if (yych <= 'z') goto yy154; - goto yy3; + 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); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1205; - if (yych != 'h') goto yy155; -yy1223: - YYDEBUG(1223, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy1206; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'S') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == ' ') goto yy1206; - goto yy56; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '_') { - if (yych <= '/') goto yy147; - if (yych <= '^') goto yy56; - goto yy147; + if (yych <= '`') { + if (yych <= 'T') goto yy1205; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych <= '`') goto yy56; + if (yych == 't') goto yy1223; if (yych <= 'z') goto yy154; - goto yy56; + goto yy4; } } +yy1223: + YYDEBUG(1223, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == 'H') goto yy1206; + if (yych != 'h') goto yy155; yy1224: YYDEBUG(1224, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + 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 yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy142; - goto yy1213; + if (yych == ' ') goto yy1207; + goto yy57; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '/') { + if (yych == '.') goto yy57; + goto yy148; } else { - if (yych == 'h') goto yy1225; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych == '_') goto yy148; + goto yy57; } } yy1225: YYDEBUG(1225, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1214; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'H') goto yy1214; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1226; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= '@') { - if (yych <= ' ') { - if (yych == '\t') goto yy1206; - if (yych <= 0x1F) goto yy3; - goto yy1206; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + 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 == '/') goto yy147; - goto yy3; + 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 <= 'H') { - if (yych <= 'G') goto yy144; - goto yy1215; + if (yych <= '^') { + if (yych <= 'G') { + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'H') goto yy1216; + if (yych <= 'Z') goto yy145; + goto yy4; } } else { if (yych <= 'g') { - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; goto yy153; } else { - if (yych <= 'h') goto yy1227; + if (yych <= 'h') goto yy1228; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } } -yy1227: - YYDEBUG(1227, *YYCURSOR); +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 yy1206; - goto yy3; + if (yych == '\t') goto yy1207; + goto yy4; } else { - if (yych <= ' ') goto yy1206; - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= ' ') goto yy1207; + if (yych <= '(') goto yy4; + goto yy140; } } else { - if (yych <= '^') { - if (yych == '/') goto yy147; - goto yy3; + if (yych <= '.') { + if (yych == '-') goto yy148; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy154; - goto yy3; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; + goto yy4; } } -yy1228: - YYDEBUG(1228, *YYCURSOR); +yy1229: + YYDEBUG(1229, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'V') { if (yych <= 'B') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy141; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'O') { - if (yych <= 'C') goto yy1244; - goto yy141; + if (yych <= 'C') goto yy1245; + goto yy142; } else { - if (yych <= 'P') goto yy1246; - if (yych <= 'U') goto yy141; - goto yy1245; + if (yych <= 'P') goto yy1247; + if (yych <= 'U') goto yy142; + goto yy1246; } } } else { if (yych <= 'o') { if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych == 'c') goto yy1244; - goto yy141; + if (yych == 'c') goto yy1245; + goto yy142; } } else { if (yych <= 'u') { - if (yych <= 'p') goto yy1246; - goto yy141; + if (yych <= 'p') goto yy1247; + goto yy142; } else { - if (yych <= 'v') goto yy1245; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'v') goto yy1246; + if (yych <= 'z') goto yy142; + goto yy4; } } } -yy1229: - YYDEBUG(1229, *YYCURSOR); +yy1230: + YYDEBUG(1230, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; - goto yy1239; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy142; + goto yy1240; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 't') goto yy1239; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 't') goto yy1240; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1230: - YYDEBUG(1230, *YYCURSOR); +yy1231: + YYDEBUG(1231, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; - goto yy1236; + if (yych <= '@') goto yy4; + if (yych <= 'W') goto yy142; + goto yy1237; } } else { if (yych <= 'w') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'x') goto yy1236; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'x') goto yy1237; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1231: - YYDEBUG(1231, *YYCURSOR); +yy1232: + YYDEBUG(1232, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'n') goto yy1232; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'n') goto yy1233; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1232: - YYDEBUG(1232, *YYCURSOR); +yy1233: + YYDEBUG(1233, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; + if (yych <= 'C') goto yy143; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { - if (yych <= 'd') goto yy1233; - if (yych <= 'z') goto yy142; + if (yych <= 'd') goto yy1234; + if (yych <= 'z') goto yy143; goto yy167; } } -yy1233: - YYDEBUG(1233, *YYCURSOR); +yy1234: + YYDEBUG(1234, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= 'a') goto yy1234; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'a') goto yy1235; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1234: - YYDEBUG(1234, *YYCURSOR); +yy1235: + YYDEBUG(1235, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy145; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'y') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'y') goto yy1236; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1235: - YYDEBUG(1235, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == ')') goto yy139; - goto yy167; 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 yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 't') goto yy1237; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 't') goto yy1238; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1237: - YYDEBUG(1237, *YYCURSOR); +yy1238: + YYDEBUG(1238, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1238: - YYDEBUG(1238, *YYCURSOR); +yy1239: + YYDEBUG(1239, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1206; + if (yych <= 0x08) goto yy4; + goto yy1207; } else { - if (yych == ' ') goto yy1206; - goto yy3; + if (yych == ' ') goto yy1207; + goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy144; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1239: - YYDEBUG(1239, *YYCURSOR); +yy1240: + YYDEBUG(1240, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'T') goto yy142; + if (yych <= 'T') goto yy143; } } else { if (yych <= 't') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { - if (yych <= 'u') goto yy1240; - if (yych <= 'z') goto yy142; + if (yych <= 'u') goto yy1241; + if (yych <= 'z') goto yy143; goto yy167; } } -yy1240: - YYDEBUG(1240, *YYCURSOR); +yy1241: + YYDEBUG(1241, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy144; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'r') goto yy1241; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'r') goto yy1242; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1241: - YYDEBUG(1241, *YYCURSOR); +yy1242: + YYDEBUG(1242, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy145; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'd') goto yy1242; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'd') goto yy1243; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1242: - YYDEBUG(1242, *YYCURSOR); +yy1243: + YYDEBUG(1243, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'A') goto yy1243; - if (yych != 'a') goto yy3; + if (yych <= 'A') goto yy1244; + if (yych != 'a') goto yy4; } -yy1243: - YYDEBUG(1243, *YYCURSOR); +yy1244: + YYDEBUG(1244, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy56; -yy1244: - YYDEBUG(1244, *YYCURSOR); + goto yy57; +yy1245: + YYDEBUG(1245, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; - goto yy1255; + if (yych <= '@') goto yy4; + if (yych <= 'N') goto yy143; + goto yy1256; } } else { if (yych <= 'n') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 'o') goto yy1255; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'o') goto yy1256; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1245: - YYDEBUG(1245, *YYCURSOR); +yy1246: + YYDEBUG(1246, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy142; - goto yy1252; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy143; + goto yy1253; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 'e') goto yy1252; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'e') goto yy1253; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1246: - YYDEBUG(1246, *YYCURSOR); +yy1247: + YYDEBUG(1247, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -18092,7 +18392,7 @@ yy1246: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -18106,21 +18406,21 @@ yy1246: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'T') goto yy142; + if (yych != 'T') goto yy143; } } else { if (yych <= 's') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 't') goto yy1247; - if (yych <= 'z') goto yy142; + if (yych <= 't') goto yy1248; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy1247: - YYDEBUG(1247, *YYCURSOR); +yy1248: + YYDEBUG(1248, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -18134,7 +18434,7 @@ yy1247: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -18148,609 +18448,691 @@ yy1247: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'E') goto yy143; + if (yych != 'E') goto yy144; } } else { if (yych <= 'd') { if (yych <= '`') goto yy194; - goto yy143; + goto yy144; } else { - if (yych <= 'e') goto yy1248; - if (yych <= 'z') goto yy143; + if (yych <= 'e') goto yy1249; + if (yych <= 'z') goto yy144; goto yy194; } } } -yy1248: - YYDEBUG(1248, *YYCURSOR); +yy1249: + YYDEBUG(1249, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'L') goto yy145; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'm') goto yy1249; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'm') goto yy1250; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1249: - YYDEBUG(1249, *YYCURSOR); +yy1250: + YYDEBUG(1250, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'A') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'B') goto yy1250; - if (yych != 'b') goto yy3; + if (yych <= 'B') goto yy1251; + if (yych != 'b') goto yy4; } -yy1250: - YYDEBUG(1250, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1251; - if (yych != 'e') goto yy56; yy1251: YYDEBUG(1251, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych == 'r') goto yy206; - goto yy56; + 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 yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy144; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'n') goto yy1253; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'n') goto yy1254; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1253: - YYDEBUG(1253, *YYCURSOR); +yy1254: + YYDEBUG(1254, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy145; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 't') goto yy1254; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 't') goto yy1255; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1254: - YYDEBUG(1254, *YYCURSOR); +yy1255: + YYDEBUG(1255, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'G') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'H') goto yy1205; - if (yych == 'h') goto yy1205; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == 'h') goto yy1206; + goto yy4; } -yy1255: - YYDEBUG(1255, *YYCURSOR); +yy1256: + YYDEBUG(1256, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy144; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'n') goto yy1256; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'n') goto yy1257; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1256: - YYDEBUG(1256, *YYCURSOR); +yy1257: + YYDEBUG(1257, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1215; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy145; + goto yy1216; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'd') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'd') goto yy1216; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1257: - YYDEBUG(1257, *YYCURSOR); +yy1258: + YYDEBUG(1258, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= 'U') { + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= 'O') { - if (yych == 'C') goto yy1244; - goto yy141; - } else { - if (yych <= 'P') goto yy1246; - if (yych <= 'U') goto yy141; + 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 <= 'c') { - if (yych <= '_') { - if (yych <= 'Z') goto yy141; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'b') { + if (yych <= '^') { + if (yych <= 'V') goto yy1246; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych <= 'b') goto yy146; - goto yy1273; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + goto yy147; } } else { - if (yych <= 'u') { - if (yych == 'p') goto yy1275; - goto yy146; + if (yych <= 'p') { + if (yych <= 'c') goto yy1274; + if (yych <= 'o') goto yy147; + goto yy1276; } else { - if (yych <= 'v') goto yy1274; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych == 'v') goto yy1275; + if (yych <= 'z') goto yy147; + goto yy4; } } } -yy1258: - YYDEBUG(1258, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; - goto yy1239; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 't') goto yy1268; - if (yych <= 'z') goto yy146; - goto yy3; - } - } yy1259: YYDEBUG(1259, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; - goto yy1236; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1240; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'x') goto yy1265; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'W') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1232; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'X') goto yy1237; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1261; - if (yych <= 'z') goto yy146; - goto yy3; + 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 = 4; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; - goto yy1233; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'N') goto yy1233; if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1262; - if (yych <= 'z') goto yy151; - goto yy167; + 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 = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1234; + 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 yy3; - goto yy147; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych <= '`') goto yy3; - if (yych <= 'a') goto yy1263; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'A') goto yy1235; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1264; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'a') goto yy1264; + if (yych <= 'z') goto yy152; + goto yy4; } } yy1264: YYDEBUG(1264, *YYCURSOR); - yyaccept = 4; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy167; - goto yy147; + 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 <= '^') goto yy167; - goto yy147; + if (yych <= 'Y') goto yy1236; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy167; - if (yych <= 'z') goto yy154; - goto yy167; + 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 = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1237; - } + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '/') { + if (yych <= '.') goto yy167; + goto yy148; } else { - if (yych == 't') goto yy1266; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych == '_') goto yy148; + goto yy167; } } yy1266: YYDEBUG(1266, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'T') goto yy1238; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= ' ') goto yy1206; - if (yych == ')') goto yy139; - goto yy3; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy153; - goto yy3; + 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 = 4; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1207; + if (yych <= 0x1F) goto yy4; + goto yy1207; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy167; - if (yych <= 'T') goto yy142; - goto yy1240; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych == 'u') goto yy1269; - if (yych <= 'z') goto yy151; - goto yy167; + 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 = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'T') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; - goto yy1241; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy167; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'U') goto yy1241; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'r') goto yy1270; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1242; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'R') goto yy1242; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1271; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1243; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1243; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= 'a') goto yy1272; - if (yych <= 'z') goto yy154; - goto yy3; + 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); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy186; - goto yy155; -yy1273: - YYDEBUG(1273, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; - goto yy1255; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'A') goto yy1244; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy1284; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy142; - goto yy1252; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'O') goto yy1256; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1281; - if (yych <= 'z') goto yy151; - goto yy3; + 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') { @@ -18764,11 +19146,11 @@ yy1275: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -18776,26 +19158,26 @@ yy1275: if (yych <= '^') { if (yych <= 'S') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'T') goto yy1247; - if (yych <= 'Z') goto yy142; + if (yych <= 'T') goto yy1248; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 's') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 't') goto yy1276; + if (yych <= 't') goto yy1277; if (yych <= 'z') goto yy151; goto yy194; } } } -yy1276: - YYDEBUG(1276, *YYCURSOR); +yy1277: + YYDEBUG(1277, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -18809,11 +19191,11 @@ yy1276: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -18821,297 +19203,329 @@ yy1276: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy143; + goto yy144; } else { - if (yych <= 'E') goto yy1248; - if (yych <= 'Z') goto yy143; + if (yych <= 'E') goto yy1249; + if (yych <= 'Z') goto yy144; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy152; } else { - if (yych <= 'e') goto yy1277; + if (yych <= 'e') goto yy1278; if (yych <= 'z') goto yy152; goto yy194; } } } -yy1277: - YYDEBUG(1277, *YYCURSOR); +yy1278: + YYDEBUG(1278, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'L') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy144; - goto yy1249; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'M') goto yy1250; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'm') goto yy1278; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 'l') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 'm') goto yy1279; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy1278: - YYDEBUG(1278, *YYCURSOR); +yy1279: + YYDEBUG(1279, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'A') goto yy3; - goto yy1250; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'B') goto yy1251; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych == 'b') goto yy1279; + if (yych == 'b') goto yy1280; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } -yy1279: - YYDEBUG(1279, *YYCURSOR); +yy1280: + YYDEBUG(1280, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1251; + if (yych == 'E') goto yy1252; if (yych != 'e') goto yy155; - YYDEBUG(1280, *YYCURSOR); + YYDEBUG(1281, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'R') goto yy206; if (yych == 'r') goto yy377; goto yy155; -yy1281: - YYDEBUG(1281, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; - goto yy1253; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'n') goto yy1282; - if (yych <= 'z') goto yy152; - goto yy3; - } - } yy1282: YYDEBUG(1282, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; - goto yy1254; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'N') goto yy1254; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1283; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= 'G') goto yy3; - goto yy1205; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1255; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1223; - if (yych <= 'z') goto yy154; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; - goto yy1256; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych == 'n') goto yy1285; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych == 'h') goto yy1224; + if (yych <= 'z') goto yy154; + goto yy4; } } yy1285: YYDEBUG(1285, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1215; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'N') goto yy1257; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1227; - if (yych <= 'z') goto yy153; - goto yy3; + 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); - yych = *++YYCURSOR; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'C') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= 'b') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= '_') { + if (yych <= 'D') goto yy1216; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= 'c') goto yy1287; - if (yych <= 'z') goto yy141; - goto yy3; + 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 <= 'K') { + if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy142; } } else { - if (yych <= 'j') { + if (yych <= 'b') { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy142; } else { - if (yych <= 'k') goto yy1288; + if (yych <= 'c') goto yy1288; if (yych <= 'z') goto yy142; - goto yy3; + goto yy4; } } yy1288: YYDEBUG(1288, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych == ' ') goto yy1289; - if (yych <= '(') goto yy3; - goto yy139; + 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 <= 'Z') { - if (yych <= '@') goto yy3; + if (yych <= 'j') { + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; goto yy143; } else { - if (yych <= '`') goto yy3; + if (yych <= 'k') goto yy1289; if (yych <= 'z') goto yy143; - goto yy3; + goto yy4; } } yy1289: YYDEBUG(1289, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1290; - if (yych != 'o') goto yy56; + 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 == 'F') goto yy1291; - if (yych != 'f') goto yy56; + if (yych == 'O') goto yy1291; + if (yych != 'o') goto yy57; yy1291: YYDEBUG(1291, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ' ') goto yy56; + if (yych == 'F') goto yy1292; + if (yych != 'f') goto yy57; +yy1292: YYDEBUG(1292, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy1293; - if (yych <= '2') goto yy1295; - if (yych <= '9') goto yy1296; - goto yy56; -yy1293: + if (yych != ' ') goto yy57; YYDEBUG(1293, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1297; - if (yych <= '9') goto yy1296; - goto yy1297; + 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); { DEBUG_OUTPUT("backof | frontof"); TIMELIB_INIT; @@ -19133,344 +19547,356 @@ yy1294: TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -yy1295: - YYDEBUG(1295, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1297; - if (yych >= '5') goto yy1297; 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; -yy1297: - YYDEBUG(1297, *YYCURSOR); +yy1298: + YYDEBUG(1298, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy1296; - goto yy1294; + if (yych == '\t') goto yy1297; + goto yy1295; } else { - if (yych <= ' ') goto yy1296; - if (yych <= '@') goto yy1294; + if (yych <= ' ') goto yy1297; + if (yych <= '@') goto yy1295; } } else { if (yych <= '`') { - if (yych != 'P') goto yy1294; + if (yych != 'P') goto yy1295; } else { - if (yych <= 'a') goto yy1298; - if (yych != 'p') goto yy1294; + if (yych <= 'a') goto yy1299; + if (yych != 'p') goto yy1295; } } -yy1298: - YYDEBUG(1298, *YYCURSOR); +yy1299: + YYDEBUG(1299, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy1300; - if (yych == 'm') goto yy1300; - goto yy56; + if (yych <= 'M') goto yy1301; + if (yych == 'm') goto yy1301; + goto yy57; } - YYDEBUG(1299, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1300; - if (yych != 'm') goto yy56; -yy1300: 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 yy1302; - if (yych == '\t') goto yy1302; - goto yy56; + if (yych <= 0x00) goto yy1303; + if (yych == '\t') goto yy1303; + goto yy57; } else { - if (yych <= ' ') goto yy1302; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy1303; + if (yych != '.') goto yy57; } - YYDEBUG(1301, *YYCURSOR); + YYDEBUG(1302, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy1302; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy1303; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy1302: - YYDEBUG(1302, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1294; yy1303: YYDEBUG(1303, *YYCURSOR); + yych = *++YYCURSOR; + goto yy1295; +yy1304: + YYDEBUG(1304, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'B') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; - goto yy1287; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'C') goto yy1288; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'c') goto yy1304; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'b') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 'c') goto yy1305; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy1304: - YYDEBUG(1304, *YYCURSOR); +yy1305: + YYDEBUG(1305, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'K') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'J') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; - goto yy1288; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'K') goto yy1289; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'k') goto yy1305; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych <= 'j') { + if (yych <= '`') goto yy4; + goto yy151; + } else { + if (yych <= 'k') goto yy1306; + if (yych <= 'z') goto yy151; + goto yy4; + } } } -yy1305: - YYDEBUG(1305, *YYCURSOR); +yy1306: + YYDEBUG(1306, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { + if (yych <= '.') { if (yych <= '(') { - if (yych == ' ') goto yy1289; - goto yy3; + if (yych == ' ') goto yy1290; + goto yy4; } else { - if (yych <= ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= ')') goto yy140; + if (yych == '-') goto yy148; + goto yy4; } } else { if (yych <= '^') { - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= '/') goto yy148; + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } -yy1306: - YYDEBUG(1306, *YYCURSOR); +yy1307: + YYDEBUG(1307, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy142; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 's') goto yy1307; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 's') goto yy1308; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1307: - YYDEBUG(1307, *YYCURSOR); +yy1308: + YYDEBUG(1308, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 't') goto yy1308; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 't') goto yy1309; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1308: - YYDEBUG(1308, *YYCURSOR); +yy1309: + YYDEBUG(1309, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1104; + if (yych <= 0x08) goto yy4; + goto yy1105; } else { - if (yych != ' ') goto yy3; + if (yych != ' ') goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy143; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1309: - YYDEBUG(1309, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1310; - if (yych != 'd') goto yy1105; yy1310: YYDEBUG(1310, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1311; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1311; + if (yych != 'd') goto yy1106; yy1311: YYDEBUG(1311, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1312; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy1312; + if (yych != 'a') goto yy57; yy1312: YYDEBUG(1312, *YYCURSOR); - yyaccept = 29; + 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 yy1314; + if (yych != ' ') goto yy1118; } else { - if (yych <= 'S') goto yy1142; - if (yych == 's') goto yy1142; - } -yy1313: - YYDEBUG(1313, *YYCURSOR); - { - 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; + if (yych <= 'S') goto yy1143; + if (yych == 's') goto yy1143; + goto yy1118; } -yy1314: YYDEBUG(1314, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'O') goto yy1315; - if (yych != 'o') goto yy56; + if (yych != 'o') goto yy57; yy1315: YYDEBUG(1315, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy1316; - if (yych != 'f') goto yy56; + if (yych != 'f') goto yy57; yy1316: YYDEBUG(1316, *YYCURSOR); yych = *++YYCURSOR; - goto yy1313; + goto yy2; yy1317: YYDEBUG(1317, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; - goto yy1307; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1308; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1318; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1308; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1309; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1319; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 0x1F) { - if (yych == '\t') goto yy1104; - goto yy3; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1105; + if (yych <= 0x1F) goto yy4; + goto yy1310; } else { - if (yych <= ' ') goto yy1309; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= '_') { + if (yych <= '^') goto yy4; + goto yy148; + } else { + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy152; + goto yy4; + } } } yy1320: @@ -19478,22 +19904,22 @@ yy1320: yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy142; goto yy1356; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'b') goto yy1356; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1321: @@ -19501,23 +19927,23 @@ yy1321: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'F') goto yy1346; - if (yych <= 'Q') goto yy141; + if (yych <= 'Q') goto yy142; goto yy1345; } } else { if (yych <= 'f') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'e') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1322: @@ -19525,22 +19951,22 @@ yy1322: yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'T') goto yy142; goto yy1342; } } else { if (yych <= 't') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'u') goto yy1342; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1323: @@ -19548,22 +19974,22 @@ yy1323: yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'I') goto yy1325; - if (yych <= 'N') goto yy141; + if (yych <= 'N') goto yy142; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1324: @@ -19571,22 +19997,22 @@ yy1324: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy143; goto yy1328; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'n') goto yy1328; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1325: @@ -19595,19 +20021,19 @@ yy1325: if (yych <= 'D') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; + if (yych <= 'C') goto yy143; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 'd') goto yy1326; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -19615,16 +20041,16 @@ yy1326: YYDEBUG(1326, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { if (yych <= 'a') goto yy1327; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1327: @@ -19632,22 +20058,22 @@ yy1327: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy145; + goto yy1236; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'y') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'y') goto yy1236; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1328: @@ -19655,21 +20081,21 @@ yy1328: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 't') goto yy1329; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1329: @@ -19678,39 +20104,39 @@ yy1329: yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych == ' ') goto yy1330; - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { if (yych <= 'Z') { - if (yych <= '@') goto yy3; - goto yy144; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy144; - goto yy3; + 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 yy56; + if (yych != 'o') goto yy57; yy1331: YYDEBUG(1331, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy1332; - if (yych != 'f') goto yy56; + if (yych != 'f') goto yy57; yy1332: YYDEBUG(1332, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; YYDEBUG(1333, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '1') goto yy1334; if (yych <= '2') goto yy1335; if (yych <= '9') goto yy1336; - goto yy56; + goto yy57; yy1334: YYDEBUG(1334, *YYCURSOR); yyaccept = 28; @@ -19735,74 +20161,74 @@ yy1337: if (yych <= 'A') { if (yych <= 0x1F) { if (yych == '\t') goto yy1336; - goto yy1294; + goto yy1295; } else { if (yych <= ' ') goto yy1336; - if (yych <= '@') goto yy1294; + if (yych <= '@') goto yy1295; } } else { if (yych <= '`') { - if (yych != 'P') goto yy1294; + if (yych != 'P') goto yy1295; } else { if (yych <= 'a') goto yy1338; - if (yych != 'p') goto yy1294; + if (yych != 'p') goto yy1295; } } yy1338: YYDEBUG(1338, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { if (yych <= 'M') goto yy1340; if (yych == 'm') goto yy1340; - goto yy56; + goto yy57; } YYDEBUG(1339, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'M') goto yy1340; - if (yych != 'm') goto yy56; + if (yych != 'm') goto yy57; yy1340: YYDEBUG(1340, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy1302; - if (yych == '\t') goto yy1302; - goto yy56; + if (yych <= 0x00) goto yy1303; + if (yych == '\t') goto yy1303; + goto yy57; } else { - if (yych <= ' ') goto yy1302; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy1303; + if (yych != '.') goto yy57; } YYDEBUG(1341, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy1302; - if (yych <= 0x08) goto yy56; - goto yy1302; + if (yych <= 0x00) goto yy1303; + if (yych <= 0x08) goto yy57; + goto yy1303; } else { - if (yych == ' ') goto yy1302; - goto yy56; + if (yych == ' ') goto yy1303; + goto yy57; } yy1342: YYDEBUG(1342, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy143; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'r') goto yy1343; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1343: @@ -19810,21 +20236,21 @@ yy1343: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 't') goto yy1344; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1344: @@ -19832,22 +20258,22 @@ yy1344: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy144; - goto yy1215; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy145; + goto yy1216; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'h') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'h') goto yy1216; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1345: @@ -19855,22 +20281,22 @@ yy1345: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy143; goto yy1348; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 's') goto yy1348; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1346: @@ -19878,21 +20304,21 @@ yy1346: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1347; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1347: @@ -19900,22 +20326,22 @@ yy1347: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy1239; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1348: @@ -19923,21 +20349,21 @@ yy1348: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 't') goto yy1349; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1349: @@ -19946,58 +20372,58 @@ yy1349: yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1206; + if (yych <= 0x08) goto yy4; + goto yy1207; } else { - if (yych != ' ') goto yy3; + if (yych != ' ') goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy144; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy144; - goto yy3; + 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 yy1207; + if (yych != 'd') goto yy1208; yy1351: YYDEBUG(1351, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy1352; - if (yych != 'a') goto yy56; + if (yych != 'a') goto yy57; yy1352: YYDEBUG(1352, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy1353; - if (yych != 'y') goto yy56; + if (yych != 'y') goto yy57; yy1353: YYDEBUG(1353, *YYCURSOR); - yyaccept = 29; + yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'R') { - if (yych != ' ') goto yy1313; + if (yych != ' ') goto yy1118; } else { - if (yych <= 'S') goto yy1142; - if (yych == 's') goto yy1142; - goto yy1313; + 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 yy56; + if (yych != 'o') goto yy57; yy1355: YYDEBUG(1355, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy1316; if (yych == 'f') goto yy1316; - goto yy56; + goto yy57; yy1356: YYDEBUG(1356, *YYCURSOR); yyaccept = 5; @@ -20013,7 +20439,7 @@ yy1356: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -20027,15 +20453,15 @@ yy1356: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'R') goto yy142; + if (yych != 'R') goto yy143; } } else { if (yych <= 'q') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'r') goto yy1357; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -20045,37 +20471,37 @@ yy1357: yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'T') goto yy144; } } else { if (yych <= 't') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'u') goto yy1358; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1358: YYDEBUG(1358, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') goto yy145; + goto yy4; } else { if (yych <= 'a') goto yy1359; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1359: @@ -20083,80 +20509,88 @@ yy1359: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'Q') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'R') goto yy1360; - if (yych != 'r') goto yy3; + if (yych != 'r') goto yy4; } yy1360: YYDEBUG(1360, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy206; if (yych == 'y') goto yy206; - goto yy56; + goto yy57; yy1361: YYDEBUG(1361, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy141; - goto yy1356; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy1356; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy1379; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'R') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'Q') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'E') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'F') goto yy1346; - if (yych <= 'Q') goto yy141; - goto yy1345; + if (yych == 'F') goto yy1346; + goto yy142; } } } else { - if (yych <= 'e') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'R') goto yy1345; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'q') { - if (yych <= 'f') goto yy1375; - goto yy146; + if (yych == 'f') goto yy1375; + goto yy147; } else { if (yych <= 'r') goto yy1374; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -20164,64 +20598,72 @@ yy1363: YYDEBUG(1363, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'T') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy141; - goto yy1342; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'U') goto yy1342; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'u') goto yy1371; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'O') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'N') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'H') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'I') goto yy1325; - if (yych <= 'N') goto yy141; - goto yy1324; + if (yych == 'I') goto yy1325; + goto yy142; } } } else { - if (yych <= 'h') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'O') goto yy1324; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'n') { - if (yych <= 'i') goto yy1366; - goto yy146; + if (yych == 'i') goto yy1366; + goto yy147; } else { if (yych <= 'o') goto yy1365; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -20229,351 +20671,423 @@ yy1365: YYDEBUG(1365, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; - goto yy1328; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1328; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1369; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; - goto yy1326; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'D') goto yy1326; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'd') goto yy1367; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1327; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1327; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1368; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } yy1368: YYDEBUG(1368, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'Y') goto yy1236; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1264; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1329; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1329; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1370; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= '(') { if (yych == ' ') goto yy1330; - goto yy3; + goto yy4; } else { - if (yych <= ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= ')') goto yy140; + if (yych == '-') goto yy148; + goto yy4; } } else { if (yych <= '^') { - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= '/') goto yy148; + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy145; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy1371: YYDEBUG(1371, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy142; - goto yy1343; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1343; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1372; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1344; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1344; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1373; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy144; - goto yy1215; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1216; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1227; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy142; - goto yy1348; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1348; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1377; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1347; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1347; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1376; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1349; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1349; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1378; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1207; + if (yych <= 0x1F) goto yy4; + goto yy1350; } else { - if (yych <= ' ') goto yy1350; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= '_') { + if (yych <= '^') goto yy4; + goto yy148; + } else { + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy153; + goto yy4; + } } } yy1379: @@ -20591,11 +21105,11 @@ yy1379: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -20603,15 +21117,15 @@ yy1379: if (yych <= '^') { if (yych <= 'Q') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'R') goto yy1357; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'q') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -20625,73 +21139,81 @@ yy1380: YYDEBUG(1380, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'T') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy143; - goto yy1358; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'U') goto yy1358; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'u') goto yy1381; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1359; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1359; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1382; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy1382: YYDEBUG(1382, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'Q') goto yy3; - goto yy1360; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'R') goto yy1360; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'r') goto yy1383; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1383: @@ -20703,8 +21225,8 @@ yy1383: yy1384: YYDEBUG(1384, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy1385: YYDEBUG(1385, *YYCURSOR); ++YYCURSOR; @@ -20743,22 +21265,22 @@ yy1388: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; goto yy1429; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'n') goto yy1429; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1389: @@ -20766,23 +21288,23 @@ yy1389: yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'I') goto yy1421; - if (yych <= 'T') goto yy141; + if (yych <= 'T') goto yy142; goto yy1422; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1390: @@ -20790,23 +21312,23 @@ yy1390: yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'D') goto yy1410; - if (yych <= 'L') goto yy141; + if (yych <= 'L') goto yy142; goto yy1411; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'c') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1391: @@ -20814,22 +21336,22 @@ yy1391: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; goto yy1406; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'e') goto yy1406; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1392: @@ -20837,109 +21359,109 @@ yy1392: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; goto yy1402; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'e') goto yy1402; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1393: YYDEBUG(1393, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + goto yy57; } else { if (yych <= '9') goto yy1396; - if (yych <= ':') goto yy1064; - goto yy56; + if (yych <= ':') goto yy1065; + goto yy57; } yy1394: YYDEBUG(1394, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + goto yy57; } else { if (yych <= '4') goto yy1396; - if (yych == ':') goto yy1064; - goto yy56; + if (yych == ':') goto yy1065; + goto yy57; } yy1395: YYDEBUG(1395, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '.') goto yy1064; - if (yych == ':') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + if (yych == ':') goto yy1065; + goto yy57; yy1396: YYDEBUG(1396, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + goto yy57; } else { if (yych <= '5') goto yy1397; - if (yych == ':') goto yy1064; - goto yy56; + if (yych == ':') goto yy1065; + goto yy57; } yy1397: YYDEBUG(1397, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(1398, *YYCURSOR); yyaccept = 24; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1067; + if (yych <= '/') goto yy1068; if (yych <= '5') goto yy1399; if (yych <= '6') goto yy1400; - goto yy1067; + goto yy1068; yy1399: YYDEBUG(1399, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '9') goto yy1401; - goto yy56; + goto yy57; yy1400: YYDEBUG(1400, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '0') goto yy56; + if (yych != '0') goto yy57; yy1401: YYDEBUG(1401, *YYCURSOR); yych = *++YYCURSOR; - goto yy1075; + goto yy1076; yy1402: YYDEBUG(1402, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'K') goto yy143; } } else { if (yych <= 'k') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'l') goto yy1403; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1403: @@ -20947,21 +21469,21 @@ yy1403: yych = *++YYCURSOR; if (yych <= 'F') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'E') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'E') goto yy144; } } else { if (yych <= 'e') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'f') goto yy1404; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1404: @@ -20969,21 +21491,21 @@ yy1404: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy145; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 't') goto yy1405; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1405: @@ -20991,12 +21513,12 @@ yy1405: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'G') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'H') goto yy1205; - if (yych == 'h') goto yy1205; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == 'h') goto yy1206; + goto yy4; } yy1406: YYDEBUG(1406, *YYCURSOR); @@ -21004,19 +21526,19 @@ yy1406: if (yych <= 'S') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'R') goto yy142; + if (yych <= 'R') goto yy143; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 's') goto yy1407; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -21025,65 +21547,65 @@ yy1407: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy144; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'd') goto yy1408; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1408: YYDEBUG(1408, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') goto yy145; + goto yy4; } else { if (yych <= 'a') goto yy1409; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1409: YYDEBUG(1409, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy3; + goto yy4; } yy1410: YYDEBUG(1410, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; goto yy1418; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy142; - goto yy3; + if (yych <= 'Z') goto yy143; + goto yy4; } else { if (yych <= 'a') goto yy1418; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1411: @@ -21091,21 +21613,21 @@ yy1411: yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'N') goto yy143; } } else { if (yych <= 'n') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'o') goto yy1412; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1412: @@ -21113,21 +21635,21 @@ yy1412: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy144; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'r') goto yy1413; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1413: @@ -21135,21 +21657,21 @@ yy1413: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy145; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'r') goto yy1414; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1414: @@ -21157,17 +21679,17 @@ yy1414: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'N') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'O') goto yy1415; - if (yych != 'o') goto yy3; + if (yych != 'o') goto yy4; } yy1415: YYDEBUG(1415, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'W') goto yy1416; - if (yych != 'w') goto yy56; + if (yych != 'w') goto yy57; yy1416: YYDEBUG(1416, *YYCURSOR); ++YYCURSOR; @@ -21188,32 +21710,32 @@ yy1418: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy144; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'y') goto yy1419; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1419: YYDEBUG(1419, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy144; + if (yych <= 'Z') goto yy145; if (yych <= '`') goto yy1420; - if (yych <= 'z') goto yy144; + if (yych <= 'z') goto yy145; } yy1420: YYDEBUG(1420, *YYCURSOR); @@ -21230,23 +21752,23 @@ yy1421: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'Q') goto yy142; + if (yych <= 'Q') goto yy143; if (yych <= 'R') goto yy1427; goto yy1428; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + 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 yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1422: @@ -21255,19 +21777,19 @@ yy1422: if (yych <= 'R') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'Q') goto yy142; + if (yych <= 'Q') goto yy143; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 'r') goto yy1423; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -21276,21 +21798,21 @@ yy1423: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy144; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 's') goto yy1424; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1424: @@ -21298,21 +21820,21 @@ yy1424: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy145; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'd') goto yy1425; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1425: @@ -21320,39 +21842,39 @@ yy1425: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'A') goto yy1426; - if (yych != 'a') goto yy3; + if (yych != 'a') goto yy4; } yy1426: YYDEBUG(1426, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy56; + goto yy57; yy1427: YYDEBUG(1427, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy144; + goto yy1239; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'd') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'd') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1428: @@ -21361,21 +21883,21 @@ yy1428: yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1104; + if (yych <= 0x08) goto yy4; + goto yy1105; } else { - if (yych == ' ') goto yy1104; - goto yy3; + if (yych == ' ') goto yy1105; + goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy143; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1429: @@ -21383,21 +21905,21 @@ yy1429: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1430; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1430: @@ -21405,86 +21927,94 @@ yy1430: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy1239; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1431: YYDEBUG(1431, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1429; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1429; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1461; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'U') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'T') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'H') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'I') goto yy1421; - if (yych <= 'T') goto yy141; - goto yy1422; + if (yych == 'I') goto yy1421; + goto yy142; } } } else { - if (yych <= 'h') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'U') goto yy1422; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 't') { - if (yych <= 'i') goto yy1453; - goto yy146; + if (yych == 'i') goto yy1453; + goto yy147; } else { if (yych <= 'u') goto yy1454; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -21492,39 +22022,41 @@ yy1433: YYDEBUG(1433, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'L') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'C') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'D') goto yy1410; - if (yych <= 'L') goto yy141; - goto yy1411; + if (yych == 'D') goto yy1410; + goto yy142; } } } else { - if (yych <= 'c') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'M') goto yy1411; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'l') { - if (yych <= 'd') goto yy1444; - goto yy146; + if (yych == 'd') goto yy1444; + goto yy147; } else { if (yych <= 'm') goto yy1445; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -21532,369 +22064,434 @@ yy1434: YYDEBUG(1434, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1406; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy1406; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1440; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1402; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy1402; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1436; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'L') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'K') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy142; - goto yy1403; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'L') goto yy1403; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'l') goto yy1437; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'F') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'E') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'E') goto yy143; - goto yy1404; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'F') goto yy1404; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'f') goto yy1438; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; - goto yy1405; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1405; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1439; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'G') goto yy3; - goto yy1205; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych == 'h') goto yy1223; + if (yych == 'h') goto yy1224; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1440: YYDEBUG(1440, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'R') goto yy142; - goto yy1407; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'S') goto yy1407; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 's') goto yy1441; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy1408; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1408; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1442; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1409; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1409; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1443; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy1443: YYDEBUG(1443, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'X') goto yy3; - goto yy173; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'Y') goto yy173; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'y') goto yy186; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1444: YYDEBUG(1444, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1418; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1418; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1451; if (yych <= 'z') goto yy151; - goto yy3; + goto yy4; } } yy1445: YYDEBUG(1445, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; - goto yy1412; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'O') goto yy1412; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy1446; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; - goto yy1413; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1413; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1447; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; - goto yy1414; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1414; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1448; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'N') goto yy3; - goto yy1415; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'O') goto yy1415; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'o') goto yy1449; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1449: @@ -21903,60 +22500,69 @@ yy1449: if (yych == 'W') goto yy1416; if (yych != 'w') goto yy155; YYDEBUG(1450, *YYCURSOR); - yyaccept = 30; + yyaccept = 29; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy1417; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy1417; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy1417; } yy1451: YYDEBUG(1451, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy143; - goto yy1419; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'Y') goto yy1419; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1452; - if (yych <= 'z') goto yy152; - goto yy3; + 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 = 31; + yyaccept = 30; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy1420; - goto yy139; - } else { - if (yych == '/') goto yy147; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; goto yy1420; + } else { + if (yych == '.') goto yy1420; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy1420; - goto yy147; + 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; @@ -21966,22 +22572,30 @@ yy1453: YYDEBUG(1453, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy142; - if (yych <= 'R') goto yy1427; - goto yy1428; + 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') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + 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; @@ -21989,7 +22603,7 @@ yy1453: } else { if (yych <= 's') goto yy1460; if (yych <= 'z') goto yy151; - goto yy3; + goto yy4; } } } @@ -21997,98 +22611,118 @@ yy1454: YYDEBUG(1454, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'Q') goto yy142; - goto yy1423; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'R') goto yy1423; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'r') goto yy1455; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; - goto yy1424; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1424; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1456; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1425; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1425; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1457; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1426; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + 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 yy3; + goto yy4; } } yy1458: @@ -22101,101 +22735,123 @@ yy1459: YYDEBUG(1459, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 0x1F) { - if (yych == '\t') goto yy1104; - goto yy3; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1105; + if (yych <= 0x1F) goto yy4; + goto yy1105; } else { - if (yych <= ' ') goto yy1104; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1430; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1430; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1462; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'g') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'h') goto yy1268; + if (yych <= 'z') goto yy152; + goto yy4; + } } } yy1463: @@ -22203,23 +22859,23 @@ yy1463: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'R') goto yy1475; - if (yych <= 'X') goto yy141; + if (yych <= 'X') goto yy142; goto yy1476; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'q') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1464: @@ -22227,22 +22883,22 @@ yy1464: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy142; goto yy1469; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'd') goto yy1469; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1465: @@ -22250,21 +22906,21 @@ yy1465: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'n') goto yy1466; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1466: @@ -22273,19 +22929,19 @@ yy1466: if (yych <= 'D') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; + if (yych <= 'C') goto yy143; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 'd') goto yy1467; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -22293,16 +22949,16 @@ yy1467: YYDEBUG(1467, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { if (yych <= 'a') goto yy1468; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1468: @@ -22310,22 +22966,22 @@ yy1468: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy145; + goto yy1236; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'y') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'y') goto yy1236; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1469: @@ -22333,21 +22989,21 @@ yy1469: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy143; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'n') goto yy1470; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1470: @@ -22355,21 +23011,21 @@ yy1470: yych = *++YYCURSOR; if (yych <= 'I') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'H') goto yy144; } } else { if (yych <= 'h') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'i') goto yy1471; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1471: @@ -22377,21 +23033,21 @@ yy1471: yych = *++YYCURSOR; if (yych <= 'G') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'F') goto yy145; } } else { if (yych <= 'f') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'g') goto yy1472; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1472: @@ -22399,17 +23055,17 @@ yy1472: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'G') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'H') goto yy1473; - if (yych != 'h') goto yy3; + if (yych != 'h') goto yy4; } yy1473: YYDEBUG(1473, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'T') goto yy1474; - if (yych != 't') goto yy56; + if (yych != 't') goto yy57; yy1474: YYDEBUG(1474, *YYCURSOR); yych = *++YYCURSOR; @@ -22429,7 +23085,7 @@ yy1475: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -22444,15 +23100,15 @@ yy1475: goto yy194; } else { if (yych == 'C') goto yy1477; - goto yy142; + goto yy143; } } else { if (yych <= 'b') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'c') goto yy1477; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -22467,7 +23123,7 @@ yy1476: if (yych <= 0x1F) goto yy194; goto yy196; } else { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; if (yych <= ',') goto yy194; goto yy197; } @@ -22477,9 +23133,9 @@ yy1476: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -22488,61 +23144,63 @@ yy1477: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy395; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy396; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy395; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy396; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1478: YYDEBUG(1478, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'X') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'Q') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'R') goto yy1475; - if (yych <= 'X') goto yy141; - goto yy1476; + if (yych == 'R') goto yy1475; + goto yy142; } } } else { - if (yych <= 'q') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'Y') goto yy1476; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'x') { - if (yych <= 'r') goto yy1490; - goto yy146; + if (yych == 'r') goto yy1490; + goto yy147; } else { if (yych <= 'y') goto yy1491; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -22550,223 +23208,267 @@ yy1479: YYDEBUG(1479, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy141; - goto yy1469; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1469; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1484; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1466; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1466; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1481; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; - goto yy1467; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'D') goto yy1467; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'd') goto yy1482; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1468; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1468; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1483; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } yy1483: YYDEBUG(1483, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'Y') goto yy1236; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1264; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; - goto yy1470; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1470; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1485; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'I') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'H') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; - goto yy1471; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'I') goto yy1471; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'i') goto yy1486; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'G') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'F') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy144; - goto yy1472; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'G') goto yy1472; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'g') goto yy1487; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'G') goto yy3; - goto yy1473; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'H') goto yy1473; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'h') goto yy1488; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1488: @@ -22775,15 +23477,17 @@ yy1488: if (yych == 'T') goto yy1474; if (yych != 't') goto yy155; YYDEBUG(1489, *YYCURSOR); - yyaccept = 31; + yyaccept = 30; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy1420; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy1420; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy1420; } yy1490: @@ -22801,11 +23505,11 @@ yy1490: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -22813,15 +23517,15 @@ yy1490: if (yych <= '^') { if (yych <= 'B') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'C') goto yy1477; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'b') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -22843,23 +23547,23 @@ yy1491: } else { if (yych <= ')') { if (yych <= '(') goto yy194; - goto yy139; + goto yy140; } else { if (yych <= ',') goto yy194; - if (yych <= '-') goto yy197; + if (yych <= '-') goto yy372; goto yy196; } } } else { if (yych <= 'Z') { - if (yych <= '/') goto yy147; + if (yych <= '/') goto yy148; if (yych <= '9') goto yy196; if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= '_') { if (yych <= '^') goto yy194; - goto yy147; + goto yy148; } else { if (yych <= '`') goto yy194; if (yych <= 'z') goto yy151; @@ -22871,25 +23575,31 @@ yy1492: YYDEBUG(1492, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy395; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy396; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy406; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'g') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'h') goto yy407; + if (yych <= 'z') goto yy152; + goto yy4; + } } } yy1493: @@ -22897,29 +23607,29 @@ yy1493: yych = *++YYCURSOR; if (yych <= 'W') { if (yych <= 'N') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy141; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'O') goto yy1501; - if (yych <= 'U') goto yy141; + if (yych <= 'U') goto yy142; if (yych <= 'V') goto yy1502; goto yy1499; } } else { if (yych <= 'o') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'n') goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + if (yych <= 'n') goto yy142; goto yy1501; } else { if (yych <= 'v') { - if (yych <= 'u') goto yy141; + if (yych <= 'u') goto yy142; goto yy1502; } else { if (yych <= 'w') goto yy1499; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } } @@ -22928,22 +23638,22 @@ yy1494: yych = *++YYCURSOR; if (yych <= 'X') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'W') goto yy142; goto yy1498; } } else { if (yych <= 'w') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'x') goto yy1498; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1495: @@ -22951,21 +23661,21 @@ yy1495: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'n') goto yy1496; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1496: @@ -22973,21 +23683,21 @@ yy1496: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1497; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1497: @@ -22995,22 +23705,22 @@ yy1497: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy1239; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1498: @@ -23018,33 +23728,33 @@ yy1498: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; goto yy1428; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1428; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1499: YYDEBUG(1499, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy1500; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; } yy1500: YYDEBUG(1500, *YYCURSOR); @@ -23060,22 +23770,22 @@ yy1501: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy143; goto yy1507; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'n') goto yy1507; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1502: @@ -23093,7 +23803,7 @@ yy1502: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -23107,15 +23817,15 @@ yy1502: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'E') goto yy142; + if (yych != 'E') goto yy143; } } else { if (yych <= 'd') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'e') goto yy1503; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -23125,21 +23835,21 @@ yy1503: yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'L') goto yy144; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'm') goto yy1504; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1504: @@ -23147,21 +23857,21 @@ yy1504: yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy145; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'b') goto yy1505; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1505: @@ -23169,27 +23879,27 @@ yy1505: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'E') goto yy1506; - if (yych != 'e') goto yy3; + if (yych != 'e') goto yy4; } yy1506: YYDEBUG(1506, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'R') goto yy206; if (yych == 'r') goto yy206; - goto yy56; + goto yy57; yy1507: YYDEBUG(1507, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy143; + if (yych <= 'Z') goto yy144; if (yych <= '`') goto yy1508; - if (yych <= 'z') goto yy143; + if (yych <= 'z') goto yy144; } yy1508: YYDEBUG(1508, *YYCURSOR); @@ -23207,44 +23917,46 @@ yy1509: YYDEBUG(1509, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'W') { - if (yych <= '@') { + if (yych <= 'V') { + if (yych <= '.') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '-') goto yy148; + goto yy4; } } else { - if (yych <= 'O') { - if (yych <= 'N') goto yy141; - goto yy1501; + if (yych <= 'N') { + if (yych <= '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } else { - if (yych <= 'U') goto yy141; - if (yych <= 'V') goto yy1502; - goto yy1499; + if (yych <= 'O') goto yy1501; + if (yych <= 'U') goto yy142; + goto yy1502; } } } else { if (yych <= 'n') { if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= 'W') goto yy1499; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + goto yy147; } } else { if (yych <= 'v') { if (yych <= 'o') goto yy1516; - if (yych <= 'u') goto yy146; + if (yych <= 'u') goto yy147; goto yy1517; } else { if (yych <= 'w') goto yy1515; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -23252,145 +23964,176 @@ yy1510: YYDEBUG(1510, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'W') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; - goto yy1498; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'X') goto yy1498; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'x') goto yy1514; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1496; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1496; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1512; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1497; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1497; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1513; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1428; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1428; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1460; - if (yych <= 'z') goto yy151; - goto yy3; + 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 = 32; + yyaccept = 31; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy1500; - goto yy139; - } else { - if (yych == '/') goto yy147; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; goto yy1500; + } else { + if (yych == '.') goto yy1500; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy1500; - goto yy147; + 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; @@ -23400,25 +24143,31 @@ yy1516: YYDEBUG(1516, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; - goto yy1507; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1507; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1522; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych <= 'm') { + if (yych <= '`') goto yy4; + goto yy151; + } else { + if (yych <= 'n') goto yy1522; + if (yych <= 'z') goto yy151; + goto yy4; + } } } yy1517: @@ -23436,11 +24185,11 @@ yy1517: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -23448,15 +24197,15 @@ yy1517: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'E') goto yy1503; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -23470,73 +24219,86 @@ yy1518: YYDEBUG(1518, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'L') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; - goto yy1504; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'M') goto yy1504; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'm') goto yy1519; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; - goto yy1505; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy1505; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy1520; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'D') goto yy3; - goto yy1506; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'E') goto yy1506; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'e') goto yy1521; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1521: @@ -23547,22 +24309,23 @@ yy1521: goto yy155; yy1522: YYDEBUG(1522, *YYCURSOR); - yyaccept = 33; + yyaccept = 32; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy1508; - goto yy139; - } else { - if (yych == '/') goto yy147; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; goto yy1508; + } else { + if (yych == '.') goto yy1508; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy1508; - goto yy147; + 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; @@ -23573,21 +24336,21 @@ yy1523: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy142; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 's') goto yy1524; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1524: @@ -23595,21 +24358,21 @@ yy1524: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1525; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1525: @@ -23617,21 +24380,21 @@ yy1525: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy144; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'e') goto yy1526; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1526: @@ -23639,21 +24402,21 @@ yy1526: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy145; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'r') goto yy1527; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1527: @@ -23661,22 +24424,22 @@ yy1527: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'C') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'D') goto yy1528; - if (yych != 'd') goto yy3; + if (yych != 'd') goto yy4; } yy1528: YYDEBUG(1528, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy1529; - if (yych != 'a') goto yy56; + if (yych != 'a') goto yy57; yy1529: YYDEBUG(1529, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy1530; - if (yych != 'y') goto yy56; + if (yych != 'y') goto yy57; yy1530: YYDEBUG(1530, *YYCURSOR); ++YYCURSOR; @@ -23696,123 +24459,148 @@ yy1532: YYDEBUG(1532, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; - goto yy1524; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1524; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1533; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1525; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1525; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1534; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; - goto yy1526; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy1526; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1535; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; - goto yy1527; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1527; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1536; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'C') goto yy3; - goto yy1528; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'D') goto yy1528; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'd') goto yy1537; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1537: @@ -23825,22 +24613,24 @@ yy1537: if (yych == 'Y') goto yy1530; if (yych != 'y') goto yy155; YYDEBUG(1539, *YYCURSOR); - yyaccept = 34; + yyaccept = 33; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy1531; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy1531; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy1531; } } } -#define YYMAXFILL 30 +#define YYMAXFILL 31 timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb) { @@ -24059,10 +24849,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim TIMELIB_CHECK_NUMBER; tptr = ptr; - if ((f = timelib_get_nr((char **) &ptr, 6)) == TIMELIB_UNSET || ptr - tptr != 6) { + 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 / 1000000); + s->time->f = (f / pow(10, (ptr - tptr))); } } break; diff --git a/ext/date/lib/parse_date.c.orig b/ext/date/lib/parse_date.c.orig index 04dd383c6..fa86b2898 100644 --- a/ext/date/lib/parse_date.c.orig +++ b/ext/date/lib/parse_date.c.orig @@ -1,10 +1,10 @@ -/* Generated by re2c 0.13.5 on Wed Feb 10 15:19:23 2010 */ +/* Generated by re2c 0.13.5 on Fri Mar 26 12:00:44 2010 */ #line 1 "ext/date/lib/parse_date.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | 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 | @@ -18,12 +18,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.c 294880 2010-02-11 11:11:47Z pajoye $ */ +/* $Id: parse_date.c 301252 2010-07-13 23:59:54Z kalle $ */ #include "timelib.h" #include <stdio.h> #include <ctype.h> +#include <math.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -90,6 +91,8 @@ #define TIMELIB_ERROR 999 +/* Some compilers like AIX, defines uchar in sys/types.h */ +#undef uchar typedef unsigned char uchar; #define BSIZE 8192 @@ -525,7 +528,7 @@ static long timelib_parse_tz_cor(char **ptr) char *begin = *ptr, *end; long tmp; - while (**ptr != '\0') { + while (isdigit(**ptr) || **ptr == ':') { ++*ptr; } end = *ptr; @@ -840,31 +843,31 @@ static int scan(Scanner *s) std: s->tok = cursor; s->len = 0; -#line 966 "ext/date/lib/parse_date.re" +#line 967 "ext/date/lib/parse_date.re" -#line 848 "ext/date/lib/parse_date.c" +#line 849 "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, 104, 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, - 104, 0, 0, 0, 0, 0, 0, 0, + 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 64, 160, 96, 0, - 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, - 0, 16, 16, 16, 80, 16, 16, 16, - 80, 16, 16, 16, 16, 16, 80, 16, - 16, 16, 80, 80, 80, 16, 16, 16, - 16, 16, 16, 0, 0, 0, 0, 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, @@ -884,58 +887,58 @@ std: }; YYDEBUG(0, *YYCURSOR); - if ((YYLIMIT - YYCURSOR) < 30) YYFILL(30); + if ((YYLIMIT - YYCURSOR) < 31) YYFILL(31); yych = *YYCURSOR; YYDEBUG(-1, yych); switch (yych) { case 0x00: - case '\n': goto yy51; + case '\n': goto yy52; case '\t': - case ' ': goto yy48; - case '(': goto yy45; + case ' ': goto yy49; + case '(': goto yy46; case '+': - case '-': goto yy30; + case '-': goto yy31; case ',': - case '.': goto yy50; - case '0': goto yy25; - case '1': goto yy26; - case '2': goto yy27; - case '3': goto yy28; + 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 yy29; - case '@': goto yy11; - case 'A': goto yy36; - case 'B': goto yy17; + 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 yy46; - case 'D': goto yy40; - case 'E': goto yy21; - case 'F': goto yy13; - case 'G': goto yy44; - case 'I': goto yy31; - case 'J': goto yy34; - case 'L': goto yy15; - case 'M': goto yy7; - case 'N': goto yy5; - case 'O': goto yy38; - case 'P': goto yy23; - case 'S': goto yy19; - case 'T': goto yy9; - case 'V': goto yy32; - case 'W': goto yy42; - case 'X': goto yy33; - case 'Y': goto yy2; - case 'a': goto yy37; - case 'b': goto yy18; + 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': @@ -946,45 +949,64 @@ std: case 'u': case 'v': case 'x': - case 'z': goto yy47; - case 'd': goto yy41; - case 'e': goto yy22; - case 'f': goto yy14; - 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 'w': goto yy43; - case 'y': goto yy4; - default: goto yy53; + 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 1052 "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 985 "ext/date/lib/parse_date.c" +yy3: + YYDEBUG(3, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= 'E') { if (yych <= ')') { - if (yych >= ')') goto yy139; + if (yych >= ')') goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1523; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych >= 'a') goto yy145; + if (yych <= 'Z') goto yy141; + if (yych >= 'a') goto yy146; } else { if (yych <= 'e') goto yy1532; - if (yych <= 'z') goto yy145; + if (yych <= 'z') goto yy146; } } -yy3: - YYDEBUG(3, *YYCURSOR); -#line 1633 "ext/date/lib/parse_date.re" +yy4: + YYDEBUG(4, *YYCURSOR); +#line 1634 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("tzcorrection | tz"); @@ -997,173 +1019,173 @@ yy3: TIMELIB_DEINIT; return TIMELIB_TIMEZONE; } -#line 1001 "ext/date/lib/parse_date.c" -yy4: - YYDEBUG(4, *YYCURSOR); +#line 1021 "ext/date/lib/parse_date.c" +yy5: + YYDEBUG(5, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1523; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy1523; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy5: - YYDEBUG(5, *YYCURSOR); +yy6: + YYDEBUG(6, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'D') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'H') { if (yych <= 'E') goto yy1494; - goto yy140; + goto yy141; } else { if (yych <= 'I') goto yy1495; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1493; } } } else { if (yych <= 'h') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { if (yych == 'e') goto yy1510; - goto yy145; + goto yy146; } } else { if (yych <= 'n') { if (yych <= 'i') goto yy1511; - goto yy145; + goto yy146; } else { if (yych <= 'o') goto yy1509; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy6: - YYDEBUG(6, *YYCURSOR); +yy7: + YYDEBUG(7, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'D') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'H') { if (yych <= 'E') goto yy1494; - goto yy140; + goto yy141; } else { if (yych <= 'I') goto yy1495; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1493; } } } else { if (yych <= 'h') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { if (yych == 'e') goto yy1494; - goto yy140; + goto yy141; } } else { if (yych <= 'n') { if (yych <= 'i') goto yy1495; - goto yy140; + goto yy141; } else { if (yych <= 'o') goto yy1493; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy7: - YYDEBUG(7, *YYCURSOR); +yy8: + YYDEBUG(8, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; goto yy1463; } else { if (yych == 'I') goto yy1464; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1465; } } else { if (yych <= 'h') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1478; - goto yy145; + goto yy146; } else { if (yych <= 'n') { if (yych <= 'i') goto yy1479; - goto yy145; + goto yy146; } else { if (yych <= 'o') goto yy1480; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy8: - YYDEBUG(8, *YYCURSOR); +yy9: + YYDEBUG(9, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; goto yy1463; } else { if (yych == 'I') goto yy1464; - if (yych <= 'N') goto yy140; + if (yych <= 'N') goto yy141; goto yy1465; } } else { if (yych <= 'h') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1463; - goto yy140; + goto yy141; } else { if (yych <= 'n') { if (yych <= 'i') goto yy1464; - goto yy140; + goto yy141; } else { if (yych <= 'o') goto yy1465; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy9: - YYDEBUG(9, *YYCURSOR); +yy10: + YYDEBUG(10, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case ')': goto yy139; + case ')': goto yy140; case '0': case '1': goto yy1393; case '2': goto yy1394; @@ -1194,7 +1216,7 @@ yy9: case 'V': case 'X': case 'Y': - case 'Z': goto yy140; + case 'Z': goto yy141; case 'E': goto yy1388; case 'H': goto yy1389; case 'O': goto yy1390; @@ -1220,21 +1242,21 @@ yy9: case 'v': case 'x': case 'y': - case 'z': goto yy145; + 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 yy3; + default: goto yy4; } -yy10: - YYDEBUG(10, *YYCURSOR); +yy11: + YYDEBUG(11, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case ')': goto yy139; + case ')': goto yy140; case '0': case '1': goto yy1393; case '2': goto yy1394; @@ -1286,7 +1308,7 @@ yy10: case 'v': case 'x': case 'y': - case 'z': goto yy140; + case 'z': goto yy141; case 'E': case 'e': goto yy1388; case 'H': @@ -1297,370 +1319,370 @@ yy10: case 'u': goto yy1391; case 'W': case 'w': goto yy1392; - default: goto yy3; + default: goto yy4; } -yy11: - YYDEBUG(11, *YYCURSOR); +yy12: + YYDEBUG(12, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); if (yych == '-') goto yy1384; - if (yych <= '/') goto yy12; + if (yych <= '/') goto yy13; if (yych <= '9') goto yy1385; -yy12: - YYDEBUG(12, *YYCURSOR); -#line 1728 "ext/date/lib/parse_date.re" +yy13: + YYDEBUG(13, *YYCURSOR); +#line 1729 "ext/date/lib/parse_date.re" { add_error(s, "Unexpected character"); goto std; } -#line 1317 "ext/date/lib/parse_date.c" -yy13: - YYDEBUG(13, *YYCURSOR); +#line 1337 "ext/date/lib/parse_date.c" +yy14: + YYDEBUG(14, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1320; } } else { if (yych <= 'N') { if (yych == 'I') goto yy1321; - goto yy140; + goto yy141; } else { if (yych <= 'O') goto yy1322; - if (yych <= 'Q') goto yy140; + if (yych <= 'Q') goto yy141; goto yy1323; } } } else { if (yych <= 'i') { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { if (yych <= 'e') goto yy1361; - if (yych <= 'h') goto yy145; + if (yych <= 'h') goto yy146; goto yy1362; } } else { if (yych <= 'q') { if (yych == 'o') goto yy1363; - goto yy145; + goto yy146; } else { if (yych <= 'r') goto yy1364; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy14: - YYDEBUG(14, *YYCURSOR); +yy15: + YYDEBUG(15, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy1320; } } else { if (yych <= 'N') { if (yych == 'I') goto yy1321; - goto yy140; + goto yy141; } else { if (yych <= 'O') goto yy1322; - if (yych <= 'Q') goto yy140; + if (yych <= 'Q') goto yy141; goto yy1323; } } } else { if (yych <= 'i') { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy1320; - if (yych <= 'h') goto yy140; + if (yych <= 'h') goto yy141; goto yy1321; } } else { if (yych <= 'q') { if (yych == 'o') goto yy1322; - goto yy140; + goto yy141; } else { if (yych <= 'r') goto yy1323; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy15: - YYDEBUG(15, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1306; - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; - } else { - if (yych <= 'a') goto yy1317; - if (yych <= 'z') goto yy145; - goto yy3; - } - } yy16: YYDEBUG(16, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1306; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy1307; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1306; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'a') goto yy1317; + if (yych <= 'z') goto yy146; + goto yy4; } } yy17: YYDEBUG(17, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1286; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy1307; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1303; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'a') goto yy1307; + if (yych <= 'z') goto yy141; + goto yy4; } } yy18: YYDEBUG(18, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy1286; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy1287; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1286; - if (yych <= 'z') goto yy140; - goto yy3; + 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 yy3; - goto yy139; - } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy1229; + 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 yy1228; - goto yy140; + if (yych <= 'E') goto yy1229; + goto yy141; } else { - if (yych <= 'I') goto yy1230; - if (yych <= 'T') goto yy140; - goto yy1231; + if (yych <= 'I') goto yy1231; + if (yych <= 'T') goto yy141; + goto yy1232; } } } else { if (yych <= 'e') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1258; - if (yych <= 'd') goto yy145; - goto yy1257; + if (yych <= 'a') goto yy1259; + if (yych <= 'd') goto yy146; + goto yy1258; } } else { if (yych <= 't') { - if (yych == 'i') goto yy1259; - goto yy145; + if (yych == 'i') goto yy1260; + goto yy146; } else { - if (yych <= 'u') goto yy1260; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'u') goto yy1261; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy20: - YYDEBUG(20, *YYCURSOR); +yy21: + YYDEBUG(21, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; - } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy1229; + 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 yy1228; - goto yy140; + if (yych <= 'E') goto yy1229; + goto yy141; } else { - if (yych <= 'I') goto yy1230; - if (yych <= 'T') goto yy140; - goto yy1231; + if (yych <= 'I') goto yy1231; + if (yych <= 'T') goto yy141; + goto yy1232; } } } else { if (yych <= 'e') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych <= 'a') goto yy1229; - if (yych <= 'd') goto yy140; - goto yy1228; + if (yych <= 'a') goto yy1230; + if (yych <= 'd') goto yy141; + goto yy1229; } } else { if (yych <= 't') { - if (yych == 'i') goto yy1230; - goto yy140; + if (yych == 'i') goto yy1231; + goto yy141; } else { - if (yych <= 'u') goto yy1231; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'u') goto yy1232; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy21: - YYDEBUG(21, *YYCURSOR); +yy22: + YYDEBUG(22, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == 'I') goto yy1198; - if (yych <= 'K') goto yy140; - goto yy1199; + if (yych == 'I') goto yy1199; + if (yych <= 'K') goto yy141; + goto yy1200; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy145; - goto yy1216; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + if (yych <= 'h') goto yy146; + goto yy1217; } else { - if (yych == 'l') goto yy1217; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych == 'l') goto yy1218; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy22: - YYDEBUG(22, *YYCURSOR); +yy23: + YYDEBUG(23, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == 'I') goto yy1198; - if (yych <= 'K') goto yy140; - goto yy1199; + if (yych == 'I') goto yy1199; + if (yych <= 'K') goto yy141; + goto yy1200; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy140; - goto yy1198; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + if (yych <= 'h') goto yy141; + goto yy1199; } else { - if (yych == 'l') goto yy1199; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych == 'l') goto yy1200; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy23: - YYDEBUG(23, *YYCURSOR); +yy24: + YYDEBUG(24, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy140; - goto yy1097; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy141; + goto yy1098; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { - if (yych <= 'r') goto yy1191; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'r') goto yy1192; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy24: - YYDEBUG(24, *YYCURSOR); +yy25: + YYDEBUG(25, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy140; - goto yy1097; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy141; + goto yy1098; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { - if (yych <= 'r') goto yy1097; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'r') goto yy1098; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy25: - YYDEBUG(25, *YYCURSOR); +yy26: + YYDEBUG(26, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy1051; + case '\t': goto yy1052; case ' ': case 'A': case 'D': @@ -1685,11 +1707,11 @@ yy25: case 'm': case 'o': case 'w': - case 'y': goto yy1053; - case '-': goto yy472; - case '.': goto yy1063; - case '/': goto yy471; - case '0': goto yy1096; + case 'y': goto yy1054; + case '-': goto yy473; + case '.': goto yy1064; + case '/': goto yy472; + case '0': goto yy1097; case '1': case '2': case '3': @@ -1698,21 +1720,21 @@ yy25: case '6': case '7': case '8': - case '9': goto yy1095; - case ':': goto yy1064; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy26: - YYDEBUG(26, *YYCURSOR); +yy27: + YYDEBUG(27, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1739,34 +1761,34 @@ yy26: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': case '1': - case '2': goto yy1095; + case '2': goto yy1096; case '3': case '4': case '5': case '6': case '7': case '8': - case '9': goto yy1062; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy27: - YYDEBUG(27, *YYCURSOR); +yy28: + YYDEBUG(28, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1793,34 +1815,34 @@ yy27: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': case '1': case '2': case '3': - case '4': goto yy1062; + case '4': goto yy1063; case '5': case '6': case '7': case '8': - case '9': goto yy1049; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy28: - YYDEBUG(28, *YYCURSOR); +yy29: + YYDEBUG(29, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1847,12 +1869,12 @@ yy28: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': - case '1': goto yy1049; + case '1': goto yy1050; case '2': case '3': case '4': @@ -1860,21 +1882,21 @@ yy28: case '6': case '7': case '8': - case '9': goto yy468; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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; } -yy29: - YYDEBUG(29, *YYCURSOR); +yy30: + YYDEBUG(30, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); YYDEBUG(-1, yych); switch (yych) { - case '\t': goto yy459; + case '\t': goto yy460; case ' ': case 'A': case 'D': @@ -1901,10 +1923,10 @@ yy29: case 'o': case 'p': case 'w': - case 'y': goto yy461; - case '-': goto yy472; - case '.': goto yy473; - case '/': goto yy471; + case 'y': goto yy462; + case '-': goto yy473; + case '.': goto yy474; + case '/': goto yy472; case '0': case '1': case '2': @@ -1914,562 +1936,562 @@ yy29: case '6': case '7': case '8': - case '9': goto yy468; - case ':': goto yy482; - case 'n': goto yy469; - case 'r': goto yy470; - case 's': goto yy463; - case 't': goto yy467; - default: goto yy12; + 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); +yy31: + YYDEBUG(31, *YYCURSOR); yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; + if (yybm[0+yych] & 4) { + goto yy58; } YYDEBUG(-1, yych); switch (yych) { case '+': - case '-': goto yy439; + case '-': goto yy440; case '0': - case '1': goto yy436; - case '2': goto yy437; + case '1': goto yy437; + case '2': goto yy438; case '3': case '4': case '5': case '6': case '7': case '8': - case '9': goto yy438; - default: goto yy12; + case '9': goto yy439; + default: goto yy13; } -yy31: - YYDEBUG(31, *YYCURSOR); +yy32: + YYDEBUG(32, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; + if (yych <= 0x08) goto yy4; goto yy196; } else { if (yych == ' ') goto yy196; - goto yy3; + goto yy4; } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; - goto yy3; + if (yych <= ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; goto yy196; } } } else { if (yych <= 'V') { if (yych <= 'H') { - if (yych <= '@') goto yy3; - goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { - if (yych <= 'I') goto yy435; - if (yych <= 'U') goto yy140; - goto yy434; + if (yych <= 'I') goto yy436; + if (yych <= 'U') goto yy141; + goto yy435; } } else { if (yych <= 'Z') { - if (yych == 'X') goto yy434; - goto yy140; + if (yych == 'X') goto yy435; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy32: - YYDEBUG(32, *YYCURSOR); +yy33: + YYDEBUG(33, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'Z') { - if (yych <= 'I') goto yy431; - goto yy140; + if (yych <= 'I') goto yy432; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy33: - YYDEBUG(33, *YYCURSOR); +yy34: + YYDEBUG(34, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'Z') { - if (yych <= 'I') goto yy429; - goto yy140; + if (yych <= 'I') goto yy430; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy34: - YYDEBUG(34, *YYCURSOR); +yy35: + YYDEBUG(35, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'A') goto yy412; - if (yych <= 'T') goto yy140; - goto yy411; + if (yych <= 'A') goto yy413; + if (yych <= 'T') goto yy141; + goto yy412; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy421; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy422; } else { - if (yych == 'u') goto yy420; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych == 'u') goto yy421; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy35: - YYDEBUG(35, *YYCURSOR); +yy36: + YYDEBUG(36, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'A') goto yy412; - if (yych <= 'T') goto yy140; - goto yy411; + if (yych <= 'A') goto yy413; + if (yych <= 'T') goto yy141; + goto yy412; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy412; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy413; } else { - if (yych == 'u') goto yy411; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych == 'u') goto yy412; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy36: - YYDEBUG(36, *YYCURSOR); +yy37: + YYDEBUG(37, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'F') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'O') { - if (yych <= 'G') goto yy390; - goto yy140; + if (yych <= 'G') goto yy391; + goto yy141; } else { - if (yych <= 'P') goto yy389; - if (yych <= 'T') goto yy140; - goto yy388; + if (yych <= 'P') goto yy390; + if (yych <= 'T') goto yy141; + goto yy389; } } } else { if (yych <= 'o') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych == 'g') goto yy402; - goto yy145; + if (yych == 'g') goto yy403; + goto yy146; } } else { if (yych <= 't') { - if (yych <= 'p') goto yy401; - goto yy145; + if (yych <= 'p') goto yy402; + goto yy146; } else { - if (yych <= 'u') goto yy400; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'u') goto yy401; + if (yych <= 'z') goto yy146; + goto yy4; } } } -yy37: - YYDEBUG(37, *YYCURSOR); +yy38: + YYDEBUG(38, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'F') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'O') { - if (yych <= 'G') goto yy390; - goto yy140; + if (yych <= 'G') goto yy391; + goto yy141; } else { - if (yych <= 'P') goto yy389; - if (yych <= 'T') goto yy140; - goto yy388; + if (yych <= 'P') goto yy390; + if (yych <= 'T') goto yy141; + goto yy389; } } } else { if (yych <= 'o') { if (yych <= '`') { - if (yych <= 'Z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + goto yy4; } else { - if (yych == 'g') goto yy390; - goto yy140; + if (yych == 'g') goto yy391; + goto yy141; } } else { if (yych <= 't') { - if (yych <= 'p') goto yy389; - goto yy140; + if (yych <= 'p') goto yy390; + goto yy141; } else { - if (yych <= 'u') goto yy388; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'u') goto yy389; + if (yych <= 'z') goto yy141; + goto yy4; } } } -yy38: - YYDEBUG(38, *YYCURSOR); +yy39: + YYDEBUG(39, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy140; - goto yy378; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy141; + goto yy379; } } else { if (yych <= 'b') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { - if (yych <= 'c') goto yy383; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'c') goto yy384; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy39: - YYDEBUG(39, *YYCURSOR); +yy40: + YYDEBUG(40, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy140; - goto yy378; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy141; + goto yy379; } } else { if (yych <= 'b') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { - if (yych <= 'c') goto yy378; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'c') goto yy379; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy40: - YYDEBUG(40, *YYCURSOR); +yy41: + YYDEBUG(41, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy192; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { - if (yych <= 'e') goto yy371; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'e') goto yy370; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy41: - YYDEBUG(41, *YYCURSOR); +yy42: + YYDEBUG(42, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy192; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy192; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy42: - YYDEBUG(42, *YYCURSOR); +yy43: + YYDEBUG(43, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy165; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy145; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy146; } else { if (yych <= 'e') goto yy179; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy43: - YYDEBUG(43, *YYCURSOR); +yy44: + YYDEBUG(44, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy140; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy141; goto yy165; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - goto yy140; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + goto yy141; } else { if (yych <= 'e') goto yy165; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'z') goto yy141; + goto yy4; } } -yy44: - YYDEBUG(44, *YYCURSOR); +yy45: + YYDEBUG(45, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy140; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy141; } else { if (yych <= 'Z') { if (yych <= 'M') goto yy157; - goto yy140; + goto yy141; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } } -yy45: - YYDEBUG(45, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '@') goto yy12; - if (yych <= 'Z') goto yy156; - if (yych <= '`') goto yy12; - if (yych <= 'z') goto yy156; - goto yy12; yy46: YYDEBUG(46, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy145; - goto yy3; - } + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy140; - goto yy3; + if (yych <= 'Z') goto yy141; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy146; + goto yy4; } yy48: YYDEBUG(48, *YYCURSOR); - yyaccept = 2; - yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; + 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; } - if (yych <= '/') goto yy49; - if (yych <= '9') goto yy54; yy49: YYDEBUG(49, *YYCURSOR); -#line 1717 "ext/date/lib/parse_date.re" - { - goto std; + yyaccept = 2; + yych = *(YYMARKER = ++YYCURSOR); + if (yybm[0+yych] & 4) { + goto yy58; } -#line 2378 "ext/date/lib/parse_date.c" + if (yych <= '/') goto yy50; + if (yych <= '9') goto yy55; yy50: YYDEBUG(50, *YYCURSOR); - yych = *++YYCURSOR; - goto yy49; +#line 1718 "ext/date/lib/parse_date.re" + { + goto std; + } +#line 2398 "ext/date/lib/parse_date.c" yy51: YYDEBUG(51, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + goto yy50; +yy52: YYDEBUG(52, *YYCURSOR); -#line 1722 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(53, *YYCURSOR); +#line 1723 "ext/date/lib/parse_date.re" { s->pos = cursor; s->line++; goto std; } -#line 2392 "ext/date/lib/parse_date.c" -yy53: - YYDEBUG(53, *YYCURSOR); - yych = *++YYCURSOR; - goto yy12; +#line 2412 "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(55, *YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy54; + YYDEBUG(56, *YYCURSOR); + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy59; - if (yych >= ' ') goto yy59; + if (yych == '\t') goto yy60; + if (yych >= ' ') goto yy60; } else { - if (yych == 'D') goto yy64; - if (yych >= 'F') goto yy65; + if (yych == 'D') goto yy65; + if (yych >= 'F') goto yy66; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy63; - if (yych >= 'M') goto yy62; + if (yych == 'H') goto yy64; + if (yych >= 'M') goto yy63; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy61; + if (yych >= 'S') goto yy62; } else { - if (yych <= 'T') goto yy68; - if (yych >= 'W') goto yy67; + if (yych <= 'T') goto yy69; + if (yych >= 'W') goto yy68; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy66; - if (yych >= 'd') goto yy64; + if (yych == 'Y') goto yy67; + if (yych >= 'd') goto yy65; } else { if (yych <= 'f') { - if (yych >= 'f') goto yy65; + if (yych >= 'f') goto yy66; } else { - if (yych == 'h') goto yy63; + if (yych == 'h') goto yy64; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy62; - if (yych <= 'r') goto yy56; - if (yych <= 's') goto yy61; - goto yy68; + 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 yy67; + if (yych >= 'w') goto yy68; } else { - if (yych == 'y') goto yy66; + if (yych == 'y') goto yy67; } } } } -yy56: - YYDEBUG(56, *YYCURSOR); +yy57: + YYDEBUG(57, *YYCURSOR); YYCURSOR = YYMARKER; - if (yyaccept <= 17) { + if (yyaccept <= 16) { if (yyaccept <= 8) { if (yyaccept <= 4) { if (yyaccept <= 2) { if (yyaccept <= 1) { if (yyaccept <= 0) { - goto yy3; + goto yy4; } else { - goto yy12; + goto yy13; } } else { - goto yy49; + goto yy50; } } else { if (yyaccept <= 3) { - goto yy72; + goto yy73; } else { goto yy167; } @@ -2485,104 +2507,100 @@ yy56: if (yyaccept <= 7) { goto yy223; } else { - goto yy296; + goto yy295; } } } } else { - if (yyaccept <= 13) { - if (yyaccept <= 11) { - if (yyaccept <= 10) { - if (yyaccept <= 9) { - goto yy392; - } else { - goto yy475; - } + if (yyaccept <= 12) { + if (yyaccept <= 10) { + if (yyaccept <= 9) { + goto yy393; } else { - goto yy490; + goto yy476; } } else { - if (yyaccept <= 12) { - goto yy611; + if (yyaccept <= 11) { + goto yy491; } else { - goto yy656; + goto yy612; } } } else { - if (yyaccept <= 15) { - if (yyaccept <= 14) { - goto yy666; + if (yyaccept <= 14) { + if (yyaccept <= 13) { + goto yy657; } else { - goto yy763; + goto yy667; } } else { - if (yyaccept <= 16) { - goto yy783; + if (yyaccept <= 15) { + goto yy764; } else { - goto yy814; + goto yy784; } } } } } else { - if (yyaccept <= 26) { - if (yyaccept <= 22) { - if (yyaccept <= 20) { - if (yyaccept <= 19) { - if (yyaccept <= 18) { - goto yy821; + if (yyaccept <= 25) { + if (yyaccept <= 21) { + if (yyaccept <= 19) { + if (yyaccept <= 18) { + if (yyaccept <= 17) { + goto yy815; } else { - goto yy848; + goto yy822; } } else { - goto yy793; + goto yy849; } } else { - if (yyaccept <= 21) { - goto yy454; + if (yyaccept <= 20) { + goto yy794; } else { - goto yy973; + goto yy455; } } } else { - if (yyaccept <= 24) { - if (yyaccept <= 23) { - goto yy842; + if (yyaccept <= 23) { + if (yyaccept <= 22) { + goto yy974; } else { - goto yy1067; + goto yy843; } } else { - if (yyaccept <= 25) { - goto yy1075; + if (yyaccept <= 24) { + goto yy1068; } else { - goto yy1117; + goto yy1076; } } } } else { - if (yyaccept <= 30) { - if (yyaccept <= 28) { - if (yyaccept <= 27) { - goto yy1141; + if (yyaccept <= 29) { + if (yyaccept <= 27) { + if (yyaccept <= 26) { + goto yy1118; } else { - goto yy1294; + goto yy1142; } } else { - if (yyaccept <= 29) { - goto yy1313; + if (yyaccept <= 28) { + goto yy1295; } else { goto yy1417; } } } else { - if (yyaccept <= 32) { - if (yyaccept <= 31) { + if (yyaccept <= 31) { + if (yyaccept <= 30) { goto yy1420; } else { goto yy1500; } } else { - if (yyaccept <= 33) { + if (yyaccept <= 32) { goto yy1508; } else { goto yy1531; @@ -2591,195 +2609,195 @@ yy56: } } } -yy57: - YYDEBUG(57, *YYCURSOR); +yy58: + YYDEBUG(58, *YYCURSOR); ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - YYDEBUG(58, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; - } - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy54; - goto yy56; -yy59: 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; -yy60: - YYDEBUG(60, *YYCURSOR); +yy61: + YYDEBUG(61, *YYCURSOR); if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy59; - if (yych <= 0x1F) goto yy56; - goto yy59; + if (yych == '\t') goto yy60; + if (yych <= 0x1F) goto yy57; + goto yy60; } else { - if (yych == 'D') goto yy64; - if (yych <= 'E') goto yy56; - goto yy65; + if (yych == 'D') goto yy65; + if (yych <= 'E') goto yy57; + goto yy66; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy63; - if (yych <= 'L') goto yy56; - goto yy62; + if (yych == 'H') goto yy64; + if (yych <= 'L') goto yy57; + goto yy63; } else { if (yych <= 'S') { - if (yych <= 'R') goto yy56; + if (yych <= 'R') goto yy57; } else { - if (yych <= 'T') goto yy68; - if (yych <= 'V') goto yy56; - goto yy67; + if (yych <= 'T') goto yy69; + if (yych <= 'V') goto yy57; + goto yy68; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy66; - if (yych <= 'c') goto yy56; - goto yy64; + if (yych == 'Y') goto yy67; + if (yych <= 'c') goto yy57; + goto yy65; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy56; - goto yy65; + if (yych <= 'e') goto yy57; + goto yy66; } else { - if (yych == 'h') goto yy63; - goto yy56; + if (yych == 'h') goto yy64; + goto yy57; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy62; - if (yych <= 'r') goto yy56; - if (yych >= 't') goto yy68; + if (yych <= 'm') goto yy63; + if (yych <= 'r') goto yy57; + if (yych >= 't') goto yy69; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy56; - goto yy67; + if (yych <= 'v') goto yy57; + goto yy68; } else { - if (yych == 'y') goto yy66; - goto yy56; + if (yych == 'y') goto yy67; + goto yy57; } } } } -yy61: - YYDEBUG(61, *YYCURSOR); +yy62: + YYDEBUG(62, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy127; - if (yych <= 'T') goto yy56; - goto yy125; + if (yych <= 'E') goto yy128; + if (yych <= 'T') goto yy57; + goto yy126; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy126; - goto yy56; + if (yych == 'a') goto yy127; + goto yy57; } else { - if (yych <= 'e') goto yy127; - if (yych == 'u') goto yy125; - goto yy56; + if (yych <= 'e') goto yy128; + if (yych == 'u') goto yy126; + goto yy57; } } -yy62: - YYDEBUG(62, *YYCURSOR); +yy63: + YYDEBUG(63, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { - if (yych == 'I') goto yy117; - if (yych <= 'N') goto yy56; - goto yy116; + if (yych == 'I') goto yy118; + if (yych <= 'N') goto yy57; + goto yy117; } else { if (yych <= 'i') { - if (yych <= 'h') goto yy56; - goto yy117; + if (yych <= 'h') goto yy57; + goto yy118; } else { - if (yych == 'o') goto yy116; - goto yy56; + if (yych == 'o') goto yy117; + goto yy57; } } -yy63: - YYDEBUG(63, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy114; - if (yych == 'o') goto yy114; - goto yy56; yy64: YYDEBUG(64, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy113; - if (yych == 'a') goto yy113; - goto yy56; + 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 yy98; - if (yych <= 'Q') goto yy56; - goto yy97; + if (yych == 'O') goto yy99; + if (yych <= 'Q') goto yy57; + goto yy98; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy56; - goto yy98; + if (yych <= 'n') goto yy57; + goto yy99; } else { - if (yych == 'r') goto yy97; - goto yy56; + if (yych == 'r') goto yy98; + goto yy57; } } -yy66: - YYDEBUG(66, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy94; - if (yych == 'e') goto yy94; - goto yy56; yy67: YYDEBUG(67, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy82; - if (yych == 'e') goto yy82; - goto yy56; + 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 yy69; - if (yych <= 'T') goto yy56; - goto yy70; + if (yych == 'H') goto yy70; + if (yych <= 'T') goto yy57; + goto yy71; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; + if (yych <= 'g') goto yy57; } else { - if (yych == 'u') goto yy70; - goto yy56; + if (yych == 'u') goto yy71; + goto yy57; } } -yy69: - YYDEBUG(69, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy77; - if (yych == 'u') goto yy77; - goto yy56; yy70: YYDEBUG(70, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy71; - if (yych != 'e') goto yy56; + if (yych == 'U') goto yy78; + if (yych == 'u') goto yy78; + goto yy57; yy71: YYDEBUG(71, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'S') goto yy73; - if (yych == 's') goto yy73; + yych = *++YYCURSOR; + if (yych == 'E') goto yy72; + if (yych != 'e') goto yy57; yy72: YYDEBUG(72, *YYCURSOR); -#line 1701 "ext/date/lib/parse_date.re" + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'S') goto yy74; + if (yych == 's') goto yy74; +yy73: + YYDEBUG(73, *YYCURSOR); +#line 1702 "ext/date/lib/parse_date.re" { timelib_ull i; DEBUG_OUTPUT("relative"); @@ -2794,529 +2812,526 @@ yy72: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 2798 "ext/date/lib/parse_date.c" -yy73: - YYDEBUG(73, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy74; - if (yych != 'd') goto yy56; +#line 2814 "ext/date/lib/parse_date.c" yy74: YYDEBUG(74, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy75; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy75; + if (yych != 'd') goto yy57; yy75: YYDEBUG(75, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy76; + if (yych != 'a') goto yy57; yy76: YYDEBUG(76, *YYCURSOR); yych = *++YYCURSOR; - goto yy72; + if (yych == 'Y') goto yy77; + if (yych != 'y') goto yy57; yy77: YYDEBUG(77, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy78; - if (yych != 'r') goto yy72; + yych = *++YYCURSOR; + goto yy73; yy78: YYDEBUG(78, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy79; - if (yych != 's') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'R') goto yy79; + if (yych != 'r') goto yy73; yy79: YYDEBUG(79, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy80; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy80; + if (yych != 's') goto yy57; yy80: YYDEBUG(80, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy81; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy81; + if (yych != 'd') goto yy57; yy81: YYDEBUG(81, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + 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 yy56; - if (yych <= 'D') goto yy84; + if (yych <= 'C') goto yy57; + if (yych <= 'D') goto yy85; } else { - if (yych <= 'c') goto yy56; - if (yych <= 'd') goto yy84; - if (yych >= 'f') goto yy56; + if (yych <= 'c') goto yy57; + if (yych <= 'd') goto yy85; + if (yych >= 'f') goto yy57; } - YYDEBUG(83, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy90; - if (yych == 'k') goto yy90; - goto yy56; -yy84: YYDEBUG(84, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'N') goto yy85; - if (yych != 'n') goto yy72; + yych = *++YYCURSOR; + if (yych == 'K') goto yy91; + if (yych == 'k') goto yy91; + goto yy57; yy85: YYDEBUG(85, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy86; - if (yych != 'e') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'N') goto yy86; + if (yych != 'n') goto yy73; yy86: YYDEBUG(86, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy87; - if (yych != 's') goto yy56; + if (yych == 'E') goto yy87; + if (yych != 'e') goto yy57; yy87: YYDEBUG(87, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy88; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy88; + if (yych != 's') goto yy57; yy88: YYDEBUG(88, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy89; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy89; + if (yych != 'd') goto yy57; yy89: YYDEBUG(89, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + 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 yy91; - if (yych <= 'R') goto yy72; - goto yy76; + if (yych == 'D') goto yy92; + if (yych <= 'R') goto yy73; + goto yy77; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy72; + if (yych <= 'c') goto yy73; } else { - if (yych == 's') goto yy76; - goto yy72; + if (yych == 's') goto yy77; + goto yy73; } } -yy91: - YYDEBUG(91, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy92; - if (yych != 'a') goto yy56; yy92: YYDEBUG(92, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy93; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy93; + if (yych != 'a') goto yy57; yy93: YYDEBUG(93, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy76; - if (yych == 's') goto yy76; - goto yy72; + if (yych == 'Y') goto yy94; + if (yych != 'y') goto yy57; yy94: YYDEBUG(94, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy95; - if (yych != 'a') goto yy56; + if (yych == 'S') goto yy77; + if (yych == 's') goto yy77; + goto yy73; yy95: YYDEBUG(95, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy96; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy96; + if (yych != 'a') goto yy57; yy96: YYDEBUG(96, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy76; - if (yych == 's') goto yy76; - goto yy72; + if (yych == 'R') goto yy97; + if (yych != 'r') goto yy57; yy97: YYDEBUG(97, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy110; - if (yych == 'i') goto yy110; - goto yy56; + if (yych == 'S') goto yy77; + if (yych == 's') goto yy77; + goto yy73; yy98: YYDEBUG(98, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy99; - if (yych != 'r') goto yy56; + if (yych == 'I') goto yy111; + if (yych == 'i') goto yy111; + goto yy57; yy99: YYDEBUG(99, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy100; - if (yych != 't') goto yy56; + 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 yy102; - if (yych <= 'M') goto yy56; + if (yych == 'H') goto yy103; + if (yych <= 'M') goto yy57; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; - goto yy102; + if (yych <= 'g') goto yy57; + goto yy103; } else { - if (yych != 'n') goto yy56; + if (yych != 'n') goto yy57; } } - YYDEBUG(101, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy107; - if (yych == 'i') goto yy107; - goto yy56; -yy102: YYDEBUG(102, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy103; - if (yych != 'n') goto yy56; + if (yych == 'I') goto yy108; + if (yych == 'i') goto yy108; + goto yy57; yy103: YYDEBUG(103, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy104; - if (yych != 'i') goto yy56; + if (yych == 'N') goto yy104; + if (yych != 'n') goto yy57; yy104: YYDEBUG(104, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy105; - if (yych != 'g') goto yy56; + if (yych == 'I') goto yy105; + if (yych != 'i') goto yy57; yy105: YYDEBUG(105, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy106; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy106; + if (yych != 'g') goto yy57; yy106: YYDEBUG(106, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy96; - if (yych == 't') goto yy96; - goto yy56; + if (yych == 'H') goto yy107; + if (yych != 'h') goto yy57; yy107: YYDEBUG(107, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy108; - if (yych != 'g') goto yy56; + if (yych == 'T') goto yy97; + if (yych == 't') goto yy97; + goto yy57; yy108: YYDEBUG(108, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy109; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy109; + if (yych != 'g') goto yy57; yy109: YYDEBUG(109, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy96; - if (yych == 't') goto yy96; - goto yy56; + if (yych == 'H') goto yy110; + if (yych != 'h') goto yy57; yy110: YYDEBUG(110, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy111; - if (yych != 'd') goto yy72; + yych = *++YYCURSOR; + if (yych == 'T') goto yy97; + if (yych == 't') goto yy97; + goto yy57; yy111: YYDEBUG(111, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy112; - if (yych != 'a') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy112; + if (yych != 'd') goto yy73; yy112: YYDEBUG(112, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'A') goto yy113; + if (yych != 'a') goto yy57; yy113: YYDEBUG(113, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy96; - if (yych == 'y') goto yy96; - goto yy56; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy114: YYDEBUG(114, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'U') goto yy115; - if (yych != 'u') goto yy56; + if (yych == 'Y') goto yy97; + if (yych == 'y') goto yy97; + goto yy57; yy115: YYDEBUG(115, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy96; - if (yych == 'r') goto yy96; - goto yy56; + if (yych == 'U') goto yy116; + if (yych != 'u') goto yy57; yy116: YYDEBUG(116, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy121; - if (yych == 'n') goto yy121; - goto yy56; + if (yych == 'R') goto yy97; + if (yych == 'r') goto yy97; + goto yy57; yy117: YYDEBUG(117, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy118; - if (yych != 'n') goto yy56; + 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 yy76; - if (yych <= 'T') goto yy72; + if (yych == 'S') goto yy77; + if (yych <= 'T') goto yy73; } else { if (yych <= 's') { - if (yych <= 'r') goto yy72; - goto yy76; + if (yych <= 'r') goto yy73; + goto yy77; } else { - if (yych != 'u') goto yy72; + if (yych != 'u') goto yy73; } } - YYDEBUG(119, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy120; - if (yych != 't') goto yy56; -yy120: YYDEBUG(120, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy96; - if (yych == 'e') goto yy96; - goto yy56; + 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 yy122; - if (yych <= 'S') goto yy72; - goto yy123; + if (yych == 'D') goto yy123; + if (yych <= 'S') goto yy73; + goto yy124; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy72; + if (yych <= 'c') goto yy73; } else { - if (yych == 't') goto yy123; - goto yy72; + if (yych == 't') goto yy124; + goto yy73; } } -yy122: - YYDEBUG(122, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy124; - if (yych == 'a') goto yy124; - goto yy56; yy123: YYDEBUG(123, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy96; - if (yych == 'h') goto yy96; - goto yy56; + if (yych == 'A') goto yy125; + if (yych == 'a') goto yy125; + goto yy57; yy124: YYDEBUG(124, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'H') goto yy97; + if (yych == 'h') goto yy97; + goto yy57; yy125: YYDEBUG(125, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy136; - if (yych == 'n') goto yy136; - goto yy56; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy126: YYDEBUG(126, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy131; - if (yych == 't') goto yy131; - goto yy56; + if (yych == 'N') goto yy137; + if (yych == 'n') goto yy137; + goto yy57; yy127: YYDEBUG(127, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy128; - if (yych != 'c') goto yy56; + 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 yy129; - if (yych <= 'R') goto yy72; - goto yy76; + if (yych == 'O') goto yy130; + if (yych <= 'R') goto yy73; + goto yy77; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy72; + if (yych <= 'n') goto yy73; } else { - if (yych == 's') goto yy76; - goto yy72; + if (yych == 's') goto yy77; + goto yy73; } } -yy129: - YYDEBUG(129, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy130; - if (yych != 'n') goto yy56; yy130: YYDEBUG(130, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy96; - if (yych == 'd') goto yy96; - goto yy56; + if (yych == 'N') goto yy131; + if (yych != 'n') goto yy57; yy131: YYDEBUG(131, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy132; - if (yych != 'u') goto yy72; + yych = *++YYCURSOR; + if (yych == 'D') goto yy97; + if (yych == 'd') goto yy97; + goto yy57; yy132: YYDEBUG(132, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy133; - if (yych != 'r') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy133; + if (yych != 'u') goto yy73; yy133: YYDEBUG(133, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy134; - if (yych != 'd') goto yy56; + if (yych == 'R') goto yy134; + if (yych != 'r') goto yy57; yy134: YYDEBUG(134, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy135; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy135; + if (yych != 'd') goto yy57; yy135: YYDEBUG(135, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'A') goto yy136; + if (yych != 'a') goto yy57; yy136: YYDEBUG(136, *YYCURSOR); - yyaccept = 3; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'D') goto yy137; - if (yych != 'd') goto yy72; + yych = *++YYCURSOR; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy137: YYDEBUG(137, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy138; - if (yych != 'a') goto yy56; + yyaccept = 3; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'D') goto yy138; + if (yych != 'd') goto yy73; yy138: YYDEBUG(138, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy76; - if (yych == 'y') goto yy76; - goto yy56; + if (yych == 'A') goto yy139; + if (yych != 'a') goto yy57; yy139: YYDEBUG(139, *YYCURSOR); yych = *++YYCURSOR; - goto yy3; + if (yych == 'Y') goto yy77; + if (yych == 'y') goto yy77; + goto yy57; yy140: YYDEBUG(140, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; - } + goto yy4; yy141: YYDEBUG(141, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } yy142: YYDEBUG(142, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } yy143: YYDEBUG(143, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } yy144: YYDEBUG(144, *YYCURSOR); yych = *++YYCURSOR; - if (yych == ')') goto yy139; - goto yy3; + 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 yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy141; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } } -yy146: - YYDEBUG(146, *YYCURSOR); +yy147: + YYDEBUG(147, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych != '/') goto yy3; + if (yych == '.') goto yy4; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy3; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy143; + goto yy4; } else { - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; if (yych <= 'z') goto yy151; - goto yy3; + goto yy4; } } -yy147: - YYDEBUG(147, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '@') goto yy56; - if (yych >= '[') goto yy56; +yy148: YYDEBUG(148, *YYCURSOR); ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if (yybm[0+yych] & 16) { + if (yybm[0+yych] & 8) { goto yy149; } - goto yy56; + goto yy57; yy149: YYDEBUG(149, *YYCURSOR); yyaccept = 0; @@ -3324,71 +3339,81 @@ yy149: if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; YYDEBUG(150, *YYCURSOR); - if (yybm[0+yych] & 16) { + if (yybm[0+yych] & 8) { goto yy149; } - if (yych == '/') goto yy147; - if (yych == '_') goto yy147; - goto yy3; + 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 yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + 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 yy3; - goto yy139; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= '^') { + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy145; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + if (yych >= '{') goto yy4; } } yy153: YYDEBUG(153, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + 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 yy3; - goto yy147; + if (yych <= '/') { + if (yych <= '.') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; - if (yych >= '{') goto yy3; + if (yych == '_') goto yy148; + goto yy4; } } yy154: @@ -3398,41 +3423,43 @@ yy154: yych = *YYCURSOR; yy155: YYDEBUG(155, *YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; - goto yy56; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; + goto yy57; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy56; - if (yych <= 'z') goto yy154; - goto yy56; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; + goto yy57; } yy156: YYDEBUG(156, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'Z') goto yy140; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy140; - goto yy3; + 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 yy139; - if (yych <= '@') goto yy3; - goto yy141; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych >= 'U') goto yy141; + if (yych >= 'U') goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } YYDEBUG(158, *YYCURSOR); @@ -3440,89 +3467,89 @@ yy157: yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych != '+') goto yy3; + if (yych != '+') goto yy4; } } else { if (yych <= 'Z') { if (yych <= '-') goto yy159; - if (yych <= '@') goto yy3; - goto yy142; + if (yych <= '@') goto yy4; + goto yy143; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy143; + goto yy4; } } yy159: YYDEBUG(159, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '1') goto yy160; if (yych <= '2') goto yy161; if (yych <= '9') goto yy162; - goto yy56; + goto yy57; yy160: YYDEBUG(160, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy162; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; yy161: YYDEBUG(161, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '5') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych >= '5') goto yy164; } else { - if (yych <= '9') goto yy139; + if (yych <= '9') goto yy140; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; } yy162: YYDEBUG(162, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '5') goto yy164; - if (yych <= '9') goto yy139; - if (yych >= ';') goto yy3; + if (yych <= '9') goto yy140; + if (yych >= ';') goto yy4; yy163: YYDEBUG(163, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '5') goto yy164; - if (yych <= '9') goto yy139; - goto yy3; + if (yych <= '9') goto yy140; + goto yy4; yy164: YYDEBUG(164, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy139; - goto yy3; + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'C') goto yy141; + if (yych <= 'C') goto yy142; if (yych >= 'E') goto yy168; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy166: @@ -3530,24 +3557,24 @@ yy166: ++YYCURSOR; if ((yych = *YYCURSOR) <= 'N') { if (yych <= ')') { - if (yych >= ')') goto yy139; + if (yych >= ')') goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'M') goto yy142; + if (yych <= 'M') goto yy143; goto yy174; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych >= 'a') goto yy142; + if (yych <= 'Z') goto yy143; + if (yych >= 'a') goto yy143; } else { if (yych <= 'n') goto yy174; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; } } yy167: YYDEBUG(167, *YYCURSOR); -#line 1564 "ext/date/lib/parse_date.re" +#line 1565 "ext/date/lib/parse_date.re" { const timelib_relunit* relunit; DEBUG_OUTPUT("daytext"); @@ -3564,27 +3591,27 @@ yy167: TIMELIB_DEINIT; return TIMELIB_WEEKDAY; } -#line 3568 "ext/date/lib/parse_date.c" +#line 3593 "ext/date/lib/parse_date.c" yy168: YYDEBUG(168, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'K') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'J') goto yy143; } } else { if (yych <= 'j') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'k') goto yy169; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy169: @@ -3592,48 +3619,48 @@ yy169: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy144; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'd') goto yy170; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy170: YYDEBUG(170, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') goto yy145; + goto yy4; } else { if (yych <= 'a') goto yy171; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy171: YYDEBUG(171, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Y') goto yy172; - if (yych != 'y') goto yy3; + if (yych != 'y') goto yy4; } yy172: YYDEBUG(172, *YYCURSOR); @@ -3649,21 +3676,21 @@ yy174: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy144; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'e') goto yy175; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy175: @@ -3671,21 +3698,21 @@ yy175: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy145; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 's') goto yy176; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy176: @@ -3693,194 +3720,222 @@ yy176: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'C') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'D') goto yy177; - if (yych != 'd') goto yy3; + if (yych != 'd') goto yy4; } yy177: YYDEBUG(177, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy178; - if (yych != 'a') goto yy56; + if (yych != 'a') goto yy57; yy178: YYDEBUG(178, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy56; + goto yy57; yy179: YYDEBUG(179, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy141; - if (yych <= 'D') goto yy166; - goto yy168; + 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') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + 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 yy146; + if (yych <= 'c') goto yy147; } else { if (yych <= 'e') goto yy181; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } YYDEBUG(180, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'M') goto yy142; - goto yy174; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'N') goto yy174; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'n') goto yy187; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'K') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'J') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; - goto yy169; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'K') goto yy169; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'k') goto yy182; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy170; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy170; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy183; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy171; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy171; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy184; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy184: YYDEBUG(184, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'X') goto yy3; - goto yy172; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'Y') goto yy172; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'y') goto yy185; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy185: YYDEBUG(185, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych <= '/') { - if (yych <= '.') goto yy167; - goto yy147; - } else { - if (yych == 'S') goto yy173; + 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 <= 'r') { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy167; - goto yy154; + if (yych <= '`') { + if (yych == '_') goto yy148; + goto yy167; } else { - if (yych <= 's') goto yy186; + if (yych == 's') goto yy186; if (yych <= 'z') goto yy154; goto yy167; } @@ -3889,86 +3944,101 @@ yy186: YYDEBUG(186, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy167; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy167; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy167; } yy187: YYDEBUG(187, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; - goto yy175; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy175; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy188; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy144; - goto yy176; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy176; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy189; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'C') goto yy3; - goto yy177; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'D') goto yy177; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'd') goto yy190; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy190: @@ -3986,21 +4056,21 @@ yy192: yych = *++YYCURSOR; if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy142; } } else { if (yych <= 'b') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'c') goto yy193; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy193: @@ -4016,7 +4086,7 @@ yy193: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; } else { if (yych <= '-') goto yy197; if (yych <= '.') goto yy196; @@ -4028,20 +4098,20 @@ yy193: if (yych <= '9') goto yy196; } else { if (yych == 'E') goto yy202; - goto yy142; + goto yy143; } } else { if (yych <= 'd') { - if (yych >= 'a') goto yy142; + if (yych >= 'a') goto yy143; } else { if (yych <= 'e') goto yy202; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; } } } yy194: YYDEBUG(194, *YYCURSOR); -#line 1623 "ext/date/lib/parse_date.re" +#line 1624 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("monthtext"); TIMELIB_INIT; @@ -4050,7 +4120,7 @@ yy194: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 4054 "ext/date/lib/parse_date.c" +#line 4122 "ext/date/lib/parse_date.c" yy195: YYDEBUG(195, *YYCURSOR); ++YYCURSOR; @@ -4061,18 +4131,18 @@ yy196: if (yybm[0+yych] & 32) { goto yy195; } - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '2') goto yy198; if (yych <= '3') goto yy200; if (yych <= '9') goto yy201; - goto yy56; + goto yy57; yy197: YYDEBUG(197, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy196; - if (yych <= '0') goto yy358; - if (yych <= '2') goto yy359; - if (yych <= '3') goto yy360; + if (yych <= '0') goto yy357; + if (yych <= '2') goto yy358; + if (yych <= '3') goto yy359; goto yy196; yy198: YYDEBUG(198, *YYCURSOR); @@ -4081,11 +4151,11 @@ yy198: if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy299; - goto yy300; + if (yych <= '0') goto yy298; + goto yy299; } else { - if (yych <= '2') goto yy356; - if (yych <= '9') goto yy357; + if (yych <= '2') goto yy355; + if (yych <= '9') goto yy356; goto yy216; } } else { @@ -4101,7 +4171,7 @@ yy198: } yy199: YYDEBUG(199, *YYCURSOR); -#line 1373 "ext/date/lib/parse_date.re" +#line 1374 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datetextual | datenoyear"); TIMELIB_INIT; @@ -4113,7 +4183,7 @@ yy199: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 4117 "ext/date/lib/parse_date.c" +#line 4185 "ext/date/lib/parse_date.c" yy200: YYDEBUG(200, *YYCURSOR); yyaccept = 6; @@ -4121,8 +4191,8 @@ yy200: if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy299; - goto yy300; + if (yych <= '0') goto yy298; + goto yy299; } else { if (yych <= '2') goto yy209; if (yych <= '9') goto yy210; @@ -4169,21 +4239,21 @@ yy202: yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'L') goto yy144; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'm') goto yy203; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy203: @@ -4191,21 +4261,21 @@ yy203: yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy145; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'b') goto yy204; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy204: @@ -4213,17 +4283,17 @@ yy204: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'E') goto yy205; - if (yych != 'e') goto yy3; + if (yych != 'e') goto yy4; } yy205: YYDEBUG(205, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'R') goto yy206; - if (yych != 'r') goto yy56; + if (yych != 'r') goto yy57; yy206: YYDEBUG(206, *YYCURSOR); yyaccept = 5; @@ -4247,47 +4317,47 @@ yy207: yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { - if (yych <= '0') goto yy297; - if (yych <= '9') goto yy298; + if (yych <= '0') goto yy296; + if (yych <= '9') goto yy297; if (yych <= ':') goto yy221; - goto yy56; + goto yy57; } yy208: YYDEBUG(208, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '2') goto yy298; - if (yych <= '9') goto yy297; - if (yych <= ':') goto yy265; - goto yy56; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '4') goto yy297; - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy265; - goto yy56; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '9') goto yy294; - if (yych <= ':') goto yy265; - goto yy56; + if (yych <= '9') goto yy293; + if (yych <= ':') goto yy264; + goto yy57; } yy211: YYDEBUG(211, *YYCURSOR); @@ -4322,54 +4392,54 @@ yy216: } if (yych <= '2') { if (yych <= '/') goto yy199; - if (yych <= '0') goto yy260; - if (yych <= '1') goto yy261; - goto yy262; + if (yych <= '0') goto yy259; + if (yych <= '1') goto yy260; + goto yy261; } else { - if (yych <= '9') goto yy263; + if (yych <= '9') goto yy262; if (yych != 'T') goto yy199; } YYDEBUG(217, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '1') goto yy218; if (yych <= '2') goto yy219; if (yych <= '9') goto yy220; - goto yy56; + goto yy57; yy218: YYDEBUG(218, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { if (yych <= '9') goto yy220; if (yych <= ':') goto yy221; - goto yy56; + goto yy57; } yy219: YYDEBUG(219, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { if (yych <= '4') goto yy220; if (yych == ':') goto yy221; - goto yy56; + goto yy57; } yy220: YYDEBUG(220, *YYCURSOR); yych = *++YYCURSOR; if (yych == '.') goto yy221; - if (yych != ':') goto yy56; + if (yych != ':') goto yy57; yy221: YYDEBUG(221, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '5') goto yy222; if (yych <= '9') goto yy224; - goto yy56; + goto yy57; yy222: YYDEBUG(222, *YYCURSOR); yyaccept = 7; @@ -4382,7 +4452,7 @@ yy222: } yy223: YYDEBUG(223, *YYCURSOR); -#line 1671 "ext/date/lib/parse_date.re" +#line 1672 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("dateshortwithtimeshort | dateshortwithtimelong | dateshortwithtimelongtz"); @@ -4411,7 +4481,7 @@ yy223: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 4415 "ext/date/lib/parse_date.c" +#line 4483 "ext/date/lib/parse_date.c" yy224: YYDEBUG(224, *YYCURSOR); yyaccept = 7; @@ -4421,11 +4491,11 @@ yy224: yy225: YYDEBUG(225, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '5') goto yy226; if (yych <= '6') goto yy227; if (yych <= '9') goto yy228; - goto yy56; + goto yy57; yy226: YYDEBUG(226, *YYCURSOR); yych = *++YYCURSOR; @@ -4476,25 +4546,25 @@ yy231: if (yych <= '+') { if (yych <= ' ') { if (yych == '\t') goto yy230; - if (yych <= 0x1F) goto yy56; + if (yych <= 0x1F) goto yy57; goto yy230; } else { if (yych == '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } } else { if (yych <= 'F') { if (yych == '-') goto yy233; - if (yych <= '@') goto yy56; + if (yych <= '@') goto yy57; goto yy235; } else { if (yych <= 'Z') { if (yych >= 'H') goto yy235; } else { - if (yych <= '`') goto yy56; + if (yych <= '`') goto yy57; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } @@ -4507,7 +4577,7 @@ yy232: goto yy237; } else { if (yych <= 'Z') { - if (yych <= 'M') goto yy258; + if (yych <= 'M') goto yy257; goto yy237; } else { if (yych <= '`') goto yy223; @@ -4518,19 +4588,19 @@ yy232: yy233: YYDEBUG(233, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy253; - if (yych <= '2') goto yy254; - if (yych <= '9') goto yy255; - goto yy56; + 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 yy56; + if (yych <= '@') goto yy57; if (yych <= 'Z') goto yy236; - if (yych <= '`') goto yy56; + if (yych <= '`') goto yy57; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; yy235: YYDEBUG(235, *YYCURSOR); yych = *++YYCURSOR; @@ -4607,20 +4677,21 @@ yy242: YYDEBUG(242, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; - } else { - if (yych == '/') goto yy244; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy228; goto yy223; + } else { + if (yych == '.') goto yy223; + goto yy244; } } else { - if (yych <= '_') { + if (yych <= '^') { + if (yych <= '@') goto yy223; if (yych <= 'Z') goto yy238; - if (yych <= '^') goto yy223; - goto yy244; + goto yy223; } else { + if (yych <= '_') goto yy244; if (yych <= '`') goto yy223; if (yych >= '{') goto yy223; } @@ -4629,20 +4700,22 @@ yy243: YYDEBUG(243, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy228; + goto yy223; } else { - if (yych != '/') goto yy223; + if (yych == '.') goto yy223; } } else { - if (yych <= '_') { + if (yych <= '^') { + if (yych <= '@') goto yy223; if (yych <= 'Z') goto yy239; - if (yych <= '^') goto yy223; + goto yy223; } else { + if (yych <= '_') goto yy244; if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy248; + if (yych <= 'z') goto yy247; goto yy223; } } @@ -4651,66 +4724,95 @@ yy244: ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - if (yych <= '@') goto yy56; - if (yych >= '[') goto yy56; + if (yych <= '@') goto yy57; + if (yych <= 'Z') goto yy245; + if (yych <= '`') goto yy57; + if (yych >= '{') goto yy57; +yy245: YYDEBUG(245, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; - if (yych <= '`') goto yy56; - if (yych >= '{') goto yy56; -yy246: - YYDEBUG(246, *YYCURSOR); yyaccept = 7; YYMARKER = ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - YYDEBUG(247, *YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy244; - goto yy223; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy246; - goto yy223; - } -yy248: - YYDEBUG(248, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); + YYDEBUG(246, *YYCURSOR); if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy223; - goto yy228; + if (yych <= '-') { + if (yych <= ',') goto yy223; + goto yy244; } else { if (yych == '/') goto yy244; goto yy223; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy240; + 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 <= ')') { if (yych <= '(') goto yy223; goto yy228; } else { - if (yych == '/') goto yy244; + if (yych == '-') goto yy244; goto yy223; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy241; + if (yych <= '/') goto yy244; if (yych <= '^') goto yy223; goto yy244; } else { @@ -4718,78 +4820,67 @@ yy248: if (yych >= '{') goto yy223; } } +yy250: YYDEBUG(250, *YYCURSOR); - yyaccept = 7; - yych = *(YYMARKER = ++YYCURSOR); + ++YYCURSOR; + if (YYLIMIT <= YYCURSOR) YYFILL(1); + yych = *YYCURSOR; + YYDEBUG(251, *YYCURSOR); if (yych <= '/') { - if (yych == ')') goto yy228; - if (yych <= '.') goto yy223; + if (yych == '-') goto yy244; + if (yych <= '.') goto yy57; goto yy244; } else { if (yych <= '_') { - if (yych <= '^') goto yy223; + if (yych <= '^') goto yy57; goto yy244; } else { - if (yych <= '`') goto yy223; - if (yych >= '{') goto yy223; + if (yych <= '`') goto yy57; + if (yych <= 'z') goto yy250; + goto yy57; } } -yy251: - YYDEBUG(251, *YYCURSOR); - ++YYCURSOR; - if (YYLIMIT <= YYCURSOR) YYFILL(1); - yych = *YYCURSOR; +yy252: YYDEBUG(252, *YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy244; - goto yy56; - } else { - if (yych <= '_') goto yy244; - if (yych <= '`') goto yy56; - if (yych <= 'z') goto yy251; - goto yy56; - } -yy253: - YYDEBUG(253, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy223; - if (yych <= '9') goto yy255; - if (yych <= ':') goto yy256; + if (yych <= '9') goto yy254; + if (yych <= ':') goto yy255; goto yy223; -yy254: - YYDEBUG(254, *YYCURSOR); +yy253: + YYDEBUG(253, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '5') { if (yych <= '/') goto yy223; - if (yych >= '5') goto yy257; + if (yych >= '5') goto yy256; } else { if (yych <= '9') goto yy228; - if (yych <= ':') goto yy256; + 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 yy257; + if (yych <= '5') goto yy256; if (yych <= '9') goto yy228; - if (yych >= ';') goto yy223; + goto yy223; yy256: YYDEBUG(256, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy223; - if (yych <= '5') goto yy257; if (yych <= '9') goto yy228; goto yy223; yy257: YYDEBUG(257, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy228; - goto yy223; -yy258: - YYDEBUG(258, *YYCURSOR); - yych = *++YYCURSOR; if (yych <= 'S') { if (yych == ')') goto yy228; if (yych <= '@') goto yy223; @@ -4803,7 +4894,7 @@ yy258: goto yy223; } } - YYDEBUG(259, *YYCURSOR); + YYDEBUG(258, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -4825,161 +4916,161 @@ yy258: goto yy223; } } -yy260: - YYDEBUG(260, *YYCURSOR); +yy259: + YYDEBUG(259, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy221; goto yy199; } else { - if (yych <= '0') goto yy292; - if (yych <= '9') goto yy293; + if (yych <= '0') goto yy291; + if (yych <= '9') goto yy292; if (yych <= ':') goto yy221; goto yy199; } -yy261: - YYDEBUG(261, *YYCURSOR); +yy260: + YYDEBUG(260, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '2') goto yy293; - if (yych <= '9') goto yy292; - if (yych <= ':') goto yy265; + if (yych <= '2') goto yy292; + if (yych <= '9') goto yy291; + if (yych <= ':') goto yy264; goto yy199; } -yy262: - YYDEBUG(262, *YYCURSOR); +yy261: + YYDEBUG(261, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '4') goto yy292; - if (yych <= '9') goto yy264; - if (yych <= ':') goto yy265; + if (yych <= '4') goto yy291; + if (yych <= '9') goto yy263; + if (yych <= ':') goto yy264; goto yy199; } -yy263: - YYDEBUG(263, *YYCURSOR); +yy262: + YYDEBUG(262, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '9') goto yy264; - if (yych <= ':') goto yy265; + if (yych <= '9') goto yy263; + if (yych <= ':') goto yy264; goto yy199; } -yy264: - YYDEBUG(264, *YYCURSOR); +yy263: + YYDEBUG(263, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy266; - if (yych <= '9') goto yy267; - goto yy56; -yy266: - YYDEBUG(266, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '9') goto yy283; - if (yych <= ':') goto yy268; + if (yych <= '9') goto yy282; + if (yych <= ':') goto yy267; goto yy223; } -yy267: - YYDEBUG(267, *YYCURSOR); +yy266: + YYDEBUG(266, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy268; + 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 yy56; - if (yych <= '5') goto yy269; - if (yych <= '6') goto yy270; - if (yych <= '9') goto yy228; - goto yy56; + if (yych <= '/') goto yy223; + if (yych <= '9') goto yy270; + goto yy223; yy269: YYDEBUG(269, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy223; - if (yych <= '9') goto yy271; - goto yy223; + if (yych != '0') goto yy223; yy270: YYDEBUG(270, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '0') goto yy223; -yy271: - YYDEBUG(271, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '*') { if (yych <= 0x1F) { - if (yych == '\t') goto yy273; + if (yych == '\t') goto yy272; goto yy223; } else { - if (yych <= ' ') goto yy273; - if (yych == '(') goto yy273; + if (yych <= ' ') goto yy272; + if (yych == '(') goto yy272; goto yy223; } } else { if (yych <= '@') { if (yych == ',') goto yy223; - if (yych <= '-') goto yy273; + if (yych <= '-') goto yy272; goto yy223; } else { - if (yych <= 'Z') goto yy273; + if (yych <= 'Z') goto yy272; if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy273; + if (yych <= 'z') goto yy272; goto yy223; } } -yy272: - YYDEBUG(272, *YYCURSOR); +yy271: + YYDEBUG(271, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; -yy273: - YYDEBUG(273, *YYCURSOR); +yy272: + YYDEBUG(272, *YYCURSOR); if (yych <= '@') { if (yych <= '\'') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy272; + if (yych <= 0x08) goto yy57; + goto yy271; } else { - if (yych == ' ') goto yy272; - goto yy56; + if (yych == ' ') goto yy271; + goto yy57; } } else { if (yych <= '+') { if (yych <= '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } else { if (yych == '-') goto yy233; - goto yy56; + goto yy57; } } } else { if (yych <= 'Z') { if (yych <= 'G') { - if (yych <= 'A') goto yy274; + if (yych <= 'A') goto yy273; if (yych <= 'F') goto yy235; goto yy232; } else { @@ -4987,18 +5078,18 @@ yy273: } } else { if (yych <= 'o') { - if (yych <= '`') goto yy56; - if (yych <= 'a') goto yy275; + if (yych <= '`') goto yy57; + if (yych <= 'a') goto yy274; goto yy236; } else { - if (yych <= 'p') goto yy275; + if (yych <= 'p') goto yy274; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } -yy274: - YYDEBUG(274, *YYCURSOR); +yy273: + YYDEBUG(273, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5006,23 +5097,23 @@ yy274: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy276; + if (yych <= '.') goto yy275; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy277; + if (yych <= 'M') goto yy276; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy282; + if (yych == 'm') goto yy281; if (yych <= 'z') goto yy242; goto yy223; } } -yy275: - YYDEBUG(275, *YYCURSOR); +yy274: + YYDEBUG(274, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5030,38 +5121,38 @@ yy275: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy276; + if (yych <= '.') goto yy275; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy277; + if (yych <= 'M') goto yy276; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy277; + 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); - yych = *++YYCURSOR; - if (yych == 'M') goto yy281; - if (yych == 'm') goto yy281; - goto yy56; -yy277: - YYDEBUG(277, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych <= '\t') { - if (yych <= 0x00) goto yy279; + if (yych <= 0x00) goto yy278; if (yych <= 0x08) goto yy223; - goto yy279; + goto yy278; } else { - if (yych == ' ') goto yy279; + if (yych == ' ') goto yy278; if (yych <= '(') goto yy223; goto yy228; } @@ -5075,20 +5166,20 @@ yy277: goto yy223; } } -yy278: - YYDEBUG(278, *YYCURSOR); +yy277: + YYDEBUG(277, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy279; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy278; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy279: - YYDEBUG(279, *YYCURSOR); +yy278: + YYDEBUG(278, *YYCURSOR); ++YYCURSOR; - YYDEBUG(280, *YYCURSOR); -#line 1647 "ext/date/lib/parse_date.re" + YYDEBUG(279, *YYCURSOR); +#line 1648 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("dateshortwithtimeshort12 | dateshortwithtimelong12"); TIMELIB_INIT; @@ -5111,36 +5202,41 @@ yy279: TIMELIB_DEINIT; return TIMELIB_SHORTDATE_WITH_TIME; } -#line 5115 "ext/date/lib/parse_date.c" -yy281: - YYDEBUG(281, *YYCURSOR); +#line 5204 "ext/date/lib/parse_date.c" +yy280: + YYDEBUG(280, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; - goto yy56; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; + goto yy57; } else { - if (yych <= ' ') goto yy279; - if (yych == '.') goto yy278; - goto yy56; + if (yych <= ' ') goto yy278; + if (yych == '.') goto yy277; + goto yy57; } -yy282: - YYDEBUG(282, *YYCURSOR); +yy281: + YYDEBUG(281, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '-') { if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; goto yy223; } else { - if (yych <= ' ') goto yy279; - if (yych == ')') goto yy228; - goto yy223; + 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 yy278; + if (yych <= '.') goto yy277; if (yych <= '/') goto yy244; if (yych <= '@') goto yy223; goto yy238; @@ -5155,136 +5251,136 @@ yy282: } } } -yy283: - YYDEBUG(283, *YYCURSOR); +yy282: + YYDEBUG(282, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy223; } else { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; if (yych <= '9') goto yy223; - goto yy268; + goto yy267; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy223; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy223; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy223; } } } -yy284: - YYDEBUG(284, *YYCURSOR); +yy283: + YYDEBUG(283, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(285, *YYCURSOR); + YYDEBUG(284, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy284; - goto yy56; + if (yych == '\t') goto yy283; + goto yy57; } else { - if (yych <= ' ') goto yy284; - if (yych <= '@') goto yy56; + if (yych <= ' ') goto yy283; + if (yych <= '@') goto yy57; } } else { if (yych <= '`') { - if (yych != 'P') goto yy56; + if (yych != 'P') goto yy57; } else { - if (yych <= 'a') goto yy286; - if (yych != 'p') goto yy56; + if (yych <= 'a') goto yy285; + if (yych != 'p') goto yy57; } } -yy286: - YYDEBUG(286, *YYCURSOR); +yy285: + YYDEBUG(285, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy288; - if (yych == 'm') goto yy288; - goto yy56; + 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 == 'M') goto yy288; - if (yych != 'm') goto yy56; -yy288: - YYDEBUG(288, *YYCURSOR); - yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; - goto yy56; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; + goto yy57; } else { - if (yych <= ' ') goto yy279; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy278; + if (yych != '.') goto yy57; } -yy289: - YYDEBUG(289, *YYCURSOR); +yy288: + YYDEBUG(288, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy279; - if (yych <= 0x08) goto yy56; - goto yy279; + if (yych <= 0x00) goto yy278; + if (yych <= 0x08) goto yy57; + goto yy278; } else { - if (yych == ' ') goto yy279; - goto yy56; + if (yych == ' ') goto yy278; + goto yy57; } -yy290: - YYDEBUG(290, *YYCURSOR); +yy289: + YYDEBUG(289, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') goto yy199; if (yych >= ':') goto yy199; - YYDEBUG(291, *YYCURSOR); + YYDEBUG(290, *YYCURSOR); yych = *++YYCURSOR; goto yy199; -yy292: - YYDEBUG(292, *YYCURSOR); +yy291: + YYDEBUG(291, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy221; goto yy199; } else { - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; if (yych <= ':') goto yy221; goto yy199; } -yy293: - YYDEBUG(293, *YYCURSOR); +yy292: + YYDEBUG(292, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy265; + if (yych == '.') goto yy264; goto yy199; } else { - if (yych <= '9') goto yy290; - if (yych <= ':') goto yy265; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + ++YYCURSOR; yy295: YYDEBUG(295, *YYCURSOR); - ++YYCURSOR; -yy296: - YYDEBUG(296, *YYCURSOR); -#line 1347 "ext/date/lib/parse_date.re" +#line 1348 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenoday"); TIMELIB_INIT; @@ -5296,42 +5392,42 @@ yy296: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 5300 "ext/date/lib/parse_date.c" -yy297: - YYDEBUG(297, *YYCURSOR); +#line 5394 "ext/date/lib/parse_date.c" +yy296: + YYDEBUG(296, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { - if (yych <= '9') goto yy295; + if (yych <= '9') goto yy294; if (yych <= ':') goto yy221; - goto yy56; + goto yy57; } -yy298: - YYDEBUG(298, *YYCURSOR); +yy297: + YYDEBUG(297, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '9') goto yy295; - if (yych <= ':') goto yy265; - goto yy56; + if (yych <= '9') goto yy294; + if (yych <= ':') goto yy264; + goto yy57; } -yy299: - YYDEBUG(299, *YYCURSOR); +yy298: + YYDEBUG(298, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { - if (yych == '.') goto yy332; + if (yych == '.') goto yy331; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { @@ -5345,22 +5441,22 @@ yy299: goto yy216; } } -yy300: - YYDEBUG(300, *YYCURSOR); +yy299: + YYDEBUG(299, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych != '.') goto yy216; } else { - if (yych <= '0') goto yy302; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy301; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -5370,81 +5466,94 @@ yy300: goto yy216; } } -yy301: - YYDEBUG(301, *YYCURSOR); +yy300: + YYDEBUG(300, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy307; - goto yy308; + if (yych <= '0') goto yy306; + goto yy307; } else { - if (yych <= '2') goto yy309; - if (yych <= '5') goto yy310; - if (yych <= '9') goto yy311; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '0') goto yy305; - if (yych <= '9') goto yy306; - if (yych <= ':') goto yy265; - goto yy56; + 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 yy265; - goto yy56; + if (yych == '.') goto yy264; + goto yy57; } else { - if (yych <= '2') goto yy306; - if (yych <= '9') goto yy305; - if (yych <= ':') goto yy265; - goto yy56; + if (yych <= '4') goto yy304; + if (yych <= '9') goto yy294; + if (yych <= ':') goto yy264; + goto yy57; } yy304: YYDEBUG(304, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') { - if (yych == '.') goto yy265; - goto yy56; - } else { - if (yych <= '4') goto yy305; - if (yych <= '9') goto yy295; - if (yych <= ':') goto yy265; - goto yy56; - } -yy305: - YYDEBUG(305, *YYCURSOR); yyaccept = 8; yych = *(YYMARKER = ++YYCURSOR); if (yych == '.') goto yy221; if (yych == ':') goto yy221; - goto yy296; + 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 = 8; + yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy265; - if (yych == ':') goto yy265; - goto yy296; + 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 yy327; + if (yych == '.') goto yy311; goto yy199; } else { - if (yych <= '0') goto yy326; - if (yych <= '9') goto yy331; - if (yych <= ':') goto yy327; + if (yych <= '2') goto yy330; + if (yych <= '9') goto yy325; + if (yych <= ':') goto yy311; goto yy199; } yy308: @@ -5452,12 +5561,12 @@ yy308: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy312; + if (yych == '.') goto yy311; goto yy199; } else { - if (yych <= '2') goto yy331; - if (yych <= '9') goto yy326; - if (yych <= ':') goto yy312; + if (yych <= '4') goto yy325; + if (yych <= '9') goto yy324; + if (yych <= ':') goto yy311; goto yy199; } yy309: @@ -5465,12 +5574,11 @@ yy309: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy312; + if (yych == '.') goto yy311; goto yy199; } else { - if (yych <= '4') goto yy326; - if (yych <= '9') goto yy325; - if (yych <= ':') goto yy312; + if (yych <= '9') goto yy324; + if (yych <= ':') goto yy311; goto yy199; } yy310: @@ -5478,120 +5586,108 @@ yy310: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy312; - goto yy199; - } else { - if (yych <= '9') goto yy325; - if (yych <= ':') goto yy312; - goto yy199; - } -yy311: - YYDEBUG(311, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { if (yych != '.') goto yy199; } else { - if (yych <= '9') goto yy264; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy313; - if (yych <= '6') goto yy314; - if (yych <= '9') goto yy267; - goto yy56; -yy313: - YYDEBUG(313, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '9') goto yy315; - if (yych <= ':') goto yy268; + if (yych <= '9') goto yy314; + if (yych <= ':') goto yy267; goto yy223; } -yy314: - YYDEBUG(314, *YYCURSOR); +yy313: + YYDEBUG(313, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '0') goto yy271; - if (yych == ':') goto yy268; + if (yych <= '0') goto yy270; + if (yych == ':') goto yy267; goto yy223; } -yy315: - YYDEBUG(315, *YYCURSOR); +yy314: + YYDEBUG(314, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ' ') { - if (yych == '\t') goto yy317; + if (yych == '\t') goto yy316; if (yych <= 0x1F) goto yy223; - goto yy317; + goto yy316; } else { if (yych <= '(') { if (yych <= '\'') goto yy223; - goto yy317; + goto yy316; } else { - if (yych == '+') goto yy317; + if (yych == '+') goto yy316; goto yy223; } } } else { if (yych <= ':') { - if (yych <= '-') goto yy317; - if (yych <= '.') goto yy268; + if (yych <= '-') goto yy316; + if (yych <= '.') goto yy267; if (yych <= '9') goto yy223; - goto yy268; + goto yy267; } else { if (yych <= 'Z') { if (yych <= '@') goto yy223; - goto yy317; + goto yy316; } else { if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy317; + if (yych <= 'z') goto yy316; goto yy223; } } } -yy316: - YYDEBUG(316, *YYCURSOR); +yy315: + YYDEBUG(315, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; -yy317: - YYDEBUG(317, *YYCURSOR); +yy316: + YYDEBUG(316, *YYCURSOR); if (yych <= '@') { if (yych <= '\'') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy316; + if (yych <= 0x08) goto yy57; + goto yy315; } else { - if (yych == ' ') goto yy316; - goto yy56; + if (yych == ' ') goto yy315; + goto yy57; } } else { if (yych <= '+') { if (yych <= '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } else { if (yych == '-') goto yy233; - goto yy56; + goto yy57; } } } else { if (yych <= 'Z') { if (yych <= 'G') { - if (yych <= 'A') goto yy318; + if (yych <= 'A') goto yy317; if (yych <= 'F') goto yy235; goto yy232; } else { @@ -5599,18 +5695,18 @@ yy317: } } else { if (yych <= 'o') { - if (yych <= '`') goto yy56; - if (yych <= 'a') goto yy319; + if (yych <= '`') goto yy57; + if (yych <= 'a') goto yy318; goto yy236; } else { - if (yych <= 'p') goto yy319; + if (yych <= 'p') goto yy318; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } -yy318: - YYDEBUG(318, *YYCURSOR); +yy317: + YYDEBUG(317, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5618,23 +5714,23 @@ yy318: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy321; + if (yych <= '.') goto yy320; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy320; + if (yych <= 'M') goto yy319; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy324; + if (yych == 'm') goto yy323; if (yych <= 'z') goto yy242; goto yy223; } } -yy319: - YYDEBUG(319, *YYCURSOR); +yy318: + YYDEBUG(318, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -5642,38 +5738,38 @@ yy319: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy321; + if (yych <= '.') goto yy320; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy320; + if (yych <= 'M') goto yy319; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy320; + if (yych == 'm') goto yy319; if (yych <= 'z') goto yy237; goto yy223; } } -yy320: - YYDEBUG(320, *YYCURSOR); +yy319: + YYDEBUG(319, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych <= '\t') { - if (yych <= 0x00) goto yy279; + if (yych <= 0x00) goto yy278; if (yych <= 0x08) goto yy223; - goto yy279; + goto yy278; } else { - if (yych == ' ') goto yy279; + if (yych == ' ') goto yy278; if (yych <= '(') goto yy223; goto yy228; } } else { if (yych <= '@') { - if (yych == '.') goto yy323; + if (yych == '.') goto yy322; goto yy223; } else { if (yych <= 'Z') goto yy238; @@ -5682,50 +5778,55 @@ yy320: 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 == 'M') goto yy322; - if (yych != 'm') goto yy56; -yy322: - YYDEBUG(322, *YYCURSOR); - yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; - goto yy56; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; + goto yy57; } else { - if (yych <= ' ') goto yy279; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy278; + if (yych != '.') goto yy57; } -yy323: - YYDEBUG(323, *YYCURSOR); +yy322: + YYDEBUG(322, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy279; - if (yych <= 0x08) goto yy56; - goto yy279; + if (yych <= 0x00) goto yy278; + if (yych <= 0x08) goto yy57; + goto yy278; } else { - if (yych == ' ') goto yy279; - goto yy56; + if (yych == ' ') goto yy278; + goto yy57; } -yy324: - YYDEBUG(324, *YYCURSOR); +yy323: + YYDEBUG(323, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '-') { if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; goto yy223; } else { - if (yych <= ' ') goto yy279; - if (yych == ')') goto yy228; - goto yy223; + 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 yy323; + if (yych <= '.') goto yy322; if (yych <= '/') goto yy244; if (yych <= '@') goto yy223; goto yy238; @@ -5740,210 +5841,223 @@ yy324: } } } -yy325: - YYDEBUG(325, *YYCURSOR); +yy324: + YYDEBUG(324, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy199; - goto yy284; + goto yy283; } else { if (yych <= '.') { if (yych <= '-') goto yy199; - goto yy268; + goto yy267; } else { if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; - goto yy268; + if (yych <= '9') goto yy289; + goto yy267; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy199; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy199; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy199; } } } -yy326: - YYDEBUG(326, *YYCURSOR); +yy325: + YYDEBUG(325, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy199; - goto yy284; + goto yy283; } else { if (yych <= '.') { if (yych <= '-') goto yy199; } else { if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy199; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy199; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy199; } } } -yy327: - YYDEBUG(327, *YYCURSOR); +yy326: + YYDEBUG(326, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy328; - if (yych <= '6') goto yy329; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy327; + if (yych <= '6') goto yy328; if (yych <= '9') goto yy224; - goto yy56; -yy328: - YYDEBUG(328, *YYCURSOR); + goto yy57; +yy327: + YYDEBUG(327, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy223; } else { - if (yych <= '9') goto yy330; + if (yych <= '9') goto yy329; if (yych <= ':') goto yy225; goto yy223; } -yy329: - YYDEBUG(329, *YYCURSOR); +yy328: + YYDEBUG(328, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy223; } else { - if (yych <= '0') goto yy271; + if (yych <= '0') goto yy270; if (yych == ':') goto yy225; goto yy223; } -yy330: - YYDEBUG(330, *YYCURSOR); +yy329: + YYDEBUG(329, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ' ') { - if (yych == '\t') goto yy273; + if (yych == '\t') goto yy272; if (yych <= 0x1F) goto yy223; - goto yy273; + goto yy272; } else { if (yych <= '(') { if (yych <= '\'') goto yy223; - goto yy273; + goto yy272; } else { - if (yych == '+') goto yy273; + if (yych == '+') goto yy272; goto yy223; } } } else { if (yych <= ':') { - if (yych <= '-') goto yy273; + if (yych <= '-') goto yy272; if (yych <= '.') goto yy225; if (yych <= '9') goto yy223; goto yy225; } else { if (yych <= 'Z') { if (yych <= '@') goto yy223; - goto yy273; + goto yy272; } else { if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy273; + if (yych <= 'z') goto yy272; goto yy223; } } } -yy331: - YYDEBUG(331, *YYCURSOR); +yy330: + YYDEBUG(330, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy284; + if (yych == '\t') goto yy283; if (yych <= 0x1F) goto yy199; - goto yy284; + goto yy283; } else { if (yych <= '.') { if (yych <= '-') goto yy199; - goto yy312; + goto yy311; } else { if (yych <= '/') goto yy199; - if (yych <= '9') goto yy290; - goto yy312; + if (yych <= '9') goto yy289; + goto yy311; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy286; + if (yych == 'A') goto yy285; if (yych <= 'O') goto yy199; - goto yy286; + goto yy285; } else { if (yych <= 'a') { if (yych <= '`') goto yy199; - goto yy286; + goto yy285; } else { - if (yych == 'p') goto yy286; + if (yych == 'p') goto yy285; goto yy199; } } } -yy332: - YYDEBUG(332, *YYCURSOR); +yy331: + YYDEBUG(331, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy334; - goto yy335; + if (yych <= '0') goto yy333; + goto yy334; } else { - if (yych <= '2') goto yy336; - if (yych <= '5') goto yy337; - if (yych <= '9') goto yy338; + if (yych <= '2') goto yy335; + if (yych <= '5') goto yy336; + if (yych <= '9') goto yy337; goto yy216; } -yy333: - YYDEBUG(333, *YYCURSOR); +yy332: + YYDEBUG(332, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { if (yych == '.') goto yy221; - goto yy56; + goto yy57; } else { - if (yych <= '0') goto yy305; - if (yych <= '9') goto yy306; + if (yych <= '0') goto yy304; + if (yych <= '9') goto yy305; if (yych <= ':') goto yy221; - goto yy56; + 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 yy351; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '0') goto yy350; - if (yych <= '9') goto yy355; - if (yych <= ':') goto yy351; + if (yych <= '2') goto yy354; + if (yych <= '9') goto yy349; + if (yych <= ':') goto yy338; goto yy199; } yy335: @@ -5951,12 +6065,12 @@ yy335: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '2') goto yy355; - if (yych <= '9') goto yy350; - if (yych <= ':') goto yy339; + if (yych <= '4') goto yy349; + if (yych <= '9') goto yy348; + if (yych <= ':') goto yy338; goto yy199; } yy336: @@ -5964,12 +6078,11 @@ yy336: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '4') goto yy350; - if (yych <= '9') goto yy349; - if (yych <= ':') goto yy339; + if (yych <= '9') goto yy348; + if (yych <= ':') goto yy338; goto yy199; } yy337: @@ -5977,120 +6090,108 @@ yy337: yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; - goto yy199; - } else { - if (yych <= '9') goto yy349; - if (yych <= ':') goto yy339; - goto yy199; - } -yy338: - YYDEBUG(338, *YYCURSOR); - yyaccept = 6; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { if (yych != '.') goto yy199; } else { - if (yych <= '9') goto yy264; + 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); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy340; - if (yych <= '6') goto yy341; - if (yych <= '9') goto yy267; - goto yy56; -yy340: - YYDEBUG(340, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { - if (yych <= '9') goto yy342; - if (yych <= ':') goto yy268; + if (yych <= '9') goto yy341; + if (yych <= ':') goto yy267; goto yy223; } -yy341: - YYDEBUG(341, *YYCURSOR); +yy340: + YYDEBUG(340, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy268; + if (yych == '.') goto yy267; goto yy223; } else { if (yych <= '0') goto yy229; - if (yych == ':') goto yy268; + if (yych == ':') goto yy267; goto yy223; } -yy342: - YYDEBUG(342, *YYCURSOR); +yy341: + YYDEBUG(341, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= ' ') { - if (yych == '\t') goto yy344; + if (yych == '\t') goto yy343; if (yych <= 0x1F) goto yy223; - goto yy344; + goto yy343; } else { if (yych <= '(') { if (yych <= '\'') goto yy223; - goto yy344; + goto yy343; } else { - if (yych == '+') goto yy344; + if (yych == '+') goto yy343; goto yy223; } } } else { if (yych <= ':') { - if (yych <= '-') goto yy344; - if (yych <= '.') goto yy268; + if (yych <= '-') goto yy343; + if (yych <= '.') goto yy267; if (yych <= '9') goto yy223; - goto yy268; + goto yy267; } else { if (yych <= 'Z') { if (yych <= '@') goto yy223; - goto yy344; + goto yy343; } else { if (yych <= '`') goto yy223; - if (yych <= 'z') goto yy344; + if (yych <= 'z') goto yy343; goto yy223; } } } -yy343: - YYDEBUG(343, *YYCURSOR); +yy342: + YYDEBUG(342, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 9) YYFILL(9); yych = *YYCURSOR; -yy344: - YYDEBUG(344, *YYCURSOR); +yy343: + YYDEBUG(343, *YYCURSOR); if (yych <= '@') { if (yych <= '\'') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy343; + if (yych <= 0x08) goto yy57; + goto yy342; } else { - if (yych == ' ') goto yy343; - goto yy56; + if (yych == ' ') goto yy342; + goto yy57; } } else { if (yych <= '+') { if (yych <= '(') goto yy234; - if (yych <= '*') goto yy56; + if (yych <= '*') goto yy57; goto yy233; } else { if (yych == '-') goto yy233; - goto yy56; + goto yy57; } } } else { if (yych <= 'Z') { if (yych <= 'G') { - if (yych <= 'A') goto yy345; + if (yych <= 'A') goto yy344; if (yych <= 'F') goto yy235; goto yy232; } else { @@ -6098,18 +6199,18 @@ yy344: } } else { if (yych <= 'o') { - if (yych <= '`') goto yy56; - if (yych <= 'a') goto yy346; + if (yych <= '`') goto yy57; + if (yych <= 'a') goto yy345; goto yy236; } else { - if (yych <= 'p') goto yy346; + if (yych <= 'p') goto yy345; if (yych <= 'z') goto yy236; - goto yy56; + goto yy57; } } } -yy345: - YYDEBUG(345, *YYCURSOR); +yy344: + YYDEBUG(344, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -6117,23 +6218,23 @@ yy345: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy287; + if (yych <= '.') goto yy286; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy347; + if (yych <= 'M') goto yy346; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy348; + if (yych == 'm') goto yy347; if (yych <= 'z') goto yy242; goto yy223; } } -yy346: - YYDEBUG(346, *YYCURSOR); +yy345: + YYDEBUG(345, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'L') { @@ -6141,38 +6242,38 @@ yy346: if (yych == ')') goto yy228; goto yy223; } else { - if (yych <= '.') goto yy287; + if (yych <= '.') goto yy286; if (yych <= '@') goto yy223; goto yy237; } } else { if (yych <= '`') { - if (yych <= 'M') goto yy347; + if (yych <= 'M') goto yy346; if (yych <= 'Z') goto yy237; goto yy223; } else { - if (yych == 'm') goto yy347; + if (yych == 'm') goto yy346; if (yych <= 'z') goto yy237; goto yy223; } } -yy347: - YYDEBUG(347, *YYCURSOR); +yy346: + YYDEBUG(346, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych <= '\t') { - if (yych <= 0x00) goto yy279; + if (yych <= 0x00) goto yy278; if (yych <= 0x08) goto yy223; - goto yy279; + goto yy278; } else { - if (yych == ' ') goto yy279; + if (yych == ' ') goto yy278; if (yych <= '(') goto yy223; goto yy228; } } else { if (yych <= '@') { - if (yych == '.') goto yy289; + if (yych == '.') goto yy288; goto yy223; } else { if (yych <= 'Z') goto yy238; @@ -6181,23 +6282,28 @@ yy347: goto yy223; } } -yy348: - YYDEBUG(348, *YYCURSOR); +yy347: + YYDEBUG(347, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '-') { if (yych <= 0x1F) { - if (yych <= 0x00) goto yy279; - if (yych == '\t') goto yy279; + if (yych <= 0x00) goto yy278; + if (yych == '\t') goto yy278; goto yy223; } else { - if (yych <= ' ') goto yy279; - if (yych == ')') goto yy228; - goto yy223; + 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 yy289; + if (yych <= '.') goto yy288; if (yych <= '/') goto yy244; if (yych <= '@') goto yy223; goto yy238; @@ -6212,50 +6318,50 @@ yy348: } } } -yy349: - YYDEBUG(349, *YYCURSOR); +yy348: + YYDEBUG(348, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy199; } else { - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; if (yych <= ':') goto yy225; goto yy199; } -yy350: - YYDEBUG(350, *YYCURSOR); +yy349: + YYDEBUG(349, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych != '.') goto yy199; } else { - if (yych <= '9') goto yy290; + if (yych <= '9') goto yy289; if (yych >= ';') goto yy199; } -yy351: - YYDEBUG(351, *YYCURSOR); +yy350: + YYDEBUG(350, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy352; - if (yych <= '6') goto yy353; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy351; + if (yych <= '6') goto yy352; if (yych <= '9') goto yy224; - goto yy56; -yy352: - YYDEBUG(352, *YYCURSOR); + goto yy57; +yy351: + YYDEBUG(351, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych == '.') goto yy225; goto yy223; } else { - if (yych <= '9') goto yy354; + if (yych <= '9') goto yy353; if (yych <= ':') goto yy225; goto yy223; } -yy353: - YYDEBUG(353, *YYCURSOR); +yy352: + YYDEBUG(352, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -6266,8 +6372,8 @@ yy353: if (yych == ':') goto yy225; goto yy223; } -yy354: - YYDEBUG(354, *YYCURSOR); +yy353: + YYDEBUG(353, *YYCURSOR); yyaccept = 7; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -6301,35 +6407,35 @@ yy354: } } } -yy355: - YYDEBUG(355, *YYCURSOR); +yy354: + YYDEBUG(354, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy339; + if (yych == '.') goto yy338; goto yy199; } else { - if (yych <= '9') goto yy290; - if (yych <= ':') goto yy339; + if (yych <= '9') goto yy289; + if (yych <= ':') goto yy338; goto yy199; } -yy356: - YYDEBUG(356, *YYCURSOR); +yy355: + YYDEBUG(355, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { - if (yych == '.') goto yy301; + if (yych == '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6339,23 +6445,23 @@ yy356: goto yy216; } } -yy357: - YYDEBUG(357, *YYCURSOR); +yy356: + YYDEBUG(356, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { - if (yych == '.') goto yy301; + if (yych == '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6365,18 +6471,18 @@ yy357: goto yy216; } } -yy358: - YYDEBUG(358, *YYCURSOR); +yy357: + YYDEBUG(357, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy361; - goto yy362; + if (yych <= '0') goto yy360; + goto yy361; } else { - if (yych <= '2') goto yy369; - if (yych <= '9') goto yy370; + if (yych <= '2') goto yy368; + if (yych <= '9') goto yy369; goto yy216; } } else { @@ -6390,18 +6496,18 @@ yy358: goto yy216; } } -yy359: - YYDEBUG(359, *YYCURSOR); +yy358: + YYDEBUG(358, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych <= '0') goto yy361; - goto yy362; + if (yych <= '0') goto yy360; + goto yy361; } else { - if (yych <= '2') goto yy369; - if (yych <= '9') goto yy370; + if (yych <= '2') goto yy368; + if (yych <= '9') goto yy369; goto yy216; } } else { @@ -6415,14 +6521,14 @@ yy359: goto yy216; } } -yy360: - YYDEBUG(360, *YYCURSOR); +yy359: + YYDEBUG(359, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { if (yych <= '/') goto yy216; - if (yych >= '1') goto yy362; + if (yych >= '1') goto yy361; } else { if (yych <= '2') goto yy209; if (yych <= '9') goto yy210; @@ -6439,21 +6545,21 @@ yy360: goto yy216; } } -yy361: - YYDEBUG(361, *YYCURSOR); +yy360: + YYDEBUG(360, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy332; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy331; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { @@ -6467,25 +6573,25 @@ yy361: goto yy216; } } -yy362: - YYDEBUG(362, *YYCURSOR); +yy361: + YYDEBUG(361, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy301; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy302; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy301; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6495,18 +6601,18 @@ yy362: goto yy216; } } -yy363: - YYDEBUG(363, *YYCURSOR); +yy362: + YYDEBUG(362, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; - YYDEBUG(364, *YYCURSOR); + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; + YYDEBUG(363, *YYCURSOR); ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy365; - if (yych <= '9') goto yy366; -yy365: - YYDEBUG(365, *YYCURSOR); -#line 1487 "ext/date/lib/parse_date.re" + if ((yych = *YYCURSOR) <= '/') goto yy364; + if (yych <= '9') goto yy365; +yy364: + YYDEBUG(364, *YYCURSOR); +#line 1488 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pgtextshort"); TIMELIB_INIT; @@ -6518,38 +6624,38 @@ yy365: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 6522 "ext/date/lib/parse_date.c" -yy366: +#line 6626 "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 yy365; - if (yych >= ':') goto yy365; + if (yych <= '/') goto yy364; + if (yych >= ':') goto yy364; YYDEBUG(367, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy365; - if (yych >= ':') goto yy365; + goto yy364; +yy368: YYDEBUG(368, *YYCURSOR); - yych = *++YYCURSOR; - goto yy365; -yy369: - YYDEBUG(369, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy301; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6559,25 +6665,25 @@ yy369: goto yy216; } } -yy370: - YYDEBUG(370, *YYCURSOR); +yy369: + YYDEBUG(369, *YYCURSOR); yyaccept = 6; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= '/') { if (yych <= ',') goto yy216; - if (yych <= '-') goto yy363; - if (yych <= '.') goto yy301; + if (yych <= '-') goto yy362; + if (yych <= '.') goto yy300; goto yy216; } else { - if (yych <= '0') goto yy333; - if (yych <= '1') goto yy303; - if (yych <= '2') goto yy304; - goto yy298; + if (yych <= '0') goto yy332; + if (yych <= '1') goto yy302; + if (yych <= '2') goto yy303; + goto yy297; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy265; + if (yych <= ':') goto yy264; if (yych == 'n') goto yy212; goto yy216; } else { @@ -6587,33 +6693,39 @@ yy370: goto yy216; } } -yy371: - YYDEBUG(371, *YYCURSOR); +yy370: + YYDEBUG(370, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'B') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; - goto yy193; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'C') goto yy193; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'c') goto yy372; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'b') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 'c') goto yy371; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy372: - YYDEBUG(372, *YYCURSOR); +yy371: + YYDEBUG(371, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -6627,11 +6739,10 @@ yy372: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -6639,15 +6750,15 @@ yy372: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'E') goto yy202; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -6657,77 +6768,101 @@ yy372: } } } +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 <= 'M') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'L') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; - goto yy203; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'M') goto yy203; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'm') goto yy374; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; - goto yy204; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy204; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy375; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'D') goto yy3; - goto yy205; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'E') goto yy205; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'e') goto yy376; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy376: @@ -6739,51 +6874,57 @@ yy377: YYDEBUG(377, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { + 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; - goto yy196; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '9') goto yy196; - goto yy194; + if (yych <= '9') { + if (yych == '/') goto yy148; + goto yy196; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy154; + 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 yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy142; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 't') goto yy379; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 't') goto yy380; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy379: - YYDEBUG(379, *YYCURSOR); +yy380: + YYDEBUG(380, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -6797,7 +6938,7 @@ yy379: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -6811,101 +6952,107 @@ yy379: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'O') goto yy142; + if (yych != 'O') goto yy143; } } else { if (yych <= 'n') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'o') goto yy380; - if (yych <= 'z') goto yy142; + if (yych <= 'o') goto yy381; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy380: - YYDEBUG(380, *YYCURSOR); +yy381: + YYDEBUG(381, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy144; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'b') goto yy381; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'b') goto yy382; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy381: - YYDEBUG(381, *YYCURSOR); +yy382: + YYDEBUG(382, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy145; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'e') goto yy382; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'e') goto yy383; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy382: - YYDEBUG(382, *YYCURSOR); +yy383: + YYDEBUG(383, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Q') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'R') goto yy206; if (yych == 'r') goto yy206; - goto yy3; + goto yy4; } -yy383: - YYDEBUG(383, *YYCURSOR); +yy384: + YYDEBUG(384, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; - goto yy379; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy380; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy384; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 's') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 't') goto yy385; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy384: - YYDEBUG(384, *YYCURSOR); +yy385: + YYDEBUG(385, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -6919,11 +7066,11 @@ yy384: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -6931,178 +7078,191 @@ yy384: if (yych <= '^') { if (yych <= 'N') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'O') goto yy380; - if (yych <= 'Z') goto yy142; + if (yych <= 'O') goto yy381; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'n') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'o') goto yy385; + if (yych <= 'o') goto yy386; if (yych <= 'z') goto yy151; goto yy194; } } } -yy385: - YYDEBUG(385, *YYCURSOR); +yy386: + YYDEBUG(386, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy143; - goto yy381; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy382; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy386; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'a') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'b') goto yy387; + if (yych <= 'z') goto yy152; + goto yy4; + } } } -yy386: - YYDEBUG(386, *YYCURSOR); +yy387: + YYDEBUG(387, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy144; - goto yy382; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy383; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy387; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 'd') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 'e') goto yy388; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy387: - YYDEBUG(387, *YYCURSOR); +yy388: + YYDEBUG(388, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'Q') goto yy3; - goto yy206; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'R') goto yy206; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'r') goto yy377; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } -yy388: - YYDEBUG(388, *YYCURSOR); +yy389: + YYDEBUG(389, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'G') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy396; + if (yych <= '@') goto yy4; + if (yych <= 'F') goto yy142; + goto yy397; } } else { if (yych <= 'f') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'g') goto yy396; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'g') goto yy397; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy389: - YYDEBUG(389, *YYCURSOR); +yy390: + YYDEBUG(390, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy141; - goto yy393; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy142; + goto yy394; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'r') goto yy393; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'r') goto yy394; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy390: - YYDEBUG(390, *YYCURSOR); +yy391: + YYDEBUG(391, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'N') goto yy142; } } else { if (yych <= 'n') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'o') goto yy391; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'o') goto yy392; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy391: - YYDEBUG(391, *YYCURSOR); +yy392: + YYDEBUG(392, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy392; - if (yych <= 'z') goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy393; + if (yych <= 'z') goto yy143; } -yy392: - YYDEBUG(392, *YYCURSOR); -#line 1543 "ext/date/lib/parse_date.re" +yy393: + YYDEBUG(393, *YYCURSOR); +#line 1544 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("ago"); TIMELIB_INIT; @@ -7122,9 +7282,9 @@ yy392: TIMELIB_DEINIT; return TIMELIB_AGO; } -#line 7126 "ext/date/lib/parse_date.c" -yy393: - YYDEBUG(393, *YYCURSOR); +#line 7284 "ext/date/lib/parse_date.c" +yy394: + YYDEBUG(394, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7138,7 +7298,7 @@ yy393: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7152,43 +7312,43 @@ yy393: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'I') goto yy142; + if (yych != 'I') goto yy143; } } else { if (yych <= 'h') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'i') goto yy394; - if (yych <= 'z') goto yy142; + if (yych <= 'i') goto yy395; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy394: - YYDEBUG(394, *YYCURSOR); +yy395: + YYDEBUG(395, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'K') goto yy144; } } else { if (yych <= 'k') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'l') goto yy395; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'l') goto yy396; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy395: - YYDEBUG(395, *YYCURSOR); +yy396: + YYDEBUG(396, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -7197,7 +7357,7 @@ yy395: goto yy194; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; goto yy194; } } else { @@ -7206,14 +7366,14 @@ yy395: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych <= 'Z') goto yy144; + if (yych <= 'Z') goto yy145; if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy144; + if (yych <= 'z') goto yy145; goto yy194; } } -yy396: - YYDEBUG(396, *YYCURSOR); +yy397: + YYDEBUG(397, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7227,7 +7387,7 @@ yy396: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7241,65 +7401,65 @@ yy396: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'U') goto yy142; + if (yych != 'U') goto yy143; } } else { if (yych <= 't') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'u') goto yy397; - if (yych <= 'z') goto yy142; + if (yych <= 'u') goto yy398; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy397: - YYDEBUG(397, *YYCURSOR); +yy398: + YYDEBUG(398, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy144; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 's') goto yy398; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 's') goto yy399; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy398: - YYDEBUG(398, *YYCURSOR); +yy399: + YYDEBUG(399, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy145; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 't') goto yy399; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 't') goto yy400; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy399: - YYDEBUG(399, *YYCURSOR); +yy400: + YYDEBUG(400, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { @@ -7312,7 +7472,7 @@ yy399: } } else { if (yych <= '.') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; goto yy196; } else { @@ -7321,106 +7481,125 @@ yy399: goto yy194; } } -yy400: - YYDEBUG(400, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy396; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'g') goto yy407; - if (yych <= 'z') goto yy146; - goto yy3; - } - } yy401: YYDEBUG(401, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'F') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy141; - goto yy393; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'G') goto yy397; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy404; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy141; - goto yy391; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy394; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy403; - if (yych <= 'z') goto yy146; - goto yy3; + 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 = 9; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy392; - goto yy139; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych == '/') goto yy147; - goto yy392; + 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 yy392; - goto yy147; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy392; - if (yych <= 'z') goto yy151; - goto yy392; + 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') { @@ -7434,11 +7613,11 @@ yy404: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -7446,51 +7625,57 @@ yy404: if (yych <= '^') { if (yych <= 'H') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'I') goto yy394; - if (yych <= 'Z') goto yy142; + if (yych <= 'I') goto yy395; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'h') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'i') goto yy405; + if (yych <= 'i') goto yy406; if (yych <= 'z') goto yy151; goto yy194; } } } -yy405: - YYDEBUG(405, *YYCURSOR); +yy406: + YYDEBUG(406, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'L') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'K') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy143; - goto yy395; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'L') goto yy396; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'l') goto yy406; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'k') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'l') goto yy407; + if (yych <= 'z') goto yy152; + goto yy4; + } } } -yy406: - YYDEBUG(406, *YYCURSOR); +yy407: + YYDEBUG(407, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { @@ -7499,20 +7684,25 @@ yy406: if (yych <= 0x1F) goto yy194; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy194; - goto yy196; + 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 yy147; + if (yych <= '/') goto yy148; if (yych <= '9') goto yy196; if (yych <= '@') goto yy194; - goto yy144; + goto yy145; } else { if (yych <= '_') { if (yych <= '^') goto yy194; - goto yy147; + goto yy148; } else { if (yych <= '`') goto yy194; if (yych <= 'z') goto yy153; @@ -7520,8 +7710,8 @@ yy406: } } } -yy407: - YYDEBUG(407, *YYCURSOR); +yy408: + YYDEBUG(408, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -7535,11 +7725,11 @@ yy407: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -7547,147 +7737,161 @@ yy407: if (yych <= '^') { if (yych <= 'T') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'U') goto yy397; - if (yych <= 'Z') goto yy142; + if (yych <= 'U') goto yy398; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 't') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'u') goto yy408; + if (yych <= 'u') goto yy409; if (yych <= 'z') goto yy151; goto yy194; } } } -yy408: - YYDEBUG(408, *YYCURSOR); +yy409: + YYDEBUG(409, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; - goto yy398; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy399; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy409; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'r') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 's') goto yy410; + if (yych <= 'z') goto yy152; + goto yy4; + } } } -yy409: - YYDEBUG(409, *YYCURSOR); +yy410: + YYDEBUG(410, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; - goto yy399; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy400; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy410; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 's') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 't') goto yy411; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy410: - YYDEBUG(410, *YYCURSOR); +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 yy139; + if (yych == ')') goto yy140; goto yy194; } } else { - if (yych <= '^') { - if (yych == '/') goto yy147; - if (yych <= '9') goto yy196; - goto yy194; + if (yych <= '/') { + if (yych <= '-') goto yy378; + if (yych <= '.') goto yy196; + goto yy148; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy154; + if (yych <= '9') goto yy196; + if (yych == '_') goto yy148; goto yy194; } } -yy411: - YYDEBUG(411, *YYCURSOR); +yy412: + YYDEBUG(412, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == 'L') goto yy418; - if (yych <= 'M') goto yy141; - goto yy417; + if (yych == 'L') goto yy419; + if (yych <= 'M') goto yy142; + goto yy418; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'k') goto yy141; - goto yy418; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + if (yych <= 'k') goto yy142; + goto yy419; } else { - if (yych == 'n') goto yy417; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych == 'n') goto yy418; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy412: - YYDEBUG(412, *YYCURSOR); +yy413: + YYDEBUG(413, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'n') goto yy413; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'n') goto yy414; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy413: - YYDEBUG(413, *YYCURSOR); +yy414: + YYDEBUG(414, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7701,7 +7905,7 @@ yy413: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7715,70 +7919,70 @@ yy413: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'U') goto yy142; + if (yych != 'U') goto yy143; } } else { if (yych <= 't') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'u') goto yy414; - if (yych <= 'z') goto yy142; + if (yych <= 'u') goto yy415; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy414: - YYDEBUG(414, *YYCURSOR); +yy415: + YYDEBUG(415, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= 'a') goto yy415; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'a') goto yy416; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy415: - YYDEBUG(415, *YYCURSOR); +yy416: + YYDEBUG(416, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy145; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'r') goto yy416; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'r') goto yy417; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy416: - YYDEBUG(416, *YYCURSOR); +yy417: + YYDEBUG(417, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Y') goto yy206; if (yych == 'y') goto yy206; - goto yy3; + goto yy4; } -yy417: - YYDEBUG(417, *YYCURSOR); +yy418: + YYDEBUG(418, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7792,7 +7996,7 @@ yy417: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7806,22 +8010,22 @@ yy417: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych == 'E') goto yy419; - goto yy142; + if (yych == 'E') goto yy420; + goto yy143; } } else { if (yych <= 'd') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'e') goto yy419; - if (yych <= 'z') goto yy142; + if (yych <= 'e') goto yy420; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy418: - YYDEBUG(418, *YYCURSOR); +yy419: + YYDEBUG(419, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -7835,7 +8039,7 @@ yy418: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -7849,21 +8053,21 @@ yy418: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'Y') goto yy142; + if (yych != 'Y') goto yy143; } } else { if (yych <= 'x') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'y') goto yy419; - if (yych <= 'z') goto yy142; + if (yych <= 'y') goto yy420; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy419: - YYDEBUG(419, *YYCURSOR); +yy420: + YYDEBUG(420, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { @@ -7872,7 +8076,7 @@ yy419: goto yy194; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; goto yy194; } } else { @@ -7881,79 +8085,87 @@ yy419: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych <= 'Z') goto yy143; + if (yych <= 'Z') goto yy144; if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy143; + if (yych <= 'z') goto yy144; goto yy194; } } -yy420: - YYDEBUG(420, *YYCURSOR); +yy421: + YYDEBUG(421, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'M') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'K') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'L') goto yy418; - if (yych <= 'M') goto yy141; - goto yy417; + if (yych == 'L') goto yy419; + goto yy142; } } } else { - if (yych <= 'k') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'N') goto yy418; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'm') { - if (yych <= 'l') goto yy427; - goto yy146; + if (yych == 'l') goto yy428; + goto yy147; } else { - if (yych <= 'n') goto yy426; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'n') goto yy427; + if (yych <= 'z') goto yy147; + goto yy4; } } } -yy421: - YYDEBUG(421, *YYCURSOR); +yy422: + YYDEBUG(422, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy413; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy414; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy422; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'm') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 'n') goto yy423; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy422: - YYDEBUG(422, *YYCURSOR); +yy423: + YYDEBUG(423, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -7967,11 +8179,11 @@ yy422: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -7979,99 +8191,107 @@ yy422: if (yych <= '^') { if (yych <= 'T') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'U') goto yy414; - if (yych <= 'Z') goto yy142; + if (yych <= 'U') goto yy415; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 't') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'u') goto yy423; + if (yych <= 'u') goto yy424; if (yych <= 'z') goto yy151; goto yy194; } } } -yy423: - YYDEBUG(423, *YYCURSOR); +yy424: + YYDEBUG(424, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy415; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy416; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; - if (yych <= 'a') goto yy424; + if (yych <= '`') goto yy4; + if (yych <= 'a') goto yy425; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } -yy424: - YYDEBUG(424, *YYCURSOR); +yy425: + YYDEBUG(425, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; - goto yy416; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy417; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy425; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 'q') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 'r') goto yy426; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy425: - YYDEBUG(425, *YYCURSOR); +yy426: + YYDEBUG(426, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'X') goto yy3; - goto yy206; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'Y') goto yy206; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'y') goto yy377; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } -yy426: - YYDEBUG(426, *YYCURSOR); +yy427: + YYDEBUG(427, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -8085,11 +8305,11 @@ yy426: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -8097,26 +8317,26 @@ yy426: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'E') goto yy419; - if (yych <= 'Z') goto yy142; + if (yych <= 'E') goto yy420; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'e') goto yy428; + if (yych <= 'e') goto yy429; if (yych <= 'z') goto yy151; goto yy194; } } } -yy427: - YYDEBUG(427, *YYCURSOR); +yy428: + YYDEBUG(428, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -8130,11 +8350,11 @@ yy427: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -8142,26 +8362,26 @@ yy427: if (yych <= '^') { if (yych <= 'X') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'Y') goto yy419; - if (yych <= 'Z') goto yy142; + if (yych <= 'Y') goto yy420; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'x') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 'y') goto yy428; + if (yych <= 'y') goto yy429; if (yych <= 'z') goto yy151; goto yy194; } } } -yy428: - YYDEBUG(428, *YYCURSOR); +yy429: + YYDEBUG(429, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { @@ -8170,20 +8390,25 @@ yy428: if (yych <= 0x1F) goto yy194; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy194; - goto yy196; + 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 yy147; + if (yych <= '/') goto yy148; if (yych <= '9') goto yy196; if (yych <= '@') goto yy194; - goto yy143; + goto yy144; } else { if (yych <= '_') { if (yych <= '^') goto yy194; - goto yy147; + goto yy148; } else { if (yych <= '`') goto yy194; if (yych <= 'z') goto yy152; @@ -8191,623 +8416,623 @@ yy428: } } } -yy429: - YYDEBUG(429, *YYCURSOR); +yy430: + YYDEBUG(430, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych >= 'J') goto yy141; + if (yych >= 'J') goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } } -yy430: - YYDEBUG(430, *YYCURSOR); +yy431: + YYDEBUG(431, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= 0x1F) { if (yych == '\t') goto yy196; - goto yy3; + goto yy4; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '@') { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; if (yych <= '9') goto yy196; - goto yy3; + goto yy4; } else { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy431: - YYDEBUG(431, *YYCURSOR); +yy432: + YYDEBUG(432, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych >= 'J') goto yy141; + if (yych >= 'J') goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } } - YYDEBUG(432, *YYCURSOR); + YYDEBUG(433, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy142; + if (yych <= '@') goto yy4; + goto yy143; } else { if (yych <= 'Z') { - if (yych >= 'J') goto yy142; + if (yych >= 'J') goto yy143; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy143; + goto yy4; } } } - YYDEBUG(433, *YYCURSOR); + YYDEBUG(434, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= 0x1F) { if (yych == '\t') goto yy196; - goto yy3; + goto yy4; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '@') { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; if (yych <= '9') goto yy196; - goto yy3; + goto yy4; } else { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy434: - YYDEBUG(434, *YYCURSOR); +yy435: + YYDEBUG(435, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= 0x1F) { if (yych == '\t') goto yy196; - goto yy3; + goto yy4; } else { if (yych <= ' ') goto yy196; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '@') { - if (yych == '/') goto yy3; + if (yych == '/') goto yy4; if (yych <= '9') goto yy196; - goto yy3; + goto yy4; } else { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy435: - YYDEBUG(435, *YYCURSOR); +yy436: + YYDEBUG(436, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= ' ') { if (yych == '\t') goto yy196; - if (yych <= 0x1F) goto yy3; + if (yych <= 0x1F) goto yy4; goto yy196; } else { - if (yych == ')') goto yy139; - if (yych <= ',') goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; goto yy196; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; if (yych <= '9') goto yy196; - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'Z') { - if (yych <= 'I') goto yy430; - goto yy141; + if (yych <= 'I') goto yy431; + goto yy142; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy142; + goto yy4; } } } -yy436: - YYDEBUG(436, *YYCURSOR); +yy437: + YYDEBUG(437, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '9') { - if (yych <= '/') goto yy3; - goto yy456; + if (yych <= '/') goto yy4; + goto yy457; } else { if (yych <= ':') goto yy163; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= 'C') goto yy4; + goto yy61; } } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy437: - YYDEBUG(437, *YYCURSOR); +yy438: + YYDEBUG(438, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '4') { - if (yych <= '/') goto yy3; - goto yy456; + if (yych <= '/') goto yy4; + goto yy457; } else { - if (yych <= '5') goto yy441; - if (yych <= '9') goto yy442; + if (yych <= '5') goto yy442; + if (yych <= '9') goto yy443; goto yy163; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= 'C') goto yy4; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy3; + if (yych == 'F') goto yy61; + goto yy4; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy3; + if (yych <= 'H') goto yy61; + goto yy4; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy3; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy4; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy3; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy4; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy3; - goto yy60; + if (yych <= 'c') goto yy4; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy3; + if (yych == 'f') goto yy61; + goto yy4; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy3; + if (yych <= 'h') goto yy61; + goto yy4; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy438: - YYDEBUG(438, *YYCURSOR); +yy439: + YYDEBUG(439, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= 'C') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '5') { - if (yych <= '/') goto yy3; - goto yy441; + if (yych <= '/') goto yy4; + goto yy442; } else { - if (yych <= '9') goto yy442; + if (yych <= '9') goto yy443; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; } } } else { if (yych <= 'G') { - if (yych == 'E') goto yy3; - if (yych <= 'F') goto yy60; - goto yy3; + if (yych == 'E') goto yy4; + if (yych <= 'F') goto yy61; + goto yy4; } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy3; + if (yych <= 'H') goto yy61; + goto yy4; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy3; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy4; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy3; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy4; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy3; - goto yy60; + if (yych <= 'c') goto yy4; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy3; + if (yych == 'f') goto yy61; + goto yy4; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy3; + if (yych <= 'h') goto yy61; + goto yy4; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy439: - YYDEBUG(439, *YYCURSOR); +yy440: + YYDEBUG(440, *YYCURSOR); ++YYCURSOR; if (YYLIMIT <= YYCURSOR) YYFILL(1); yych = *YYCURSOR; - YYDEBUG(440, *YYCURSOR); - if (yybm[0+yych] & 8) { - goto yy57; + YYDEBUG(441, *YYCURSOR); + if (yybm[0+yych] & 4) { + goto yy58; } if (yych <= ',') { - if (yych == '+') goto yy439; - goto yy56; + if (yych == '+') goto yy440; + goto yy57; } else { - if (yych <= '-') goto yy439; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy54; - goto yy56; + if (yych <= '-') goto yy440; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy55; + goto yy57; } -yy441: - YYDEBUG(441, *YYCURSOR); +yy442: + YYDEBUG(442, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy455; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy456; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy442: - YYDEBUG(442, *YYCURSOR); +yy443: + YYDEBUG(443, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy443; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy444; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy443: - YYDEBUG(443, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych >= ':') goto yy60; yy444: YYDEBUG(444, *YYCURSOR); yych = *++YYCURSOR; - if (yybm[0+yych] & 4) { - goto yy54; - } - if (yych != '-') goto yy60; + if (yych <= '/') goto yy61; + if (yych >= ':') goto yy61; yy445: YYDEBUG(445, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy446; - if (yych <= '1') goto yy447; - goto yy56; + if (yybm[0+yych] & 2) { + goto yy55; + } + if (yych != '-') goto yy61; yy446: YYDEBUG(446, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy448; - goto yy56; + 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 yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy449; + goto yy57; yy448: YYDEBUG(448, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '-') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '3') goto yy57; +yy449: YYDEBUG(449, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy450; - if (yych <= '2') goto yy451; - if (yych <= '3') goto yy452; - goto yy56; -yy450: + if (yych != '-') goto yy57; YYDEBUG(450, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy453; - goto yy56; + 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 yy56; - if (yych <= '9') goto yy453; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy454; + goto yy57; yy452: YYDEBUG(452, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy454; + goto yy57; yy453: YYDEBUG(453, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy57; yy454: YYDEBUG(454, *YYCURSOR); -#line 1257 "ext/date/lib/parse_date.re" + ++YYCURSOR; +yy455: + YYDEBUG(455, *YYCURSOR); +#line 1258 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601date4 | iso8601date2 | iso8601dateslash | dateslash"); TIMELIB_INIT; @@ -8818,505 +9043,505 @@ yy454: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 8822 "ext/date/lib/parse_date.c" -yy455: - YYDEBUG(455, *YYCURSOR); +#line 9045 "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 yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy444; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy445; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy456: - YYDEBUG(456, *YYCURSOR); +yy457: + YYDEBUG(457, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= 'C') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { if (yych <= '5') { - if (yych <= '/') goto yy3; + if (yych <= '/') goto yy4; } else { - if (yych <= '9') goto yy455; + if (yych <= '9') goto yy456; if (yych <= ':') goto yy163; - goto yy3; + goto yy4; } } } else { if (yych <= 'G') { - if (yych == 'E') goto yy3; - if (yych <= 'F') goto yy60; - goto yy3; + if (yych == 'E') goto yy4; + if (yych <= 'F') goto yy61; + goto yy4; } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy3; + if (yych <= 'H') goto yy61; + goto yy4; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy3; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy4; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy3; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy4; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy3; - goto yy60; + if (yych <= 'c') goto yy4; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy3; + if (yych == 'f') goto yy61; + goto yy4; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy3; + if (yych <= 'h') goto yy61; + goto yy4; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } - YYDEBUG(457, *YYCURSOR); + YYDEBUG(458, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych <= '/') goto yy3; - if (yych <= '9') goto yy458; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych <= '/') goto yy4; + if (yych <= '9') goto yy459; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy458: - YYDEBUG(458, *YYCURSOR); +yy459: + YYDEBUG(459, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy3; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy4; + goto yy61; } else { - if (yych == '-') goto yy445; - if (yych <= 'C') goto yy3; - goto yy60; + if (yych == '-') goto yy446; + if (yych <= 'C') goto yy4; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy3; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy4; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy3; - goto yy60; + if (yych <= 'L') goto yy4; + goto yy61; } else { - if (yych <= 'R') goto yy3; - if (yych <= 'T') goto yy60; - goto yy3; + if (yych <= 'R') goto yy4; + if (yych <= 'T') goto yy61; + goto yy4; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy3; - if (yych <= 'Y') goto yy60; - goto yy3; + if (yych == 'X') goto yy4; + if (yych <= 'Y') goto yy61; + goto yy4; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy3; + if (yych <= 'd') goto yy61; + goto yy4; } else { - if (yych == 'g') goto yy3; - goto yy60; + if (yych == 'g') goto yy4; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy3; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy4; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy3; - goto yy60; + if (yych <= 'v') goto yy4; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy3; + if (yych == 'y') goto yy61; + goto yy4; } } } } -yy459: - YYDEBUG(459, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy461; - if (yych <= '0') goto yy735; - if (yych <= '1') goto yy736; - if (yych <= '9') goto yy737; - goto yy461; 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; -yy461: - YYDEBUG(461, *YYCURSOR); +yy462: + YYDEBUG(462, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': - case ' ': goto yy460; + case ' ': goto yy461; case '-': - case '.': goto yy576; + case '.': goto yy577; case 'A': - case 'a': goto yy479; + case 'a': goto yy480; case 'D': - case 'd': goto yy465; + case 'd': goto yy466; case 'F': - case 'f': goto yy466; + case 'f': goto yy467; case 'H': - case 'h': goto yy63; - case 'I': goto yy474; + case 'h': goto yy64; + case 'I': goto yy475; case 'J': - case 'j': goto yy478; + case 'j': goto yy479; case 'M': - case 'm': goto yy464; + case 'm': goto yy465; case 'N': - case 'n': goto yy481; + case 'n': goto yy482; case 'O': - case 'o': goto yy480; + case 'o': goto yy481; case 'P': - case 'p': goto yy483; + case 'p': goto yy484; case 'S': - case 's': goto yy462; + case 's': goto yy463; case 'T': - case 't': goto yy68; - case 'V': goto yy476; + case 't': goto yy69; + case 'V': goto yy477; case 'W': - case 'w': goto yy67; - case 'X': goto yy477; + case 'w': goto yy68; + case 'X': goto yy478; case 'Y': - case 'y': goto yy66; - default: goto yy56; + case 'y': goto yy67; + default: goto yy57; } -yy462: - YYDEBUG(462, *YYCURSOR); +yy463: + YYDEBUG(463, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy1048; - if (yych <= 'T') goto yy56; - goto yy125; + if (yych <= 'E') goto yy1049; + if (yych <= 'T') goto yy57; + goto yy126; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy126; - goto yy56; + if (yych == 'a') goto yy127; + goto yy57; } else { - if (yych <= 'e') goto yy1048; - if (yych == 'u') goto yy125; - goto yy56; + if (yych <= 'e') goto yy1049; + if (yych == 'u') goto yy126; + goto yy57; } } -yy463: - YYDEBUG(463, *YYCURSOR); +yy464: + YYDEBUG(464, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '`') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy1048; - if (yych == 'U') goto yy125; - goto yy56; + if (yych <= 'E') goto yy1049; + if (yych == 'U') goto yy126; + goto yy57; } } else { if (yych <= 'e') { - if (yych <= 'a') goto yy126; - if (yych <= 'd') goto yy56; - goto yy1048; + if (yych <= 'a') goto yy127; + if (yych <= 'd') goto yy57; + goto yy1049; } else { - if (yych <= 's') goto yy56; - if (yych <= 't') goto yy728; - if (yych <= 'u') goto yy125; - goto yy56; + if (yych <= 's') goto yy57; + if (yych <= 't') goto yy729; + if (yych <= 'u') goto yy126; + goto yy57; } } -yy464: - YYDEBUG(464, *YYCURSOR); +yy465: + YYDEBUG(465, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'H') { - if (yych == 'A') goto yy591; - goto yy56; + if (yych == 'A') goto yy592; + goto yy57; } else { - if (yych <= 'I') goto yy117; - if (yych <= 'N') goto yy56; - goto yy116; + if (yych <= 'I') goto yy118; + if (yych <= 'N') goto yy57; + goto yy117; } } else { if (yych <= 'h') { - if (yych == 'a') goto yy591; - goto yy56; + if (yych == 'a') goto yy592; + goto yy57; } else { - if (yych <= 'i') goto yy117; - if (yych == 'o') goto yy116; - goto yy56; + if (yych <= 'i') goto yy118; + if (yych == 'o') goto yy117; + goto yy57; } } -yy465: - YYDEBUG(465, *YYCURSOR); +yy466: + YYDEBUG(466, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { - if (yych == 'A') goto yy113; - if (yych <= 'D') goto yy56; - goto yy578; + if (yych == 'A') goto yy114; + if (yych <= 'D') goto yy57; + goto yy579; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy113; + if (yych <= '`') goto yy57; + goto yy114; } else { - if (yych == 'e') goto yy578; - goto yy56; + if (yych == 'e') goto yy579; + goto yy57; } } -yy466: - YYDEBUG(466, *YYCURSOR); +yy467: + YYDEBUG(467, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'N') { - if (yych == 'E') goto yy594; - goto yy56; + if (yych == 'E') goto yy595; + goto yy57; } else { - if (yych <= 'O') goto yy98; - if (yych <= 'Q') goto yy56; - goto yy97; + if (yych <= 'O') goto yy99; + if (yych <= 'Q') goto yy57; + goto yy98; } } else { if (yych <= 'n') { - if (yych == 'e') goto yy594; - goto yy56; + if (yych == 'e') goto yy595; + goto yy57; } else { - if (yych <= 'o') goto yy98; - if (yych == 'r') goto yy97; - goto yy56; + if (yych <= 'o') goto yy99; + if (yych == 'r') goto yy98; + goto yy57; } } -yy467: - YYDEBUG(467, *YYCURSOR); +yy468: + YYDEBUG(468, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'H') goto yy69; - if (yych <= 'T') goto yy56; - goto yy70; + if (yych == 'H') goto yy70; + if (yych <= 'T') goto yy57; + goto yy71; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; - goto yy1047; + if (yych <= 'g') goto yy57; + goto yy1048; } else { - if (yych == 'u') goto yy70; - goto yy56; + if (yych == 'u') goto yy71; + goto yy57; } } -yy468: - YYDEBUG(468, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy741; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy740; - goto yy60; yy469: YYDEBUG(469, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'c') { - if (yych == 'O') goto yy529; - goto yy56; - } else { - if (yych <= 'd') goto yy728; - if (yych == 'o') goto yy529; - goto yy56; - } + if (yych == '-') goto yy742; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy741; + goto yy61; yy470: YYDEBUG(470, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy728; - goto yy56; + 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 yy665; - case '3': goto yy667; + case '2': goto yy666; + case '3': goto yy668; case '4': case '5': case '6': case '7': case '8': - case '9': goto yy668; + case '9': goto yy669; case 'A': - case 'a': goto yy672; + case 'a': goto yy673; case 'D': - case 'd': goto yy676; + case 'd': goto yy677; case 'F': - case 'f': goto yy670; + case 'f': goto yy671; case 'J': - case 'j': goto yy669; + case 'j': goto yy670; case 'M': - case 'm': goto yy671; + case 'm': goto yy672; case 'N': - case 'n': goto yy675; + case 'n': goto yy676; case 'O': - case 'o': goto yy674; + case 'o': goto yy675; case 'S': - case 's': goto yy673; - default: goto yy56; + case 's': goto yy674; + default: goto yy57; } -yy472: - YYDEBUG(472, *YYCURSOR); +yy473: + YYDEBUG(473, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { - case '0': goto yy615; - case '1': goto yy616; + case '0': goto yy616; + case '1': goto yy617; case '2': case '3': case '4': @@ -9324,61 +9549,61 @@ yy472: case '6': case '7': case '8': - case '9': goto yy617; + case '9': goto yy618; case 'A': - case 'a': goto yy621; + case 'a': goto yy622; case 'D': - case 'd': goto yy625; + case 'd': goto yy626; case 'F': - case 'f': goto yy619; + case 'f': goto yy620; case 'J': - case 'j': goto yy618; + case 'j': goto yy619; case 'M': - case 'm': goto yy620; + case 'm': goto yy621; case 'N': - case 'n': goto yy624; + case 'n': goto yy625; case 'O': - case 'o': goto yy623; + case 'o': goto yy624; case 'S': - case 's': goto yy622; - default: goto yy577; + case 's': goto yy623; + default: goto yy578; } -yy473: - YYDEBUG(473, *YYCURSOR); +yy474: + YYDEBUG(474, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '1') { - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy567; - goto yy568; + if (yych <= '/') goto yy578; + if (yych <= '0') goto yy568; + goto yy569; } else { - if (yych <= '5') goto yy569; - if (yych <= '9') goto yy570; - goto yy577; + if (yych <= '5') goto yy570; + if (yych <= '9') goto yy571; + goto yy578; } -yy474: - YYDEBUG(474, *YYCURSOR); +yy475: + YYDEBUG(475, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; + if (yych == '\t') goto yy532; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '.') goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '.') goto yy532; } } else { if (yych <= 'U') { - if (yych <= '9') goto yy533; - if (yych == 'I') goto yy566; + if (yych <= '9') goto yy534; + if (yych == 'I') goto yy567; } else { - if (yych == 'W') goto yy475; - if (yych <= 'X') goto yy539; + if (yych == 'W') goto yy476; + if (yych <= 'X') goto yy540; } } -yy475: - YYDEBUG(475, *YYCURSOR); -#line 1386 "ext/date/lib/parse_date.re" +yy476: + YYDEBUG(476, *YYCURSOR); +#line 1387 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenoyearrev"); TIMELIB_INIT; @@ -9389,148 +9614,148 @@ yy475: TIMELIB_DEINIT; return TIMELIB_DATE_TEXT; } -#line 9393 "ext/date/lib/parse_date.c" -yy476: - YYDEBUG(476, *YYCURSOR); +#line 9616 "ext/date/lib/parse_date.c" +yy477: + YYDEBUG(477, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy564; - goto yy475; + if (yych == 'I') goto yy565; + goto yy476; } } -yy477: - YYDEBUG(477, *YYCURSOR); +yy478: + YYDEBUG(478, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy563; - goto yy475; + if (yych == 'I') goto yy564; + goto yy476; } } -yy478: - YYDEBUG(478, *YYCURSOR); +yy479: + YYDEBUG(479, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy556; - if (yych <= 'T') goto yy56; - goto yy555; + if (yych == 'A') goto yy557; + if (yych <= 'T') goto yy57; + goto yy556; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy556; + if (yych <= '`') goto yy57; + goto yy557; } else { - if (yych == 'u') goto yy555; - goto yy56; + if (yych == 'u') goto yy556; + goto yy57; } } -yy479: - YYDEBUG(479, *YYCURSOR); +yy480: + YYDEBUG(480, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= 'L') { - if (yych == '.') goto yy484; - goto yy56; + if (yych == '.') goto yy485; + goto yy57; } else { - if (yych <= 'M') goto yy485; - if (yych == 'P') goto yy549; - goto yy56; + if (yych <= 'M') goto yy486; + if (yych == 'P') goto yy550; + goto yy57; } } else { if (yych <= 'o') { - if (yych <= 'U') goto yy548; - if (yych == 'm') goto yy485; - goto yy56; + if (yych <= 'U') goto yy549; + if (yych == 'm') goto yy486; + goto yy57; } else { - if (yych <= 'p') goto yy549; - if (yych == 'u') goto yy548; - goto yy56; + if (yych <= 'p') goto yy550; + if (yych == 'u') goto yy549; + goto yy57; } } -yy480: - YYDEBUG(480, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy543; - if (yych == 'c') goto yy543; - goto yy56; yy481: YYDEBUG(481, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy529; - if (yych == 'o') goto yy529; - goto yy56; + if (yych == 'C') goto yy544; + if (yych == 'c') goto yy544; + goto yy57; yy482: YYDEBUG(482, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy489; - if (yych <= '9') goto yy491; - goto yy56; + if (yych == 'O') goto yy530; + if (yych == 'o') goto yy530; + goto yy57; yy483: YYDEBUG(483, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'L') { - if (yych != '.') goto yy56; - } else { - if (yych <= 'M') goto yy485; - if (yych == 'm') goto yy485; - goto yy56; - } + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy490; + if (yych <= '9') goto yy492; + goto yy57; yy484: YYDEBUG(484, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'M') goto yy485; - if (yych != 'm') goto yy56; + 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 yy487; - if (yych == '\t') goto yy487; - goto yy56; + if (yych <= 0x00) goto yy488; + if (yych == '\t') goto yy488; + goto yy57; } else { - if (yych <= ' ') goto yy487; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy488; + if (yych != '.') goto yy57; } - YYDEBUG(486, *YYCURSOR); + YYDEBUG(487, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy487; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy488; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy487: - YYDEBUG(487, *YYCURSOR); - ++YYCURSOR; +yy488: YYDEBUG(488, *YYCURSOR); -#line 1113 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(489, *YYCURSOR); +#line 1114 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("timetiny12 | timeshort12 | timelong12"); TIMELIB_INIT; @@ -9546,20 +9771,20 @@ yy487: TIMELIB_DEINIT; return TIMELIB_TIME12; } -#line 9550 "ext/date/lib/parse_date.c" -yy489: - YYDEBUG(489, *YYCURSOR); +#line 9773 "ext/date/lib/parse_date.c" +yy490: + YYDEBUG(490, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy492; + if (yych == '.') goto yy493; } else { - if (yych <= '9') goto yy506; - if (yych <= ':') goto yy492; + if (yych <= '9') goto yy507; + if (yych <= ':') goto yy493; } -yy490: - YYDEBUG(490, *YYCURSOR); -#line 1150 "ext/date/lib/parse_date.re" +yy491: + YYDEBUG(491, *YYCURSOR); +#line 1151 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("timeshort24 | timelong24 | iso8601long"); @@ -9584,317 +9809,317 @@ yy490: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 9588 "ext/date/lib/parse_date.c" -yy491: - YYDEBUG(491, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy492; - if (yych != ':') goto yy490; +#line 9811 "ext/date/lib/parse_date.c" yy492: YYDEBUG(492, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy493; - if (yych <= '6') goto yy494; - if (yych <= '9') goto yy495; - goto yy56; -yy493: - YYDEBUG(493, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy499; - goto yy490; + 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 yy496; - if (yych == '0') goto yy499; - goto yy490; + 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 yy490; + if (yych == '.') goto yy497; + if (yych == '0') goto yy500; + goto yy491; yy496: YYDEBUG(496, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + 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(498, *YYCURSOR); - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy497; - goto yy490; -yy499: 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 yy490; + if (yych != '\t') goto yy491; } else { - if (yych <= ' ') goto yy500; - if (yych == '.') goto yy496; - goto yy490; + if (yych <= ' ') goto yy501; + if (yych == '.') goto yy497; + goto yy491; } } else { if (yych <= '`') { - if (yych <= 'A') goto yy502; - if (yych == 'P') goto yy502; - goto yy490; + if (yych <= 'A') goto yy503; + if (yych == 'P') goto yy503; + goto yy491; } else { - if (yych <= 'a') goto yy502; - if (yych == 'p') goto yy502; - goto yy490; + if (yych <= 'a') goto yy503; + if (yych == 'p') goto yy503; + goto yy491; } } -yy500: - YYDEBUG(500, *YYCURSOR); +yy501: + YYDEBUG(501, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(501, *YYCURSOR); + YYDEBUG(502, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy500; - goto yy56; + if (yych == '\t') goto yy501; + goto yy57; } else { - if (yych <= ' ') goto yy500; - if (yych <= '@') goto yy56; + if (yych <= ' ') goto yy501; + if (yych <= '@') goto yy57; } } else { if (yych <= '`') { - if (yych != 'P') goto yy56; + if (yych != 'P') goto yy57; } else { - if (yych <= 'a') goto yy502; - if (yych != 'p') goto yy56; + if (yych <= 'a') goto yy503; + if (yych != 'p') goto yy57; } } -yy502: - YYDEBUG(502, *YYCURSOR); +yy503: + YYDEBUG(503, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy504; - if (yych == 'm') goto yy504; - goto yy56; + if (yych <= 'M') goto yy505; + if (yych == 'm') goto yy505; + goto yy57; } - YYDEBUG(503, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy504; - if (yych != 'm') goto yy56; -yy504: 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 yy487; - if (yych == '\t') goto yy487; - goto yy56; + if (yych <= 0x00) goto yy488; + if (yych == '\t') goto yy488; + goto yy57; } else { - if (yych <= ' ') goto yy487; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy488; + if (yych != '.') goto yy57; } - YYDEBUG(505, *YYCURSOR); + YYDEBUG(506, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy487; - if (yych <= 0x08) goto yy56; - goto yy487; + if (yych <= 0x00) goto yy488; + if (yych <= 0x08) goto yy57; + goto yy488; } else { - if (yych == ' ') goto yy487; - goto yy56; + if (yych == ' ') goto yy488; + goto yy57; } -yy506: - YYDEBUG(506, *YYCURSOR); +yy507: + YYDEBUG(507, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy507; - if (yych <= 0x1F) goto yy490; + if (yych == '\t') goto yy508; + if (yych <= 0x1F) goto yy491; } else { - if (yych == '.') goto yy492; - if (yych <= '9') goto yy490; - goto yy510; + if (yych == '.') goto yy493; + if (yych <= '9') goto yy491; + goto yy511; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy509; - if (yych <= 'O') goto yy490; - goto yy509; + if (yych == 'A') goto yy510; + if (yych <= 'O') goto yy491; + goto yy510; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy509; + if (yych <= '`') goto yy491; + goto yy510; } else { - if (yych == 'p') goto yy509; - goto yy490; + if (yych == 'p') goto yy510; + goto yy491; } } } -yy507: - YYDEBUG(507, *YYCURSOR); +yy508: + YYDEBUG(508, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(508, *YYCURSOR); + YYDEBUG(509, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy507; - goto yy56; + if (yych == '\t') goto yy508; + goto yy57; } else { - if (yych <= ' ') goto yy507; - if (yych <= '@') goto yy56; + if (yych <= ' ') goto yy508; + if (yych <= '@') goto yy57; } } else { if (yych <= '`') { - if (yych != 'P') goto yy56; + if (yych != 'P') goto yy57; } else { - if (yych <= 'a') goto yy509; - if (yych != 'p') goto yy56; + if (yych <= 'a') goto yy510; + if (yych != 'p') goto yy57; } } -yy509: - YYDEBUG(509, *YYCURSOR); +yy510: + YYDEBUG(510, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych == '.') goto yy526; - goto yy56; + if (yych == '.') goto yy527; + goto yy57; } else { - if (yych <= 'M') goto yy527; - if (yych == 'm') goto yy527; - goto yy56; + if (yych <= 'M') goto yy528; + if (yych == 'm') goto yy528; + goto yy57; } -yy510: - YYDEBUG(510, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy511; - if (yych <= '6') goto yy512; - if (yych <= '9') goto yy495; - goto yy56; yy511: YYDEBUG(511, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy513; - goto yy490; + 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 yy496; - if (yych != '0') goto yy490; + 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 yy500; - if (yych <= 0x1F) goto yy490; - goto yy500; + if (yych == '\t') goto yy501; + if (yych <= 0x1F) goto yy491; + goto yy501; } else { - if (yych == '.') goto yy514; - if (yych <= '9') goto yy490; - goto yy515; + if (yych == '.') goto yy515; + if (yych <= '9') goto yy491; + goto yy516; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy502; - if (yych <= 'O') goto yy490; - goto yy502; + if (yych == 'A') goto yy503; + if (yych <= 'O') goto yy491; + goto yy503; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy502; + if (yych <= '`') goto yy491; + goto yy503; } else { - if (yych == 'p') goto yy502; - goto yy490; + if (yych == 'p') goto yy503; + goto yy491; } } } -yy514: - YYDEBUG(514, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy524; - goto yy56; yy515: YYDEBUG(515, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + 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(517, *YYCURSOR); + YYDEBUG(518, *YYCURSOR); if (yych <= 'O') { if (yych <= '9') { - if (yych <= '/') goto yy56; - goto yy516; + if (yych <= '/') goto yy57; + goto yy517; } else { - if (yych != 'A') goto yy56; + if (yych != 'A') goto yy57; } } else { if (yych <= 'a') { - if (yych <= 'P') goto yy518; - if (yych <= '`') goto yy56; + if (yych <= 'P') goto yy519; + if (yych <= '`') goto yy57; } else { - if (yych != 'p') goto yy56; + if (yych != 'p') goto yy57; } } -yy518: - YYDEBUG(518, *YYCURSOR); +yy519: + YYDEBUG(519, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy520; - if (yych == 'm') goto yy520; - goto yy56; + if (yych <= 'M') goto yy521; + if (yych == 'm') goto yy521; + goto yy57; } - YYDEBUG(519, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy520; - if (yych != 'm') goto yy56; -yy520: 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 yy522; - if (yych == '\t') goto yy522; - goto yy56; + if (yych <= 0x00) goto yy523; + if (yych == '\t') goto yy523; + goto yy57; } else { - if (yych <= ' ') goto yy522; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy523; + if (yych != '.') goto yy57; } - YYDEBUG(521, *YYCURSOR); + YYDEBUG(522, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy522; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy523; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy522: - YYDEBUG(522, *YYCURSOR); - ++YYCURSOR; +yy523: YYDEBUG(523, *YYCURSOR); -#line 1130 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(524, *YYCURSOR); +#line 1131 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("mssqltime"); TIMELIB_INIT; @@ -9913,113 +10138,113 @@ yy522: TIMELIB_DEINIT; return TIMELIB_TIME24_WITH_ZONE; } -#line 9917 "ext/date/lib/parse_date.c" -yy524: - YYDEBUG(524, *YYCURSOR); +#line 10140 "ext/date/lib/parse_date.c" +yy525: + YYDEBUG(525, *YYCURSOR); yyaccept = 11; YYMARKER = ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 5) YYFILL(5); yych = *YYCURSOR; - YYDEBUG(525, *YYCURSOR); + YYDEBUG(526, *YYCURSOR); if (yych <= 'O') { if (yych <= '9') { - if (yych <= '/') goto yy490; - goto yy524; + if (yych <= '/') goto yy491; + goto yy525; } else { - if (yych == 'A') goto yy518; - goto yy490; + if (yych == 'A') goto yy519; + goto yy491; } } else { if (yych <= 'a') { - if (yych <= 'P') goto yy518; - if (yych <= '`') goto yy490; - goto yy518; + if (yych <= 'P') goto yy519; + if (yych <= '`') goto yy491; + goto yy519; } else { - if (yych == 'p') goto yy518; - goto yy490; + if (yych == 'p') goto yy519; + goto yy491; } } -yy526: - YYDEBUG(526, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy527; - if (yych != 'm') goto yy56; 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 yy487; - if (yych == '\t') goto yy487; - goto yy56; + if (yych <= 0x00) goto yy488; + if (yych == '\t') goto yy488; + goto yy57; } else { - if (yych <= ' ') goto yy487; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy488; + if (yych != '.') goto yy57; } - YYDEBUG(528, *YYCURSOR); + YYDEBUG(529, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy487; - if (yych <= 0x08) goto yy56; - goto yy487; + if (yych <= 0x00) goto yy488; + if (yych <= 0x08) goto yy57; + goto yy488; } else { - if (yych == ' ') goto yy487; - goto yy56; + if (yych == ' ') goto yy488; + goto yy57; } -yy529: - YYDEBUG(529, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy530; - if (yych != 'v') goto yy56; 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 yy475; + if (yych != '\t') goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy535; - if (yych == 'e') goto yy535; - goto yy475; + if (yych <= 'E') goto yy536; + if (yych == 'e') goto yy536; + goto yy476; } } -yy531: - YYDEBUG(531, *YYCURSOR); +yy532: + YYDEBUG(532, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4); yych = *YYCURSOR; -yy532: - YYDEBUG(532, *YYCURSOR); +yy533: + YYDEBUG(533, *YYCURSOR); if (yych <= ' ') { - if (yych == '\t') goto yy531; - if (yych <= 0x1F) goto yy56; - goto yy531; + if (yych == '\t') goto yy532; + if (yych <= 0x1F) goto yy57; + goto yy532; } else { if (yych <= '.') { - if (yych <= ',') goto yy56; - goto yy531; + if (yych <= ',') goto yy57; + goto yy532; } else { - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; } } -yy533: - YYDEBUG(533, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy534; - if (yych <= '9') goto yy540; yy534: YYDEBUG(534, *YYCURSOR); -#line 1308 "ext/date/lib/parse_date.re" + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '/') goto yy535; + if (yych <= '9') goto yy541; +yy535: + YYDEBUG(535, *YYCURSOR); +#line 1309 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datefull"); TIMELIB_INIT; @@ -10032,744 +10257,744 @@ yy534: TIMELIB_DEINIT; return TIMELIB_DATE_FULL; } -#line 10036 "ext/date/lib/parse_date.c" -yy535: - YYDEBUG(535, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy536; - if (yych != 'm') goto yy56; +#line 10259 "ext/date/lib/parse_date.c" yy536: YYDEBUG(536, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy537; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy537; + if (yych != 'm') goto yy57; yy537: YYDEBUG(537, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy538; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy538; + if (yych != 'b') goto yy57; yy538: YYDEBUG(538, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych != 'r') goto yy56; + 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 yy531; - if (yych <= 0x1F) goto yy475; - goto yy531; + if (yych == '\t') goto yy532; + if (yych <= 0x1F) goto yy476; + goto yy532; } else { if (yych <= '.') { - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ',') goto yy476; + goto yy532; } else { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } } -yy540: - YYDEBUG(540, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych >= ':') goto yy534; yy541: YYDEBUG(541, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych >= ':') goto yy534; + if (yych <= '/') goto yy535; + if (yych >= ':') goto yy535; +yy542: YYDEBUG(542, *YYCURSOR); yych = *++YYCURSOR; - goto yy534; -yy543: + if (yych <= '/') goto yy535; + if (yych >= ':') goto yy535; YYDEBUG(543, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy544; - if (yych != 't') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'N') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'O') goto yy545; - if (yych != 'o') goto yy475; + if (yych <= 'O') goto yy546; + if (yych != 'o') goto yy476; } } -yy545: - YYDEBUG(545, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy546; - if (yych != 'b') goto yy56; yy546: YYDEBUG(546, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy547; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy547; + if (yych != 'b') goto yy57; yy547: YYDEBUG(547, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych == 'r') goto yy539; - goto yy56; + if (yych == 'E') goto yy548; + if (yych != 'e') goto yy57; yy548: YYDEBUG(548, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy552; - if (yych == 'g') goto yy552; - goto yy56; + if (yych == 'R') goto yy540; + if (yych == 'r') goto yy540; + goto yy57; yy549: YYDEBUG(549, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy550; - if (yych != 'r') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'I') goto yy551; - if (yych != 'i') goto yy475; + if (yych <= 'I') goto yy552; + if (yych != 'i') goto yy476; } } -yy551: - YYDEBUG(551, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy539; - if (yych == 'l') goto yy539; - goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy553; - if (yych != 'u') goto yy475; + if (yych <= 'U') goto yy554; + if (yych != 'u') goto yy476; } } -yy553: - YYDEBUG(553, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy554; - if (yych != 's') goto yy56; yy554: YYDEBUG(554, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy539; - if (yych == 't') goto yy539; - goto yy56; + 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 yy562; - if (yych <= 'M') goto yy56; - goto yy561; + if (yych == 'L') goto yy563; + if (yych <= 'M') goto yy57; + goto yy562; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy562; + if (yych <= 'k') goto yy57; + goto yy563; } else { - if (yych == 'n') goto yy561; - goto yy56; + if (yych == 'n') goto yy562; + goto yy57; } } -yy556: - YYDEBUG(556, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy557; - if (yych != 'n') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy558; - if (yych != 'u') goto yy475; + if (yych <= 'U') goto yy559; + if (yych != 'u') goto yy476; } } -yy558: - YYDEBUG(558, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy559; - if (yych != 'a') goto yy56; yy559: YYDEBUG(559, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy560; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy560; + if (yych != 'a') goto yy57; yy560: YYDEBUG(560, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy539; - if (yych == 'e') goto yy539; - goto yy475; + if (yych <= 'E') goto yy540; + if (yych == 'e') goto yy540; + goto yy476; } } -yy562: - YYDEBUG(562, *YYCURSOR); +yy563: + YYDEBUG(563, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'X') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy475; + if (yych <= 'Y') goto yy540; + if (yych == 'y') goto yy540; + goto yy476; } } -yy563: - YYDEBUG(563, *YYCURSOR); +yy564: + YYDEBUG(564, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy539; - goto yy475; + if (yych == 'I') goto yy540; + goto yy476; } } -yy564: - YYDEBUG(564, *YYCURSOR); +yy565: + YYDEBUG(565, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych != 'I') goto yy475; + if (yych != 'I') goto yy476; } } - YYDEBUG(565, *YYCURSOR); + YYDEBUG(566, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy539; - goto yy475; + if (yych == 'I') goto yy540; + goto yy476; } } -yy566: - YYDEBUG(566, *YYCURSOR); +yy567: + YYDEBUG(567, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '9') { - if (yych <= '.') goto yy531; - if (yych <= '/') goto yy475; - goto yy533; + if (yych <= '.') goto yy532; + if (yych <= '/') goto yy476; + goto yy534; } else { - if (yych == 'I') goto yy539; - goto yy475; + if (yych == 'I') goto yy540; + goto yy476; } } -yy567: - YYDEBUG(567, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '.') { - if (yych <= ',') goto yy490; - if (yych <= '-') goto yy601; - goto yy600; - } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy614; - if (yych <= ':') goto yy492; - goto yy490; - } yy568: YYDEBUG(568, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych <= ',') goto yy490; - if (yych <= '-') goto yy601; - if (yych <= '.') goto yy600; - goto yy490; + if (yych <= '.') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy601; } else { - if (yych <= '2') goto yy614; - if (yych <= '9') goto yy613; - if (yych <= ':') goto yy492; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; - goto yy600; + if (yych <= '/') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + if (yych <= '.') goto yy601; + goto yy491; } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy613; - if (yych <= ':') goto yy492; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; - goto yy600; + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy601; } else { - if (yych == ':') goto yy492; - goto yy490; + if (yych <= '/') goto yy491; + if (yych <= '9') goto yy614; + if (yych <= ':') goto yy493; + goto yy491; } yy571: YYDEBUG(571, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy594; - if (yych == 'e') goto yy594; - goto yy56; + 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 == 'A') goto yy591; - if (yych == 'a') goto yy591; - goto yy56; + 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 yy549; - if (yych <= 'T') goto yy56; - goto yy548; + if (yych == 'P') goto yy550; + if (yych <= 'T') goto yy57; + goto yy549; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy549; + if (yych <= 'o') goto yy57; + goto yy550; } else { - if (yych == 'u') goto yy548; - goto yy56; + if (yych == 'u') goto yy549; + goto yy57; } } -yy574: - YYDEBUG(574, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy584; - if (yych == 'e') goto yy584; - goto yy56; yy575: YYDEBUG(575, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy578; - if (yych == 'e') goto yy578; - goto yy56; + 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; -yy577: - YYDEBUG(577, *YYCURSOR); +yy578: + YYDEBUG(578, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': case ' ': case '-': - case '.': goto yy576; + case '.': goto yy577; case 'A': - case 'a': goto yy573; + case 'a': goto yy574; case 'D': - case 'd': goto yy575; + case 'd': goto yy576; case 'F': - case 'f': goto yy571; - case 'I': goto yy474; + case 'f': goto yy572; + case 'I': goto yy475; case 'J': - case 'j': goto yy478; + case 'j': goto yy479; case 'M': - case 'm': goto yy572; + case 'm': goto yy573; case 'N': - case 'n': goto yy481; + case 'n': goto yy482; case 'O': - case 'o': goto yy480; + case 'o': goto yy481; case 'S': - case 's': goto yy574; - case 'V': goto yy476; - case 'X': goto yy477; - default: goto yy56; + case 's': goto yy575; + case 'V': goto yy477; + case 'X': goto yy478; + default: goto yy57; } -yy578: - YYDEBUG(578, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy579; - if (yych != 'c') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy580; - if (yych != 'e') goto yy475; + if (yych <= 'E') goto yy581; + if (yych != 'e') goto yy476; } } -yy580: - YYDEBUG(580, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy581; - if (yych != 'm') goto yy56; yy581: YYDEBUG(581, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy582; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy582; + if (yych != 'm') goto yy57; yy582: YYDEBUG(582, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy583; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy583; + if (yych != 'b') goto yy57; yy583: YYDEBUG(583, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych == 'r') goto yy539; - goto yy56; + if (yych == 'E') goto yy584; + if (yych != 'e') goto yy57; yy584: YYDEBUG(584, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'P') goto yy585; - if (yych != 'p') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'S') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'T') goto yy586; - if (yych != 't') goto yy475; + if (yych <= 'T') goto yy587; + if (yych != 't') goto yy476; } } -yy586: - YYDEBUG(586, *YYCURSOR); +yy587: + YYDEBUG(587, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy587; - if (yych != 'e') goto yy475; + if (yych <= 'E') goto yy588; + if (yych != 'e') goto yy476; } } -yy587: - YYDEBUG(587, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy588; - if (yych != 'm') goto yy56; yy588: YYDEBUG(588, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy589; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy589; + if (yych != 'm') goto yy57; yy589: YYDEBUG(589, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy590; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy590; + if (yych != 'b') goto yy57; yy590: YYDEBUG(590, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy539; - if (yych == 'r') goto yy539; - goto yy56; + 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 yy592; - if (yych <= 'X') goto yy56; - goto yy539; + if (yych == 'R') goto yy593; + if (yych <= 'X') goto yy57; + goto yy540; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy539; - goto yy56; + if (yych == 'y') goto yy540; + goto yy57; } } -yy592: - YYDEBUG(592, *YYCURSOR); +yy593: + YYDEBUG(593, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'B') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'C') goto yy593; - if (yych != 'c') goto yy475; + if (yych <= 'C') goto yy594; + if (yych != 'c') goto yy476; } } -yy593: - YYDEBUG(593, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy539; - if (yych == 'h') goto yy539; - goto yy56; yy594: YYDEBUG(594, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy595; - if (yych != 'b') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + goto yy532; } } else { if (yych <= 'Q') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'R') goto yy596; - if (yych != 'r') goto yy475; + if (yych <= 'R') goto yy597; + if (yych != 'r') goto yy476; } } -yy596: - YYDEBUG(596, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy597; - if (yych != 'u') goto yy56; yy597: YYDEBUG(597, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy598; - if (yych != 'a') goto yy56; + if (yych == 'U') goto yy598; + if (yych != 'u') goto yy57; yy598: YYDEBUG(598, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy599; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy599; + if (yych != 'a') goto yy57; yy599: YYDEBUG(599, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy56; + if (yych == 'R') goto yy600; + if (yych != 'r') goto yy57; yy600: YYDEBUG(600, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy607; - if (yych <= '6') goto yy608; - if (yych <= '9') goto yy609; - goto yy56; + if (yych == 'Y') goto yy540; + if (yych == 'y') goto yy540; + goto yy57; yy601: YYDEBUG(601, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + 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 yy56; - if (yych >= ':') goto yy56; -yy603: + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(603, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy604: YYDEBUG(604, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; +yy605: YYDEBUG(605, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(606, *YYCURSOR); -#line 1322 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(607, *YYCURSOR); +#line 1323 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pointed date YYYY"); TIMELIB_INIT; @@ -10780,43 +11005,43 @@ yy604: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 10784 "ext/date/lib/parse_date.c" -yy607: - YYDEBUG(607, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy612; - goto yy490; +#line 11007 "ext/date/lib/parse_date.c" yy608: YYDEBUG(608, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == '.') goto yy496; - goto yy490; - } else { - if (yych <= '0') goto yy612; - if (yych <= '9') goto yy610; - goto yy490; - } + 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 == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych >= ':') goto yy490; + 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 = 12; + yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy611; - if (yych <= '9') goto yy604; + if (yych == '.') goto yy497; + if (yych <= '/') goto yy491; + if (yych >= ':') goto yy491; yy611: YYDEBUG(611, *YYCURSOR); -#line 1334 "ext/date/lib/parse_date.re" + yyaccept = 12; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '/') goto yy612; + if (yych <= '9') goto yy605; +yy612: + YYDEBUG(612, *YYCURSOR); +#line 1335 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pointed date YY"); TIMELIB_INIT; @@ -10828,648 +11053,648 @@ yy611: TIMELIB_DEINIT; return TIMELIB_DATE_FULL_POINTED; } -#line 10832 "ext/date/lib/parse_date.c" -yy612: - YYDEBUG(612, *YYCURSOR); +#line 11055 "ext/date/lib/parse_date.c" +yy613: + YYDEBUG(613, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy500; - if (yych <= 0x1F) goto yy490; - goto yy500; + if (yych == '\t') goto yy501; + if (yych <= 0x1F) goto yy491; + goto yy501; } else { - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - goto yy604; + if (yych == '.') goto yy497; + if (yych <= '/') goto yy491; + goto yy605; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy502; - if (yych <= 'O') goto yy490; - goto yy502; + if (yych == 'A') goto yy503; + if (yych <= 'O') goto yy491; + goto yy503; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy502; + if (yych <= '`') goto yy491; + goto yy503; } else { - if (yych == 'p') goto yy502; - goto yy490; + if (yych == 'p') goto yy503; + goto yy491; } } } -yy613: - YYDEBUG(613, *YYCURSOR); +yy614: + YYDEBUG(614, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy507; - if (yych <= 0x1F) goto yy490; - goto yy507; + if (yych == '\t') goto yy508; + if (yych <= 0x1F) goto yy491; + goto yy508; } else { - if (yych == '.') goto yy492; - if (yych <= '9') goto yy490; - goto yy492; + if (yych == '.') goto yy493; + if (yych <= '9') goto yy491; + goto yy493; } } else { if (yych <= 'P') { - if (yych == 'A') goto yy509; - if (yych <= 'O') goto yy490; - goto yy509; + if (yych == 'A') goto yy510; + if (yych <= 'O') goto yy491; + goto yy510; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy509; + if (yych <= '`') goto yy491; + goto yy510; } else { - if (yych == 'p') goto yy509; - goto yy490; + if (yych == 'p') goto yy510; + goto yy491; } } } -yy614: - YYDEBUG(614, *YYCURSOR); +yy615: + YYDEBUG(615, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ':') { if (yych <= ' ') { - if (yych == '\t') goto yy507; - if (yych <= 0x1F) goto yy490; - goto yy507; + if (yych == '\t') goto yy508; + if (yych <= 0x1F) goto yy491; + goto yy508; } else { if (yych <= '-') { - if (yych <= ',') goto yy490; - goto yy601; + if (yych <= ',') goto yy491; + goto yy602; } else { - if (yych <= '.') goto yy600; - if (yych <= '9') goto yy490; - goto yy492; + if (yych <= '.') goto yy601; + if (yych <= '9') goto yy491; + goto yy493; } } } else { if (yych <= 'P') { - if (yych == 'A') goto yy509; - if (yych <= 'O') goto yy490; - goto yy509; + if (yych == 'A') goto yy510; + if (yych <= 'O') goto yy491; + goto yy510; } else { if (yych <= 'a') { - if (yych <= '`') goto yy490; - goto yy509; + if (yych <= '`') goto yy491; + goto yy510; } else { - if (yych == 'p') goto yy509; - goto yy490; + if (yych == 'p') goto yy510; + goto yy491; } } } -yy615: - YYDEBUG(615, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; - } else { - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy617; - goto yy56; - } yy616: YYDEBUG(616, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy655; + goto yy602; } else { - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy618; + goto yy57; } yy617: YYDEBUG(617, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - if (yych <= '.') goto yy601; - goto yy56; + 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 yy650; - if (yych <= 'T') goto yy56; - goto yy649; + if (yych == 'A') goto yy651; + if (yych <= 'T') goto yy57; + goto yy650; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy650; + if (yych <= '`') goto yy57; + goto yy651; } else { - if (yych == 'u') goto yy649; - goto yy56; + if (yych == 'u') goto yy650; + goto yy57; } } -yy619: - YYDEBUG(619, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy647; - if (yych == 'e') goto yy647; - goto yy56; yy620: YYDEBUG(620, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy644; - if (yych == 'a') goto yy644; - goto yy56; + 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 yy641; - if (yych <= 'T') goto yy56; - goto yy640; + if (yych == 'P') goto yy642; + if (yych <= 'T') goto yy57; + goto yy641; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy641; + if (yych <= 'o') goto yy57; + goto yy642; } else { - if (yych == 'u') goto yy640; - goto yy56; + if (yych == 'u') goto yy641; + goto yy57; } } -yy622: - YYDEBUG(622, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy637; - if (yych == 'e') goto yy637; - goto yy56; yy623: YYDEBUG(623, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy635; - if (yych == 'c') goto yy635; - goto yy56; + if (yych == 'E') goto yy638; + if (yych == 'e') goto yy638; + goto yy57; yy624: YYDEBUG(624, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy633; - if (yych == 'o') goto yy633; - goto yy56; + if (yych == 'C') goto yy636; + if (yych == 'c') goto yy636; + goto yy57; yy625: YYDEBUG(625, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy626; - if (yych != 'e') goto yy56; + if (yych == 'O') goto yy634; + if (yych == 'o') goto yy634; + goto yy57; yy626: YYDEBUG(626, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy627; - if (yych != 'c') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych >= '.') goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych >= '.') goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy580; - if (yych == 'e') goto yy580; - goto yy475; + if (yych <= 'E') goto yy581; + if (yych == 'e') goto yy581; + goto yy476; } } -yy628: - YYDEBUG(628, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy532; - if (yych <= '0') goto yy629; - if (yych <= '2') goto yy630; - if (yych <= '3') goto yy631; - goto yy532; yy629: YYDEBUG(629, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych <= '9') goto yy632; - goto yy534; + 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 yy534; - if (yych <= '9') goto yy632; - goto yy534; + if (yych <= '/') goto yy535; + if (yych <= '9') goto yy633; + goto yy535; yy631: YYDEBUG(631, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; - if (yych <= '1') goto yy632; - if (yych <= '9') goto yy540; - goto yy534; + if (yych <= '/') goto yy535; + if (yych <= '9') goto yy633; + goto yy535; yy632: YYDEBUG(632, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy534; + if (yych <= '/') goto yy535; + if (yych <= '1') goto yy633; if (yych <= '9') goto yy541; - goto yy534; + goto yy535; yy633: YYDEBUG(633, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'V') goto yy634; - if (yych != 'v') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy535; - if (yych == 'e') goto yy535; - goto yy475; + if (yych <= 'E') goto yy536; + if (yych == 'e') goto yy536; + goto yy476; } } -yy635: - YYDEBUG(635, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy636; - if (yych != 't') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'N') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'O') goto yy545; - if (yych == 'o') goto yy545; - goto yy475; + if (yych <= 'O') goto yy546; + if (yych == 'o') goto yy546; + goto yy476; } } -yy637: - YYDEBUG(637, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy638; - if (yych != 'p') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'S') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'T') goto yy639; - if (yych != 't') goto yy475; + if (yych <= 'T') goto yy640; + if (yych != 't') goto yy476; } } -yy639: - YYDEBUG(639, *YYCURSOR); +yy640: + YYDEBUG(640, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy587; - if (yych == 'e') goto yy587; - goto yy475; + if (yych <= 'E') goto yy588; + if (yych == 'e') goto yy588; + goto yy476; } } -yy640: - YYDEBUG(640, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy643; - if (yych == 'g') goto yy643; - goto yy56; yy641: YYDEBUG(641, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy642; - if (yych != 'r') goto yy56; + 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'H') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'I') goto yy551; - if (yych == 'i') goto yy551; - goto yy475; + if (yych <= 'I') goto yy552; + if (yych == 'i') goto yy552; + goto yy476; } } -yy643: - YYDEBUG(643, *YYCURSOR); +yy644: + YYDEBUG(644, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy553; - if (yych == 'u') goto yy553; - goto yy475; + if (yych <= 'U') goto yy554; + if (yych == 'u') goto yy554; + goto yy476; } } -yy644: - YYDEBUG(644, *YYCURSOR); +yy645: + YYDEBUG(645, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { - if (yych == 'R') goto yy645; - if (yych <= 'X') goto yy56; - goto yy646; + if (yych == 'R') goto yy646; + if (yych <= 'X') goto yy57; + goto yy647; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy646; - goto yy56; + if (yych == 'y') goto yy647; + goto yy57; } } -yy645: - YYDEBUG(645, *YYCURSOR); +yy646: + YYDEBUG(646, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'B') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'C') goto yy593; - if (yych == 'c') goto yy593; - goto yy475; + if (yych <= 'C') goto yy594; + if (yych == 'c') goto yy594; + goto yy476; } } -yy646: - YYDEBUG(646, *YYCURSOR); +yy647: + YYDEBUG(647, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ',') { if (yych <= '\t') { - if (yych <= 0x08) goto yy475; - goto yy531; + if (yych <= 0x08) goto yy476; + goto yy532; } else { - if (yych == ' ') goto yy531; - goto yy475; + if (yych == ' ') goto yy532; + goto yy476; } } else { if (yych <= '.') { - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= '-') goto yy629; + goto yy532; } else { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } } -yy647: - YYDEBUG(647, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy648; - if (yych != 'b') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'Q') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'R') goto yy596; - if (yych == 'r') goto yy596; - goto yy475; + if (yych <= 'R') goto yy597; + if (yych == 'r') goto yy597; + goto yy476; } } -yy649: - YYDEBUG(649, *YYCURSOR); +yy650: + YYDEBUG(650, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { - if (yych == 'L') goto yy653; - if (yych <= 'M') goto yy56; - goto yy652; + if (yych == 'L') goto yy654; + if (yych <= 'M') goto yy57; + goto yy653; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy653; + if (yych <= 'k') goto yy57; + goto yy654; } else { - if (yych == 'n') goto yy652; - goto yy56; + if (yych == 'n') goto yy653; + goto yy57; } } -yy650: - YYDEBUG(650, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy651; - if (yych != 'n') goto yy56; 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 yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'T') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'U') goto yy558; - if (yych == 'u') goto yy558; - goto yy475; + if (yych <= 'U') goto yy559; + if (yych == 'u') goto yy559; + goto yy476; } } -yy652: - YYDEBUG(652, *YYCURSOR); +yy653: + YYDEBUG(653, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'D') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'E') goto yy539; - if (yych == 'e') goto yy539; - goto yy475; + if (yych <= 'E') goto yy540; + if (yych == 'e') goto yy540; + goto yy476; } } -yy653: - YYDEBUG(653, *YYCURSOR); +yy654: + YYDEBUG(654, *YYCURSOR); yyaccept = 10; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '.') { if (yych <= 0x1F) { - if (yych == '\t') goto yy531; - goto yy475; + if (yych == '\t') goto yy532; + goto yy476; } else { - if (yych <= ' ') goto yy531; - if (yych <= ',') goto yy475; - if (yych <= '-') goto yy628; - goto yy531; + if (yych <= ' ') goto yy532; + if (yych <= ',') goto yy476; + if (yych <= '-') goto yy629; + goto yy532; } } else { if (yych <= 'X') { - if (yych <= '/') goto yy475; - if (yych <= '9') goto yy533; - goto yy475; + if (yych <= '/') goto yy476; + if (yych <= '9') goto yy534; + goto yy476; } else { - if (yych <= 'Y') goto yy539; - if (yych == 'y') goto yy539; - goto yy475; + if (yych <= 'Y') goto yy540; + if (yych == 'y') goto yy540; + goto yy476; } } -yy654: - YYDEBUG(654, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy655; - if (yych <= '3') goto yy657; - if (yych <= '9') goto yy658; - goto yy56; 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 yy656; - if (yych <= '9') goto yy664; - if (yych >= 'n') goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy665; + if (yych >= 'n') goto yy661; } else { if (yych <= 'r') { - if (yych >= 'r') goto yy661; + if (yych >= 'r') goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; } } -yy656: - YYDEBUG(656, *YYCURSOR); -#line 1295 "ext/date/lib/parse_date.re" +yy657: + YYDEBUG(657, *YYCURSOR); +#line 1296 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnudateshort"); TIMELIB_INIT; @@ -11481,113 +11706,113 @@ yy656: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 11485 "ext/date/lib/parse_date.c" -yy657: - YYDEBUG(657, *YYCURSOR); +#line 11708 "ext/date/lib/parse_date.c" +yy658: + YYDEBUG(658, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '1') { - if (yych <= '/') goto yy656; - goto yy664; + if (yych <= '/') goto yy657; + goto yy665; } else { - if (yych <= '9') goto yy603; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '9') goto yy604; + if (yych <= 'm') goto yy657; + goto yy661; } } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy658: - YYDEBUG(658, *YYCURSOR); +yy659: + YYDEBUG(659, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy603; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy604; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy659: - YYDEBUG(659, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy663; - goto yy56; yy660: YYDEBUG(660, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy663; - goto yy56; + if (yych == 't') goto yy664; + goto yy57; yy661: YYDEBUG(661, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy663; - goto yy56; + if (yych == 'd') goto yy664; + goto yy57; yy662: YYDEBUG(662, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'h') goto yy56; + if (yych == 'd') goto yy664; + goto yy57; yy663: YYDEBUG(663, *YYCURSOR); yych = *++YYCURSOR; - goto yy656; + 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 yy656; - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy605; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy665: - YYDEBUG(665, *YYCURSOR); +yy666: + YYDEBUG(666, *YYCURSOR); yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '/') { - if (yych >= '/') goto yy722; + if (yych >= '/') goto yy723; } else { - if (yych <= '9') goto yy668; - if (yych >= 'n') goto yy719; + if (yych <= '9') goto yy669; + if (yych >= 'n') goto yy720; } } else { if (yych <= 'r') { - if (yych >= 'r') goto yy720; + if (yych >= 'r') goto yy721; } else { - if (yych <= 's') goto yy718; - if (yych <= 't') goto yy721; + if (yych <= 's') goto yy719; + if (yych <= 't') goto yy722; } } -yy666: - YYDEBUG(666, *YYCURSOR); -#line 1242 "ext/date/lib/parse_date.re" +yy667: + YYDEBUG(667, *YYCURSOR); +#line 1243 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("americanshort | american"); TIMELIB_INIT; @@ -11601,240 +11826,240 @@ yy666: TIMELIB_DEINIT; return TIMELIB_AMERICAN; } -#line 11605 "ext/date/lib/parse_date.c" -yy667: - YYDEBUG(667, *YYCURSOR); +#line 11828 "ext/date/lib/parse_date.c" +yy668: + YYDEBUG(668, *YYCURSOR); yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '/') { - if (yych <= '.') goto yy666; - goto yy722; + if (yych <= '.') goto yy667; + goto yy723; } else { - if (yych <= '1') goto yy668; - if (yych <= 'm') goto yy666; - goto yy719; + if (yych <= '1') goto yy669; + if (yych <= 'm') goto yy667; + goto yy720; } } else { if (yych <= 'r') { - if (yych <= 'q') goto yy666; - goto yy720; + if (yych <= 'q') goto yy667; + goto yy721; } else { - if (yych <= 's') goto yy718; - if (yych <= 't') goto yy721; - goto yy666; + if (yych <= 's') goto yy719; + if (yych <= 't') goto yy722; + goto yy667; } } -yy668: - YYDEBUG(668, *YYCURSOR); +yy669: + YYDEBUG(669, *YYCURSOR); yyaccept = 14; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == '/') goto yy722; - if (yych <= 'm') goto yy666; - goto yy719; + if (yych == '/') goto yy723; + if (yych <= 'm') goto yy667; + goto yy720; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy666; - goto yy720; + if (yych <= 'q') goto yy667; + goto yy721; } else { - if (yych <= 's') goto yy718; - if (yych <= 't') goto yy721; - goto yy666; + if (yych <= 's') goto yy719; + if (yych <= 't') goto yy722; + goto yy667; } } -yy669: - YYDEBUG(669, *YYCURSOR); +yy670: + YYDEBUG(670, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy717; - if (yych <= 'T') goto yy56; - goto yy716; + if (yych == 'A') goto yy718; + if (yych <= 'T') goto yy57; + goto yy717; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy717; + if (yych <= '`') goto yy57; + goto yy718; } else { - if (yych == 'u') goto yy716; - goto yy56; + if (yych == 'u') goto yy717; + goto yy57; } } -yy670: - YYDEBUG(670, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy715; - if (yych == 'e') goto yy715; - goto yy56; yy671: YYDEBUG(671, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy714; - if (yych == 'a') goto yy714; - goto yy56; + 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 yy713; - if (yych <= 'T') goto yy56; - goto yy712; + if (yych == 'P') goto yy714; + if (yych <= 'T') goto yy57; + goto yy713; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy713; + if (yych <= 'o') goto yy57; + goto yy714; } else { - if (yych == 'u') goto yy712; - goto yy56; + if (yych == 'u') goto yy713; + goto yy57; } } -yy673: - YYDEBUG(673, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy710; - if (yych == 'e') goto yy710; - goto yy56; yy674: YYDEBUG(674, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy709; - if (yych == 'c') goto yy709; - goto yy56; + if (yych == 'E') goto yy711; + if (yych == 'e') goto yy711; + goto yy57; yy675: YYDEBUG(675, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy708; - if (yych == 'o') goto yy708; - goto yy56; + if (yych == 'C') goto yy710; + if (yych == 'c') goto yy710; + goto yy57; yy676: YYDEBUG(676, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy677; - if (yych != 'e') goto yy56; + if (yych == 'O') goto yy709; + if (yych == 'o') goto yy709; + goto yy57; yy677: YYDEBUG(677, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy678; - if (yych != 'c') goto yy56; + if (yych == 'E') goto yy678; + if (yych != 'e') goto yy57; yy678: YYDEBUG(678, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy56; + if (yych == 'C') goto yy679; + if (yych != 'c') goto yy57; yy679: YYDEBUG(679, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych != '/') goto yy57; +yy680: YYDEBUG(680, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(681, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(682, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(683, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(684, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy685; - if (yych <= '2') goto yy686; - goto yy56; -yy685: + if (yych != ':') goto yy57; YYDEBUG(685, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy687; - goto yy56; + 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 yy56; - if (yych >= '5') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy688; + goto yy57; yy687: YYDEBUG(687, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '5') goto yy57; +yy688: YYDEBUG(688, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '6') goto yy56; + if (yych != ':') goto yy57; YYDEBUG(689, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; YYDEBUG(690, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(691, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy692; - if (yych <= '6') goto yy693; - goto yy56; -yy692: + if (yych != ':') goto yy57; YYDEBUG(692, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy694; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy693; + if (yych <= '6') goto yy694; + goto yy57; yy693: YYDEBUG(693, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '0') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy695; + goto yy57; yy694: YYDEBUG(694, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\t') goto yy695; - if (yych != ' ') goto yy56; + 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(696, *YYCURSOR); + YYDEBUG(697, *YYCURSOR); if (yych <= '*') { if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy695; + if (yych <= 0x08) goto yy57; + goto yy696; } else { - if (yych == ' ') goto yy695; - goto yy56; + if (yych == ' ') goto yy696; + goto yy57; } } else { if (yych <= '-') { - if (yych == ',') goto yy56; - goto yy698; + if (yych == ',') goto yy57; + goto yy699; } else { - if (yych != 'G') goto yy56; + if (yych != 'G') goto yy57; } } - YYDEBUG(697, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy706; - goto yy56; -yy698: YYDEBUG(698, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy699; - if (yych <= '2') goto yy701; - if (yych <= '9') goto yy702; - goto yy56; + if (yych == 'M') goto yy707; + goto yy57; yy699: YYDEBUG(699, *YYCURSOR); - ++YYCURSOR; - if ((yych = *YYCURSOR) <= '/') goto yy700; - if (yych <= '9') goto yy702; - if (yych <= ':') goto yy703; + 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); -#line 1513 "ext/date/lib/parse_date.re" + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '/') goto yy701; + if (yych <= '9') goto yy703; + if (yych <= ':') goto yy704; +yy701: + YYDEBUG(701, *YYCURSOR); +#line 1514 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("clf"); @@ -11854,304 +12079,304 @@ yy700: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 11858 "ext/date/lib/parse_date.c" -yy701: - YYDEBUG(701, *YYCURSOR); +#line 12081 "ext/date/lib/parse_date.c" +yy702: + YYDEBUG(702, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '5') { - if (yych <= '/') goto yy700; - if (yych >= '5') goto yy704; + if (yych <= '/') goto yy701; + if (yych >= '5') goto yy705; } else { - if (yych <= '9') goto yy705; - if (yych <= ':') goto yy703; - goto yy700; + if (yych <= '9') goto yy706; + if (yych <= ':') goto yy704; + goto yy701; } -yy702: - YYDEBUG(702, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy700; - if (yych <= '5') goto yy704; - if (yych <= '9') goto yy705; - if (yych >= ';') goto yy700; yy703: YYDEBUG(703, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy700; - if (yych <= '5') goto yy704; - if (yych <= '9') goto yy705; - goto yy700; + 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 yy700; - if (yych >= ':') goto yy700; + if (yych <= '/') goto yy701; + if (yych <= '5') goto yy705; + if (yych <= '9') goto yy706; + goto yy701; yy705: YYDEBUG(705, *YYCURSOR); yych = *++YYCURSOR; - goto yy700; + if (yych <= '/') goto yy701; + if (yych >= ':') goto yy701; yy706: YYDEBUG(706, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'T') goto yy56; + goto yy701; +yy707: YYDEBUG(707, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '+') goto yy698; - if (yych == '-') goto yy698; - goto yy56; -yy708: + if (yych != 'T') goto yy57; YYDEBUG(708, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'V') goto yy678; - if (yych == 'v') goto yy678; - goto yy56; + if (yych == '+') goto yy699; + if (yych == '-') goto yy699; + goto yy57; yy709: YYDEBUG(709, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy678; - if (yych == 't') goto yy678; - goto yy56; + if (yych == 'V') goto yy679; + if (yych == 'v') goto yy679; + goto yy57; yy710: YYDEBUG(710, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'P') goto yy711; - if (yych != 'p') goto yy56; + if (yych == 'T') goto yy679; + if (yych == 't') goto yy679; + goto yy57; yy711: YYDEBUG(711, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == '/') goto yy679; - goto yy56; - } else { - if (yych <= 'T') goto yy678; - if (yych == 't') goto yy678; - goto yy56; - } + if (yych == 'P') goto yy712; + if (yych != 'p') goto yy57; yy712: YYDEBUG(712, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy678; - if (yych == 'g') goto yy678; - goto yy56; + 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 == 'R') goto yy678; - if (yych == 'r') goto yy678; - goto yy56; + 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 yy678; - if (yych <= 'X') goto yy56; - goto yy678; + if (yych == 'R') goto yy679; + if (yych <= 'X') goto yy57; + goto yy679; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; - goto yy678; + if (yych <= 'q') goto yy57; + goto yy679; } else { - if (yych == 'y') goto yy678; - goto yy56; + if (yych == 'y') goto yy679; + goto yy57; } } -yy715: - YYDEBUG(715, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy678; - if (yych == 'b') goto yy678; - goto yy56; 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 yy678; - if (yych <= 'M') goto yy56; - goto yy678; + if (yych == 'L') goto yy679; + if (yych <= 'M') goto yy57; + goto yy679; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy678; + if (yych <= 'k') goto yy57; + goto yy679; } else { - if (yych == 'n') goto yy678; - goto yy56; + if (yych == 'n') goto yy679; + goto yy57; } } -yy717: - YYDEBUG(717, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy678; - if (yych == 'n') goto yy678; - goto yy56; yy718: YYDEBUG(718, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 't') goto yy727; - goto yy56; + if (yych == 'N') goto yy679; + if (yych == 'n') goto yy679; + goto yy57; yy719: YYDEBUG(719, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy727; - goto yy56; + if (yych == 't') goto yy728; + goto yy57; yy720: YYDEBUG(720, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy727; - goto yy56; + if (yych == 'd') goto yy728; + goto yy57; yy721: YYDEBUG(721, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'h') goto yy727; - goto yy56; + if (yych == 'd') goto yy728; + goto yy57; yy722: YYDEBUG(722, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych == 'h') goto yy728; + goto yy57; +yy723: YYDEBUG(723, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy666; - if (yych >= ':') goto yy666; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(724, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy666; - if (yych >= ':') goto yy666; + if (yych <= '/') goto yy667; + if (yych >= ':') goto yy667; YYDEBUG(725, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy666; - if (yych >= ':') goto yy666; + if (yych <= '/') goto yy667; + if (yych >= ':') goto yy667; YYDEBUG(726, *YYCURSOR); yych = *++YYCURSOR; - goto yy666; -yy727: + if (yych <= '/') goto yy667; + if (yych >= ':') goto yy667; YYDEBUG(727, *YYCURSOR); - yyaccept = 14; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '/') goto yy722; - goto yy666; + 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 yy730; - goto yy577; + if (yych == '\t') goto yy731; + goto yy578; } else { - if (yych <= '-') goto yy731; - if (yych <= '.') goto yy730; - if (yych >= '0') goto yy577; + if (yych <= '-') goto yy732; + if (yych <= '.') goto yy731; + if (yych >= '0') goto yy578; } -yy729: - YYDEBUG(729, *YYCURSOR); +yy730: + YYDEBUG(730, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { case 'A': - case 'a': goto yy672; + case 'a': goto yy673; case 'D': - case 'd': goto yy676; + case 'd': goto yy677; case 'F': - case 'f': goto yy670; + case 'f': goto yy671; case 'J': - case 'j': goto yy669; + case 'j': goto yy670; case 'M': - case 'm': goto yy671; + case 'm': goto yy672; case 'N': - case 'n': goto yy675; + case 'n': goto yy676; case 'O': - case 'o': goto yy674; + case 'o': goto yy675; case 'S': - case 's': goto yy673; - default: goto yy56; + case 's': goto yy674; + default: goto yy57; } -yy730: - YYDEBUG(730, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy735; - if (yych <= '1') goto yy736; - if (yych <= '9') goto yy737; - goto yy577; yy731: YYDEBUG(731, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy732; - if (yych <= '1') goto yy733; - if (yych <= '9') goto yy734; - goto yy577; + 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 yy56; - if (yych <= '.') goto yy601; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy734; - goto yy56; + 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 yy56; - if (yych <= '.') goto yy601; - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + 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 yy56; - if (yych <= '.') goto yy601; - goto yy56; + 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 <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy601; - goto yy738; - } else { - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy737; - goto yy56; - } + if (yych <= ',') goto yy57; + if (yych <= '.') goto yy602; + goto yy57; yy736: YYDEBUG(736, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy601; - goto yy738; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy602; + goto yy739; } else { - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy738; + goto yy57; } yy737: YYDEBUG(737, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy601; - if (yych >= '/') goto yy56; + 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 yy56; - if (yych >= ':') goto yy56; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy602; + if (yych >= '/') goto yy57; +yy739: YYDEBUG(739, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy610; - goto yy56; -yy740: + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(740, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy784; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy782; - goto yy60; + 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 yy750; - case '1': goto yy751; + case '0': goto yy751; + case '1': goto yy752; case '2': case '3': case '4': @@ -12159,254 +12384,254 @@ yy741: case '6': case '7': case '8': - case '9': goto yy752; + case '9': goto yy753; case 'A': - case 'a': goto yy745; + case 'a': goto yy746; case 'D': - case 'd': goto yy749; + case 'd': goto yy750; case 'F': - case 'f': goto yy743; + case 'f': goto yy744; case 'J': - case 'j': goto yy742; + case 'j': goto yy743; case 'M': - case 'm': goto yy744; + case 'm': goto yy745; case 'N': - case 'n': goto yy748; + case 'n': goto yy749; case 'O': - case 'o': goto yy747; + case 'o': goto yy748; case 'S': - case 's': goto yy746; - default: goto yy56; + case 's': goto yy747; + default: goto yy57; } -yy742: - YYDEBUG(742, *YYCURSOR); +yy743: + YYDEBUG(743, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy781; - if (yych <= 'T') goto yy56; - goto yy780; + if (yych == 'A') goto yy782; + if (yych <= 'T') goto yy57; + goto yy781; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy781; + if (yych <= '`') goto yy57; + goto yy782; } else { - if (yych == 'u') goto yy780; - goto yy56; + if (yych == 'u') goto yy781; + goto yy57; } } -yy743: - YYDEBUG(743, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy779; - if (yych == 'e') goto yy779; - goto yy56; yy744: YYDEBUG(744, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy778; - if (yych == 'a') goto yy778; - goto yy56; + 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 yy777; - if (yych <= 'T') goto yy56; - goto yy776; + if (yych == 'P') goto yy778; + if (yych <= 'T') goto yy57; + goto yy777; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy777; + if (yych <= 'o') goto yy57; + goto yy778; } else { - if (yych == 'u') goto yy776; - goto yy56; + if (yych == 'u') goto yy777; + goto yy57; } } -yy746: - YYDEBUG(746, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy774; - if (yych == 'e') goto yy774; - goto yy56; yy747: YYDEBUG(747, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy773; - if (yych == 'c') goto yy773; - goto yy56; + if (yych == 'E') goto yy775; + if (yych == 'e') goto yy775; + goto yy57; yy748: YYDEBUG(748, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy772; - if (yych == 'o') goto yy772; - goto yy56; + if (yych == 'C') goto yy774; + if (yych == 'c') goto yy774; + goto yy57; yy749: YYDEBUG(749, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy764; - if (yych == 'e') goto yy764; - goto yy56; + if (yych == 'O') goto yy773; + if (yych == 'o') goto yy773; + goto yy57; yy750: YYDEBUG(750, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy757; - goto yy56; + if (yych == 'E') goto yy765; + if (yych == 'e') goto yy765; + goto yy57; yy751: YYDEBUG(751, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy757; - goto yy56; + if (yych == '-') goto yy754; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy758; + goto yy57; yy752: YYDEBUG(752, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '-') goto yy56; + if (yych == '-') goto yy754; + if (yych <= '/') goto yy57; + if (yych <= '2') goto yy758; + goto yy57; yy753: YYDEBUG(753, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy754; - if (yych <= '3') goto yy755; - if (yych <= '9') goto yy756; - goto yy56; + 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 yy656; - if (yych <= '9') goto yy756; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy757; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy755: - YYDEBUG(755, *YYCURSOR); +yy756: + YYDEBUG(756, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '1') goto yy756; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '1') goto yy757; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy756: - YYDEBUG(756, *YYCURSOR); +yy757: + YYDEBUG(757, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'q') { - if (yych == 'n') goto yy660; - goto yy656; + if (yych == 'n') goto yy661; + goto yy657; } else { - if (yych <= 'r') goto yy661; - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 'r') goto yy662; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } -yy757: - YYDEBUG(757, *YYCURSOR); - yych = *++YYCURSOR; - if (yych != '-') goto yy56; +yy758: YYDEBUG(758, *YYCURSOR); yych = *++YYCURSOR; + if (yych != '-') goto yy57; + YYDEBUG(759, *YYCURSOR); + yych = *++YYCURSOR; if (yych <= '2') { - if (yych <= '/') goto yy56; - if (yych >= '1') goto yy760; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy761; } else { - if (yych <= '3') goto yy761; - if (yych <= '9') goto yy756; - goto yy56; + if (yych <= '3') goto yy762; + if (yych <= '9') goto yy757; + goto yy57; } - YYDEBUG(759, *YYCURSOR); + YYDEBUG(760, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy762; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy763; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy760: - YYDEBUG(760, *YYCURSOR); +yy761: + YYDEBUG(761, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy762; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy763; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy761: - YYDEBUG(761, *YYCURSOR); +yy762: + YYDEBUG(762, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '1') goto yy762; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '1') goto yy763; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy762: - YYDEBUG(762, *YYCURSOR); +yy763: + YYDEBUG(763, *YYCURSOR); yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'q') { - if (yych == 'n') goto yy660; + if (yych == 'n') goto yy661; } else { - if (yych <= 'r') goto yy661; - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; + if (yych <= 'r') goto yy662; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; } -yy763: - YYDEBUG(763, *YYCURSOR); -#line 1269 "ext/date/lib/parse_date.re" +yy764: + YYDEBUG(764, *YYCURSOR); +#line 1270 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("iso8601date2"); TIMELIB_INIT; @@ -12418,46 +12643,46 @@ yy763: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 12422 "ext/date/lib/parse_date.c" -yy764: - YYDEBUG(764, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy765; - if (yych != 'c') goto yy56; +#line 12645 "ext/date/lib/parse_date.c" yy765: YYDEBUG(765, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '-') goto yy56; + if (yych == 'C') goto yy766; + if (yych != 'c') goto yy57; yy766: YYDEBUG(766, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy767; - if (yych <= '2') goto yy768; - if (yych <= '3') goto yy769; - goto yy56; + if (yych != '-') goto yy57; yy767: YYDEBUG(767, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy770; - goto yy56; + 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 yy56; - if (yych <= '9') goto yy770; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy771; + goto yy57; yy769: YYDEBUG(769, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy771; + goto yy57; yy770: YYDEBUG(770, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy57; +yy771: YYDEBUG(771, *YYCURSOR); -#line 1500 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(772, *YYCURSOR); +#line 1501 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pgtextreverse"); TIMELIB_INIT; @@ -12469,93 +12694,93 @@ yy770: TIMELIB_DEINIT; return TIMELIB_PG_TEXT; } -#line 12473 "ext/date/lib/parse_date.c" -yy772: - YYDEBUG(772, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy765; - if (yych == 'v') goto yy765; - goto yy56; +#line 12696 "ext/date/lib/parse_date.c" yy773: YYDEBUG(773, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy765; - if (yych == 't') goto yy765; - goto yy56; + if (yych == 'V') goto yy766; + if (yych == 'v') goto yy766; + goto yy57; yy774: YYDEBUG(774, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'P') goto yy775; - if (yych != 'p') goto yy56; + if (yych == 'T') goto yy766; + if (yych == 't') goto yy766; + goto yy57; yy775: YYDEBUG(775, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'S') { - if (yych == '-') goto yy766; - goto yy56; - } else { - if (yych <= 'T') goto yy765; - if (yych == 't') goto yy765; - goto yy56; - } + if (yych == 'P') goto yy776; + if (yych != 'p') goto yy57; yy776: YYDEBUG(776, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy765; - if (yych == 'g') goto yy765; - goto yy56; + 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 == 'R') goto yy765; - if (yych == 'r') goto yy765; - goto yy56; + 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 yy765; - if (yych <= 'X') goto yy56; - goto yy765; + if (yych == 'R') goto yy766; + if (yych <= 'X') goto yy57; + goto yy766; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; - goto yy765; + if (yych <= 'q') goto yy57; + goto yy766; } else { - if (yych == 'y') goto yy765; - goto yy56; + if (yych == 'y') goto yy766; + goto yy57; } } -yy779: - YYDEBUG(779, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy765; - if (yych == 'b') goto yy765; - goto yy56; 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 yy765; - if (yych <= 'M') goto yy56; - goto yy765; + if (yych == 'L') goto yy766; + if (yych <= 'M') goto yy57; + goto yy766; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy765; + if (yych <= 'k') goto yy57; + goto yy766; } else { - if (yych == 'n') goto yy765; - goto yy56; + if (yych == 'n') goto yy766; + goto yy57; } } -yy781: - YYDEBUG(781, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy765; - if (yych == 'n') goto yy765; - goto yy56; 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); @@ -12587,27 +12812,27 @@ yy782: case 's': case 't': case 'w': - case 'y': goto yy790; - case '-': goto yy787; - case '.': goto yy791; - case '/': goto yy788; - case '0': goto yy804; - case '1': goto yy805; - case '2': goto yy807; - case '3': goto yy808; + 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 yy54; - case ':': goto yy806; - case 'W': goto yy809; - default: goto yy783; + case '9': goto yy55; + case ':': goto yy807; + case 'W': goto yy810; + default: goto yy784; } -yy783: - YYDEBUG(783, *YYCURSOR); -#line 1534 "ext/date/lib/parse_date.re" +yy784: + YYDEBUG(784, *YYCURSOR); +#line 1535 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("year4"); TIMELIB_INIT; @@ -12615,14 +12840,14 @@ yy783: TIMELIB_DEINIT; return TIMELIB_CLF; } -#line 12619 "ext/date/lib/parse_date.c" -yy784: - YYDEBUG(784, *YYCURSOR); +#line 12842 "ext/date/lib/parse_date.c" +yy785: + YYDEBUG(785, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { - case '0': goto yy785; - case '1': goto yy786; + case '0': goto yy786; + case '1': goto yy787; case '2': case '3': case '4': @@ -12630,46 +12855,46 @@ yy784: case '6': case '7': case '8': - case '9': goto yy752; + case '9': goto yy753; case 'A': - case 'a': goto yy745; + case 'a': goto yy746; case 'D': - case 'd': goto yy749; + case 'd': goto yy750; case 'F': - case 'f': goto yy743; + case 'f': goto yy744; case 'J': - case 'j': goto yy742; + case 'j': goto yy743; case 'M': - case 'm': goto yy744; + case 'm': goto yy745; case 'N': - case 'n': goto yy748; + case 'n': goto yy749; case 'O': - case 'o': goto yy747; + case 'o': goto yy748; case 'S': - case 's': goto yy746; - default: goto yy56; + case 's': goto yy747; + default: goto yy57; } -yy785: - YYDEBUG(785, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy752; - goto yy56; yy786: YYDEBUG(786, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy753; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy752; - goto yy56; + 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 yy972; - case '1': goto yy974; + case '0': goto yy973; + case '1': goto yy975; case '2': case '3': case '4': @@ -12677,96 +12902,96 @@ yy787: case '6': case '7': case '8': - case '9': goto yy975; + case '9': goto yy976; case 'A': - case 'a': goto yy966; + case 'a': goto yy967; case 'D': - case 'd': goto yy970; + case 'd': goto yy971; case 'F': - case 'f': goto yy964; + case 'f': goto yy965; case 'J': - case 'j': goto yy963; + case 'j': goto yy964; case 'M': - case 'm': goto yy965; + case 'm': goto yy966; case 'N': - case 'n': goto yy969; + case 'n': goto yy970; case 'O': - case 'o': goto yy968; + case 'o': goto yy969; case 'S': - case 's': goto yy967; - case 'W': goto yy971; - default: goto yy938; + case 's': goto yy968; + case 'W': goto yy972; + default: goto yy939; } -yy788: - YYDEBUG(788, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy946; - if (yych <= '1') goto yy947; - if (yych <= '9') goto yy948; - goto yy56; 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; -yy790: - YYDEBUG(790, *YYCURSOR); +yy791: + YYDEBUG(791, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': - case ' ': goto yy789; + case ' ': goto yy790; case '-': - case '.': goto yy937; + case '.': goto yy938; case 'A': - case 'a': goto yy799; + case 'a': goto yy800; case 'D': - case 'd': goto yy803; + case 'd': goto yy804; case 'F': - case 'f': goto yy797; + case 'f': goto yy798; case 'H': - case 'h': goto yy63; - case 'I': goto yy792; + case 'h': goto yy64; + case 'I': goto yy793; case 'J': - case 'j': goto yy796; + case 'j': goto yy797; case 'M': - case 'm': goto yy798; + case 'm': goto yy799; case 'N': - case 'n': goto yy802; + case 'n': goto yy803; case 'O': - case 'o': goto yy801; + case 'o': goto yy802; case 'S': - case 's': goto yy800; + case 's': goto yy801; case 'T': - case 't': goto yy68; - case 'V': goto yy794; + case 't': goto yy69; + case 'V': goto yy795; case 'W': - case 'w': goto yy67; - case 'X': goto yy795; + case 'w': goto yy68; + case 'X': goto yy796; case 'Y': - case 'y': goto yy66; - default: goto yy56; + case 'y': goto yy67; + default: goto yy57; } -yy791: - YYDEBUG(791, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy938; - if (yych <= '0') goto yy930; - if (yych <= '2') goto yy931; - if (yych <= '3') goto yy932; - goto yy938; 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 yy929; + if (yych == 'I') goto yy930; } else { - if (yych == 'W') goto yy793; - if (yych <= 'X') goto yy883; + if (yych == 'W') goto yy794; + if (yych <= 'X') goto yy884; } -yy793: - YYDEBUG(793, *YYCURSOR); -#line 1360 "ext/date/lib/parse_date.re" +yy794: + YYDEBUG(794, *YYCURSOR); +#line 1361 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenodayrev"); TIMELIB_INIT; @@ -12778,222 +13003,222 @@ yy793: TIMELIB_DEINIT; return TIMELIB_DATE_NO_DAY; } -#line 12782 "ext/date/lib/parse_date.c" -yy794: - YYDEBUG(794, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy927; - goto yy793; +#line 13005 "ext/date/lib/parse_date.c" yy795: YYDEBUG(795, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy926; - goto yy793; + 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 yy919; - if (yych <= 'T') goto yy56; - goto yy918; + if (yych == 'A') goto yy920; + if (yych <= 'T') goto yy57; + goto yy919; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy919; + if (yych <= '`') goto yy57; + goto yy920; } else { - if (yych == 'u') goto yy918; - goto yy56; + if (yych == 'u') goto yy919; + goto yy57; } } -yy797: - YYDEBUG(797, *YYCURSOR); +yy798: + YYDEBUG(798, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= 'N') { - if (yych == 'E') goto yy912; - goto yy56; + if (yych == 'E') goto yy913; + goto yy57; } else { - if (yych <= 'O') goto yy98; - if (yych <= 'Q') goto yy56; - goto yy97; + if (yych <= 'O') goto yy99; + if (yych <= 'Q') goto yy57; + goto yy98; } } else { if (yych <= 'n') { - if (yych == 'e') goto yy912; - goto yy56; + if (yych == 'e') goto yy913; + goto yy57; } else { - if (yych <= 'o') goto yy98; - if (yych == 'r') goto yy97; - goto yy56; + if (yych <= 'o') goto yy99; + if (yych == 'r') goto yy98; + goto yy57; } } -yy798: - YYDEBUG(798, *YYCURSOR); +yy799: + YYDEBUG(799, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= 'H') { - if (yych == 'A') goto yy909; - goto yy56; + if (yych == 'A') goto yy910; + goto yy57; } else { - if (yych <= 'I') goto yy117; - if (yych <= 'N') goto yy56; - goto yy116; + if (yych <= 'I') goto yy118; + if (yych <= 'N') goto yy57; + goto yy117; } } else { if (yych <= 'h') { - if (yych == 'a') goto yy909; - goto yy56; + if (yych == 'a') goto yy910; + goto yy57; } else { - if (yych <= 'i') goto yy117; - if (yych == 'o') goto yy116; - goto yy56; + if (yych <= 'i') goto yy118; + if (yych == 'o') goto yy117; + goto yy57; } } -yy799: - YYDEBUG(799, *YYCURSOR); +yy800: + YYDEBUG(800, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'P') goto yy903; - if (yych <= 'T') goto yy56; - goto yy902; + if (yych == 'P') goto yy904; + if (yych <= 'T') goto yy57; + goto yy903; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy903; + if (yych <= 'o') goto yy57; + goto yy904; } else { - if (yych == 'u') goto yy902; - goto yy56; + if (yych == 'u') goto yy903; + goto yy57; } } -yy800: - YYDEBUG(800, *YYCURSOR); +yy801: + YYDEBUG(801, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy126; - goto yy56; + if (yych == 'A') goto yy127; + goto yy57; } else { - if (yych <= 'E') goto yy895; - if (yych <= 'T') goto yy56; - goto yy125; + if (yych <= 'E') goto yy896; + if (yych <= 'T') goto yy57; + goto yy126; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy126; - goto yy56; + if (yych == 'a') goto yy127; + goto yy57; } else { - if (yych <= 'e') goto yy895; - if (yych == 'u') goto yy125; - goto yy56; + if (yych <= 'e') goto yy896; + if (yych == 'u') goto yy126; + goto yy57; } } -yy801: - YYDEBUG(801, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'C') goto yy890; - if (yych == 'c') goto yy890; - goto yy56; yy802: YYDEBUG(802, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy884; - if (yych == 'o') goto yy884; - goto yy56; + 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 yy113; - if (yych <= 'D') goto yy56; - goto yy877; + if (yych == 'A') goto yy114; + if (yych <= 'D') goto yy57; + goto yy878; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy113; + if (yych <= '`') goto yy57; + goto yy114; } else { - if (yych == 'e') goto yy877; - goto yy56; + if (yych == 'e') goto yy878; + goto yy57; } } -yy804: - YYDEBUG(804, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '0') goto yy874; - if (yych <= '9') goto yy875; - goto yy60; yy805: YYDEBUG(805, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '2') goto yy843; - if (yych <= '9') goto yy822; - goto yy60; + 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 yy56; - if (yych <= '0') goto yy823; - if (yych <= '1') goto yy824; - goto yy56; + 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 yy60; - if (yych <= '9') goto yy822; - goto yy60; + 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 yy60; - if (yych <= '5') goto yy818; - if (yych <= '6') goto yy819; - if (yych <= '9') goto yy54; - goto yy60; + 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 yy56; - if (yych <= '0') goto yy810; - if (yych <= '4') goto yy811; - goto yy812; + if (yych <= '/') goto yy57; + if (yych <= '0') goto yy811; + if (yych <= '4') goto yy812; + goto yy813; } else { if (yych <= 'E') { - if (yych <= 'D') goto yy56; - goto yy82; + if (yych <= 'D') goto yy57; + goto yy83; } else { - if (yych == 'e') goto yy82; - goto yy56; + if (yych == 'e') goto yy83; + goto yy57; } } -yy810: - YYDEBUG(810, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '0') goto yy56; - if (yych <= '9') goto yy813; - goto yy56; yy811: YYDEBUG(811, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy813; - goto yy56; + if (yych <= '0') goto yy57; + if (yych <= '9') goto yy814; + goto yy57; yy812: YYDEBUG(812, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '4') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy814; + goto yy57; yy813: YYDEBUG(813, *YYCURSOR); - yyaccept = 17; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy815; - if (yych <= '/') goto yy814; - if (yych <= '7') goto yy816; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '4') goto yy57; yy814: YYDEBUG(814, *YYCURSOR); -#line 1468 "ext/date/lib/parse_date.re" + yyaccept = 17; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '-') goto yy816; + if (yych <= '/') goto yy815; + if (yych <= '7') goto yy817; +yy815: + YYDEBUG(815, *YYCURSOR); +#line 1469 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweek"); @@ -13011,17 +13236,17 @@ yy814: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 13015 "ext/date/lib/parse_date.c" -yy815: - YYDEBUG(815, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '8') goto yy56; +#line 13238 "ext/date/lib/parse_date.c" yy816: YYDEBUG(816, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych <= '/') goto yy57; + if (yych >= '8') goto yy57; +yy817: YYDEBUG(817, *YYCURSOR); -#line 1449 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(818, *YYCURSOR); +#line 1450 "ext/date/lib/parse_date.re" { timelib_sll w, d; DEBUG_OUTPUT("isoweekday"); @@ -13039,71 +13264,71 @@ yy816: TIMELIB_DEINIT; return TIMELIB_ISO_WEEK; } -#line 13043 "ext/date/lib/parse_date.c" -yy818: - YYDEBUG(818, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy820; - goto yy60; +#line 13266 "ext/date/lib/parse_date.c" yy819: YYDEBUG(819, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '6') goto yy820; - if (yych <= '9') goto yy54; - goto yy60; + 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] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych >= ' ') goto yy60; + if (yych == '\t') goto yy61; + if (yych >= ' ') goto yy61; } else { - if (yych == 'D') goto yy60; - if (yych >= 'F') goto yy60; + if (yych == 'D') goto yy61; + if (yych >= 'F') goto yy61; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy60; - if (yych >= 'M') goto yy60; + if (yych == 'H') goto yy61; + if (yych >= 'M') goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - if (yych >= 'W') goto yy60; + 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 yy60; - if (yych >= 'd') goto yy60; + if (yych == 'Y') goto yy61; + if (yych >= 'd') goto yy61; } else { - if (yych == 'f') goto yy60; - if (yych >= 'h') goto yy60; + if (yych == 'f') goto yy61; + if (yych >= 'h') goto yy61; } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych >= 's') goto yy60; + if (yych == 'm') goto yy61; + if (yych >= 's') goto yy61; } else { if (yych <= 'w') { - if (yych >= 'w') goto yy60; + if (yych >= 'w') goto yy61; } else { - if (yych == 'y') goto yy60; + if (yych == 'y') goto yy61; } } } } -yy821: - YYDEBUG(821, *YYCURSOR); -#line 1436 "ext/date/lib/parse_date.re" +yy822: + YYDEBUG(822, *YYCURSOR); +#line 1437 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("pgydotd"); TIMELIB_INIT; @@ -13115,110 +13340,110 @@ yy821: TIMELIB_DEINIT; return TIMELIB_PG_YEARDAY; } -#line 13119 "ext/date/lib/parse_date.c" -yy822: - YYDEBUG(822, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy820; - goto yy60; +#line 13342 "ext/date/lib/parse_date.c" yy823: YYDEBUG(823, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy825; - goto yy56; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy821; + goto yy61; yy824: YYDEBUG(824, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy826; + goto yy57; yy825: YYDEBUG(825, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '3') goto yy57; +yy826: YYDEBUG(826, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy827; - if (yych <= '2') goto yy828; - if (yych <= '3') goto yy829; - goto yy56; -yy827: + if (yych != ':') goto yy57; YYDEBUG(827, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy830; - goto yy56; + 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 yy56; - if (yych <= '9') goto yy830; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy831; + goto yy57; yy829: YYDEBUG(829, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy831; + goto yy57; yy830: YYDEBUG(830, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ' ') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy57; +yy831: YYDEBUG(831, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy832; - if (yych <= '2') goto yy833; - goto yy56; -yy832: + if (yych != ' ') goto yy57; YYDEBUG(832, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy834; - goto yy56; + 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 yy56; - if (yych >= '5') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy835; + goto yy57; yy834: YYDEBUG(834, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '5') goto yy57; +yy835: YYDEBUG(835, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= '6') goto yy56; + if (yych != ':') goto yy57; YYDEBUG(836, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; YYDEBUG(837, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(838, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy839; - if (yych <= '6') goto yy840; - goto yy56; -yy839: + if (yych != ':') goto yy57; YYDEBUG(839, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy840; + if (yych <= '6') goto yy841; + goto yy57; yy840: YYDEBUG(840, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '0') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy842; + goto yy57; yy841: YYDEBUG(841, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych != '0') goto yy57; yy842: YYDEBUG(842, *YYCURSOR); -#line 1410 "ext/date/lib/parse_date.re" + ++YYCURSOR; +yy843: + YYDEBUG(843, *YYCURSOR); +#line 1411 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("xmlrpc | xmlrpcnocolon | soap | wddx | exif"); @@ -13243,269 +13468,269 @@ yy842: TIMELIB_DEINIT; return TIMELIB_XMLRPC_SOAP; } -#line 13247 "ext/date/lib/parse_date.c" -yy843: - YYDEBUG(843, *YYCURSOR); +#line 13470 "ext/date/lib/parse_date.c" +yy844: + YYDEBUG(844, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '2') { - if (yych <= '/') goto yy60; - if (yych >= '1') goto yy845; + if (yych <= '/') goto yy61; + if (yych >= '1') goto yy846; } else { - if (yych <= '3') goto yy846; - if (yych <= '9') goto yy820; - goto yy60; + if (yych <= '3') goto yy847; + if (yych <= '9') goto yy821; + goto yy61; } -yy844: - YYDEBUG(844, *YYCURSOR); +yy845: + YYDEBUG(845, *YYCURSOR); yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy821; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy822; + goto yy61; } else { - if (yych <= '/') goto yy821; - if (yych <= '9') goto yy847; - if (yych <= 'C') goto yy821; - goto yy60; + if (yych <= '/') goto yy822; + if (yych <= '9') goto yy848; + if (yych <= 'C') goto yy822; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy821; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy822; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy821; - goto yy60; + if (yych <= 'L') goto yy822; + goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - goto yy821; + if (yych <= 'R') goto yy822; + if (yych <= 'T') goto yy61; + goto yy822; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy821; - if (yych <= 'Y') goto yy60; - goto yy821; + if (yych == 'X') goto yy822; + if (yych <= 'Y') goto yy61; + goto yy822; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy821; + if (yych <= 'd') goto yy61; + goto yy822; } else { - if (yych == 'g') goto yy821; - goto yy60; + if (yych == 'g') goto yy822; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy821; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy822; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy821; - goto yy60; + if (yych <= 'v') goto yy822; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy821; + if (yych == 'y') goto yy61; + goto yy822; } } } } -yy845: - YYDEBUG(845, *YYCURSOR); +yy846: + YYDEBUG(846, *YYCURSOR); yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy821; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy822; + goto yy61; } else { - if (yych <= '/') goto yy821; - if (yych <= '9') goto yy847; - if (yych <= 'C') goto yy821; - goto yy60; + if (yych <= '/') goto yy822; + if (yych <= '9') goto yy848; + if (yych <= 'C') goto yy822; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy821; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy822; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy821; - goto yy60; + if (yych <= 'L') goto yy822; + goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - goto yy821; + if (yych <= 'R') goto yy822; + if (yych <= 'T') goto yy61; + goto yy822; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy821; - if (yych <= 'Y') goto yy60; - goto yy821; + if (yych == 'X') goto yy822; + if (yych <= 'Y') goto yy61; + goto yy822; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy821; + if (yych <= 'd') goto yy61; + goto yy822; } else { - if (yych == 'g') goto yy821; - goto yy60; + if (yych == 'g') goto yy822; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy821; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy822; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy821; - goto yy60; + if (yych <= 'v') goto yy822; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy821; + if (yych == 'y') goto yy61; + goto yy822; } } } } -yy846: - YYDEBUG(846, *YYCURSOR); +yy847: + YYDEBUG(847, *YYCURSOR); yyaccept = 18; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy821; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy822; + goto yy61; } else { if (yych <= '1') { - if (yych <= '/') goto yy821; + if (yych <= '/') goto yy822; } else { - if (yych <= '9') goto yy54; - if (yych <= 'C') goto yy821; - goto yy60; + if (yych <= '9') goto yy55; + if (yych <= 'C') goto yy822; + goto yy61; } } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy821; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy822; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy821; - goto yy60; + if (yych <= 'L') goto yy822; + goto yy61; } else { - if (yych <= 'R') goto yy821; - if (yych <= 'T') goto yy60; - goto yy821; + if (yych <= 'R') goto yy822; + if (yych <= 'T') goto yy61; + goto yy822; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy821; - if (yych <= 'Y') goto yy60; - goto yy821; + if (yych == 'X') goto yy822; + if (yych <= 'Y') goto yy61; + goto yy822; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy821; + if (yych <= 'd') goto yy61; + goto yy822; } else { - if (yych == 'g') goto yy821; - goto yy60; + if (yych == 'g') goto yy822; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy821; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy822; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy821; - goto yy60; + if (yych <= 'v') goto yy822; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy821; + if (yych == 'y') goto yy61; + goto yy822; } } } } -yy847: - YYDEBUG(847, *YYCURSOR); +yy848: + YYDEBUG(848, *YYCURSOR); yyaccept = 19; yych = *(YYMARKER = ++YYCURSOR); - if (yybm[0+yych] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy59; - if (yych >= ' ') goto yy59; + if (yych == '\t') goto yy60; + if (yych >= ' ') goto yy60; } else { - if (yych == 'D') goto yy64; - if (yych >= 'F') goto yy65; + if (yych == 'D') goto yy65; + if (yych >= 'F') goto yy66; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy63; - if (yych >= 'M') goto yy62; + if (yych == 'H') goto yy64; + if (yych >= 'M') goto yy63; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy61; + if (yych >= 'S') goto yy62; } else { - if (yych <= 'T') goto yy849; - if (yych >= 'W') goto yy67; + if (yych <= 'T') goto yy850; + if (yych >= 'W') goto yy68; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy66; - if (yych >= 'd') goto yy64; + if (yych == 'Y') goto yy67; + if (yych >= 'd') goto yy65; } else { if (yych <= 'f') { - if (yych >= 'f') goto yy65; + if (yych >= 'f') goto yy66; } else { - if (yych == 'h') goto yy63; + if (yych == 'h') goto yy64; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy62; - if (yych <= 'r') goto yy848; - if (yych <= 's') goto yy61; - goto yy850; + 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 yy67; + if (yych >= 'w') goto yy68; } else { - if (yych == 'y') goto yy66; + if (yych == 'y') goto yy67; } } } } -yy848: - YYDEBUG(848, *YYCURSOR); -#line 1398 "ext/date/lib/parse_date.re" +yy849: + YYDEBUG(849, *YYCURSOR); +#line 1399 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("datenocolon"); TIMELIB_INIT; @@ -13516,927 +13741,927 @@ yy848: TIMELIB_DEINIT; return TIMELIB_DATE_NOCOLON; } -#line 13520 "ext/date/lib/parse_date.c" -yy849: - YYDEBUG(849, *YYCURSOR); +#line 13743 "ext/date/lib/parse_date.c" +yy850: + YYDEBUG(850, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= '2') { - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy864; - goto yy865; + if (yych <= '/') goto yy57; + if (yych <= '1') goto yy865; + goto yy866; } else { - if (yych <= '9') goto yy866; - if (yych <= 'G') goto yy56; - goto yy69; + if (yych <= '9') goto yy867; + if (yych <= 'G') goto yy57; + goto yy70; } } else { if (yych <= 'g') { - if (yych == 'U') goto yy70; - goto yy56; + if (yych == 'U') goto yy71; + goto yy57; } else { - if (yych <= 'h') goto yy69; - if (yych == 'u') goto yy70; - goto yy56; + if (yych <= 'h') goto yy70; + if (yych == 'u') goto yy71; + goto yy57; } } -yy850: - YYDEBUG(850, *YYCURSOR); +yy851: + YYDEBUG(851, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= '2') { - if (yych <= '/') goto yy56; - if (yych >= '2') goto yy852; + if (yych <= '/') goto yy57; + if (yych >= '2') goto yy853; } else { - if (yych <= '9') goto yy853; - if (yych <= 'G') goto yy56; - goto yy69; + if (yych <= '9') goto yy854; + if (yych <= 'G') goto yy57; + goto yy70; } } else { if (yych <= 'g') { - if (yych == 'U') goto yy70; - goto yy56; + if (yych == 'U') goto yy71; + goto yy57; } else { - if (yych <= 'h') goto yy69; - if (yych == 'u') goto yy70; - goto yy56; + if (yych <= 'h') goto yy70; + if (yych == 'u') goto yy71; + goto yy57; } } - YYDEBUG(851, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy858; - if (yych <= '9') goto yy853; - goto yy56; -yy852: YYDEBUG(852, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '4') goto yy858; - if (yych <= '5') goto yy854; - goto yy56; + 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 yy56; - if (yych >= '6') goto yy56; + 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 yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; yy855: YYDEBUG(855, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy856; - if (yych <= '6') goto yy857; - goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy856: YYDEBUG(856, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy857; + if (yych <= '6') goto yy858; + goto yy57; yy857: YYDEBUG(857, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '0') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy842; + goto yy57; yy858: YYDEBUG(858, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy859; - if (yych <= '9') goto yy855; - goto yy56; + if (yych == '0') goto yy842; + goto yy57; yy859: YYDEBUG(859, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '5') goto yy860; - if (yych <= '6') goto yy861; - if (yych <= '9') goto yy855; - goto yy56; + if (yych <= '9') goto yy856; + goto yy57; yy860: YYDEBUG(860, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy862; - if (yych <= '6') goto yy863; - if (yych <= '9') goto yy841; - goto yy56; + 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 yy56; - if (yych <= '0') goto yy862; - if (yych <= '5') goto yy856; - if (yych <= '6') goto yy857; - goto yy56; + 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 yy842; - if (yych <= '9') goto yy841; - goto yy842; + 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 == '0') goto yy841; - goto yy842; + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy842; + goto yy843; yy864: YYDEBUG(864, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy873; - if (yych <= '9') goto yy866; - if (yych <= ':') goto yy867; - goto yy56; + if (yych == '0') goto yy842; + goto yy843; yy865: YYDEBUG(865, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '5') { - if (yych <= '/') goto yy56; - if (yych <= '4') goto yy873; - goto yy854; - } else { - if (yych == ':') goto yy867; - goto yy56; - } + 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 <= '/') goto yy56; - if (yych <= '5') goto yy854; - if (yych != ':') goto yy56; + 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 yy56; - if (yych >= '6') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy855; + if (yych != ':') goto yy57; +yy868: YYDEBUG(868, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= '6') goto yy57; YYDEBUG(869, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(870, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy871; - if (yych <= '6') goto yy872; - goto yy56; -yy871: + if (yych != ':') goto yy57; YYDEBUG(871, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy872; + if (yych <= '6') goto yy873; + goto yy57; yy872: YYDEBUG(872, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '0') goto yy841; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy842; + goto yy57; yy873: YYDEBUG(873, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy859; - if (yych <= '9') goto yy855; - if (yych <= ':') goto yy867; - goto yy56; + if (yych == '0') goto yy842; + goto yy57; yy874: YYDEBUG(874, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '2') { - if (yych <= '/') goto yy60; - if (yych <= '0') goto yy876; - goto yy845; - } else { - if (yych <= '3') goto yy846; - if (yych <= '9') goto yy820; - goto yy60; - } + 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 yy60; - if (yych <= '0') goto yy844; - goto yy845; + if (yych <= '/') goto yy61; + if (yych <= '0') goto yy877; + goto yy846; } else { - if (yych <= '3') goto yy846; - if (yych <= '9') goto yy820; - goto yy60; + if (yych <= '3') goto yy847; + if (yych <= '9') goto yy821; + goto yy61; } yy876: YYDEBUG(876, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy847; - goto yy60; + 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 == 'C') goto yy878; - if (yych != 'c') goto yy56; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy848; + goto yy61; yy878: YYDEBUG(878, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy879; - if (yych != 'e') goto yy793; + yych = *++YYCURSOR; + if (yych == 'C') goto yy879; + if (yych != 'c') goto yy57; yy879: YYDEBUG(879, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy880; - if (yych != 'm') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy880; + if (yych != 'e') goto yy794; yy880: YYDEBUG(880, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy881; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy881; + if (yych != 'm') goto yy57; yy881: YYDEBUG(881, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy882; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy882; + if (yych != 'b') goto yy57; yy882: YYDEBUG(882, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych != 'r') goto yy56; + if (yych == 'E') goto yy883; + if (yych != 'e') goto yy57; yy883: YYDEBUG(883, *YYCURSOR); yych = *++YYCURSOR; - goto yy793; + if (yych == 'R') goto yy884; + if (yych != 'r') goto yy57; yy884: YYDEBUG(884, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'V') goto yy885; - if (yych != 'v') goto yy56; + goto yy794; yy885: YYDEBUG(885, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy886; - if (yych != 'e') goto yy793; + yych = *++YYCURSOR; + if (yych == 'V') goto yy886; + if (yych != 'v') goto yy57; yy886: YYDEBUG(886, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy887; - if (yych != 'm') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy887; + if (yych != 'e') goto yy794; yy887: YYDEBUG(887, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy888; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy888; + if (yych != 'm') goto yy57; yy888: YYDEBUG(888, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy889; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy889; + if (yych != 'b') goto yy57; yy889: YYDEBUG(889, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych == 'r') goto yy883; - goto yy56; + if (yych == 'E') goto yy890; + if (yych != 'e') goto yy57; yy890: YYDEBUG(890, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy891; - if (yych != 't') goto yy56; + if (yych == 'R') goto yy884; + if (yych == 'r') goto yy884; + goto yy57; yy891: YYDEBUG(891, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'O') goto yy892; - if (yych != 'o') goto yy793; + yych = *++YYCURSOR; + if (yych == 'T') goto yy892; + if (yych != 't') goto yy57; yy892: YYDEBUG(892, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy893; - if (yych != 'b') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'O') goto yy893; + if (yych != 'o') goto yy794; yy893: YYDEBUG(893, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy894; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy894; + if (yych != 'b') goto yy57; yy894: YYDEBUG(894, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych == 'r') goto yy883; - goto yy56; + 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 yy128; - if (yych <= 'O') goto yy56; + if (yych == 'C') goto yy129; + if (yych <= 'O') goto yy57; } else { if (yych <= 'c') { - if (yych <= 'b') goto yy56; - goto yy128; + if (yych <= 'b') goto yy57; + goto yy129; } else { - if (yych != 'p') goto yy56; + if (yych != 'p') goto yy57; } } -yy896: - YYDEBUG(896, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy897; - if (yych != 't') goto yy793; yy897: YYDEBUG(897, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'E') goto yy898; - if (yych != 'e') goto yy793; + yych = *++YYCURSOR; + if (yych == 'T') goto yy898; + if (yych != 't') goto yy794; yy898: YYDEBUG(898, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy899; - if (yych != 'm') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'E') goto yy899; + if (yych != 'e') goto yy794; yy899: YYDEBUG(899, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy900; - if (yych != 'b') goto yy56; + if (yych == 'M') goto yy900; + if (yych != 'm') goto yy57; yy900: YYDEBUG(900, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy901; - if (yych != 'e') goto yy56; + if (yych == 'B') goto yy901; + if (yych != 'b') goto yy57; yy901: YYDEBUG(901, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy883; - if (yych == 'r') goto yy883; - goto yy56; + if (yych == 'E') goto yy902; + if (yych != 'e') goto yy57; yy902: YYDEBUG(902, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy906; - if (yych == 'g') goto yy906; - goto yy56; + if (yych == 'R') goto yy884; + if (yych == 'r') goto yy884; + goto yy57; yy903: YYDEBUG(903, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy904; - if (yych != 'r') goto yy56; + if (yych == 'G') goto yy907; + if (yych == 'g') goto yy907; + goto yy57; yy904: YYDEBUG(904, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'I') goto yy905; - if (yych != 'i') goto yy793; + yych = *++YYCURSOR; + if (yych == 'R') goto yy905; + if (yych != 'r') goto yy57; yy905: YYDEBUG(905, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'L') goto yy883; - if (yych == 'l') goto yy883; - goto yy56; -yy906: - YYDEBUG(906, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy907; - if (yych != 'u') goto yy793; + 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); - yych = *++YYCURSOR; - if (yych == 'S') goto yy908; - if (yych != 's') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy908; + if (yych != 'u') goto yy794; yy908: YYDEBUG(908, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy883; - if (yych == 't') goto yy883; - goto yy56; + 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 yy910; - if (yych <= 'X') goto yy56; - goto yy883; + if (yych == 'R') goto yy911; + if (yych <= 'X') goto yy57; + goto yy884; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy883; - goto yy56; + if (yych == 'y') goto yy884; + goto yy57; } } -yy910: - YYDEBUG(910, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'C') goto yy911; - if (yych != 'c') goto yy793; yy911: YYDEBUG(911, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy883; - if (yych == 'h') goto yy883; - goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'C') goto yy912; + if (yych != 'c') goto yy794; yy912: YYDEBUG(912, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'B') goto yy913; - if (yych != 'b') goto yy56; + if (yych == 'H') goto yy884; + if (yych == 'h') goto yy884; + goto yy57; yy913: YYDEBUG(913, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'R') goto yy914; - if (yych != 'r') goto yy793; + yych = *++YYCURSOR; + if (yych == 'B') goto yy914; + if (yych != 'b') goto yy57; yy914: YYDEBUG(914, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy915; - if (yych != 'u') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'R') goto yy915; + if (yych != 'r') goto yy794; yy915: YYDEBUG(915, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy916; - if (yych != 'a') goto yy56; + if (yych == 'U') goto yy916; + if (yych != 'u') goto yy57; yy916: YYDEBUG(916, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy917; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy917; + if (yych != 'a') goto yy57; yy917: YYDEBUG(917, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy56; + 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 yy925; - if (yych <= 'M') goto yy56; - goto yy924; + if (yych == 'L') goto yy926; + if (yych <= 'M') goto yy57; + goto yy925; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy925; + if (yych <= 'k') goto yy57; + goto yy926; } else { - if (yych == 'n') goto yy924; - goto yy56; + if (yych == 'n') goto yy925; + goto yy57; } } -yy919: - YYDEBUG(919, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy920; - if (yych != 'n') goto yy56; yy920: YYDEBUG(920, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'U') goto yy921; - if (yych != 'u') goto yy793; + yych = *++YYCURSOR; + if (yych == 'N') goto yy921; + if (yych != 'n') goto yy57; yy921: YYDEBUG(921, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy922; - if (yych != 'a') goto yy56; + yyaccept = 20; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == 'U') goto yy922; + if (yych != 'u') goto yy794; yy922: YYDEBUG(922, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy923; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy923; + if (yych != 'a') goto yy57; yy923: YYDEBUG(923, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy56; + if (yych == 'R') goto yy924; + if (yych != 'r') goto yy57; yy924: YYDEBUG(924, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy883; - if (yych == 'e') goto yy883; - goto yy793; + if (yych == 'Y') goto yy884; + if (yych == 'y') goto yy884; + goto yy57; yy925: YYDEBUG(925, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy793; + if (yych == 'E') goto yy884; + if (yych == 'e') goto yy884; + goto yy794; yy926: YYDEBUG(926, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy883; - goto yy793; + if (yych == 'Y') goto yy884; + if (yych == 'y') goto yy884; + goto yy794; yy927: YYDEBUG(927, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'I') goto yy793; + if (yych == 'I') goto yy884; + goto yy794; +yy928: YYDEBUG(928, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy883; - goto yy793; -yy929: + if (yych != 'I') goto yy794; YYDEBUG(929, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy883; - goto yy793; + if (yych == 'I') goto yy884; + goto yy794; yy930: YYDEBUG(930, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy945; - if (yych <= '9') goto yy944; - goto yy56; + if (yych == 'I') goto yy884; + goto yy794; yy931: YYDEBUG(931, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy943; - goto yy56; + 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 yy56; - if (yych <= '5') goto yy941; - if (yych <= '6') goto yy940; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy944; + goto yy57; yy933: YYDEBUG(933, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy912; - if (yych == 'e') goto yy912; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '5') goto yy942; + if (yych <= '6') goto yy941; + goto yy57; yy934: YYDEBUG(934, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy909; - if (yych == 'a') goto yy909; - goto yy56; + if (yych == 'E') goto yy913; + if (yych == 'e') goto yy913; + goto yy57; yy935: YYDEBUG(935, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy939; - if (yych == 'e') goto yy939; - goto yy56; + if (yych == 'A') goto yy910; + if (yych == 'a') goto yy910; + goto yy57; yy936: YYDEBUG(936, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy877; - if (yych == 'e') goto yy877; - goto yy56; + 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; -yy938: - YYDEBUG(938, *YYCURSOR); +yy939: + YYDEBUG(939, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': case ' ': case '-': - case '.': goto yy937; + case '.': goto yy938; case 'A': - case 'a': goto yy799; + case 'a': goto yy800; case 'D': - case 'd': goto yy936; + case 'd': goto yy937; case 'F': - case 'f': goto yy933; - case 'I': goto yy792; + case 'f': goto yy934; + case 'I': goto yy793; case 'J': - case 'j': goto yy796; + case 'j': goto yy797; case 'M': - case 'm': goto yy934; + case 'm': goto yy935; case 'N': - case 'n': goto yy802; + case 'n': goto yy803; case 'O': - case 'o': goto yy801; + case 'o': goto yy802; case 'S': - case 's': goto yy935; - case 'V': goto yy794; - case 'X': goto yy795; - default: goto yy56; + case 's': goto yy936; + case 'V': goto yy795; + case 'X': goto yy796; + default: goto yy57; } -yy939: - YYDEBUG(939, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy896; - if (yych == 'p') goto yy896; - goto yy56; yy940: YYDEBUG(940, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '6') goto yy942; - goto yy56; + if (yych == 'P') goto yy897; + if (yych == 'p') goto yy897; + goto yy57; yy941: YYDEBUG(941, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '6') goto yy943; + goto yy57; yy942: YYDEBUG(942, *YYCURSOR); yych = *++YYCURSOR; - goto yy821; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy943: YYDEBUG(943, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy942; - goto yy56; + goto yy822; yy944: YYDEBUG(944, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy942; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy943; + goto yy57; yy945: YYDEBUG(945, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '0') goto yy56; - if (yych <= '9') goto yy942; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy943; + goto yy57; yy946: YYDEBUG(946, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '.') goto yy56; - if (yych <= '/') goto yy949; - if (yych <= '9') goto yy957; - goto yy56; + if (yych <= '0') goto yy57; + if (yych <= '9') goto yy943; + goto yy57; yy947: YYDEBUG(947, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '.') goto yy56; - if (yych <= '/') goto yy949; - if (yych <= '2') goto yy957; - goto yy56; + if (yych <= '.') goto yy57; + if (yych <= '/') goto yy950; + if (yych <= '9') goto yy958; + goto yy57; yy948: YYDEBUG(948, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy56; + if (yych <= '.') goto yy57; + if (yych <= '/') goto yy950; + if (yych <= '2') goto yy958; + goto yy57; yy949: YYDEBUG(949, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy950; - if (yych <= '3') goto yy951; - if (yych <= '9') goto yy952; - goto yy56; + 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 yy454; - if (yych <= '9') goto yy952; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '9') goto yy953; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy951: - YYDEBUG(951, *YYCURSOR); +yy952: + YYDEBUG(952, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '1') goto yy952; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '1') goto yy953; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy952: - YYDEBUG(952, *YYCURSOR); +yy953: + YYDEBUG(953, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'q') { - if (yych == 'n') goto yy954; - goto yy454; + if (yych == 'n') goto yy955; + goto yy455; } else { - if (yych <= 'r') goto yy955; - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 'r') goto yy956; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } -yy953: - YYDEBUG(953, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy453; - goto yy56; yy954: YYDEBUG(954, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy453; - goto yy56; + if (yych == 't') goto yy454; + goto yy57; yy955: YYDEBUG(955, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy453; - goto yy56; + if (yych == 'd') goto yy454; + goto yy57; yy956: YYDEBUG(956, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'h') goto yy453; - goto yy56; + if (yych == 'd') goto yy454; + goto yy57; yy957: YYDEBUG(957, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '/') goto yy56; + 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 yy56; - if (yych >= '1') goto yy960; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy961; } else { - if (yych <= '3') goto yy961; - if (yych <= '9') goto yy952; - goto yy56; + if (yych <= '3') goto yy962; + if (yych <= '9') goto yy953; + goto yy57; } - YYDEBUG(959, *YYCURSOR); + YYDEBUG(960, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '9') goto yy962; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '9') goto yy963; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy960: - YYDEBUG(960, *YYCURSOR); +yy961: + YYDEBUG(961, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '9') goto yy962; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '9') goto yy963; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy961: - YYDEBUG(961, *YYCURSOR); +yy962: + YYDEBUG(962, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy454; - if (yych <= '1') goto yy962; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych <= '/') goto yy455; + if (yych <= '1') goto yy963; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy962: - YYDEBUG(962, *YYCURSOR); +yy963: + YYDEBUG(963, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == '/') goto yy453; - if (yych <= 'm') goto yy454; - goto yy954; + if (yych == '/') goto yy454; + if (yych <= 'm') goto yy455; + goto yy955; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy955; + if (yych <= 'q') goto yy455; + goto yy956; } else { - if (yych <= 's') goto yy953; - if (yych <= 't') goto yy956; - goto yy454; + if (yych <= 's') goto yy954; + if (yych <= 't') goto yy957; + goto yy455; } } -yy963: - YYDEBUG(963, *YYCURSOR); +yy964: + YYDEBUG(964, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { - if (yych == 'A') goto yy1043; - if (yych <= 'T') goto yy56; - goto yy1042; + if (yych == 'A') goto yy1044; + if (yych <= 'T') goto yy57; + goto yy1043; } else { if (yych <= 'a') { - if (yych <= '`') goto yy56; - goto yy1043; + if (yych <= '`') goto yy57; + goto yy1044; } else { - if (yych == 'u') goto yy1042; - goto yy56; + if (yych == 'u') goto yy1043; + goto yy57; } } -yy964: - YYDEBUG(964, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1040; - if (yych == 'e') goto yy1040; - goto yy56; yy965: YYDEBUG(965, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1037; - if (yych == 'a') goto yy1037; - goto yy56; + 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 yy1034; - if (yych <= 'T') goto yy56; - goto yy1033; + if (yych == 'P') goto yy1035; + if (yych <= 'T') goto yy57; + goto yy1034; } else { if (yych <= 'p') { - if (yych <= 'o') goto yy56; - goto yy1034; + if (yych <= 'o') goto yy57; + goto yy1035; } else { - if (yych == 'u') goto yy1033; - goto yy56; + if (yych == 'u') goto yy1034; + goto yy57; } } -yy967: - YYDEBUG(967, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1030; - if (yych == 'e') goto yy1030; - goto yy56; yy968: YYDEBUG(968, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy1028; - if (yych == 'c') goto yy1028; - goto yy56; + if (yych == 'E') goto yy1031; + if (yych == 'e') goto yy1031; + goto yy57; yy969: YYDEBUG(969, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'O') goto yy1026; - if (yych == 'o') goto yy1026; - goto yy56; + if (yych == 'C') goto yy1029; + if (yych == 'c') goto yy1029; + goto yy57; yy970: YYDEBUG(970, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1024; - if (yych == 'e') goto yy1024; - goto yy56; + if (yych == 'O') goto yy1027; + if (yych == 'o') goto yy1027; + goto yy57; yy971: YYDEBUG(971, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '0') goto yy810; - if (yych <= '4') goto yy811; - if (yych <= '5') goto yy812; - goto yy56; + if (yych == 'E') goto yy1025; + if (yych == 'e') goto yy1025; + goto yy57; yy972: YYDEBUG(972, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy976; - if (yych <= '/') goto yy973; - if (yych <= '9') goto yy995; + 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); -#line 1282 "ext/date/lib/parse_date.re" + yyaccept = 22; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '-') goto yy977; + if (yych <= '/') goto yy974; + if (yych <= '9') goto yy996; +yy974: + YYDEBUG(974, *YYCURSOR); +#line 1283 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnudateshorter"); TIMELIB_INIT; @@ -14448,717 +14673,717 @@ yy973: TIMELIB_DEINIT; return TIMELIB_ISO_DATE; } -#line 14452 "ext/date/lib/parse_date.c" -yy974: - YYDEBUG(974, *YYCURSOR); - yyaccept = 22; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy976; - if (yych <= '/') goto yy973; - if (yych <= '2') goto yy995; - goto yy973; +#line 14675 "ext/date/lib/parse_date.c" yy975: YYDEBUG(975, *YYCURSOR); yyaccept = 22; yych = *(YYMARKER = ++YYCURSOR); - if (yych != '-') goto yy973; + if (yych == '-') goto yy977; + if (yych <= '/') goto yy974; + if (yych <= '2') goto yy996; + goto yy974; yy976: YYDEBUG(976, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '2') goto yy977; - if (yych <= '3') goto yy978; - if (yych <= '9') goto yy979; - goto yy56; + 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 yy656; - goto yy979; + if (yych <= '/') goto yy657; + goto yy980; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy978: - YYDEBUG(978, *YYCURSOR); +yy979: + YYDEBUG(979, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { - if (yych <= '/') goto yy656; + if (yych <= '/') goto yy657; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy979: - YYDEBUG(979, *YYCURSOR); +yy980: + YYDEBUG(980, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == 'T') goto yy984; - if (yych <= 'm') goto yy656; - goto yy981; + if (yych == 'T') goto yy985; + if (yych <= 'm') goto yy657; + goto yy982; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy980: - YYDEBUG(980, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 't') goto yy994; - goto yy56; yy981: YYDEBUG(981, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy994; - goto yy56; + if (yych == 't') goto yy995; + goto yy57; yy982: YYDEBUG(982, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'd') goto yy994; - goto yy56; + if (yych == 'd') goto yy995; + goto yy57; yy983: YYDEBUG(983, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'h') goto yy994; - goto yy56; + if (yych == 'd') goto yy995; + goto yy57; yy984: YYDEBUG(984, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy985; - if (yych <= '2') goto yy986; - if (yych <= '9') goto yy987; - goto yy56; + if (yych == 'h') goto yy995; + goto yy57; yy985: YYDEBUG(985, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy987; - if (yych <= ':') goto yy988; - goto yy56; + 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 yy56; - if (yych <= '4') goto yy987; - if (yych == ':') goto yy988; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy988; + if (yych <= ':') goto yy989; + goto yy57; yy987: YYDEBUG(987, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '4') goto yy988; + if (yych == ':') goto yy989; + goto yy57; yy988: YYDEBUG(988, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy989; - if (yych <= '9') goto yy990; - goto yy56; + if (yych != ':') goto yy57; yy989: YYDEBUG(989, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy990; - if (yych <= ':') goto yy991; - goto yy56; + 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 yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy991; + if (yych <= ':') goto yy992; + goto yy57; yy991: YYDEBUG(991, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy992; - if (yych <= '6') goto yy993; - if (yych <= '9') goto yy841; - goto yy56; + if (yych != ':') goto yy57; yy992: YYDEBUG(992, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '9') goto yy841; - goto yy842; + 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 == '0') goto yy841; - goto yy842; + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy842; + goto yy843; yy994: YYDEBUG(994, *YYCURSOR); - yyaccept = 13; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == 'T') goto yy984; - goto yy656; + yych = *++YYCURSOR; + if (yych == '0') goto yy842; + goto yy843; yy995: YYDEBUG(995, *YYCURSOR); - yyaccept = 22; + yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); - if (yych != '-') goto yy973; + 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 yy56; - if (yych >= '1') goto yy998; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy999; } else { - if (yych <= '3') goto yy999; - if (yych <= '9') goto yy979; - goto yy56; + if (yych <= '3') goto yy1000; + if (yych <= '9') goto yy980; + goto yy57; } - YYDEBUG(997, *YYCURSOR); + YYDEBUG(998, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '9') { - if (yych <= '/') goto yy656; - goto yy1000; + if (yych <= '/') goto yy657; + goto yy1001; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy998: - YYDEBUG(998, *YYCURSOR); +yy999: + YYDEBUG(999, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '9') { - if (yych <= '/') goto yy656; - goto yy1000; + if (yych <= '/') goto yy657; + goto yy1001; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy999: - YYDEBUG(999, *YYCURSOR); +yy1000: + YYDEBUG(1000, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'm') { if (yych <= '1') { - if (yych <= '/') goto yy656; + if (yych <= '/') goto yy657; } else { - if (yych == 'T') goto yy984; - goto yy656; + if (yych == 'T') goto yy985; + goto yy657; } } else { if (yych <= 'r') { - if (yych <= 'n') goto yy981; - if (yych <= 'q') goto yy656; - goto yy982; + if (yych <= 'n') goto yy982; + if (yych <= 'q') goto yy657; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy656; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy657; } } -yy1000: - YYDEBUG(1000, *YYCURSOR); +yy1001: + YYDEBUG(1001, *YYCURSOR); yyaccept = 21; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych == 'T') goto yy1001; - if (yych <= 'm') goto yy454; - goto yy981; + if (yych == 'T') goto yy1002; + if (yych <= 'm') goto yy455; + goto yy982; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy454; - goto yy982; + if (yych <= 'q') goto yy455; + goto yy983; } else { - if (yych <= 's') goto yy980; - if (yych <= 't') goto yy983; - goto yy454; + if (yych <= 's') goto yy981; + if (yych <= 't') goto yy984; + goto yy455; } } -yy1001: - YYDEBUG(1001, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy1002; - if (yych <= '2') goto yy1003; - if (yych <= '9') goto yy987; - goto yy56; yy1002: YYDEBUG(1002, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy1004; - if (yych <= ':') goto yy988; - goto yy56; + 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 yy56; - if (yych <= '4') goto yy1004; - if (yych == ':') goto yy988; - goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy1005; + if (yych <= ':') goto yy989; + goto yy57; yy1004: YYDEBUG(1004, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '4') goto yy1005; + if (yych == ':') goto yy989; + goto yy57; +yy1005: YYDEBUG(1005, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1006; - if (yych <= '9') goto yy990; - goto yy56; -yy1006: + if (yych != ':') goto yy57; YYDEBUG(1006, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy1007; - if (yych <= ':') goto yy991; - goto yy56; + 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 yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy1008; + if (yych <= ':') goto yy992; + goto yy57; +yy1008: YYDEBUG(1008, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1009; - if (yych <= '6') goto yy1010; - if (yych <= '9') goto yy841; - goto yy56; -yy1009: + if (yych != ':') goto yy57; YYDEBUG(1009, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '9') goto yy1011; - goto yy842; + 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 != '0') goto yy842; + 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 yy842; - YYDEBUG(1012, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; -yy1013: + 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(1014, *YYCURSOR); + YYDEBUG(1015, *YYCURSOR); if (yych <= '-') { - if (yych == '+') goto yy1016; - if (yych <= ',') goto yy842; - goto yy1016; + if (yych == '+') goto yy1017; + if (yych <= ',') goto yy843; + goto yy1017; } else { if (yych <= '9') { - if (yych <= '/') goto yy842; - goto yy1013; + if (yych <= '/') goto yy843; + goto yy1014; } else { - if (yych != 'G') goto yy842; + if (yych != 'G') goto yy843; } } - YYDEBUG(1015, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1022; - goto yy56; -yy1016: YYDEBUG(1016, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy1017; - if (yych <= '2') goto yy1018; - if (yych <= '9') goto yy1019; - goto yy56; + if (yych == 'M') goto yy1023; + goto yy57; yy1017: YYDEBUG(1017, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '9') goto yy1019; - if (yych <= ':') goto yy1020; - goto yy842; + 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 <= '5') { - if (yych <= '/') goto yy842; - if (yych >= '5') goto yy1021; - } else { - if (yych <= '9') goto yy841; - if (yych <= ':') goto yy1020; - goto yy842; - } + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy1020; + if (yych <= ':') goto yy1021; + goto yy843; yy1019: YYDEBUG(1019, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy842; - if (yych <= '5') goto yy1021; - if (yych <= '9') goto yy841; - if (yych >= ';') goto yy842; + 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 yy842; - if (yych <= '5') goto yy1021; - if (yych <= '9') goto yy841; - goto yy842; + 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 yy842; - if (yych <= '9') goto yy841; - goto yy842; + if (yych <= '/') goto yy843; + if (yych <= '5') goto yy1022; + if (yych <= '9') goto yy842; + goto yy843; yy1022: YYDEBUG(1022, *YYCURSOR); yych = *++YYCURSOR; - if (yych != 'T') goto yy56; + if (yych <= '/') goto yy843; + if (yych <= '9') goto yy842; + goto yy843; +yy1023: YYDEBUG(1023, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '+') goto yy1016; - if (yych == '-') goto yy1016; - goto yy56; -yy1024: + if (yych != 'T') goto yy57; YYDEBUG(1024, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy1025; - if (yych != 'c') goto yy56; + 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy879; - if (yych == 'e') goto yy879; - goto yy793; + if (yych <= 'E') goto yy880; + if (yych == 'e') goto yy880; + goto yy794; } -yy1026: - YYDEBUG(1026, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'V') goto yy1027; - if (yych != 'v') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy886; - if (yych == 'e') goto yy886; - goto yy793; + if (yych <= 'E') goto yy887; + if (yych == 'e') goto yy887; + goto yy794; } -yy1028: - YYDEBUG(1028, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1029; - if (yych != 't') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'O') goto yy892; - if (yych == 'o') goto yy892; - goto yy793; + if (yych <= 'O') goto yy893; + if (yych == 'o') goto yy893; + goto yy794; } -yy1030: - YYDEBUG(1030, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'P') goto yy1031; - if (yych != 'p') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'T') goto yy1032; - if (yych != 't') goto yy793; + if (yych <= 'T') goto yy1033; + if (yych != 't') goto yy794; } -yy1032: - YYDEBUG(1032, *YYCURSOR); +yy1033: + YYDEBUG(1033, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy898; - if (yych == 'e') goto yy898; - goto yy793; + if (yych <= 'E') goto yy899; + if (yych == 'e') goto yy899; + goto yy794; } -yy1033: - YYDEBUG(1033, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'G') goto yy1036; - if (yych == 'g') goto yy1036; - goto yy56; yy1034: YYDEBUG(1034, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1035; - if (yych != 'r') goto yy56; + 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'I') goto yy905; - if (yych == 'i') goto yy905; - goto yy793; + if (yych <= 'I') goto yy906; + if (yych == 'i') goto yy906; + goto yy794; } -yy1036: - YYDEBUG(1036, *YYCURSOR); +yy1037: + YYDEBUG(1037, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'U') goto yy907; - if (yych == 'u') goto yy907; - goto yy793; + if (yych <= 'U') goto yy908; + if (yych == 'u') goto yy908; + goto yy794; } -yy1037: - YYDEBUG(1037, *YYCURSOR); +yy1038: + YYDEBUG(1038, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { - if (yych == 'R') goto yy1038; - if (yych <= 'X') goto yy56; - goto yy1039; + if (yych == 'R') goto yy1039; + if (yych <= 'X') goto yy57; + goto yy1040; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy56; + if (yych <= 'q') goto yy57; } else { - if (yych == 'y') goto yy1039; - goto yy56; + if (yych == 'y') goto yy1040; + goto yy57; } } -yy1038: - YYDEBUG(1038, *YYCURSOR); +yy1039: + YYDEBUG(1039, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'B') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'C') goto yy911; - if (yych == 'c') goto yy911; - goto yy793; + if (yych <= 'C') goto yy912; + if (yych == 'c') goto yy912; + goto yy794; } -yy1039: - YYDEBUG(1039, *YYCURSOR); - yyaccept = 20; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '-') goto yy766; - goto yy793; yy1040: YYDEBUG(1040, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'B') goto yy1041; - if (yych != 'b') goto yy56; + 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'R') goto yy914; - if (yych == 'r') goto yy914; - goto yy793; + if (yych <= 'R') goto yy915; + if (yych == 'r') goto yy915; + goto yy794; } -yy1042: - YYDEBUG(1042, *YYCURSOR); +yy1043: + YYDEBUG(1043, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { - if (yych == 'L') goto yy1046; - if (yych <= 'M') goto yy56; - goto yy1045; + if (yych == 'L') goto yy1047; + if (yych <= 'M') goto yy57; + goto yy1046; } else { if (yych <= 'l') { - if (yych <= 'k') goto yy56; - goto yy1046; + if (yych <= 'k') goto yy57; + goto yy1047; } else { - if (yych == 'n') goto yy1045; - goto yy56; + if (yych == 'n') goto yy1046; + goto yy57; } } -yy1043: - YYDEBUG(1043, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1044; - if (yych != 'n') goto yy56; 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 yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'U') goto yy921; - if (yych == 'u') goto yy921; - goto yy793; + if (yych <= 'U') goto yy922; + if (yych == 'u') goto yy922; + goto yy794; } -yy1045: - YYDEBUG(1045, *YYCURSOR); +yy1046: + YYDEBUG(1046, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'E') goto yy883; - if (yych == 'e') goto yy883; - goto yy793; + if (yych <= 'E') goto yy884; + if (yych == 'e') goto yy884; + goto yy794; } -yy1046: - YYDEBUG(1046, *YYCURSOR); +yy1047: + YYDEBUG(1047, *YYCURSOR); yyaccept = 20; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'X') { - if (yych == '-') goto yy766; - goto yy793; + if (yych == '-') goto yy767; + goto yy794; } else { - if (yych <= 'Y') goto yy883; - if (yych == 'y') goto yy883; - goto yy793; + if (yych <= 'Y') goto yy884; + if (yych == 'y') goto yy884; + goto yy794; } -yy1047: - YYDEBUG(1047, *YYCURSOR); +yy1048: + YYDEBUG(1048, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { if (yych <= '\t') { - if (yych <= 0x08) goto yy577; - goto yy730; + if (yych <= 0x08) goto yy578; + goto yy731; } else { - if (yych <= ',') goto yy577; - if (yych <= '-') goto yy731; - goto yy730; + if (yych <= ',') goto yy578; + if (yych <= '-') goto yy732; + goto yy731; } } else { if (yych <= 'U') { - if (yych <= '/') goto yy729; - if (yych <= 'T') goto yy577; - goto yy77; + if (yych <= '/') goto yy730; + if (yych <= 'T') goto yy578; + goto yy78; } else { - if (yych == 'u') goto yy77; - goto yy577; + if (yych == 'u') goto yy78; + goto yy578; } } -yy1048: - YYDEBUG(1048, *YYCURSOR); +yy1049: + YYDEBUG(1049, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'P') { - if (yych == 'C') goto yy128; - if (yych <= 'O') goto yy56; - goto yy585; + if (yych == 'C') goto yy129; + if (yych <= 'O') goto yy57; + goto yy586; } else { if (yych <= 'c') { - if (yych <= 'b') goto yy56; - goto yy128; + if (yych <= 'b') goto yy57; + goto yy129; } else { - if (yych == 'p') goto yy585; - goto yy56; + if (yych == 'p') goto yy586; + goto yy57; } } -yy1049: - YYDEBUG(1049, *YYCURSOR); +yy1050: + YYDEBUG(1050, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '9') { if (yych <= ',') { - if (yych == '\t') goto yy1051; - goto yy1053; + if (yych == '\t') goto yy1052; + goto yy1054; } else { - if (yych <= '-') goto yy1050; - if (yych <= '.') goto yy730; - if (yych <= '/') goto yy729; - goto yy740; + if (yych <= '-') goto yy1051; + if (yych <= '.') goto yy731; + if (yych <= '/') goto yy730; + goto yy741; } } else { if (yych <= 'q') { - if (yych == 'n') goto yy469; - goto yy1053; + if (yych == 'n') goto yy470; + goto yy1054; } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy1053; + if (yych <= 'r') goto yy471; + if (yych <= 's') goto yy464; + if (yych <= 't') goto yy468; + goto yy1054; } } -yy1050: - YYDEBUG(1050, *YYCURSOR); +yy1051: + YYDEBUG(1051, *YYCURSOR); yych = *++YYCURSOR; YYDEBUG(-1, yych); switch (yych) { - case '0': goto yy1054; - case '1': goto yy1055; + case '0': goto yy1055; + case '1': goto yy1056; case '2': case '3': case '4': @@ -15166,246 +15391,246 @@ yy1050: case '6': case '7': case '8': - case '9': goto yy617; + case '9': goto yy618; case 'A': - case 'a': goto yy621; + case 'a': goto yy622; case 'D': - case 'd': goto yy625; + case 'd': goto yy626; case 'F': - case 'f': goto yy619; + case 'f': goto yy620; case 'J': - case 'j': goto yy618; + case 'j': goto yy619; case 'M': - case 'm': goto yy620; + case 'm': goto yy621; case 'N': - case 'n': goto yy624; + case 'n': goto yy625; case 'O': - case 'o': goto yy623; + case 'o': goto yy624; case 'S': - case 's': goto yy622; - default: goto yy577; + case 's': goto yy623; + default: goto yy578; } -yy1051: - YYDEBUG(1051, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy1053; - if (yych <= '0') goto yy735; - if (yych <= '1') goto yy736; - if (yych <= '9') goto yy737; - goto yy1053; 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; -yy1053: - YYDEBUG(1053, *YYCURSOR); +yy1054: + YYDEBUG(1054, *YYCURSOR); YYDEBUG(-1, yych); switch (yych) { case '\t': - case ' ': goto yy1052; + case ' ': goto yy1053; case '-': - case '.': goto yy576; + case '.': goto yy577; case 'A': - case 'a': goto yy573; + case 'a': goto yy574; case 'D': - case 'd': goto yy465; + case 'd': goto yy466; case 'F': - case 'f': goto yy466; + case 'f': goto yy467; case 'H': - case 'h': goto yy63; - case 'I': goto yy474; + case 'h': goto yy64; + case 'I': goto yy475; case 'J': - case 'j': goto yy478; + case 'j': goto yy479; case 'M': - case 'm': goto yy464; + case 'm': goto yy465; case 'N': - case 'n': goto yy481; + case 'n': goto yy482; case 'O': - case 'o': goto yy480; + case 'o': goto yy481; case 'S': - case 's': goto yy462; + case 's': goto yy463; case 'T': - case 't': goto yy68; - case 'V': goto yy476; + case 't': goto yy69; + case 'V': goto yy477; case 'W': - case 'w': goto yy67; - case 'X': goto yy477; + case 'w': goto yy68; + case 'X': goto yy478; case 'Y': - case 'y': goto yy66; - default: goto yy56; - } -yy1054: - YYDEBUG(1054, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; - } else { - if (yych <= '/') goto yy56; - if (yych <= '9') goto yy1056; - goto yy56; + case 'y': goto yy67; + default: goto yy57; } yy1055: YYDEBUG(1055, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '.') { - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy654; - goto yy601; + if (yych <= ',') goto yy57; + if (yych <= '-') goto yy655; + goto yy602; } else { - if (yych <= '/') goto yy56; - if (yych >= '3') goto yy56; + if (yych <= '/') goto yy57; + if (yych <= '9') goto yy1057; + goto yy57; } yy1056: YYDEBUG(1056, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= ',') goto yy56; - if (yych <= '-') goto yy1057; - if (yych <= '.') goto yy601; - goto yy56; + 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 yy56; - if (yych >= '1') goto yy1059; + if (yych <= '/') goto yy57; + if (yych >= '1') goto yy1060; } else { - if (yych <= '3') goto yy1060; - if (yych <= '9') goto yy658; - goto yy56; + if (yych <= '3') goto yy1061; + if (yych <= '9') goto yy659; + goto yy57; } - YYDEBUG(1058, *YYCURSOR); + YYDEBUG(1059, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy1061; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy1062; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy1059: - YYDEBUG(1059, *YYCURSOR); +yy1060: + YYDEBUG(1060, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy656; - if (yych <= '9') goto yy1061; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '/') goto yy657; + if (yych <= '9') goto yy1062; + if (yych <= 'm') goto yy657; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy1060: - YYDEBUG(1060, *YYCURSOR); +yy1061: + YYDEBUG(1061, *YYCURSOR); yyaccept = 13; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { if (yych <= '1') { - if (yych <= '/') goto yy656; + if (yych <= '/') goto yy657; } else { - if (yych <= '9') goto yy603; - if (yych <= 'm') goto yy656; - goto yy660; + if (yych <= '9') goto yy604; + if (yych <= 'm') goto yy657; + goto yy661; } } else { if (yych <= 'r') { - if (yych <= 'q') goto yy656; - goto yy661; + if (yych <= 'q') goto yy657; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy656; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy657; } } -yy1061: - YYDEBUG(1061, *YYCURSOR); +yy1062: + YYDEBUG(1062, *YYCURSOR); yyaccept = 15; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'n') { - if (yych <= '/') goto yy763; - if (yych <= '9') goto yy604; - if (yych <= 'm') goto yy763; - goto yy660; + if (yych <= '/') goto yy764; + if (yych <= '9') goto yy605; + if (yych <= 'm') goto yy764; + goto yy661; } else { if (yych <= 'r') { - if (yych <= 'q') goto yy763; - goto yy661; + if (yych <= 'q') goto yy764; + goto yy662; } else { - if (yych <= 's') goto yy659; - if (yych <= 't') goto yy662; - goto yy763; + if (yych <= 's') goto yy660; + if (yych <= 't') goto yy663; + goto yy764; } } -yy1062: - YYDEBUG(1062, *YYCURSOR); +yy1063: + YYDEBUG(1063, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '9') { if (yych <= '-') { - if (yych == '\t') goto yy1051; - if (yych <= ',') goto yy1053; - goto yy1050; + if (yych == '\t') goto yy1052; + if (yych <= ',') goto yy1054; + goto yy1051; } else { - if (yych <= '.') goto yy1063; - if (yych <= '/') goto yy729; - if (yych <= '5') goto yy1065; - goto yy740; + if (yych <= '.') goto yy1064; + if (yych <= '/') goto yy730; + if (yych <= '5') goto yy1066; + goto yy741; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy1064; - if (yych == 'n') goto yy469; - goto yy1053; + if (yych <= ':') goto yy1065; + if (yych == 'n') goto yy470; + goto yy1054; } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy1053; + if (yych <= 'r') goto yy471; + if (yych <= 's') goto yy464; + if (yych <= 't') goto yy468; + goto yy1054; } } -yy1063: - YYDEBUG(1063, *YYCURSOR); +yy1064: + YYDEBUG(1064, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '1') { - if (yych <= '/') goto yy577; - if (yych <= '0') goto yy1087; - goto yy1088; + if (yych <= '/') goto yy578; + if (yych <= '0') goto yy1088; + goto yy1089; } else { - if (yych <= '5') goto yy1089; - if (yych <= '9') goto yy1090; - goto yy577; + if (yych <= '5') goto yy1090; + if (yych <= '9') goto yy1091; + goto yy578; } -yy1064: - YYDEBUG(1064, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1082; - if (yych <= '9') goto yy1083; - goto yy56; yy1065: YYDEBUG(1065, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '-') goto yy784; - if (yych <= '/') goto yy60; - if (yych >= ':') goto yy60; + 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); @@ -15437,27 +15662,27 @@ yy1065: case 's': case 't': case 'w': - case 'y': goto yy790; - case '-': goto yy787; - case '.': goto yy791; - case '/': goto yy788; - case '0': goto yy1068; - case '1': goto yy1069; - case '2': goto yy1070; - case '3': goto yy1071; + 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 yy1072; - case '6': goto yy1073; + case '5': goto yy1073; + case '6': goto yy1074; case '7': case '8': - case '9': goto yy54; - case ':': goto yy806; - case 'W': goto yy809; - default: goto yy1067; + case '9': goto yy55; + case ':': goto yy807; + case 'W': goto yy810; + default: goto yy1068; } -yy1067: - YYDEBUG(1067, *YYCURSOR); -#line 1176 "ext/date/lib/parse_date.re" +yy1068: + YYDEBUG(1068, *YYCURSOR); +#line 1177 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("gnunocolon"); TIMELIB_INIT; @@ -15479,99 +15704,99 @@ yy1067: TIMELIB_DEINIT; return TIMELIB_GNU_NOCOLON; } -#line 15483 "ext/date/lib/parse_date.c" -yy1068: - YYDEBUG(1068, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '0') goto yy1080; - if (yych <= '9') goto yy1081; - goto yy60; +#line 15706 "ext/date/lib/parse_date.c" yy1069: YYDEBUG(1069, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '2') goto yy1079; - if (yych <= '9') goto yy1078; - goto yy60; + 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 yy60; - if (yych <= '9') goto yy1078; - goto yy60; + 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 yy60; - if (yych <= '5') goto yy1076; - if (yych <= '6') goto yy1077; - if (yych <= '9') goto yy1074; - goto yy60; + if (yych <= '/') goto yy61; + if (yych <= '9') goto yy1079; + goto yy61; yy1072: YYDEBUG(1072, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy60; - if (yych <= '9') goto yy1074; - goto yy60; + 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 yy60; - if (yych <= '0') goto yy1074; - if (yych <= '9') goto yy54; - goto yy60; + 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] & 4) { - goto yy54; + if (yybm[0+yych] & 2) { + goto yy55; } if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych >= ' ') goto yy60; + if (yych == '\t') goto yy61; + if (yych >= ' ') goto yy61; } else { - if (yych == 'D') goto yy60; - if (yych >= 'F') goto yy60; + if (yych == 'D') goto yy61; + if (yych >= 'F') goto yy61; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy60; - if (yych >= 'M') goto yy60; + if (yych == 'H') goto yy61; + if (yych >= 'M') goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - if (yych >= 'W') goto yy60; + 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 yy60; - if (yych >= 'd') goto yy60; + if (yych == 'Y') goto yy61; + if (yych >= 'd') goto yy61; } else { - if (yych == 'f') goto yy60; - if (yych >= 'h') goto yy60; + if (yych == 'f') goto yy61; + if (yych >= 'h') goto yy61; } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych >= 's') goto yy60; + if (yych == 'm') goto yy61; + if (yych >= 's') goto yy61; } else { if (yych <= 'w') { - if (yych >= 'w') goto yy60; + if (yych >= 'w') goto yy61; } else { - if (yych == 'y') goto yy60; + if (yych == 'y') goto yy61; } } } } -yy1075: - YYDEBUG(1075, *YYCURSOR); -#line 1222 "ext/date/lib/parse_date.re" +yy1076: + YYDEBUG(1076, *YYCURSOR); +#line 1223 "ext/date/lib/parse_date.re" { int tz_not_found; DEBUG_OUTPUT("iso8601nocolon"); @@ -15590,905 +15815,905 @@ yy1075: TIMELIB_DEINIT; return TIMELIB_ISO_NOCOLON; } -#line 15594 "ext/date/lib/parse_date.c" -yy1076: - YYDEBUG(1076, *YYCURSOR); +#line 15817 "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 yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { - if (yych <= '/') goto yy1075; - if (yych <= '9') goto yy820; - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= '/') goto yy1076; + if (yych <= '9') goto yy821; + if (yych <= 'C') goto yy1076; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy1075; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy1076; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy1075; - goto yy60; + if (yych <= 'L') goto yy1076; + goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - goto yy1075; + if (yych <= 'R') goto yy1076; + if (yych <= 'T') goto yy61; + goto yy1076; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy1075; - if (yych <= 'Y') goto yy60; - goto yy1075; + if (yych == 'X') goto yy1076; + if (yych <= 'Y') goto yy61; + goto yy1076; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy1075; + if (yych <= 'd') goto yy61; + goto yy1076; } else { - if (yych == 'g') goto yy1075; - goto yy60; + if (yych == 'g') goto yy1076; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1077: - YYDEBUG(1077, *YYCURSOR); +yy1078: + YYDEBUG(1078, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '6') { - if (yych <= '/') goto yy1075; - goto yy820; + if (yych <= '/') goto yy1076; + goto yy821; } else { - if (yych <= '9') goto yy54; - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= '9') goto yy55; + if (yych <= 'C') goto yy1076; + goto yy61; } } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy1075; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy1076; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy1075; - goto yy60; + if (yych <= 'L') goto yy1076; + goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - goto yy1075; + if (yych <= 'R') goto yy1076; + if (yych <= 'T') goto yy61; + goto yy1076; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy1075; - if (yych <= 'Y') goto yy60; - goto yy1075; + if (yych == 'X') goto yy1076; + if (yych <= 'Y') goto yy61; + goto yy1076; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy1075; + if (yych <= 'd') goto yy61; + goto yy1076; } else { - if (yych == 'g') goto yy1075; - goto yy60; + if (yych == 'g') goto yy1076; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1078: - YYDEBUG(1078, *YYCURSOR); +yy1079: + YYDEBUG(1079, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'V') { if (yych <= 'D') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { - if (yych <= '/') goto yy1075; - if (yych <= '9') goto yy820; - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= '/') goto yy1076; + if (yych <= '9') goto yy821; + if (yych <= 'C') goto yy1076; + goto yy61; } } else { if (yych <= 'H') { - if (yych == 'F') goto yy60; - if (yych <= 'G') goto yy1075; - goto yy60; + if (yych == 'F') goto yy61; + if (yych <= 'G') goto yy1076; + goto yy61; } else { if (yych <= 'M') { - if (yych <= 'L') goto yy1075; - goto yy60; + if (yych <= 'L') goto yy1076; + goto yy61; } else { - if (yych <= 'R') goto yy1075; - if (yych <= 'T') goto yy60; - goto yy1075; + if (yych <= 'R') goto yy1076; + if (yych <= 'T') goto yy61; + goto yy1076; } } } } else { if (yych <= 'h') { if (yych <= 'c') { - if (yych == 'X') goto yy1075; - if (yych <= 'Y') goto yy60; - goto yy1075; + if (yych == 'X') goto yy1076; + if (yych <= 'Y') goto yy61; + goto yy1076; } else { if (yych <= 'e') { - if (yych <= 'd') goto yy60; - goto yy1075; + if (yych <= 'd') goto yy61; + goto yy1076; } else { - if (yych == 'g') goto yy1075; - goto yy60; + if (yych == 'g') goto yy1076; + goto yy61; } } } else { if (yych <= 't') { - if (yych == 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych == 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1079: - YYDEBUG(1079, *YYCURSOR); +yy1080: + YYDEBUG(1080, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '0') { - if (yych <= '/') goto yy1075; - goto yy844; + if (yych <= '/') goto yy1076; + goto yy845; } else { - if (yych <= '2') goto yy845; - if (yych <= '3') goto yy846; - goto yy820; + if (yych <= '2') goto yy846; + if (yych <= '3') goto yy847; + goto yy821; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= 'C') goto yy1076; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy1075; + if (yych == 'F') goto yy61; + goto yy1076; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy1075; + if (yych <= 'H') goto yy61; + goto yy1076; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy1075; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy1076; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy1075; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy1076; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy1075; - goto yy60; + if (yych <= 'c') goto yy1076; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy1075; + if (yych == 'f') goto yy61; + goto yy1076; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy1075; + if (yych <= 'h') goto yy61; + goto yy1076; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1080: - YYDEBUG(1080, *YYCURSOR); +yy1081: + YYDEBUG(1081, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '0') { - if (yych <= '/') goto yy1075; - goto yy876; + if (yych <= '/') goto yy1076; + goto yy877; } else { - if (yych <= '2') goto yy845; - if (yych <= '3') goto yy846; - goto yy820; + if (yych <= '2') goto yy846; + if (yych <= '3') goto yy847; + goto yy821; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= 'C') goto yy1076; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy1075; + if (yych == 'F') goto yy61; + goto yy1076; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy1075; + if (yych <= 'H') goto yy61; + goto yy1076; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy1075; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy1076; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy1075; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy1076; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy1075; - goto yy60; + if (yych <= 'c') goto yy1076; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy1075; + if (yych == 'f') goto yy61; + goto yy1076; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy1075; + if (yych <= 'h') goto yy61; + goto yy1076; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1081: - YYDEBUG(1081, *YYCURSOR); +yy1082: + YYDEBUG(1082, *YYCURSOR); yyaccept = 25; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'T') { if (yych <= '9') { if (yych <= ' ') { - if (yych == '\t') goto yy60; - if (yych <= 0x1F) goto yy1075; - goto yy60; + if (yych == '\t') goto yy61; + if (yych <= 0x1F) goto yy1076; + goto yy61; } else { if (yych <= '0') { - if (yych <= '/') goto yy1075; - goto yy844; + if (yych <= '/') goto yy1076; + goto yy845; } else { - if (yych <= '2') goto yy845; - if (yych <= '3') goto yy846; - goto yy820; + if (yych <= '2') goto yy846; + if (yych <= '3') goto yy847; + goto yy821; } } } else { if (yych <= 'G') { if (yych <= 'D') { - if (yych <= 'C') goto yy1075; - goto yy60; + if (yych <= 'C') goto yy1076; + goto yy61; } else { - if (yych == 'F') goto yy60; - goto yy1075; + if (yych == 'F') goto yy61; + goto yy1076; } } else { if (yych <= 'L') { - if (yych <= 'H') goto yy60; - goto yy1075; + if (yych <= 'H') goto yy61; + goto yy1076; } else { - if (yych <= 'M') goto yy60; - if (yych <= 'R') goto yy1075; - goto yy60; + if (yych <= 'M') goto yy61; + if (yych <= 'R') goto yy1076; + goto yy61; } } } } else { if (yych <= 'g') { if (yych <= 'Y') { - if (yych == 'W') goto yy60; - if (yych <= 'X') goto yy1075; - goto yy60; + if (yych == 'W') goto yy61; + if (yych <= 'X') goto yy1076; + goto yy61; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy1075; - goto yy60; + if (yych <= 'c') goto yy1076; + goto yy61; } else { - if (yych == 'f') goto yy60; - goto yy1075; + if (yych == 'f') goto yy61; + goto yy1076; } } } else { if (yych <= 't') { if (yych <= 'l') { - if (yych <= 'h') goto yy60; - goto yy1075; + if (yych <= 'h') goto yy61; + goto yy1076; } else { - if (yych <= 'm') goto yy60; - if (yych <= 'r') goto yy1075; - goto yy60; + if (yych <= 'm') goto yy61; + if (yych <= 'r') goto yy1076; + goto yy61; } } else { if (yych <= 'w') { - if (yych <= 'v') goto yy1075; - goto yy60; + if (yych <= 'v') goto yy1076; + goto yy61; } else { - if (yych == 'y') goto yy60; - goto yy1075; + if (yych == 'y') goto yy61; + goto yy1076; } } } } -yy1082: - YYDEBUG(1082, *YYCURSOR); +yy1083: + YYDEBUG(1083, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { - if (yych == '.') goto yy1084; - goto yy490; + if (yych == '.') goto yy1085; + goto yy491; } else { - if (yych <= '9') goto yy1083; - if (yych <= ':') goto yy1084; - goto yy490; + if (yych <= '9') goto yy1084; + if (yych <= ':') goto yy1085; + goto yy491; } -yy1083: - YYDEBUG(1083, *YYCURSOR); - yyaccept = 11; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy1084; - if (yych != ':') goto yy490; yy1084: YYDEBUG(1084, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1085; - if (yych <= '6') goto yy1086; - if (yych <= '9') goto yy495; - goto yy56; -yy1085: - YYDEBUG(1085, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy495; - goto yy490; + 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 yy496; - if (yych == '0') goto yy495; - goto yy490; + 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 <= '.') { - if (yych <= ',') goto yy490; - if (yych <= '-') goto yy601; - goto yy1091; - } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy1090; - if (yych <= ':') goto yy1084; - goto yy490; - } + 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 yy490; - if (yych <= '-') goto yy601; - if (yych <= '.') goto yy1091; - goto yy490; + if (yych <= '.') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy1092; } else { - if (yych <= '2') goto yy1090; - if (yych <= '9') goto yy1083; - if (yych <= ':') goto yy1084; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; - goto yy1091; + if (yych <= '/') { + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + if (yych <= '.') goto yy1092; + goto yy491; } else { - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy1083; - if (yych <= ':') goto yy1084; - goto yy490; + 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 yy490; - if (yych <= '-') goto yy601; + if (yych <= ',') goto yy491; + if (yych <= '-') goto yy602; + goto yy1092; } else { - if (yych == ':') goto yy1084; - goto yy490; + if (yych <= '/') goto yy491; + if (yych <= '9') goto yy1084; + if (yych <= ':') goto yy1085; + goto yy491; } yy1091: YYDEBUG(1091, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '5') goto yy1092; - if (yych <= '6') goto yy1093; - if (yych <= '9') goto yy609; - goto yy56; -yy1092: - YYDEBUG(1092, *YYCURSOR); yyaccept = 11; yych = *(YYMARKER = ++YYCURSOR); - if (yych == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy1094; - goto yy490; + 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 <= '/') { - if (yych == '.') goto yy496; - goto yy490; - } else { - if (yych <= '0') goto yy1094; - if (yych <= '9') goto yy610; - goto yy490; - } + 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 == '.') goto yy496; - if (yych <= '/') goto yy490; - if (yych <= '9') goto yy604; - goto yy490; -yy1095: - YYDEBUG(1095, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '9') { - if (yych <= '-') { - if (yych == '\t') goto yy459; - if (yych <= ',') goto yy461; - goto yy1050; - } else { - if (yych <= '.') goto yy473; - if (yych <= '/') goto yy471; - if (yych <= '5') goto yy1065; - goto yy740; - } + if (yych <= '/') { + if (yych == '.') goto yy497; + goto yy491; } else { - if (yych <= 'q') { - if (yych <= ':') goto yy482; - if (yych == 'n') goto yy469; - goto yy461; - } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy461; - } + 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 yy1051; - if (yych <= ',') goto yy1053; - goto yy1050; + if (yych == '\t') goto yy460; + if (yych <= ',') goto yy462; + goto yy1051; } else { - if (yych <= '.') goto yy1063; - if (yych <= '/') goto yy471; - if (yych <= '5') goto yy1065; - goto yy740; + if (yych <= '.') goto yy474; + if (yych <= '/') goto yy472; + if (yych <= '5') goto yy1066; + goto yy741; } } else { if (yych <= 'q') { - if (yych <= ':') goto yy1064; - if (yych == 'n') goto yy469; - goto yy1053; + if (yych <= ':') goto yy483; + if (yych == 'n') goto yy470; + goto yy462; } else { - if (yych <= 'r') goto yy470; - if (yych <= 's') goto yy463; - if (yych <= 't') goto yy467; - goto yy1053; + 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 <= 'E') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '9') { + if (yych <= '-') { + if (yych == '\t') goto yy1052; + if (yych <= ',') goto yy1054; + goto yy1051; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '.') goto yy1064; + if (yych <= '/') goto yy472; + if (yych <= '5') goto yy1066; + goto yy741; } } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'q') { + if (yych <= ':') goto yy1065; + if (yych == 'n') goto yy470; + goto yy1054; } else { - if (yych <= 'e') goto yy1098; - if (yych <= 'z') goto yy141; - goto yy3; + 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 <= 'V') { + if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; } } else { - if (yych <= 'u') { + if (yych <= 'd') { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy142; } else { - if (yych <= 'v') goto yy1099; + if (yych <= 'e') goto yy1099; if (yych <= 'z') goto yy142; - goto yy3; + goto yy4; } } yy1099: YYDEBUG(1099, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'I') { + if (yych <= 'V') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'U') goto yy143; } } else { - if (yych <= 'h') { + if (yych <= 'u') { if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy143; } else { - if (yych <= 'i') goto yy1100; + if (yych <= 'v') goto yy1100; if (yych <= 'z') goto yy143; - goto yy3; + goto yy4; } } yy1100: YYDEBUG(1100, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'O') { + if (yych <= 'I') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'H') goto yy144; } } else { - if (yych <= 'n') { + if (yych <= 'h') { if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy144; } else { - if (yych <= 'o') goto yy1101; + if (yych <= 'i') goto yy1101; if (yych <= 'z') goto yy144; - goto yy3; + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'U') goto yy1102; - if (yych != 'u') goto yy3; + if (yych <= 'U') goto yy1103; + if (yych != 'u') goto yy4; } -yy1102: - YYDEBUG(1102, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1103; - if (yych != 's') goto yy56; yy1103: YYDEBUG(1103, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\t') goto yy1104; - if (yych != ' ') goto yy56; + 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; -yy1105: - YYDEBUG(1105, *YYCURSOR); +yy1106: + YYDEBUG(1106, *YYCURSOR); if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy1104; - if (yych <= 0x1F) goto yy56; - goto yy1104; + if (yych == '\t') goto yy1105; + if (yych <= 0x1F) goto yy57; + goto yy1105; } else { - if (yych == 'D') goto yy1109; - if (yych <= 'E') goto yy56; - goto yy1110; + if (yych == 'D') goto yy1110; + if (yych <= 'E') goto yy57; + goto yy1111; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy1108; - if (yych <= 'L') goto yy56; - goto yy1107; + if (yych == 'H') goto yy1109; + if (yych <= 'L') goto yy57; + goto yy1108; } else { if (yych <= 'S') { - if (yych <= 'R') goto yy56; + if (yych <= 'R') goto yy57; } else { - if (yych <= 'T') goto yy1113; - if (yych <= 'V') goto yy56; - goto yy1112; + if (yych <= 'T') goto yy1114; + if (yych <= 'V') goto yy57; + goto yy1113; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy1111; - if (yych <= 'c') goto yy56; - goto yy1109; + if (yych == 'Y') goto yy1112; + if (yych <= 'c') goto yy57; + goto yy1110; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy56; - goto yy1110; + if (yych <= 'e') goto yy57; + goto yy1111; } else { - if (yych == 'h') goto yy1108; - goto yy56; + if (yych == 'h') goto yy1109; + goto yy57; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy1107; - if (yych <= 'r') goto yy56; - if (yych >= 't') goto yy1113; + if (yych <= 'm') goto yy1108; + if (yych <= 'r') goto yy57; + if (yych >= 't') goto yy1114; } else { if (yych <= 'w') { - if (yych <= 'v') goto yy56; - goto yy1112; + if (yych <= 'v') goto yy57; + goto yy1113; } else { - if (yych == 'y') goto yy1111; - goto yy56; + if (yych == 'y') goto yy1112; + goto yy57; } } } } -yy1106: - YYDEBUG(1106, *YYCURSOR); +yy1107: + YYDEBUG(1107, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= 'D') { - if (yych == 'A') goto yy1178; - goto yy56; + if (yych == 'A') goto yy1179; + goto yy57; } else { - if (yych <= 'E') goto yy1179; - if (yych <= 'T') goto yy56; - goto yy1177; + if (yych <= 'E') goto yy1180; + if (yych <= 'T') goto yy57; + goto yy1178; } } else { if (yych <= 'd') { - if (yych == 'a') goto yy1178; - goto yy56; + if (yych == 'a') goto yy1179; + goto yy57; } else { - if (yych <= 'e') goto yy1179; - if (yych == 'u') goto yy1177; - goto yy56; + if (yych <= 'e') goto yy1180; + if (yych == 'u') goto yy1178; + goto yy57; } } -yy1107: - YYDEBUG(1107, *YYCURSOR); +yy1108: + YYDEBUG(1108, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { - if (yych == 'I') goto yy1169; - if (yych <= 'N') goto yy56; - goto yy1168; + if (yych == 'I') goto yy1170; + if (yych <= 'N') goto yy57; + goto yy1169; } else { if (yych <= 'i') { - if (yych <= 'h') goto yy56; - goto yy1169; + if (yych <= 'h') goto yy57; + goto yy1170; } else { - if (yych == 'o') goto yy1168; - goto yy56; + if (yych == 'o') goto yy1169; + goto yy57; } } -yy1108: - YYDEBUG(1108, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1166; - if (yych == 'o') goto yy1166; - goto yy56; yy1109: YYDEBUG(1109, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1165; - if (yych == 'a') goto yy1165; - goto yy56; + 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 yy1150; - if (yych <= 'Q') goto yy56; - goto yy1149; + if (yych == 'O') goto yy1151; + if (yych <= 'Q') goto yy57; + goto yy1150; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy56; - goto yy1150; + if (yych <= 'n') goto yy57; + goto yy1151; } else { - if (yych == 'r') goto yy1149; - goto yy56; + if (yych == 'r') goto yy1150; + goto yy57; } } -yy1111: - YYDEBUG(1111, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1146; - if (yych == 'e') goto yy1146; - goto yy56; yy1112: YYDEBUG(1112, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1132; - if (yych == 'e') goto yy1132; - goto yy56; + 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 yy1114; - if (yych <= 'T') goto yy56; - goto yy1115; + if (yych == 'H') goto yy1115; + if (yych <= 'T') goto yy57; + goto yy1116; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; + if (yych <= 'g') goto yy57; } else { - if (yych == 'u') goto yy1115; - goto yy56; + if (yych == 'u') goto yy1116; + goto yy57; } } -yy1114: - YYDEBUG(1114, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'U') goto yy1127; - if (yych == 'u') goto yy1127; - goto yy56; yy1115: YYDEBUG(1115, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1116; - if (yych != 'e') goto yy56; + 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 yy1118; - if (yych >= ' ') goto yy1118; + if (yych == '\t') goto yy1119; + if (yych >= ' ') goto yy1119; } else { if (yych <= 'S') { - if (yych >= 'S') goto yy1120; + if (yych >= 'S') goto yy1121; } else { - if (yych == 's') goto yy1120; + if (yych == 's') goto yy1121; } } -yy1117: - YYDEBUG(1117, *YYCURSOR); -#line 1606 "ext/date/lib/parse_date.re" +yy1118: + YYDEBUG(1118, *YYCURSOR); +#line 1607 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -16504,58 +16729,58 @@ yy1117: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16508 "ext/date/lib/parse_date.c" -yy1118: - YYDEBUG(1118, *YYCURSOR); +#line 16731 "ext/date/lib/parse_date.c" +yy1119: + YYDEBUG(1119, *YYCURSOR); ++YYCURSOR; if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2); yych = *YYCURSOR; - YYDEBUG(1119, *YYCURSOR); + YYDEBUG(1120, *YYCURSOR); if (yych <= ' ') { - if (yych == '\t') goto yy1118; - if (yych <= 0x1F) goto yy56; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy57; + goto yy1119; } else { if (yych <= 'O') { - if (yych <= 'N') goto yy56; - goto yy1124; + if (yych <= 'N') goto yy57; + goto yy1125; } else { - if (yych == 'o') goto yy1124; - goto yy56; + if (yych == 'o') goto yy1125; + goto yy57; } } -yy1120: - YYDEBUG(1120, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1121; - if (yych != 'd') goto yy56; yy1121: YYDEBUG(1121, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1122; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1122; + if (yych != 'd') goto yy57; yy1122: YYDEBUG(1122, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy1123; + if (yych != 'a') goto yy57; yy1123: YYDEBUG(1123, *YYCURSOR); - yyaccept = 26; - yych = *(YYMARKER = ++YYCURSOR); - if (yych == '\t') goto yy1118; - if (yych == ' ') goto yy1118; - goto yy1117; + yych = *++YYCURSOR; + if (yych == 'Y') goto yy1124; + if (yych != 'y') goto yy57; yy1124: YYDEBUG(1124, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'F') goto yy1125; - if (yych != 'f') goto yy56; + yyaccept = 26; + yych = *(YYMARKER = ++YYCURSOR); + if (yych == '\t') goto yy1119; + if (yych == ' ') goto yy1119; + goto yy1118; yy1125: YYDEBUG(1125, *YYCURSOR); - ++YYCURSOR; + yych = *++YYCURSOR; + if (yych == 'F') goto yy1126; + if (yych != 'f') goto yy57; +yy1126: YYDEBUG(1126, *YYCURSOR); -#line 1091 "ext/date/lib/parse_date.re" + ++YYCURSOR; + YYDEBUG(1127, *YYCURSOR); +#line 1092 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -16576,115 +16801,115 @@ yy1125: TIMELIB_DEINIT; return TIMELIB_WEEK_DAY_OF_MONTH; } -#line 16580 "ext/date/lib/parse_date.c" -yy1127: - YYDEBUG(1127, *YYCURSOR); +#line 16803 "ext/date/lib/parse_date.c" +yy1128: + YYDEBUG(1128, *YYCURSOR); yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); if (yych <= ' ') { - if (yych == '\t') goto yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'R') { - if (yych <= 'Q') goto yy1117; + if (yych <= 'Q') goto yy1118; } else { - if (yych != 'r') goto yy1117; + if (yych != 'r') goto yy1118; } } - YYDEBUG(1128, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1129; - if (yych != 's') goto yy56; -yy1129: YYDEBUG(1129, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1130; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy1130; + if (yych != 's') goto yy57; yy1130: YYDEBUG(1130, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1131; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1131; + if (yych != 'd') goto yy57; yy1131: YYDEBUG(1131, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + 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 yy56; - if (yych <= 'D') goto yy1134; + if (yych <= 'C') goto yy57; + if (yych <= 'D') goto yy1135; } else { - if (yych <= 'c') goto yy56; - if (yych <= 'd') goto yy1134; - if (yych >= 'f') goto yy56; + if (yych <= 'c') goto yy57; + if (yych <= 'd') goto yy1135; + if (yych >= 'f') goto yy57; } - YYDEBUG(1133, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy1140; - if (yych == 'k') goto yy1140; - goto yy56; -yy1134: 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'N') { - if (yych <= 'M') goto yy1117; + if (yych <= 'M') goto yy1118; } else { - if (yych != 'n') goto yy1117; + if (yych != 'n') goto yy1118; } } - YYDEBUG(1135, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1136; - if (yych != 'e') goto yy56; -yy1136: YYDEBUG(1136, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy1137; - if (yych != 's') goto yy56; + if (yych == 'E') goto yy1137; + if (yych != 'e') goto yy57; yy1137: YYDEBUG(1137, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1138; - if (yych != 'd') goto yy56; + if (yych == 'S') goto yy1138; + if (yych != 's') goto yy57; yy1138: YYDEBUG(1138, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1139; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1139; + if (yych != 'd') goto yy57; yy1139: YYDEBUG(1139, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + 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 yy1143; - if (yych >= 'S') goto yy1142; + if (yych == 'D') goto yy1144; + if (yych >= 'S') goto yy1143; } else { if (yych <= 'd') { - if (yych >= 'd') goto yy1143; + if (yych >= 'd') goto yy1144; } else { - if (yych == 's') goto yy1142; + if (yych == 's') goto yy1143; } } -yy1141: - YYDEBUG(1141, *YYCURSOR); -#line 1582 "ext/date/lib/parse_date.re" +yy1142: + YYDEBUG(1142, *YYCURSOR); +#line 1583 "ext/date/lib/parse_date.re" { timelib_sll i; int behavior = 0; @@ -16707,1459 +16932,1536 @@ yy1141: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 16711 "ext/date/lib/parse_date.c" -yy1142: - YYDEBUG(1142, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1117; +#line 16934 "ext/date/lib/parse_date.c" yy1143: YYDEBUG(1143, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1144; - if (yych != 'a') goto yy56; + goto yy1118; yy1144: YYDEBUG(1144, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1145; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy1145; + if (yych != 'a') goto yy57; yy1145: YYDEBUG(1145, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy1142; - if (yych == 's') goto yy1142; - goto yy1117; + if (yych == 'Y') goto yy1146; + if (yych != 'y') goto yy57; yy1146: YYDEBUG(1146, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1147; - if (yych != 'a') goto yy56; + if (yych == 'S') goto yy1143; + if (yych == 's') goto yy1143; + goto yy1118; yy1147: YYDEBUG(1147, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1148; - if (yych != 'r') goto yy56; + if (yych == 'A') goto yy1148; + if (yych != 'a') goto yy57; yy1148: YYDEBUG(1148, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'S') goto yy1142; - if (yych == 's') goto yy1142; - goto yy1117; + if (yych == 'R') goto yy1149; + if (yych != 'r') goto yy57; yy1149: YYDEBUG(1149, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy1162; - if (yych == 'i') goto yy1162; - goto yy56; + if (yych == 'S') goto yy1143; + if (yych == 's') goto yy1143; + goto yy1118; yy1150: YYDEBUG(1150, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1151; - if (yych != 'r') goto yy56; + if (yych == 'I') goto yy1163; + if (yych == 'i') goto yy1163; + goto yy57; yy1151: YYDEBUG(1151, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1152; - if (yych != 't') goto yy56; + 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 yy1154; - if (yych <= 'M') goto yy56; + if (yych == 'H') goto yy1155; + if (yych <= 'M') goto yy57; } else { if (yych <= 'h') { - if (yych <= 'g') goto yy56; - goto yy1154; + if (yych <= 'g') goto yy57; + goto yy1155; } else { - if (yych != 'n') goto yy56; + if (yych != 'n') goto yy57; } } - YYDEBUG(1153, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'I') goto yy1159; - if (yych == 'i') goto yy1159; - goto yy56; -yy1154: YYDEBUG(1154, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1155; - if (yych != 'n') goto yy56; + if (yych == 'I') goto yy1160; + if (yych == 'i') goto yy1160; + goto yy57; yy1155: YYDEBUG(1155, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'I') goto yy1156; - if (yych != 'i') goto yy56; + if (yych == 'N') goto yy1156; + if (yych != 'n') goto yy57; yy1156: YYDEBUG(1156, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy1157; - if (yych != 'g') goto yy56; + if (yych == 'I') goto yy1157; + if (yych != 'i') goto yy57; yy1157: YYDEBUG(1157, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy1158; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy1158; + if (yych != 'g') goto yy57; yy1158: YYDEBUG(1158, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1148; - if (yych == 't') goto yy1148; - goto yy56; + if (yych == 'H') goto yy1159; + if (yych != 'h') goto yy57; yy1159: YYDEBUG(1159, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'G') goto yy1160; - if (yych != 'g') goto yy56; + if (yych == 'T') goto yy1149; + if (yych == 't') goto yy1149; + goto yy57; yy1160: YYDEBUG(1160, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy1161; - if (yych != 'h') goto yy56; + if (yych == 'G') goto yy1161; + if (yych != 'g') goto yy57; yy1161: YYDEBUG(1161, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1148; - if (yych == 't') goto yy1148; - goto yy56; + 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'D') { - if (yych <= 'C') goto yy1117; + if (yych <= 'C') goto yy1118; } else { - if (yych != 'd') goto yy1117; + if (yych != 'd') goto yy1118; } } - YYDEBUG(1163, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1164; - if (yych != 'a') goto yy56; -yy1164: YYDEBUG(1164, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + if (yych == 'A') goto yy1165; + if (yych != 'a') goto yy57; yy1165: YYDEBUG(1165, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1148; - if (yych == 'y') goto yy1148; - goto yy56; + if (yych == 'Y') goto yy1124; + if (yych == 'y') goto yy1124; + goto yy57; yy1166: YYDEBUG(1166, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'U') goto yy1167; - if (yych != 'u') goto yy56; + if (yych == 'Y') goto yy1149; + if (yych == 'y') goto yy1149; + goto yy57; yy1167: YYDEBUG(1167, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy1148; - if (yych == 'r') goto yy1148; - goto yy56; + if (yych == 'U') goto yy1168; + if (yych != 'u') goto yy57; yy1168: YYDEBUG(1168, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1173; - if (yych == 'n') goto yy1173; - goto yy56; + if (yych == 'R') goto yy1149; + if (yych == 'r') goto yy1149; + goto yy57; yy1169: YYDEBUG(1169, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1170; - if (yych != 'n') goto yy56; + 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 yy1142; - if (yych <= 'T') goto yy1117; + if (yych == 'S') goto yy1143; + if (yych <= 'T') goto yy1118; } else { if (yych <= 's') { - if (yych <= 'r') goto yy1117; - goto yy1142; + if (yych <= 'r') goto yy1118; + goto yy1143; } else { - if (yych != 'u') goto yy1117; + if (yych != 'u') goto yy1118; } } - YYDEBUG(1171, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'T') goto yy1172; - if (yych != 't') goto yy56; -yy1172: YYDEBUG(1172, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1148; - if (yych == 'e') goto yy1148; - goto yy56; + 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 yy1118; - goto yy1117; + if (yych == '\t') goto yy1119; + goto yy1118; } else { - if (yych <= ' ') goto yy1118; - if (yych <= 'C') goto yy1117; + if (yych <= ' ') goto yy1119; + if (yych <= 'C') goto yy1118; } } else { if (yych <= 'c') { - if (yych == 'T') goto yy1175; - goto yy1117; + if (yych == 'T') goto yy1176; + goto yy1118; } else { - if (yych <= 'd') goto yy1174; - if (yych == 't') goto yy1175; - goto yy1117; + if (yych <= 'd') goto yy1175; + if (yych == 't') goto yy1176; + goto yy1118; } } -yy1174: - YYDEBUG(1174, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1176; - if (yych == 'a') goto yy1176; - goto yy56; yy1175: YYDEBUG(1175, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'H') goto yy1148; - if (yych == 'h') goto yy1148; - goto yy56; + if (yych == 'A') goto yy1177; + if (yych == 'a') goto yy1177; + goto yy57; yy1176: YYDEBUG(1176, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + if (yych == 'H') goto yy1149; + if (yych == 'h') goto yy1149; + goto yy57; yy1177: YYDEBUG(1177, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'N') goto yy1188; - if (yych == 'n') goto yy1188; - goto yy56; + if (yych == 'Y') goto yy1124; + if (yych == 'y') goto yy1124; + goto yy57; yy1178: YYDEBUG(1178, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'T') goto yy1183; - if (yych == 't') goto yy1183; - goto yy56; + if (yych == 'N') goto yy1189; + if (yych == 'n') goto yy1189; + goto yy57; yy1179: YYDEBUG(1179, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'C') goto yy1180; - if (yych != 'c') goto yy56; + 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 yy1181; - if (yych <= 'R') goto yy1117; - goto yy1142; + if (yych == 'O') goto yy1182; + if (yych <= 'R') goto yy1118; + goto yy1143; } else { if (yych <= 'o') { - if (yych <= 'n') goto yy1117; + if (yych <= 'n') goto yy1118; } else { - if (yych == 's') goto yy1142; - goto yy1117; + if (yych == 's') goto yy1143; + goto yy1118; } } -yy1181: - YYDEBUG(1181, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'N') goto yy1182; - if (yych != 'n') goto yy56; yy1182: YYDEBUG(1182, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1148; - if (yych == 'd') goto yy1148; - goto yy56; + 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'U') { - if (yych <= 'T') goto yy1117; + if (yych <= 'T') goto yy1118; } else { - if (yych != 'u') goto yy1117; + if (yych != 'u') goto yy1118; } } - YYDEBUG(1184, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'R') goto yy1185; - if (yych != 'r') goto yy56; -yy1185: YYDEBUG(1185, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'D') goto yy1186; - if (yych != 'd') goto yy56; + if (yych == 'R') goto yy1186; + if (yych != 'r') goto yy57; yy1186: YYDEBUG(1186, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1187; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1187; + if (yych != 'd') goto yy57; yy1187: YYDEBUG(1187, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + 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 yy1118; - if (yych <= 0x1F) goto yy1117; - goto yy1118; + if (yych == '\t') goto yy1119; + if (yych <= 0x1F) goto yy1118; + goto yy1119; } else { if (yych <= 'D') { - if (yych <= 'C') goto yy1117; + if (yych <= 'C') goto yy1118; } else { - if (yych != 'd') goto yy1117; + if (yych != 'd') goto yy1118; } } - YYDEBUG(1189, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'A') goto yy1190; - if (yych != 'a') goto yy56; -yy1190: YYDEBUG(1190, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1123; - if (yych == 'y') goto yy1123; - goto yy56; + if (yych == 'A') goto yy1191; + if (yych != 'a') goto yy57; yy1191: YYDEBUG(1191, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1098; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'e') goto yy1192; - if (yych <= 'z') goto yy146; - goto yy3; - } - } + 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 <= 'V') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; - goto yy1099; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'E') goto yy1099; if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'v') goto yy1193; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'I') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'U') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; - goto yy1100; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'V') goto yy1100; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'i') goto yy1194; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'H') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy144; - goto yy1101; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'I') goto yy1101; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy1195; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= 'T') goto yy3; - goto yy1102; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'O') goto yy1102; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'u') goto yy1196; - if (yych <= 'z') goto yy154; - goto yy3; + 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); - yych = *++YYCURSOR; - if (yych == 'S') goto yy1103; - if (yych != 's') goto yy155; - YYDEBUG(1197, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy1104; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'T') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == ' ') goto yy1104; - goto yy56; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '_') { - if (yych <= '/') goto yy147; - if (yych <= '^') goto yy56; - goto yy147; + if (yych <= '`') { + if (yych <= 'U') goto yy1103; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych <= '`') goto yy56; + if (yych == 'u') goto yy1197; if (yych <= 'z') goto yy154; - goto yy56; + goto yy4; } } -yy1198: +yy1197: + YYDEBUG(1197, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == 'S') goto yy1104; + if (yych != 's') goto yy155; YYDEBUG(1198, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'G') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= ',') { + if (yych <= '\t') { + if (yych <= 0x08) goto yy57; + goto yy1105; } else { - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy1212; + if (yych == ' ') goto yy1105; + goto yy57; } } else { - if (yych <= 'f') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= '/') { + if (yych == '.') goto yy57; + goto yy148; } else { - if (yych <= 'g') goto yy1212; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych == '_') goto yy148; + goto yy57; } } yy1199: YYDEBUG(1199, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'E') { + if (yych <= 'G') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'F') goto yy142; + goto yy1213; } } else { - if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'f') { + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'e') goto yy1200; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'g') goto yy1213; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1200: YYDEBUG(1200, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'V') { + if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; } } else { - if (yych <= 'u') { + if (yych <= 'd') { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy142; } else { - if (yych <= 'v') goto yy1201; + if (yych <= 'e') goto yy1201; if (yych <= 'z') goto yy142; - goto yy3; + goto yy4; } } yy1201: YYDEBUG(1201, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'E') { + if (yych <= 'V') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'U') goto yy143; } } else { - if (yych <= 'd') { + if (yych <= 'u') { if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy143; } else { - if (yych <= 'e') goto yy1202; + if (yych <= 'v') goto yy1202; if (yych <= 'z') goto yy143; - goto yy3; + goto yy4; } } yy1202: YYDEBUG(1202, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= 'N') { + if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy144; } } else { - if (yych <= 'm') { + if (yych <= 'd') { if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy144; } else { - if (yych <= 'n') goto yy1203; + if (yych <= 'e') goto yy1203; if (yych <= 'z') goto yy144; - goto yy3; + 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 yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'T') goto yy1204; - if (yych != 't') goto yy3; + if (yych <= 'T') goto yy1205; + if (yych != 't') goto yy4; } -yy1204: - YYDEBUG(1204, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1205; - if (yych != 'h') goto yy56; yy1205: YYDEBUG(1205, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '\t') goto yy1206; - if (yych != ' ') goto yy56; + 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; -yy1207: - YYDEBUG(1207, *YYCURSOR); +yy1208: + YYDEBUG(1208, *YYCURSOR); if (yych <= 'W') { if (yych <= 'F') { if (yych <= ' ') { - if (yych == '\t') goto yy1206; - if (yych <= 0x1F) goto yy56; - goto yy1206; + if (yych == '\t') goto yy1207; + if (yych <= 0x1F) goto yy57; + goto yy1207; } else { - if (yych == 'D') goto yy1109; - if (yych <= 'E') goto yy56; - goto yy1110; + if (yych == 'D') goto yy1110; + if (yych <= 'E') goto yy57; + goto yy1111; } } else { if (yych <= 'M') { - if (yych == 'H') goto yy1108; - if (yych <= 'L') goto yy56; - goto yy1107; + if (yych == 'H') goto yy1109; + if (yych <= 'L') goto yy57; + goto yy1108; } else { if (yych <= 'S') { - if (yych <= 'R') goto yy56; - goto yy1106; + if (yych <= 'R') goto yy57; + goto yy1107; } else { - if (yych <= 'T') goto yy1113; - if (yych <= 'V') goto yy56; + if (yych <= 'T') goto yy1114; + if (yych <= 'V') goto yy57; } } } } else { if (yych <= 'l') { if (yych <= 'd') { - if (yych == 'Y') goto yy1111; - if (yych <= 'c') goto yy56; - goto yy1109; + if (yych == 'Y') goto yy1112; + if (yych <= 'c') goto yy57; + goto yy1110; } else { if (yych <= 'f') { - if (yych <= 'e') goto yy56; - goto yy1110; + if (yych <= 'e') goto yy57; + goto yy1111; } else { - if (yych == 'h') goto yy1108; - goto yy56; + if (yych == 'h') goto yy1109; + goto yy57; } } } else { if (yych <= 't') { - if (yych <= 'm') goto yy1107; - if (yych <= 'r') goto yy56; - if (yych <= 's') goto yy1106; - goto yy1113; + 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 yy56; + if (yych <= 'v') goto yy57; } else { - if (yych == 'y') goto yy1111; - goto yy56; + if (yych == 'y') goto yy1112; + goto yy57; } } } } - YYDEBUG(1208, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1209; - if (yych != 'e') goto yy56; -yy1209: 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 yy56; - if (yych <= 'D') goto yy1134; + if (yych <= 'C') goto yy57; + if (yych <= 'D') goto yy1135; } else { - if (yych <= 'c') goto yy56; - if (yych <= 'd') goto yy1134; - if (yych >= 'f') goto yy56; + if (yych <= 'c') goto yy57; + if (yych <= 'd') goto yy1135; + if (yych >= 'f') goto yy57; } - YYDEBUG(1210, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'K') goto yy1211; - if (yych != 'k') goto yy56; -yy1211: 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 yy1143; - if (yych <= 'R') goto yy56; - goto yy1142; + if (yych == 'D') goto yy1144; + if (yych <= 'R') goto yy57; + goto yy1143; } else { if (yych <= 'd') { - if (yych <= 'c') goto yy56; - goto yy1143; + if (yych <= 'c') goto yy57; + goto yy1144; } else { - if (yych == 's') goto yy1142; - goto yy56; + if (yych == 's') goto yy1143; + goto yy57; } } -yy1212: - YYDEBUG(1212, *YYCURSOR); +yy1213: + YYDEBUG(1213, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy143; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 'h') goto yy1213; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'h') goto yy1214; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1213: - YYDEBUG(1213, *YYCURSOR); +yy1214: + YYDEBUG(1214, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 't') goto yy1214; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 't') goto yy1215; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1214: - YYDEBUG(1214, *YYCURSOR); +yy1215: + YYDEBUG(1215, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '@') { if (yych <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; + if (yych == '\t') goto yy1207; + goto yy4; } else { - if (yych <= ' ') goto yy1206; - if (yych == ')') goto yy139; - goto yy3; + if (yych <= ' ') goto yy1207; + if (yych == ')') goto yy140; + goto yy4; } } else { if (yych <= '`') { - if (yych == 'H') goto yy1215; - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych == 'H') goto yy1216; + if (yych <= 'Z') goto yy145; + goto yy4; } else { - if (yych == 'h') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych == 'h') goto yy1216; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1215: - YYDEBUG(1215, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; - } else { - if (yych <= ' ') goto yy1206; - if (yych == ')') goto yy139; - goto yy3; - } yy1216: YYDEBUG(1216, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'G') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy141; - goto yy1212; - } + if (yych <= 0x1F) { + if (yych == '\t') goto yy1207; + goto yy4; } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'g') goto yy1224; - if (yych <= 'z') goto yy146; - goto yy3; - } + if (yych <= ' ') goto yy1207; + if (yych == ')') goto yy140; + goto yy4; } yy1217: YYDEBUG(1217, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'F') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1200; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'G') goto yy1213; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1218; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'V') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'U') goto yy142; - goto yy1201; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'E') goto yy1201; if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'v') goto yy1219; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'U') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; - goto yy1202; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'V') goto yy1202; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1220; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy144; - goto yy1203; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'E') goto yy1203; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1221; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= 'S') goto yy3; - goto yy1204; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1204; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1222; - if (yych <= 'z') goto yy154; - goto yy3; + 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); - yych = *++YYCURSOR; - if (yych == 'H') goto yy1205; - if (yych != 'h') goto yy155; -yy1223: - YYDEBUG(1223, *YYCURSOR); - yych = *++YYCURSOR; - if (yych <= '.') { - if (yych <= '\t') { - if (yych <= 0x08) goto yy56; - goto yy1206; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= 'S') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == ' ') goto yy1206; - goto yy56; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '_') { - if (yych <= '/') goto yy147; - if (yych <= '^') goto yy56; - goto yy147; + if (yych <= '`') { + if (yych <= 'T') goto yy1205; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych <= '`') goto yy56; + if (yych == 't') goto yy1223; if (yych <= 'z') goto yy154; - goto yy56; + goto yy4; } } +yy1223: + YYDEBUG(1223, *YYCURSOR); + yych = *++YYCURSOR; + if (yych == 'H') goto yy1206; + if (yych != 'h') goto yy155; yy1224: YYDEBUG(1224, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + 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 yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy142; - goto yy1213; + if (yych == ' ') goto yy1207; + goto yy57; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '/') { + if (yych == '.') goto yy57; + goto yy148; } else { - if (yych == 'h') goto yy1225; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych == '_') goto yy148; + goto yy57; } } yy1225: YYDEBUG(1225, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1214; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'H') goto yy1214; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1226; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= '@') { - if (yych <= ' ') { - if (yych == '\t') goto yy1206; - if (yych <= 0x1F) goto yy3; - goto yy1206; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + 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 == '/') goto yy147; - goto yy3; + 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 <= 'H') { - if (yych <= 'G') goto yy144; - goto yy1215; + if (yych <= '^') { + if (yych <= 'G') { + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'H') goto yy1216; + if (yych <= 'Z') goto yy145; + goto yy4; } } else { if (yych <= 'g') { - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; goto yy153; } else { - if (yych <= 'h') goto yy1227; + if (yych <= 'h') goto yy1228; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } } -yy1227: - YYDEBUG(1227, *YYCURSOR); +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 yy1206; - goto yy3; + if (yych == '\t') goto yy1207; + goto yy4; } else { - if (yych <= ' ') goto yy1206; - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= ' ') goto yy1207; + if (yych <= '(') goto yy4; + goto yy140; } } else { - if (yych <= '^') { - if (yych == '/') goto yy147; - goto yy3; + if (yych <= '.') { + if (yych == '-') goto yy148; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy154; - goto yy3; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; + goto yy4; } } -yy1228: - YYDEBUG(1228, *YYCURSOR); +yy1229: + YYDEBUG(1229, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'V') { if (yych <= 'B') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy141; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'O') { - if (yych <= 'C') goto yy1244; - goto yy141; + if (yych <= 'C') goto yy1245; + goto yy142; } else { - if (yych <= 'P') goto yy1246; - if (yych <= 'U') goto yy141; - goto yy1245; + if (yych <= 'P') goto yy1247; + if (yych <= 'U') goto yy142; + goto yy1246; } } } else { if (yych <= 'o') { if (yych <= '`') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych == 'c') goto yy1244; - goto yy141; + if (yych == 'c') goto yy1245; + goto yy142; } } else { if (yych <= 'u') { - if (yych <= 'p') goto yy1246; - goto yy141; + if (yych <= 'p') goto yy1247; + goto yy142; } else { - if (yych <= 'v') goto yy1245; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'v') goto yy1246; + if (yych <= 'z') goto yy142; + goto yy4; } } } -yy1229: - YYDEBUG(1229, *YYCURSOR); +yy1230: + YYDEBUG(1230, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; - goto yy1239; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy142; + goto yy1240; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 't') goto yy1239; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 't') goto yy1240; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1230: - YYDEBUG(1230, *YYCURSOR); +yy1231: + YYDEBUG(1231, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; - goto yy1236; + if (yych <= '@') goto yy4; + if (yych <= 'W') goto yy142; + goto yy1237; } } else { if (yych <= 'w') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'x') goto yy1236; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'x') goto yy1237; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1231: - YYDEBUG(1231, *YYCURSOR); +yy1232: + YYDEBUG(1232, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 'n') goto yy1232; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'n') goto yy1233; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1232: - YYDEBUG(1232, *YYCURSOR); +yy1233: + YYDEBUG(1233, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; + if (yych <= 'C') goto yy143; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { - if (yych <= 'd') goto yy1233; - if (yych <= 'z') goto yy142; + if (yych <= 'd') goto yy1234; + if (yych <= 'z') goto yy143; goto yy167; } } -yy1233: - YYDEBUG(1233, *YYCURSOR); +yy1234: + YYDEBUG(1234, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= 'a') goto yy1234; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'a') goto yy1235; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1234: - YYDEBUG(1234, *YYCURSOR); +yy1235: + YYDEBUG(1235, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy145; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'y') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'y') goto yy1236; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1235: - YYDEBUG(1235, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == ')') goto yy139; - goto yy167; 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 yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 't') goto yy1237; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 't') goto yy1238; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1237: - YYDEBUG(1237, *YYCURSOR); +yy1238: + YYDEBUG(1238, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1238: - YYDEBUG(1238, *YYCURSOR); +yy1239: + YYDEBUG(1239, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1206; + if (yych <= 0x08) goto yy4; + goto yy1207; } else { - if (yych == ' ') goto yy1206; - goto yy3; + if (yych == ' ') goto yy1207; + goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy144; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1239: - YYDEBUG(1239, *YYCURSOR); +yy1240: + YYDEBUG(1240, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'T') goto yy142; + if (yych <= 'T') goto yy143; } } else { if (yych <= 't') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { - if (yych <= 'u') goto yy1240; - if (yych <= 'z') goto yy142; + if (yych <= 'u') goto yy1241; + if (yych <= 'z') goto yy143; goto yy167; } } -yy1240: - YYDEBUG(1240, *YYCURSOR); +yy1241: + YYDEBUG(1241, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy144; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'r') goto yy1241; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'r') goto yy1242; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1241: - YYDEBUG(1241, *YYCURSOR); +yy1242: + YYDEBUG(1242, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy145; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'd') goto yy1242; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'd') goto yy1243; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1242: - YYDEBUG(1242, *YYCURSOR); +yy1243: + YYDEBUG(1243, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'A') goto yy1243; - if (yych != 'a') goto yy3; + if (yych <= 'A') goto yy1244; + if (yych != 'a') goto yy4; } -yy1243: - YYDEBUG(1243, *YYCURSOR); +yy1244: + YYDEBUG(1244, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy56; -yy1244: - YYDEBUG(1244, *YYCURSOR); + goto yy57; +yy1245: + YYDEBUG(1245, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; - goto yy1255; + if (yych <= '@') goto yy4; + if (yych <= 'N') goto yy143; + goto yy1256; } } else { if (yych <= 'n') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 'o') goto yy1255; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'o') goto yy1256; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1245: - YYDEBUG(1245, *YYCURSOR); +yy1246: + YYDEBUG(1246, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy142; - goto yy1252; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy143; + goto yy1253; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 'e') goto yy1252; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'e') goto yy1253; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1246: - YYDEBUG(1246, *YYCURSOR); +yy1247: + YYDEBUG(1247, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -18173,7 +18475,7 @@ yy1246: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -18187,21 +18489,21 @@ yy1246: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'T') goto yy142; + if (yych != 'T') goto yy143; } } else { if (yych <= 's') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 't') goto yy1247; - if (yych <= 'z') goto yy142; + if (yych <= 't') goto yy1248; + if (yych <= 'z') goto yy143; goto yy194; } } } -yy1247: - YYDEBUG(1247, *YYCURSOR); +yy1248: + YYDEBUG(1248, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '/') { @@ -18215,7 +18517,7 @@ yy1247: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -18229,609 +18531,691 @@ yy1247: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'E') goto yy143; + if (yych != 'E') goto yy144; } } else { if (yych <= 'd') { if (yych <= '`') goto yy194; - goto yy143; + goto yy144; } else { - if (yych <= 'e') goto yy1248; - if (yych <= 'z') goto yy143; + if (yych <= 'e') goto yy1249; + if (yych <= 'z') goto yy144; goto yy194; } } } -yy1248: - YYDEBUG(1248, *YYCURSOR); +yy1249: + YYDEBUG(1249, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'L') goto yy145; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'm') goto yy1249; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'm') goto yy1250; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1249: - YYDEBUG(1249, *YYCURSOR); +yy1250: + YYDEBUG(1250, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'A') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'B') goto yy1250; - if (yych != 'b') goto yy3; + if (yych <= 'B') goto yy1251; + if (yych != 'b') goto yy4; } -yy1250: - YYDEBUG(1250, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'E') goto yy1251; - if (yych != 'e') goto yy56; yy1251: YYDEBUG(1251, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'R') goto yy206; - if (yych == 'r') goto yy206; - goto yy56; + 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 yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy144; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'n') goto yy1253; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'n') goto yy1254; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1253: - YYDEBUG(1253, *YYCURSOR); +yy1254: + YYDEBUG(1254, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy145; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 't') goto yy1254; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 't') goto yy1255; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1254: - YYDEBUG(1254, *YYCURSOR); +yy1255: + YYDEBUG(1255, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'G') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'H') goto yy1205; - if (yych == 'h') goto yy1205; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == 'h') goto yy1206; + goto yy4; } -yy1255: - YYDEBUG(1255, *YYCURSOR); +yy1256: + YYDEBUG(1256, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy144; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'n') goto yy1256; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'n') goto yy1257; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1256: - YYDEBUG(1256, *YYCURSOR); +yy1257: + YYDEBUG(1257, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1215; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy145; + goto yy1216; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'd') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'd') goto yy1216; + if (yych <= 'z') goto yy145; + goto yy4; } } -yy1257: - YYDEBUG(1257, *YYCURSOR); +yy1258: + YYDEBUG(1258, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'V') { - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= 'U') { + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '.') goto yy4; + goto yy148; } } else { - if (yych <= 'O') { - if (yych == 'C') goto yy1244; - goto yy141; - } else { - if (yych <= 'P') goto yy1246; - if (yych <= 'U') goto yy141; + 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 <= 'c') { - if (yych <= '_') { - if (yych <= 'Z') goto yy141; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'b') { + if (yych <= '^') { + if (yych <= 'V') goto yy1246; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych <= '`') goto yy3; - if (yych <= 'b') goto yy146; - goto yy1273; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + goto yy147; } } else { - if (yych <= 'u') { - if (yych == 'p') goto yy1275; - goto yy146; + if (yych <= 'p') { + if (yych <= 'c') goto yy1274; + if (yych <= 'o') goto yy147; + goto yy1276; } else { - if (yych <= 'v') goto yy1274; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych == 'v') goto yy1275; + if (yych <= 'z') goto yy147; + goto yy4; } } } -yy1258: - YYDEBUG(1258, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy141; - goto yy1239; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 't') goto yy1268; - if (yych <= 'z') goto yy146; - goto yy3; - } - } yy1259: YYDEBUG(1259, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; - goto yy1236; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1240; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'x') goto yy1265; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'W') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1232; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'X') goto yy1237; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1261; - if (yych <= 'z') goto yy146; - goto yy3; + 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 = 4; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; - goto yy1233; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'N') goto yy1233; if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1262; - if (yych <= 'z') goto yy151; - goto yy167; + 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 = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1234; + 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 yy3; - goto yy147; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych <= '`') goto yy3; - if (yych <= 'a') goto yy1263; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'A') goto yy1235; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1264; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'a') goto yy1264; + if (yych <= 'z') goto yy152; + goto yy4; } } yy1264: YYDEBUG(1264, *YYCURSOR); - yyaccept = 4; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy167; - goto yy147; + 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 <= '^') goto yy167; - goto yy147; + if (yych <= 'Y') goto yy1236; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy167; - if (yych <= 'z') goto yy154; - goto yy167; + 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 = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1237; - } + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '/') { + if (yych <= '.') goto yy167; + goto yy148; } else { - if (yych == 't') goto yy1266; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych == '_') goto yy148; + goto yy167; } } yy1266: YYDEBUG(1266, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'T') goto yy1238; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= '.') { - if (yych <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= ' ') goto yy1206; - if (yych == ')') goto yy139; - goto yy3; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy153; - goto yy3; + 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 = 4; + yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1207; + if (yych <= 0x1F) goto yy4; + goto yy1207; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy167; - if (yych <= 'T') goto yy142; - goto yy1240; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych == 'u') goto yy1269; - if (yych <= 'z') goto yy151; - goto yy167; + 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 = 0; + yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'T') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; - goto yy1241; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy167; + goto yy143; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'U') goto yy1241; if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'r') goto yy1270; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1242; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'R') goto yy1242; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1271; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1243; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1243; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= 'a') goto yy1272; - if (yych <= 'z') goto yy154; - goto yy3; + 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); - yych = *++YYCURSOR; - if (yych == 'Y') goto yy173; - if (yych == 'y') goto yy186; - goto yy155; -yy1273: - YYDEBUG(1273, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; - goto yy1255; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'A') goto yy1244; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy1284; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy142; - goto yy1252; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'O') goto yy1256; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1281; - if (yych <= 'z') goto yy151; - goto yy3; + 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') { @@ -18845,11 +19229,11 @@ yy1275: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -18857,26 +19241,26 @@ yy1275: if (yych <= '^') { if (yych <= 'S') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { - if (yych <= 'T') goto yy1247; - if (yych <= 'Z') goto yy142; + if (yych <= 'T') goto yy1248; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 's') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { - if (yych <= 't') goto yy1276; + if (yych <= 't') goto yy1277; if (yych <= 'z') goto yy151; goto yy194; } } } -yy1276: - YYDEBUG(1276, *YYCURSOR); +yy1277: + YYDEBUG(1277, *YYCURSOR); yyaccept = 5; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '9') { @@ -18890,11 +19274,11 @@ yy1276: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -18902,298 +19286,330 @@ yy1276: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy143; + goto yy144; } else { - if (yych <= 'E') goto yy1248; - if (yych <= 'Z') goto yy143; + if (yych <= 'E') goto yy1249; + if (yych <= 'Z') goto yy144; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy152; } else { - if (yych <= 'e') goto yy1277; + if (yych <= 'e') goto yy1278; if (yych <= 'z') goto yy152; goto yy194; } } } -yy1277: - YYDEBUG(1277, *YYCURSOR); +yy1278: + YYDEBUG(1278, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'L') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy144; - goto yy1249; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'M') goto yy1250; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'm') goto yy1278; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= 'l') { + if (yych <= '`') goto yy4; + goto yy153; + } else { + if (yych <= 'm') goto yy1279; + if (yych <= 'z') goto yy153; + goto yy4; + } } } -yy1278: - YYDEBUG(1278, *YYCURSOR); +yy1279: + YYDEBUG(1279, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'A') goto yy3; - goto yy1250; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'B') goto yy1251; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych == 'b') goto yy1279; + if (yych == 'b') goto yy1280; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } -yy1279: - YYDEBUG(1279, *YYCURSOR); +yy1280: + YYDEBUG(1280, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'E') goto yy1251; + if (yych == 'E') goto yy1252; if (yych != 'e') goto yy155; - YYDEBUG(1280, *YYCURSOR); + YYDEBUG(1281, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'R') goto yy206; if (yych == 'r') goto yy377; goto yy155; -yy1281: - YYDEBUG(1281, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; - } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; - goto yy1253; - } - } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; - } else { - if (yych == 'n') goto yy1282; - if (yych <= 'z') goto yy152; - goto yy3; - } - } yy1282: YYDEBUG(1282, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; - goto yy1254; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'N') goto yy1254; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1283; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= 'G') goto yy3; - goto yy1205; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1255; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1223; - if (yych <= 'z') goto yy154; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy143; - goto yy1256; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych == 'n') goto yy1285; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych == 'h') goto yy1224; + if (yych <= 'z') goto yy154; + goto yy4; } } yy1285: YYDEBUG(1285, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1215; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { + if (yych <= '_') { + if (yych <= 'N') goto yy1257; if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1227; - if (yych <= 'z') goto yy153; - goto yy3; + 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); - yych = *++YYCURSOR; + yyaccept = 0; + yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'C') { - if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= 'b') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= '_') { + if (yych <= 'D') goto yy1216; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= 'c') goto yy1287; - if (yych <= 'z') goto yy141; - goto yy3; + 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 <= 'K') { + if (yych <= 'C') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'B') goto yy142; } } else { - if (yych <= 'j') { + if (yych <= 'b') { if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; goto yy142; } else { - if (yych <= 'k') goto yy1288; + if (yych <= 'c') goto yy1288; if (yych <= 'z') goto yy142; - goto yy3; + goto yy4; } } yy1288: YYDEBUG(1288, *YYCURSOR); - yyaccept = 0; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= ')') { - if (yych == ' ') goto yy1289; - if (yych <= '(') goto yy3; - goto yy139; + 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 <= 'Z') { - if (yych <= '@') goto yy3; + if (yych <= 'j') { + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; goto yy143; } else { - if (yych <= '`') goto yy3; + if (yych <= 'k') goto yy1289; if (yych <= 'z') goto yy143; - goto yy3; + goto yy4; } } yy1289: YYDEBUG(1289, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'O') goto yy1290; - if (yych != 'o') goto yy56; + 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 == 'F') goto yy1291; - if (yych != 'f') goto yy56; + if (yych == 'O') goto yy1291; + if (yych != 'o') goto yy57; yy1291: YYDEBUG(1291, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ' ') goto yy56; + if (yych == 'F') goto yy1292; + if (yych != 'f') goto yy57; +yy1292: YYDEBUG(1292, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych <= '1') goto yy1293; - if (yych <= '2') goto yy1295; - if (yych <= '9') goto yy1296; - goto yy56; -yy1293: + if (yych != ' ') goto yy57; YYDEBUG(1293, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1297; - if (yych <= '9') goto yy1296; - goto yy1297; + 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); -#line 1068 "ext/date/lib/parse_date.re" + yyaccept = 28; + yych = *(YYMARKER = ++YYCURSOR); + if (yych <= '/') goto yy1298; + if (yych <= '9') goto yy1297; + goto yy1298; +yy1295: + YYDEBUG(1295, *YYCURSOR); +#line 1069 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("backof | frontof"); TIMELIB_INIT; @@ -19215,347 +19631,357 @@ yy1294: TIMELIB_DEINIT; return TIMELIB_LF_DAY_OF_MONTH; } -#line 19219 "ext/date/lib/parse_date.c" -yy1295: - YYDEBUG(1295, *YYCURSOR); - yyaccept = 28; - yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1297; - if (yych >= '5') goto yy1297; +#line 19633 "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; -yy1297: - YYDEBUG(1297, *YYCURSOR); +yy1298: + YYDEBUG(1298, *YYCURSOR); if (yych <= 'A') { if (yych <= 0x1F) { - if (yych == '\t') goto yy1296; - goto yy1294; + if (yych == '\t') goto yy1297; + goto yy1295; } else { - if (yych <= ' ') goto yy1296; - if (yych <= '@') goto yy1294; + if (yych <= ' ') goto yy1297; + if (yych <= '@') goto yy1295; } } else { if (yych <= '`') { - if (yych != 'P') goto yy1294; + if (yych != 'P') goto yy1295; } else { - if (yych <= 'a') goto yy1298; - if (yych != 'p') goto yy1294; + if (yych <= 'a') goto yy1299; + if (yych != 'p') goto yy1295; } } -yy1298: - YYDEBUG(1298, *YYCURSOR); +yy1299: + YYDEBUG(1299, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { - if (yych <= 'M') goto yy1300; - if (yych == 'm') goto yy1300; - goto yy56; + if (yych <= 'M') goto yy1301; + if (yych == 'm') goto yy1301; + goto yy57; } - YYDEBUG(1299, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'M') goto yy1300; - if (yych != 'm') goto yy56; -yy1300: 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 yy1302; - if (yych == '\t') goto yy1302; - goto yy56; + if (yych <= 0x00) goto yy1303; + if (yych == '\t') goto yy1303; + goto yy57; } else { - if (yych <= ' ') goto yy1302; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy1303; + if (yych != '.') goto yy57; } - YYDEBUG(1301, *YYCURSOR); + YYDEBUG(1302, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy1302; - if (yych <= 0x08) goto yy56; + if (yych <= 0x00) goto yy1303; + if (yych <= 0x08) goto yy57; } else { - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; } -yy1302: - YYDEBUG(1302, *YYCURSOR); - yych = *++YYCURSOR; - goto yy1294; yy1303: YYDEBUG(1303, *YYCURSOR); + yych = *++YYCURSOR; + goto yy1295; +yy1304: + YYDEBUG(1304, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'C') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'B') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'B') goto yy141; - goto yy1287; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'C') goto yy1288; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'c') goto yy1304; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'b') { + if (yych <= '`') goto yy4; + goto yy147; + } else { + if (yych <= 'c') goto yy1305; + if (yych <= 'z') goto yy147; + goto yy4; + } } } -yy1304: - YYDEBUG(1304, *YYCURSOR); +yy1305: + YYDEBUG(1305, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'K') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'J') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'J') goto yy142; - goto yy1288; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'K') goto yy1289; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'k') goto yy1305; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych <= 'j') { + if (yych <= '`') goto yy4; + goto yy151; + } else { + if (yych <= 'k') goto yy1306; + if (yych <= 'z') goto yy151; + goto yy4; + } } } -yy1305: - YYDEBUG(1305, *YYCURSOR); +yy1306: + YYDEBUG(1306, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') { + if (yych <= '.') { if (yych <= '(') { - if (yych == ' ') goto yy1289; - goto yy3; + if (yych == ' ') goto yy1290; + goto yy4; } else { - if (yych <= ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= ')') goto yy140; + if (yych == '-') goto yy148; + goto yy4; } } else { if (yych <= '^') { - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= '/') goto yy148; + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy144; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } -yy1306: - YYDEBUG(1306, *YYCURSOR); +yy1307: + YYDEBUG(1307, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy142; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { - if (yych <= 's') goto yy1307; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 's') goto yy1308; + if (yych <= 'z') goto yy142; + goto yy4; } } -yy1307: - YYDEBUG(1307, *YYCURSOR); +yy1308: + YYDEBUG(1308, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { - if (yych <= 't') goto yy1308; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 't') goto yy1309; + if (yych <= 'z') goto yy143; + goto yy4; } } -yy1308: - YYDEBUG(1308, *YYCURSOR); +yy1309: + YYDEBUG(1309, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1104; + if (yych <= 0x08) goto yy4; + goto yy1105; } else { - if (yych != ' ') goto yy3; + if (yych != ' ') goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy143; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy144; + goto yy4; } } -yy1309: - YYDEBUG(1309, *YYCURSOR); - yych = *++YYCURSOR; - if (yych == 'D') goto yy1310; - if (yych != 'd') goto yy1105; yy1310: YYDEBUG(1310, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'A') goto yy1311; - if (yych != 'a') goto yy56; + if (yych == 'D') goto yy1311; + if (yych != 'd') goto yy1106; yy1311: YYDEBUG(1311, *YYCURSOR); yych = *++YYCURSOR; - if (yych == 'Y') goto yy1312; - if (yych != 'y') goto yy56; + if (yych == 'A') goto yy1312; + if (yych != 'a') goto yy57; yy1312: YYDEBUG(1312, *YYCURSOR); - yyaccept = 29; + 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 yy1314; + if (yych != ' ') goto yy1118; } else { - if (yych <= 'S') goto yy1142; - if (yych == 's') goto yy1142; - } -yy1313: - YYDEBUG(1313, *YYCURSOR); -#line 1051 "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; + if (yych <= 'S') goto yy1143; + if (yych == 's') goto yy1143; + goto yy1118; } -#line 19471 "ext/date/lib/parse_date.c" -yy1314: YYDEBUG(1314, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'O') goto yy1315; - if (yych != 'o') goto yy56; + if (yych != 'o') goto yy57; yy1315: YYDEBUG(1315, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy1316; - if (yych != 'f') goto yy56; + if (yych != 'f') goto yy57; yy1316: YYDEBUG(1316, *YYCURSOR); yych = *++YYCURSOR; - goto yy1313; + goto yy2; yy1317: YYDEBUG(1317, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; - goto yy1307; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1308; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1318; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1308; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1309; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1319; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 0x1F) { - if (yych == '\t') goto yy1104; - goto yy3; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1105; + if (yych <= 0x1F) goto yy4; + goto yy1310; } else { - if (yych <= ' ') goto yy1309; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= '_') { + if (yych <= '^') goto yy4; + goto yy148; + } else { + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy152; + goto yy4; + } } } yy1320: @@ -19563,22 +19989,22 @@ yy1320: yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy142; goto yy1356; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'b') goto yy1356; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1321: @@ -19586,23 +20012,23 @@ yy1321: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'F') goto yy1346; - if (yych <= 'Q') goto yy141; + if (yych <= 'Q') goto yy142; goto yy1345; } } else { if (yych <= 'f') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'e') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1322: @@ -19610,22 +20036,22 @@ yy1322: yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'T') goto yy142; goto yy1342; } } else { if (yych <= 't') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'u') goto yy1342; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1323: @@ -19633,22 +20059,22 @@ yy1323: yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'I') goto yy1325; - if (yych <= 'N') goto yy141; + if (yych <= 'N') goto yy142; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1324: @@ -19656,22 +20082,22 @@ yy1324: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy143; goto yy1328; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'n') goto yy1328; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1325: @@ -19680,19 +20106,19 @@ yy1325: if (yych <= 'D') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; + if (yych <= 'C') goto yy143; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 'd') goto yy1326; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -19700,16 +20126,16 @@ yy1326: YYDEBUG(1326, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { if (yych <= 'a') goto yy1327; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1327: @@ -19717,22 +20143,22 @@ yy1327: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy145; + goto yy1236; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'y') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'y') goto yy1236; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1328: @@ -19740,21 +20166,21 @@ yy1328: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 't') goto yy1329; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1329: @@ -19763,39 +20189,39 @@ yy1329: yych = *(YYMARKER = ++YYCURSOR); if (yych <= ')') { if (yych == ' ') goto yy1330; - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { if (yych <= 'Z') { - if (yych <= '@') goto yy3; - goto yy144; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy144; - goto yy3; + 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 yy56; + if (yych != 'o') goto yy57; yy1331: YYDEBUG(1331, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy1332; - if (yych != 'f') goto yy56; + if (yych != 'f') goto yy57; yy1332: YYDEBUG(1332, *YYCURSOR); yych = *++YYCURSOR; - if (yych != ' ') goto yy56; + if (yych != ' ') goto yy57; YYDEBUG(1333, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '1') goto yy1334; if (yych <= '2') goto yy1335; if (yych <= '9') goto yy1336; - goto yy56; + goto yy57; yy1334: YYDEBUG(1334, *YYCURSOR); yyaccept = 28; @@ -19820,74 +20246,74 @@ yy1337: if (yych <= 'A') { if (yych <= 0x1F) { if (yych == '\t') goto yy1336; - goto yy1294; + goto yy1295; } else { if (yych <= ' ') goto yy1336; - if (yych <= '@') goto yy1294; + if (yych <= '@') goto yy1295; } } else { if (yych <= '`') { - if (yych != 'P') goto yy1294; + if (yych != 'P') goto yy1295; } else { if (yych <= 'a') goto yy1338; - if (yych != 'p') goto yy1294; + if (yych != 'p') goto yy1295; } } yy1338: YYDEBUG(1338, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { - if (yych != '.') goto yy56; + if (yych != '.') goto yy57; } else { if (yych <= 'M') goto yy1340; if (yych == 'm') goto yy1340; - goto yy56; + goto yy57; } YYDEBUG(1339, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'M') goto yy1340; - if (yych != 'm') goto yy56; + if (yych != 'm') goto yy57; yy1340: YYDEBUG(1340, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 0x1F) { - if (yych <= 0x00) goto yy1302; - if (yych == '\t') goto yy1302; - goto yy56; + if (yych <= 0x00) goto yy1303; + if (yych == '\t') goto yy1303; + goto yy57; } else { - if (yych <= ' ') goto yy1302; - if (yych != '.') goto yy56; + if (yych <= ' ') goto yy1303; + if (yych != '.') goto yy57; } YYDEBUG(1341, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '\t') { - if (yych <= 0x00) goto yy1302; - if (yych <= 0x08) goto yy56; - goto yy1302; + if (yych <= 0x00) goto yy1303; + if (yych <= 0x08) goto yy57; + goto yy1303; } else { - if (yych == ' ') goto yy1302; - goto yy56; + if (yych == ' ') goto yy1303; + goto yy57; } yy1342: YYDEBUG(1342, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy143; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'r') goto yy1343; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1343: @@ -19895,21 +20321,21 @@ yy1343: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 't') goto yy1344; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1344: @@ -19917,22 +20343,22 @@ yy1344: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy144; - goto yy1215; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy145; + goto yy1216; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'h') goto yy1215; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'h') goto yy1216; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1345: @@ -19940,22 +20366,22 @@ yy1345: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy143; goto yy1348; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 's') goto yy1348; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1346: @@ -19963,21 +20389,21 @@ yy1346: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1347; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1347: @@ -19985,22 +20411,22 @@ yy1347: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy1239; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1348: @@ -20008,21 +20434,21 @@ yy1348: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy144; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 't') goto yy1349; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1349: @@ -20031,58 +20457,58 @@ yy1349: yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1206; + if (yych <= 0x08) goto yy4; + goto yy1207; } else { - if (yych != ' ') goto yy3; + if (yych != ' ') goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy144; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy144; - goto yy3; + 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 yy1207; + if (yych != 'd') goto yy1208; yy1351: YYDEBUG(1351, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy1352; - if (yych != 'a') goto yy56; + if (yych != 'a') goto yy57; yy1352: YYDEBUG(1352, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy1353; - if (yych != 'y') goto yy56; + if (yych != 'y') goto yy57; yy1353: YYDEBUG(1353, *YYCURSOR); - yyaccept = 29; + yyaccept = 26; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'R') { - if (yych != ' ') goto yy1313; + if (yych != ' ') goto yy1118; } else { - if (yych <= 'S') goto yy1142; - if (yych == 's') goto yy1142; - goto yy1313; + 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 yy56; + if (yych != 'o') goto yy57; yy1355: YYDEBUG(1355, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'F') goto yy1316; if (yych == 'f') goto yy1316; - goto yy56; + goto yy57; yy1356: YYDEBUG(1356, *YYCURSOR); yyaccept = 5; @@ -20098,7 +20524,7 @@ yy1356: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -20112,15 +20538,15 @@ yy1356: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'R') goto yy142; + if (yych != 'R') goto yy143; } } else { if (yych <= 'q') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'r') goto yy1357; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -20130,37 +20556,37 @@ yy1357: yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'T') goto yy144; } } else { if (yych <= 't') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'u') goto yy1358; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1358: YYDEBUG(1358, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') goto yy145; + goto yy4; } else { if (yych <= 'a') goto yy1359; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1359: @@ -20168,80 +20594,88 @@ yy1359: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'Q') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'R') goto yy1360; - if (yych != 'r') goto yy3; + if (yych != 'r') goto yy4; } yy1360: YYDEBUG(1360, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy206; if (yych == 'y') goto yy206; - goto yy56; + goto yy57; yy1361: YYDEBUG(1361, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy141; - goto yy1356; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy1356; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy1379; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'R') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'Q') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'E') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'F') goto yy1346; - if (yych <= 'Q') goto yy141; - goto yy1345; + if (yych == 'F') goto yy1346; + goto yy142; } } } else { - if (yych <= 'e') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'R') goto yy1345; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'q') { - if (yych <= 'f') goto yy1375; - goto yy146; + if (yych == 'f') goto yy1375; + goto yy147; } else { if (yych <= 'r') goto yy1374; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -20249,64 +20683,72 @@ yy1363: YYDEBUG(1363, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'T') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy141; - goto yy1342; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'U') goto yy1342; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'u') goto yy1371; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'O') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'N') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'H') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'I') goto yy1325; - if (yych <= 'N') goto yy141; - goto yy1324; + if (yych == 'I') goto yy1325; + goto yy142; } } } else { - if (yych <= 'h') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'O') goto yy1324; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'n') { - if (yych <= 'i') goto yy1366; - goto yy146; + if (yych == 'i') goto yy1366; + goto yy147; } else { if (yych <= 'o') goto yy1365; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -20314,351 +20756,423 @@ yy1365: YYDEBUG(1365, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; - goto yy1328; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1328; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1369; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; - goto yy1326; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'D') goto yy1326; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'd') goto yy1367; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1327; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1327; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1368; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } yy1368: YYDEBUG(1368, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'Y') goto yy1236; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1264; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1329; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1329; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1370; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= '(') { if (yych == ' ') goto yy1330; - goto yy3; + goto yy4; } else { - if (yych <= ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= ')') goto yy140; + if (yych == '-') goto yy148; + goto yy4; } } else { if (yych <= '^') { - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= '/') goto yy148; + if (yych <= '@') goto yy4; + if (yych <= 'Z') goto yy145; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy1371: YYDEBUG(1371, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy142; - goto yy1343; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1343; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1372; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1344; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1344; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1373; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy144; - goto yy1215; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1216; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1227; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy142; - goto yy1348; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1348; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1377; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1347; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1347; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1376; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy143; - goto yy1349; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1349; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1378; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 0x1F) { - if (yych == '\t') goto yy1206; - goto yy3; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1207; + if (yych <= 0x1F) goto yy4; + goto yy1350; } else { - if (yych <= ' ') goto yy1350; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy153; - goto yy3; + if (yych <= '_') { + if (yych <= '^') goto yy4; + goto yy148; + } else { + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy153; + goto yy4; + } } } yy1379: @@ -20676,11 +21190,11 @@ yy1379: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -20688,15 +21202,15 @@ yy1379: if (yych <= '^') { if (yych <= 'Q') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'R') goto yy1357; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'q') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -20710,73 +21224,81 @@ yy1380: YYDEBUG(1380, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'U') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'T') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'T') goto yy143; - goto yy1358; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'U') goto yy1358; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'u') goto yy1381; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1359; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1359; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1382; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy1382: YYDEBUG(1382, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'Q') goto yy3; - goto yy1360; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'R') goto yy1360; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'r') goto yy1383; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1383: @@ -20788,8 +21310,8 @@ yy1383: yy1384: YYDEBUG(1384, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; yy1385: YYDEBUG(1385, *YYCURSOR); ++YYCURSOR; @@ -20800,7 +21322,7 @@ yy1385: if (yych <= '9') goto yy1385; yy1387: YYDEBUG(1387, *YYCURSOR); -#line 1026 "ext/date/lib/parse_date.re" +#line 1027 "ext/date/lib/parse_date.re" { timelib_ull i; @@ -20824,28 +21346,28 @@ yy1387: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 20828 "ext/date/lib/parse_date.c" +#line 21348 "ext/date/lib/parse_date.c" yy1388: YYDEBUG(1388, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; goto yy1429; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'n') goto yy1429; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1389: @@ -20853,23 +21375,23 @@ yy1389: yych = *++YYCURSOR; if (yych <= 'U') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'I') goto yy1421; - if (yych <= 'T') goto yy141; + if (yych <= 'T') goto yy142; goto yy1422; } } else { if (yych <= 'i') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'h') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1390: @@ -20877,23 +21399,23 @@ yy1390: yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'D') goto yy1410; - if (yych <= 'L') goto yy141; + if (yych <= 'L') goto yy142; goto yy1411; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'c') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1391: @@ -20901,22 +21423,22 @@ yy1391: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; goto yy1406; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'e') goto yy1406; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1392: @@ -20924,109 +21446,109 @@ yy1392: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy142; goto yy1402; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'e') goto yy1402; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1393: YYDEBUG(1393, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + goto yy57; } else { if (yych <= '9') goto yy1396; - if (yych <= ':') goto yy1064; - goto yy56; + if (yych <= ':') goto yy1065; + goto yy57; } yy1394: YYDEBUG(1394, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + goto yy57; } else { if (yych <= '4') goto yy1396; - if (yych == ':') goto yy1064; - goto yy56; + if (yych == ':') goto yy1065; + goto yy57; } yy1395: YYDEBUG(1395, *YYCURSOR); yych = *++YYCURSOR; - if (yych == '.') goto yy1064; - if (yych == ':') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + if (yych == ':') goto yy1065; + goto yy57; yy1396: YYDEBUG(1396, *YYCURSOR); yych = *++YYCURSOR; if (yych <= '/') { - if (yych == '.') goto yy1064; - goto yy56; + if (yych == '.') goto yy1065; + goto yy57; } else { if (yych <= '5') goto yy1397; - if (yych == ':') goto yy1064; - goto yy56; + if (yych == ':') goto yy1065; + goto yy57; } yy1397: YYDEBUG(1397, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; - if (yych >= ':') goto yy56; + if (yych <= '/') goto yy57; + if (yych >= ':') goto yy57; YYDEBUG(1398, *YYCURSOR); yyaccept = 24; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '/') goto yy1067; + if (yych <= '/') goto yy1068; if (yych <= '5') goto yy1399; if (yych <= '6') goto yy1400; - goto yy1067; + goto yy1068; yy1399: YYDEBUG(1399, *YYCURSOR); yych = *++YYCURSOR; - if (yych <= '/') goto yy56; + if (yych <= '/') goto yy57; if (yych <= '9') goto yy1401; - goto yy56; + goto yy57; yy1400: YYDEBUG(1400, *YYCURSOR); yych = *++YYCURSOR; - if (yych != '0') goto yy56; + if (yych != '0') goto yy57; yy1401: YYDEBUG(1401, *YYCURSOR); yych = *++YYCURSOR; - goto yy1075; + goto yy1076; yy1402: YYDEBUG(1402, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'L') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'K') goto yy143; } } else { if (yych <= 'k') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'l') goto yy1403; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1403: @@ -21034,21 +21556,21 @@ yy1403: yych = *++YYCURSOR; if (yych <= 'F') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'E') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'E') goto yy144; } } else { if (yych <= 'e') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'f') goto yy1404; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1404: @@ -21056,21 +21578,21 @@ yy1404: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy145; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 't') goto yy1405; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1405: @@ -21078,12 +21600,12 @@ yy1405: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'G') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'H') goto yy1205; - if (yych == 'h') goto yy1205; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == 'h') goto yy1206; + goto yy4; } yy1406: YYDEBUG(1406, *YYCURSOR); @@ -21091,19 +21613,19 @@ yy1406: if (yych <= 'S') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'R') goto yy142; + if (yych <= 'R') goto yy143; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 's') goto yy1407; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -21112,65 +21634,65 @@ yy1407: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy144; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'd') goto yy1408; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1408: YYDEBUG(1408, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy144; - goto yy3; + if (yych <= 'Z') goto yy145; + goto yy4; } else { if (yych <= 'a') goto yy1409; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1409: YYDEBUG(1409, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'X') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy3; + goto yy4; } yy1410: YYDEBUG(1410, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; goto yy1418; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy142; - goto yy3; + if (yych <= 'Z') goto yy143; + goto yy4; } else { if (yych <= 'a') goto yy1418; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1411: @@ -21178,21 +21700,21 @@ yy1411: yych = *++YYCURSOR; if (yych <= 'O') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'N') goto yy143; } } else { if (yych <= 'n') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'o') goto yy1412; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1412: @@ -21200,21 +21722,21 @@ yy1412: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy144; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'r') goto yy1413; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1413: @@ -21222,21 +21744,21 @@ yy1413: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy145; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'r') goto yy1414; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1414: @@ -21244,23 +21766,23 @@ yy1414: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'N') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'O') goto yy1415; - if (yych != 'o') goto yy3; + if (yych != 'o') goto yy4; } yy1415: YYDEBUG(1415, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'W') goto yy1416; - if (yych != 'w') goto yy56; + if (yych != 'w') goto yy57; yy1416: YYDEBUG(1416, *YYCURSOR); ++YYCURSOR; yy1417: YYDEBUG(1417, *YYCURSOR); -#line 1014 "ext/date/lib/parse_date.re" +#line 1015 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("tomorrow"); TIMELIB_INIT; @@ -21271,42 +21793,42 @@ yy1417: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21275 "ext/date/lib/parse_date.c" +#line 21795 "ext/date/lib/parse_date.c" yy1418: YYDEBUG(1418, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy144; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'y') goto yy1419; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1419: YYDEBUG(1419, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy144; + if (yych <= 'Z') goto yy145; if (yych <= '`') goto yy1420; - if (yych <= 'z') goto yy144; + if (yych <= 'z') goto yy145; } yy1420: YYDEBUG(1420, *YYCURSOR); -#line 1004 "ext/date/lib/parse_date.re" +#line 1005 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("midnight | today"); TIMELIB_INIT; @@ -21315,29 +21837,29 @@ yy1420: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 21319 "ext/date/lib/parse_date.c" +#line 21839 "ext/date/lib/parse_date.c" yy1421: YYDEBUG(1421, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= 'Q') goto yy142; + if (yych <= 'Q') goto yy143; if (yych <= 'R') goto yy1427; goto yy1428; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + 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 yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1422: @@ -21346,19 +21868,19 @@ yy1422: if (yych <= 'R') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'Q') goto yy142; + if (yych <= 'Q') goto yy143; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 'r') goto yy1423; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -21367,21 +21889,21 @@ yy1423: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy144; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 's') goto yy1424; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1424: @@ -21389,21 +21911,21 @@ yy1424: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy145; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'd') goto yy1425; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1425: @@ -21411,39 +21933,39 @@ yy1425: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'A') goto yy1426; - if (yych != 'a') goto yy3; + if (yych != 'a') goto yy4; } yy1426: YYDEBUG(1426, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy173; if (yych == 'y') goto yy173; - goto yy56; + goto yy57; yy1427: YYDEBUG(1427, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy144; + goto yy1239; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'd') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'd') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1428: @@ -21452,21 +21974,21 @@ yy1428: yych = *(YYMARKER = ++YYCURSOR); if (yych <= '(') { if (yych <= '\t') { - if (yych <= 0x08) goto yy3; - goto yy1104; + if (yych <= 0x08) goto yy4; + goto yy1105; } else { - if (yych == ' ') goto yy1104; - goto yy3; + if (yych == ' ') goto yy1105; + goto yy4; } } else { if (yych <= 'Z') { - if (yych <= ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy143; + if (yych <= ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= '`') goto yy4; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1429: @@ -21474,21 +21996,21 @@ yy1429: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1430; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1430: @@ -21496,86 +22018,94 @@ yy1430: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy1239; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1431: YYDEBUG(1431, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1429; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1429; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1461; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'U') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'T') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'H') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'I') goto yy1421; - if (yych <= 'T') goto yy141; - goto yy1422; + if (yych == 'I') goto yy1421; + goto yy142; } } } else { - if (yych <= 'h') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'U') goto yy1422; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 't') { - if (yych <= 'i') goto yy1453; - goto yy146; + if (yych == 'i') goto yy1453; + goto yy147; } else { if (yych <= 'u') goto yy1454; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -21583,39 +22113,41 @@ yy1433: YYDEBUG(1433, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'L') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'C') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'D') goto yy1410; - if (yych <= 'L') goto yy141; - goto yy1411; + if (yych == 'D') goto yy1410; + goto yy142; } } } else { - if (yych <= 'c') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'M') goto yy1411; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'l') { - if (yych <= 'd') goto yy1444; - goto yy146; + if (yych == 'd') goto yy1444; + goto yy147; } else { if (yych <= 'm') goto yy1445; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -21623,369 +22155,434 @@ yy1434: YYDEBUG(1434, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1406; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy1406; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1440; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy141; - goto yy1402; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy1402; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1436; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'L') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'K') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'K') goto yy142; - goto yy1403; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'L') goto yy1403; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'l') goto yy1437; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'F') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'E') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'E') goto yy143; - goto yy1404; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'F') goto yy1404; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'f') goto yy1438; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy144; - goto yy1405; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1405; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1439; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'G') goto yy3; - goto yy1205; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'H') goto yy1206; + if (yych == '_') goto yy148; + goto yy4; } else { - if (yych == 'h') goto yy1223; + if (yych == 'h') goto yy1224; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1440: YYDEBUG(1440, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'R') goto yy142; - goto yy1407; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'S') goto yy1407; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 's') goto yy1441; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy1408; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1408; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1442; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1409; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1409; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1443; if (yych <= 'z') goto yy153; - goto yy3; + goto yy4; } } yy1443: YYDEBUG(1443, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'X') goto yy3; - goto yy173; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'Y') goto yy173; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'y') goto yy186; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1444: YYDEBUG(1444, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1418; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1418; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1451; if (yych <= 'z') goto yy151; - goto yy3; + goto yy4; } } yy1445: YYDEBUG(1445, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'N') goto yy142; - goto yy1412; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'O') goto yy1412; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'o') goto yy1446; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy143; - goto yy1413; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1413; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1447; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; - goto yy1414; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1414; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1448; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'O') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'N') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'N') goto yy3; - goto yy1415; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'O') goto yy1415; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'o') goto yy1449; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1449: @@ -21994,60 +22591,69 @@ yy1449: if (yych == 'W') goto yy1416; if (yych != 'w') goto yy155; YYDEBUG(1450, *YYCURSOR); - yyaccept = 30; + yyaccept = 29; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy1417; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy1417; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy1417; } yy1451: YYDEBUG(1451, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy143; - goto yy1419; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'Y') goto yy1419; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1452; - if (yych <= 'z') goto yy152; - goto yy3; + 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 = 31; + yyaccept = 30; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy1420; - goto yy139; - } else { - if (yych == '/') goto yy147; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; goto yy1420; + } else { + if (yych == '.') goto yy1420; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy144; - if (yych <= '^') goto yy1420; - goto yy147; + 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; @@ -22057,22 +22663,30 @@ yy1453: YYDEBUG(1453, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy142; - if (yych <= 'R') goto yy1427; - goto yy1428; + 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') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + 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; @@ -22080,7 +22694,7 @@ yy1453: } else { if (yych <= 's') goto yy1460; if (yych <= 'z') goto yy151; - goto yy3; + goto yy4; } } } @@ -22088,98 +22702,118 @@ yy1454: YYDEBUG(1454, *YYCURSOR); yyaccept = 4; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'Q') goto yy142; - goto yy1423; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'R') goto yy1423; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'r') goto yy1455; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy143; - goto yy1424; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1424; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1456; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy144; - goto yy1425; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1425; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1457; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1426; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { - if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + 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 yy3; + goto yy4; } } yy1458: @@ -22192,101 +22826,123 @@ yy1459: YYDEBUG(1459, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 0x1F) { - if (yych == '\t') goto yy1104; - goto yy3; + if (yych <= '-') { + if (yych <= ' ') { + if (yych == '\t') goto yy1105; + if (yych <= 0x1F) goto yy4; + goto yy1105; } else { - if (yych <= ' ') goto yy1104; - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } } else { - if (yych <= '^') { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') { + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1430; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1430; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1462; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'g') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'h') goto yy1268; + if (yych <= 'z') goto yy152; + goto yy4; + } } } yy1463: @@ -22294,23 +22950,23 @@ yy1463: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= '@') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych == 'R') goto yy1475; - if (yych <= 'X') goto yy141; + if (yych <= 'X') goto yy142; goto yy1476; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'q') goto yy141; + 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 yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1464: @@ -22318,22 +22974,22 @@ yy1464: yych = *++YYCURSOR; if (yych <= 'D') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'C') goto yy142; goto yy1469; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'd') goto yy1469; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1465: @@ -22341,21 +22997,21 @@ yy1465: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'n') goto yy1466; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1466: @@ -22364,19 +23020,19 @@ yy1466: if (yych <= 'D') { if (yych <= ')') { if (yych <= '(') goto yy167; - goto yy139; + goto yy140; } else { if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; + if (yych <= 'C') goto yy143; } } else { if (yych <= 'c') { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy167; - goto yy142; + goto yy143; } else { if (yych <= 'd') goto yy1467; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy167; } } @@ -22384,16 +23040,16 @@ yy1467: YYDEBUG(1467, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'A') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; } else { if (yych <= '`') { - if (yych <= 'Z') goto yy143; - goto yy3; + if (yych <= 'Z') goto yy144; + goto yy4; } else { if (yych <= 'a') goto yy1468; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1468: @@ -22401,22 +23057,22 @@ yy1468: yych = *++YYCURSOR; if (yych <= 'Y') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych <= '@') goto yy4; + if (yych <= 'X') goto yy145; + goto yy1236; } } else { if (yych <= 'x') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { - if (yych <= 'y') goto yy1235; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'y') goto yy1236; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1469: @@ -22424,21 +23080,21 @@ yy1469: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy143; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'n') goto yy1470; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1470: @@ -22446,21 +23102,21 @@ yy1470: yych = *++YYCURSOR; if (yych <= 'I') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'H') goto yy144; } } else { if (yych <= 'h') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'i') goto yy1471; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1471: @@ -22468,21 +23124,21 @@ yy1471: yych = *++YYCURSOR; if (yych <= 'G') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'F') goto yy145; } } else { if (yych <= 'f') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'g') goto yy1472; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1472: @@ -22490,17 +23146,17 @@ yy1472: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'G') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'H') goto yy1473; - if (yych != 'h') goto yy3; + if (yych != 'h') goto yy4; } yy1473: YYDEBUG(1473, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'T') goto yy1474; - if (yych != 't') goto yy56; + if (yych != 't') goto yy57; yy1474: YYDEBUG(1474, *YYCURSOR); yych = *++YYCURSOR; @@ -22520,7 +23176,7 @@ yy1475: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -22535,15 +23191,15 @@ yy1475: goto yy194; } else { if (yych == 'C') goto yy1477; - goto yy142; + goto yy143; } } else { if (yych <= 'b') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'c') goto yy1477; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -22558,7 +23214,7 @@ yy1476: if (yych <= 0x1F) goto yy194; goto yy196; } else { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; if (yych <= ',') goto yy194; goto yy197; } @@ -22568,9 +23224,9 @@ yy1476: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy194; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -22579,61 +23235,63 @@ yy1477: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy395; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy396; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy395; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy396; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1478: YYDEBUG(1478, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '/') { - if (yych == ')') goto yy139; - if (yych <= '.') goto yy3; - goto yy147; + if (yych <= 'X') { + if (yych <= '.') { + if (yych <= ')') { + if (yych <= '(') goto yy4; + goto yy140; + } else { + if (yych == '-') goto yy148; + goto yy4; + } } else { - if (yych <= 'Q') { - if (yych <= '@') goto yy3; - goto yy141; + if (yych <= '@') { + if (yych <= '/') goto yy148; + goto yy4; } else { - if (yych <= 'R') goto yy1475; - if (yych <= 'X') goto yy141; - goto yy1476; + if (yych == 'R') goto yy1475; + goto yy142; } } } else { - if (yych <= 'q') { - if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= '`') { + if (yych <= 'Z') { + if (yych <= 'Y') goto yy1476; + goto yy142; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych == '_') goto yy148; + goto yy4; } } else { if (yych <= 'x') { - if (yych <= 'r') goto yy1490; - goto yy146; + if (yych == 'r') goto yy1490; + goto yy147; } else { if (yych <= 'y') goto yy1491; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -22641,223 +23299,267 @@ yy1479: YYDEBUG(1479, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'C') goto yy141; - goto yy1469; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'D') goto yy1469; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'd') goto yy1484; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1466; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1466; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1481; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy167; + if (yych <= 'C') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy167; + goto yy148; } else { - if (yych <= '/') goto yy147; + if (yych == '/') goto yy148; if (yych <= '@') goto yy167; - if (yych <= 'C') goto yy142; - goto yy1467; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy167; + if (yych <= '_') { + if (yych <= 'D') goto yy1467; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy167; + goto yy148; } else { - if (yych == 'd') goto yy1482; - if (yych <= 'z') goto yy151; - goto yy167; + 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 <= 'A') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= '@') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - goto yy1468; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy3; - goto yy147; + if (yych <= 'A') goto yy1468; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych <= '`') goto yy3; + if (yych <= '`') goto yy4; if (yych <= 'a') goto yy1483; if (yych <= 'z') goto yy152; - goto yy3; + goto yy4; } } yy1483: YYDEBUG(1483, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'Y') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'X') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'X') goto yy144; - goto yy1235; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'Y') goto yy1236; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'y') goto yy1264; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; - goto yy1470; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1470; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1485; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'I') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'H') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'H') goto yy143; - goto yy1471; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'I') goto yy1471; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'i') goto yy1486; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'G') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'F') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'F') goto yy144; - goto yy1472; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'G') goto yy1472; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'g') goto yy1487; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'G') goto yy3; - goto yy1473; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'H') goto yy1473; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'h') goto yy1488; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1488: @@ -22866,15 +23568,17 @@ yy1488: if (yych == 'T') goto yy1474; if (yych != 't') goto yy155; YYDEBUG(1489, *YYCURSOR); - yyaccept = 31; + yyaccept = 30; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy1420; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy1420; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy1420; } yy1490: @@ -22892,11 +23596,11 @@ yy1490: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -22904,15 +23608,15 @@ yy1490: if (yych <= '^') { if (yych <= 'B') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'C') goto yy1477; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'b') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -22934,23 +23638,23 @@ yy1491: } else { if (yych <= ')') { if (yych <= '(') goto yy194; - goto yy139; + goto yy140; } else { if (yych <= ',') goto yy194; - if (yych <= '-') goto yy197; + if (yych <= '-') goto yy372; goto yy196; } } } else { if (yych <= 'Z') { - if (yych <= '/') goto yy147; + if (yych <= '/') goto yy148; if (yych <= '9') goto yy196; if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= '_') { if (yych <= '^') goto yy194; - goto yy147; + goto yy148; } else { if (yych <= '`') goto yy194; if (yych <= 'z') goto yy151; @@ -22962,25 +23666,31 @@ yy1492: YYDEBUG(1492, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy395; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy396; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy406; - if (yych <= 'z') goto yy152; - goto yy3; + if (yych <= 'g') { + if (yych <= '`') goto yy4; + goto yy152; + } else { + if (yych <= 'h') goto yy407; + if (yych <= 'z') goto yy152; + goto yy4; + } } } yy1493: @@ -22988,29 +23698,29 @@ yy1493: yych = *++YYCURSOR; if (yych <= 'W') { if (yych <= 'N') { - if (yych == ')') goto yy139; - if (yych <= '@') goto yy3; - goto yy141; + if (yych == ')') goto yy140; + if (yych <= '@') goto yy4; + goto yy142; } else { if (yych <= 'O') goto yy1501; - if (yych <= 'U') goto yy141; + if (yych <= 'U') goto yy142; if (yych <= 'V') goto yy1502; goto yy1499; } } else { if (yych <= 'o') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - if (yych <= 'n') goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + if (yych <= 'n') goto yy142; goto yy1501; } else { if (yych <= 'v') { - if (yych <= 'u') goto yy141; + if (yych <= 'u') goto yy142; goto yy1502; } else { if (yych <= 'w') goto yy1499; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } } @@ -23019,22 +23729,22 @@ yy1494: yych = *++YYCURSOR; if (yych <= 'X') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'W') goto yy142; goto yy1498; } } else { if (yych <= 'w') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'x') goto yy1498; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1495: @@ -23042,21 +23752,21 @@ yy1495: yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy142; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 'n') goto yy1496; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1496: @@ -23064,21 +23774,21 @@ yy1496: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1497; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1497: @@ -23086,22 +23796,22 @@ yy1497: yych = *++YYCURSOR; if (yych <= 'H') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych <= '@') goto yy4; + if (yych <= 'G') goto yy144; + goto yy1239; } } else { if (yych <= 'g') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { - if (yych <= 'h') goto yy1238; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'h') goto yy1239; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1498: @@ -23109,37 +23819,37 @@ yy1498: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; goto yy1428; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1428; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1499: YYDEBUG(1499, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; if (yych <= '`') goto yy1500; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; } yy1500: YYDEBUG(1500, *YYCURSOR); -#line 983 "ext/date/lib/parse_date.re" +#line 984 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("now"); TIMELIB_INIT; @@ -23147,28 +23857,28 @@ yy1500: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 23151 "ext/date/lib/parse_date.c" +#line 23859 "ext/date/lib/parse_date.c" yy1501: YYDEBUG(1501, *YYCURSOR); yych = *++YYCURSOR; if (yych <= 'N') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'M') goto yy143; goto yy1507; } } else { if (yych <= 'm') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 'n') goto yy1507; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1502: @@ -23186,7 +23896,7 @@ yy1502: } } else { if (yych <= ',') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; goto yy194; } else { if (yych <= '-') goto yy197; @@ -23200,15 +23910,15 @@ yy1502: if (yych <= '9') goto yy196; goto yy194; } else { - if (yych != 'E') goto yy142; + if (yych != 'E') goto yy143; } } else { if (yych <= 'd') { if (yych <= '`') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'e') goto yy1503; - if (yych <= 'z') goto yy142; + if (yych <= 'z') goto yy143; goto yy194; } } @@ -23218,21 +23928,21 @@ yy1503: yych = *++YYCURSOR; if (yych <= 'M') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'L') goto yy144; } } else { if (yych <= 'l') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'm') goto yy1504; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1504: @@ -23240,21 +23950,21 @@ yy1504: yych = *++YYCURSOR; if (yych <= 'B') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'A') goto yy145; } } else { if (yych <= 'a') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'b') goto yy1505; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1505: @@ -23262,31 +23972,31 @@ yy1505: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'D') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'E') goto yy1506; - if (yych != 'e') goto yy3; + if (yych != 'e') goto yy4; } yy1506: YYDEBUG(1506, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'R') goto yy206; if (yych == 'r') goto yy206; - goto yy56; + goto yy57; yy1507: YYDEBUG(1507, *YYCURSOR); ++YYCURSOR; if ((yych = *YYCURSOR) <= '@') { - if (yych == ')') goto yy139; + if (yych == ')') goto yy140; } else { - if (yych <= 'Z') goto yy143; + if (yych <= 'Z') goto yy144; if (yych <= '`') goto yy1508; - if (yych <= 'z') goto yy143; + if (yych <= 'z') goto yy144; } yy1508: YYDEBUG(1508, *YYCURSOR); -#line 992 "ext/date/lib/parse_date.re" +#line 993 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("noon"); TIMELIB_INIT; @@ -23297,49 +24007,51 @@ yy1508: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 23301 "ext/date/lib/parse_date.c" +#line 24009 "ext/date/lib/parse_date.c" yy1509: YYDEBUG(1509, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'W') { - if (yych <= '@') { + if (yych <= 'V') { + if (yych <= '.') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych == '/') goto yy147; - goto yy3; + if (yych == '-') goto yy148; + goto yy4; } } else { - if (yych <= 'O') { - if (yych <= 'N') goto yy141; - goto yy1501; + if (yych <= 'N') { + if (yych <= '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } else { - if (yych <= 'U') goto yy141; - if (yych <= 'V') goto yy1502; - goto yy1499; + if (yych <= 'O') goto yy1501; + if (yych <= 'U') goto yy142; + goto yy1502; } } } else { if (yych <= 'n') { if (yych <= '^') { - if (yych <= 'Z') goto yy141; - goto yy3; + if (yych <= 'W') goto yy1499; + if (yych <= 'Z') goto yy142; + goto yy4; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy3; - goto yy146; + if (yych <= '_') goto yy148; + if (yych <= '`') goto yy4; + goto yy147; } } else { if (yych <= 'v') { if (yych <= 'o') goto yy1516; - if (yych <= 'u') goto yy146; + if (yych <= 'u') goto yy147; goto yy1517; } else { if (yych <= 'w') goto yy1515; - if (yych <= 'z') goto yy146; - goto yy3; + if (yych <= 'z') goto yy147; + goto yy4; } } } @@ -23347,145 +24059,176 @@ yy1510: YYDEBUG(1510, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'X') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'W') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'W') goto yy141; - goto yy1498; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'X') goto yy1498; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'x') goto yy1514; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy141; - goto yy1496; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1496; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1512; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1497; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1497; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1513; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'H') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'G') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'G') goto yy143; - goto yy1238; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'H') goto yy1239; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'h') goto yy1267; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1428; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1428; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1460; - if (yych <= 'z') goto yy151; - goto yy3; + 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 = 32; + yyaccept = 31; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy1500; - goto yy139; - } else { - if (yych == '/') goto yy147; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; goto yy1500; + } else { + if (yych == '.') goto yy1500; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy142; - if (yych <= '^') goto yy1500; - goto yy147; + 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; @@ -23495,25 +24238,31 @@ yy1516: YYDEBUG(1516, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'N') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'M') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'M') goto yy142; - goto yy1507; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'N') goto yy1507; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'n') goto yy1522; - if (yych <= 'z') goto yy151; - goto yy3; + if (yych <= 'm') { + if (yych <= '`') goto yy4; + goto yy151; + } else { + if (yych <= 'n') goto yy1522; + if (yych <= 'z') goto yy151; + goto yy4; + } } } yy1517: @@ -23531,11 +24280,11 @@ yy1517: } } else { if (yych <= '-') { - if (yych <= ')') goto yy139; + if (yych <= ')') goto yy140; if (yych <= ',') goto yy194; - goto yy197; + goto yy372; } else { - if (yych == '/') goto yy147; + if (yych == '/') goto yy148; goto yy196; } } @@ -23543,15 +24292,15 @@ yy1517: if (yych <= '^') { if (yych <= 'D') { if (yych <= '@') goto yy194; - goto yy142; + goto yy143; } else { if (yych <= 'E') goto yy1503; - if (yych <= 'Z') goto yy142; + if (yych <= 'Z') goto yy143; goto yy194; } } else { if (yych <= 'd') { - if (yych <= '_') goto yy147; + if (yych <= '_') goto yy148; if (yych <= '`') goto yy194; goto yy151; } else { @@ -23565,73 +24314,86 @@ yy1518: YYDEBUG(1518, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'M') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'L') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'L') goto yy143; - goto yy1504; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'M') goto yy1504; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'm') goto yy1519; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'B') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'A') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'A') goto yy144; - goto yy1505; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'B') goto yy1505; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'b') goto yy1520; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'D') goto yy3; - goto yy1506; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'E') goto yy1506; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'e') goto yy1521; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1521: @@ -23642,22 +24404,23 @@ yy1521: goto yy155; yy1522: YYDEBUG(1522, *YYCURSOR); - yyaccept = 33; + yyaccept = 32; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '@') { - if (yych <= ')') { - if (yych <= '(') goto yy1508; - goto yy139; - } else { - if (yych == '/') goto yy147; + if (yych <= '/') { + if (yych <= ',') { + if (yych == ')') goto yy140; goto yy1508; + } else { + if (yych == '.') goto yy1508; + goto yy148; } } else { - if (yych <= '_') { - if (yych <= 'Z') goto yy143; - if (yych <= '^') goto yy1508; - goto yy147; + 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; @@ -23668,21 +24431,21 @@ yy1523: yych = *++YYCURSOR; if (yych <= 'S') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; + if (yych <= '@') goto yy4; + if (yych <= 'R') goto yy142; } } else { if (yych <= 'r') { - if (yych <= 'Z') goto yy141; - if (yych <= '`') goto yy3; - goto yy141; + if (yych <= 'Z') goto yy142; + if (yych <= '`') goto yy4; + goto yy142; } else { if (yych <= 's') goto yy1524; - if (yych <= 'z') goto yy141; - goto yy3; + if (yych <= 'z') goto yy142; + goto yy4; } } yy1524: @@ -23690,21 +24453,21 @@ yy1524: yych = *++YYCURSOR; if (yych <= 'T') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; + if (yych <= '@') goto yy4; + if (yych <= 'S') goto yy143; } } else { if (yych <= 's') { - if (yych <= 'Z') goto yy142; - if (yych <= '`') goto yy3; - goto yy142; + if (yych <= 'Z') goto yy143; + if (yych <= '`') goto yy4; + goto yy143; } else { if (yych <= 't') goto yy1525; - if (yych <= 'z') goto yy142; - goto yy3; + if (yych <= 'z') goto yy143; + goto yy4; } } yy1525: @@ -23712,21 +24475,21 @@ yy1525: yych = *++YYCURSOR; if (yych <= 'E') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; + if (yych <= '@') goto yy4; + if (yych <= 'D') goto yy144; } } else { if (yych <= 'd') { - if (yych <= 'Z') goto yy143; - if (yych <= '`') goto yy3; - goto yy143; + if (yych <= 'Z') goto yy144; + if (yych <= '`') goto yy4; + goto yy144; } else { if (yych <= 'e') goto yy1526; - if (yych <= 'z') goto yy143; - goto yy3; + if (yych <= 'z') goto yy144; + goto yy4; } } yy1526: @@ -23734,21 +24497,21 @@ yy1526: yych = *++YYCURSOR; if (yych <= 'R') { if (yych <= ')') { - if (yych <= '(') goto yy3; - goto yy139; + if (yych <= '(') goto yy4; + goto yy140; } else { - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; + if (yych <= '@') goto yy4; + if (yych <= 'Q') goto yy145; } } else { if (yych <= 'q') { - if (yych <= 'Z') goto yy144; - if (yych <= '`') goto yy3; - goto yy144; + if (yych <= 'Z') goto yy145; + if (yych <= '`') goto yy4; + goto yy145; } else { if (yych <= 'r') goto yy1527; - if (yych <= 'z') goto yy144; - goto yy3; + if (yych <= 'z') goto yy145; + goto yy4; } } yy1527: @@ -23756,28 +24519,28 @@ yy1527: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); if (yych <= 'C') { - if (yych == ')') goto yy139; - goto yy3; + if (yych == ')') goto yy140; + goto yy4; } else { if (yych <= 'D') goto yy1528; - if (yych != 'd') goto yy3; + if (yych != 'd') goto yy4; } yy1528: YYDEBUG(1528, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'A') goto yy1529; - if (yych != 'a') goto yy56; + if (yych != 'a') goto yy57; yy1529: YYDEBUG(1529, *YYCURSOR); yych = *++YYCURSOR; if (yych == 'Y') goto yy1530; - if (yych != 'y') goto yy56; + if (yych != 'y') goto yy57; yy1530: YYDEBUG(1530, *YYCURSOR); ++YYCURSOR; yy1531: YYDEBUG(1531, *YYCURSOR); -#line 971 "ext/date/lib/parse_date.re" +#line 972 "ext/date/lib/parse_date.re" { DEBUG_OUTPUT("yesterday"); TIMELIB_INIT; @@ -23788,128 +24551,153 @@ yy1531: TIMELIB_DEINIT; return TIMELIB_RELATIVE; } -#line 23792 "ext/date/lib/parse_date.c" +#line 24553 "ext/date/lib/parse_date.c" yy1532: YYDEBUG(1532, *YYCURSOR); yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= 'S') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'R') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'R') goto yy141; - goto yy1524; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy142; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy141; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'S') goto yy1524; + if (yych <= 'Z') goto yy142; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 's') goto yy1533; - if (yych <= 'z') goto yy146; - goto yy3; + 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 <= 'T') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'S') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'S') goto yy142; - goto yy1525; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy143; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy142; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'T') goto yy1525; + if (yych <= 'Z') goto yy143; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 't') goto yy1534; - if (yych <= 'z') goto yy151; - goto yy3; + 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 <= 'E') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'D') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'D') goto yy143; - goto yy1526; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy144; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy143; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'E') goto yy1526; + if (yych <= 'Z') goto yy144; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'e') goto yy1535; - if (yych <= 'z') goto yy152; - goto yy3; + 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 <= 'R') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'Q') { + if (yych <= '-') { + if (yych == ')') goto yy140; + if (yych <= ',') goto yy4; + goto yy148; } else { - if (yych <= '/') goto yy147; - if (yych <= '@') goto yy3; - if (yych <= 'Q') goto yy144; - goto yy1527; + if (yych == '/') goto yy148; + if (yych <= '@') goto yy4; + goto yy145; } } else { - if (yych <= '`') { - if (yych <= 'Z') goto yy144; - if (yych == '_') goto yy147; - goto yy3; + if (yych <= '_') { + if (yych <= 'R') goto yy1527; + if (yych <= 'Z') goto yy145; + if (yych <= '^') goto yy4; + goto yy148; } else { - if (yych == 'r') goto yy1536; - if (yych <= 'z') goto yy153; - goto yy3; + 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 <= 'D') { - if (yych <= '.') { - if (yych == ')') goto yy139; - goto yy3; + if (yych <= 'C') { + if (yych <= ',') { + if (yych == ')') goto yy140; + goto yy4; } else { - if (yych <= '/') goto yy147; - if (yych <= 'C') goto yy3; - goto yy1528; + if (yych == '.') goto yy4; + if (yych <= '/') goto yy148; + goto yy4; } } else { if (yych <= '`') { - if (yych == '_') goto yy147; - goto yy3; + if (yych <= 'D') goto yy1528; + if (yych == '_') goto yy148; + goto yy4; } else { if (yych == 'd') goto yy1537; if (yych <= 'z') goto yy154; - goto yy3; + goto yy4; } } yy1537: @@ -23922,23 +24710,25 @@ yy1537: if (yych == 'Y') goto yy1530; if (yych != 'y') goto yy155; YYDEBUG(1539, *YYCURSOR); - yyaccept = 34; + yyaccept = 33; yych = *(YYMARKER = ++YYCURSOR); - if (yych <= '^') { - if (yych == '/') goto yy147; + if (yybm[0+yych] & 16) { + goto yy154; + } + if (yych <= '.') { + if (yych == '-') goto yy148; goto yy1531; } else { - if (yych <= '_') goto yy147; - if (yych <= '`') goto yy1531; - if (yych <= 'z') goto yy154; + if (yych <= '/') goto yy148; + if (yych == '_') goto yy148; goto yy1531; } } -#line 1732 "ext/date/lib/parse_date.re" +#line 1733 "ext/date/lib/parse_date.re" } -#define YYMAXFILL 30 +#define YYMAXFILL 31 timelib_time* timelib_strtotime(char *s, int len, struct timelib_error_container **errors, const timelib_tzdb *tzdb) { @@ -24157,10 +24947,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim TIMELIB_CHECK_NUMBER; tptr = ptr; - if ((f = timelib_get_nr((char **) &ptr, 6)) == TIMELIB_UNSET || ptr - tptr != 6) { + 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 / 1000000); + s->time->f = (f / pow(10, (ptr - tptr))); } } break; diff --git a/ext/date/lib/parse_date.re b/ext/date/lib/parse_date.re index dd3ac7b48..73b3cadf1 100644 --- a/ext/date/lib/parse_date.re +++ b/ext/date/lib/parse_date.re @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | 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 | @@ -16,12 +16,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_date.re 294880 2010-02-11 11:11:47Z pajoye $ */ +/* $Id: parse_date.re 301253 2010-07-14 00:04:43Z kalle $ */ #include "timelib.h" #include <stdio.h> #include <ctype.h> +#include <math.h> #ifdef HAVE_STDLIB_H #include <stdlib.h> @@ -88,6 +89,8 @@ #define TIMELIB_ERROR 999 +/* Some compilers like AIX, defines uchar in sys/types.h */ +#undef uchar typedef unsigned char uchar; #define BSIZE 8192 @@ -523,7 +526,7 @@ static long timelib_parse_tz_cor(char **ptr) char *begin = *ptr, *end; long tmp; - while (**ptr != '\0') { + while (isdigit(**ptr) || **ptr == ':') { ++*ptr; } end = *ptr; @@ -854,7 +857,7 @@ minutelz = [0-5][0-9]; second = minute | "60"; secondlz = minutelz | "60"; meridian = ([AaPp] "."? [Mm] "."?) [\000\t ]; -tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/][A-Z][a-z]+)+; +tz = "("? [A-Za-z]{1,6} ")"? | [A-Z][a-z]+([_/-][A-Za-z]+)+; tzcorrection = "GMT"? [+-] hour24 ":"? minute?; daysuf = "st" | "nd" | "rd" | "th"; @@ -931,8 +934,8 @@ mssqltime = hour12 ":" minutelz ":" secondlz [:.] [0-9]+ meridian; isoweekday = year4 "-"? "W" weekofyear "-"? [0-7]; isoweek = year4 "-"? "W" weekofyear; exif = year4 ":" monthlz ":" daylz " " hour24lz ":" minutelz ":" secondlz; -firstdayof = 'first day' ' of'?; -lastdayof = 'last day' ' of'?; +firstdayof = 'first day of'?; +lastdayof = 'last day of'?; backof = 'back of ' hour24 space? meridian?; frontof = 'front of ' hour24 space? meridian?; @@ -1951,10 +1954,10 @@ timelib_time *timelib_parse_from_format(char *format, char *string, int len, tim TIMELIB_CHECK_NUMBER; tptr = ptr; - if ((f = timelib_get_nr((char **) &ptr, 6)) == TIMELIB_UNSET || ptr - tptr != 6) { + 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 / 1000000); + s->time->f = (f / pow(10, (ptr - tptr))); } } break; diff --git a/ext/date/lib/parse_iso_intervals.c b/ext/date/lib/parse_iso_intervals.c index 9a9483e11..d1e3a63eb 100644 --- a/ext/date/lib/parse_iso_intervals.c +++ b/ext/date/lib/parse_iso_intervals.c @@ -1,10 +1,10 @@ -/* Generated by re2c 0.13.5 on Tue May 5 09:42:15 2009 */ +/* Generated by re2c 0.13.5 on Fri Mar 26 12:12:03 2010 */ #line 1 "ext/date/lib/parse_iso_intervals.re" /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | 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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_iso_intervals.c 279957 2009-05-05 07:45:18Z derick $ */ +/* $Id: parse_iso_intervals.c 296828 2010-03-26 04:31:26Z aharvey $ */ #include "timelib.h" @@ -183,7 +183,7 @@ static long timelib_parse_tz_cor(char **ptr) char *begin = *ptr, *end; long tmp; - while (**ptr != '\0') { + while (isdigit(**ptr) || **ptr == ':') { ++*ptr; } end = *ptr; @@ -1118,6 +1118,7 @@ void timelib_strtointerval(char *s, int len, in.period->weekday = 0; in.period->weekday_behavior = 0; in.period->first_last_day_of = 0; + in.period->days = TIMELIB_UNSET; in.recurrences = 1; diff --git a/ext/date/lib/parse_iso_intervals.re b/ext/date/lib/parse_iso_intervals.re index 78053a294..3fb47107c 100644 --- a/ext/date/lib/parse_iso_intervals.re +++ b/ext/date/lib/parse_iso_intervals.re @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2006 The PHP Group | + | 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 | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: parse_iso_intervals.re 264095 2008-08-02 16:50:35Z pajoye $ */ +/* $Id: parse_iso_intervals.re 296828 2010-03-26 04:31:26Z aharvey $ */ #include "timelib.h" @@ -181,7 +181,7 @@ static long timelib_parse_tz_cor(char **ptr) char *begin = *ptr, *end; long tmp; - while (**ptr != '\0') { + while (isdigit(**ptr) || **ptr == ':') { ++*ptr; } end = *ptr; @@ -512,6 +512,7 @@ void timelib_strtointerval(char *s, int len, in.period->weekday = 0; in.period->weekday_behavior = 0; in.period->first_last_day_of = 0; + in.period->days = TIMELIB_UNSET; in.recurrences = 1; diff --git a/ext/date/lib/timezonedb.h b/ext/date/lib/timezonedb.h index 27f1889e9..6d7ee5910 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[564] = { +const timelib_tzdb_index_entry timezonedb_idx_builtin[565] = { { "Africa/Abidjan" , 0x000000 }, { "Africa/Accra" , 0x000055 }, { "Africa/Addis_Ababa" , 0x0000FD }, @@ -14,558 +14,559 @@ const timelib_tzdb_index_entry timezonedb_idx_builtin[564] = { { "Africa/Bujumbura" , 0x000571 }, { "Africa/Cairo" , 0x0005B5 }, { "Africa/Casablanca" , 0x00097C }, - { "Africa/Ceuta" , 0x000A58 }, - { "Africa/Conakry" , 0x000D5F }, - { "Africa/Dakar" , 0x000DCA }, - { "Africa/Dar_es_Salaam" , 0x000E30 }, - { "Africa/Djibouti" , 0x000E9D }, - { "Africa/Douala" , 0x000EF2 }, - { "Africa/El_Aaiun" , 0x000F47 }, - { "Africa/Freetown" , 0x000FAD }, - { "Africa/Gaborone" , 0x0010BC }, - { "Africa/Harare" , 0x001117 }, - { "Africa/Johannesburg" , 0x00116C }, - { "Africa/Kampala" , 0x0011DA }, - { "Africa/Khartoum" , 0x001259 }, - { "Africa/Kigali" , 0x00136C }, - { "Africa/Kinshasa" , 0x0013C1 }, - { "Africa/Lagos" , 0x00141C }, - { "Africa/Libreville" , 0x001471 }, - { "Africa/Lome" , 0x0014C6 }, - { "Africa/Luanda" , 0x00150A }, - { "Africa/Lubumbashi" , 0x00155F }, - { "Africa/Lusaka" , 0x0015BA }, - { "Africa/Malabo" , 0x00160F }, - { "Africa/Maputo" , 0x001675 }, - { "Africa/Maseru" , 0x0016CA }, - { "Africa/Mbabane" , 0x001732 }, - { "Africa/Mogadishu" , 0x001788 }, - { "Africa/Monrovia" , 0x0017E3 }, - { "Africa/Nairobi" , 0x001849 }, - { "Africa/Ndjamena" , 0x0018C8 }, - { "Africa/Niamey" , 0x001934 }, - { "Africa/Nouakchott" , 0x0019A7 }, - { "Africa/Ouagadougou" , 0x001A12 }, - { "Africa/Porto-Novo" , 0x001A67 }, - { "Africa/Sao_Tome" , 0x001ACD }, - { "Africa/Timbuktu" , 0x001B22 }, - { "Africa/Tripoli" , 0x001B8D }, - { "Africa/Tunis" , 0x001C87 }, - { "Africa/Windhoek" , 0x001EB1 }, - { "America/Adak" , 0x0020F8 }, - { "America/Anchorage" , 0x00246E }, - { "America/Anguilla" , 0x0027E2 }, - { "America/Antigua" , 0x002837 }, - { "America/Araguaina" , 0x00289D }, - { "America/Argentina/Buenos_Aires" , 0x0029F8 }, - { "America/Argentina/Catamarca" , 0x002BA6 }, - { "America/Argentina/ComodRivadavia" , 0x002D67 }, - { "America/Argentina/Cordoba" , 0x002F0D }, - { "America/Argentina/Jujuy" , 0x0030E2 }, - { "America/Argentina/La_Rioja" , 0x003296 }, - { "America/Argentina/Mendoza" , 0x00344E }, - { "America/Argentina/Rio_Gallegos" , 0x00360E }, - { "America/Argentina/Salta" , 0x0037C3 }, - { "America/Argentina/San_Juan" , 0x00396F }, - { "America/Argentina/San_Luis" , 0x003B27 }, - { "America/Argentina/Tucuman" , 0x003E05 }, - { "America/Argentina/Ushuaia" , 0x003FC1 }, - { "America/Aruba" , 0x00417C }, - { "America/Asuncion" , 0x0041E2 }, - { "America/Atikokan" , 0x0044C7 }, - { "America/Atka" , 0x00459D }, - { "America/Bahia" , 0x004903 }, - { "America/Barbados" , 0x004A8C }, - { "America/Belem" , 0x004B26 }, - { "America/Belize" , 0x004C21 }, - { "America/Blanc-Sablon" , 0x004D9D }, - { "America/Boa_Vista" , 0x004E51 }, - { "America/Bogota" , 0x004F5A }, - { "America/Boise" , 0x004FC6 }, - { "America/Buenos_Aires" , 0x00535D }, - { "America/Cambridge_Bay" , 0x0054F6 }, - { "America/Campo_Grande" , 0x00581E }, - { "America/Cancun" , 0x005B0D }, - { "America/Caracas" , 0x005D4F }, - { "America/Catamarca" , 0x005DB6 }, - { "America/Cayenne" , 0x005F5C }, - { "America/Cayman" , 0x005FBE }, - { "America/Chicago" , 0x006013 }, - { "America/Chihuahua" , 0x00652A }, - { "America/Coral_Harbour" , 0x006795 }, - { "America/Cordoba" , 0x006827 }, - { "America/Costa_Rica" , 0x0069CD }, - { "America/Cuiaba" , 0x006A57 }, - { "America/Curacao" , 0x006D35 }, - { "America/Danmarkshavn" , 0x006D9B }, - { "America/Dawson" , 0x006EDF }, - { "America/Dawson_Creek" , 0x0071FC }, - { "America/Denver" , 0x0073D6 }, - { "America/Detroit" , 0x00775C }, - { "America/Dominica" , 0x007ABB }, - { "America/Edmonton" , 0x007B10 }, - { "America/Eirunepe" , 0x007EC8 }, - { "America/El_Salvador" , 0x007FDB }, - { "America/Ensenada" , 0x008050 }, - { "America/Fort_Wayne" , 0x0084F7 }, - { "America/Fortaleza" , 0x0083B9 }, - { "America/Glace_Bay" , 0x008761 }, - { "America/Godthab" , 0x008AD8 }, - { "America/Goose_Bay" , 0x008D9C }, - { "America/Grand_Turk" , 0x009259 }, - { "America/Grenada" , 0x009508 }, - { "America/Guadeloupe" , 0x00955D }, - { "America/Guatemala" , 0x0095B2 }, - { "America/Guayaquil" , 0x00963B }, - { "America/Guyana" , 0x009698 }, - { "America/Halifax" , 0x009719 }, - { "America/Havana" , 0x009C2F }, - { "America/Hermosillo" , 0x009FA2 }, - { "America/Indiana/Indianapolis" , 0x00A080 }, - { "America/Indiana/Knox" , 0x00A311 }, - { "America/Indiana/Marengo" , 0x00A6A8 }, - { "America/Indiana/Petersburg" , 0x00A94E }, - { "America/Indiana/Tell_City" , 0x00AE9B }, - { "America/Indiana/Vevay" , 0x00B134 }, - { "America/Indiana/Vincennes" , 0x00B36F }, - { "America/Indiana/Winamac" , 0x00B623 }, - { "America/Indianapolis" , 0x00AC31 }, - { "America/Inuvik" , 0x00B8DC }, - { "America/Iqaluit" , 0x00BBD3 }, - { "America/Jamaica" , 0x00BEF5 }, - { "America/Jujuy" , 0x00BFBA }, - { "America/Juneau" , 0x00C164 }, - { "America/Kentucky/Louisville" , 0x00C4E2 }, - { "America/Kentucky/Monticello" , 0x00C900 }, - { "America/Knox_IN" , 0x00CC85 }, - { "America/La_Paz" , 0x00CFF6 }, - { "America/Lima" , 0x00D05D }, - { "America/Los_Angeles" , 0x00D105 }, - { "America/Louisville" , 0x00D516 }, - { "America/Maceio" , 0x00D90B }, - { "America/Managua" , 0x00DA45 }, - { "America/Manaus" , 0x00DAF8 }, - { "America/Marigot" , 0x00DBFA }, - { "America/Martinique" , 0x00DC4F }, - { "America/Matamoros" , 0x00DCBB }, - { "America/Mazatlan" , 0x00DF14 }, - { "America/Mendoza" , 0x00E181 }, - { "America/Menominee" , 0x00E335 }, - { "America/Merida" , 0x00E6B6 }, - { "America/Mexico_City" , 0x00E8F1 }, - { "America/Miquelon" , 0x00EB6C }, - { "America/Moncton" , 0x00EDDE }, - { "America/Monterrey" , 0x00F275 }, - { "America/Montevideo" , 0x00F4D8 }, - { "America/Montreal" , 0x00F7EA }, - { "America/Montserrat" , 0x00FD00 }, - { "America/Nassau" , 0x00FD55 }, - { "America/New_York" , 0x01009A }, - { "America/Nipigon" , 0x0105A5 }, - { "America/Nome" , 0x0108F6 }, - { "America/Noronha" , 0x010C74 }, - { "America/North_Dakota/Center" , 0x010DA4 }, - { "America/North_Dakota/New_Salem" , 0x011138 }, - { "America/Ojinaga" , 0x0114E1 }, - { "America/Panama" , 0x011742 }, - { "America/Pangnirtung" , 0x011797 }, - { "America/Paramaribo" , 0x011ACD }, - { "America/Phoenix" , 0x011B5F }, - { "America/Port-au-Prince" , 0x011C0D }, - { "America/Port_of_Spain" , 0x011E28 }, - { "America/Porto_Acre" , 0x011D29 }, - { "America/Porto_Velho" , 0x011E7D }, - { "America/Puerto_Rico" , 0x011F73 }, - { "America/Rainy_River" , 0x011FDE }, - { "America/Rankin_Inlet" , 0x012316 }, - { "America/Recife" , 0x0125FC }, - { "America/Regina" , 0x012726 }, - { "America/Resolute" , 0x0128E4 }, - { "America/Rio_Branco" , 0x012BDD }, - { "America/Rosario" , 0x012CE0 }, - { "America/Santa_Isabel" , 0x012E86 }, - { "America/Santarem" , 0x013229 }, - { "America/Santiago" , 0x01332E }, - { "America/Santo_Domingo" , 0x0136D7 }, - { "America/Sao_Paulo" , 0x01379D }, - { "America/Scoresbysund" , 0x013AAC }, - { "America/Shiprock" , 0x013D9A }, - { "America/St_Barthelemy" , 0x014129 }, - { "America/St_Johns" , 0x01417E }, - { "America/St_Kitts" , 0x0146D1 }, - { "America/St_Lucia" , 0x014726 }, - { "America/St_Thomas" , 0x01477B }, - { "America/St_Vincent" , 0x0147D0 }, - { "America/Swift_Current" , 0x014825 }, - { "America/Tegucigalpa" , 0x014946 }, - { "America/Thule" , 0x0149C5 }, - { "America/Thunder_Bay" , 0x014C0C }, - { "America/Tijuana" , 0x014F55 }, - { "America/Toronto" , 0x0152EE }, - { "America/Tortola" , 0x015805 }, - { "America/Vancouver" , 0x01585A }, - { "America/Virgin" , 0x015C97 }, - { "America/Whitehorse" , 0x015CEC }, - { "America/Winnipeg" , 0x016009 }, - { "America/Yakutat" , 0x016449 }, - { "America/Yellowknife" , 0x0167B4 }, - { "Antarctica/Casey" , 0x016AC4 }, - { "Antarctica/Davis" , 0x016B4A }, - { "Antarctica/DumontDUrville" , 0x016BD4 }, - { "Antarctica/Mawson" , 0x016C66 }, - { "Antarctica/McMurdo" , 0x016CE2 }, - { "Antarctica/Palmer" , 0x016FE4 }, - { "Antarctica/Rothera" , 0x017300 }, - { "Antarctica/South_Pole" , 0x017376 }, - { "Antarctica/Syowa" , 0x01767E }, - { "Antarctica/Vostok" , 0x0176EC }, - { "Arctic/Longyearbyen" , 0x017761 }, - { "Asia/Aden" , 0x017A93 }, - { "Asia/Almaty" , 0x017AE8 }, - { "Asia/Amman" , 0x017C67 }, - { "Asia/Anadyr" , 0x017F27 }, - { "Asia/Aqtau" , 0x018215 }, - { "Asia/Aqtobe" , 0x018414 }, - { "Asia/Ashgabat" , 0x0185CC }, - { "Asia/Ashkhabad" , 0x0186E9 }, - { "Asia/Baghdad" , 0x018806 }, - { "Asia/Bahrain" , 0x01897B }, - { "Asia/Baku" , 0x0189E1 }, - { "Asia/Bangkok" , 0x018CC9 }, - { "Asia/Beirut" , 0x018D1E }, - { "Asia/Bishkek" , 0x01902B }, - { "Asia/Brunei" , 0x0191D7 }, - { "Asia/Calcutta" , 0x019239 }, - { "Asia/Choibalsan" , 0x0192B2 }, - { "Asia/Chongqing" , 0x01942B }, - { "Asia/Chungking" , 0x01951A }, - { "Asia/Colombo" , 0x0195C9 }, - { "Asia/Dacca" , 0x019665 }, - { "Asia/Damascus" , 0x019823 }, - { "Asia/Dhaka" , 0x019B73 }, - { "Asia/Dili" , 0x019D31 }, - { "Asia/Dubai" , 0x019DBA }, - { "Asia/Dushanbe" , 0x019E0F }, - { "Asia/Gaza" , 0x019F12 }, - { "Asia/Harbin" , 0x01A25B }, - { "Asia/Ho_Chi_Minh" , 0x01A342 }, - { "Asia/Hong_Kong" , 0x01A3BA }, - { "Asia/Hovd" , 0x01A586 }, - { "Asia/Irkutsk" , 0x01A6FE }, - { "Asia/Istanbul" , 0x01A9E5 }, - { "Asia/Jakarta" , 0x01ADD2 }, - { "Asia/Jayapura" , 0x01AE7C }, - { "Asia/Jerusalem" , 0x01AF00 }, - { "Asia/Kabul" , 0x01B22F }, - { "Asia/Kamchatka" , 0x01B280 }, - { "Asia/Karachi" , 0x01B565 }, - { "Asia/Kashgar" , 0x01B732 }, - { "Asia/Kathmandu" , 0x01B803 }, - { "Asia/Katmandu" , 0x01B869 }, - { "Asia/Kolkata" , 0x01B8CF }, - { "Asia/Krasnoyarsk" , 0x01B948 }, - { "Asia/Kuala_Lumpur" , 0x01BC31 }, - { "Asia/Kuching" , 0x01BCEE }, - { "Asia/Kuwait" , 0x01BDDC }, - { "Asia/Macao" , 0x01BE31 }, - { "Asia/Macau" , 0x01BF6C }, - { "Asia/Magadan" , 0x01C0A7 }, - { "Asia/Makassar" , 0x01C38A }, - { "Asia/Manila" , 0x01C443 }, - { "Asia/Muscat" , 0x01C4C8 }, - { "Asia/Nicosia" , 0x01C51D }, - { "Asia/Novokuznetsk" , 0x01C805 }, - { "Asia/Novosibirsk" , 0x01CB08 }, - { "Asia/Omsk" , 0x01CDFC }, - { "Asia/Oral" , 0x01D0E4 }, - { "Asia/Phnom_Penh" , 0x01D2B4 }, - { "Asia/Pontianak" , 0x01D32C }, - { "Asia/Pyongyang" , 0x01D3ED }, - { "Asia/Qatar" , 0x01D45A }, - { "Asia/Qyzylorda" , 0x01D4C0 }, - { "Asia/Rangoon" , 0x01D696 }, - { "Asia/Riyadh" , 0x01D70E }, - { "Asia/Saigon" , 0x01D763 }, - { "Asia/Sakhalin" , 0x01D7DB }, - { "Asia/Samarkand" , 0x01DADB }, - { "Asia/Seoul" , 0x01DC11 }, - { "Asia/Shanghai" , 0x01DCB5 }, - { "Asia/Singapore" , 0x01DD95 }, - { "Asia/Taipei" , 0x01DE4C }, - { "Asia/Tashkent" , 0x01DF64 }, - { "Asia/Tbilisi" , 0x01E095 }, - { "Asia/Tehran" , 0x01E24F }, - { "Asia/Tel_Aviv" , 0x01E4BD }, - { "Asia/Thimbu" , 0x01E7EC }, - { "Asia/Thimphu" , 0x01E852 }, - { "Asia/Tokyo" , 0x01E8B8 }, - { "Asia/Ujung_Pandang" , 0x01E941 }, - { "Asia/Ulaanbaatar" , 0x01E9BD }, - { "Asia/Ulan_Bator" , 0x01EB18 }, - { "Asia/Urumqi" , 0x01EC65 }, - { "Asia/Vientiane" , 0x01ED2C }, - { "Asia/Vladivostok" , 0x01EDA4 }, - { "Asia/Yakutsk" , 0x01F091 }, - { "Asia/Yekaterinburg" , 0x01F377 }, - { "Asia/Yerevan" , 0x01F683 }, - { "Atlantic/Azores" , 0x01F987 }, - { "Atlantic/Bermuda" , 0x01FE8A }, - { "Atlantic/Canary" , 0x02016B }, - { "Atlantic/Cape_Verde" , 0x020441 }, - { "Atlantic/Faeroe" , 0x0204BA }, - { "Atlantic/Faroe" , 0x02075E }, - { "Atlantic/Jan_Mayen" , 0x020A02 }, - { "Atlantic/Madeira" , 0x020D34 }, - { "Atlantic/Reykjavik" , 0x02123D }, - { "Atlantic/South_Georgia" , 0x0213F6 }, - { "Atlantic/St_Helena" , 0x02170E }, - { "Atlantic/Stanley" , 0x02143A }, - { "Australia/ACT" , 0x021763 }, - { "Australia/Adelaide" , 0x021A80 }, - { "Australia/Brisbane" , 0x021DAC }, - { "Australia/Broken_Hill" , 0x021E73 }, - { "Australia/Canberra" , 0x0221B1 }, - { "Australia/Currie" , 0x0224CE }, - { "Australia/Darwin" , 0x022801 }, - { "Australia/Eucla" , 0x022887 }, - { "Australia/Hobart" , 0x02295C }, - { "Australia/LHI" , 0x022CBA }, - { "Australia/Lindeman" , 0x022F55 }, - { "Australia/Lord_Howe" , 0x023036 }, - { "Australia/Melbourne" , 0x0232E1 }, - { "Australia/North" , 0x023606 }, - { "Australia/NSW" , 0x02367A }, - { "Australia/Perth" , 0x023997 }, - { "Australia/Queensland" , 0x023A6F }, - { "Australia/South" , 0x023B1B }, - { "Australia/Sydney" , 0x023E38 }, - { "Australia/Tasmania" , 0x024175 }, - { "Australia/Victoria" , 0x0244BA }, - { "Australia/West" , 0x0247D7 }, - { "Australia/Yancowinna" , 0x02488D }, - { "Brazil/Acre" , 0x024BAF }, - { "Brazil/DeNoronha" , 0x024CAE }, - { "Brazil/East" , 0x024DCE }, - { "Brazil/West" , 0x0250AB }, - { "Canada/Atlantic" , 0x0251A3 }, - { "Canada/Central" , 0x02568B }, - { "Canada/East-Saskatchewan" , 0x025F95 }, - { "Canada/Eastern" , 0x025AA5 }, - { "Canada/Mountain" , 0x02611E }, - { "Canada/Newfoundland" , 0x026494 }, - { "Canada/Pacific" , 0x0269BF }, - { "Canada/Saskatchewan" , 0x026DD8 }, - { "Canada/Yukon" , 0x026F61 }, - { "CET" , 0x027264 }, - { "Chile/Continental" , 0x02756D }, - { "Chile/EasterIsland" , 0x027908 }, - { "CST6CDT" , 0x027C4A }, - { "Cuba" , 0x027F9B }, - { "EET" , 0x02830E }, - { "Egypt" , 0x0285C1 }, - { "Eire" , 0x028988 }, - { "EST" , 0x028E99 }, - { "EST5EDT" , 0x028EDD }, - { "Etc/GMT" , 0x02922E }, - { "Etc/GMT+0" , 0x0292FA }, - { "Etc/GMT+1" , 0x029384 }, - { "Etc/GMT+10" , 0x029411 }, - { "Etc/GMT+11" , 0x02949F }, - { "Etc/GMT+12" , 0x02952D }, - { "Etc/GMT+2" , 0x029648 }, - { "Etc/GMT+3" , 0x0296D4 }, - { "Etc/GMT+4" , 0x029760 }, - { "Etc/GMT+5" , 0x0297EC }, - { "Etc/GMT+6" , 0x029878 }, - { "Etc/GMT+7" , 0x029904 }, - { "Etc/GMT+8" , 0x029990 }, - { "Etc/GMT+9" , 0x029A1C }, - { "Etc/GMT-0" , 0x0292B6 }, - { "Etc/GMT-1" , 0x02933E }, - { "Etc/GMT-10" , 0x0293CA }, - { "Etc/GMT-11" , 0x029458 }, - { "Etc/GMT-12" , 0x0294E6 }, - { "Etc/GMT-13" , 0x029574 }, - { "Etc/GMT-14" , 0x0295BB }, - { "Etc/GMT-2" , 0x029602 }, - { "Etc/GMT-3" , 0x02968E }, - { "Etc/GMT-4" , 0x02971A }, - { "Etc/GMT-5" , 0x0297A6 }, - { "Etc/GMT-6" , 0x029832 }, - { "Etc/GMT-7" , 0x0298BE }, - { "Etc/GMT-8" , 0x02994A }, - { "Etc/GMT-9" , 0x0299D6 }, - { "Etc/GMT0" , 0x029272 }, - { "Etc/Greenwich" , 0x029A62 }, - { "Etc/UCT" , 0x029AA6 }, - { "Etc/Universal" , 0x029AEA }, - { "Etc/UTC" , 0x029B2E }, - { "Etc/Zulu" , 0x029B72 }, - { "Europe/Amsterdam" , 0x029BB6 }, - { "Europe/Andorra" , 0x029FF4 }, - { "Europe/Athens" , 0x02A270 }, - { "Europe/Belfast" , 0x02A5B3 }, - { "Europe/Belgrade" , 0x02AAEA }, - { "Europe/Berlin" , 0x02ADB3 }, - { "Europe/Bratislava" , 0x02B109 }, - { "Europe/Brussels" , 0x02B43B }, - { "Europe/Bucharest" , 0x02B872 }, - { "Europe/Budapest" , 0x02BB9C }, - { "Europe/Chisinau" , 0x02BF0F }, - { "Europe/Copenhagen" , 0x02C29D }, - { "Europe/Dublin" , 0x02C5A7 }, - { "Europe/Gibraltar" , 0x02CAB8 }, - { "Europe/Guernsey" , 0x02CF0F }, - { "Europe/Helsinki" , 0x02D446 }, - { "Europe/Isle_of_Man" , 0x02D6FC }, - { "Europe/Istanbul" , 0x02DC33 }, - { "Europe/Jersey" , 0x02E020 }, - { "Europe/Kaliningrad" , 0x02E557 }, - { "Europe/Kiev" , 0x02E8BA }, - { "Europe/Lisbon" , 0x02EBD1 }, - { "Europe/Ljubljana" , 0x02F0D5 }, - { "Europe/London" , 0x02F39E }, - { "Europe/Luxembourg" , 0x02F8D5 }, - { "Europe/Madrid" , 0x02FD2B }, - { "Europe/Malta" , 0x0300F1 }, - { "Europe/Mariehamn" , 0x0304AA }, - { "Europe/Minsk" , 0x030760 }, - { "Europe/Monaco" , 0x030A6B }, - { "Europe/Moscow" , 0x030EA6 }, - { "Europe/Nicosia" , 0x0311F8 }, - { "Europe/Oslo" , 0x0314E0 }, - { "Europe/Paris" , 0x031812 }, - { "Europe/Podgorica" , 0x031C58 }, - { "Europe/Prague" , 0x031F21 }, - { "Europe/Riga" , 0x032253 }, - { "Europe/Rome" , 0x032598 }, - { "Europe/Samara" , 0x03295B }, - { "Europe/San_Marino" , 0x032C87 }, - { "Europe/Sarajevo" , 0x03304A }, - { "Europe/Simferopol" , 0x033313 }, - { "Europe/Skopje" , 0x03363E }, - { "Europe/Sofia" , 0x033907 }, - { "Europe/Stockholm" , 0x033C0F }, - { "Europe/Tallinn" , 0x033EBE }, - { "Europe/Tirane" , 0x0341F8 }, - { "Europe/Tiraspol" , 0x0344FE }, - { "Europe/Uzhgorod" , 0x03488C }, - { "Europe/Vaduz" , 0x034BA3 }, - { "Europe/Vatican" , 0x034E36 }, - { "Europe/Vienna" , 0x0351F9 }, - { "Europe/Vilnius" , 0x035526 }, - { "Europe/Volgograd" , 0x035865 }, - { "Europe/Warsaw" , 0x035B6E }, - { "Europe/Zagreb" , 0x035F4F }, - { "Europe/Zaporozhye" , 0x036218 }, - { "Europe/Zurich" , 0x036559 }, - { "Factory" , 0x036808 }, - { "GB" , 0x036879 }, - { "GB-Eire" , 0x036DB0 }, - { "GMT" , 0x0372E7 }, - { "GMT+0" , 0x0373B3 }, - { "GMT-0" , 0x03736F }, - { "GMT0" , 0x03732B }, - { "Greenwich" , 0x0373F7 }, - { "Hongkong" , 0x03743B }, - { "HST" , 0x037607 }, - { "Iceland" , 0x03764B }, - { "Indian/Antananarivo" , 0x037804 }, - { "Indian/Chagos" , 0x037878 }, - { "Indian/Christmas" , 0x0378DA }, - { "Indian/Cocos" , 0x03791E }, - { "Indian/Comoro" , 0x037962 }, - { "Indian/Kerguelen" , 0x0379B7 }, - { "Indian/Mahe" , 0x037A0C }, - { "Indian/Maldives" , 0x037A61 }, - { "Indian/Mauritius" , 0x037AB6 }, - { "Indian/Mayotte" , 0x037B2C }, - { "Indian/Reunion" , 0x037B81 }, - { "Iran" , 0x037BD6 }, - { "Israel" , 0x037E44 }, - { "Jamaica" , 0x038173 }, - { "Japan" , 0x038238 }, - { "Kwajalein" , 0x0382C1 }, - { "Libya" , 0x038324 }, - { "MET" , 0x03841E }, - { "Mexico/BajaNorte" , 0x038727 }, - { "Mexico/BajaSur" , 0x038A90 }, - { "Mexico/General" , 0x038CD5 }, - { "MST" , 0x038F33 }, - { "MST7MDT" , 0x038F77 }, - { "Navajo" , 0x0392C8 }, - { "NZ" , 0x039641 }, - { "NZ-CHAT" , 0x0399BF }, - { "Pacific/Apia" , 0x039CA7 }, - { "Pacific/Auckland" , 0x039D25 }, - { "Pacific/Chatham" , 0x03A0B1 }, - { "Pacific/Easter" , 0x03A3A8 }, - { "Pacific/Efate" , 0x03A706 }, - { "Pacific/Enderbury" , 0x03A7CC }, - { "Pacific/Fakaofo" , 0x03A83A }, - { "Pacific/Fiji" , 0x03A87E }, - { "Pacific/Funafuti" , 0x03A8FE }, - { "Pacific/Galapagos" , 0x03A942 }, - { "Pacific/Gambier" , 0x03A9BA }, - { "Pacific/Guadalcanal" , 0x03AA1F }, - { "Pacific/Guam" , 0x03AA74 }, - { "Pacific/Honolulu" , 0x03AACA }, - { "Pacific/Johnston" , 0x03AB5E }, - { "Pacific/Kiritimati" , 0x03ABB0 }, - { "Pacific/Kosrae" , 0x03AC1B }, - { "Pacific/Kwajalein" , 0x03AC78 }, - { "Pacific/Majuro" , 0x03ACE4 }, - { "Pacific/Marquesas" , 0x03AD43 }, - { "Pacific/Midway" , 0x03ADAA }, - { "Pacific/Nauru" , 0x03AE34 }, - { "Pacific/Niue" , 0x03AEAC }, - { "Pacific/Norfolk" , 0x03AF0A }, - { "Pacific/Noumea" , 0x03AF5F }, - { "Pacific/Pago_Pago" , 0x03AFEF }, - { "Pacific/Palau" , 0x03B078 }, - { "Pacific/Pitcairn" , 0x03B0BC }, - { "Pacific/Ponape" , 0x03B111 }, - { "Pacific/Port_Moresby" , 0x03B166 }, - { "Pacific/Rarotonga" , 0x03B1AA }, - { "Pacific/Saipan" , 0x03B286 }, - { "Pacific/Samoa" , 0x03B2E9 }, - { "Pacific/Tahiti" , 0x03B372 }, - { "Pacific/Tarawa" , 0x03B3D7 }, - { "Pacific/Tongatapu" , 0x03B42B }, - { "Pacific/Truk" , 0x03B4B7 }, - { "Pacific/Wake" , 0x03B510 }, - { "Pacific/Wallis" , 0x03B560 }, - { "Pacific/Yap" , 0x03B5A4 }, - { "Poland" , 0x03B5E9 }, - { "Portugal" , 0x03B9CA }, - { "PRC" , 0x03BEC6 }, - { "PST8PDT" , 0x03BF77 }, - { "ROC" , 0x03C2C8 }, - { "ROK" , 0x03C3E0 }, - { "Singapore" , 0x03C484 }, - { "Turkey" , 0x03C53B }, - { "UCT" , 0x03C928 }, - { "Universal" , 0x03C96C }, - { "US/Alaska" , 0x03C9B0 }, - { "US/Aleutian" , 0x03CD19 }, - { "US/Arizona" , 0x03D07F }, - { "US/Central" , 0x03D10D }, - { "US/East-Indiana" , 0x03DB17 }, - { "US/Eastern" , 0x03D618 }, - { "US/Hawaii" , 0x03DD81 }, - { "US/Indiana-Starke" , 0x03DE0F }, - { "US/Michigan" , 0x03E180 }, - { "US/Mountain" , 0x03E4B7 }, - { "US/Pacific" , 0x03E830 }, - { "US/Pacific-New" , 0x03EC35 }, - { "US/Samoa" , 0x03F03A }, - { "UTC" , 0x03F0C3 }, - { "W-SU" , 0x03F3BA }, - { "WET" , 0x03F107 }, - { "Zulu" , 0x03F6F5 }, + { "Africa/Ceuta" , 0x000A62 }, + { "Africa/Conakry" , 0x000D69 }, + { "Africa/Dakar" , 0x000DD4 }, + { "Africa/Dar_es_Salaam" , 0x000E3A }, + { "Africa/Djibouti" , 0x000EA7 }, + { "Africa/Douala" , 0x000EFC }, + { "Africa/El_Aaiun" , 0x000F51 }, + { "Africa/Freetown" , 0x000FB7 }, + { "Africa/Gaborone" , 0x0010C6 }, + { "Africa/Harare" , 0x001121 }, + { "Africa/Johannesburg" , 0x001176 }, + { "Africa/Kampala" , 0x0011E4 }, + { "Africa/Khartoum" , 0x001263 }, + { "Africa/Kigali" , 0x001376 }, + { "Africa/Kinshasa" , 0x0013CB }, + { "Africa/Lagos" , 0x001426 }, + { "Africa/Libreville" , 0x00147B }, + { "Africa/Lome" , 0x0014D0 }, + { "Africa/Luanda" , 0x001514 }, + { "Africa/Lubumbashi" , 0x001569 }, + { "Africa/Lusaka" , 0x0015C4 }, + { "Africa/Malabo" , 0x001619 }, + { "Africa/Maputo" , 0x00167F }, + { "Africa/Maseru" , 0x0016D4 }, + { "Africa/Mbabane" , 0x00173C }, + { "Africa/Mogadishu" , 0x001792 }, + { "Africa/Monrovia" , 0x0017ED }, + { "Africa/Nairobi" , 0x001853 }, + { "Africa/Ndjamena" , 0x0018D2 }, + { "Africa/Niamey" , 0x00193E }, + { "Africa/Nouakchott" , 0x0019B1 }, + { "Africa/Ouagadougou" , 0x001A1C }, + { "Africa/Porto-Novo" , 0x001A71 }, + { "Africa/Sao_Tome" , 0x001AD7 }, + { "Africa/Timbuktu" , 0x001B2C }, + { "Africa/Tripoli" , 0x001B97 }, + { "Africa/Tunis" , 0x001C91 }, + { "Africa/Windhoek" , 0x001DA3 }, + { "America/Adak" , 0x001FEA }, + { "America/Anchorage" , 0x002360 }, + { "America/Anguilla" , 0x0026D4 }, + { "America/Antigua" , 0x002729 }, + { "America/Araguaina" , 0x00278F }, + { "America/Argentina/Buenos_Aires" , 0x0028EA }, + { "America/Argentina/Catamarca" , 0x002A98 }, + { "America/Argentina/ComodRivadavia" , 0x002C59 }, + { "America/Argentina/Cordoba" , 0x002DFF }, + { "America/Argentina/Jujuy" , 0x002FD4 }, + { "America/Argentina/La_Rioja" , 0x003188 }, + { "America/Argentina/Mendoza" , 0x003340 }, + { "America/Argentina/Rio_Gallegos" , 0x003500 }, + { "America/Argentina/Salta" , 0x0036B5 }, + { "America/Argentina/San_Juan" , 0x003861 }, + { "America/Argentina/San_Luis" , 0x003A19 }, + { "America/Argentina/Tucuman" , 0x003BDF }, + { "America/Argentina/Ushuaia" , 0x003D9B }, + { "America/Aruba" , 0x003F56 }, + { "America/Asuncion" , 0x003FBC }, + { "America/Atikokan" , 0x0042A1 }, + { "America/Atka" , 0x004377 }, + { "America/Bahia" , 0x0046DD }, + { "America/Barbados" , 0x004866 }, + { "America/Belem" , 0x004900 }, + { "America/Belize" , 0x0049FB }, + { "America/Blanc-Sablon" , 0x004B77 }, + { "America/Boa_Vista" , 0x004C2B }, + { "America/Bogota" , 0x004D34 }, + { "America/Boise" , 0x004DA0 }, + { "America/Buenos_Aires" , 0x005137 }, + { "America/Cambridge_Bay" , 0x0052D0 }, + { "America/Campo_Grande" , 0x0055F8 }, + { "America/Cancun" , 0x0058E7 }, + { "America/Caracas" , 0x005B29 }, + { "America/Catamarca" , 0x005B90 }, + { "America/Cayenne" , 0x005D36 }, + { "America/Cayman" , 0x005D98 }, + { "America/Chicago" , 0x005DED }, + { "America/Chihuahua" , 0x006304 }, + { "America/Coral_Harbour" , 0x00656F }, + { "America/Cordoba" , 0x006601 }, + { "America/Costa_Rica" , 0x0067A7 }, + { "America/Cuiaba" , 0x006831 }, + { "America/Curacao" , 0x006B0F }, + { "America/Danmarkshavn" , 0x006B75 }, + { "America/Dawson" , 0x006CB9 }, + { "America/Dawson_Creek" , 0x006FD6 }, + { "America/Denver" , 0x0071B0 }, + { "America/Detroit" , 0x007536 }, + { "America/Dominica" , 0x007895 }, + { "America/Edmonton" , 0x0078EA }, + { "America/Eirunepe" , 0x007CA2 }, + { "America/El_Salvador" , 0x007DB5 }, + { "America/Ensenada" , 0x007E2A }, + { "America/Fort_Wayne" , 0x0082D1 }, + { "America/Fortaleza" , 0x008193 }, + { "America/Glace_Bay" , 0x00853B }, + { "America/Godthab" , 0x0088B2 }, + { "America/Goose_Bay" , 0x008B76 }, + { "America/Grand_Turk" , 0x009033 }, + { "America/Grenada" , 0x0092E2 }, + { "America/Guadeloupe" , 0x009337 }, + { "America/Guatemala" , 0x00938C }, + { "America/Guayaquil" , 0x009415 }, + { "America/Guyana" , 0x009472 }, + { "America/Halifax" , 0x0094F3 }, + { "America/Havana" , 0x009A09 }, + { "America/Hermosillo" , 0x009D7C }, + { "America/Indiana/Indianapolis" , 0x009E5A }, + { "America/Indiana/Knox" , 0x00A0EB }, + { "America/Indiana/Marengo" , 0x00A482 }, + { "America/Indiana/Petersburg" , 0x00A728 }, + { "America/Indiana/Tell_City" , 0x00AC75 }, + { "America/Indiana/Vevay" , 0x00AF0E }, + { "America/Indiana/Vincennes" , 0x00B149 }, + { "America/Indiana/Winamac" , 0x00B3FD }, + { "America/Indianapolis" , 0x00AA0B }, + { "America/Inuvik" , 0x00B6B6 }, + { "America/Iqaluit" , 0x00B9AD }, + { "America/Jamaica" , 0x00BCCF }, + { "America/Jujuy" , 0x00BD94 }, + { "America/Juneau" , 0x00BF3E }, + { "America/Kentucky/Louisville" , 0x00C2BC }, + { "America/Kentucky/Monticello" , 0x00C6DA }, + { "America/Knox_IN" , 0x00CA5F }, + { "America/La_Paz" , 0x00CDD0 }, + { "America/Lima" , 0x00CE37 }, + { "America/Los_Angeles" , 0x00CEDF }, + { "America/Louisville" , 0x00D2F0 }, + { "America/Maceio" , 0x00D6E5 }, + { "America/Managua" , 0x00D81F }, + { "America/Manaus" , 0x00D8D2 }, + { "America/Marigot" , 0x00D9D4 }, + { "America/Martinique" , 0x00DA29 }, + { "America/Matamoros" , 0x00DA95 }, + { "America/Mazatlan" , 0x00DCEE }, + { "America/Mendoza" , 0x00DF5B }, + { "America/Menominee" , 0x00E10F }, + { "America/Merida" , 0x00E490 }, + { "America/Mexico_City" , 0x00E6CB }, + { "America/Miquelon" , 0x00E946 }, + { "America/Moncton" , 0x00EBB8 }, + { "America/Monterrey" , 0x00F04F }, + { "America/Montevideo" , 0x00F2B2 }, + { "America/Montreal" , 0x00F5C4 }, + { "America/Montserrat" , 0x00FADA }, + { "America/Nassau" , 0x00FB2F }, + { "America/New_York" , 0x00FE74 }, + { "America/Nipigon" , 0x01037F }, + { "America/Nome" , 0x0106D0 }, + { "America/Noronha" , 0x010A4E }, + { "America/North_Dakota/Center" , 0x010B7E }, + { "America/North_Dakota/New_Salem" , 0x010F12 }, + { "America/Ojinaga" , 0x0112BB }, + { "America/Panama" , 0x01151C }, + { "America/Pangnirtung" , 0x011571 }, + { "America/Paramaribo" , 0x0118A7 }, + { "America/Phoenix" , 0x011939 }, + { "America/Port-au-Prince" , 0x0119E7 }, + { "America/Port_of_Spain" , 0x011C02 }, + { "America/Porto_Acre" , 0x011B03 }, + { "America/Porto_Velho" , 0x011C57 }, + { "America/Puerto_Rico" , 0x011D4D }, + { "America/Rainy_River" , 0x011DB8 }, + { "America/Rankin_Inlet" , 0x0120F0 }, + { "America/Recife" , 0x0123D6 }, + { "America/Regina" , 0x012500 }, + { "America/Resolute" , 0x0126BE }, + { "America/Rio_Branco" , 0x0129B7 }, + { "America/Rosario" , 0x012ABA }, + { "America/Santa_Isabel" , 0x012C60 }, + { "America/Santarem" , 0x013003 }, + { "America/Santiago" , 0x013108 }, + { "America/Santo_Domingo" , 0x0134B1 }, + { "America/Sao_Paulo" , 0x013577 }, + { "America/Scoresbysund" , 0x013886 }, + { "America/Shiprock" , 0x013B74 }, + { "America/St_Barthelemy" , 0x013F03 }, + { "America/St_Johns" , 0x013F58 }, + { "America/St_Kitts" , 0x0144AB }, + { "America/St_Lucia" , 0x014500 }, + { "America/St_Thomas" , 0x014555 }, + { "America/St_Vincent" , 0x0145AA }, + { "America/Swift_Current" , 0x0145FF }, + { "America/Tegucigalpa" , 0x014720 }, + { "America/Thule" , 0x01479F }, + { "America/Thunder_Bay" , 0x0149E6 }, + { "America/Tijuana" , 0x014D2F }, + { "America/Toronto" , 0x0150C8 }, + { "America/Tortola" , 0x0155DF }, + { "America/Vancouver" , 0x015634 }, + { "America/Virgin" , 0x015A71 }, + { "America/Whitehorse" , 0x015AC6 }, + { "America/Winnipeg" , 0x015DE3 }, + { "America/Yakutat" , 0x016223 }, + { "America/Yellowknife" , 0x01658E }, + { "Antarctica/Casey" , 0x01689E }, + { "Antarctica/Davis" , 0x016929 }, + { "Antarctica/DumontDUrville" , 0x0169C0 }, + { "Antarctica/Macquarie" , 0x016A52 }, + { "Antarctica/Mawson" , 0x016CCC }, + { "Antarctica/McMurdo" , 0x016D48 }, + { "Antarctica/Palmer" , 0x01704A }, + { "Antarctica/Rothera" , 0x017366 }, + { "Antarctica/South_Pole" , 0x0173DC }, + { "Antarctica/Syowa" , 0x0176E4 }, + { "Antarctica/Vostok" , 0x017752 }, + { "Arctic/Longyearbyen" , 0x0177C7 }, + { "Asia/Aden" , 0x017AF9 }, + { "Asia/Almaty" , 0x017B4E }, + { "Asia/Amman" , 0x017CCD }, + { "Asia/Anadyr" , 0x017F8D }, + { "Asia/Aqtau" , 0x01827B }, + { "Asia/Aqtobe" , 0x01847A }, + { "Asia/Ashgabat" , 0x018632 }, + { "Asia/Ashkhabad" , 0x01874F }, + { "Asia/Baghdad" , 0x01886C }, + { "Asia/Bahrain" , 0x0189E1 }, + { "Asia/Baku" , 0x018A47 }, + { "Asia/Bangkok" , 0x018D2F }, + { "Asia/Beirut" , 0x018D84 }, + { "Asia/Bishkek" , 0x019091 }, + { "Asia/Brunei" , 0x01923D }, + { "Asia/Calcutta" , 0x01929F }, + { "Asia/Choibalsan" , 0x019318 }, + { "Asia/Chongqing" , 0x019491 }, + { "Asia/Chungking" , 0x019580 }, + { "Asia/Colombo" , 0x01962F }, + { "Asia/Dacca" , 0x0196CB }, + { "Asia/Damascus" , 0x019771 }, + { "Asia/Dhaka" , 0x019AC1 }, + { "Asia/Dili" , 0x019B67 }, + { "Asia/Dubai" , 0x019BF0 }, + { "Asia/Dushanbe" , 0x019C45 }, + { "Asia/Gaza" , 0x019D48 }, + { "Asia/Harbin" , 0x01A091 }, + { "Asia/Ho_Chi_Minh" , 0x01A178 }, + { "Asia/Hong_Kong" , 0x01A1F0 }, + { "Asia/Hovd" , 0x01A3BC }, + { "Asia/Irkutsk" , 0x01A534 }, + { "Asia/Istanbul" , 0x01A81B }, + { "Asia/Jakarta" , 0x01AC08 }, + { "Asia/Jayapura" , 0x01ACB2 }, + { "Asia/Jerusalem" , 0x01AD36 }, + { "Asia/Kabul" , 0x01B065 }, + { "Asia/Kamchatka" , 0x01B0B6 }, + { "Asia/Karachi" , 0x01B39B }, + { "Asia/Kashgar" , 0x01B450 }, + { "Asia/Kathmandu" , 0x01B521 }, + { "Asia/Katmandu" , 0x01B587 }, + { "Asia/Kolkata" , 0x01B5ED }, + { "Asia/Krasnoyarsk" , 0x01B666 }, + { "Asia/Kuala_Lumpur" , 0x01B94F }, + { "Asia/Kuching" , 0x01BA0C }, + { "Asia/Kuwait" , 0x01BAFA }, + { "Asia/Macao" , 0x01BB4F }, + { "Asia/Macau" , 0x01BC8A }, + { "Asia/Magadan" , 0x01BDC5 }, + { "Asia/Makassar" , 0x01C0A8 }, + { "Asia/Manila" , 0x01C161 }, + { "Asia/Muscat" , 0x01C1E6 }, + { "Asia/Nicosia" , 0x01C23B }, + { "Asia/Novokuznetsk" , 0x01C523 }, + { "Asia/Novosibirsk" , 0x01C826 }, + { "Asia/Omsk" , 0x01CB1A }, + { "Asia/Oral" , 0x01CE02 }, + { "Asia/Phnom_Penh" , 0x01CFD2 }, + { "Asia/Pontianak" , 0x01D04A }, + { "Asia/Pyongyang" , 0x01D10B }, + { "Asia/Qatar" , 0x01D178 }, + { "Asia/Qyzylorda" , 0x01D1DE }, + { "Asia/Rangoon" , 0x01D3B4 }, + { "Asia/Riyadh" , 0x01D42C }, + { "Asia/Saigon" , 0x01D481 }, + { "Asia/Sakhalin" , 0x01D4F9 }, + { "Asia/Samarkand" , 0x01D7F9 }, + { "Asia/Seoul" , 0x01D92F }, + { "Asia/Shanghai" , 0x01D9D3 }, + { "Asia/Singapore" , 0x01DAB3 }, + { "Asia/Taipei" , 0x01DB6A }, + { "Asia/Tashkent" , 0x01DC82 }, + { "Asia/Tbilisi" , 0x01DDB3 }, + { "Asia/Tehran" , 0x01DF6D }, + { "Asia/Tel_Aviv" , 0x01E1DB }, + { "Asia/Thimbu" , 0x01E50A }, + { "Asia/Thimphu" , 0x01E570 }, + { "Asia/Tokyo" , 0x01E5D6 }, + { "Asia/Ujung_Pandang" , 0x01E65F }, + { "Asia/Ulaanbaatar" , 0x01E6DB }, + { "Asia/Ulan_Bator" , 0x01E836 }, + { "Asia/Urumqi" , 0x01E983 }, + { "Asia/Vientiane" , 0x01EA4A }, + { "Asia/Vladivostok" , 0x01EAC2 }, + { "Asia/Yakutsk" , 0x01EDAF }, + { "Asia/Yekaterinburg" , 0x01F095 }, + { "Asia/Yerevan" , 0x01F3A1 }, + { "Atlantic/Azores" , 0x01F6A5 }, + { "Atlantic/Bermuda" , 0x01FBA8 }, + { "Atlantic/Canary" , 0x01FE89 }, + { "Atlantic/Cape_Verde" , 0x02015F }, + { "Atlantic/Faeroe" , 0x0201D8 }, + { "Atlantic/Faroe" , 0x02047C }, + { "Atlantic/Jan_Mayen" , 0x020720 }, + { "Atlantic/Madeira" , 0x020A52 }, + { "Atlantic/Reykjavik" , 0x020F5B }, + { "Atlantic/South_Georgia" , 0x021114 }, + { "Atlantic/St_Helena" , 0x02142C }, + { "Atlantic/Stanley" , 0x021158 }, + { "Australia/ACT" , 0x021481 }, + { "Australia/Adelaide" , 0x02179E }, + { "Australia/Brisbane" , 0x021ACA }, + { "Australia/Broken_Hill" , 0x021B91 }, + { "Australia/Canberra" , 0x021ECF }, + { "Australia/Currie" , 0x0221EC }, + { "Australia/Darwin" , 0x02251F }, + { "Australia/Eucla" , 0x0225A5 }, + { "Australia/Hobart" , 0x02267A }, + { "Australia/LHI" , 0x0229D8 }, + { "Australia/Lindeman" , 0x022C73 }, + { "Australia/Lord_Howe" , 0x022D54 }, + { "Australia/Melbourne" , 0x022FFF }, + { "Australia/North" , 0x023324 }, + { "Australia/NSW" , 0x023398 }, + { "Australia/Perth" , 0x0236B5 }, + { "Australia/Queensland" , 0x02378D }, + { "Australia/South" , 0x023839 }, + { "Australia/Sydney" , 0x023B56 }, + { "Australia/Tasmania" , 0x023E93 }, + { "Australia/Victoria" , 0x0241D8 }, + { "Australia/West" , 0x0244F5 }, + { "Australia/Yancowinna" , 0x0245AB }, + { "Brazil/Acre" , 0x0248CD }, + { "Brazil/DeNoronha" , 0x0249CC }, + { "Brazil/East" , 0x024AEC }, + { "Brazil/West" , 0x024DC9 }, + { "Canada/Atlantic" , 0x024EC1 }, + { "Canada/Central" , 0x0253A9 }, + { "Canada/East-Saskatchewan" , 0x025CB3 }, + { "Canada/Eastern" , 0x0257C3 }, + { "Canada/Mountain" , 0x025E3C }, + { "Canada/Newfoundland" , 0x0261B2 }, + { "Canada/Pacific" , 0x0266DD }, + { "Canada/Saskatchewan" , 0x026AF6 }, + { "Canada/Yukon" , 0x026C7F }, + { "CET" , 0x026F82 }, + { "Chile/Continental" , 0x02728B }, + { "Chile/EasterIsland" , 0x027626 }, + { "CST6CDT" , 0x027968 }, + { "Cuba" , 0x027CB9 }, + { "EET" , 0x02802C }, + { "Egypt" , 0x0282DF }, + { "Eire" , 0x0286A6 }, + { "EST" , 0x028BB7 }, + { "EST5EDT" , 0x028BFB }, + { "Etc/GMT" , 0x028F4C }, + { "Etc/GMT+0" , 0x029018 }, + { "Etc/GMT+1" , 0x0290A2 }, + { "Etc/GMT+10" , 0x02912F }, + { "Etc/GMT+11" , 0x0291BD }, + { "Etc/GMT+12" , 0x02924B }, + { "Etc/GMT+2" , 0x029366 }, + { "Etc/GMT+3" , 0x0293F2 }, + { "Etc/GMT+4" , 0x02947E }, + { "Etc/GMT+5" , 0x02950A }, + { "Etc/GMT+6" , 0x029596 }, + { "Etc/GMT+7" , 0x029622 }, + { "Etc/GMT+8" , 0x0296AE }, + { "Etc/GMT+9" , 0x02973A }, + { "Etc/GMT-0" , 0x028FD4 }, + { "Etc/GMT-1" , 0x02905C }, + { "Etc/GMT-10" , 0x0290E8 }, + { "Etc/GMT-11" , 0x029176 }, + { "Etc/GMT-12" , 0x029204 }, + { "Etc/GMT-13" , 0x029292 }, + { "Etc/GMT-14" , 0x0292D9 }, + { "Etc/GMT-2" , 0x029320 }, + { "Etc/GMT-3" , 0x0293AC }, + { "Etc/GMT-4" , 0x029438 }, + { "Etc/GMT-5" , 0x0294C4 }, + { "Etc/GMT-6" , 0x029550 }, + { "Etc/GMT-7" , 0x0295DC }, + { "Etc/GMT-8" , 0x029668 }, + { "Etc/GMT-9" , 0x0296F4 }, + { "Etc/GMT0" , 0x028F90 }, + { "Etc/Greenwich" , 0x029780 }, + { "Etc/UCT" , 0x0297C4 }, + { "Etc/Universal" , 0x029808 }, + { "Etc/UTC" , 0x02984C }, + { "Etc/Zulu" , 0x029890 }, + { "Europe/Amsterdam" , 0x0298D4 }, + { "Europe/Andorra" , 0x029D12 }, + { "Europe/Athens" , 0x029F8E }, + { "Europe/Belfast" , 0x02A2D1 }, + { "Europe/Belgrade" , 0x02A808 }, + { "Europe/Berlin" , 0x02AAD1 }, + { "Europe/Bratislava" , 0x02AE27 }, + { "Europe/Brussels" , 0x02B159 }, + { "Europe/Bucharest" , 0x02B590 }, + { "Europe/Budapest" , 0x02B8BA }, + { "Europe/Chisinau" , 0x02BC2D }, + { "Europe/Copenhagen" , 0x02BFBB }, + { "Europe/Dublin" , 0x02C2C5 }, + { "Europe/Gibraltar" , 0x02C7D6 }, + { "Europe/Guernsey" , 0x02CC2D }, + { "Europe/Helsinki" , 0x02D164 }, + { "Europe/Isle_of_Man" , 0x02D41A }, + { "Europe/Istanbul" , 0x02D951 }, + { "Europe/Jersey" , 0x02DD3E }, + { "Europe/Kaliningrad" , 0x02E275 }, + { "Europe/Kiev" , 0x02E5D8 }, + { "Europe/Lisbon" , 0x02E8EF }, + { "Europe/Ljubljana" , 0x02EDF3 }, + { "Europe/London" , 0x02F0BC }, + { "Europe/Luxembourg" , 0x02F5F3 }, + { "Europe/Madrid" , 0x02FA49 }, + { "Europe/Malta" , 0x02FE0F }, + { "Europe/Mariehamn" , 0x0301C8 }, + { "Europe/Minsk" , 0x03047E }, + { "Europe/Monaco" , 0x030789 }, + { "Europe/Moscow" , 0x030BC4 }, + { "Europe/Nicosia" , 0x030F16 }, + { "Europe/Oslo" , 0x0311FE }, + { "Europe/Paris" , 0x031530 }, + { "Europe/Podgorica" , 0x031976 }, + { "Europe/Prague" , 0x031C3F }, + { "Europe/Riga" , 0x031F71 }, + { "Europe/Rome" , 0x0322B6 }, + { "Europe/Samara" , 0x032679 }, + { "Europe/San_Marino" , 0x0329B2 }, + { "Europe/Sarajevo" , 0x032D75 }, + { "Europe/Simferopol" , 0x03303E }, + { "Europe/Skopje" , 0x033369 }, + { "Europe/Sofia" , 0x033632 }, + { "Europe/Stockholm" , 0x03393A }, + { "Europe/Tallinn" , 0x033BE9 }, + { "Europe/Tirane" , 0x033F23 }, + { "Europe/Tiraspol" , 0x034229 }, + { "Europe/Uzhgorod" , 0x0345B7 }, + { "Europe/Vaduz" , 0x0348CE }, + { "Europe/Vatican" , 0x034B61 }, + { "Europe/Vienna" , 0x034F24 }, + { "Europe/Vilnius" , 0x035251 }, + { "Europe/Volgograd" , 0x035590 }, + { "Europe/Warsaw" , 0x035899 }, + { "Europe/Zagreb" , 0x035C7A }, + { "Europe/Zaporozhye" , 0x035F43 }, + { "Europe/Zurich" , 0x036284 }, + { "Factory" , 0x036533 }, + { "GB" , 0x0365A4 }, + { "GB-Eire" , 0x036ADB }, + { "GMT" , 0x037012 }, + { "GMT+0" , 0x0370DE }, + { "GMT-0" , 0x03709A }, + { "GMT0" , 0x037056 }, + { "Greenwich" , 0x037122 }, + { "Hongkong" , 0x037166 }, + { "HST" , 0x037332 }, + { "Iceland" , 0x037376 }, + { "Indian/Antananarivo" , 0x03752F }, + { "Indian/Chagos" , 0x0375A3 }, + { "Indian/Christmas" , 0x037605 }, + { "Indian/Cocos" , 0x037649 }, + { "Indian/Comoro" , 0x03768D }, + { "Indian/Kerguelen" , 0x0376E2 }, + { "Indian/Mahe" , 0x037737 }, + { "Indian/Maldives" , 0x03778C }, + { "Indian/Mauritius" , 0x0377E1 }, + { "Indian/Mayotte" , 0x037857 }, + { "Indian/Reunion" , 0x0378AC }, + { "Iran" , 0x037901 }, + { "Israel" , 0x037B6F }, + { "Jamaica" , 0x037E9E }, + { "Japan" , 0x037F63 }, + { "Kwajalein" , 0x037FEC }, + { "Libya" , 0x03804F }, + { "MET" , 0x038149 }, + { "Mexico/BajaNorte" , 0x038452 }, + { "Mexico/BajaSur" , 0x0387BB }, + { "Mexico/General" , 0x038A00 }, + { "MST" , 0x038C5E }, + { "MST7MDT" , 0x038CA2 }, + { "Navajo" , 0x038FF3 }, + { "NZ" , 0x03936C }, + { "NZ-CHAT" , 0x0396EA }, + { "Pacific/Apia" , 0x0399D2 }, + { "Pacific/Auckland" , 0x039A50 }, + { "Pacific/Chatham" , 0x039DDC }, + { "Pacific/Easter" , 0x03A0D3 }, + { "Pacific/Efate" , 0x03A431 }, + { "Pacific/Enderbury" , 0x03A4F7 }, + { "Pacific/Fakaofo" , 0x03A565 }, + { "Pacific/Fiji" , 0x03A5A9 }, + { "Pacific/Funafuti" , 0x03A633 }, + { "Pacific/Galapagos" , 0x03A677 }, + { "Pacific/Gambier" , 0x03A6EF }, + { "Pacific/Guadalcanal" , 0x03A754 }, + { "Pacific/Guam" , 0x03A7A9 }, + { "Pacific/Honolulu" , 0x03A7FF }, + { "Pacific/Johnston" , 0x03A893 }, + { "Pacific/Kiritimati" , 0x03A8E5 }, + { "Pacific/Kosrae" , 0x03A950 }, + { "Pacific/Kwajalein" , 0x03A9AD }, + { "Pacific/Majuro" , 0x03AA19 }, + { "Pacific/Marquesas" , 0x03AA78 }, + { "Pacific/Midway" , 0x03AADF }, + { "Pacific/Nauru" , 0x03AB69 }, + { "Pacific/Niue" , 0x03ABE1 }, + { "Pacific/Norfolk" , 0x03AC3F }, + { "Pacific/Noumea" , 0x03AC94 }, + { "Pacific/Pago_Pago" , 0x03AD24 }, + { "Pacific/Palau" , 0x03ADAD }, + { "Pacific/Pitcairn" , 0x03ADF1 }, + { "Pacific/Ponape" , 0x03AE46 }, + { "Pacific/Port_Moresby" , 0x03AE9B }, + { "Pacific/Rarotonga" , 0x03AEDF }, + { "Pacific/Saipan" , 0x03AFBB }, + { "Pacific/Samoa" , 0x03B01E }, + { "Pacific/Tahiti" , 0x03B0A7 }, + { "Pacific/Tarawa" , 0x03B10C }, + { "Pacific/Tongatapu" , 0x03B160 }, + { "Pacific/Truk" , 0x03B1EC }, + { "Pacific/Wake" , 0x03B245 }, + { "Pacific/Wallis" , 0x03B295 }, + { "Pacific/Yap" , 0x03B2D9 }, + { "Poland" , 0x03B31E }, + { "Portugal" , 0x03B6FF }, + { "PRC" , 0x03BBFB }, + { "PST8PDT" , 0x03BCAC }, + { "ROC" , 0x03BFFD }, + { "ROK" , 0x03C115 }, + { "Singapore" , 0x03C1B9 }, + { "Turkey" , 0x03C270 }, + { "UCT" , 0x03C65D }, + { "Universal" , 0x03C6A1 }, + { "US/Alaska" , 0x03C6E5 }, + { "US/Aleutian" , 0x03CA4E }, + { "US/Arizona" , 0x03CDB4 }, + { "US/Central" , 0x03CE42 }, + { "US/East-Indiana" , 0x03D84C }, + { "US/Eastern" , 0x03D34D }, + { "US/Hawaii" , 0x03DAB6 }, + { "US/Indiana-Starke" , 0x03DB44 }, + { "US/Michigan" , 0x03DEB5 }, + { "US/Mountain" , 0x03E1EC }, + { "US/Pacific" , 0x03E565 }, + { "US/Pacific-New" , 0x03E96A }, + { "US/Samoa" , 0x03ED6F }, + { "UTC" , 0x03EDF8 }, + { "W-SU" , 0x03F0EF }, + { "WET" , 0x03EE3C }, + { "Zulu" , 0x03F42A }, }; /* This is a generated file, do not modify */ -const unsigned char timelib_timezone_db_data_builtin[259897] = { +const unsigned char timelib_timezone_db_data_builtin[259182] = { /* Africa/Abidjan */ @@ -759,18 +760,19 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* Africa/Casablanca */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4D, 0x41, 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, 0x17, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x96, 0x51, 0xF9, 0x9C, +0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x11, 0x96, 0x51, 0xF9, 0x9C, 0xC6, 0xFF, 0x14, 0x80, 0xC7, 0x58, 0xAC, 0x70, 0xC7, 0xD9, 0xED, 0x80, 0xD2, 0xA1, 0x32, 0xF0, 0xDB, 0x35, 0xA4, 0x00, 0xDB, 0xEE, 0x27, 0xF0, 0xFB, 0x25, 0x72, 0x40, 0xFB, 0xC2, 0xEF, 0x70, 0x08, 0x6B, 0x84, 0x80, 0x08, 0xC6, 0x6D, 0xF0, 0x0B, 0xE8, 0x0C, 0x00, 0x0C, 0x61, 0x47, 0xF0, 0x0D, 0xC9, 0x3F, 0x80, 0x0E, 0x8E, 0xF2, 0x70, 0x0F, 0xD3, 0x51, 0x80, 0x10, 0x27, 0xA3, 0x70, 0x1A, 0xB7, 0xA6, 0x00, 0x1E, 0x18, 0x6F, 0xF0, 0x48, 0x41, 0xE6, 0x80, 0x48, 0xBB, 0x22, 0x70, -0x4A, 0x23, 0x1A, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, -0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, -0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, -0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, -0x57, 0x45, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, 0x16, 0x42, 0x00, 0x00, 0x00, 0x00, +0x4A, 0x23, 0x1A, 0x00, 0x4A, 0x8D, 0xD5, 0x70, 0x4B, 0xDC, 0xC0, 0x80, 0x4C, 0x5D, 0xE5, 0x70, +0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x02, 0x03, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0xFF, 0xFF, 0xF8, 0xE4, 0x00, 0x00, 0x00, +0x00, 0x0E, 0x10, 0x01, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, +0x0D, 0x4C, 0x4D, 0x54, 0x00, 0x57, 0x45, 0x53, 0x54, 0x00, 0x57, 0x45, 0x54, 0x00, 0x43, 0x45, +0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBC, 0xAC, 0xC8, 0x01, 0x07, +0x16, 0x42, 0x00, 0x00, 0x00, 0x00, /* Africa/Ceuta */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x45, 0x53, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1156,7 +1158,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* Africa/Tunis */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0x91, 0x60, 0x50, 0x4F, +0x00, 0x00, 0x00, 0x21, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0D, 0x91, 0x60, 0x50, 0x4F, 0xC6, 0x3A, 0x88, 0xE0, 0xC7, 0x58, 0x9E, 0x60, 0xC7, 0xDB, 0x22, 0xE0, 0xCA, 0xE2, 0x54, 0xE0, 0xCB, 0xAD, 0x69, 0xF0, 0xCC, 0xE7, 0x4B, 0x10, 0xCD, 0xA9, 0x17, 0x90, 0xCD, 0xC2, 0x16, 0x00, 0xCD, 0xCC, 0xB0, 0x10, 0xCE, 0xA2, 0x35, 0x00, 0xCF, 0x92, 0x34, 0x10, 0xD0, 0x89, 0xE3, 0xE0, @@ -1165,30 +1167,13 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x24, 0x2C, 0x19, 0xF0, 0x25, 0x1C, 0x0A, 0xF0, 0x26, 0x3C, 0xC3, 0x70, 0x27, 0x05, 0x27, 0x70, 0x42, 0x74, 0x0D, 0xF0, 0x43, 0x3C, 0x80, 0x00, 0x44, 0x25, 0xE7, 0x90, 0x45, 0x43, 0xFD, 0x10, 0x46, 0x05, 0xC9, 0x90, 0x47, 0x23, 0xDF, 0x10, 0x47, 0xEE, 0xE6, 0x10, 0x49, 0x03, 0xC1, 0x10, -0x4B, 0xAE, 0xAA, 0x10, 0x4C, 0xCC, 0xBF, 0x90, 0x4D, 0x8E, 0x8C, 0x10, 0x4E, 0xAC, 0xA1, 0x90, -0x4F, 0x6E, 0x6E, 0x10, 0x50, 0x8C, 0x83, 0x90, 0x51, 0x57, 0x8A, 0x90, 0x52, 0x6C, 0x65, 0x90, -0x53, 0x37, 0x6C, 0x90, 0x54, 0x4C, 0x47, 0x90, 0x55, 0x17, 0x4E, 0x90, 0x56, 0x2C, 0x29, 0x90, -0x56, 0xF7, 0x30, 0x90, 0x58, 0x15, 0x46, 0x10, 0x58, 0xD7, 0x12, 0x90, 0x59, 0xF5, 0x28, 0x10, -0x5A, 0xB6, 0xF4, 0x90, 0x5B, 0xD5, 0x0A, 0x10, 0x5C, 0xA0, 0x11, 0x10, 0x5D, 0xB4, 0xEC, 0x10, -0x5E, 0x7F, 0xF3, 0x10, 0x5F, 0x94, 0xCE, 0x10, 0x60, 0x5F, 0xD5, 0x10, 0x61, 0x7D, 0xEA, 0x90, -0x62, 0x3F, 0xB7, 0x10, 0x63, 0x5D, 0xCC, 0x90, 0x64, 0x1F, 0x99, 0x10, 0x65, 0x3D, 0xAE, 0x90, -0x66, 0x08, 0xB5, 0x90, 0x67, 0x1D, 0x90, 0x90, 0x67, 0xE8, 0x97, 0x90, 0x68, 0xFD, 0x72, 0x90, -0x69, 0xC8, 0x79, 0x90, 0x6A, 0xDD, 0x54, 0x90, 0x6B, 0xA8, 0x5B, 0x90, 0x6C, 0xC6, 0x71, 0x10, -0x6D, 0x88, 0x3D, 0x90, 0x6E, 0xA6, 0x53, 0x10, 0x6F, 0x68, 0x1F, 0x90, 0x70, 0x86, 0x35, 0x10, -0x71, 0x51, 0x3C, 0x10, 0x72, 0x66, 0x17, 0x10, 0x73, 0x31, 0x1E, 0x10, 0x74, 0x45, 0xF9, 0x10, -0x75, 0x11, 0x00, 0x10, 0x76, 0x2F, 0x15, 0x90, 0x76, 0xF0, 0xE2, 0x10, 0x78, 0x0E, 0xF7, 0x90, -0x78, 0xD0, 0xC4, 0x10, 0x79, 0xEE, 0xD9, 0x90, 0x7A, 0xB0, 0xA6, 0x10, 0x7B, 0xCE, 0xBB, 0x90, -0x7C, 0x99, 0xC2, 0x90, 0x7D, 0xAE, 0x9D, 0x90, 0x7E, 0x79, 0xA4, 0x90, 0x7F, 0x8E, 0x7F, 0x90, 0x03, 0x01, 0x02, 0x01, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 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, 0x00, 0x00, 0x02, 0x31, 0x00, 0x00, 0x00, -0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, -0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x50, 0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, -0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, -0x7B, 0x40, 0x01, 0x22, 0x32, 0x5D, 0x00, 0x00, 0x00, 0x00, +0x02, 0x00, 0x00, 0x02, 0x31, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x00, 0x00, 0x0E, +0x10, 0x00, 0x09, 0x00, 0x00, 0x0E, 0x10, 0x00, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x01, 0x04, 0x50, +0x4D, 0x54, 0x00, 0x43, 0x45, 0x53, 0x54, 0x00, 0x43, 0x45, 0x54, 0x00, 0x00, 0x01, 0x01, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC1, 0x7B, 0x40, 0x01, 0x22, 0x32, 0x5D, 0x00, 0x00, +0x00, 0x00, /* Africa/Windhoek */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4E, 0x41, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -1690,7 +1675,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* America/Argentina/San_Luis */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x75, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30, +0x00, 0x00, 0x00, 0x3D, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x18, 0xA2, 0x92, 0x8F, 0x30, 0xB6, 0x7B, 0x52, 0x40, 0xB7, 0x1A, 0xC9, 0xB0, 0xB8, 0x1E, 0x8F, 0x40, 0xB8, 0xD4, 0x70, 0x30, 0xBA, 0x17, 0x7D, 0xC0, 0xBA, 0xB5, 0xA3, 0xB0, 0xBB, 0xF8, 0xB1, 0x40, 0xBC, 0x96, 0xD7, 0x30, 0xBD, 0xD9, 0xE4, 0xC0, 0xBE, 0x78, 0x0A, 0xB0, 0xBF, 0xBB, 0x18, 0x40, 0xC0, 0x5A, 0x8F, 0xB0, @@ -1706,34 +1691,17 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x27, 0xCD, 0xC3, 0xB0, 0x28, 0x47, 0x1B, 0xC0, 0x37, 0xF6, 0xC6, 0xB0, 0x38, 0xBF, 0x2A, 0xB0, 0x40, 0xBA, 0x9F, 0xB0, 0x41, 0x03, 0x30, 0x40, 0x47, 0x77, 0x09, 0xB0, 0x47, 0x93, 0xFC, 0xA0, 0x47, 0xD3, 0x52, 0xB0, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xB3, 0x34, 0xB0, 0x4A, 0xD1, 0x58, 0x40, -0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, -0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, -0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x54, 0xFB, 0xBB, 0x30, 0x56, 0x19, 0xDE, 0xC0, -0x56, 0xE4, 0xD7, 0xB0, 0x57, 0xF9, 0xC0, 0xC0, 0x58, 0xC4, 0xB9, 0xB0, 0x59, 0xD9, 0xA2, 0xC0, -0x5A, 0xA4, 0x9B, 0xB0, 0x5B, 0xC2, 0xBF, 0x40, 0x5C, 0x84, 0x7D, 0xB0, 0x5D, 0xA2, 0xA1, 0x40, -0x5E, 0x64, 0x5F, 0xB0, 0x5F, 0x82, 0x83, 0x40, 0x60, 0x4D, 0x7C, 0x30, 0x61, 0x62, 0x65, 0x40, -0x62, 0x2D, 0x5E, 0x30, 0x63, 0x42, 0x47, 0x40, 0x64, 0x0D, 0x40, 0x30, 0x65, 0x22, 0x29, 0x40, -0x65, 0xED, 0x22, 0x30, 0x67, 0x0B, 0x45, 0xC0, 0x67, 0xCD, 0x04, 0x30, 0x68, 0xEB, 0x27, 0xC0, -0x69, 0xAC, 0xE6, 0x30, 0x6A, 0xCB, 0x09, 0xC0, 0x6B, 0x96, 0x02, 0xB0, 0x6C, 0xAA, 0xEB, 0xC0, -0x6D, 0x75, 0xE4, 0xB0, 0x6E, 0x8A, 0xCD, 0xC0, 0x6F, 0x55, 0xC6, 0xB0, 0x70, 0x73, 0xEA, 0x40, -0x71, 0x35, 0xA8, 0xB0, 0x72, 0x53, 0xCC, 0x40, 0x73, 0x15, 0x8A, 0xB0, 0x74, 0x33, 0xAE, 0x40, -0x74, 0xFE, 0xA7, 0x30, 0x76, 0x13, 0x90, 0x40, 0x76, 0xDE, 0x89, 0x30, 0x77, 0xF3, 0x72, 0x40, -0x78, 0xBE, 0x6B, 0x30, 0x79, 0xD3, 0x54, 0x40, 0x7A, 0x9E, 0x4D, 0x30, 0x7B, 0xBC, 0x70, 0xC0, -0x7C, 0x7E, 0x2F, 0x30, 0x7D, 0x9C, 0x52, 0xC0, 0x7E, 0x5E, 0x11, 0x30, 0x7F, 0x7C, 0x34, 0xC0, 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, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, -0x06, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, -0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, -0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, -0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, -0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xC3, 0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, -0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, 0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, -0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, -0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, 0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, -0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x7D, 0xED, 0x00, 0xAD, 0x6A, 0x88, 0x00, 0x00, 0x00, -0x0D, 0x53, 0x61, 0x6E, 0x20, 0x4C, 0x75, 0x69, 0x73, 0x20, 0x28, 0x53, 0x4C, 0x29, +0x06, 0x05, 0x04, 0x06, 0x04, 0x05, 0x04, 0x03, 0x06, 0x05, 0x06, 0x05, 0x06, 0xFF, 0xFF, 0xC3, +0xD0, 0x00, 0x00, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, 0x04, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x08, 0xFF, +0xFF, 0xE3, 0xE0, 0x01, 0x08, 0xFF, 0xFF, 0xD5, 0xD0, 0x00, 0x04, 0xFF, 0xFF, 0xC7, 0xC0, 0x00, +0x0D, 0xFF, 0xFF, 0xD5, 0xD0, 0x01, 0x12, 0x43, 0x4D, 0x54, 0x00, 0x41, 0x52, 0x54, 0x00, 0x41, +0x52, 0x53, 0x54, 0x00, 0x57, 0x41, 0x52, 0x54, 0x00, 0x57, 0x41, 0x52, 0x53, 0x54, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x56, 0x7D, +0xED, 0x00, 0xAD, 0x6A, 0x88, 0x00, 0x00, 0x00, 0x0D, 0x53, 0x61, 0x6E, 0x20, 0x4C, 0x75, 0x69, +0x73, 0x20, 0x28, 0x53, 0x4C, 0x29, /* America/Argentina/Tucuman */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x52, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -5984,7 +5952,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, -0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, +0x4A, 0xD1, 0x58, 0x40, 0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 0x04, 0xF5, 0xB0, 0x56, 0x19, 0xDE, 0xC0, 0x56, 0xE4, 0xD7, 0xB0, 0x57, 0xF9, 0xC0, 0xC0, 0x58, 0xC4, 0xB9, 0xB0, @@ -6908,24 +6876,25 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* Antarctica/Casey */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 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, 0x02, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFE, 0x1E, 0xCC, 0x80, -0x4A, 0xDA, 0x06, 0x20, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x80, -0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x57, 0x53, 0x54, 0x00, -0x43, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x30, 0x52, 0x01, -0xBB, 0x4B, 0x12, 0x00, 0x00, 0x00, 0x1F, 0x43, 0x61, 0x73, 0x65, 0x79, 0x20, 0x53, 0x74, 0x61, -0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x42, 0x61, 0x69, 0x6C, 0x65, 0x79, 0x20, 0x50, 0x65, 0x6E, -0x69, 0x6E, 0x73, 0x75, 0x6C, 0x61, +0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0xFE, 0x1E, 0xCC, 0x80, +0x4A, 0xDA, 0x06, 0x20, 0x4B, 0x8F, 0xCA, 0xF0, 0x01, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x08, 0x7A, 0x7A, 0x7A, +0x00, 0x57, 0x53, 0x54, 0x00, 0x43, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x24, 0x30, 0x52, 0x01, 0xBB, 0x4B, 0x12, 0x00, 0x00, 0x00, 0x1F, 0x43, 0x61, 0x73, 0x65, +0x79, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x42, 0x61, 0x69, 0x6C, 0x65, +0x79, 0x20, 0x50, 0x65, 0x6E, 0x69, 0x6E, 0x73, 0x75, 0x6C, 0x61, /* Antarctica/Davis */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 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, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x09, 0xE7, 0x9C, 0x40, 0x00, -0xF6, 0x47, 0xDF, 0x10, 0xFE, 0x47, 0xAB, 0x00, 0x4A, 0xDA, 0x14, 0x30, 0x01, 0x00, 0x01, 0x02, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, -0x00, 0x04, 0x7A, 0x7A, 0x7A, 0x00, 0x44, 0x41, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x20, 0xAD, 0xE2, 0x01, 0x89, 0xA0, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x44, 0x61, 0x76, -0x69, 0x73, 0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x56, 0x65, 0x73, 0x74, -0x66, 0x6F, 0x6C, 0x64, 0x20, 0x48, 0x69, 0x6C, 0x6C, 0x73, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x09, 0xE7, 0x9C, 0x40, 0x00, +0xF6, 0x47, 0xDF, 0x10, 0xFE, 0x47, 0xAB, 0x00, 0x4A, 0xDA, 0x14, 0x30, 0x4B, 0x97, 0xFA, 0x40, +0x01, 0x00, 0x01, 0x02, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x70, 0x00, +0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x04, 0x00, 0x00, 0x62, 0x70, 0x00, 0x04, 0x7A, 0x7A, 0x7A, +0x00, 0x44, 0x41, 0x56, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x20, +0xAD, 0xE2, 0x01, 0x89, 0xA0, 0x3A, 0x00, 0x00, 0x00, 0x1D, 0x44, 0x61, 0x76, 0x69, 0x73, 0x20, +0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x56, 0x65, 0x73, 0x74, 0x66, 0x6F, 0x6C, +0x64, 0x20, 0x48, 0x69, 0x6C, 0x6C, 0x73, /* Antarctica/DumontDUrville */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -6939,6 +6908,48 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x54, 0x65, 0x72, 0x72, 0x65, 0x20, 0x41, 0x64, 0x65, 0x6C, 0x69, 0x65, +/* Antarctica/Macquarie */ +0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 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, 0x5F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0D, 0x91, 0x05, 0x5B, 0x00, +0x9B, 0xD5, 0x78, 0x80, 0x9C, 0xBC, 0x20, 0xF0, 0xCB, 0x54, 0xB3, 0x00, 0xCB, 0xC7, 0x57, 0x70, +0xCC, 0xB7, 0x56, 0x80, 0xCD, 0xA7, 0x39, 0x70, 0xCE, 0xA0, 0x73, 0x00, 0xCF, 0x87, 0x1B, 0x70, +0xFB, 0xC2, 0x8D, 0x00, 0xFC, 0xB2, 0x7E, 0x00, 0xFD, 0xC7, 0x59, 0x00, 0xFE, 0x76, 0xB0, 0x80, +0xFF, 0xA7, 0x3B, 0x00, 0x00, 0x56, 0x92, 0x80, 0x01, 0x87, 0x1D, 0x00, 0x02, 0x3F, 0xAF, 0x00, +0x03, 0x70, 0x39, 0x80, 0x04, 0x0D, 0x1C, 0x00, 0x05, 0x50, 0x1B, 0x80, 0x05, 0xF6, 0x38, 0x80, +0x07, 0x2F, 0xFD, 0x80, 0x07, 0xD6, 0x1A, 0x80, 0x09, 0x0F, 0xDF, 0x80, 0x09, 0xB5, 0xFC, 0x80, +0x0A, 0xEF, 0xC1, 0x80, 0x0B, 0x9F, 0x19, 0x00, 0x0C, 0xD8, 0xDE, 0x00, 0x0D, 0x7E, 0xFB, 0x00, +0x0E, 0xB8, 0xC0, 0x00, 0x0F, 0x5E, 0xDD, 0x00, 0x10, 0x98, 0xA2, 0x00, 0x11, 0x3E, 0xBF, 0x00, +0x12, 0x78, 0x84, 0x00, 0x13, 0x1E, 0xA1, 0x00, 0x14, 0x58, 0x66, 0x00, 0x14, 0xFE, 0x83, 0x00, +0x16, 0x38, 0x48, 0x00, 0x17, 0x03, 0x4F, 0x00, 0x18, 0x21, 0x64, 0x80, 0x18, 0xE3, 0x31, 0x00, +0x1A, 0x01, 0x46, 0x80, 0x1A, 0xA7, 0x63, 0x80, 0x1B, 0xE1, 0x28, 0x80, 0x1C, 0x87, 0x45, 0x80, +0x1D, 0xC1, 0x0A, 0x80, 0x1E, 0x67, 0x27, 0x80, 0x1F, 0x97, 0xB2, 0x00, 0x20, 0x59, 0x7E, 0x80, +0x21, 0x80, 0xCE, 0x80, 0x22, 0x42, 0x9B, 0x00, 0x23, 0x69, 0xEB, 0x00, 0x24, 0x22, 0x7D, 0x00, +0x25, 0x49, 0xCD, 0x00, 0x26, 0x02, 0x5F, 0x00, 0x27, 0x29, 0xAF, 0x00, 0x27, 0xF4, 0xB6, 0x00, +0x28, 0xED, 0xE1, 0x80, 0x29, 0xD4, 0x98, 0x00, 0x2A, 0xCD, 0xC3, 0x80, 0x2B, 0xB4, 0x7A, 0x00, +0x2C, 0xAD, 0xA5, 0x80, 0x2D, 0x94, 0x5C, 0x00, 0x2E, 0x8D, 0x87, 0x80, 0x2F, 0x74, 0x3E, 0x00, +0x30, 0x6D, 0x69, 0x80, 0x31, 0x5D, 0x5A, 0x80, 0x32, 0x56, 0x86, 0x00, 0x33, 0x3D, 0x3C, 0x80, +0x34, 0x36, 0x68, 0x00, 0x35, 0x1D, 0x1E, 0x80, 0x36, 0x16, 0x4A, 0x00, 0x36, 0xFD, 0x00, 0x80, +0x37, 0xF6, 0x2C, 0x00, 0x38, 0xDC, 0xE2, 0x80, 0x39, 0xA7, 0xE9, 0x80, 0x3A, 0xBC, 0xC4, 0x80, +0x3B, 0xBF, 0x2A, 0x80, 0x3C, 0xA5, 0xE1, 0x00, 0x3D, 0x9F, 0x0C, 0x80, 0x3E, 0x85, 0xC3, 0x00, +0x3F, 0x7E, 0xEE, 0x80, 0x40, 0x65, 0xA5, 0x00, 0x41, 0x5E, 0xD0, 0x80, 0x42, 0x45, 0x87, 0x00, +0x43, 0x3E, 0xB2, 0x80, 0x44, 0x2E, 0xA3, 0x80, 0x45, 0x1E, 0x94, 0x80, 0x46, 0x05, 0x4B, 0x00, +0x47, 0x07, 0xB1, 0x00, 0x47, 0xF7, 0xA2, 0x00, 0x48, 0xE7, 0x93, 0x00, 0x49, 0xD7, 0x84, 0x00, +0x4A, 0xC7, 0x75, 0x00, 0x4B, 0xB7, 0x66, 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, +0x01, 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, 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, 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, 0x03, +0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x8C, +0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x01, 0x04, 0x00, +0x00, 0x8C, 0xA0, 0x00, 0x04, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x08, 0x7A, 0x7A, 0x7A, 0x00, 0x45, +0x53, 0x54, 0x00, 0x4D, 0x49, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x2B, 0x30, 0x02, 0x05, 0x32, 0x58, 0x00, 0x00, 0x00, 0x2A, +0x4D, 0x61, 0x63, 0x71, 0x75, 0x61, 0x72, 0x69, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, +0x20, 0x53, 0x74, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x2C, 0x20, 0x4D, 0x61, 0x63, 0x71, 0x75, 0x61, +0x72, 0x69, 0x65, 0x20, 0x49, 0x73, 0x6C, 0x61, 0x6E, 0x64, + /* Antarctica/Mawson */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x41, 0x51, 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, @@ -7286,35 +7297,35 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x40, 0x65, 0x88, 0xE0, 0x41, 0x83, 0x9E, 0x60, 0x42, 0x45, 0x6A, 0xE0, 0x43, 0x63, 0x80, 0x60, 0x44, 0x25, 0x4C, 0xE0, 0x45, 0x43, 0x62, 0x60, 0x46, 0x05, 0x2E, 0xE0, 0x47, 0x23, 0x44, 0x60, 0x47, 0xEE, 0x4B, 0x60, 0x49, 0x03, 0x26, 0x60, 0x49, 0xCE, 0x2D, 0x60, 0x4A, 0xE3, 0x08, 0x60, -0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xCC, 0x24, 0xE0, 0x4D, 0x8D, 0xF1, 0x60, 0x4E, 0xAC, 0x06, 0xE0, -0x4F, 0x6D, 0xD3, 0x60, 0x50, 0x8B, 0xE8, 0xE0, 0x51, 0x56, 0xEF, 0xE0, 0x52, 0x6B, 0xCA, 0xE0, -0x53, 0x36, 0xD1, 0xE0, 0x54, 0x4B, 0xAC, 0xE0, 0x55, 0x16, 0xB3, 0xE0, 0x56, 0x2B, 0x8E, 0xE0, -0x56, 0xF6, 0x95, 0xE0, 0x58, 0x14, 0xAB, 0x60, 0x58, 0xD6, 0x77, 0xE0, 0x59, 0xF4, 0x8D, 0x60, -0x5A, 0xB6, 0x59, 0xE0, 0x5B, 0xD4, 0x6F, 0x60, 0x5C, 0x9F, 0x76, 0x60, 0x5D, 0xB4, 0x51, 0x60, -0x5E, 0x7F, 0x58, 0x60, 0x5F, 0x94, 0x33, 0x60, 0x60, 0x5F, 0x3A, 0x60, 0x61, 0x7D, 0x4F, 0xE0, -0x62, 0x3F, 0x1C, 0x60, 0x63, 0x5D, 0x31, 0xE0, 0x64, 0x1E, 0xFE, 0x60, 0x65, 0x3D, 0x13, 0xE0, -0x66, 0x08, 0x1A, 0xE0, 0x67, 0x1C, 0xF5, 0xE0, 0x67, 0xE7, 0xFC, 0xE0, 0x68, 0xFC, 0xD7, 0xE0, -0x69, 0xC7, 0xDE, 0xE0, 0x6A, 0xDC, 0xB9, 0xE0, 0x6B, 0xA7, 0xC0, 0xE0, 0x6C, 0xC5, 0xD6, 0x60, -0x6D, 0x87, 0xA2, 0xE0, 0x6E, 0xA5, 0xB8, 0x60, 0x6F, 0x67, 0x84, 0xE0, 0x70, 0x85, 0x9A, 0x60, -0x71, 0x50, 0xA1, 0x60, 0x72, 0x65, 0x7C, 0x60, 0x73, 0x30, 0x83, 0x60, 0x74, 0x45, 0x5E, 0x60, -0x75, 0x10, 0x65, 0x60, 0x76, 0x2E, 0x7A, 0xE0, 0x76, 0xF0, 0x47, 0x60, 0x78, 0x0E, 0x5C, 0xE0, -0x78, 0xD0, 0x29, 0x60, 0x79, 0xEE, 0x3E, 0xE0, 0x7A, 0xB0, 0x0B, 0x60, 0x7B, 0xCE, 0x20, 0xE0, -0x7C, 0x99, 0x27, 0xE0, 0x7D, 0xAE, 0x02, 0xE0, 0x7E, 0x79, 0x09, 0xE0, 0x7F, 0x8D, 0xE4, 0xE0, +0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xCC, 0x32, 0xF0, 0x4D, 0x8D, 0xFF, 0x70, 0x4E, 0xAC, 0x14, 0xF0, +0x4F, 0x6D, 0xE1, 0x70, 0x50, 0x8B, 0xF6, 0xF0, 0x51, 0x56, 0xFD, 0xF0, 0x52, 0x6B, 0xD8, 0xF0, +0x53, 0x36, 0xDF, 0xF0, 0x54, 0x4B, 0xBA, 0xF0, 0x55, 0x16, 0xC1, 0xF0, 0x56, 0x2B, 0x9C, 0xF0, +0x56, 0xF6, 0xA3, 0xF0, 0x58, 0x14, 0xB9, 0x70, 0x58, 0xD6, 0x85, 0xF0, 0x59, 0xF4, 0x9B, 0x70, +0x5A, 0xB6, 0x67, 0xF0, 0x5B, 0xD4, 0x7D, 0x70, 0x5C, 0x9F, 0x84, 0x70, 0x5D, 0xB4, 0x5F, 0x70, +0x5E, 0x7F, 0x66, 0x70, 0x5F, 0x94, 0x41, 0x70, 0x60, 0x5F, 0x48, 0x70, 0x61, 0x7D, 0x5D, 0xF0, +0x62, 0x3F, 0x2A, 0x70, 0x63, 0x5D, 0x3F, 0xF0, 0x64, 0x1F, 0x0C, 0x70, 0x65, 0x3D, 0x21, 0xF0, +0x66, 0x08, 0x28, 0xF0, 0x67, 0x1D, 0x03, 0xF0, 0x67, 0xE8, 0x0A, 0xF0, 0x68, 0xFC, 0xE5, 0xF0, +0x69, 0xC7, 0xEC, 0xF0, 0x6A, 0xDC, 0xC7, 0xF0, 0x6B, 0xA7, 0xCE, 0xF0, 0x6C, 0xC5, 0xE4, 0x70, +0x6D, 0x87, 0xB0, 0xF0, 0x6E, 0xA5, 0xC6, 0x70, 0x6F, 0x67, 0x92, 0xF0, 0x70, 0x85, 0xA8, 0x70, +0x71, 0x50, 0xAF, 0x70, 0x72, 0x65, 0x8A, 0x70, 0x73, 0x30, 0x91, 0x70, 0x74, 0x45, 0x6C, 0x70, +0x75, 0x10, 0x73, 0x70, 0x76, 0x2E, 0x88, 0xF0, 0x76, 0xF0, 0x55, 0x70, 0x78, 0x0E, 0x6A, 0xF0, +0x78, 0xD0, 0x37, 0x70, 0x79, 0xEE, 0x4C, 0xF0, 0x7A, 0xB0, 0x19, 0x70, 0x7B, 0xCE, 0x2E, 0xF0, +0x7C, 0x99, 0x35, 0xF0, 0x7D, 0xAE, 0x10, 0xF0, 0x7E, 0x79, 0x17, 0xF0, 0x7F, 0x8D, 0xF2, 0xF0, 0x01, 0x03, 0x02, 0x03, 0x04, 0x01, 0x04, 0x01, 0x04, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x05, 0x04, 0x01, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, -0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, -0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, -0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, -0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, -0x05, 0x06, 0x05, 0x06, 0x05, 0x00, 0x00, 0xA6, 0x64, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, +0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, +0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, +0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, +0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, 0x08, 0x07, +0x08, 0x07, 0x08, 0x07, 0x08, 0x00, 0x00, 0xA6, 0x64, 0x00, 0x00, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xC4, 0xE0, 0x01, 0x09, 0x00, 0x00, 0xB6, 0xD0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x41, 0x4E, 0x41, 0x54, 0x00, 0x41, 0x4E, 0x41, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x21, 0x38, -0x02, 0x21, 0x79, 0xED, 0x00, 0x00, 0x00, 0x16, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x31, -0x30, 0x20, 0x2D, 0x20, 0x42, 0x65, 0x72, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x61, +0x02, 0x21, 0x79, 0xED, 0x00, 0x00, 0x00, 0x16, 0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, +0x38, 0x20, 0x2D, 0x20, 0x42, 0x65, 0x72, 0x69, 0x6E, 0x67, 0x20, 0x53, 0x65, 0x61, /* Asia/Aqtau */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x4B, 0x5A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7682,32 +7693,15 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* Asia/Dacca */ 0x50, 0x48, 0x50, 0x31, 0x00, 0x3F, 0x3F, 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, 0x3F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1B, 0xCA, 0xDB, 0x86, 0xB0, +0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1B, 0xCA, 0xDB, 0x86, 0xB0, 0xCC, 0x05, 0x71, 0x18, 0xCC, 0x95, 0x32, 0xA8, 0xDD, 0xA8, 0xD2, 0x98, 0x02, 0x4F, 0x9D, 0x20, -0x4A, 0x3B, 0xC4, 0x10, 0x4B, 0x3C, 0xD8, 0x90, 0x4B, 0xB3, 0x7F, 0x90, 0x4C, 0xCD, 0xA0, 0x90, -0x4D, 0x94, 0xB3, 0x10, 0x4E, 0xAE, 0xD4, 0x10, 0x4F, 0x77, 0x38, 0x10, 0x50, 0x91, 0x59, 0x10, -0x51, 0x58, 0x6B, 0x90, 0x52, 0x72, 0x8C, 0x90, 0x53, 0x39, 0x9F, 0x10, 0x54, 0x53, 0xC0, 0x10, -0x55, 0x1A, 0xD2, 0x90, 0x56, 0x34, 0xF3, 0x90, 0x56, 0xFD, 0x57, 0x90, 0x58, 0x17, 0x78, 0x90, -0x58, 0xDE, 0x8B, 0x10, 0x59, 0xF8, 0xAC, 0x10, 0x5A, 0xBF, 0xBE, 0x90, 0x5B, 0xD9, 0xDF, 0x90, -0x5C, 0xA0, 0xF2, 0x10, 0x5D, 0xBB, 0x13, 0x10, 0x5E, 0x83, 0x77, 0x10, 0x5F, 0x9D, 0x98, 0x10, -0x60, 0x64, 0xAA, 0x90, 0x61, 0x7E, 0xCB, 0x90, 0x62, 0x45, 0xDE, 0x10, 0x63, 0x5F, 0xFF, 0x10, -0x64, 0x27, 0x11, 0x90, 0x65, 0x41, 0x32, 0x90, 0x66, 0x09, 0x96, 0x90, 0x67, 0x23, 0xB7, 0x90, -0x67, 0xEA, 0xCA, 0x10, 0x69, 0x04, 0xEB, 0x10, 0x69, 0xCB, 0xFD, 0x90, 0x6A, 0xE6, 0x1E, 0x90, -0x6B, 0xAD, 0x31, 0x10, 0x6C, 0xC7, 0x52, 0x10, 0x6D, 0x8F, 0xB6, 0x10, 0x6E, 0xA9, 0xD7, 0x10, -0x6F, 0x70, 0xE9, 0x90, 0x70, 0x8B, 0x0A, 0x90, 0x71, 0x52, 0x1D, 0x10, 0x72, 0x6C, 0x3E, 0x10, -0x73, 0x33, 0x50, 0x90, 0x74, 0x4D, 0x71, 0x90, 0x75, 0x15, 0xD5, 0x90, 0x76, 0x2F, 0xF6, 0x90, -0x76, 0xF7, 0x09, 0x10, 0x78, 0x11, 0x2A, 0x10, 0x78, 0xD8, 0x3C, 0x90, 0x79, 0xF2, 0x5D, 0x90, -0x7A, 0xB9, 0x70, 0x10, 0x7B, 0xD3, 0x91, 0x10, 0x7C, 0x9B, 0xF5, 0x10, 0x7D, 0xB6, 0x16, 0x10, -0x7E, 0x7D, 0x28, 0x90, 0x7F, 0x97, 0x49, 0x90, 0x01, 0x02, 0x01, 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, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, -0x68, 0x00, 0x04, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0D, 0x00, -0x00, 0x54, 0x60, 0x00, 0x12, 0x00, 0x00, 0x62, 0x70, 0x01, 0x16, 0x48, 0x4D, 0x54, 0x00, 0x42, -0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, -0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, 0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, +0x4A, 0x3B, 0xC4, 0x10, 0x4B, 0x3C, 0xD8, 0x54, 0x01, 0x02, 0x01, 0x03, 0x04, 0x05, 0x04, 0x00, +0x00, 0x52, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x04, 0x00, 0x00, 0x4D, 0x58, 0x00, +0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0D, 0x00, 0x00, 0x54, 0x60, 0x00, 0x12, 0x00, 0x00, 0x62, +0x70, 0x01, 0x16, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, +0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x89, 0x54, 0x40, 0x01, 0x12, +0xA8, 0x80, 0x00, 0x00, 0x00, 0x00, /* Asia/Damascus */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x53, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7736,21 +7730,21 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x3E, 0x88, 0xBA, 0x60, 0x3F, 0x79, 0xEE, 0xD0, 0x40, 0x6B, 0x3F, 0x60, 0x41, 0x5C, 0x73, 0xD0, 0x42, 0x4C, 0x72, 0xE0, 0x43, 0x3D, 0xA7, 0x50, 0x44, 0x2D, 0xA6, 0x60, 0x45, 0x12, 0xFD, 0x50, 0x46, 0x0C, 0x36, 0xE0, 0x47, 0x2A, 0x3E, 0x50, 0x47, 0xF5, 0x53, 0x60, 0x49, 0x0B, 0x71, 0xD0, -0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xEA, 0x02, 0x50, 0x4B, 0xAB, 0xDC, 0xE0, 0x4C, 0xC9, 0xE4, 0x50, -0x4D, 0x8B, 0xBE, 0xE0, 0x4E, 0xA9, 0xC6, 0x50, 0x4F, 0x74, 0xDB, 0x60, 0x50, 0x89, 0xA8, 0x50, -0x51, 0x54, 0xBD, 0x60, 0x52, 0x69, 0x8A, 0x50, 0x53, 0x34, 0x9F, 0x60, 0x54, 0x52, 0xA6, 0xD0, -0x55, 0x14, 0x81, 0x60, 0x56, 0x32, 0x88, 0xD0, 0x56, 0xF4, 0x63, 0x60, 0x58, 0x12, 0x6A, 0xD0, -0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xF2, 0x4C, 0xD0, 0x5A, 0xBD, 0x61, 0xE0, 0x5B, 0xD2, 0x2E, 0xD0, -0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0xB2, 0x10, 0xD0, 0x5E, 0x7D, 0x25, 0xE0, 0x5F, 0x9B, 0x2D, 0x50, -0x60, 0x5D, 0x07, 0xE0, 0x61, 0x7B, 0x0F, 0x50, 0x62, 0x3C, 0xE9, 0xE0, 0x63, 0x5A, 0xF1, 0x50, -0x64, 0x26, 0x06, 0x60, 0x65, 0x3A, 0xD3, 0x50, 0x66, 0x05, 0xE8, 0x60, 0x67, 0x1A, 0xB5, 0x50, -0x67, 0xE5, 0xCA, 0x60, 0x69, 0x03, 0xD1, 0xD0, 0x69, 0xC5, 0xAC, 0x60, 0x6A, 0xE3, 0xB3, 0xD0, -0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0xC3, 0x95, 0xD0, 0x6D, 0x8E, 0xAA, 0xE0, 0x6E, 0xA3, 0x77, 0xD0, -0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x83, 0x59, 0xD0, 0x71, 0x4E, 0x6E, 0xE0, 0x72, 0x63, 0x3B, 0xD0, -0x73, 0x2E, 0x50, 0xE0, 0x74, 0x4C, 0x58, 0x50, 0x75, 0x0E, 0x32, 0xE0, 0x76, 0x2C, 0x3A, 0x50, -0x76, 0xEE, 0x14, 0xE0, 0x78, 0x0C, 0x1C, 0x50, 0x78, 0xD7, 0x31, 0x60, 0x79, 0xEB, 0xFE, 0x50, -0x7A, 0xB7, 0x13, 0x60, 0x7B, 0xCB, 0xE0, 0x50, 0x7C, 0x96, 0xF5, 0x60, 0x7D, 0xB4, 0xFC, 0xD0, -0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x94, 0xDE, 0xD0, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02, 0x01, +0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xEA, 0x02, 0x50, 0x4B, 0xB5, 0x17, 0x60, 0x4C, 0xC9, 0xE4, 0x50, +0x4D, 0x94, 0xF9, 0x60, 0x4E, 0xA9, 0xC6, 0x50, 0x4F, 0x7E, 0x15, 0xE0, 0x50, 0x89, 0xA8, 0x50, +0x51, 0x5D, 0xF7, 0xE0, 0x52, 0x69, 0x8A, 0x50, 0x53, 0x3D, 0xD9, 0xE0, 0x54, 0x52, 0xA6, 0xD0, +0x55, 0x1D, 0xBB, 0xE0, 0x56, 0x32, 0x88, 0xD0, 0x56, 0xFD, 0x9D, 0xE0, 0x58, 0x12, 0x6A, 0xD0, +0x58, 0xE6, 0xBA, 0x60, 0x59, 0xF2, 0x4C, 0xD0, 0x5A, 0xC6, 0x9C, 0x60, 0x5B, 0xD2, 0x2E, 0xD0, +0x5C, 0xA6, 0x7E, 0x60, 0x5D, 0xB2, 0x10, 0xD0, 0x5E, 0x86, 0x60, 0x60, 0x5F, 0x9B, 0x2D, 0x50, +0x60, 0x66, 0x42, 0x60, 0x61, 0x7B, 0x0F, 0x50, 0x62, 0x46, 0x24, 0x60, 0x63, 0x5A, 0xF1, 0x50, +0x64, 0x2F, 0x40, 0xE0, 0x65, 0x3A, 0xD3, 0x50, 0x66, 0x0F, 0x22, 0xE0, 0x67, 0x1A, 0xB5, 0x50, +0x67, 0xEF, 0x04, 0xE0, 0x69, 0x03, 0xD1, 0xD0, 0x69, 0xCE, 0xE6, 0xE0, 0x6A, 0xE3, 0xB3, 0xD0, +0x6B, 0xAE, 0xC8, 0xE0, 0x6C, 0xC3, 0x95, 0xD0, 0x6D, 0x97, 0xE5, 0x60, 0x6E, 0xA3, 0x77, 0xD0, +0x6F, 0x77, 0xC7, 0x60, 0x70, 0x83, 0x59, 0xD0, 0x71, 0x57, 0xA9, 0x60, 0x72, 0x63, 0x3B, 0xD0, +0x73, 0x37, 0x8B, 0x60, 0x74, 0x4C, 0x58, 0x50, 0x75, 0x17, 0x6D, 0x60, 0x76, 0x2C, 0x3A, 0x50, +0x76, 0xF7, 0x4F, 0x60, 0x78, 0x0C, 0x1C, 0x50, 0x78, 0xE0, 0x6B, 0xE0, 0x79, 0xEB, 0xFE, 0x50, +0x7A, 0xC0, 0x4D, 0xE0, 0x7B, 0xCB, 0xE0, 0x50, 0x7C, 0xA0, 0x2F, 0xE0, 0x7D, 0xB4, 0xFC, 0xD0, +0x7E, 0x80, 0x11, 0xE0, 0x7F, 0x94, 0xDE, 0xD0, 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, @@ -7768,32 +7762,15 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* Asia/Dhaka */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x42, 0x44, 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, 0x3F, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1B, 0xCA, 0xDB, 0x86, 0xB0, +0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x1B, 0xCA, 0xDB, 0x86, 0xB0, 0xCC, 0x05, 0x71, 0x18, 0xCC, 0x95, 0x32, 0xA8, 0xDD, 0xA8, 0xD2, 0x98, 0x02, 0x4F, 0x9D, 0x20, -0x4A, 0x3B, 0xC4, 0x10, 0x4B, 0x3C, 0xD8, 0x90, 0x4B, 0xB3, 0x7F, 0x90, 0x4C, 0xCD, 0xA0, 0x90, -0x4D, 0x94, 0xB3, 0x10, 0x4E, 0xAE, 0xD4, 0x10, 0x4F, 0x77, 0x38, 0x10, 0x50, 0x91, 0x59, 0x10, -0x51, 0x58, 0x6B, 0x90, 0x52, 0x72, 0x8C, 0x90, 0x53, 0x39, 0x9F, 0x10, 0x54, 0x53, 0xC0, 0x10, -0x55, 0x1A, 0xD2, 0x90, 0x56, 0x34, 0xF3, 0x90, 0x56, 0xFD, 0x57, 0x90, 0x58, 0x17, 0x78, 0x90, -0x58, 0xDE, 0x8B, 0x10, 0x59, 0xF8, 0xAC, 0x10, 0x5A, 0xBF, 0xBE, 0x90, 0x5B, 0xD9, 0xDF, 0x90, -0x5C, 0xA0, 0xF2, 0x10, 0x5D, 0xBB, 0x13, 0x10, 0x5E, 0x83, 0x77, 0x10, 0x5F, 0x9D, 0x98, 0x10, -0x60, 0x64, 0xAA, 0x90, 0x61, 0x7E, 0xCB, 0x90, 0x62, 0x45, 0xDE, 0x10, 0x63, 0x5F, 0xFF, 0x10, -0x64, 0x27, 0x11, 0x90, 0x65, 0x41, 0x32, 0x90, 0x66, 0x09, 0x96, 0x90, 0x67, 0x23, 0xB7, 0x90, -0x67, 0xEA, 0xCA, 0x10, 0x69, 0x04, 0xEB, 0x10, 0x69, 0xCB, 0xFD, 0x90, 0x6A, 0xE6, 0x1E, 0x90, -0x6B, 0xAD, 0x31, 0x10, 0x6C, 0xC7, 0x52, 0x10, 0x6D, 0x8F, 0xB6, 0x10, 0x6E, 0xA9, 0xD7, 0x10, -0x6F, 0x70, 0xE9, 0x90, 0x70, 0x8B, 0x0A, 0x90, 0x71, 0x52, 0x1D, 0x10, 0x72, 0x6C, 0x3E, 0x10, -0x73, 0x33, 0x50, 0x90, 0x74, 0x4D, 0x71, 0x90, 0x75, 0x15, 0xD5, 0x90, 0x76, 0x2F, 0xF6, 0x90, -0x76, 0xF7, 0x09, 0x10, 0x78, 0x11, 0x2A, 0x10, 0x78, 0xD8, 0x3C, 0x90, 0x79, 0xF2, 0x5D, 0x90, -0x7A, 0xB9, 0x70, 0x10, 0x7B, 0xD3, 0x91, 0x10, 0x7C, 0x9B, 0xF5, 0x10, 0x7D, 0xB6, 0x16, 0x10, -0x7E, 0x7D, 0x28, 0x90, 0x7F, 0x97, 0x49, 0x90, 0x01, 0x02, 0x01, 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, 0x00, 0x00, 0x52, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, -0x68, 0x00, 0x04, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0D, 0x00, -0x00, 0x54, 0x60, 0x00, 0x12, 0x00, 0x00, 0x62, 0x70, 0x01, 0x16, 0x48, 0x4D, 0x54, 0x00, 0x42, -0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, -0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0xAD, 0x84, 0x92, 0x01, 0x9C, 0x9F, 0x82, 0x00, 0x00, 0x00, 0x00, +0x4A, 0x3B, 0xC4, 0x10, 0x4B, 0x3C, 0xD8, 0x54, 0x01, 0x02, 0x01, 0x03, 0x04, 0x05, 0x04, 0x00, +0x00, 0x52, 0xD0, 0x00, 0x00, 0x00, 0x00, 0x5B, 0x68, 0x00, 0x04, 0x00, 0x00, 0x4D, 0x58, 0x00, +0x09, 0x00, 0x00, 0x54, 0x60, 0x00, 0x0D, 0x00, 0x00, 0x54, 0x60, 0x00, 0x12, 0x00, 0x00, 0x62, +0x70, 0x01, 0x16, 0x48, 0x4D, 0x54, 0x00, 0x42, 0x55, 0x52, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, +0x44, 0x41, 0x43, 0x54, 0x00, 0x42, 0x44, 0x54, 0x00, 0x42, 0x44, 0x53, 0x54, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAD, 0x84, 0x92, 0x01, 0x9C, +0x9F, 0x82, 0x00, 0x00, 0x00, 0x00, /* Asia/Dili */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x54, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -7858,21 +7835,21 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 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, 0xAB, 0xDC, 0xE0, -0x4C, 0x80, 0x2C, 0x70, 0x4D, 0x8B, 0xBE, 0xE0, 0x4E, 0x60, 0x0E, 0x70, 0x4F, 0x74, 0xDB, 0x60, -0x50, 0x49, 0x2A, 0xF0, 0x51, 0x54, 0xBD, 0x60, 0x52, 0x29, 0x0C, 0xF0, 0x53, 0x34, 0x9F, 0x60, -0x54, 0x08, 0xEE, 0xF0, 0x55, 0x14, 0x81, 0x60, 0x55, 0xE8, 0xD0, 0xF0, 0x56, 0xF4, 0x63, 0x60, -0x57, 0xC8, 0xB2, 0xF0, 0x58, 0xDD, 0x7F, 0xE0, 0x59, 0xA8, 0x94, 0xF0, 0x5A, 0xBD, 0x61, 0xE0, -0x5B, 0x91, 0xB1, 0x70, 0x5C, 0x9D, 0x43, 0xE0, 0x5D, 0x71, 0x93, 0x70, 0x5E, 0x7D, 0x25, 0xE0, -0x5F, 0x51, 0x75, 0x70, 0x60, 0x5D, 0x07, 0xE0, 0x61, 0x31, 0x57, 0x70, 0x62, 0x3C, 0xE9, 0xE0, -0x63, 0x11, 0x39, 0x70, 0x64, 0x26, 0x06, 0x60, 0x64, 0xF1, 0x1B, 0x70, 0x66, 0x05, 0xE8, 0x60, -0x66, 0xDA, 0x37, 0xF0, 0x67, 0xE5, 0xCA, 0x60, 0x68, 0xBA, 0x19, 0xF0, 0x69, 0xC5, 0xAC, 0x60, -0x6A, 0x99, 0xFB, 0xF0, 0x6B, 0xA5, 0x8E, 0x60, 0x6C, 0x79, 0xDD, 0xF0, 0x6D, 0x8E, 0xAA, 0xE0, -0x6E, 0x59, 0xBF, 0xF0, 0x6F, 0x6E, 0x8C, 0xE0, 0x70, 0x42, 0xDC, 0x70, 0x71, 0x4E, 0x6E, 0xE0, -0x72, 0x22, 0xBE, 0x70, 0x73, 0x2E, 0x50, 0xE0, 0x74, 0x02, 0xA0, 0x70, 0x75, 0x0E, 0x32, 0xE0, -0x75, 0xE2, 0x82, 0x70, 0x76, 0xEE, 0x14, 0xE0, 0x77, 0xC2, 0x64, 0x70, 0x78, 0xD7, 0x31, 0x60, -0x79, 0xA2, 0x46, 0x70, 0x7A, 0xB7, 0x13, 0x60, 0x7B, 0x8B, 0x62, 0xF0, 0x7C, 0x96, 0xF5, 0x60, -0x7D, 0x6B, 0x44, 0xF0, 0x7E, 0x76, 0xD7, 0x60, 0x7F, 0x4B, 0x26, 0xF0, 0x00, 0x01, 0x00, 0x01, +0x48, 0xB7, 0x2D, 0xF0, 0x49, 0xCB, 0xFA, 0xE0, 0x4A, 0xA0, 0x4A, 0x70, 0x4B, 0xAD, 0x2E, 0x9C, +0x4C, 0x80, 0x2C, 0x70, 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, 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, @@ -8190,66 +8167,49 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x40, 0x65, 0x88, 0xE0, 0x41, 0x83, 0x9E, 0x60, 0x42, 0x45, 0x6A, 0xE0, 0x43, 0x63, 0x80, 0x60, 0x44, 0x25, 0x4C, 0xE0, 0x45, 0x43, 0x62, 0x60, 0x46, 0x05, 0x2E, 0xE0, 0x47, 0x23, 0x44, 0x60, 0x47, 0xEE, 0x4B, 0x60, 0x49, 0x03, 0x26, 0x60, 0x49, 0xCE, 0x2D, 0x60, 0x4A, 0xE3, 0x08, 0x60, -0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xCC, 0x24, 0xE0, 0x4D, 0x8D, 0xF1, 0x60, 0x4E, 0xAC, 0x06, 0xE0, -0x4F, 0x6D, 0xD3, 0x60, 0x50, 0x8B, 0xE8, 0xE0, 0x51, 0x56, 0xEF, 0xE0, 0x52, 0x6B, 0xCA, 0xE0, -0x53, 0x36, 0xD1, 0xE0, 0x54, 0x4B, 0xAC, 0xE0, 0x55, 0x16, 0xB3, 0xE0, 0x56, 0x2B, 0x8E, 0xE0, -0x56, 0xF6, 0x95, 0xE0, 0x58, 0x14, 0xAB, 0x60, 0x58, 0xD6, 0x77, 0xE0, 0x59, 0xF4, 0x8D, 0x60, -0x5A, 0xB6, 0x59, 0xE0, 0x5B, 0xD4, 0x6F, 0x60, 0x5C, 0x9F, 0x76, 0x60, 0x5D, 0xB4, 0x51, 0x60, -0x5E, 0x7F, 0x58, 0x60, 0x5F, 0x94, 0x33, 0x60, 0x60, 0x5F, 0x3A, 0x60, 0x61, 0x7D, 0x4F, 0xE0, -0x62, 0x3F, 0x1C, 0x60, 0x63, 0x5D, 0x31, 0xE0, 0x64, 0x1E, 0xFE, 0x60, 0x65, 0x3D, 0x13, 0xE0, -0x66, 0x08, 0x1A, 0xE0, 0x67, 0x1C, 0xF5, 0xE0, 0x67, 0xE7, 0xFC, 0xE0, 0x68, 0xFC, 0xD7, 0xE0, -0x69, 0xC7, 0xDE, 0xE0, 0x6A, 0xDC, 0xB9, 0xE0, 0x6B, 0xA7, 0xC0, 0xE0, 0x6C, 0xC5, 0xD6, 0x60, -0x6D, 0x87, 0xA2, 0xE0, 0x6E, 0xA5, 0xB8, 0x60, 0x6F, 0x67, 0x84, 0xE0, 0x70, 0x85, 0x9A, 0x60, -0x71, 0x50, 0xA1, 0x60, 0x72, 0x65, 0x7C, 0x60, 0x73, 0x30, 0x83, 0x60, 0x74, 0x45, 0x5E, 0x60, -0x75, 0x10, 0x65, 0x60, 0x76, 0x2E, 0x7A, 0xE0, 0x76, 0xF0, 0x47, 0x60, 0x78, 0x0E, 0x5C, 0xE0, -0x78, 0xD0, 0x29, 0x60, 0x79, 0xEE, 0x3E, 0xE0, 0x7A, 0xB0, 0x0B, 0x60, 0x7B, 0xCE, 0x20, 0xE0, -0x7C, 0x99, 0x27, 0xE0, 0x7D, 0xAE, 0x02, 0xE0, 0x7E, 0x79, 0x09, 0xE0, 0x7F, 0x8D, 0xE4, 0xE0, +0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xCC, 0x32, 0xF0, 0x4D, 0x8D, 0xFF, 0x70, 0x4E, 0xAC, 0x14, 0xF0, +0x4F, 0x6D, 0xE1, 0x70, 0x50, 0x8B, 0xF6, 0xF0, 0x51, 0x56, 0xFD, 0xF0, 0x52, 0x6B, 0xD8, 0xF0, +0x53, 0x36, 0xDF, 0xF0, 0x54, 0x4B, 0xBA, 0xF0, 0x55, 0x16, 0xC1, 0xF0, 0x56, 0x2B, 0x9C, 0xF0, +0x56, 0xF6, 0xA3, 0xF0, 0x58, 0x14, 0xB9, 0x70, 0x58, 0xD6, 0x85, 0xF0, 0x59, 0xF4, 0x9B, 0x70, +0x5A, 0xB6, 0x67, 0xF0, 0x5B, 0xD4, 0x7D, 0x70, 0x5C, 0x9F, 0x84, 0x70, 0x5D, 0xB4, 0x5F, 0x70, +0x5E, 0x7F, 0x66, 0x70, 0x5F, 0x94, 0x41, 0x70, 0x60, 0x5F, 0x48, 0x70, 0x61, 0x7D, 0x5D, 0xF0, +0x62, 0x3F, 0x2A, 0x70, 0x63, 0x5D, 0x3F, 0xF0, 0x64, 0x1F, 0x0C, 0x70, 0x65, 0x3D, 0x21, 0xF0, +0x66, 0x08, 0x28, 0xF0, 0x67, 0x1D, 0x03, 0xF0, 0x67, 0xE8, 0x0A, 0xF0, 0x68, 0xFC, 0xE5, 0xF0, +0x69, 0xC7, 0xEC, 0xF0, 0x6A, 0xDC, 0xC7, 0xF0, 0x6B, 0xA7, 0xCE, 0xF0, 0x6C, 0xC5, 0xE4, 0x70, +0x6D, 0x87, 0xB0, 0xF0, 0x6E, 0xA5, 0xC6, 0x70, 0x6F, 0x67, 0x92, 0xF0, 0x70, 0x85, 0xA8, 0x70, +0x71, 0x50, 0xAF, 0x70, 0x72, 0x65, 0x8A, 0x70, 0x73, 0x30, 0x91, 0x70, 0x74, 0x45, 0x6C, 0x70, +0x75, 0x10, 0x73, 0x70, 0x76, 0x2E, 0x88, 0xF0, 0x76, 0xF0, 0x55, 0x70, 0x78, 0x0E, 0x6A, 0xF0, +0x78, 0xD0, 0x37, 0x70, 0x79, 0xEE, 0x4C, 0xF0, 0x7A, 0xB0, 0x19, 0x70, 0x7B, 0xCE, 0x2E, 0xF0, +0x7C, 0x99, 0x35, 0xF0, 0x7D, 0xAE, 0x10, 0xF0, 0x7E, 0x79, 0x17, 0xF0, 0x7F, 0x8D, 0xF2, 0xF0, 0x01, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x03, 0x02, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x04, 0x02, 0x03, 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, 0x00, 0x00, 0x94, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, +0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x05, 0x04, 0x06, 0x07, 0x06, +0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, +0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, +0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, 0x07, 0x06, +0x07, 0x06, 0x07, 0x06, 0x07, 0x00, 0x00, 0x94, 0xBC, 0x00, 0x00, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xA8, 0xC0, 0x00, 0x04, 0x00, 0x00, 0xB6, 0xD0, 0x01, 0x09, 0x00, 0x00, 0xA8, 0xC0, 0x01, 0x09, 0x00, 0x00, 0x9A, 0xB0, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x50, 0x45, 0x54, 0x54, 0x00, 0x50, 0x45, 0x54, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x39, 0xE2, 0x02, 0x04, 0xBD, 0x28, 0x00, 0x00, 0x00, 0x15, -0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x39, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6D, 0x63, +0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x38, 0x20, 0x2D, 0x20, 0x4B, 0x61, 0x6D, 0x63, 0x68, 0x61, 0x74, 0x6B, 0x61, /* Asia/Karachi */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x50, 0x4B, 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, 0x43, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x89, 0x7E, 0xFC, 0xA4, +0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x16, 0x89, 0x7E, 0xFC, 0xA4, 0xCC, 0x95, 0x32, 0xA8, 0xD2, 0x74, 0x12, 0x98, 0xDD, 0xA8, 0xE0, 0xA8, 0x02, 0x4F, 0xAB, 0x30, 0x3C, 0xAF, 0x45, 0xEC, 0x3D, 0x9F, 0x28, 0xDC, 0x48, 0x41, 0xA0, 0x30, 0x49, 0x0B, 0x47, 0xA0, -0x49, 0xE4, 0xDD, 0x30, 0x4A, 0xEC, 0x7B, 0x20, 0x4B, 0xC6, 0x10, 0xB0, 0x4C, 0xCD, 0xAE, 0xA0, -0x4D, 0xA7, 0x44, 0x30, 0x4E, 0xAE, 0xE2, 0x20, 0x4F, 0x89, 0xC9, 0x30, 0x50, 0x91, 0x67, 0x20, -0x51, 0x6A, 0xFC, 0xB0, 0x52, 0x72, 0x9A, 0xA0, 0x53, 0x4C, 0x30, 0x30, 0x54, 0x53, 0xCE, 0x20, -0x55, 0x2D, 0x63, 0xB0, 0x56, 0x35, 0x01, 0xA0, 0x57, 0x0F, 0xE8, 0xB0, 0x58, 0x17, 0x86, 0xA0, -0x58, 0xF1, 0x1C, 0x30, 0x59, 0xF8, 0xBA, 0x20, 0x5A, 0xD2, 0x4F, 0xB0, 0x5B, 0xD9, 0xED, 0xA0, -0x5C, 0xB3, 0x83, 0x30, 0x5D, 0xBB, 0x21, 0x20, 0x5E, 0x96, 0x08, 0x30, 0x5F, 0x9D, 0xA6, 0x20, -0x60, 0x77, 0x3B, 0xB0, 0x61, 0x7E, 0xD9, 0xA0, 0x62, 0x58, 0x6F, 0x30, 0x63, 0x60, 0x0D, 0x20, -0x64, 0x39, 0xA2, 0xB0, 0x65, 0x41, 0x40, 0xA0, 0x66, 0x1C, 0x27, 0xB0, 0x67, 0x23, 0xC5, 0xA0, -0x67, 0xFD, 0x5B, 0x30, 0x69, 0x04, 0xF9, 0x20, 0x69, 0xDE, 0x8E, 0xB0, 0x6A, 0xE6, 0x2C, 0xA0, -0x6B, 0xBF, 0xC2, 0x30, 0x6C, 0xC7, 0x60, 0x20, 0x6D, 0xA2, 0x47, 0x30, 0x6E, 0xA9, 0xE5, 0x20, -0x6F, 0x83, 0x7A, 0xB0, 0x70, 0x8B, 0x18, 0xA0, 0x71, 0x64, 0xAE, 0x30, 0x72, 0x6C, 0x4C, 0x20, -0x73, 0x45, 0xE1, 0xB0, 0x74, 0x4D, 0x7F, 0xA0, 0x75, 0x28, 0x66, 0xB0, 0x76, 0x30, 0x04, 0xA0, -0x77, 0x09, 0x9A, 0x30, 0x78, 0x11, 0x38, 0x20, 0x78, 0xEA, 0xCD, 0xB0, 0x79, 0xF2, 0x6B, 0xA0, -0x7A, 0xCC, 0x01, 0x30, 0x7B, 0xD3, 0x9F, 0x20, 0x7C, 0xAE, 0x86, 0x30, 0x7D, 0xB6, 0x24, 0x20, -0x7E, 0x8F, 0xB9, 0xB0, 0x7F, 0x97, 0x57, 0xA0, 0x01, 0x02, 0x01, 0x03, 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, 0x00, 0x00, 0x3E, 0xDC, 0x00, -0x00, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x04, 0x00, 0x00, 0x5B, 0x68, 0x01, 0x04, 0x00, 0x00, 0x46, -0x50, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60, 0x01, 0x0D, 0x00, 0x00, 0x46, 0x50, 0x00, 0x12, 0x4C, -0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x4B, 0x41, 0x52, 0x54, 0x00, 0x50, 0x4B, 0x53, 0x54, -0x00, 0x50, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0xAF, 0x45, 0xCA, 0x01, 0x78, 0xF7, 0xE8, 0x00, 0x00, 0x00, 0x00, +0x49, 0xE4, 0xDD, 0x30, 0x4A, 0xEC, 0x7B, 0x20, 0x01, 0x02, 0x01, 0x03, 0x05, 0x04, 0x05, 0x04, +0x05, 0x04, 0x05, 0x00, 0x00, 0x3E, 0xDC, 0x00, 0x00, 0x00, 0x00, 0x4D, 0x58, 0x00, 0x04, 0x00, +0x00, 0x5B, 0x68, 0x01, 0x04, 0x00, 0x00, 0x46, 0x50, 0x00, 0x08, 0x00, 0x00, 0x54, 0x60, 0x01, +0x0D, 0x00, 0x00, 0x46, 0x50, 0x00, 0x12, 0x4C, 0x4D, 0x54, 0x00, 0x49, 0x53, 0x54, 0x00, 0x4B, +0x41, 0x52, 0x54, 0x00, 0x50, 0x4B, 0x53, 0x54, 0x00, 0x50, 0x4B, 0x54, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xAF, 0x45, 0xCA, 0x01, 0x78, 0xF7, +0xE8, 0x00, 0x00, 0x00, 0x00, /* Asia/Kashgar */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x43, 0x4E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -8973,7 +8933,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0xE8, 0xF3, 0xD8, 0xF0, 0xE9, 0xE3, 0xD8, 0x00, 0xEA, 0xD5, 0x0C, 0x70, 0xEB, 0xC5, 0x0B, 0x80, 0xEC, 0xB6, 0x3F, 0xF0, 0xED, 0xF7, 0xFC, 0x00, 0xEE, 0x98, 0xC4, 0xF0, 0xEF, 0xD9, 0x2F, 0x80, 0xF0, 0x79, 0xF8, 0x70, 0x07, 0xFC, 0x56, 0x00, 0x08, 0xED, 0x8A, 0x70, 0x09, 0xDD, 0x89, 0x80, -0x0A, 0xCE, 0xBD, 0xF0, 0x13, 0xBC, 0xD5, 0x00, 0x14, 0x36, 0x10, 0xF0, 0x00, 0x01, 0x00, 0x01, +0x0A, 0xCE, 0xBD, 0xF0, 0x11, 0xDA, 0x50, 0x00, 0x12, 0x53, 0x8B, 0xF0, 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, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, @@ -11572,7 +11532,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, 0x49, 0xBC, 0x6F, 0x30, -0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, +0x4A, 0xD1, 0x58, 0x40, 0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 0x04, 0xF5, 0xB0, 0x56, 0x19, 0xDE, 0xC0, 0x56, 0xE4, 0xD7, 0xB0, 0x57, 0xF9, 0xC0, 0xC0, 0x58, 0xC4, 0xB9, 0xB0, @@ -11628,7 +11588,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, -0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, +0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 0x04, 0xF5, 0xB0, 0x56, 0x19, 0xDE, 0xC0, 0x56, 0xE4, 0xD7, 0xB0, 0x57, 0xF9, 0xC0, 0xC0, @@ -14639,8 +14599,8 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* Europe/Samara */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x52, 0x55, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x1A, 0xA1, 0x00, 0x26, 0x9C, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x76, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x1A, 0xA1, 0x00, 0x26, 0x9C, 0xB5, 0xA4, 0x0B, 0x50, 0xBE, 0x4C, 0x26, 0xC0, 0x15, 0x27, 0x99, 0xC0, 0x16, 0x18, 0xCE, 0x30, 0x17, 0x08, 0xCD, 0x40, 0x17, 0xFA, 0x01, 0xB0, 0x18, 0xEA, 0x00, 0xC0, 0x19, 0xDB, 0x35, 0x30, 0x1A, 0xCC, 0x85, 0xC0, 0x1B, 0xBC, 0x92, 0xE0, 0x1C, 0xAC, 0x83, 0xE0, 0x1D, 0x9C, 0x74, 0xE0, @@ -14656,39 +14616,40 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x3F, 0x9A, 0xF2, 0x60, 0x40, 0x65, 0xF9, 0x60, 0x41, 0x84, 0x0E, 0xE0, 0x42, 0x45, 0xDB, 0x60, 0x43, 0x63, 0xF0, 0xE0, 0x44, 0x25, 0xBD, 0x60, 0x45, 0x43, 0xD2, 0xE0, 0x46, 0x05, 0x9F, 0x60, 0x47, 0x23, 0xB4, 0xE0, 0x47, 0xEE, 0xBB, 0xE0, 0x49, 0x03, 0x96, 0xE0, 0x49, 0xCE, 0x9D, 0xE0, -0x4A, 0xE3, 0x78, 0xE0, 0x4B, 0xAE, 0x7F, 0xE0, 0x4C, 0xCC, 0x95, 0x60, 0x4D, 0x8E, 0x61, 0xE0, -0x4E, 0xAC, 0x77, 0x60, 0x4F, 0x6E, 0x43, 0xE0, 0x50, 0x8C, 0x59, 0x60, 0x51, 0x57, 0x60, 0x60, -0x52, 0x6C, 0x3B, 0x60, 0x53, 0x37, 0x42, 0x60, 0x54, 0x4C, 0x1D, 0x60, 0x55, 0x17, 0x24, 0x60, -0x56, 0x2B, 0xFF, 0x60, 0x56, 0xF7, 0x06, 0x60, 0x58, 0x15, 0x1B, 0xE0, 0x58, 0xD6, 0xE8, 0x60, -0x59, 0xF4, 0xFD, 0xE0, 0x5A, 0xB6, 0xCA, 0x60, 0x5B, 0xD4, 0xDF, 0xE0, 0x5C, 0x9F, 0xE6, 0xE0, -0x5D, 0xB4, 0xC1, 0xE0, 0x5E, 0x7F, 0xC8, 0xE0, 0x5F, 0x94, 0xA3, 0xE0, 0x60, 0x5F, 0xAA, 0xE0, -0x61, 0x7D, 0xC0, 0x60, 0x62, 0x3F, 0x8C, 0xE0, 0x63, 0x5D, 0xA2, 0x60, 0x64, 0x1F, 0x6E, 0xE0, -0x65, 0x3D, 0x84, 0x60, 0x66, 0x08, 0x8B, 0x60, 0x67, 0x1D, 0x66, 0x60, 0x67, 0xE8, 0x6D, 0x60, -0x68, 0xFD, 0x48, 0x60, 0x69, 0xC8, 0x4F, 0x60, 0x6A, 0xDD, 0x2A, 0x60, 0x6B, 0xA8, 0x31, 0x60, -0x6C, 0xC6, 0x46, 0xE0, 0x6D, 0x88, 0x13, 0x60, 0x6E, 0xA6, 0x28, 0xE0, 0x6F, 0x67, 0xF5, 0x60, -0x70, 0x86, 0x0A, 0xE0, 0x71, 0x51, 0x11, 0xE0, 0x72, 0x65, 0xEC, 0xE0, 0x73, 0x30, 0xF3, 0xE0, -0x74, 0x45, 0xCE, 0xE0, 0x75, 0x10, 0xD5, 0xE0, 0x76, 0x2E, 0xEB, 0x60, 0x76, 0xF0, 0xB7, 0xE0, -0x78, 0x0E, 0xCD, 0x60, 0x78, 0xD0, 0x99, 0xE0, 0x79, 0xEE, 0xAF, 0x60, 0x7A, 0xB0, 0x7B, 0xE0, -0x7B, 0xCE, 0x91, 0x60, 0x7C, 0x99, 0x98, 0x60, 0x7D, 0xAE, 0x73, 0x60, 0x7E, 0x79, 0x7A, 0x60, -0x7F, 0x8E, 0x55, 0x60, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, +0x4A, 0xE3, 0x78, 0xE0, 0x4B, 0xAE, 0x7F, 0xE0, 0x4C, 0xCC, 0xA3, 0x70, 0x4D, 0x8E, 0x6F, 0xF0, +0x4E, 0xAC, 0x85, 0x70, 0x4F, 0x6E, 0x51, 0xF0, 0x50, 0x8C, 0x67, 0x70, 0x51, 0x57, 0x6E, 0x70, +0x52, 0x6C, 0x49, 0x70, 0x53, 0x37, 0x50, 0x70, 0x54, 0x4C, 0x2B, 0x70, 0x55, 0x17, 0x32, 0x70, +0x56, 0x2C, 0x0D, 0x70, 0x56, 0xF7, 0x14, 0x70, 0x58, 0x15, 0x29, 0xF0, 0x58, 0xD6, 0xF6, 0x70, +0x59, 0xF5, 0x0B, 0xF0, 0x5A, 0xB6, 0xD8, 0x70, 0x5B, 0xD4, 0xED, 0xF0, 0x5C, 0x9F, 0xF4, 0xF0, +0x5D, 0xB4, 0xCF, 0xF0, 0x5E, 0x7F, 0xD6, 0xF0, 0x5F, 0x94, 0xB1, 0xF0, 0x60, 0x5F, 0xB8, 0xF0, +0x61, 0x7D, 0xCE, 0x70, 0x62, 0x3F, 0x9A, 0xF0, 0x63, 0x5D, 0xB0, 0x70, 0x64, 0x1F, 0x7C, 0xF0, +0x65, 0x3D, 0x92, 0x70, 0x66, 0x08, 0x99, 0x70, 0x67, 0x1D, 0x74, 0x70, 0x67, 0xE8, 0x7B, 0x70, +0x68, 0xFD, 0x56, 0x70, 0x69, 0xC8, 0x5D, 0x70, 0x6A, 0xDD, 0x38, 0x70, 0x6B, 0xA8, 0x3F, 0x70, +0x6C, 0xC6, 0x54, 0xF0, 0x6D, 0x88, 0x21, 0x70, 0x6E, 0xA6, 0x36, 0xF0, 0x6F, 0x68, 0x03, 0x70, +0x70, 0x86, 0x18, 0xF0, 0x71, 0x51, 0x1F, 0xF0, 0x72, 0x65, 0xFA, 0xF0, 0x73, 0x31, 0x01, 0xF0, +0x74, 0x45, 0xDC, 0xF0, 0x75, 0x10, 0xE3, 0xF0, 0x76, 0x2E, 0xF9, 0x70, 0x76, 0xF0, 0xC5, 0xF0, +0x78, 0x0E, 0xDB, 0x70, 0x78, 0xD0, 0xA7, 0xF0, 0x79, 0xEE, 0xBD, 0x70, 0x7A, 0xB0, 0x89, 0xF0, +0x7B, 0xCE, 0x9F, 0x70, 0x7C, 0x99, 0xA6, 0x70, 0x7D, 0xAE, 0x81, 0x70, 0x7E, 0x79, 0x88, 0x70, +0x7F, 0x8E, 0x63, 0x70, 0x01, 0x02, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x04, 0x03, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x06, 0x05, 0x07, 0x08, 0x07, 0x08, 0x09, 0x08, 0x02, 0x0B, 0x02, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, -0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, -0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, -0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, -0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x0C, 0x0D, 0x00, 0x00, 0x2F, 0x04, 0x00, 0x00, +0x0C, 0x0D, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, +0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, +0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, +0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x0E, 0x0F, 0x00, 0x00, 0x2F, 0x04, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x38, 0x40, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, 0x01, 0x09, 0x00, 0x00, 0x38, 0x40, 0x01, 0x09, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x0F, 0x00, 0x00, 0x2A, 0x30, 0x01, 0x09, 0x00, 0x00, 0x1C, 0x20, 0x00, 0x0F, 0x00, 0x00, 0x46, 0x50, -0x01, 0x14, 0x00, 0x00, 0x46, 0x50, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x4C, 0x4D, -0x54, 0x00, 0x53, 0x41, 0x4D, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x53, 0x54, 0x00, 0x4B, 0x55, 0x59, -0x54, 0x00, 0x53, 0x41, 0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, -0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, -0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x81, 0x7F, 0x01, 0x5F, 0x2E, 0x58, 0x00, 0x00, 0x00, 0x1C, -0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x2B, 0x30, 0x31, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6D, 0x61, -0x72, 0x61, 0x2C, 0x20, 0x55, 0x64, 0x6D, 0x75, 0x72, 0x74, 0x69, 0x61, +0x01, 0x14, 0x00, 0x00, 0x46, 0x50, 0x01, 0x14, 0x00, 0x00, 0x38, 0x40, 0x00, 0x04, 0x00, 0x00, +0x38, 0x40, 0x01, 0x14, 0x00, 0x00, 0x2A, 0x30, 0x00, 0x04, 0x4C, 0x4D, 0x54, 0x00, 0x53, 0x41, +0x4D, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x53, 0x54, 0x00, 0x4B, 0x55, 0x59, 0x54, 0x00, 0x53, 0x41, +0x4D, 0x53, 0x54, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, +0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x81, 0x7F, 0x01, 0x5F, 0x2E, 0x58, 0x00, 0x00, 0x00, 0x19, +0x4D, 0x6F, 0x73, 0x63, 0x6F, 0x77, 0x20, 0x2D, 0x20, 0x53, 0x61, 0x6D, 0x61, 0x72, 0x61, 0x2C, +0x20, 0x55, 0x64, 0x6D, 0x75, 0x72, 0x74, 0x69, 0x61, /* Europe/San_Marino */ 0x50, 0x48, 0x50, 0x31, 0x01, 0x53, 0x4D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -16631,7 +16592,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 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, 0x4A, 0xC8, 0x80, 0x30, 0x4B, 0xAF, 0x28, 0xA0, 0x01, 0x02, 0x03, 0x02, +0xDA, 0x62, 0x04, 0x38, 0x4C, 0x9F, 0x27, 0xB0, 0x4D, 0x98, 0x45, 0x20, 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, @@ -16771,7 +16732,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0x3E, 0x6A, 0xAE, 0x30, 0x3F, 0x88, 0xD1, 0xC0, 0x40, 0x53, 0xCA, 0xB0, 0x41, 0x68, 0xB3, 0xC0, 0x42, 0x33, 0xAC, 0xB0, 0x43, 0x48, 0x95, 0xC0, 0x44, 0x13, 0x8E, 0xB0, 0x45, 0x31, 0xB2, 0x40, 0x45, 0xF3, 0x70, 0xB0, 0x47, 0x11, 0x94, 0x40, 0x47, 0xEF, 0x02, 0x30, 0x48, 0xF1, 0x76, 0x40, -0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0x9C, 0x51, 0x30, 0x4C, 0xB1, 0x3A, 0x40, +0x49, 0xBC, 0x6F, 0x30, 0x4A, 0xD1, 0x58, 0x40, 0x4B, 0xB8, 0x00, 0xB0, 0x4C, 0xB1, 0x3A, 0x40, 0x4D, 0x7C, 0x33, 0x30, 0x4E, 0x91, 0x1C, 0x40, 0x4F, 0x5C, 0x15, 0x30, 0x50, 0x7A, 0x38, 0xC0, 0x51, 0x3B, 0xF7, 0x30, 0x52, 0x5A, 0x1A, 0xC0, 0x53, 0x1B, 0xD9, 0x30, 0x54, 0x39, 0xFC, 0xC0, 0x55, 0x04, 0xF5, 0xB0, 0x56, 0x19, 0xDE, 0xC0, 0x56, 0xE4, 0xD7, 0xB0, 0x57, 0xF9, 0xC0, 0xC0, @@ -16836,13 +16797,13 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { /* 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, 0x07, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0D, 0x9A, 0x13, 0xB2, 0x3C, +0x00, 0x00, 0x00, 0x09, 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, 0xD2, 0xF9, 0x60, 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, - +0x4B, 0x11, 0x2C, 0xE0, 0x4B, 0xAE, 0x0F, 0x60, 0x4C, 0xC2, 0xEA, 0x60, 0x4D, 0x8D, 0xF1, 0x60, +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, @@ -17363,7 +17324,7 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 0xE8, 0xF3, 0xD8, 0xF0, 0xE9, 0xE3, 0xD8, 0x00, 0xEA, 0xD5, 0x0C, 0x70, 0xEB, 0xC5, 0x0B, 0x80, 0xEC, 0xB6, 0x3F, 0xF0, 0xED, 0xF7, 0xFC, 0x00, 0xEE, 0x98, 0xC4, 0xF0, 0xEF, 0xD9, 0x2F, 0x80, 0xF0, 0x79, 0xF8, 0x70, 0x07, 0xFC, 0x56, 0x00, 0x08, 0xED, 0x8A, 0x70, 0x09, 0xDD, 0x89, 0x80, -0x0A, 0xCE, 0xBD, 0xF0, 0x13, 0xBC, 0xD5, 0x00, 0x14, 0x36, 0x10, 0xF0, 0x00, 0x01, 0x00, 0x01, +0x0A, 0xCE, 0xBD, 0xF0, 0x11, 0xDA, 0x50, 0x00, 0x12, 0x53, 0x8B, 0xF0, 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, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x7E, 0x90, 0x01, 0x00, 0x00, 0x00, 0x70, 0x80, 0x00, 0x04, @@ -18247,4 +18208,4 @@ const unsigned char timelib_timezone_db_data_builtin[259897] = { 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 = { "2010.3", 564, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; +const timelib_tzdb timezonedb_builtin = { "2010.9", 565, timezonedb_idx_builtin, timelib_timezone_db_data_builtin }; diff --git a/ext/date/lib/timezonemap.h b/ext/date/lib/timezonemap.h index 905694630..292cab93c 100644 --- a/ext/date/lib/timezonemap.h +++ b/ext/date/lib/timezonemap.h @@ -8,6 +8,9 @@ { "act", 0, -18000, "Brazil/Acre" }, { "addt", 1, -7200, "America/Goose_Bay" }, { "addt", 1, -7200, "America/Pangnirtung" }, + { "admt", 0, 9320, "Africa/Addis_Ababa" }, + { "admt", 0, 9320, "Africa/Asmara" }, + { "admt", 0, 9320, "Africa/Asmera" }, { "adt", 1, -10800, "America/Halifax" }, { "adt", 1, -10800, "America/Barbados" }, { "adt", 1, -10800, "America/Blanc-Sablon" }, @@ -20,6 +23,7 @@ { "adt", 1, -10800, "Atlantic/Bermuda" }, { "adt", 1, -10800, "Canada/Atlantic" }, { "adt", 1, 14400, "Asia/Baghdad" }, + { "aft", 0, 14400, "Asia/Kabul" }, { "aft", 0, 16200, "Asia/Kabul" }, { "ahdt", 1, -32400, "America/Anchorage" }, { "ahdt", 1, -32400, "US/Alaska" }, @@ -52,16 +56,24 @@ { "amst", 1, -10800, "America/Cuiaba" }, { "amst", 1, -10800, "America/Manaus" }, { "amst", 1, -10800, "America/Porto_Velho" }, + { "amst", 1, -10800, "America/Santarem" }, { "amst", 1, -10800, "Brazil/West" }, { "amt", 0, 10800, "Asia/Yerevan" }, { "amt", 0, 14400, "Asia/Yerevan" }, + { "amt", 0, -13840, "America/Asuncion" }, { "amt", 0, -14400, "America/Boa_Vista" }, { "amt", 0, -14400, "America/Campo_Grande" }, { "amt", 0, -14400, "America/Cuiaba" }, + { "amt", 0, -14400, "America/Eirunepe" }, { "amt", 0, -14400, "America/Manaus" }, + { "amt", 0, -14400, "America/Porto_Acre" }, { "amt", 0, -14400, "America/Porto_Velho" }, + { "amt", 0, -14400, "America/Rio_Branco" }, + { "amt", 0, -14400, "America/Santarem" }, + { "amt", 0, -14400, "Brazil/Acre" }, { "amt", 0, -14400, "Brazil/West" }, { "amt", 0, 1172, "Europe/Amsterdam" }, + { "amt", 0, 5692, "Europe/Athens" }, { "anast", 1, 43200, "Asia/Anadyr" }, { "anast", 1, 46800, "Asia/Anadyr" }, { "anast", 1, 50400, "Asia/Anadyr" }, @@ -70,6 +82,7 @@ { "anat", 0, 46800, "Asia/Anadyr" }, { "ant", 0, -16200, "America/Curacao" }, { "ant", 0, -16200, "America/Aruba" }, + { "aot", 0, 3124, "Africa/Luanda" }, { "apt", 1, -10800, "America/Halifax" }, { "apt", 1, -10800, "America/Blanc-Sablon" }, { "apt", 1, -10800, "America/Glace_Bay" }, @@ -93,7 +106,9 @@ { "arst", 1, -10800, "America/Argentina/La_Rioja" }, { "arst", 1, -10800, "America/Argentina/Mendoza" }, { "arst", 1, -10800, "America/Argentina/Rio_Gallegos" }, + { "arst", 1, -10800, "America/Argentina/Salta" }, { "arst", 1, -10800, "America/Argentina/San_Juan" }, + { "arst", 1, -10800, "America/Argentina/San_Luis" }, { "arst", 1, -10800, "America/Argentina/Tucuman" }, { "arst", 1, -10800, "America/Argentina/Ushuaia" }, { "arst", 1, -10800, "America/Catamarca" }, @@ -110,7 +125,9 @@ { "arst", 1, -7200, "America/Argentina/La_Rioja" }, { "arst", 1, -7200, "America/Argentina/Mendoza" }, { "arst", 1, -7200, "America/Argentina/Rio_Gallegos" }, + { "arst", 1, -7200, "America/Argentina/Salta" }, { "arst", 1, -7200, "America/Argentina/San_Juan" }, + { "arst", 1, -7200, "America/Argentina/San_Luis" }, { "arst", 1, -7200, "America/Argentina/Tucuman" }, { "arst", 1, -7200, "America/Argentina/Ushuaia" }, { "arst", 1, -7200, "America/Catamarca" }, @@ -129,7 +146,9 @@ { "art", 0, -10800, "America/Argentina/La_Rioja" }, { "art", 0, -10800, "America/Argentina/Mendoza" }, { "art", 0, -10800, "America/Argentina/Rio_Gallegos" }, + { "art", 0, -10800, "America/Argentina/Salta" }, { "art", 0, -10800, "America/Argentina/San_Juan" }, + { "art", 0, -10800, "America/Argentina/San_Luis" }, { "art", 0, -10800, "America/Argentina/Tucuman" }, { "art", 0, -10800, "America/Argentina/Ushuaia" }, { "art", 0, -10800, "America/Catamarca" }, @@ -146,7 +165,9 @@ { "art", 0, -14400, "America/Argentina/La_Rioja" }, { "art", 0, -14400, "America/Argentina/Mendoza" }, { "art", 0, -14400, "America/Argentina/Rio_Gallegos" }, + { "art", 0, -14400, "America/Argentina/Salta" }, { "art", 0, -14400, "America/Argentina/San_Juan" }, + { "art", 0, -14400, "America/Argentina/San_Luis" }, { "art", 0, -14400, "America/Argentina/Tucuman" }, { "art", 0, -14400, "America/Argentina/Ushuaia" }, { "art", 0, -14400, "America/Catamarca" }, @@ -176,6 +197,7 @@ { "ast", 0, -14400, "America/Grenada" }, { "ast", 0, -14400, "America/Guadeloupe" }, { "ast", 0, -14400, "America/Halifax" }, + { "ast", 0, -14400, "America/Marigot" }, { "ast", 0, -14400, "America/Martinique" }, { "ast", 0, -14400, "America/Miquelon" }, { "ast", 0, -14400, "America/Moncton" }, @@ -184,6 +206,7 @@ { "ast", 0, -14400, "America/Port_of_Spain" }, { "ast", 0, -14400, "America/Puerto_Rico" }, { "ast", 0, -14400, "America/Santo_Domingo" }, + { "ast", 0, -14400, "America/St_Barthelemy" }, { "ast", 0, -14400, "America/St_Kitts" }, { "ast", 0, -14400, "America/St_Lucia" }, { "ast", 0, -14400, "America/St_Thomas" }, @@ -219,6 +242,8 @@ { "bakt", 0, 10800, "Asia/Baku" }, { "bakt", 0, 14400, "Asia/Baku" }, { "bdst", 1, 7200, "Europe/London" }, + { "bdst", 1, 25200, "Asia/Dacca" }, + { "bdst", 1, 25200, "Asia/Dhaka" }, { "bdst", 1, 7200, "Europe/Belfast" }, { "bdst", 1, 7200, "Europe/Gibraltar" }, { "bdst", 1, 7200, "Europe/Guernsey" }, @@ -239,8 +264,12 @@ { "beaut", 0, 9885, "Africa/Dar_es_Salaam" }, { "beaut", 0, 9885, "Africa/Kampala" }, { "bmt", 0, -14308, "America/Barbados" }, + { "bmt", 0, -17780, "America/Bogota" }, { "bmt", 0, -3996, "Africa/Banjul" }, + { "bmt", 0, 10656, "Asia/Baghdad" }, + { "bmt", 0, 24124, "Asia/Bangkok" }, { "bmt", 0, 6264, "Europe/Tiraspol" }, + { "bmt", 0, 6264, "Europe/Bucharest" }, { "bmt", 0, 6264, "Europe/Chisinau" }, { "bnt", 0, 27000, "Asia/Brunei" }, { "bnt", 0, 28800, "Asia/Brunei" }, @@ -264,6 +293,7 @@ { "brt", 0, -10800, "America/Fortaleza" }, { "brt", 0, -10800, "America/Maceio" }, { "brt", 0, -10800, "America/Recife" }, + { "brt", 0, -10800, "America/Santarem" }, { "brt", 0, -10800, "Brazil/East" }, { "bst", 0, 3600, "Europe/London" }, { "bst", 1, 3600, "Europe/London" }, @@ -292,6 +322,7 @@ { "bst", 1, 3600, "GB-Eire" }, { "btt", 0, 21600, "Asia/Thimbu" }, { "btt", 0, 21600, "Asia/Thimphu" }, + { "burt", 0, 23400, "Asia/Kolkata" }, { "burt", 0, 23400, "Asia/Calcutta" }, { "burt", 0, 23400, "Asia/Dacca" }, { "burt", 0, 23400, "Asia/Dhaka" }, @@ -302,22 +333,28 @@ { "cast", 0, 34200, "Australia/Adelaide" }, { "cast", 1, 10800, "Africa/Gaborone" }, { "cast", 1, 10800, "Africa/Khartoum" }, + { "cast", 0, 39600, "Antarctica/Casey" }, { "cat", 0, -36000, "America/Anchorage" }, { "cat", 0, -36000, "US/Alaska" }, { "cat", 0, 7200, "Africa/Khartoum" }, { "cat", 0, 7200, "Africa/Blantyre" }, + { "cat", 0, 7200, "Africa/Bujumbura" }, { "cat", 0, 7200, "Africa/Gaborone" }, { "cat", 0, 7200, "Africa/Harare" }, { "cat", 0, 7200, "Africa/Kigali" }, + { "cat", 0, 7200, "Africa/Lubumbashi" }, { "cat", 0, 7200, "Africa/Lusaka" }, { "cat", 0, 7200, "Africa/Maputo" }, { "cat", 0, 7200, "Africa/Windhoek" }, { "cawt", 1, -32400, "America/Anchorage" }, { "cawt", 1, -32400, "US/Alaska" }, + { "cct", 0, 23400, "Indian/Cocos" }, { "cddt", 1, -14400, "America/Rankin_Inlet" }, + { "cddt", 1, -14400, "America/Resolute" }, { "cdt", 1, -18000, "America/Chicago" }, { "cdt", 1, -14400, "America/Havana" }, { "cdt", 1, -14400, "Cuba" }, + { "cdt", 0, -18000, "America/Resolute" }, { "cdt", 1, -18000, "America/Atikokan" }, { "cdt", 1, -18000, "America/Belize" }, { "cdt", 1, -18000, "America/Cambridge_Bay" }, @@ -332,6 +369,7 @@ { "cdt", 1, -18000, "America/Indiana/Knox" }, { "cdt", 1, -18000, "America/Indiana/Marengo" }, { "cdt", 1, -18000, "America/Indiana/Petersburg" }, + { "cdt", 1, -18000, "America/Indiana/Tell_City" }, { "cdt", 1, -18000, "America/Indiana/Vevay" }, { "cdt", 1, -18000, "America/Indiana/Vincennes" }, { "cdt", 1, -18000, "America/Indiana/Winamac" }, @@ -342,15 +380,18 @@ { "cdt", 1, -18000, "America/Knox_IN" }, { "cdt", 1, -18000, "America/Louisville" }, { "cdt", 1, -18000, "America/Managua" }, + { "cdt", 1, -18000, "America/Matamoros" }, { "cdt", 1, -18000, "America/Menominee" }, { "cdt", 1, -18000, "America/Merida" }, { "cdt", 1, -18000, "America/Mexico_City" }, { "cdt", 1, -18000, "America/Monterrey" }, { "cdt", 1, -18000, "America/North_Dakota/Center" }, { "cdt", 1, -18000, "America/North_Dakota/New_Salem" }, + { "cdt", 1, -18000, "America/Ojinaga" }, { "cdt", 1, -18000, "America/Pangnirtung" }, { "cdt", 1, -18000, "America/Rainy_River" }, { "cdt", 1, -18000, "America/Rankin_Inlet" }, + { "cdt", 1, -18000, "America/Resolute" }, { "cdt", 1, -18000, "America/Tegucigalpa" }, { "cdt", 1, -18000, "America/Winnipeg" }, { "cdt", 1, -18000, "Canada/Central" }, @@ -493,14 +534,18 @@ { "chat", 0, 32400, "Asia/Harbin" }, { "chdt", 1, -19800, "America/Belize" }, { "chost", 1, 36000, "Asia/Choibalsan" }, + { "chot", 0, 28800, "Asia/Choibalsan" }, { "chot", 0, 32400, "Asia/Choibalsan" }, { "cit", 0, 28800, "Asia/Dili" }, { "cit", 0, 28800, "Asia/Makassar" }, { "cit", 0, 28800, "Asia/Pontianak" }, { "cit", 0, 28800, "Asia/Ujung_Pandang" }, { "cjt", 0, 32400, "Asia/Sakhalin" }, + { "cjt", 0, 32400, "Asia/Tokyo" }, + { "cjt", 0, 32400, "Japan" }, { "ckhst", 1, -34200, "Pacific/Rarotonga" }, { "ckt", 0, -36000, "Pacific/Rarotonga" }, + { "ckt", 0, -37800, "Pacific/Rarotonga" }, { "clst", 1, -10800, "America/Santiago" }, { "clst", 1, -14400, "America/Santiago" }, { "clst", 1, -10800, "Antarctica/Palmer" }, @@ -511,6 +556,31 @@ { "clt", 0, -14400, "Antarctica/Palmer" }, { "clt", 0, -14400, "Chile/Continental" }, { "clt", 0, -18000, "Chile/Continental" }, + { "cmt", 0, -14640, "America/St_Lucia" }, + { "cmt", 0, -15408, "America/Argentina/Buenos_Aires" }, + { "cmt", 0, -15408, "America/Argentina/Catamarca" }, + { "cmt", 0, -15408, "America/Argentina/ComodRivadavia" }, + { "cmt", 0, -15408, "America/Argentina/Cordoba" }, + { "cmt", 0, -15408, "America/Argentina/Jujuy" }, + { "cmt", 0, -15408, "America/Argentina/La_Rioja" }, + { "cmt", 0, -15408, "America/Argentina/Mendoza" }, + { "cmt", 0, -15408, "America/Argentina/Rio_Gallegos" }, + { "cmt", 0, -15408, "America/Argentina/Salta" }, + { "cmt", 0, -15408, "America/Argentina/San_Juan" }, + { "cmt", 0, -15408, "America/Argentina/San_Luis" }, + { "cmt", 0, -15408, "America/Argentina/Tucuman" }, + { "cmt", 0, -15408, "America/Argentina/Ushuaia" }, + { "cmt", 0, -15408, "America/Buenos_Aires" }, + { "cmt", 0, -15408, "America/Catamarca" }, + { "cmt", 0, -15408, "America/Cordoba" }, + { "cmt", 0, -15408, "America/Jujuy" }, + { "cmt", 0, -15408, "America/Mendoza" }, + { "cmt", 0, -15408, "America/Rosario" }, + { "cmt", 0, -16060, "America/Caracas" }, + { "cmt", 0, -16356, "America/La_Paz" }, + { "cmt", 0, -19176, "America/Panama" }, + { "cmt", 0, 6900, "Europe/Chisinau" }, + { "cmt", 0, 6900, "Europe/Tiraspol" }, { "cost", 1, -14400, "America/Bogota" }, { "cot", 0, -18000, "America/Bogota" }, { "cpt", 1, -18000, "America/Chicago" }, @@ -521,6 +591,7 @@ { "cpt", 1, -18000, "America/Indiana/Knox" }, { "cpt", 1, -18000, "America/Indiana/Marengo" }, { "cpt", 1, -18000, "America/Indiana/Petersburg" }, + { "cpt", 1, -18000, "America/Indiana/Tell_City" }, { "cpt", 1, -18000, "America/Indiana/Vevay" }, { "cpt", 1, -18000, "America/Indiana/Vincennes" }, { "cpt", 1, -18000, "America/Indiana/Winamac" }, @@ -531,7 +602,6 @@ { "cpt", 1, -18000, "America/Louisville" }, { "cpt", 1, -18000, "America/Menominee" }, { "cpt", 1, -18000, "America/Rainy_River" }, - { "cpt", 1, -18000, "America/Rankin_Inlet" }, { "cpt", 1, -18000, "America/Winnipeg" }, { "cpt", 1, -18000, "Canada/Central" }, { "cpt", 1, -18000, "CST6CDT" }, @@ -557,6 +627,7 @@ { "cst", 0, -21600, "America/Indiana/Knox" }, { "cst", 0, -21600, "America/Indiana/Marengo" }, { "cst", 0, -21600, "America/Indiana/Petersburg" }, + { "cst", 0, -21600, "America/Indiana/Tell_City" }, { "cst", 0, -21600, "America/Indiana/Vevay" }, { "cst", 0, -21600, "America/Indiana/Vincennes" }, { "cst", 0, -21600, "America/Indiana/Winamac" }, @@ -567,6 +638,7 @@ { "cst", 0, -21600, "America/Knox_IN" }, { "cst", 0, -21600, "America/Louisville" }, { "cst", 0, -21600, "America/Managua" }, + { "cst", 0, -21600, "America/Matamoros" }, { "cst", 0, -21600, "America/Mazatlan" }, { "cst", 0, -21600, "America/Menominee" }, { "cst", 0, -21600, "America/Merida" }, @@ -574,12 +646,15 @@ { "cst", 0, -21600, "America/Monterrey" }, { "cst", 0, -21600, "America/North_Dakota/Center" }, { "cst", 0, -21600, "America/North_Dakota/New_Salem" }, + { "cst", 0, -21600, "America/Ojinaga" }, { "cst", 0, -21600, "America/Pangnirtung" }, { "cst", 0, -21600, "America/Rainy_River" }, { "cst", 0, -21600, "America/Rankin_Inlet" }, { "cst", 0, -21600, "America/Regina" }, + { "cst", 0, -21600, "America/Resolute" }, { "cst", 0, -21600, "America/Swift_Current" }, { "cst", 0, -21600, "America/Tegucigalpa" }, + { "cst", 0, -21600, "America/Thunder_Bay" }, { "cst", 0, -21600, "America/Winnipeg" }, { "cst", 0, -21600, "Canada/Central" }, { "cst", 0, -21600, "Canada/East-Saskatchewan" }, @@ -615,6 +690,7 @@ { "cst", 1, 37800, "Australia/North" }, { "cst", 1, 37800, "Australia/South" }, { "cst", 1, 37800, "Australia/Yancowinna" }, + { "cut", 0, 8400, "Europe/Zaporozhye" }, { "cvst", 1, -3600, "Atlantic/Cape_Verde" }, { "cvt", 0, -3600, "Atlantic/Cape_Verde" }, { "cvt", 0, -7200, "Atlantic/Cape_Verde" }, @@ -628,6 +704,7 @@ { "cwt", 1, -18000, "America/Indiana/Knox" }, { "cwt", 1, -18000, "America/Indiana/Marengo" }, { "cwt", 1, -18000, "America/Indiana/Petersburg" }, + { "cwt", 1, -18000, "America/Indiana/Tell_City" }, { "cwt", 1, -18000, "America/Indiana/Vevay" }, { "cwt", 1, -18000, "America/Indiana/Vincennes" }, { "cwt", 1, -18000, "America/Indiana/Winamac" }, @@ -639,7 +716,6 @@ { "cwt", 1, -18000, "America/Menominee" }, { "cwt", 1, -18000, "America/Mexico_City" }, { "cwt", 1, -18000, "America/Rainy_River" }, - { "cwt", 1, -18000, "America/Rankin_Inlet" }, { "cwt", 1, -18000, "America/Winnipeg" }, { "cwt", 1, -18000, "Canada/Central" }, { "cwt", 1, -18000, "CST6CDT" }, @@ -647,12 +723,16 @@ { "cwt", 1, -18000, "US/Central" }, { "cwt", 1, -18000, "US/East-Indiana" }, { "cwt", 1, -18000, "US/Indiana-Starke" }, + { "cxt", 0, 25200, "Indian/Christmas" }, { "chst", 0, 36000, "Pacific/Guam" }, { "chst", 0, 36000, "Pacific/Saipan" }, { "dact", 0, 21600, "Asia/Dacca" }, { "dact", 0, 21600, "Asia/Dhaka" }, + { "davt", 0, 18000, "Antarctica/Davis" }, { "davt", 0, 25200, "Antarctica/Davis" }, { "ddut", 0, 36000, "Antarctica/DumontDUrville" }, + { "dmt", 0, -1521, "Eire" }, + { "dmt", 0, -1521, "Europe/Dublin" }, { "dusst", 1, 21600, "Asia/Dushanbe" }, { "dusst", 1, 25200, "Asia/Dushanbe" }, { "dust", 0, 18000, "Asia/Dushanbe" }, @@ -688,6 +768,8 @@ { "edt", 1, -14400, "America/Grand_Turk" }, { "edt", 1, -14400, "America/Indiana/Indianapolis" }, { "edt", 1, -14400, "America/Indiana/Marengo" }, + { "edt", 1, -14400, "America/Indiana/Petersburg" }, + { "edt", 1, -14400, "America/Indiana/Tell_City" }, { "edt", 1, -14400, "America/Indiana/Vevay" }, { "edt", 1, -14400, "America/Indiana/Vincennes" }, { "edt", 1, -14400, "America/Indiana/Winamac" }, @@ -783,6 +865,8 @@ { "egt", 0, -3600, "America/Scoresbysund" }, { "ehdt", 1, -16200, "America/Santo_Domingo" }, { "eit", 0, 32400, "Asia/Jayapura" }, + { "emt", 0, -26248, "Chile/EasterIsland" }, + { "emt", 0, -26248, "Pacific/Easter" }, { "ept", 1, -14400, "America/New_York" }, { "ept", 1, -14400, "America/Detroit" }, { "ept", 1, -14400, "America/Iqaluit" }, @@ -810,6 +894,7 @@ { "est", 0, -18000, "America/Indiana/Knox" }, { "est", 0, -18000, "America/Indiana/Marengo" }, { "est", 0, -18000, "America/Indiana/Petersburg" }, + { "est", 0, -18000, "America/Indiana/Tell_City" }, { "est", 0, -18000, "America/Indiana/Vevay" }, { "est", 0, -18000, "America/Indiana/Vincennes" }, { "est", 0, -18000, "America/Indiana/Winamac" }, @@ -823,6 +908,7 @@ { "est", 0, -18000, "America/Managua" }, { "est", 0, -18000, "America/Menominee" }, { "est", 0, -18000, "America/Merida" }, + { "est", 0, -18000, "America/Moncton" }, { "est", 0, -18000, "America/Montreal" }, { "est", 0, -18000, "America/Nassau" }, { "est", 0, -18000, "America/Nipigon" }, @@ -830,6 +916,7 @@ { "est", 0, -18000, "America/Pangnirtung" }, { "est", 0, -18000, "America/Port-au-Prince" }, { "est", 0, -18000, "America/Rankin_Inlet" }, + { "est", 0, -18000, "America/Resolute" }, { "est", 0, -18000, "America/Santo_Domingo" }, { "est", 0, -18000, "America/Thunder_Bay" }, { "est", 0, -18000, "America/Toronto" }, @@ -847,7 +934,9 @@ { "est", 0, 36000, "Australia/Canberra" }, { "est", 0, 36000, "Australia/Currie" }, { "est", 0, 36000, "Australia/Hobart" }, + { "est", 0, 36000, "Australia/LHI" }, { "est", 0, 36000, "Australia/Lindeman" }, + { "est", 0, 36000, "Australia/Lord_Howe" }, { "est", 0, 36000, "Australia/Melbourne" }, { "est", 0, 36000, "Australia/NSW" }, { "est", 0, 36000, "Australia/Queensland" }, @@ -878,12 +967,15 @@ { "ewt", 1, -14400, "EST5EDT" }, { "ewt", 1, -14400, "US/Eastern" }, { "ewt", 1, -14400, "US/Michigan" }, + { "ffmt", 0, -14660, "America/Martinique" }, { "fjst", 1, 46800, "Pacific/Fiji" }, { "fjt", 0, 43200, "Pacific/Fiji" }, { "fkst", 1, -10800, "Atlantic/Stanley" }, { "fkst", 1, -7200, "Atlantic/Stanley" }, { "fkt", 0, -10800, "Atlantic/Stanley" }, { "fkt", 0, -14400, "Atlantic/Stanley" }, + { "fmt", 0, -3180, "Africa/Freetown" }, + { "fmt", 0, -4056, "Atlantic/Madeira" }, { "fnst", 1, -3600, "America/Noronha" }, { "fnst", 1, -3600, "Brazil/DeNoronha" }, { "fnt", 0, -7200, "America/Noronha" }, @@ -904,6 +996,33 @@ { "gft", 0, -10800, "America/Cayenne" }, { "gft", 0, -14400, "America/Cayenne" }, { "ghst", 1, 1200, "Africa/Accra" }, + { "gilt", 0, 43200, "Pacific/Tarawa" }, + { "gmt+10", 0, -36000, "Etc/GMT+10" }, + { "gmt+11", 0, -39600, "Etc/GMT+11" }, + { "gmt+12", 0, -43200, "Etc/GMT+12" }, + { "gmt+1", 0, -3600, "Etc/GMT+1" }, + { "gmt+2", 0, -7200, "Etc/GMT+2" }, + { "gmt+3", 0, -10800, "Etc/GMT+3" }, + { "gmt+4", 0, -14400, "Etc/GMT+4" }, + { "gmt+5", 0, -18000, "Etc/GMT+5" }, + { "gmt+6", 0, -21600, "Etc/GMT+6" }, + { "gmt+7", 0, -25200, "Etc/GMT+7" }, + { "gmt+8", 0, -28800, "Etc/GMT+8" }, + { "gmt+9", 0, -32400, "Etc/GMT+9" }, + { "gmt-10", 0, 36000, "Etc/GMT-10" }, + { "gmt-11", 0, 39600, "Etc/GMT-11" }, + { "gmt-12", 0, 43200, "Etc/GMT-12" }, + { "gmt-13", 0, 46800, "Etc/GMT-13" }, + { "gmt-14", 0, 50400, "Etc/GMT-14" }, + { "gmt-1", 0, 3600, "Etc/GMT-1" }, + { "gmt-2", 0, 7200, "Etc/GMT-2" }, + { "gmt-3", 0, 10800, "Etc/GMT-3" }, + { "gmt-4", 0, 14400, "Etc/GMT-4" }, + { "gmt-5", 0, 18000, "Etc/GMT-5" }, + { "gmt-6", 0, 21600, "Etc/GMT-6" }, + { "gmt-7", 0, 25200, "Etc/GMT-7" }, + { "gmt-8", 0, 28800, "Etc/GMT-8" }, + { "gmt-9", 0, 32400, "Etc/GMT-9" }, { "gmt", 0, 0, "Africa/Abidjan" }, { "gmt", 0, 0, "Africa/Accra" }, { "gmt", 0, 0, "Africa/Bamako" }, @@ -912,6 +1031,7 @@ { "gmt", 0, 0, "Africa/Conakry" }, { "gmt", 0, 0, "Africa/Dakar" }, { "gmt", 0, 0, "Africa/Freetown" }, + { "gmt", 0, 0, "Africa/Lome" }, { "gmt", 0, 0, "Africa/Malabo" }, { "gmt", 0, 0, "Africa/Monrovia" }, { "gmt", 0, 0, "Africa/Niamey" }, @@ -924,6 +1044,11 @@ { "gmt", 0, 0, "Atlantic/Reykjavik" }, { "gmt", 0, 0, "Atlantic/St_Helena" }, { "gmt", 0, 0, "Eire" }, + { "gmt", 0, 0, "Etc/GMT" }, + { "gmt", 0, 0, "Etc/GMT+0" }, + { "gmt", 0, 0, "Etc/GMT-0" }, + { "gmt", 0, 0, "Etc/GMT0" }, + { "gmt", 0, 0, "Etc/Greenwich" }, { "gmt", 0, 0, "Europe/Belfast" }, { "gmt", 0, 0, "Europe/Dublin" }, { "gmt", 0, 0, "Europe/Gibraltar" }, @@ -933,11 +1058,17 @@ { "gmt", 0, 0, "Europe/London" }, { "gmt", 0, 0, "GB" }, { "gmt", 0, 0, "GB-Eire" }, + { "gmt", 0, 0, "GMT+0" }, + { "gmt", 0, 0, "GMT-0" }, + { "gmt", 0, 0, "GMT0" }, + { "gmt", 0, 0, "Greenwich" }, { "gmt", 0, 0, "Iceland" }, { "gst", 0, 14400, "Asia/Dubai" }, + { "gst", 0, -7200, "Atlantic/South_Georgia" }, { "gst", 0, 14400, "Asia/Bahrain" }, { "gst", 0, 14400, "Asia/Muscat" }, { "gst", 0, 14400, "Asia/Qatar" }, + { "gst", 0, 36000, "Pacific/Guam" }, { "gyt", 0, -10800, "America/Guyana" }, { "gyt", 0, -13500, "America/Guyana" }, { "gyt", 0, -14400, "America/Guyana" }, @@ -954,6 +1085,16 @@ { "hkst", 1, 32400, "Hongkong" }, { "hkt", 0, 28800, "Asia/Hong_Kong" }, { "hkt", 0, 28800, "Hongkong" }, + { "hmt", 0, -19776, "America/Havana" }, + { "hmt", 0, -19776, "Cuba" }, + { "hmt", 0, -6872, "Atlantic/Azores" }, + { "hmt", 0, 21200, "Asia/Calcutta" }, + { "hmt", 0, 21200, "Asia/Dacca" }, + { "hmt", 0, 21200, "Asia/Dhaka" }, + { "hmt", 0, 21200, "Asia/Kolkata" }, + { "hmt", 0, 5992, "EET" }, + { "hmt", 0, 5992, "Europe/Helsinki" }, + { "hmt", 0, 5992, "Europe/Mariehamn" }, { "hovst", 1, 28800, "Asia/Hovd" }, { "hovt", 0, 21600, "Asia/Hovd" }, { "hovt", 0, 25200, "Asia/Hovd" }, @@ -963,6 +1104,7 @@ { "hst", 0, -36000, "Pacific/Honolulu" }, { "hst", 0, -37800, "Pacific/Honolulu" }, { "hst", 0, -36000, "HST" }, + { "hst", 0, -36000, "Pacific/Johnston" }, { "hst", 0, -36000, "US/Hawaii" }, { "hst", 0, -37800, "HST" }, { "hst", 0, -37800, "US/Hawaii" }, @@ -970,9 +1112,11 @@ { "hwt", 1, -34200, "HST" }, { "hwt", 1, -34200, "US/Hawaii" }, { "ict", 0, 25200, "Asia/Bangkok" }, + { "ict", 0, 25200, "Asia/Ho_Chi_Minh" }, { "ict", 0, 25200, "Asia/Phnom_Penh" }, { "ict", 0, 25200, "Asia/Saigon" }, { "ict", 0, 25200, "Asia/Vientiane" }, + { "ict", 0, 28800, "Asia/Ho_Chi_Minh" }, { "ict", 0, 28800, "Asia/Phnom_Penh" }, { "ict", 0, 28800, "Asia/Saigon" }, { "ict", 0, 28800, "Asia/Vientiane" }, @@ -984,6 +1128,10 @@ { "idt", 1, 10800, "Asia/Tel_Aviv" }, { "idt", 1, 10800, "Israel" }, { "ihst", 1, 21600, "Asia/Colombo" }, + { "imt", 0, 25040, "Asia/Irkutsk" }, + { "imt", 0, 7016, "Asia/Istanbul" }, + { "imt", 0, 7016, "Europe/Istanbul" }, + { "imt", 0, 7016, "Turkey" }, { "iot", 0, 18000, "Indian/Chagos" }, { "iot", 0, 21600, "Indian/Chagos" }, { "irdt", 1, 16200, "Asia/Tehran" }, @@ -1008,7 +1156,9 @@ { "ist", 0, 19800, "Asia/Dacca" }, { "ist", 0, 19800, "Asia/Dhaka" }, { "ist", 0, 19800, "Asia/Karachi" }, + { "ist", 0, 19800, "Asia/Kathmandu" }, { "ist", 0, 19800, "Asia/Katmandu" }, + { "ist", 0, 19800, "Asia/Kolkata" }, { "ist", 0, 19800, "Asia/Thimbu" }, { "ist", 0, 19800, "Asia/Thimphu" }, { "ist", 1, 2079, "Eire" }, @@ -1016,6 +1166,7 @@ { "ist", 1, 23400, "Asia/Calcutta" }, { "ist", 1, 23400, "Asia/Colombo" }, { "ist", 1, 23400, "Asia/Karachi" }, + { "ist", 1, 23400, "Asia/Kolkata" }, { "ist", 0, 3600, "Eire" }, { "ist", 0, 3600, "Europe/Dublin" }, { "ist", 1, 3600, "Eire" }, @@ -1026,8 +1177,14 @@ { "javt", 0, 26400, "Asia/Jakarta" }, { "jdt", 1, 36000, "Asia/Tokyo" }, { "jdt", 1, 36000, "Japan" }, + { "jmt", 0, -1368, "Atlantic/St_Helena" }, + { "jmt", 0, 25632, "Asia/Jakarta" }, + { "jmt", 0, 8440, "Asia/Jerusalem" }, + { "jmt", 0, 8440, "Asia/Tel_Aviv" }, + { "jmt", 0, 8440, "Israel" }, { "jst", 0, 32400, "Asia/Tokyo" }, { "jst", 0, 32400, "Asia/Dili" }, + { "jst", 0, 32400, "Asia/Hong_Kong" }, { "jst", 0, 32400, "Asia/Jakarta" }, { "jst", 0, 32400, "Asia/Kuala_Lumpur" }, { "jst", 0, 32400, "Asia/Kuching" }, @@ -1038,6 +1195,7 @@ { "jst", 0, 32400, "Asia/Sakhalin" }, { "jst", 0, 32400, "Asia/Singapore" }, { "jst", 0, 32400, "Asia/Ujung_Pandang" }, + { "jst", 0, 32400, "Hongkong" }, { "jst", 0, 32400, "Japan" }, { "jst", 0, 32400, "Pacific/Nauru" }, { "jst", 0, 32400, "Singapore" }, @@ -1056,12 +1214,22 @@ { "kizt", 0, 18000, "Asia/Qyzylorda" }, { "kizt", 0, 21600, "Asia/Qyzylorda" }, { "kmt", 0, 5736, "Europe/Vilnius" }, + { "kmt", 0, -14696, "America/St_Vincent" }, + { "kmt", 0, -18432, "America/Cayman" }, + { "kmt", 0, -18432, "America/Grand_Turk" }, + { "kmt", 0, -18432, "America/Jamaica" }, + { "kmt", 0, -18432, "Jamaica" }, + { "kmt", 0, 7324, "Europe/Kiev" }, { "kost", 0, 39600, "Pacific/Kosrae" }, { "kost", 0, 43200, "Pacific/Kosrae" }, { "krast", 1, 25200, "Asia/Krasnoyarsk" }, { "krast", 1, 28800, "Asia/Krasnoyarsk" }, + { "krast", 1, 25200, "Asia/Novokuznetsk" }, + { "krast", 1, 28800, "Asia/Novokuznetsk" }, { "krat", 0, 21600, "Asia/Krasnoyarsk" }, { "krat", 0, 25200, "Asia/Krasnoyarsk" }, + { "krat", 0, 21600, "Asia/Novokuznetsk" }, + { "krat", 0, 25200, "Asia/Novokuznetsk" }, { "kst", 0, 28800, "Asia/Seoul" }, { "kst", 0, 30600, "Asia/Seoul" }, { "kst", 0, 32400, "Asia/Seoul" }, @@ -1085,13 +1253,228 @@ { "lhst", 1, 39600, "Australia/LHI" }, { "lhst", 1, 41400, "Australia/LHI" }, { "lint", 0, -36000, "Pacific/Kiritimati" }, + { "lint", 0, -38400, "Pacific/Kiritimati" }, { "lint", 0, 50400, "Pacific/Kiritimati" }, { "lkt", 0, 21600, "Asia/Colombo" }, { "lkt", 0, 23400, "Asia/Colombo" }, + { "lmt", 0, -11188, "America/Sao_Paulo" }, + { "lmt", 0, -11188, "Brazil/East" }, + { "lmt", 0, -11568, "America/Araguaina" }, + { "lmt", 0, -11636, "America/Belem" }, + { "lmt", 0, -12416, "America/Godthab" }, + { "lmt", 0, -12560, "America/Cayenne" }, + { "lmt", 0, -13108, "America/Campo_Grande" }, + { "lmt", 0, -13128, "America/Santarem" }, + { "lmt", 0, -13240, "America/Paramaribo" }, + { "lmt", 0, -13460, "America/Cuiaba" }, + { "lmt", 0, -13480, "America/Miquelon" }, + { "lmt", 0, -13960, "America/Guyana" }, + { "lmt", 0, -14308, "America/Barbados" }, + { "lmt", 0, -14388, "America/Glace_Bay" }, + { "lmt", 0, -14404, "America/Manaus" }, + { "lmt", 0, -14404, "Brazil/West" }, + { "lmt", 0, -14560, "America/Boa_Vista" }, + { "lmt", 0, -14736, "America/Dominica" }, + { "lmt", 0, -14764, "America/Port_of_Spain" }, + { "lmt", 0, -14768, "America/Guadeloupe" }, + { "lmt", 0, -14768, "America/Marigot" }, + { "lmt", 0, -14768, "America/St_Barthelemy" }, + { "lmt", 0, -14820, "America/Grenada" }, + { "lmt", 0, -14832, "America/Antigua" }, + { "lmt", 0, -14932, "America/Montserrat" }, + { "lmt", 0, -15052, "America/St_Kitts" }, + { "lmt", 0, -15136, "America/Anguilla" }, + { "lmt", 0, -15264, "America/Halifax" }, + { "lmt", 0, -15264, "Canada/Atlantic" }, + { "lmt", 0, -15336, "America/Porto_Velho" }, + { "lmt", 0, -15508, "America/Tortola" }, + { "lmt", 0, -15544, "Atlantic/Bermuda" }, + { "lmt", 0, -15584, "America/St_Thomas" }, + { "lmt", 0, -15584, "America/Virgin" }, + { "lmt", 0, -1624, "Atlantic/Faeroe" }, + { "lmt", 0, -1624, "Atlantic/Faroe" }, + { "lmt", 0, -16272, "America/Porto_Acre" }, + { "lmt", 0, -16272, "America/Rio_Branco" }, + { "lmt", 0, -16272, "Brazil/Acre" }, + { "lmt", 0, -16508, "America/Thule" }, + { "lmt", 0, -16544, "America/Curacao" }, + { "lmt", 0, -16768, "America/Eirunepe" }, + { "lmt", 0, -16824, "America/Aruba" }, + { "lmt", 0, -1820, "Africa/Casablanca" }, + { "lmt", 0, -18516, "America/Lima" }, + { "lmt", 0, -18564, "America/Nassau" }, + { "lmt", 0, -1920, "Africa/Bamako" }, + { "lmt", 0, -1920, "Africa/Timbuktu" }, + { "lmt", 0, -19931, "America/Detroit" }, + { "lmt", 0, -19931, "US/Michigan" }, + { "lmt", 0, -20824, "America/Cancun" }, + { "lmt", 0, -20932, "America/Tegucigalpa" }, + { "lmt", 0, -21168, "America/Belize" }, + { "lmt", 0, -21408, "America/El_Salvador" }, + { "lmt", 0, -21504, "Pacific/Galapagos" }, + { "lmt", 0, -21508, "America/Merida" }, + { "lmt", 0, -21724, "America/Guatemala" }, + { "lmt", 0, -2192, "Africa/Sao_Tome" }, + { "lmt", 0, -2192, "Europe/Lisbon" }, + { "lmt", 0, -2192, "Portugal" }, + { "lmt", 0, -23796, "America/Mexico_City" }, + { "lmt", 0, -23796, "Mexico/General" }, + { "lmt", 0, -24000, "America/Matamoros" }, + { "lmt", 0, -24076, "America/Monterrey" }, + { "lmt", 0, -25060, "America/Ojinaga" }, + { "lmt", 0, -25116, "America/Regina" }, + { "lmt", 0, -25116, "Canada/East-Saskatchewan" }, + { "lmt", 0, -25116, "Canada/Saskatchewan" }, + { "lmt", 0, -25460, "America/Chihuahua" }, + { "lmt", 0, -25540, "America/Mazatlan" }, + { "lmt", 0, -25540, "Mexico/BajaSur" }, + { "lmt", 0, -25880, "America/Swift_Current" }, + { "lmt", 0, -26632, "America/Hermosillo" }, + { "lmt", 0, -27232, "America/Edmonton" }, + { "lmt", 0, -27232, "Canada/Mountain" }, + { "lmt", 0, -27568, "America/Santa_Isabel" }, + { "lmt", 0, -28084, "America/Ensenada" }, + { "lmt", 0, -28084, "America/Tijuana" }, + { "lmt", 0, -28084, "Mexico/BajaNorte" }, + { "lmt", 0, -3168, "Africa/El_Aaiun" }, + { "lmt", 0, -32388, "Pacific/Gambier" }, + { "lmt", 0, -3292, "Africa/Conakry" }, + { "lmt", 0, -33480, "Pacific/Marquesas" }, + { "lmt", 0, -35896, "Pacific/Tahiti" }, + { "lmt", 0, -364, "Africa/Ouagadougou" }, + { "lmt", 0, -3696, "Atlantic/Canary" }, + { "lmt", 0, -3740, "Africa/Bissau" }, + { "lmt", 0, -3828, "Africa/Nouakchott" }, + { "lmt", 0, -3996, "Africa/Banjul" }, + { "lmt", 0, -40968, "Pacific/Pago_Pago" }, + { "lmt", 0, -40968, "Pacific/Samoa" }, + { "lmt", 0, -40968, "US/Samoa" }, + { "lmt", 0, -41216, "Pacific/Apia" }, + { "lmt", 0, -4184, "Africa/Dakar" }, + { "lmt", 0, -4480, "America/Danmarkshavn" }, + { "lmt", 0, -5272, "America/Scoresbysund" }, + { "lmt", 0, -52, "Africa/Accra" }, + { "lmt", 0, -5644, "Atlantic/Cape_Verde" }, + { "lmt", 0, -7780, "America/Noronha" }, + { "lmt", 0, -7780, "Brazil/DeNoronha" }, + { "lmt", 0, -8376, "America/Recife" }, + { "lmt", 0, -8572, "America/Maceio" }, + { "lmt", 0, -9240, "America/Fortaleza" }, + { "lmt", 0, -9244, "America/Bahia" }, + { "lmt", 0, -968, "Africa/Abidjan" }, + { "lmt", 0, 10356, "Africa/Djibouti" }, + { "lmt", 0, 10384, "Indian/Comoro" }, + { "lmt", 0, 10660, "Europe/Volgograd" }, + { "lmt", 0, 10680, "Asia/Yerevan" }, + { "lmt", 0, 10848, "Asia/Aden" }, + { "lmt", 0, 10856, "Indian/Mayotte" }, + { "lmt", 0, 11212, "Asia/Riyadh" }, + { "lmt", 0, 11404, "Indian/Antananarivo" }, + { "lmt", 0, 11516, "Asia/Kuwait" }, + { "lmt", 0, 11964, "Asia/Baku" }, + { "lmt", 0, 12036, "Europe/Samara" }, + { "lmt", 0, 12064, "Asia/Aqtau" }, + { "lmt", 0, 12140, "Asia/Bahrain" }, + { "lmt", 0, 12324, "Asia/Oral" }, + { "lmt", 0, 12344, "Asia/Tehran" }, + { "lmt", 0, 12344, "Iran" }, + { "lmt", 0, 12368, "Asia/Qatar" }, + { "lmt", 0, 13272, "Asia/Dubai" }, + { "lmt", 0, 13308, "Indian/Mahe" }, + { "lmt", 0, 13312, "Indian/Reunion" }, + { "lmt", 0, 13720, "Asia/Aqtobe" }, + { "lmt", 0, 13800, "Indian/Mauritius" }, + { "lmt", 0, 14012, "Asia/Ashgabat" }, + { "lmt", 0, 14012, "Asia/Ashkhabad" }, + { "lmt", 0, 14060, "Asia/Muscat" }, + { "lmt", 0, 14544, "Asia/Yekaterinburg" }, + { "lmt", 0, 1476, "Europe/Luxembourg" }, + { "lmt", 0, 15712, "Asia/Qyzylorda" }, + { "lmt", 0, 16032, "Asia/Samarkand" }, + { "lmt", 0, 16092, "Asia/Karachi" }, + { "lmt", 0, 16512, "Asia/Dushanbe" }, + { "lmt", 0, 16632, "Asia/Tashkent" }, + { "lmt", 0, 17380, "Indian/Chagos" }, + { "lmt", 0, 17616, "Asia/Omsk" }, + { "lmt", 0, 17904, "Asia/Bishkek" }, + { "lmt", 0, 18236, "Asia/Kashgar" }, + { "lmt", 0, 18468, "Asia/Almaty" }, + { "lmt", 0, 19900, "Asia/Novosibirsk" }, + { "lmt", 0, 20476, "Asia/Kathmandu" }, + { "lmt", 0, 20476, "Asia/Katmandu" }, + { "lmt", 0, 21020, "Asia/Urumqi" }, + { "lmt", 0, 2108, "Africa/Malabo" }, + { "lmt", 0, 21516, "Asia/Thimbu" }, + { "lmt", 0, 21516, "Asia/Thimphu" }, + { "lmt", 0, 21996, "Asia/Hovd" }, + { "lmt", 0, 22280, "Asia/Krasnoyarsk" }, + { "lmt", 0, 2268, "Africa/Libreville" }, + { "lmt", 0, 2328, "Africa/Douala" }, + { "lmt", 0, 24624, "Asia/Vientiane" }, + { "lmt", 0, 25180, "Asia/Phnom_Penh" }, + { "lmt", 0, 25580, "Asia/Chongqing" }, + { "lmt", 0, 25580, "Asia/Chungking" }, + { "lmt", 0, 25600, "Asia/Ho_Chi_Minh" }, + { "lmt", 0, 25600, "Asia/Saigon" }, + { "lmt", 0, 25652, "Asia/Ulaanbaatar" }, + { "lmt", 0, 25652, "Asia/Ulan_Bator" }, + { "lmt", 0, 26240, "Asia/Pontianak" }, + { "lmt", 0, 26480, "Asia/Kuching" }, + { "lmt", 0, 27260, "Asia/Macao" }, + { "lmt", 0, 27260, "Asia/Macau" }, + { "lmt", 0, 27396, "Asia/Hong_Kong" }, + { "lmt", 0, 27396, "Hongkong" }, + { "lmt", 0, 27480, "Asia/Choibalsan" }, + { "lmt", 0, 27580, "Asia/Brunei" }, + { "lmt", 0, 28656, "Asia/Makassar" }, + { "lmt", 0, 28656, "Asia/Ujung_Pandang" }, + { "lmt", 0, 29152, "Asia/Shanghai" }, + { "lmt", 0, 29152, "PRC" }, + { "lmt", 0, 30140, "Asia/Dili" }, + { "lmt", 0, 30404, "Asia/Harbin" }, + { "lmt", 0, 31120, "Asia/Yakutsk" }, + { "lmt", 0, 3164, "Africa/Tripoli" }, + { "lmt", 0, 3164, "Libya" }, + { "lmt", 0, 31664, "Asia/Vladivostok" }, + { "lmt", 0, 33768, "Asia/Jayapura" }, + { "lmt", 0, 34248, "Asia/Sakhalin" }, + { "lmt", 0, 3612, "Africa/Ndjamena" }, + { "lmt", 0, 36192, "Asia/Magadan" }, + { "lmt", 0, 3668, "Africa/Brazzaville" }, + { "lmt", 0, 38076, "Asia/Kamchatka" }, + { "lmt", 0, 38388, "Pacific/Guadalcanal" }, + { "lmt", 0, 39948, "Pacific/Noumea" }, + { "lmt", 0, 40060, "Pacific/Nauru" }, + { "lmt", 0, 40396, "Pacific/Efate" }, + { "lmt", 0, 42596, "Asia/Anadyr" }, + { "lmt", 0, 42820, "Pacific/Fiji" }, + { "lmt", 0, 44028, "NZ-CHAT" }, + { "lmt", 0, 44028, "Pacific/Chatham" }, + { "lmt", 0, 4460, "Africa/Bangui" }, + { "lmt", 0, 4760, "Europe/Tirane" }, + { "lmt", 0, 508, "Africa/Niamey" }, + { "lmt", 0, 628, "Africa/Porto-Novo" }, + { "lmt", 0, 6600, "Africa/Maseru" }, + { "lmt", 0, 6788, "Africa/Lusaka" }, + { "lmt", 0, 7216, "Africa/Kigali" }, + { "lmt", 0, 7452, "Africa/Harare" }, + { "lmt", 0, 7464, "Africa/Mbabane" }, + { "lmt", 0, 7780, "Africa/Kampala" }, + { "lmt", 0, 7808, "Africa/Khartoum" }, + { "lmt", 0, 7820, "Africa/Maputo" }, + { "lmt", 0, 8008, "Asia/Nicosia" }, + { "lmt", 0, 8008, "Europe/Nicosia" }, + { "lmt", 0, 816, "Africa/Lagos" }, + { "lmt", 0, 8400, "Africa/Blantyre" }, + { "lmt", 0, 8624, "Asia/Amman" }, + { "lmt", 0, 8712, "Asia/Damascus" }, + { "lmt", 0, 8836, "Africa/Nairobi" }, + { "lmt", 0, 9428, "Africa/Dar_es_Salaam" }, { "lont", 0, 25200, "Asia/Chongqing" }, { "lont", 0, 25200, "Asia/Chungking" }, { "lrt", 0, -2670, "Africa/Monrovia" }, { "lst", 1, 9384, "Europe/Riga" }, + { "local time zone must be set--see zic manual page", 0, 0, "Factory" }, { "madmt", 1, 3600, "Atlantic/Madeira" }, { "madst", 1, 0, "Atlantic/Madeira" }, { "madt", 0, -3600, "Atlantic/Madeira" }, @@ -1112,6 +1495,7 @@ { "malt", 0, 27000, "Asia/Kuala_Lumpur" }, { "malt", 0, 27000, "Singapore" }, { "mart", 0, -34200, "Pacific/Marquesas" }, + { "mawt", 0, 18000, "Antarctica/Mawson" }, { "mawt", 0, 21600, "Antarctica/Mawson" }, { "mddt", 1, -18000, "America/Cambridge_Bay" }, { "mddt", 1, -18000, "America/Yellowknife" }, @@ -1127,6 +1511,7 @@ { "mdt", 1, -21600, "America/Mazatlan" }, { "mdt", 1, -21600, "America/North_Dakota/Center" }, { "mdt", 1, -21600, "America/North_Dakota/New_Salem" }, + { "mdt", 1, -21600, "America/Ojinaga" }, { "mdt", 1, -21600, "America/Phoenix" }, { "mdt", 1, -21600, "America/Regina" }, { "mdt", 1, -21600, "America/Shiprock" }, @@ -1143,13 +1528,24 @@ { "mdt", 1, -21600, "US/Mountain" }, { "mest", 1, 7200, "MET" }, { "met", 0, 3600, "MET" }, + { "mht", 0, 39600, "Pacific/Kwajalein" }, { "mht", 0, 43200, "Pacific/Kwajalein" }, + { "mht", 0, 39600, "Kwajalein" }, + { "mht", 0, 39600, "Pacific/Majuro" }, { "mht", 0, 43200, "Kwajalein" }, { "mht", 0, 43200, "Pacific/Majuro" }, + { "mmt", 0, 9000, "Europe/Moscow" }, { "mmt", 0, 9048, "Europe/Moscow" }, + { "mmt", 0, -13484, "America/Montevideo" }, + { "mmt", 0, -20712, "America/Managua" }, + { "mmt", 0, -2588, "Africa/Monrovia" }, + { "mmt", 0, 17640, "Indian/Maldives" }, + { "mmt", 0, 19172, "Asia/Colombo" }, { "mmt", 0, 23400, "Asia/Rangoon" }, { "mmt", 0, 28656, "Asia/Makassar" }, { "mmt", 0, 28656, "Asia/Ujung_Pandang" }, + { "mmt", 0, 6600, "Europe/Minsk" }, + { "mmt", 0, 9000, "W-SU" }, { "mmt", 0, 9048, "W-SU" }, { "most", 1, 32400, "Asia/Macao" }, { "most", 1, 32400, "Asia/Macau" }, @@ -1172,6 +1568,7 @@ { "mpt", 1, -21600, "MST7MDT" }, { "mpt", 1, -21600, "Navajo" }, { "mpt", 1, -21600, "US/Mountain" }, + { "mpt", 0, 32400, "Pacific/Saipan" }, { "mpt", 0, 36000, "Pacific/Saipan" }, { "msd", 1, 14400, "Europe/Moscow" }, { "msd", 1, 18000, "Europe/Moscow" }, @@ -1214,8 +1611,10 @@ { "mst", 0, -25200, "America/Mexico_City" }, { "mst", 0, -25200, "America/North_Dakota/Center" }, { "mst", 0, -25200, "America/North_Dakota/New_Salem" }, + { "mst", 0, -25200, "America/Ojinaga" }, { "mst", 0, -25200, "America/Phoenix" }, { "mst", 0, -25200, "America/Regina" }, + { "mst", 0, -25200, "America/Santa_Isabel" }, { "mst", 0, -25200, "America/Shiprock" }, { "mst", 0, -25200, "America/Swift_Current" }, { "mst", 0, -25200, "America/Tijuana" }, @@ -1233,6 +1632,7 @@ { "mst", 0, -25200, "US/Mountain" }, { "mst", 1, 12648, "Europe/Moscow" }, { "mst", 1, 12648, "W-SU" }, + { "must", 1, 18000, "Indian/Mauritius" }, { "mut", 0, 14400, "Indian/Mauritius" }, { "mvt", 0, 18000, "Indian/Maldives" }, { "mwt", 1, -21600, "America/Denver" }, @@ -1271,10 +1671,14 @@ { "nest", 1, 4800, "Europe/Amsterdam" }, { "net", 0, 1200, "Europe/Amsterdam" }, { "nft", 0, 41400, "Pacific/Norfolk" }, + { "nmt", 0, 20928, "Asia/Novokuznetsk" }, + { "nmt", 0, 40320, "Pacific/Norfolk" }, { "novst", 1, 25200, "Asia/Novosibirsk" }, { "novst", 1, 28800, "Asia/Novosibirsk" }, + { "novst", 1, 25200, "Asia/Novokuznetsk" }, { "novt", 0, 21600, "Asia/Novosibirsk" }, { "novt", 0, 25200, "Asia/Novosibirsk" }, + { "novt", 0, 21600, "Asia/Novokuznetsk" }, { "npt", 1, -9000, "America/St_Johns" }, { "npt", 1, -36000, "America/Adak" }, { "npt", 1, -36000, "America/Atka" }, @@ -1283,6 +1687,7 @@ { "npt", 1, -9000, "America/Goose_Bay" }, { "npt", 1, -9000, "Canada/Newfoundland" }, { "npt", 0, 20700, "Asia/Katmandu" }, + { "npt", 0, 20700, "Asia/Kathmandu" }, { "nrt", 0, 41400, "Pacific/Nauru" }, { "nrt", 0, 43200, "Pacific/Nauru" }, { "nst", 0, -12600, "America/St_Johns" }, @@ -1301,6 +1706,7 @@ { "nst", 0, -39600, "US/Samoa" }, { "nst", 1, 4772, "Europe/Amsterdam" }, { "nut", 0, -39600, "Pacific/Niue" }, + { "nut", 0, -40800, "Pacific/Niue" }, { "nut", 0, -41400, "Pacific/Niue" }, { "nwt", 1, -9000, "America/St_Johns" }, { "nwt", 1, -36000, "America/Adak" }, @@ -1336,8 +1742,8 @@ { "pdt", 1, -25200, "America/Dawson" }, { "pdt", 1, -25200, "America/Dawson_Creek" }, { "pdt", 1, -25200, "America/Ensenada" }, - { "pdt", 1, -25200, "America/Inuvik" }, { "pdt", 1, -25200, "America/Juneau" }, + { "pdt", 1, -25200, "America/Santa_Isabel" }, { "pdt", 1, -25200, "America/Tijuana" }, { "pdt", 1, -25200, "America/Vancouver" }, { "pdt", 1, -25200, "America/Whitehorse" }, @@ -1353,7 +1759,9 @@ { "pett", 0, 39600, "Asia/Kamchatka" }, { "pett", 0, 43200, "Asia/Kamchatka" }, { "pet", 0, -18000, "America/Lima" }, + { "pgt", 0, 36000, "Pacific/Port_Moresby" }, { "phot", 0, -39600, "Pacific/Enderbury" }, + { "phot", 0, -43200, "Pacific/Enderbury" }, { "phot", 0, 46800, "Pacific/Enderbury" }, { "phst", 1, 32400, "Asia/Manila" }, { "pht", 0, 28800, "Asia/Manila" }, @@ -1365,11 +1773,19 @@ { "pmt", 0, -13252, "America/Paramaribo" }, { "pmt", 0, 26240, "Asia/Pontianak" }, { "pmt", 0, 36000, "Antarctica/DumontDUrville" }, + { "pmt", 0, 561, "Africa/Algiers" }, + { "pmt", 0, 561, "Africa/Tunis" }, + { "pmt", 0, 561, "Europe/Monaco" }, + { "pmt", 0, 561, "Europe/Paris" }, + { "pmt", 0, 561, "WET" }, + { "pnt", 0, -30600, "Pacific/Pitcairn" }, + { "pont", 0, 39600, "Pacific/Ponape" }, + { "ppmt", 0, -17340, "America/Port-au-Prince" }, { "ppt", 1, -25200, "America/Los_Angeles" }, { "ppt", 1, -25200, "America/Dawson_Creek" }, { "ppt", 1, -25200, "America/Ensenada" }, - { "ppt", 1, -25200, "America/Inuvik" }, { "ppt", 1, -25200, "America/Juneau" }, + { "ppt", 1, -25200, "America/Santa_Isabel" }, { "ppt", 1, -25200, "America/Tijuana" }, { "ppt", 1, -25200, "America/Vancouver" }, { "ppt", 1, -25200, "Canada/Pacific" }, @@ -1386,6 +1802,7 @@ { "pst", 0, -28800, "America/Inuvik" }, { "pst", 0, -28800, "America/Juneau" }, { "pst", 0, -28800, "America/Mazatlan" }, + { "pst", 0, -28800, "America/Santa_Isabel" }, { "pst", 0, -28800, "America/Tijuana" }, { "pst", 0, -28800, "America/Vancouver" }, { "pst", 0, -28800, "America/Whitehorse" }, @@ -1400,8 +1817,8 @@ { "pwt", 1, -25200, "America/Los_Angeles" }, { "pwt", 1, -25200, "America/Dawson_Creek" }, { "pwt", 1, -25200, "America/Ensenada" }, - { "pwt", 1, -25200, "America/Inuvik" }, { "pwt", 1, -25200, "America/Juneau" }, + { "pwt", 1, -25200, "America/Santa_Isabel" }, { "pwt", 1, -25200, "America/Tijuana" }, { "pwt", 1, -25200, "America/Vancouver" }, { "pwt", 1, -25200, "Canada/Pacific" }, @@ -1409,14 +1826,19 @@ { "pwt", 1, -25200, "PST8PDT" }, { "pwt", 1, -25200, "US/Pacific" }, { "pwt", 1, -25200, "US/Pacific-New" }, + { "pwt", 0, 32400, "Pacific/Palau" }, { "pyst", 1, -10800, "America/Asuncion" }, { "pyt", 0, -10800, "America/Asuncion" }, { "pyt", 0, -14400, "America/Asuncion" }, + { "qmt", 0, -18840, "America/Guayaquil" }, { "qyzst", 1, 25200, "Asia/Qyzylorda" }, { "qyzt", 0, 18000, "Asia/Qyzylorda" }, { "qyzt", 0, 21600, "Asia/Qyzylorda" }, { "ret", 0, 14400, "Indian/Reunion" }, { "rmt", 0, 5784, "Europe/Riga" }, + { "rmt", 0, -5268, "Atlantic/Reykjavik" }, + { "rmt", 0, -5268, "Iceland" }, + { "rmt", 0, 23076, "Asia/Rangoon" }, { "rott", 0, -10800, "Antarctica/Rothera" }, { "sakst", 1, 39600, "Asia/Sakhalin" }, { "sakst", 1, 43200, "Asia/Sakhalin" }, @@ -1433,6 +1855,7 @@ { "samt", 0, 10800, "Europe/Samara" }, { "samt", 0, 14400, "Europe/Samara" }, { "sast", 1, 10800, "Africa/Johannesburg" }, + { "sast", 0, 5400, "Africa/Johannesburg" }, { "sast", 0, 7200, "Africa/Johannesburg" }, { "sast", 1, 10800, "Africa/Maseru" }, { "sast", 1, 10800, "Africa/Windhoek" }, @@ -1441,6 +1864,7 @@ { "sast", 0, 7200, "Africa/Windhoek" }, { "sbt", 0, 39600, "Pacific/Guadalcanal" }, { "sct", 0, 14400, "Indian/Mahe" }, + { "sdmt", 0, -16800, "America/Santo_Domingo" }, { "sgt", 0, 27000, "Asia/Singapore" }, { "sgt", 0, 28800, "Asia/Singapore" }, { "sgt", 0, 27000, "Singapore" }, @@ -1448,13 +1872,20 @@ { "shest", 1, 21600, "Asia/Aqtau" }, { "shet", 0, 18000, "Asia/Aqtau" }, { "shet", 0, 21600, "Asia/Aqtau" }, + { "sjmt", 0, -20180, "America/Costa_Rica" }, { "slst", 1, -1200, "Africa/Freetown" }, { "slst", 1, 3600, "Africa/Freetown" }, { "smt", 0, 25580, "Asia/Saigon" }, + { "smt", 0, -13884, "Atlantic/Stanley" }, { "smt", 0, -16966, "America/Santiago" }, { "smt", 0, -16966, "Chile/Continental" }, + { "smt", 0, 24925, "Asia/Kuala_Lumpur" }, + { "smt", 0, 24925, "Asia/Singapore" }, + { "smt", 0, 24925, "Singapore" }, + { "smt", 0, 25580, "Asia/Ho_Chi_Minh" }, { "smt", 0, 25580, "Asia/Phnom_Penh" }, { "smt", 0, 25580, "Asia/Vientiane" }, + { "smt", 0, 8160, "Europe/Simferopol" }, { "srt", 0, -10800, "America/Paramaribo" }, { "srt", 0, -12600, "America/Paramaribo" }, { "sst", 0, -39600, "Pacific/Samoa" }, @@ -1467,6 +1898,7 @@ { "svest", 1, 21600, "Asia/Yekaterinburg" }, { "svet", 0, 14400, "Asia/Yekaterinburg" }, { "svet", 0, 18000, "Asia/Yekaterinburg" }, + { "swat", 0, 5400, "Africa/Windhoek" }, { "syot", 0, 10800, "Antarctica/Syowa" }, { "taht", 0, -36000, "Pacific/Tahiti" }, { "tasst", 1, 25200, "Asia/Samarkand" }, @@ -1479,8 +1911,10 @@ { "tbist", 1, 18000, "Asia/Tbilisi" }, { "tbit", 0, 10800, "Asia/Tbilisi" }, { "tbit", 0, 14400, "Asia/Tbilisi" }, + { "tbmt", 0, 10756, "Asia/Tbilisi" }, { "tft", 0, 18000, "Indian/Kerguelen" }, { "tjt", 0, 18000, "Asia/Dushanbe" }, + { "tkt", 0, -36000, "Pacific/Fakaofo" }, { "tlt", 0, 28800, "Asia/Dili" }, { "tlt", 0, 32400, "Asia/Dili" }, { "tmt", 0, 12344, "Asia/Tehran" }, @@ -1491,6 +1925,7 @@ { "tmt", 0, 18000, "Asia/Ashkhabad" }, { "tmt", 0, 5940, "Europe/Tallinn" }, { "tost", 1, 50400, "Pacific/Tongatapu" }, + { "tot", 0, 44400, "Pacific/Tongatapu" }, { "tot", 0, 46800, "Pacific/Tongatapu" }, { "trst", 1, 14400, "Europe/Istanbul" }, { "trst", 1, 14400, "Asia/Istanbul" }, @@ -1498,7 +1933,12 @@ { "trt", 0, 10800, "Europe/Istanbul" }, { "trt", 0, 10800, "Asia/Istanbul" }, { "trt", 0, 10800, "Turkey" }, + { "trut", 0, 36000, "Pacific/Truk" }, + { "trut", 0, 36000, "Pacific/Yap" }, { "tsat", 0, 10800, "Europe/Volgograd" }, + { "tvt", 0, 43200, "Pacific/Funafuti" }, + { "uct", 0, 0, "Etc/UCT" }, + { "uct", 0, 0, "UCT" }, { "ulast", 1, 32400, "Asia/Ulaanbaatar" }, { "ulast", 1, 32400, "Asia/Ulan_Bator" }, { "ulat", 0, 25200, "Asia/Ulaanbaatar" }, @@ -1513,6 +1953,14 @@ { "urat", 0, 18000, "Asia/Oral" }, { "urat", 0, 21600, "Asia/Oral" }, { "urut", 0, 21600, "Asia/Urumqi" }, + { "utc", 0, 0, "Etc/Universal" }, + { "utc", 0, 0, "Etc/UTC" }, + { "utc", 0, 0, "Etc/Zulu" }, + { "utc", 0, 0, "GMT" }, + { "utc", 0, 0, "Universal" }, + { "utc", 0, 0, "UTC" }, + { "utc", 0, 0, "Zulu" }, + { "utc", 0, 0, "UTC" }, { "uyhst", 1, -10800, "America/Montevideo" }, { "uyhst", 1, -9000, "America/Montevideo" }, { "uyst", 1, -7200, "America/Montevideo" }, @@ -1536,9 +1984,11 @@ { "vost", 0, 21600, "Antarctica/Vostok" }, { "vust", 1, 43200, "Pacific/Efate" }, { "vut", 0, 39600, "Pacific/Efate" }, + { "wakt", 0, 43200, "Pacific/Wake" }, { "warst", 1, -10800, "America/Mendoza" }, { "warst", 1, -10800, "America/Argentina/Jujuy" }, { "warst", 1, -10800, "America/Argentina/Mendoza" }, + { "warst", 1, -10800, "America/Argentina/San_Luis" }, { "warst", 1, -10800, "America/Jujuy" }, { "wart", 0, -14400, "America/Mendoza" }, { "wart", 0, -14400, "America/Argentina/Catamarca" }, @@ -1548,7 +1998,9 @@ { "wart", 0, -14400, "America/Argentina/La_Rioja" }, { "wart", 0, -14400, "America/Argentina/Mendoza" }, { "wart", 0, -14400, "America/Argentina/Rio_Gallegos" }, + { "wart", 0, -14400, "America/Argentina/Salta" }, { "wart", 0, -14400, "America/Argentina/San_Juan" }, + { "wart", 0, -14400, "America/Argentina/San_Luis" }, { "wart", 0, -14400, "America/Argentina/Tucuman" }, { "wart", 0, -14400, "America/Argentina/Ushuaia" }, { "wart", 0, -14400, "America/Catamarca" }, @@ -1571,6 +2023,7 @@ { "wat", 0, 3600, "Africa/Brazzaville" }, { "wat", 0, 3600, "Africa/Bangui" }, { "wat", 0, 3600, "Africa/Douala" }, + { "wat", 0, 3600, "Africa/Kinshasa" }, { "wat", 0, 3600, "Africa/Lagos" }, { "wat", 0, 3600, "Africa/Libreville" }, { "wat", 0, 3600, "Africa/Luanda" }, @@ -1611,6 +2064,7 @@ { "wet", 0, 0, "Atlantic/Faeroe" }, { "wet", 0, 0, "Atlantic/Faroe" }, { "wet", 0, 0, "Atlantic/Madeira" }, + { "wet", 0, 0, "Europe/Andorra" }, { "wet", 0, 0, "Europe/Brussels" }, { "wet", 0, 0, "Europe/Lisbon" }, { "wet", 0, 0, "Europe/Luxembourg" }, @@ -1619,6 +2073,7 @@ { "wet", 0, 0, "Portugal" }, { "wet", 0, 0, "WET" }, { "wet", 0, 3600, "Europe/Luxembourg" }, + { "wft", 0, 43200, "Pacific/Wallis" }, { "wgst", 1, -7200, "America/Godthab" }, { "wgst", 1, -7200, "America/Danmarkshavn" }, { "wgt", 0, -10800, "America/Godthab" }, @@ -1629,6 +2084,10 @@ { "wit", 0, 25200, "Asia/Pontianak" }, { "wit", 0, 27000, "Asia/Pontianak" }, { "wit", 0, 28800, "Asia/Pontianak" }, + { "wmt", 0, 5040, "Europe/Vilnius" }, + { "wmt", 0, 5040, "Europe/Warsaw" }, + { "wmt", 0, 5040, "Poland" }, + { "wsdt", 1, -36000, "Pacific/Apia" }, { "wst", 0, 28800, "Australia/Perth" }, { "wst", 1, 32400, "Australia/Perth" }, { "wst", 0, -39600, "Pacific/Apia" }, @@ -1687,12 +2146,27 @@ { "r", 0, -18000, NULL }, { "s", 0, -21600, NULL }, { "t", 0, -25200, NULL }, - { "utc", 0, 0, "UTC" }, { "u", 0, -28800, NULL }, { "v", 0, -32400, NULL }, { "w", 0, -36000, NULL }, { "x", 0, -39600, NULL }, { "y", 0, -43200, NULL }, { "zzz", 0, 0, "Antarctica/Davis" }, + { "zzz", 0, 0, "America/Cambridge_Bay" }, + { "zzz", 0, 0, "America/Inuvik" }, + { "zzz", 0, 0, "America/Iqaluit" }, + { "zzz", 0, 0, "America/Pangnirtung" }, + { "zzz", 0, 0, "America/Rankin_Inlet" }, + { "zzz", 0, 0, "America/Resolute" }, + { "zzz", 0, 0, "America/Yellowknife" }, + { "zzz", 0, 0, "Antarctica/Casey" }, { "zzz", 0, 0, "Antarctica/DumontDUrville" }, + { "zzz", 0, 0, "Antarctica/Mawson" }, + { "zzz", 0, 0, "Antarctica/McMurdo" }, + { "zzz", 0, 0, "Antarctica/Palmer" }, + { "zzz", 0, 0, "Antarctica/Rothera" }, + { "zzz", 0, 0, "Antarctica/South_Pole" }, + { "zzz", 0, 0, "Antarctica/Syowa" }, + { "zzz", 0, 0, "Antarctica/Vostok" }, + { "zzz", 0, 0, "Indian/Kerguelen" }, { "z", 0, 0, NULL }, diff --git a/ext/date/lib/tm2unixtime.c b/ext/date/lib/tm2unixtime.c index e2fa02b69..81befbe10 100644 --- a/ext/date/lib/tm2unixtime.c +++ b/ext/date/lib/tm2unixtime.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tm2unixtime.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: tm2unixtime.c 298973 2010-05-04 15:11:41Z derick $ */ #include "timelib.h" @@ -41,39 +41,64 @@ static int do_range_limit(timelib_sll start, timelib_sll end, timelib_sll adj, t return 0; } -static int do_range_limit_days_relative(timelib_sll *base_y, timelib_sll *base_m, timelib_sll *y, timelib_sll *m, timelib_sll *d) +static void inc_month(timelib_sll *y, timelib_sll *m) +{ + (*m)++; + if (*m > 12) { + *m -= 12; + (*y)++; + } +} + +static void dec_month(timelib_sll *y, timelib_sll *m) +{ + (*m)--; + if (*m < 1) { + *m += 12; + (*y)--; + } +} + +static void do_range_limit_days_relative(timelib_sll *base_y, timelib_sll *base_m, timelib_sll *y, timelib_sll *m, timelib_sll *d, timelib_sll invert) { timelib_sll leapyear; - timelib_sll days_this_month; - timelib_sll next_month, next_year; - timelib_sll days_next_month; + timelib_sll month, year; + timelib_sll days; do_range_limit(1, 13, 12, base_m, base_y); - leapyear = timelib_is_leap(*base_y); - days_this_month = leapyear ? days_in_month_leap[*base_m] : days_in_month[*base_m]; - next_month = (*base_m) + 1; + year = *base_y; + month = *base_m; - if (next_month > 12) { - next_month -= 12; - next_year = (*base_y) + 1; +/* + printf( "S: Y%d M%d %d %d %d %d\n", year, month, *y, *m, *d, days); +*/ + if (!invert) { + while (*d < 0) { + dec_month(&year, &month); + leapyear = timelib_is_leap(year); + days = leapyear ? days_in_month_leap[month] : days_in_month[month]; + + /* printf( "I Y%d M%d %d %d %d %d\n", year, month, *y, *m, *d, days); */ + + *d += days; + (*m)--; + } } else { - next_year = (*base_y); - } - leapyear = timelib_is_leap(next_year); - days_next_month = leapyear ? days_in_month_leap[next_month] : days_in_month[next_month]; + while (*d < 0) { + leapyear = timelib_is_leap(year); + days = leapyear ? days_in_month_leap[month] : days_in_month[month]; - if (*d < 0) { - *d += days_this_month; - (*m)--; - return 1; - } - if (*d > days_next_month) { - *d -= days_next_month; - (*m)++; - return 1; + /* printf( "I Y%d M%d %d %d %d %d\n", year, month, *y, *m, *d, days); */ + + *d += days; + (*m)--; + inc_month(&year, &month); + } } - return 0; + /* + printf( "E: Y%d M%d %d %d %d %d\n", year, month, *y, *m, *d, days); + */ } static int do_range_limit_days(timelib_sll *y, timelib_sll *m, timelib_sll *d) @@ -150,7 +175,7 @@ void timelib_do_rel_normalize(timelib_time *base, timelib_rel_time *rt) do {} while (do_range_limit(0, 24, 24, &rt->h, &rt->d)); do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y)); - do {} while (do_range_limit_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d)); + do_range_limit_days_relative(&base->y, &base->m, &rt->y, &rt->m, &rt->d, rt->invert); do {} while (do_range_limit(0, 12, 12, &rt->m, &rt->y)); } diff --git a/ext/date/php_date.c b/ext/date/php_date.c index 7a5185b8f..abf05478a 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_date.c 294906 2010-02-11 22:37:50Z pajoye $ */ +/* $Id: php_date.c 300294 2010-06-08 21:23:48Z srinatar $ */ #include "php.h" #include "php_streams.h" @@ -36,7 +36,7 @@ static __inline __int64 php_date_llabs( __int64 i ) { return i >= 0? i: -i; } #elif defined(__GNUC__) && __GNUC__ < 3 static __inline __int64_t php_date_llabs( __int64_t i ) { return i >= 0 ? i : -i; } #else -static __inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; } +static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i; } #endif /* {{{ arginfo */ @@ -1362,10 +1362,16 @@ PHPAPI void php_date_set_tzdb(timelib_tzdb *tzdb) PHPAPI signed long php_parse_date(char *string, signed long *now) { timelib_time *parsed_time; + timelib_error_container *error = NULL; int error2; signed long retval; - parsed_time = timelib_strtotime(string, strlen(string), NULL, DATE_TIMEZONEDB); + parsed_time = timelib_strtotime(string, strlen(string), &error, DATE_TIMEZONEDB); + if (error->error_count) { + timelib_error_container_dtor(error); + return -1; + } + timelib_error_container_dtor(error); timelib_update_ts(parsed_time, NULL); retval = timelib_date_to_int(parsed_time, &error2); timelib_time_dtor(parsed_time); @@ -2081,7 +2087,7 @@ static HashTable *date_object_get_properties(zval *object TSRMLS_DC) props = dateobj->std.properties; - if (!dateobj->time) { + if (!dateobj->time || GC_G(gc_active)) { return props; } @@ -2224,7 +2230,7 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC) props = intervalobj->std.properties; - if (!intervalobj->initialized) { + if (!intervalobj->initialized || GC_G(gc_active)) { return props; } @@ -2240,7 +2246,13 @@ static HashTable *date_object_get_properties_interval(zval *object TSRMLS_DC) PHP_DATE_INTERVAL_ADD_PROPERTY("i", i); PHP_DATE_INTERVAL_ADD_PROPERTY("s", s); PHP_DATE_INTERVAL_ADD_PROPERTY("invert", invert); - PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + if (intervalobj->diff->days != -99999) { + PHP_DATE_INTERVAL_ADD_PROPERTY("days", days); + } else { + MAKE_STD_ZVAL(zv); + ZVAL_FALSE(zv); + zend_hash_update(props, "days", 5, &zv, sizeof(zval), NULL); + } return props; } @@ -2851,6 +2863,11 @@ PHP_FUNCTION(date_sub) intobj = (php_interval_obj *) zend_object_store_get_object(interval TSRMLS_CC); DATE_CHECK_INITIALIZED(intobj->initialized, DateInterval); + if (intobj->diff->have_special_relative) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Only non-special relative time specifications are supported for subtraction"); + return; + } + if (intobj->diff->invert) { bias = -1; } @@ -2869,6 +2886,8 @@ PHP_FUNCTION(date_sub) timelib_update_ts(dateobj->time, NULL); timelib_update_from_sse(dateobj->time); + dateobj->time->have_relative = 0; + RETURN_ZVAL(object, 1, 0); } /* }}} */ @@ -3593,7 +3612,13 @@ static char *date_interval_format(char *format, int format_len, timelib_rel_time case 'S': length = slprintf(buffer, 32, "%02d", (int) t->s); break; case 's': length = slprintf(buffer, 32, "%d", (int) t->s); break; - case 'a': length = slprintf(buffer, 32, "%d", (int) t->days); break; + case 'a': { + if ((int) t->days != -99999) { + length = slprintf(buffer, 32, "%d", (int) t->days); + } else { + length = slprintf(buffer, 32, "(unknown)"); + } + } break; case 'r': length = slprintf(buffer, 32, "%s", t->invert ? "-" : ""); break; case 'R': length = slprintf(buffer, 32, "%c", t->invert ? '-' : '+'); break; diff --git a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt index bd6344fa2..126c4b832 100644 --- a/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt +++ b/ext/date/tests/DateTimeZone_listAbbreviations_basic1.phpt @@ -26,7 +26,7 @@ var_dump( $abbr["acst"] ); --EXPECT-- *** Testing DateTimeZone::listAbbreviations() : basic functionality *** string(5) "array" -int(338) +int(399) -- Format a sample entry -- array(4) { diff --git a/ext/date/tests/bug45554.phpt b/ext/date/tests/bug45554.phpt index 9416214e9..0e9ebfd14 100644 --- a/ext/date/tests/bug45554.phpt +++ b/ext/date/tests/bug45554.phpt @@ -9,12 +9,12 @@ $d = date_create_from_format($format, "03-15-2005 12:22:29.000000 PST"); echo $d->format($format), "\n"; $d = date_create_from_format($format, "03-15-2005 12:22:29.001001 PST"); -echo $d->format($format), "\n"; +echo $d->format($format), " (precision isn't enough to show the 1 here)\n"; $d = date_create_from_format($format, "03-15-2005 12:22:29.0010 PST"); -var_dump( $d ); +echo $d->format($format), "\n"; ?> --EXPECT-- 03-15-2005 12:22:29.000000 PST +03-15-2005 12:22:29.001000 PST (precision isn't enough to show the 1 here) 03-15-2005 12:22:29.001000 PST -bool(false) diff --git a/ext/date/tests/bug46111.phpt b/ext/date/tests/bug46111.phpt new file mode 100644 index 000000000..806424ebc --- /dev/null +++ b/ext/date/tests/bug46111.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #46111 (strtotime() returns false for some valid timezones) +--FILE-- +<?php +date_default_timezone_set('Asia/Calcutta'); +$timezones = timezone_identifiers_list(); + +# An empty list indicates no errors +print "[strtotime(timezone) == false - Begin List]\n"; +foreach ($timezones as $zone) { + $date_string = "2008-01-01 13:00:00 " . $zone; + + if (!strtotime($date_string)) { + echo $zone . "\n"; + } +} +print "[strtotime(timezone) == false - End List]\n"; +?> +--EXPECT-- +[strtotime(timezone) == false - Begin List] +[strtotime(timezone) == false - End List] diff --git a/ext/date/tests/bug48187.phpt b/ext/date/tests/bug48187.phpt new file mode 100644 index 000000000..24a295ddd --- /dev/null +++ b/ext/date/tests/bug48187.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #48187 (DateTime::diff() corrupting microtime() result) +--FILE-- +<?php +// two arbitrary dates +$date1 = new DateTime('2005-07-23'); +$date2 = new DateTime('2006-02-14'); + +$begin_u = microtime(true); +$begin_t = time(); + +if (microtime(true) - $begin_u < 1) { + var_dump('microtime() difference less 1 second'); +} else { + var_dump('microtime() difference greater or equal 1 second'); +} + +if (time() - $begin_t < 1) { + var_dump('time() difference less 1 second'); +} else { + var_dump('time() difference greater or equal 1 second'); +} +?> +--EXPECTF-- +string(36) "microtime() difference less 1 second" +string(31) "time() difference less 1 second"
\ No newline at end of file diff --git a/ext/date/tests/bug48678.phpt b/ext/date/tests/bug48678.phpt index bf349412b..896693463 100644 --- a/ext/date/tests/bug48678.phpt +++ b/ext/date/tests/bug48678.phpt @@ -16,7 +16,7 @@ DateInterval Object [i] => 30 [s] => 5 [invert] => 0 - [days] => 0 + [days] => ) DateInterval Object ( @@ -27,5 +27,5 @@ DateInterval Object [i] => 30 [s] => 5 [invert] => 0 - [days] => 0 + [days] => ) diff --git a/ext/date/tests/bug49059.phpt b/ext/date/tests/bug49059.phpt new file mode 100644 index 000000000..48d2dacb2 --- /dev/null +++ b/ext/date/tests/bug49059.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #49059 (DateTime::diff() repeats previous sub() operation) +--FILE-- +<?php +date_default_timezone_set('Asia/Calcutta'); + +$date1 = date_create("2009-03-27"); +$date2 = date_create("2009-03-01"); +print "\$date1 at init: " . $date1->format("Y-m-d") . "\n"; +print "\$date2 at init: " . $date2->format("Y-m-d") . "\n"; +$diff = $date1->diff($date2); +print "\$date1 after first diff: " . $date1->format("Y-m-d") . "\n"; +print "\$diff->days after first diff: " . $diff->days . "\n"; +$date1 = $date1->sub(new DateInterval("P2D")); +print "\$date1 after sub: " . $date1->format("Y-m-d") . "\n"; +$diff = $date1->diff($date2); +print "\$date1 after second diff (called at \$date1): " . +$date1->format("Y-m-d") . "\n"; +print "\$diff->days after second diff: " . $diff->days . "\n"; +$diff = $date2->diff($date1); +print "\$date1 after third diff (called at \$date2): " . +$date1->format("Y-m-d") . "\n"; +print "\$diff->days after third diff: " . $diff->days . "\n"; +?> +--EXPECT-- +$date1 at init: 2009-03-27 +$date2 at init: 2009-03-01 +$date1 after first diff: 2009-03-27 +$diff->days after first diff: 26 +$date1 after sub: 2009-03-25 +$date1 after second diff (called at $date1): 2009-03-25 +$diff->days after second diff: 24 +$date1 after third diff (called at $date2): 2009-03-25 +$diff->days after third diff: 24 diff --git a/ext/date/tests/bug49081.phpt b/ext/date/tests/bug49081.phpt new file mode 100644 index 000000000..f4f02903d --- /dev/null +++ b/ext/date/tests/bug49081.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #49081 (DateTime::diff() mistake if start in January and interval > 28 days) +--FILE-- +<?php + date_default_timezone_set('Europe/Berlin'); + $d1 = new DateTime('2010-01-01 06:00:00'); + $d2 = new DateTime('2010-01-31 10:00:00'); + $d = $d1->diff($d2); + print_r($d); +?> +--EXPECT-- +DateInterval Object +( + [y] => 0 + [m] => 0 + [d] => 30 + [h] => 4 + [i] => 0 + [s] => 0 + [invert] => 0 + [days] => 30 +) diff --git a/ext/date/tests/bug49700.phpt b/ext/date/tests/bug49700.phpt new file mode 100644 index 000000000..a34705259 --- /dev/null +++ b/ext/date/tests/bug49700.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #49700 (memory leaks in php_date.c if garbage collector is enabled) +--INI-- +date.timezone=GMT +--FILE-- +<?php +gc_enable(); +$objs = array(); +$objs[1] = new DateTime(); +gc_collect_cycles(); +unset($objs); +echo "OK\n"; +?> +--EXPECT-- +OK diff --git a/ext/date/tests/bug49778.phpt b/ext/date/tests/bug49778.phpt new file mode 100644 index 000000000..67c8e27f9 --- /dev/null +++ b/ext/date/tests/bug49778.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #49778 (DateInterval::format("%a") is always zero when an interval is created from an ISO string) +--FILE-- +<?php +$i=new DateInterval('P7D'); +var_dump($i); +echo $i->format("%d"), "\n"; +echo $i->format("%a"), "\n"; +?> +--EXPECT-- +object(DateInterval)#1 (8) { + ["y"]=> + int(0) + ["m"]=> + int(0) + ["d"]=> + int(7) + ["h"]=> + int(0) + ["i"]=> + int(0) + ["s"]=> + int(0) + ["invert"]=> + int(0) + ["days"]=> + bool(false) +} +7 +(unknown) diff --git a/ext/date/tests/bug50055.phpt b/ext/date/tests/bug50055.phpt new file mode 100644 index 000000000..907bb93e4 --- /dev/null +++ b/ext/date/tests/bug50055.phpt @@ -0,0 +1,30 @@ +--TEST-- +Bug #50555 (DateTime::sub() allows 'relative' time modifications). +--FILE-- +<?php +$now = '2010-03-07 13:21:38 UTC'; +//positive DateInterval +$da1 = date_create( $now ); +$ds1 = date_create( $now ); +$i = DateInterval::createFromDateString('third Tuesday of next month'); +echo $da1->format( DateTime::ISO8601 ), "\n"; +echo date_add($da1, $i)->format( DateTime::ISO8601 ), "\n"; +date_sub($ds1, $i); + +//negative DateInterval +$da2 = date_create( $now ); +$ds2 = date_create( $now ); +$i2 = DateInterval::createFromDateString('third Tuesday of last month'); +echo $da2->format( DateTime::ISO8601 ), "\n"; +echo date_add($da2, $i2)->format( DateTime::ISO8601 ), "\n";//works +date_sub($ds2, $i); +?> +--EXPECTF-- +2010-03-07T13:21:38+0000 +2010-04-20T13:21:38+0000 + +Warning: date_sub(): Only non-special relative time specifications are supported for subtraction in %sbug50055.php on line 9 +2010-03-07T13:21:38+0000 +2010-02-16T13:21:38+0000 + +Warning: date_sub(): Only non-special relative time specifications are supported for subtraction in %sbug50055.php on line 17 diff --git a/ext/date/tests/bug50392.phpt b/ext/date/tests/bug50392.phpt index 8d10923e0..4fa506ef5 100644 --- a/ext/date/tests/bug50392.phpt +++ b/ext/date/tests/bug50392.phpt @@ -7,57 +7,39 @@ date_default_timezone_set('Europe/Bratislava'); $base = '2009-03-01 18:00:00'; for ($i = 0; $i < 8; $i++) { - var_dump(date_create_from_format('Y-m-d H:i:s.u', $base . '.' . str_repeat('1', $i))); + $string = $base . '.' . str_repeat($i, $i); + echo $string, "\n- "; + $result = date_parse_from_format('Y-m-d H:i:s.u', $string); + echo $result['fraction'] ? $result['fraction'] : 'X', "\n"; + foreach( $result['errors'] as $error ) { + echo "- ", $error, "\n"; + } + echo "\n"; } ?> --EXPECT-- -bool(false) -object(DateTime)#2 (3) { - ["date"]=> - string(19) "2009-03-01 18:00:00" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(17) "Europe/Bratislava" -} -object(DateTime)#2 (3) { - ["date"]=> - string(19) "2009-03-01 18:00:00" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(17) "Europe/Bratislava" -} -object(DateTime)#2 (3) { - ["date"]=> - string(19) "2009-03-01 18:00:00" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(17) "Europe/Bratislava" -} -object(DateTime)#2 (3) { - ["date"]=> - string(19) "2009-03-01 18:00:00" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(17) "Europe/Bratislava" -} -object(DateTime)#2 (3) { - ["date"]=> - string(19) "2009-03-01 18:00:00" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(17) "Europe/Bratislava" -} -object(DateTime)#2 (3) { - ["date"]=> - string(19) "2009-03-01 18:00:00" - ["timezone_type"]=> - int(3) - ["timezone"]=> - string(17) "Europe/Bratislava" -} -bool(false) +2009-03-01 18:00:00. +- X +- Data missing + +2009-03-01 18:00:00.1 +- 0.1 + +2009-03-01 18:00:00.22 +- 0.22 + +2009-03-01 18:00:00.333 +- 0.333 + +2009-03-01 18:00:00.4444 +- 0.4444 + +2009-03-01 18:00:00.55555 +- 0.55555 + +2009-03-01 18:00:00.666666 +- 0.666666 + +2009-03-01 18:00:00.7777777 +- 0.777777 +- Trailing data diff --git a/ext/date/tests/bug50475.phpt b/ext/date/tests/bug50475.phpt new file mode 100644 index 000000000..454e86c6b --- /dev/null +++ b/ext/date/tests/bug50475.phpt @@ -0,0 +1,18 @@ +--TEST-- +Bug #50475 (DateTime::setISODate followed by DateTime::setTime) +--FILE-- +<?php +date_default_timezone_set('Asia/Calcutta'); + +$date = new DateTime('18-01-2009 00:00:00'); + +$date->setISODate(2009, 6, 1); + +var_dump($date->format('Y-m-d H:i:s')); + +$date->setTime(8, 0); +var_dump($date->format('Y-m-d H:i:s')); +?> +--EXPECT-- +string(19) "2009-02-02 00:00:00" +string(19) "2009-02-02 08:00:00"
\ No newline at end of file diff --git a/ext/date/tests/bug51096.phpt b/ext/date/tests/bug51096.phpt new file mode 100644 index 000000000..31503bc7a --- /dev/null +++ b/ext/date/tests/bug51096.phpt @@ -0,0 +1,55 @@ +--TEST-- +Bug #51096: Test for "first day" vs "first day of". +--FILE-- +<?php +$tests = array( + 'first day', + 'last day', + 'next month', + 'first day next month', + 'last day next month', + 'first day of next month', + 'last day of next month' +); + +foreach ( $tests as $test ) +{ + $result = date_parse( $test ); + $rel = $result['relative']; + echo $test, "\n- month: ", $rel['month'], '; day: ', $rel['day'], + '; first-day-of: ', isset( $rel['first_day_of_month'] ) ? 'true' : 'false', + '; last-day-of: ', isset( $rel['last_day_of_month'] ) ? 'true' : 'false', "\n"; + $date = new DateTime( '2010-03-06 15:21 UTC' ); + echo '- ', $date->format( DateTime::ISO8601 ); + $date->modify( $test ); + echo ' -> ', $date->format( DateTime::ISO8601 ), "\n\n"; +} +?> +--EXPECT-- +first day +- month: 0; day: 1; first-day-of: false; last-day-of: false +- 2010-03-06T15:21:00+0000 -> 2010-03-07T15:21:00+0000 + +last day +- month: 0; day: -1; first-day-of: false; last-day-of: false +- 2010-03-06T15:21:00+0000 -> 2010-03-05T15:21:00+0000 + +next month +- month: 1; day: 0; first-day-of: false; last-day-of: false +- 2010-03-06T15:21:00+0000 -> 2010-04-06T15:21:00+0000 + +first day next month +- month: 1; day: 1; first-day-of: false; last-day-of: false +- 2010-03-06T15:21:00+0000 -> 2010-04-07T15:21:00+0000 + +last day next month +- month: 1; day: -1; first-day-of: false; last-day-of: false +- 2010-03-06T15:21:00+0000 -> 2010-04-05T15:21:00+0000 + +first day of next month +- month: 1; day: 0; first-day-of: true; last-day-of: false +- 2010-03-06T15:21:00+0000 -> 2010-04-01T15:21:00+0000 + +last day of next month +- month: 1; day: 0; first-day-of: false; last-day-of: true +- 2010-03-06T15:21:00+0000 -> 2010-04-30T15:21:00+0000 diff --git a/ext/date/tests/bug51393.phpt b/ext/date/tests/bug51393.phpt new file mode 100644 index 000000000..e3f0983ae --- /dev/null +++ b/ext/date/tests/bug51393.phpt @@ -0,0 +1,75 @@ +--TEST-- +Bug #51393 (DateTime::createFromFormat() fails if format string contains timezone) +--INI-- +date.timezone=UTC +--FILE-- +<?php +$dt = DateTime::createFromFormat('O', '+0800'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('P', '+08:00'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('O', '-0800'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('P', '-08:00'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[O]', '[+0800]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[P]', '[+08:00]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[O]', '[-0800]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[P]', '[-08:00]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('O', 'GMT+0800'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('P', 'GMT+08:00'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('O', 'GMT-0800'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('P', 'GMT-08:00'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[O]', '[GMT+0800]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[P]', '[GMT+08:00]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[O]', '[GMT-0800]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('[P]', '[GMT-08:00]'); +var_dump($dt->getOffset()); + +$dt = DateTime::createFromFormat('O', 'invalid'); +var_dump($dt); +?> +--EXPECT-- +int(28800) +int(28800) +int(-28800) +int(-28800) +int(28800) +int(28800) +int(-28800) +int(-28800) +int(28800) +int(28800) +int(-28800) +int(-28800) +int(28800) +int(28800) +int(-28800) +int(-28800) +bool(false) diff --git a/ext/date/tests/bug51819.phpt b/ext/date/tests/bug51819.phpt new file mode 100644 index 000000000..afcb9c7d4 --- /dev/null +++ b/ext/date/tests/bug51819.phpt @@ -0,0 +1,31 @@ +--TEST-- +Bug #51819 (Case discrepancy in timezone names cause Uncaught exception and fatal error) +--FILE-- +<?php +$aTzAbbr = timezone_abbreviations_list(); + +$aTz = array(); +foreach (array_keys($aTzAbbr) as $sKey) { + foreach (array_keys($aTzAbbr[$sKey]) as $iIndex) { + $sTz = $aTzAbbr[$sKey][$iIndex]['timezone_id']; + + if (! in_array($sTz, $aTz)) { + array_push($aTz, $sTz); + } + } +} + +foreach ($aTz as $sTz) { + $sDate = '2010-05-15 00:00:00 ' . $sTz; + + try { + $oDateTime = new DateTime($sDate); + } catch (Exception $oException) { + var_dump($oException->getMessage()); + } +} + +var_dump('this should be the only output'); +?> +--EXPECTF-- +string(30) "this should be the only output"
\ No newline at end of file diff --git a/ext/date/tests/bug51994.phpt b/ext/date/tests/bug51994.phpt new file mode 100644 index 000000000..e136c8f2b --- /dev/null +++ b/ext/date/tests/bug51994.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #51994 (date_parse_from_format is parsing invalid date using 'yz' format) +--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-- +array(12) { + ["year"]=> + int(2010) + ["month"]=> + int(6) + ["day"]=> + int(3) + ["hour"]=> + bool(false) + ["minute"]=> + bool(false) + ["second"]=> + bool(false) + ["fraction"]=> + bool(false) + ["warning_count"]=> + int(0) + ["warnings"]=> + array(0) { + } + ["error_count"]=> + int(0) + ["errors"]=> + array(0) { + } + ["is_localtime"]=> + bool(false) +}
\ No newline at end of file diff --git a/ext/date/tests/bug52290.phpt b/ext/date/tests/bug52290.phpt new file mode 100644 index 000000000..c1ee9d47a --- /dev/null +++ b/ext/date/tests/bug52290.phpt @@ -0,0 +1,27 @@ +--TEST-- +Bug #52290 (setDate, setISODate, setTime works wrong when DateTime created from timestamp) +--FILE-- +<?php +$tz = 'UTC'; +date_default_timezone_set($tz); + +$ts = strtotime('2006-01-01'); +$dt = new DateTime('@'.$ts); +$dt->setTimezone(new DateTimeZone($tz)); + +var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U')); + +$dt->setISODate(2005, 52, 1); +var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U')); + +$dt->setDate(2007, 10, 10); +var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U')); + +$dt->setTime(20, 30, 40); +var_dump($dt->format('o-\WW-N | Y-m-d | H:i:s | U')); +?> +--EXPECTF-- +string(47) "2005-W52-7 | 2006-01-01 | 00:00:00 | 1136073600" +string(47) "2005-W52-1 | 2005-12-26 | 00:00:00 | 1135555200" +string(47) "2007-W40-5 | 2007-10-10 | 00:00:00 | 1191974400" +string(47) "2007-W40-5 | 2007-10-10 | 20:30:40 | 1192048240"
\ No newline at end of file diff --git a/ext/date/tests/date_diff.phpt b/ext/date/tests/date_diff.phpt new file mode 100644 index 000000000..31783a884 --- /dev/null +++ b/ext/date/tests/date_diff.phpt @@ -0,0 +1,59 @@ +--TEST-- +Extensive test for date_diff(). +--INI-- +date.timezone=UTC +--FILE-- +<?php +$ok = 0; +define( 'COUNT', 120 ); +$d0 = new DateTime('2009-11-20'); +for ( $i = 0; $i < COUNT * 12; $i++ ) +{ + $d = clone $d0; + $dates[$i] = $d->add( new DateInterval( "P{$i}D" ) ); +} + +for ( $i = 0; $i < COUNT; $i++) +{ +// echo $dates[$i]->format( "Y-m-d\n" ); + for ( $j = 0; $j < COUNT * 12; $j++) + { + $diff = date_diff( $dates[$i], $dates[$j] ); + /* + printf( "\t%s %s %3d %s\n", + $dates[$i]->format( 'Y-m-d' ), + $dates[$j]->format( 'Y-m-d' ), + $diff->format( '%a' ), + $diff->format( '%y-%m-%d' ) + ); + */ + + $current = clone $dates[$i]; + $int = new DateInterval( $diff->format( 'P%yY%mM%dD' ) ); + if ( $current > $dates[$j] ) + { + $current->sub( $int ); + } + else + { + $current->add( $int ); + } + if ( $current != $dates[$j] ) + { + echo "FAIL: ", + $dates[$i]->format( 'Y-m-d' ), " + ", + $int->format( '%y-%m-%d' ), " = ", + $current->format( 'Y-m-d' ), " (", + $dates[$j]->format( 'Y-m-d' ), ")\n"; + } + else + { + $ok++; + } + } +} + +echo $ok, "\n"; +?> +--EXPECT-- +172800 diff --git a/ext/dba/config.m4 b/ext/dba/config.m4 index feed36e25..c24a2fc84 100644 --- a/ext/dba/config.m4 +++ b/ext/dba/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 247692 2007-12-06 14:01:49Z helly $ +dnl $Id: config.m4 300325 2010-06-09 17:33:44Z sixd $ dnl dnl Suppose we need FlatFile if no support or only CDB is used. @@ -83,16 +83,16 @@ PHP_ARG_WITH(ndbm,, [ --with-ndbm[=DIR] DBA: NDBM support], no, no) PHP_ARG_WITH(db4,, -[ --with-db4[=DIR] DBA: Berkeley DB4 support], no, no) +[ --with-db4[=DIR] DBA: Oracle Berkeley DB 4.x or 5.x support], no, no) PHP_ARG_WITH(db3,, -[ --with-db3[=DIR] DBA: Berkeley DB3 support], no, no) +[ --with-db3[=DIR] DBA: Oracle Berkeley DB 3.x support], no, no) PHP_ARG_WITH(db2,, -[ --with-db2[=DIR] DBA: Berkeley DB2 support], no, no) +[ --with-db2[=DIR] DBA: Oracle Berkeley DB 2.x support], no, no) PHP_ARG_WITH(db1,, -[ --with-db1[=DIR] DBA: Berkeley DB1 support/emulation], no, no) +[ --with-db1[=DIR] DBA: Oracle Berkeley DB 1.x support/emulation], no, no) PHP_ARG_WITH(dbm,, [ --with-dbm[=DIR] DBA: DBM support], no, no) @@ -210,7 +210,7 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[ ],[ AC_EGREP_CPP(yes,[ #include "$THIS_INCLUDE" -#if DB_VERSION_MAJOR == $1 +#if DB_VERSION_MAJOR == $1 || ($1 == 4 && DB_VERSION_MAJOR == 5) yes #endif ],[ @@ -226,14 +226,14 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[ fi done if test -z "$THIS_LIBS"; then - AC_MSG_CHECKING([for db$1 major version]) + AC_MSG_CHECKING([for DB$1 major version]) AC_MSG_ERROR([Header contains different version]) fi if test "$1" = "4"; then - AC_MSG_CHECKING([for db4 minor version and patch level]) + AC_MSG_CHECKING([for DB4 minor version and patch level]) AC_EGREP_CPP(yes,[ #include "$THIS_INCLUDE" -#if DB_VERSION_MINOR != 1 || DB_VERSION_PATCH >= 25 +#if DB_VERSION_MINOR != 1 || (DB_VERSION_MINOR == 1 && DB_VERSION_PATCH >= 25) yes #endif ],[ @@ -274,12 +274,29 @@ AC_DEFUN([PHP_DBA_DB_CHECK],[ # DB4 if test "$PHP_DB4" != "no"; then PHP_DBA_STD_BEGIN - dbdp="/usr/local/BerkeleyDB.4." - for i in $PHP_DB4 ${dbdp}6 ${dbdp}5 ${dbdp}4 ${dbdp}3 ${dbdp}2 ${dbdp}1 ${dbdp}0 /usr/local /usr; do - if test -f "$i/db4/db.h"; then + dbdp4="/usr/local/BerkeleyDB.4." + dbdp5="/usr/local/BerkeleyDB.5." + for i in $PHP_DB4 ${dbdp5}0 ${dbdp4}8 ${dbdp4}7 ${dbdp4}6 ${dbdp4}5 ${dbdp4}4 ${dbdp4}3 ${dbdp4}2 ${dbdp4}1 ${dbdp}0 /usr/local /usr; do + if test -f "$i/db5/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/db5/db.h + break + elif test -f "$i/db4/db.h"; then THIS_PREFIX=$i THIS_INCLUDE=$i/db4/db.h break + elif test -f "$i/include/db5.0/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db5.0/db.h + break + elif test -f "$i/include/db4.8/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db4.8/db.h + break + elif test -f "$i/include/db4.7/db.h"; then + THIS_PREFIX=$i + THIS_INCLUDE=$i/include/db4.7/db.h + break elif test -f "$i/include/db4.6/db.h"; then THIS_PREFIX=$i THIS_INCLUDE=$i/include/db4.6/db.h @@ -306,7 +323,7 @@ if test "$PHP_DB4" != "no"; then break fi done - PHP_DBA_DB_CHECK(4, db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) + PHP_DBA_DB_CHECK(4, db-5.0 db-4.8 db-4.7 db-4.6 db-4.5 db-4.4 db-4.3 db-4.2 db-4.1 db-4.0 db-4 db4 db, [(void)db_create((DB**)0, (DB_ENV*)0, 0)]) fi PHP_DBA_STD_RESULT(db4,Berkeley DB4) diff --git a/ext/dba/dba.c b/ext/dba/dba.c index dca6ac65e..b52251d5c 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: dba.c 295764 2010-03-03 00:29:38Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -250,7 +250,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free TSRMLS zval *key; \ char *key_str, *key_free; \ size_t key_len; \ - int skip = 0; \ + long skip = 0; \ switch(ac) { \ case 2: \ if (zend_parse_parameters(ac TSRMLS_CC, "zr", &key, &id) == FAILURE) { \ diff --git a/ext/dba/dba_db4.c b/ext/dba/dba_db4.c index 7e500e09b..d6e3f1554 100644 --- a/ext/dba/dba_db4.c +++ b/ext/dba/dba_db4.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dba_db4.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: dba_db4.c 300151 2010-06-03 07:03:05Z sixd $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -37,13 +37,25 @@ #endif static void php_dba_db4_errcall_fcn( -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3) +#if (DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 3)) const DB_ENV *dbenv, #endif const char *errpfx, const char *msg) { TSRMLS_FETCH(); - + +#if (DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR == 8)) +/* Bug 51086, Berkeley DB 4.8.26 */ +/* This code suppresses a BDB 4.8 error message that BDB incorrectly emits */ + { + char *function = get_active_function_name(TSRMLS_C); + if (function && (!strcmp(function,"dba_popen") || !strcmp(function,"dba_open")) + && !strncmp(msg, "fop_read_meta", sizeof("fop_read_meta")-1)) { + return; + } + } +#endif + php_error_docref(NULL TSRMLS_CC, E_NOTICE, "%s%s", errpfx?errpfx:"", msg); } @@ -67,6 +79,7 @@ DBA_OPEN_FUNC(db4) struct stat check_stat; int s = VCWD_STAT(info->path, &check_stat); +#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR <= 7) /* Bug 51086 */ if (!s && !check_stat.st_size) { info->mode = DBA_TRUNC; /* force truncate */ } @@ -80,6 +93,20 @@ DBA_OPEN_FUNC(db4) (info->mode == DBA_CREAT && !s) ? 0 : info->mode == DBA_WRITER ? 0 : info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1; +#else + if (!s && !check_stat.st_size) { + info->mode = DBA_CREAT; /* force creation */ + } + + type = info->mode == DBA_READER ? DB_UNKNOWN : + (info->mode == DBA_TRUNC || info->mode == DBA_CREAT) ? DB_BTREE : + s ? DB_BTREE : DB_UNKNOWN; + + gmode = info->mode == DBA_READER ? DB_RDONLY : + info->mode == DBA_CREAT ? DB_CREATE : + info->mode == DBA_WRITER ? 0 : + info->mode == DBA_TRUNC ? DB_CREATE | DB_TRUNCATE : -1; +#endif if (gmode == -1) { return FAILURE; /* not possible */ @@ -97,7 +124,7 @@ DBA_OPEN_FUNC(db4) if ((err=db_create(&dbp, NULL, 0)) == 0) { dbp->set_errcall(dbp, php_dba_db4_errcall_fcn); if ( -#if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1) +#if (DB_VERSION_MAJOR > 4 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1)) (err=dbp->open(dbp, 0, info->path, NULL, type, gmode, filemode)) == 0) { #else (err=dbp->open(dbp, info->path, NULL, type, gmode, filemode)) == 0) { diff --git a/ext/dba/tests/bug36436.phpt b/ext/dba/tests/bug36436.phpt index 4e8daa860..19254df3c 100755 --- a/ext/dba/tests/bug36436.phpt +++ b/ext/dba/tests/bug36436.phpt @@ -3,13 +3,13 @@ Bug #36436 (DBA problem with Berkeley DB4) --SKIPIF-- <?php $handler = 'db4'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once dirname(__FILE__) .'/test.inc'; +require_once(dirname(__FILE__) .'/test.inc'); $db = dba_popen($db_filename, 'c', 'db4'); @@ -22,10 +22,13 @@ var_dump(dba_firstkey($db)); var_dump(dba_nextkey($db)); dba_close($db); -unlink($db_filename); ?> ===DONE=== +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- resource(%d) of type (dba persistent) string(3) "XYZ" diff --git a/ext/dba/tests/bug38698.phpt b/ext/dba/tests/bug38698.phpt new file mode 100755 index 000000000..56dde8526 --- /dev/null +++ b/ext/dba/tests/bug38698.phpt @@ -0,0 +1,26 @@ +--TEST-- +Bug #38698 (Bug #38698 for some keys cdbmake creates corrupted db and cdb can't read valid db) +--SKIPIF-- +<?php + $handler = 'cdb_make'; + require_once(dirname(__FILE__) .'/skipif.inc'); +?> +--FILE-- +<?php + +$db_file = dirname(__FILE__) .'/129php.cdb'; + +if (($db_make=dba_open($db_file, "n", 'cdb_make'))!==FALSE) { + dba_insert(pack('i',129), "Booo!", $db_make); + dba_close($db_make); + // write md5 checksum of generated database file + var_dump(md5_file($db_file)); + @unlink($db_file); +} else { + echo "Error creating database\n"; +} +?> +===DONE=== +--EXPECT-- +string(32) "1f34b74bde3744265acfc21e0f30af95" +===DONE=== diff --git a/ext/dba/tests/bug48240.phpt b/ext/dba/tests/bug48240.phpt index 27f8d95e6..5a72073f3 100644 --- a/ext/dba/tests/bug48240.phpt +++ b/ext/dba/tests/bug48240.phpt @@ -3,23 +3,26 @@ Bug #48240 (DBA Segmentation fault dba_nextkey) --SKIPIF-- <?php $handler = 'db4'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); ?> --FILE-- <?php $handler = 'db4'; -require_once dirname(__FILE__) .'/test.inc'; +require_once(dirname(__FILE__) .'/test.inc'); $db = dba_open($db_filename, 'c', 'db4'); var_dump(dba_nextkey($db)); dba_close($db); -unlink($db_filename); ?> ===DONE=== +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECT-- bool(false) ===DONE=== diff --git a/ext/dba/tests/bug49125.phpt b/ext/dba/tests/bug49125.phpt index 3724b89c9..e06495a10 100644 --- a/ext/dba/tests/bug49125.phpt +++ b/ext/dba/tests/bug49125.phpt @@ -3,7 +3,7 @@ Bug #49125 (Error in dba_exists C code) --SKIPIF-- <?php $handler = 'db4'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); ?> --FILE-- <?php @@ -11,7 +11,7 @@ Bug #49125 (Error in dba_exists C code) error_reporting(E_ALL); $handler = 'db4'; -require_once dirname(__FILE__) .'/test.inc'; +require_once(dirname(__FILE__) .'/test.inc'); $db = dba_popen($db_filename, 'c', 'db4'); @@ -21,7 +21,10 @@ var_dump(dba_exists('foo', $db)); dba_close($db); -unlink($db_filename); - +?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECT-- bool(true) diff --git a/ext/dba/tests/clean.inc b/ext/dba/tests/clean.inc new file mode 100644 index 000000000..7c53e7e61 --- /dev/null +++ b/ext/dba/tests/clean.inc @@ -0,0 +1,5 @@ +<?php + $db_filename = dirname(__FILE__) .'/test0.dbm'; // see test.inc + @unlink($db_filename); + @unlink($db_filename.'.lck'); +?> diff --git a/ext/dba/tests/dba001.phpt b/ext/dba/tests/dba001.phpt index 00aec6969..b63829abb 100644 --- a/ext/dba/tests/dba001.phpt +++ b/ext/dba/tests/dba001.phpt @@ -2,12 +2,12 @@ DBA File Creation Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; @@ -16,6 +16,10 @@ DBA File Creation Test echo "$db_file does not exist\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s database file created diff --git a/ext/dba/tests/dba002.phpt b/ext/dba/tests/dba002.phpt index 974b09fab..e60e73360 100644 --- a/ext/dba/tests/dba002.phpt +++ b/ext/dba/tests/dba002.phpt @@ -2,12 +2,12 @@ DBA Insert/Fetch Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "This is a test insert", $db_file); @@ -17,6 +17,10 @@ DBA Insert/Fetch Test echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s This is a test insert diff --git a/ext/dba/tests/dba003.phpt b/ext/dba/tests/dba003.phpt index 832c7a0dc..a027b5356 100644 --- a/ext/dba/tests/dba003.phpt +++ b/ext/dba/tests/dba003.phpt @@ -2,12 +2,12 @@ DBA Insert/Replace/Fetch Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "This is a test insert", $db_file); @@ -19,6 +19,10 @@ DBA Insert/Replace/Fetch Test echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s This is the replacement text diff --git a/ext/dba/tests/dba004.phpt b/ext/dba/tests/dba004.phpt index 42da1c64b..6e7180cf6 100644 --- a/ext/dba/tests/dba004.phpt +++ b/ext/dba/tests/dba004.phpt @@ -2,12 +2,12 @@ DBA Multiple Insert/Fetch Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -23,6 +23,10 @@ DBA Multiple Insert/Fetch Test echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s Another Content String Content String 2 diff --git a/ext/dba/tests/dba005.phpt b/ext/dba/tests/dba005.phpt index 3e7e58086..68ad60022 100644 --- a/ext/dba/tests/dba005.phpt +++ b/ext/dba/tests/dba005.phpt @@ -2,12 +2,12 @@ DBA FirstKey/NextKey Loop Test With 5 Items --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -30,6 +30,10 @@ DBA FirstKey/NextKey Loop Test With 5 Items echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s 5YYYYY diff --git a/ext/dba/tests/dba006.phpt b/ext/dba/tests/dba006.phpt index f6177b0b9..a3fc738fa 100644 --- a/ext/dba/tests/dba006.phpt +++ b/ext/dba/tests/dba006.phpt @@ -2,12 +2,12 @@ DBA FirstKey/NextKey with 2 deletes --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { dba_insert("key1", "Content String 1", $db_file); @@ -32,6 +32,10 @@ DBA FirstKey/NextKey with 2 deletes echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s 3NYNYY diff --git a/ext/dba/tests/dba007.phpt b/ext/dba/tests/dba007.phpt index 0f30932fc..2519fdc59 100644 --- a/ext/dba/tests/dba007.phpt +++ b/ext/dba/tests/dba007.phpt @@ -2,16 +2,16 @@ DBA Multiple File Creation Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); if (!function_exists('dba_list')) die('skip dba_list() not available'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; - $db_file1 = dirname(__FILE__).'/test1.dbm'; - $db_file2 = dirname(__FILE__).'/test2.dbm'; + $db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; + $db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { echo "database file created\n"; } else { @@ -29,6 +29,13 @@ DBA Multiple File Creation Test } var_dump(dba_list()); dba_close($db_file); + + @unlink($db_filename1); + @unlink($db_filename2); +?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); ?> --EXPECTF-- database handler: %s diff --git a/ext/dba/tests/dba008.phpt b/ext/dba/tests/dba008.phpt index 8fde8ff3f..f7015d921 100644 --- a/ext/dba/tests/dba008.phpt +++ b/ext/dba/tests/dba008.phpt @@ -2,12 +2,13 @@ DBA magic_quotes_runtime Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + die('skip, magic_quotes removed'); + require_once(dirname(__FILE__) .'/skipif.inc'); die("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { ini_set('magic_quotes_runtime', 0); @@ -24,6 +25,10 @@ DBA magic_quotes_runtime Test echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s string(1) """ diff --git a/ext/dba/tests/dba009.phpt b/ext/dba/tests/dba009.phpt index b4d8308e8..698657b2a 100755 --- a/ext/dba/tests/dba009.phpt +++ b/ext/dba/tests/dba009.phpt @@ -2,12 +2,12 @@ DBA dba_popen Test --SKIPIF-- <?php - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); print("info $HND handler used"); ?> --FILE-- <?php - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; if (($db=dba_popen($db_file, "n", $handler))!==FALSE) { echo "Opened\n"; @@ -24,6 +24,10 @@ DBA dba_popen Test echo dba_fetch("a", $db)."\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECTF-- database handler: %s Opened diff --git a/ext/dba/tests/dba010.phpt b/ext/dba/tests/dba010.phpt new file mode 100644 index 000000000..c818373f1 --- /dev/null +++ b/ext/dba/tests/dba010.phpt @@ -0,0 +1,44 @@ +--TEST-- +DBA with array keys +--SKIPIF-- +<?php + require_once(dirname(__FILE__) .'/skipif.inc'); + die("info $HND handler used"); +?> +--FILE-- +<?php +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { + dba_insert(array("", "name0") , "Content String 1", $db_file); + dba_insert(array("key1", "name1") , "Content String 1", $db_file); + dba_insert(array("key2","name2"), "Content String 2", $db_file); + dba_insert("[key3]name3", "Third Content String", $db_file); + dba_insert(array("key4","name4"), "Another Content String", $db_file); + dba_insert(array("key5","name5"), "The last content string", $db_file); + $a = dba_firstkey($db_file); + $i=0; + while($a) { + $a = dba_nextkey($db_file); + $i++; + } + echo $i; + echo dba_exists(array("","name0"), $db_file) ? "Y" : "N"; + for ($i=1; $i<5; $i++) { + echo dba_exists("[key$i]name$i", $db_file) ? "Y" : "N"; + } + echo dba_exists(array("key5","name5"), $db_file) ? "Y" : "N"; + echo "\n"; + dba_close($db_file); +} else { + echo "Error creating database\n"; +} + +?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: %s +6YYYYYY diff --git a/ext/dba/tests/dba011.phpt b/ext/dba/tests/dba011.phpt new file mode 100644 index 000000000..71164be3c --- /dev/null +++ b/ext/dba/tests/dba011.phpt @@ -0,0 +1,38 @@ +--TEST-- +DBA argument tests +--SKIPIF-- +<?php +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +var_dump(dba_open($db_file)); +var_dump(dba_open($db_file, 'n')); +var_dump(dba_open($db_file, 'n', 'bogus')); +var_dump(dba_open($db_file, 'q', $handler)); +var_dump(dba_open($db_file, 'nq', $handler)); +var_dump(dba_open($db_file, 'n', $handler, 2, 3, 4, 5, 6, 7, 8)); +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: flatfile + +Warning: Wrong parameter count for dba_open() in %sdba011.php on line %d +NULL +resource(%d) of type (dba) + +Warning: dba_open(%stest0.dbm,n): No such handler: bogus in %sdba011.php on line %d +bool(false) + +Warning: dba_open(%stest0.dbm,q): Illegal DBA mode in %sdba011.php on line %d +bool(false) + +Warning: dba_open(%stest0.dbm,nq): Illegal DBA mode in %sdba011.php on line %d +bool(false) +resource(%d) of type (dba) diff --git a/ext/dba/tests/dba012.phpt b/ext/dba/tests/dba012.phpt new file mode 100644 index 000000000..821c4e2ab --- /dev/null +++ b/ext/dba/tests/dba012.phpt @@ -0,0 +1,42 @@ +--TEST-- +DBA dba.default_handler tests +--SKIPIF-- +<?php +$handler = "flatfile"; +require_once(dirname(__FILE__) .'/skipif.inc'); +?> +--INI-- +dba.default_handler=flatfile +--FILE-- +<?php +$handler = "flatfile"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +echo "Test 1\n"; + +ini_set('dba.default_handler', 'does_not_exist'); + +var_dump(dba_open($db_filename, 'c')); + +echo "Test 2\n"; + +ini_set('dba.default_handler', ''); + +var_dump(dba_open($db_filename, 'n')); + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: flatfile +Test 1 + +Warning: ini_set(): No such handler: does_not_exist in %sdba012.php on line %d +resource(%d) of type (dba) +Test 2 + +Warning: dba_open(%stest0.dbm,n): No default handler selected in %sdba012.php on line %d +bool(false) diff --git a/ext/dba/tests/dba013.phpt b/ext/dba/tests/dba013.phpt new file mode 100644 index 000000000..bf95642e9 --- /dev/null +++ b/ext/dba/tests/dba013.phpt @@ -0,0 +1,27 @@ +--TEST-- +DBA with array key with empty array +--SKIPIF-- +<?php +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { + dba_insert(array(), "Content String 1", $db_file); +} else { + echo "Error creating database\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: %s + +Catchable fatal error: dba_insert(): Key does not have exactly two elements: (key, name) in %sdba013.php on line %d diff --git a/ext/dba/tests/dba014.phpt b/ext/dba/tests/dba014.phpt new file mode 100644 index 000000000..7e52be7c3 --- /dev/null +++ b/ext/dba/tests/dba014.phpt @@ -0,0 +1,27 @@ +--TEST-- +DBA with array key with array containing too many elements +--SKIPIF-- +<?php +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { + dba_insert(array("a", "b", "c"), "Content String 2", $db_file); +} else { + echo "Error creating database\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: %s + +Catchable fatal error: dba_insert(): Key does not have exactly two elements: (key, name) in %sdba014.php on line %d diff --git a/ext/dba/tests/dba015.phpt b/ext/dba/tests/dba015.phpt new file mode 100644 index 000000000..9f560c5b2 --- /dev/null +++ b/ext/dba/tests/dba015.phpt @@ -0,0 +1,76 @@ +--TEST-- +DBA with persistent connections +--SKIPIF-- +<?php +$handler = "flatfile"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "flatfile"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +echo "Test 1\n"; +$db_file1 = dba_popen($db_filename, 'n', 'flatfile'); +dba_insert("key1", "This is a test insert 1", $db_file1); +echo dba_fetch("key1", $db_file1), "\n"; + + +echo "Test 2\n"; +$db_file2 = dba_popen($db_filename, 'n', 'flatfile'); +if ($db_file1 === $db_file2) { + echo "resources are the same\n"; +} else { + echo "resources are different\n"; +} + + +echo "Test 3 - fetch both rows from second resource\n"; +dba_insert("key2", "This is a test insert 2", $db_file2); +echo dba_fetch("key1", $db_file2), "\n"; +echo dba_fetch("key2", $db_file2), "\n"; + + +echo "Test 4 - fetch both rows from first resource\n"; +echo dba_fetch("key1", $db_file1), "\n"; +echo dba_fetch("key2", $db_file1), "\n"; + +echo "Test 5 - close 2nd resource\n"; +dba_close($db_file2); +var_dump($db_file1); +var_dump($db_file2); + +echo "Test 6 - query after closing 2nd resource\n"; +echo dba_fetch("key1", $db_file1), "\n"; +echo dba_fetch("key2", $db_file1), "\n"; + +?> +===DONE=== +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> +--XFAIL-- +Test 6 crashes in flatfile_findkey with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278 +--EXPECTF-- +database handler: flatfile +Test 1 +This is a test insert 1 +Test 2 +resources are different +Test 3 - fetch both rows from second resource +This is a test insert 1 +This is a test insert 2 +Test 4 - fetch both rows from first resource +This is a test insert 1 +This is a test insert 2 +Test 5 - close 2nd resource +resource(%d) of type (dba persistent) +resource(%d) of type (Unknown) +Test 6 - query after closing 2nd resource +This is a test insert 1 +This is a test insert 2 +===DONE=== diff --git a/ext/dba/tests/dba016.phpt b/ext/dba/tests/dba016.phpt new file mode 100644 index 000000000..29726ac11 --- /dev/null +++ b/ext/dba/tests/dba016.phpt @@ -0,0 +1,23 @@ +--TEST-- +DBA lock modifier error message test +--SKIPIF-- +<?php +$handler = "flatfile"; +require_once(dirname(__FILE__) .'/skipif.inc'); +?> +--FILE-- +<?php + +$handler = "flatfile"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +$db_file1 = dba_popen($db_filename, 'n-t', 'flatfile'); + +?> +===DONE=== +--EXPECTF-- +database handler: flatfile + +Warning: dba_popen(%stest0.dbm,n-t): You cannot combine modifiers - (no lock) and t (test lock) in %sdba016.php on line %d +===DONE=== diff --git a/ext/dba/tests/dba_cdb.phpt b/ext/dba/tests/dba_cdb.phpt index 0b7559648..b9ef68f2b 100644 --- a/ext/dba/tests/dba_cdb.phpt +++ b/ext/dba/tests/dba_cdb.phpt @@ -3,16 +3,20 @@ DBA CDB handler test --SKIPIF-- <?php $handler = 'cdb'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die('info CDB does not support replace or delete'); ?> --FILE-- <?php $handler = 'cdb'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once(dirname(__FILE__) .'/test.inc'); + require_once(dirname(__FILE__) .'/dba_handler.inc'); ?> ===DONE=== +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECT-- database handler: cdb 5YYYYY diff --git a/ext/dba/tests/dba_cdb_001.phpt b/ext/dba/tests/dba_cdb_001.phpt new file mode 100644 index 000000000..437275438 --- /dev/null +++ b/ext/dba/tests/dba_cdb_001.phpt @@ -0,0 +1,89 @@ +--TEST-- +DBA CDB handler test +--SKIPIF-- +<?php +$handler = 'cdb'; +require_once(dirname(__FILE__) .'/skipif.inc'); +die('info CDB does not support replace or delete'); +?> +--FILE-- +<?php + +$handler = 'cdb'; +require_once(dirname(__FILE__) .'/test.inc'); + +echo "Test 0\n"; + +if (($db_file = dba_open($db_filename, 'n', $handler))!==FALSE) { + var_dump(dba_insert("key1", "Content String 1", $db_file)); + var_dump(dba_replace("key1", "New Content String", $db_file)); + var_dump(dba_fetch("key1", $db_file)); + var_dump(dba_firstkey($db_file)); + var_dump(dba_delete("key1", $db_file)); + var_dump(dba_optimize($db_file)); + var_dump(dba_sync($db_file)); + dba_close($db_file); +} +else { + echo "Failed to open DB\n"; +} + +unlink($db_filename); + +echo "Test 1\n"; + +if (($db_file = dba_open($db_filename, 'c', $handler))!==FALSE) { + dba_insert("key1", "Content String 1", $db_file); + dba_close($db_file); +} +else { + echo "Failed to open DB\n"; +} + +echo "Test 2\n"; + +if (($db_file = dba_open($db_filename, 'r', $handler))!==FALSE) { + dba_insert("key1", "Content String 1", $db_file); + dba_close($db_file); +} +else { + echo "Failed to open DB\n"; +} + +echo "Test 3\n"; + +if (($db_file = dba_open($db_filename, 'w', $handler))!==FALSE) { + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} +else { + echo "Failed to open DB\n"; +} + +?> +===DONE=== +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +Test 0 +bool(true) +bool(false) +bool(false) +bool(false) +bool(false) +bool(true) +bool(true) +Test 1 + +Warning: dba_open(%stest0.dbm,c): Driver initialization failed for handler: cdb: Update operations are not supported in %sdba_cdb_001.php on line %d +Failed to open DB +Test 2 + +Warning: dba_insert(): You cannot perform a modification to a database without proper access in %sdba_cdb_001.php on line %d +Test 3 + +Warning: dba_open(%stest0.dbm,w): Driver initialization failed for handler: cdb: Update operations are not supported in %sdba_cdb_001.php on line %d +Failed to open DB +===DONE=== diff --git a/ext/dba/tests/dba_cdb_make.phpt b/ext/dba/tests/dba_cdb_make.phpt index 6691d0a28..c1d0a0188 100644 --- a/ext/dba/tests/dba_cdb_make.phpt +++ b/ext/dba/tests/dba_cdb_make.phpt @@ -5,13 +5,13 @@ magic_quotes_runtime=1 --SKIPIF-- <?php $handler = 'cdb_make'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); die('info CDB_MAKE does not support reading'); ?> --FILE-- <?php $handler = 'cdb_make'; - require_once dirname(__FILE__) .'/test.inc'; + require_once(dirname(__FILE__) .'/test.inc'); echo "database handler: $handler\n"; // print md5 checksum of test.cdb which is generated by cdb_make program var_dump(md5_file(dirname(__FILE__).'/test.cdb')); @@ -32,6 +32,10 @@ magic_quotes_runtime=1 echo "Error creating database\n"; } ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECT-- Warning: Directive 'magic_quotes_runtime' is deprecated in PHP 5.3 and greater in Unknown on line 0 database handler: cdb_make diff --git a/ext/dba/tests/dba_db4.phpt b/ext/dba/tests/dba_db4_000.phpt index 2c2a7a694..bbbc52c9f 100644 --- a/ext/dba/tests/dba_db4.phpt +++ b/ext/dba/tests/dba_db4_000.phpt @@ -2,16 +2,20 @@ DBA DB4 handler test --SKIPIF-- <?php - $handler = 'db4'; - require_once dirname(__FILE__) .'/skipif.inc'; +$handler = 'db4'; +require_once(dirname(__FILE__) .'/skipif.inc'); ?> --FILE-- <?php - $handler = 'db4'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; +$handler = 'db4'; +require_once(dirname(__FILE__) .'/test.inc'); +require_once(dirname(__FILE__) .'/dba_handler.inc'); ?> ===DONE=== +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECT-- database handler: db4 3NYNYY diff --git a/ext/dba/tests/dba_db4_001.phpt b/ext/dba/tests/dba_db4_001.phpt new file mode 100644 index 000000000..ecc8389cb --- /dev/null +++ b/ext/dba/tests/dba_db4_001.phpt @@ -0,0 +1,32 @@ +--TEST-- +DBA DB4 New File Creation open("c") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) { + echo "database file created\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +This is a test insert diff --git a/ext/dba/tests/dba_db4_002.phpt b/ext/dba/tests/dba_db4_002.phpt new file mode 100644 index 000000000..18ac0ec46 --- /dev/null +++ b/ext/dba/tests/dba_db4_002.phpt @@ -0,0 +1,32 @@ +--TEST-- +DBA DB4 New File Creation open("n") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { + echo "database file created\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +This is a test insert diff --git a/ext/dba/tests/dba_db4_003.phpt b/ext/dba/tests/dba_db4_003.phpt new file mode 100644 index 000000000..7e8568c08 --- /dev/null +++ b/ext/dba/tests/dba_db4_003.phpt @@ -0,0 +1,46 @@ +--TEST-- +DBA DB4 File Creation open("c") with existing file +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +var_dump(file_put_contents($db_filename, "Dummy contents")); + +if (($db_file = dba_open($db_filename, "c", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +// Check the file still exists +$s = file_get_contents($db_filename); +echo "$s\n"; + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +int(14) + +Notice: dba_open(): %stest0.dbm: unexpected file type or format in %sdba_db4_003.php on line %d + +Warning: dba_open(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_003.php on line %d +Error creating %stest0.dbm +Dummy contents diff --git a/ext/dba/tests/dba_db4_004.phpt b/ext/dba/tests/dba_db4_004.phpt new file mode 100644 index 000000000..ca876f82d --- /dev/null +++ b/ext/dba/tests/dba_db4_004.phpt @@ -0,0 +1,40 @@ +--TEST-- +DBA DB4 Truncate Existing File open("n") +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +var_dump(file_put_contents($db_filename, "Dummy contents")); + +if (($db_file = dba_open($db_filename, "n", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +int(14) +database file created +This is a test insert diff --git a/ext/dba/tests/dba_db4_005.phpt b/ext/dba/tests/dba_db4_005.phpt new file mode 100644 index 000000000..54bb475e9 --- /dev/null +++ b/ext/dba/tests/dba_db4_005.phpt @@ -0,0 +1,32 @@ +--TEST-- +DBA DB4 New File Creation popen("c") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { + echo "database file created\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +This is a test insert diff --git a/ext/dba/tests/dba_db4_006.phpt b/ext/dba/tests/dba_db4_006.phpt new file mode 100644 index 000000000..7d95385fe --- /dev/null +++ b/ext/dba/tests/dba_db4_006.phpt @@ -0,0 +1,32 @@ +--TEST-- +DBA DB4 New File Creation popen("n") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { + echo "database file created\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +This is a test insert diff --git a/ext/dba/tests/dba_db4_007.phpt b/ext/dba/tests/dba_db4_007.phpt new file mode 100644 index 000000000..bd95e0bec --- /dev/null +++ b/ext/dba/tests/dba_db4_007.phpt @@ -0,0 +1,41 @@ +--TEST-- +DBA DB4 File Creation popen("c") with existing invalid file +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +var_dump(file_put_contents($db_filename, "Dummy contents")); + +if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +int(14) + +Notice: dba_popen(): %stest0.dbm: unexpected file type or format in %sdba_db4_007.php on line %d + +Warning: dba_popen(%stest0.dbm,c): Driver initialization failed for handler: db4: Invalid argument in %sdba_db4_007.php on line %d +Error creating %stest0.dbm diff --git a/ext/dba/tests/dba_db4_008.phpt b/ext/dba/tests/dba_db4_008.phpt new file mode 100644 index 000000000..80f62eab5 --- /dev/null +++ b/ext/dba/tests/dba_db4_008.phpt @@ -0,0 +1,40 @@ +--TEST-- +DBA DB4 Truncate Existing File popen("n") +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +var_dump(file_put_contents($db_filename, "Dummy contents")); + +if (($db_file = dba_popen($db_filename, "n", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +int(14) +database file created +This is a test insert diff --git a/ext/dba/tests/dba_db4_009.phpt b/ext/dba/tests/dba_db4_009.phpt new file mode 100644 index 000000000..5a870c90e --- /dev/null +++ b/ext/dba/tests/dba_db4_009.phpt @@ -0,0 +1,53 @@ +--TEST-- +DBA DB4 Multiple File Creation Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +$db_file1 = $db_filename1 = dirname(__FILE__).'/test1.dbm'; +$db_file2 = $db_filename2 = dirname(__FILE__).'/test2.dbm'; +if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { + echo "database file created\n"; +} else { + echo "$db_file does not exist\n"; +} +if (($db_file1=dba_open($db_file1, "n", $handler))!==FALSE) { + echo "database file created\n"; +} else { + echo "$db_file does not exist\n"; +} +if (($db_file2=dba_open($db_file2, "n", $handler))!==FALSE) { + echo "database file created\n"; +} else { + echo "$db_file does not exist\n"; +} +var_dump(dba_list()); +dba_close($db_file); + +@unlink($db_filename1); +@unlink($db_filename2); +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +database file created +database file created +array(3) { + [%d]=> + string(%d) "%stest0.dbm" + [%d]=> + string(%d) "%stest1.dbm" + [%d]=> + string(%d) "%stest2.dbm" +} diff --git a/ext/dba/tests/dba_db4_010.phpt b/ext/dba/tests/dba_db4_010.phpt new file mode 100644 index 000000000..fb31f0583 --- /dev/null +++ b/ext/dba/tests/dba_db4_010.phpt @@ -0,0 +1,38 @@ +--TEST-- +DBA DB4 magic_quotes_runtime Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_file, "n", $handler))!==FALSE) { + ini_set('magic_quotes_runtime', 0); + dba_insert("key1", '"', $db_file); + var_dump(dba_fetch("key1", $db_file)); + ini_set('magic_quotes_runtime', 1); + var_dump(dba_fetch("key1", $db_file)); + dba_replace("key1", '\"', $db_file); + var_dump(dba_fetch("key1", $db_file)); + ini_set('magic_quotes_runtime', 0); + var_dump(dba_fetch("key1", $db_file)); + dba_close($db_file); +} else { + echo "Error creating database\n"; +} +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +string(1) """ +string(2) "\"" +string(2) "\"" +string(1) """ diff --git a/ext/dba/tests/dba_db4_011.phpt b/ext/dba/tests/dba_db4_011.phpt new file mode 100644 index 000000000..ce9be2770 --- /dev/null +++ b/ext/dba/tests/dba_db4_011.phpt @@ -0,0 +1,36 @@ +--TEST-- +DBA DB4 with repeated key +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_filename, "c", $handler))!==FALSE) { + var_dump(dba_insert("key1", "Content String 1", $db_file)); + var_dump(dba_insert("key2", "Content String 2", $db_file)); + var_dump(dba_insert("key2", "Same key", $db_file)); + echo dba_fetch("key1", $db_file), "\n"; + echo dba_fetch("key2", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating database\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +bool(true) +bool(true) +bool(false) +Content String 1 +Content String 2 diff --git a/ext/dba/tests/dba_db4_012.phpt b/ext/dba/tests/dba_db4_012.phpt new file mode 100644 index 000000000..2caa43c84 --- /dev/null +++ b/ext/dba/tests/dba_db4_012.phpt @@ -0,0 +1,31 @@ +--TEST-- +DBA DB4 New File Creation open("rl") +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file = dba_open($db_filename, "rl", $handler)) !== FALSE) { + echo "database file created\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 + +Warning: dba_open(%stest0.dbm,rl): Driver initialization failed for handler: db4: No such file or directory in %sdba_db4_012.php on line %d +Error creating %stest0.dbm diff --git a/ext/dba/tests/dba_db4_013.phpt b/ext/dba/tests/dba_db4_013.phpt new file mode 100644 index 000000000..ba2d171dc --- /dev/null +++ b/ext/dba/tests/dba_db4_013.phpt @@ -0,0 +1,40 @@ +--TEST-- +DBA DB4 File open("rl") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { + echo "database file created\n"; + dba_close($db_file); +} + +if (($db_file = dba_popen($db_filename, "rl", $handler)) !== FALSE) { + echo "database file opened\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +database file opened + +Warning: dba_insert(): You cannot perform a modification to a database without proper access in %sdba_db4_013.php on line %d diff --git a/ext/dba/tests/dba_db4_014.phpt b/ext/dba/tests/dba_db4_014.phpt new file mode 100644 index 000000000..6fb22f87b --- /dev/null +++ b/ext/dba/tests/dba_db4_014.phpt @@ -0,0 +1,32 @@ +--TEST-- +DBA DB4 File open("wl") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file = dba_open($db_filename, "wl", $handler)) !== FALSE) { + echo "database file opened\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 + +Warning: dba_open(%stest0.dbm,wl): Driver initialization failed for handler: db4: No such file or directory in %sdba_db4_014.php on line %d +Error creating %stest0.dbm diff --git a/ext/dba/tests/dba_db4_015.phpt b/ext/dba/tests/dba_db4_015.phpt new file mode 100644 index 000000000..a1535675b --- /dev/null +++ b/ext/dba/tests/dba_db4_015.phpt @@ -0,0 +1,39 @@ +--TEST-- +DBA DB4 File open("wl") & Insert Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { + echo "database file created\n"; + dba_close($db_file); +} + +if (($db_file = dba_popen($db_filename, "wl", $handler)) !== FALSE) { + echo "database file opened\n"; + dba_insert("key1", "This is a test insert", $db_file); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +database file opened +This is a test insert diff --git a/ext/dba/tests/dba_db4_016.phpt b/ext/dba/tests/dba_db4_016.phpt new file mode 100644 index 000000000..b79cc71f8 --- /dev/null +++ b/ext/dba/tests/dba_db4_016.phpt @@ -0,0 +1,59 @@ +--TEST-- +DBA DB4 File Creation popen("c") with existing valid file +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + var_dump(dba_insert("key1", "This is a test insert", $db_file)); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +// Now test reopening it +if (($db_file = dba_popen($db_filename, "c", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + var_dump(dba_insert("key1", "second open test", $db_file)); + var_dump(dba_insert("key2", "second open test row 2", $db_file)); + echo dba_fetch("key1", $db_file), "\n"; + echo dba_fetch("key2", $db_file), "\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +bool(true) +This is a test insert +database file created +bool(false) +bool(true) +This is a test insert +second open test row 2 diff --git a/ext/dba/tests/dba_db4_017.phpt b/ext/dba/tests/dba_db4_017.phpt new file mode 100644 index 000000000..12bf3df86 --- /dev/null +++ b/ext/dba/tests/dba_db4_017.phpt @@ -0,0 +1,37 @@ +--TEST-- +DBA DB4 file creation dba_open("cd") +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +if (($db_file = dba_open($db_filename, "cd", $handler)) !== FALSE) { + if (file_exists($db_filename)) { + echo "database file created\n"; + var_dump(dba_insert("key1", "This is a test insert", $db_file)); + echo dba_fetch("key1", $db_file), "\n"; + dba_close($db_file); + } else { + echo "File did not get created\n"; + } +} else { + echo "Error creating $db_filename\n"; +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +database file created +bool(true) +This is a test insert diff --git a/ext/dba/tests/dba_db4_018.phpt b/ext/dba/tests/dba_db4_018.phpt new file mode 100644 index 000000000..ecd1980e4 --- /dev/null +++ b/ext/dba/tests/dba_db4_018.phpt @@ -0,0 +1,76 @@ +--TEST-- +DBA DB4 with persistent connections +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php + +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +echo "Test 1\n"; +$db_file1 = dba_popen($db_filename, 'n', 'flatfile'); +dba_insert("key1", "This is a test insert 1", $db_file1); +echo dba_fetch("key1", $db_file1), "\n"; + + +echo "Test 2\n"; +$db_file2 = dba_popen($db_filename, 'n', 'flatfile'); +if ($db_file1 === $db_file2) { + echo "resources are the same\n"; +} else { + echo "resources are different\n"; +} + + +echo "Test 3 - fetch both rows from second resource\n"; +dba_insert("key2", "This is a test insert 2", $db_file2); +echo dba_fetch("key1", $db_file2), "\n"; +echo dba_fetch("key2", $db_file2), "\n"; + + +echo "Test 4 - fetch both rows from first resource\n"; +echo dba_fetch("key1", $db_file1), "\n"; +echo dba_fetch("key2", $db_file1), "\n"; + +echo "Test 5 - close 2nd resource\n"; +dba_close($db_file2); +var_dump($db_file1); +var_dump($db_file2); + +echo "Test 6 - query after closing 2nd resource\n"; +echo dba_fetch("key1", $db_file1), "\n"; +echo dba_fetch("key2", $db_file1), "\n"; + +?> +===DONE=== +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> +--XFAIL-- +Test 6 crashes with dba pointer of NULL, bug http://bugs.php.net/bug.php?id=51278 +--EXPECTF-- +database handler: db4 +Test 1 +This is a test insert 1 +Test 2 +resources are different +Test 3 - fetch both rows from second resource +This is a test insert 1 +This is a test insert 2 +Test 4 - fetch both rows from first resource +This is a test insert 1 +This is a test insert 2 +Test 5 - close 2nd resource +resource(%d) of type (dba persistent) +resource(%d) of type (Unknown) +Test 6 - query after closing 2nd resource +This is a test insert 1 +This is a test insert 2 +===DONE=== diff --git a/ext/dba/tests/dba_db4_handlers.phpt b/ext/dba/tests/dba_db4_handlers.phpt new file mode 100644 index 000000000..d238f431a --- /dev/null +++ b/ext/dba/tests/dba_db4_handlers.phpt @@ -0,0 +1,50 @@ +--TEST-- +DBA DB4 Handler Test +--SKIPIF-- +<?php +$handler="db4"; +require(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler="db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +function check($h) +{ + if (!$h) { + return; + } + + foreach ($h as $key) { + if ($key === "db4") { + echo "Success: db4 enabled\n"; + } + } +} + +echo "Test 1\n"; + +check(dba_handlers()); + +echo "Test 2 - full info\n"; +$h = dba_handlers(1); +foreach ($h as $key => $val) { + if ($key === "db4") { + echo "$val\n"; + } +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTREGEX-- +database handler: db4 +Test 1 +Success: db4 enabled +Test 2 - full info +.*Berkeley DB (4|5).* diff --git a/ext/dba/tests/dba_db4_optimize.phpt b/ext/dba/tests/dba_db4_optimize.phpt new file mode 100644 index 000000000..de27dd8df --- /dev/null +++ b/ext/dba/tests/dba_db4_optimize.phpt @@ -0,0 +1,38 @@ +--TEST-- +DBA DB4 Optimize Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { + dba_insert("key1", "Content String 1", $db_file); + dba_insert("key2", "Content String 2", $db_file); + for ($i=1; $i<3; $i++) { + echo dba_exists("key$i", $db_file) ? "Y" : "N"; + } + echo "\n"; + var_dump(dba_optimize($db_file)); + dba_close($db_file); +} else { + echo "Error creating database\n"; +} + +?> +===DONE=== +<?php exit(0); ?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +YY +bool(true) +===DONE=== diff --git a/ext/dba/tests/dba_db4_sync.phpt b/ext/dba/tests/dba_db4_sync.phpt new file mode 100644 index 000000000..8c4e248bc --- /dev/null +++ b/ext/dba/tests/dba_db4_sync.phpt @@ -0,0 +1,38 @@ +--TEST-- +DBA DB4 Sync Test +--SKIPIF-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler = "db4"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { + dba_insert("key1", "Content String 1", $db_file); + dba_insert("key2", "Content String 2", $db_file); + for ($i=1; $i<3; $i++) { + echo dba_exists("key$i", $db_file) ? "Y" : "N"; + } + echo "\n"; + var_dump(dba_sync($db_file)); + dba_close($db_file); +} else { + echo "Error creating database\n"; +} + +?> +===DONE=== +<?php exit(0); ?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: db4 +YY +bool(true) +===DONE=== diff --git a/ext/dba/tests/dba_flatfile.phpt b/ext/dba/tests/dba_flatfile.phpt index a85472bbe..8e1ca6a93 100644 --- a/ext/dba/tests/dba_flatfile.phpt +++ b/ext/dba/tests/dba_flatfile.phpt @@ -3,15 +3,19 @@ DBA FlatFile handler test --SKIPIF-- <?php $handler = 'flatfile'; - require_once dirname(__FILE__) .'/skipif.inc'; + require_once(dirname(__FILE__) .'/skipif.inc'); ?> --FILE-- <?php $handler = 'flatfile'; - require_once dirname(__FILE__) .'/test.inc'; - require_once dirname(__FILE__) .'/dba_handler.inc'; + require_once(dirname(__FILE__) .'/test.inc'); + require_once(dirname(__FILE__) .'/dba_handler.inc'); ?> ===DONE=== +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> --EXPECT-- database handler: flatfile 3NYNYY diff --git a/ext/dba/tests/dba_handlers.phpt b/ext/dba/tests/dba_handlers.phpt new file mode 100644 index 000000000..9f66a79f2 --- /dev/null +++ b/ext/dba/tests/dba_handlers.phpt @@ -0,0 +1,69 @@ +--TEST-- +DBA Handler Test +--SKIPIF-- +<?php +$handler="flatfile"; +require(dirname(__FILE__) .'/skipif.inc'); +die("info $HND handler used"); +?> +--FILE-- +<?php +$handler="flatfile"; +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; + +function check($h) +{ + if (!$h) { + return; + } + + foreach ($h as $key) { + if ($key === "flatfile") { + echo "Success: flatfile enabled\n"; + } + } +} + +echo "Test 1\n"; + +check(dba_handlers()); + +echo "Test 2\n"; + +check(dba_handlers(null)); + +echo "Test 3\n"; + +check(dba_handlers(1, 2)); + +echo "Test 4\n"; + +check(dba_handlers(0)); + +echo "Test 5 - full info\n"; +$h = dba_handlers(1); +foreach ($h as $key => $val) { + if ($key === "flatfile") { + echo "Success: flatfile enabled\n"; + } +} + +?> +--CLEAN-- +<?php +require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: flatfile +Test 1 +Success: flatfile enabled +Test 2 +Success: flatfile enabled +Test 3 + +Warning: dba_handlers() expects at most 1 parameter, 2 given in %sdba_handlers.php on line %d +Test 4 +Success: flatfile enabled +Test 5 - full info +Success: flatfile enabled diff --git a/ext/dba/tests/dba_optimize.phpt b/ext/dba/tests/dba_optimize.phpt new file mode 100644 index 000000000..794d7e8f7 --- /dev/null +++ b/ext/dba/tests/dba_optimize.phpt @@ -0,0 +1,51 @@ +--TEST-- +DBA Optimize Test +--SKIPIF-- +<?php + require_once dirname(__FILE__) .'/skipif.inc'; + die("info $HND handler used"); +?> +--FILE-- +<?php +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { + dba_insert("key1", "Content String 1", $db_file); + dba_insert("key2", "Content String 2", $db_file); + $a = dba_firstkey($db_file); + $i=0; + while($a) { + $a = dba_nextkey($db_file); + $i++; + } + echo $i; + for ($i=1; $i<3; $i++) { + echo dba_exists("key$i", $db_file) ? "Y" : "N"; + } + echo "\n"; + var_dump(dba_optimize()); + var_dump(dba_optimize("")); + var_dump(dba_optimize($db_file)); + dba_close($db_file); +} else { + echo "Error creating database\n"; +} + +?> +===DONE=== +<?php exit(0); ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: flatfile +2YY + +Warning: dba_optimize() expects exactly 1 parameter, 0 given in %sdba_optimize.php on line %d +NULL + +Warning: dba_optimize() expects parameter 1 to be resource, string given in %sdba_optimize.php on line %d +NULL +bool(true) +===DONE=== diff --git a/ext/dba/tests/dba_split.phpt b/ext/dba/tests/dba_split.phpt new file mode 100644 index 000000000..0989f09fe --- /dev/null +++ b/ext/dba/tests/dba_split.phpt @@ -0,0 +1,83 @@ +--TEST-- +DBA Split Test +--SKIPIF-- +<?php + require_once dirname(__FILE__) .'/skipif.inc'; + die("info $HND handler used"); +?> +--FILE-- +<?php +var_dump(dba_key_split("key1", "name")); +var_dump(dba_key_split(1)); +var_dump(dba_key_split(null)); +var_dump(dba_key_split("")); +var_dump(dba_key_split("name1")); +var_dump(dba_key_split("[key1")); +var_dump(dba_key_split("[key1]")); +var_dump(dba_key_split("key1]")); +var_dump(dba_key_split("[key1]name1")); +var_dump(dba_key_split("[key1]name1[key2]name2")); +var_dump(dba_key_split("[key1]name1")); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Warning: Wrong parameter count for dba_key_split() in %sdba_split.php on line %d +NULL +array(2) { + [0]=> + string(0) "" + [1]=> + string(1) "1" +} +bool(false) +array(2) { + [0]=> + string(0) "" + [1]=> + string(0) "" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(5) "name1" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(5) "[key1" +} +array(2) { + [0]=> + string(4) "key1" + [1]=> + string(0) "" +} +array(2) { + [0]=> + string(0) "" + [1]=> + string(5) "key1]" +} +array(2) { + [0]=> + string(4) "key1" + [1]=> + string(5) "name1" +} +array(2) { + [0]=> + string(4) "key1" + [1]=> + string(16) "name1[key2]name2" +} +array(2) { + [0]=> + string(4) "key1" + [1]=> + string(5) "name1" +} +===DONE=== diff --git a/ext/dba/tests/dba_sync.phpt b/ext/dba/tests/dba_sync.phpt new file mode 100644 index 000000000..e0906eeee --- /dev/null +++ b/ext/dba/tests/dba_sync.phpt @@ -0,0 +1,51 @@ +--TEST-- +DBA Sync Test +--SKIPIF-- +<?php + require_once dirname(__FILE__) .'/skipif.inc'; + die("info $HND handler used"); +?> +--FILE-- +<?php +require_once(dirname(__FILE__) .'/test.inc'); +echo "database handler: $handler\n"; +if (($db_file=dba_open($db_filename, "n", $handler))!==FALSE) { + dba_insert("key1", "Content String 1", $db_file); + dba_insert("key2", "Content String 2", $db_file); + $a = dba_firstkey($db_file); + $i=0; + while($a) { + $a = dba_nextkey($db_file); + $i++; + } + echo $i; + for ($i=1; $i<3; $i++) { + echo dba_exists("key$i", $db_file) ? "Y" : "N"; + } + echo "\n"; + var_dump(dba_sync()); + var_dump(dba_sync("")); + var_dump(dba_sync($db_file)); + dba_close($db_file); +} else { + echo "Error creating database\n"; +} + +?> +===DONE=== +<?php exit(0); ?> +--CLEAN-- +<?php + require(dirname(__FILE__) .'/clean.inc'); +?> +--EXPECTF-- +database handler: flatfile +2YY + +Warning: dba_sync() expects exactly 1 parameter, 0 given in %sdba_sync.php on line %d +NULL + +Warning: dba_sync() expects parameter 1 to be resource, string given in %sdba_sync.php on line %d +NULL +bool(true) +===DONE=== diff --git a/ext/dom/document.c b/ext/dom/document.c index 4728e66b1..4ecb8fb90 100644 --- a/ext/dom/document.c +++ b/ext/dom/document.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: document.c 294436 2010-02-03 18:41:27Z pajoye $ */ +/* $Id: document.c 297374 2010-04-02 20:08:15Z rrichards $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2252,6 +2252,7 @@ PHP_FUNCTION(dom_document_save_html_file) dom_object *intern; dom_doc_propsptr doc_props; char *file; + const char *encoding; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &id, dom_document_class_entry, &file, &file_len) == FAILURE) { return; @@ -2264,11 +2265,12 @@ PHP_FUNCTION(dom_document_save_html_file) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); - /* encoding handled by property on doc */ + + encoding = (const char *) htmlGetMetaEncoding(docp); doc_props = dom_get_doc_props(intern->document); format = doc_props->formatoutput; - bytes = htmlSaveFileFormat(file, docp, NULL, format); + bytes = htmlSaveFileFormat(file, docp, encoding, format); if (bytes == -1) { RETURN_FALSE; @@ -2286,7 +2288,8 @@ PHP_FUNCTION(dom_document_save_html) xmlDoc *docp; dom_object *intern; xmlChar *mem; - int size; + int size, format; + dom_doc_propsptr doc_props; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &id, dom_document_class_entry) == FAILURE) { return; @@ -2294,7 +2297,13 @@ PHP_FUNCTION(dom_document_save_html) DOM_GET_OBJ(docp, id, xmlDocPtr, intern); +#if LIBXML_VERSION >= 20623 + doc_props = dom_get_doc_props(intern->document); + format = doc_props->formatoutput; + htmlDocDumpMemoryFormat(docp, &mem, &size, format); +#else htmlDocDumpMemory(docp, &mem, &size); +#endif if (!size) { if (mem) xmlFree(mem); diff --git a/ext/dom/element.c b/ext/dom/element.c index d0b7cd488..8e457f708 100644 --- a/ext/dom/element.c +++ b/ext/dom/element.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: element.c 294446 2010-02-03 20:04:38Z pajoye $ */ +/* $Id: element.c 293597 2010-01-15 21:29:56Z rrichards $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/dom/node.c b/ext/dom/node.c index dc6309af0..a89026abb 100644 --- a/ext/dom/node.c +++ b/ext/dom/node.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: node.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: node.c 298841 2010-05-01 18:30:38Z geissert $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1871,7 +1871,7 @@ static void dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{ inclusive_ns_prefixes[nscount] = NULL; } else { php_error_docref(NULL TSRMLS_CC, E_NOTICE, - "Inclusive namespace prefixes only allowed in exlcusive mode."); + "Inclusive namespace prefixes only allowed in exclusive mode."); } } diff --git a/ext/dom/php_dom.c b/ext/dom/php_dom.c index 73c711046..da73a7f63 100644 --- a/ext/dom/php_dom.c +++ b/ext/dom/php_dom.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dom.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_dom.c 298967 2010-05-04 12:55:26Z rrichards $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -29,6 +29,7 @@ #include "ext/standard/php_rand.h" #include "php_dom.h" #include "dom_properties.h" +#include "zend_interfaces.h" #include "ext/standard/info.h" #define PHP_XPATH 1 @@ -680,6 +681,7 @@ PHP_MINIT_FUNCTION(dom) ce.create_object = dom_nnodemap_objects_new; dom_nodelist_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); dom_nodelist_class_entry->get_iterator = php_dom_get_iterator; + zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, zend_ce_traversable); zend_hash_init(&dom_nodelist_prop_handlers, 0, NULL, NULL, 1); dom_register_prop_handler(&dom_nodelist_prop_handlers, "length", dom_nodelist_length_read, NULL TSRMLS_CC); @@ -689,6 +691,7 @@ PHP_MINIT_FUNCTION(dom) ce.create_object = dom_nnodemap_objects_new; dom_namednodemap_class_entry = zend_register_internal_class_ex(&ce, NULL, NULL TSRMLS_CC); dom_namednodemap_class_entry->get_iterator = php_dom_get_iterator; + zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, zend_ce_traversable); zend_hash_init(&dom_namednodemap_prop_handlers, 0, NULL, NULL, 1); dom_register_prop_handler(&dom_namednodemap_prop_handlers, "length", dom_namednodemap_length_read, NULL TSRMLS_CC); @@ -777,15 +780,12 @@ PHP_MINIT_FUNCTION(dom) zend_hash_merge(&dom_documenttype_prop_handlers, &dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0); zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_documenttype_prop_handlers, sizeof(dom_documenttype_prop_handlers), NULL); - REGISTER_DOM_CLASS(ce, "DOMNotation", NULL, php_dom_notation_class_functions, dom_notation_class_entry); + REGISTER_DOM_CLASS(ce, "DOMNotation", dom_node_class_entry, php_dom_notation_class_functions, dom_notation_class_entry); zend_hash_init(&dom_notation_prop_handlers, 0, NULL, NULL, 1); dom_register_prop_handler(&dom_notation_prop_handlers, "publicId", dom_notation_public_id_read, NULL TSRMLS_CC); dom_register_prop_handler(&dom_notation_prop_handlers, "systemId", dom_notation_system_id_read, NULL TSRMLS_CC); - /* Notation nodes are special */ - dom_register_prop_handler(&dom_notation_prop_handlers, "nodeName", dom_node_node_name_read, NULL TSRMLS_CC); - dom_register_prop_handler(&dom_notation_prop_handlers, "nodeValue", dom_node_node_value_read, dom_node_node_value_write TSRMLS_CC); - dom_register_prop_handler(&dom_notation_prop_handlers, "attributes", dom_node_attributes_read, NULL TSRMLS_CC); + zend_hash_merge(&dom_notation_prop_handlers, &dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0); zend_hash_add(&classes, ce.name, ce.name_length + 1, &dom_notation_prop_handlers, sizeof(dom_notation_prop_handlers), NULL); REGISTER_DOM_CLASS(ce, "DOMEntity", dom_node_class_entry, php_dom_entity_class_functions, dom_entity_class_entry); diff --git a/ext/dom/tests/bug35673.phpt b/ext/dom/tests/bug35673.phpt new file mode 100644 index 000000000..a29ae96b6 --- /dev/null +++ b/ext/dom/tests/bug35673.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #35673 (formatOutput does not work with saveHTML). +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$html = '<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>This is the title</title></head></html>'; + +$htmldoc = new DOMDocument(); +$htmldoc->loadHTML($html); +$htmldoc->formatOutput = true; +echo $htmldoc->saveHTML(); +?> +--EXPECT-- +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> +<html><head> +<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> +<title>This is the title</title> +</head></html> diff --git a/ext/dom/tests/bug49490.phpt b/ext/dom/tests/bug49490.phpt new file mode 100644 index 000000000..897cfee2c --- /dev/null +++ b/ext/dom/tests/bug49490.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #49490 (XPath namespace prefix conflict). +--SKIPIF-- +<?php require_once('skipif.inc'); ?> +--FILE-- +<?php +$doc = new DOMDocument(); +$doc->loadXML('<prefix:root xmlns:prefix="urn:a" />'); + +$xp = new DOMXPath($doc); +$xp->registerNamespace('prefix', 'urn:b'); + +echo($xp->query('//prefix:root', null, false)->length . "\n"); + +?> +--EXPECT-- +0 diff --git a/ext/dom/xpath.c b/ext/dom/xpath.c index 209b213dc..d6c3487c2 100644 --- a/ext/dom/xpath.c +++ b/ext/dom/xpath.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xpath.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: xpath.c 298974 2010-05-04 15:41:49Z rrichards $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -48,12 +48,14 @@ ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_query, 0, 0, 1) ZEND_ARG_INFO(0, expr) - ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0) + ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1) + ZEND_ARG_INFO(0, registerNodeNS) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_evaluate, 0, 0, 1) ZEND_ARG_INFO(0, expr) - ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0) + ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1) + ZEND_ARG_INFO(0, registerNodeNS) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_register_php_functions, 0, 0, 0) @@ -385,9 +387,10 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ dom_object *nodeobj; char *expr; xmlDoc *docp = NULL; - xmlNsPtr *ns; + xmlNsPtr *ns = NULL; + zend_bool register_node_ns = 1; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|O", &id, dom_xpath_class_entry, &expr, &expr_len, &context, dom_node_class_entry) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|O!b", &id, dom_xpath_class_entry, &expr, &expr_len, &context, dom_node_class_entry, ®ister_node_ns) == FAILURE) { return; } @@ -420,13 +423,15 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ ctxp->node = nodep; - /* Register namespaces in the node */ - ns = xmlGetNsList(docp, nodep); + if (register_node_ns) { + /* Register namespaces in the node */ + ns = xmlGetNsList(docp, nodep); - if (ns != NULL) { - while (ns[nsnbr] != NULL) - nsnbr++; - } + if (ns != NULL) { + while (ns[nsnbr] != NULL) + nsnbr++; + } + } ctxp->namespaces = ns; @@ -518,14 +523,14 @@ static void php_xpath_eval(INTERNAL_FUNCTION_PARAMETERS, int type) /* {{{ */ } /* }}} */ -/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context]); */ +/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context [, boolean registerNodeNS]]); */ PHP_FUNCTION(dom_xpath_query) { php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_QUERY); } /* }}} end dom_xpath_query */ -/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context]); */ +/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context [, boolean registerNodeNS]]); */ PHP_FUNCTION(dom_xpath_evaluate) { php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_EVALUATE); diff --git a/ext/enchant/enchant.c b/ext/enchant/enchant.c index 87c16e297..2fd93e005 100755 --- a/ext/enchant/enchant.c +++ b/ext/enchant/enchant.c @@ -16,7 +16,7 @@ | Ilia Alshanetsky <ilia@prohost.org> | +----------------------------------------------------------------------+ - $Id: enchant.c 293036 2010-01-03 09:23:27Z sebastian $ + $Id: enchant.c 298870 2010-05-02 05:01:51Z geissert $ */ #ifdef HAVE_CONFIG_H @@ -327,7 +327,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: 293036 $"); + php_info_print_table_row(2, "Revision", "$Revision: 298870 $"); php_info_print_table_end(); php_info_print_table_start(); @@ -587,7 +587,11 @@ PHP_FUNCTION(enchant_broker_request_pwl_dict) RETURN_FALSE; } +#if PHP_API_VERSION < 20100412 if ((PG(safe_mode) && (!php_checkuid(pwl, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(pwl TSRMLS_CC)) { +#else + if (php_check_open_basedir(pwl TSRMLS_CC)) { +#endif RETURN_FALSE; } @@ -724,6 +728,7 @@ PHP_FUNCTION(enchant_dict_quick_check) if (enchant_dict_check(pdict->pdict, word, wordlen) > 0) { int n_sugg; + size_t n_sugg_st; char **suggs; if (!sugg && ZEND_NUM_ARGS() == 2) { @@ -732,7 +737,8 @@ PHP_FUNCTION(enchant_dict_quick_check) array_init(sugg); - suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, (size_t *) &n_sugg); + suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st); + memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg)); if (suggs && n_sugg) { int i; for (i = 0; i < n_sugg; i++) { @@ -777,6 +783,7 @@ PHP_FUNCTION(enchant_dict_suggest) char **suggs; enchant_dict *pdict; int n_sugg; + size_t n_sugg_st; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs", &dict, &word, &wordlen) == FAILURE) { RETURN_FALSE; @@ -784,7 +791,8 @@ PHP_FUNCTION(enchant_dict_suggest) PHP_ENCHANT_GET_DICT; - suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, (size_t *)&n_sugg); + suggs = enchant_dict_suggest(pdict->pdict, word, wordlen, &n_sugg_st); + memcpy(&n_sugg, &n_sugg_st, sizeof(n_sugg)); if (suggs && n_sugg) { int i; diff --git a/ext/enchant/tests/dict_quick_check.phpt b/ext/enchant/tests/dict_quick_check.phpt new file mode 100644 index 000000000..3412de1b7 --- /dev/null +++ b/ext/enchant/tests/dict_quick_check.phpt @@ -0,0 +1,26 @@ +--TEST-- +enchant_dict_quick_check() basic test +--SKIPIF-- +<?php +if(!extension_loaded('enchant')) die('skip, enchant not loader'); + +$tag = 'en_US'; +$r = enchant_broker_init(); +if (!enchant_broker_dict_exists($r, $tag)) + die('skip, no dictionary for ' . $tag . ' tag'); +?> +--FILE-- +<?php + +$tag = 'en_US'; +$r = enchant_broker_init(); + +$d = enchant_broker_request_dict($r, $tag); +enchant_dict_quick_check($d, 'soong', $suggs); + +echo "Elements: " . count($suggs) . "\n"; +echo "Done\n"; +?> +--EXPECTF-- +Elements: %d +Done diff --git a/ext/fileinfo/fileinfo.c b/ext/fileinfo/fileinfo.c index df096ec08..d755b4494 100644 --- a/ext/fileinfo/fileinfo.c +++ b/ext/fileinfo/fileinfo.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fileinfo.c 287125 2009-08-11 23:05:13Z scottmac $ */ +/* $Id: fileinfo.c 298947 2010-05-04 08:48:58Z pajoye $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -167,7 +167,7 @@ ZEND_END_ARG_INFO() /* {{{ finfo_class_functions */ -function_entry finfo_class_functions[] = { +zend_function_entry finfo_class_functions[] = { ZEND_ME_MAPPING(finfo, finfo_open, arginfo_finfo_open, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(set_flags, finfo_set_flags,arginfo_finfo_method_set_flags, ZEND_ACC_PUBLIC) ZEND_ME_MAPPING(file, finfo_file, arginfo_finfo_method_file, ZEND_ACC_PUBLIC) @@ -201,7 +201,7 @@ void finfo_resource_destructor(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ */ /* {{{ fileinfo_functions[] */ -function_entry fileinfo_functions[] = { +zend_function_entry fileinfo_functions[] = { PHP_FE(finfo_open, arginfo_finfo_open) PHP_FE(finfo_close, arginfo_finfo_close) PHP_FE(finfo_set_flags, arginfo_finfo_set_flags) @@ -291,13 +291,19 @@ PHP_FUNCTION(finfo_open) RETURN_FALSE; } - if (file && *file) { /* user specified file, perform open_basedir checks */ + if (file_len == 0) { + file = NULL; + } else if (file && *file) { /* user specified file, perform open_basedir checks */ if (!VCWD_REALPATH(file, resolved_path)) { RETURN_FALSE; } file = resolved_path; +#if PHP_API_VERSION < 20100412 if ((PG(safe_mode) && (!php_checkuid(file, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(file TSRMLS_CC)) { +#else + if (php_check_open_basedir(file TSRMLS_CC)) { +#endif RETURN_FALSE; } } @@ -492,8 +498,11 @@ static void _php_finfo_get_type(INTERNAL_FUNCTION_PARAMETERS, int mode, int mime if (wrap) { php_stream_context *context = php_stream_context_from_zval(zcontext, 0); - +#if PHP_API_VERSION < 20100412 php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, context); +#else + php_stream *stream = php_stream_open_wrapper_ex(buffer, "rb", REPORT_ERRORS, NULL, context); +#endif if (!stream) { RETVAL_FALSE; diff --git a/ext/fileinfo/libmagic.patch b/ext/fileinfo/libmagic.patch index dc8e03fd1..276bb011c 100644 --- a/ext/fileinfo/libmagic.patch +++ b/ext/fileinfo/libmagic.patch @@ -257,7 +257,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c + + TSRMLS_FETCH(); + -+#if (PHP_MAJOR_VERSION < 6) ++#if PHP_API_VERSION < 20100412 + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); +#else + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL); @@ -490,7 +490,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c goto error2; - if ((fd = open(dbname, O_RDONLY|O_BINARY)) == -1) -+#if (PHP_MAJOR_VERSION < 6) ++#if PHP_API_VERSION < 20100412 + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); +#else + stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL); @@ -647,7 +647,7 @@ diff -u libmagic.orig/apprentice.c libmagic/apprentice.c - if ((fd = open(dbname, O_WRONLY|O_CREAT|O_TRUNC|O_BINARY, 0644)) == -1) { +/* wb+ == O_WRONLY|O_CREAT|O_TRUNC|O_BINARY */ -+#if (PHP_MAJOR_VERSION < 6) ++#if PHP_API_VERSION < 20100412 + stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); +#else + stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS, NULL); @@ -799,7 +799,7 @@ diff -u libmagic.orig/cdf.c libmagic/cdf.c break; case CDF_FILETIME: tp = info[i].pi_tp; -+#if defined(PHP_WIN32 ) && _MSC_VER <= 1500 ++#if defined(PHP_WIN32) && _MSC_VER <= 1500 + if (tp < 1000000000000000i64) { +#else if (tp < 1000000000000000LL) { @@ -822,7 +822,7 @@ diff -u libmagic.orig/cdf.h libmagic/cdf.h typedef struct { uint64_t h_magic; -#define CDF_MAGIC 0xE11AB1A1E011CFD0LL -+#if defined(PHP_WIN32 ) && _MSC_VER <= 1500 ++#if defined(PHP_WIN32) && _MSC_VER <= 1500 +# define CDF_MAGIC 0xE11AB1A1E011CFD0i64 +#else +# define CDF_MAGIC 0xE11AB1A1E011CFD0LL @@ -2019,7 +2019,7 @@ diff -u libmagic.orig/magic.c libmagic/magic.c + + if (!stream && inname) { + no_in_stream = 1; -+#if (PHP_MAJOR_VERSION < 6) ++#if PHP_API_VERSION < 20100412 + stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); +#else + stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL); @@ -2392,7 +2392,7 @@ diff -u libmagic.orig/readcdf.c libmagic/readcdf.c case CDF_FILETIME: tp = info[i].pi_tp; if (tp != 0) { -+#if defined(PHP_WIN32 ) && _MSC_VER <= 1500 ++#if defined(PHP_WIN32) && _MSC_VER <= 1500 + if (tp < 1000000000000000i64) { +#else if (tp < 1000000000000000LL) { @@ -2773,7 +2773,7 @@ diff -u libmagic.orig/softmagic.c libmagic/softmagic.c + + convert_libmagic_pattern(pattern, options); + -+#if (PHP_MAJOR_VERSION < 6) ++#if PHP_API_VERSION < 20100412 + 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 +2800,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_MAJOR_VERSION < 6) ++#if PHP_API_VERSION < 20100412 + 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); diff --git a/ext/fileinfo/libmagic/apprentice.c b/ext/fileinfo/libmagic/apprentice.c index ffa2cb529..53fa8d5a1 100644 --- a/ext/fileinfo/libmagic/apprentice.c +++ b/ext/fileinfo/libmagic/apprentice.c @@ -597,7 +597,7 @@ load_1(struct magic_set *ms, int action, const char *fn, int *errs, TSRMLS_FETCH(); -#if (PHP_MAJOR_VERSION < 6) +#if PHP_API_VERSION < 20100412 stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); #else stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL); @@ -2041,7 +2041,7 @@ apprentice_map(struct magic_set *ms, struct magic **magicp, uint32_t *nmagicp, if (dbname == NULL) goto error2; -#if (PHP_MAJOR_VERSION < 6) +#if PHP_API_VERSION < 20100412 stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); #else stream = php_stream_open_wrapper((char *)fn, "rb", REPORT_ERRORS, NULL); @@ -2165,7 +2165,7 @@ apprentice_compile(struct magic_set *ms, struct magic **magicp, } /* wb+ == O_WRONLY|O_CREAT|O_TRUNC|O_BINARY */ -#if (PHP_MAJOR_VERSION < 6) +#if PHP_API_VERSION < 20100412 stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); #else stream = php_stream_open_wrapper((char *)fn, "wb+", REPORT_ERRORS, NULL); diff --git a/ext/fileinfo/libmagic/cdf.c b/ext/fileinfo/libmagic/cdf.c index a3b4a11fc..a3f702208 100644 --- a/ext/fileinfo/libmagic/cdf.c +++ b/ext/fileinfo/libmagic/cdf.c @@ -1131,7 +1131,7 @@ cdf_dump_property_info(const cdf_property_info_t *info, size_t count) break; case CDF_FILETIME: tp = info[i].pi_tp; -#if defined(PHP_WIN32 ) && _MSC_VER <= 1500 +#if defined(PHP_WIN32) && _MSC_VER <= 1500 if (tp < 1000000000000000i64) { #else if (tp < 1000000000000000LL) { diff --git a/ext/fileinfo/libmagic/cdf.h b/ext/fileinfo/libmagic/cdf.h index 1fa69cfeb..c056a8210 100644 --- a/ext/fileinfo/libmagic/cdf.h +++ b/ext/fileinfo/libmagic/cdf.h @@ -42,7 +42,7 @@ typedef int32_t cdf_secid_t; typedef struct { uint64_t h_magic; -#if defined(PHP_WIN32 ) && _MSC_VER <= 1500 +#if defined(PHP_WIN32) && _MSC_VER <= 1500 # define CDF_MAGIC 0xE11AB1A1E011CFD0i64 #else # define CDF_MAGIC 0xE11AB1A1E011CFD0LL diff --git a/ext/fileinfo/libmagic/magic.c b/ext/fileinfo/libmagic/magic.c index 849896bc8..a8bf6d888 100644 --- a/ext/fileinfo/libmagic/magic.c +++ b/ext/fileinfo/libmagic/magic.c @@ -290,7 +290,7 @@ file_or_stream(struct magic_set *ms, const char *inname, php_stream *stream) if (!stream && inname) { no_in_stream = 1; -#if (PHP_MAJOR_VERSION < 6) +#if PHP_API_VERSION < 20100412 stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); #else stream = php_stream_open_wrapper(inname, "rb", REPORT_ERRORS, NULL); diff --git a/ext/fileinfo/libmagic/readcdf.c b/ext/fileinfo/libmagic/readcdf.c index 56d650403..117dc786f 100644 --- a/ext/fileinfo/libmagic/readcdf.c +++ b/ext/fileinfo/libmagic/readcdf.c @@ -110,7 +110,7 @@ cdf_file_property_info(struct magic_set *ms, const cdf_property_info_t *info, case CDF_FILETIME: tp = info[i].pi_tp; if (tp != 0) { -#if defined(PHP_WIN32 ) && _MSC_VER <= 1500 +#if defined(PHP_WIN32) && _MSC_VER <= 1500 if (tp < 1000000000000000i64) { #else if (tp < 1000000000000000LL) { diff --git a/ext/fileinfo/tests/finfo_open_001.phpt b/ext/fileinfo/tests/finfo_open_001.phpt index 0223a381c..69696ebe3 100644 --- a/ext/fileinfo/tests/finfo_open_001.phpt +++ b/ext/fileinfo/tests/finfo_open_001.phpt @@ -16,12 +16,8 @@ var_dump(finfo_open(FILEINFO_MIME, '/foo/bar/inexistent')); --EXPECTF-- Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d bool(false) - -Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d -bool(false) - -Warning: finfo_open(): Failed to load magic database at ''. in %s on line %d -bool(false) +resource(%d) of type (file_info) +resource(%d) of type (file_info) bool(false) bool(false) bool(false) diff --git a/ext/filter/filter.c b/ext/filter/filter.c index 087ca2f98..02373e8d4 100644 --- a/ext/filter/filter.c +++ b/ext/filter/filter.c @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filter.c 294106 2010-01-27 17:22:54Z johannes $ */ +/* $Id: filter.c 298196 2010-04-20 04:31:11Z aharvey $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -52,6 +52,7 @@ static const filter_list_entry filter_list[] = { { "stripped", FILTER_SANITIZE_STRING, php_filter_string }, { "encoded", FILTER_SANITIZE_ENCODED, php_filter_encoded }, { "special_chars", FILTER_SANITIZE_SPECIAL_CHARS, php_filter_special_chars }, + { "full_special_chars", FILTER_SANITIZE_FULL_SPECIAL_CHARS, php_filter_full_special_chars }, { "unsafe_raw", FILTER_UNSAFE_RAW, php_filter_unsafe_raw }, { "email", FILTER_SANITIZE_EMAIL, php_filter_email }, { "url", FILTER_SANITIZE_URL, php_filter_url }, @@ -238,6 +239,7 @@ PHP_MINIT_FUNCTION(filter) REGISTER_LONG_CONSTANT("FILTER_SANITIZE_STRIPPED", FILTER_SANITIZE_STRING, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FILTER_SANITIZE_ENCODED", FILTER_SANITIZE_ENCODED, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FILTER_SANITIZE_SPECIAL_CHARS", FILTER_SANITIZE_SPECIAL_CHARS, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("FILTER_SANITIZE_FULL_SPECIAL_CHARS", FILTER_SANITIZE_SPECIAL_CHARS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FILTER_SANITIZE_EMAIL", FILTER_SANITIZE_EMAIL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FILTER_SANITIZE_URL", FILTER_SANITIZE_URL, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("FILTER_SANITIZE_NUMBER_INT", FILTER_SANITIZE_NUMBER_INT, CONST_CS | CONST_PERSISTENT); @@ -314,7 +316,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: 294106 $"); + php_info_print_table_row( 2, "Revision", "$Revision: 298196 $"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); @@ -778,6 +780,12 @@ PHP_FUNCTION(filter_input) return; } } + + /* The FILTER_NULL_ON_FAILURE flag inverts the usual return values of + * the function: normally when validation fails false is returned, and + * when the input value doesn't exist NULL is returned. With the flag + * set, NULL and false should be returned, respectively. Ergo, although + * the code below looks incorrect, it's actually right. */ if (filter_flags & FILTER_NULL_ON_FAILURE) { RETURN_FALSE; } else { @@ -844,6 +852,12 @@ PHP_FUNCTION(filter_input_array) PHP_FILTER_GET_LONG_OPT(option, filter_flags); } } + + /* The FILTER_NULL_ON_FAILURE flag inverts the usual return values of + * the function: normally when validation fails false is returned, and + * when the input value doesn't exist NULL is returned. With the flag + * set, NULL and false should be returned, respectively. Ergo, although + * the code below looks incorrect, it's actually right. */ if (filter_flags & FILTER_NULL_ON_FAILURE) { RETURN_FALSE; } else { diff --git a/ext/filter/filter_private.h b/ext/filter/filter_private.h index 892087757..7cb6ca3ce 100644 --- a/ext/filter/filter_private.h +++ b/ext/filter/filter_private.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filter_private.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: filter_private.h 297245 2010-03-31 22:59:09Z rasmus $ */ #ifndef FILTER_PRIVATE_H #define FILTER_PRIVATE_H @@ -78,7 +78,8 @@ #define FILTER_SANITIZE_NUMBER_INT 0x0207 #define FILTER_SANITIZE_NUMBER_FLOAT 0x0208 #define FILTER_SANITIZE_MAGIC_QUOTES 0x0209 -#define FILTER_SANITIZE_LAST 0x0209 +#define FILTER_SANITIZE_FULL_SPECIAL_CHARS 0x020a +#define FILTER_SANITIZE_LAST 0x020a #define FILTER_SANITIZE_ALL 0x0200 diff --git a/ext/filter/logical_filters.c b/ext/filter/logical_filters.c index f8f453e41..c6eebac36 100644 --- a/ext/filter/logical_filters.c +++ b/ext/filter/logical_filters.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: logical_filters.c 293996 2010-01-25 16:14:28Z johannes $ */ +/* $Id: logical_filters.c 297353 2010-04-02 18:27:48Z rasmus $ */ #include "php_filter.h" #include "filter_private.h" @@ -68,7 +68,7 @@ static int php_filter_parse_int(const char *str, unsigned int str_len, long *ret TSRMLS_DC) { /* {{{ */ long ctx_value; - int sign = 0; + int sign = 0, digit = 0; const char *end = str + str_len; switch (*str) { @@ -82,7 +82,7 @@ static int php_filter_parse_int(const char *str, unsigned int str_len, long *ret /* must start with 1..9*/ if (str < end && *str >= '1' && *str <= '9') { - ctx_value = ((*(str++)) - '0'); + ctx_value = ((sign)?-1:1) * ((*(str++)) - '0'); } else { return -1; } @@ -95,19 +95,18 @@ static int php_filter_parse_int(const char *str, unsigned int str_len, long *ret while (str < end) { if (*str >= '0' && *str <= '9') { - ctx_value = (ctx_value * 10) + (*(str++) - '0'); + digit = (*(str++) - '0'); + if ( (!sign) && ctx_value <= (LONG_MAX-digit)/10 ) { + ctx_value = (ctx_value * 10) + digit; + } else if ( sign && ctx_value >= (LONG_MIN+digit)/10) { + ctx_value = (ctx_value * 10) - digit; + } else { + return -1; + } } else { return -1; } } - if (sign) { - ctx_value = -ctx_value; - if (ctx_value > 0) { /* overflow */ - return -1; - } - } else if (ctx_value < 0) { /* overflow */ - return -1; - } *ret = ctx_value; return 1; @@ -466,8 +465,13 @@ void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ e = url->host + strlen(url->host); s = url->host; + /* First char of hostname must be alphanumeric */ + if(!isalnum((int)*(unsigned char *)s)) { + goto bad_url; + } + while (s < e) { - if (!isalnum((int)*(unsigned char *)s) && *s != '_' && *s != '.') { + if (!isalnum((int)*(unsigned char *)s) && *s != '-' && *s != '.') { goto bad_url; } s++; @@ -494,8 +498,31 @@ bad_url: void php_filter_validate_email(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */ { - /* From http://cvs.php.net/co.php/pear/HTML_QuickForm/QuickForm/Rule/Email.php?r=1.4 */ - const char regexp[] = "/^((\\\"[^\\\"\\f\\n\\r\\t\\b]+\\\")|([A-Za-z0-9_][A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\=\\?\\^\\`\\|\\{\\}]*(\\.[A-Za-z0-9_\\!\\#\\$\\%\\&\\'\\*\\+\\-\\~\\/\\=\\?\\^\\`\\|\\{\\}]*)*))@((\\[(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))\\])|(((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9]))\\.((25[0-5])|(2[0-4][0-9])|([0-1]?[0-9]?[0-9])))|((([A-Za-z0-9])(([A-Za-z0-9\\-])*([A-Za-z0-9]))?(\\.(?=[A-Za-z0-9\\-]))?)+[A-Za-z]+))$/D"; + /* + * The regex below is based on a regex by Michael Rushton. + * However, it is not identical. I changed it to only consider routeable + * addresses as valid. Michael's regex considers a@b a valid address + * which conflicts with section 2.3.5 of RFC 5321 which states that: + * + * Only resolvable, fully-qualified domain names (FQDNs) are permitted + * when domain names are used in SMTP. In other words, names that can + * be resolved to MX RRs or address (i.e., A or AAAA) RRs (as discussed + * in Section 5) are permitted, as are CNAME RRs whose targets can be + * resolved, in turn, to MX or address RRs. Local nicknames or + * unqualified names MUST NOT be used. + * + * This regex does not handle comments and folding whitespace. While + * this is technically valid in an email address, these parts aren't + * actually part of the address itself. + * + * Michael's regex carries this copyright: + * + * Copyright © Michael Rushton 2009-10 + * http://squiloople.com/ + * 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"; pcre *re = NULL; pcre_extra *pcre_extra = NULL; diff --git a/ext/filter/php_filter.h b/ext/filter/php_filter.h index 1c5d84628..1cbf5c159 100644 --- a/ext/filter/php_filter.h +++ b/ext/filter/php_filter.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_filter.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_filter.h 297245 2010-03-31 22:59:09Z rasmus $ */ #ifndef PHP_FILTER_H #define PHP_FILTER_H @@ -28,6 +28,7 @@ #include "php_ini.h" #include "ext/standard/info.h" #include "ext/standard/php_string.h" +#include "ext/standard/html.h" #include "php_variables.h" extern zend_module_entry filter_module_entry; @@ -81,6 +82,7 @@ void php_filter_validate_ip(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_string(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_encoded(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_special_chars(PHP_INPUT_FILTER_PARAM_DECL); +void php_filter_full_special_chars(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_email(PHP_INPUT_FILTER_PARAM_DECL); void php_filter_url(PHP_INPUT_FILTER_PARAM_DECL); diff --git a/ext/filter/sanitizing_filters.c b/ext/filter/sanitizing_filters.c index c5152dbe1..08116f596 100644 --- a/ext/filter/sanitizing_filters.c +++ b/ext/filter/sanitizing_filters.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sanitizing_filters.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: sanitizing_filters.c 297245 2010-03-31 22:59:09Z rasmus $ */ #include "php_filter.h" #include "filter_private.h" @@ -242,6 +242,24 @@ void php_filter_special_chars(PHP_INPUT_FILTER_PARAM_DECL) } /* }}} */ +/* {{{ php_filter_full_special_chars */ +void php_filter_full_special_chars(PHP_INPUT_FILTER_PARAM_DECL) +{ + char *buf; + int len, quotes; + + if (!(flags & FILTER_FLAG_NO_ENCODE_QUOTES)) { + quotes = ENT_QUOTES; + } else { + quotes = ENT_NOQUOTES; + } + buf = php_escape_html_entities_ex(Z_STRVAL_P(value), Z_STRLEN_P(value), &len, 1, quotes, SG(default_charset), 0 TSRMLS_CC); + efree(Z_STRVAL_P(value)); + Z_STRVAL_P(value) = buf; + Z_STRLEN_P(value) = len; +} +/* }}} */ + /* {{{ php_filter_unsafe_raw */ void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL) { @@ -266,6 +284,8 @@ void php_filter_unsafe_raw(PHP_INPUT_FILTER_PARAM_DECL) } /* }}} */ + + /* {{{ php_filter_email */ #define SAFE "$-_.+" #define EXTRA "!*'()," diff --git a/ext/filter/tests/008.phpt b/ext/filter/tests/008.phpt index 7ba42fa73..8a4340542 100644 --- a/ext/filter/tests/008.phpt +++ b/ext/filter/tests/008.phpt @@ -11,7 +11,7 @@ var_dump(filter_list(array())); echo "Done\n"; ?> --EXPECTF-- -array(18) { +array(19) { [0]=> string(3) "int" [1]=> @@ -35,18 +35,20 @@ array(18) { [10]=> string(13) "special_chars" [11]=> - string(10) "unsafe_raw" + string(18) "full_special_chars" [12]=> - string(5) "email" + string(10) "unsafe_raw" [13]=> - string(3) "url" + string(5) "email" [14]=> - string(10) "number_int" + string(3) "url" [15]=> - string(12) "number_float" + string(10) "number_int" [16]=> - string(12) "magic_quotes" + string(12) "number_float" [17]=> + string(12) "magic_quotes" + [18]=> string(8) "callback" } diff --git a/ext/filter/tests/016.phpt b/ext/filter/tests/016.phpt index fbe8f3b3f..c6783444d 100644 --- a/ext/filter/tests/016.phpt +++ b/ext/filter/tests/016.phpt @@ -33,13 +33,13 @@ string(17) "abuse@example.com" bool(false) bool(false) bool(false) -string(8) "test@com" +bool(false) bool(false) bool(false) string(57) "QWERTYUIOPASDFGHJKLZXCVBNM@QWERTYUIOPASDFGHJKLZXCVBNM.NET" -string(26) "e.x.a.m.p.l.e.@example.com" -string(42) "firstname.lastname@employee.2something.com" bool(false) +string(42) "firstname.lastname@employee.2something.com" +string(9) "-@foo.com" bool(false) bool(false) bool(false) diff --git a/ext/filter/tests/033.phpt b/ext/filter/tests/033.phpt index 143d0c10e..04daa6133 100644 --- a/ext/filter/tests/033.phpt +++ b/ext/filter/tests/033.phpt @@ -4,6 +4,7 @@ Test all filters returned by filter_list() <?php if (!extension_loaded("filter")) die("skip"); ?> --INI-- precision=14 +default_charset=UTF-8 --FILE-- <?php include dirname(__FILE__) . '/033_run.inc'; @@ -20,6 +21,7 @@ string PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 12 stripped PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc() O'Henry 하퍼 encoded PHP 1 foo%40bar.com http%3A%2F%2Fa.b.c 1.2.3.4 123 123abc%3C%3E%28%29 O%27Henry %ED%95%98%ED%8D%BC special_chars PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry 하퍼 +full_special_chars PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry 하퍼 unsafe_raw PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry 하퍼 email PHP 1 foo@bar.com httpa.b.c 1.2.3.4 123 123abc O'Henry url PHP 1 foo@bar.com http://a.b.c 1.2.3.4 123 123abc<>() O'Henry diff --git a/ext/filter/tests/046.phpt b/ext/filter/tests/046.phpt index 813328946..bc454420a 100755 --- a/ext/filter/tests/046.phpt +++ b/ext/filter/tests/046.phpt @@ -4,16 +4,46 @@ Integer overflow <?php if (!extension_loaded("filter")) die("skip"); ?> --FILE-- <?php -$s = sprintf("%d", PHP_INT_MAX); -var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT))); +$max = sprintf("%d", PHP_INT_MAX); +switch($max) { +case "2147483647": /* 32-bit systems */ + $min = "-2147483648"; + $overflow = "2147483648"; + $underflow = "-2147483649"; + break; +case "9223372036854775807": /* 64-bit systems */ + $min = "-9223372036854775808"; + $overflow = "9223372036854775808"; + $underflow = "-9223372036854775809"; + break; +default: + die("failed: unknown value for PHP_MAX_INT"); + break; +} -$s = sprintf("%.0f", PHP_INT_MAX+1); -var_dump(filter_var($s, FILTER_VALIDATE_INT)); +function test_validation($val, $msg) { + $f = filter_var($val, FILTER_VALIDATE_INT); + echo "$msg filtered: "; var_dump($f); // filtered value (or false) + echo "$msg is_long: "; var_dump(is_long($f)); // test validation + echo "$msg equal: "; var_dump($val == $f); // test equality of result +} -$s = sprintf("%d", -PHP_INT_MAX); -var_dump(is_long(filter_var($s, FILTER_VALIDATE_INT))); +// PHP_INT_MAX +test_validation($max, "max"); +test_validation($overflow, "overflow"); +test_validation($min, "min"); +test_validation($underflow, "underflow"); ?> ---EXPECT-- -bool(true) -bool(false) -bool(true) +--EXPECTF-- +max filtered: int(%d) +max is_long: bool(true) +max equal: bool(true) +overflow filtered: bool(false) +overflow is_long: bool(false) +overflow equal: bool(false) +min filtered: int(-%d) +min is_long: bool(true) +min equal: bool(true) +underflow filtered: bool(false) +underflow is_long: bool(false) +underflow equal: bool(false) diff --git a/ext/filter/tests/bug51192.phpt b/ext/filter/tests/bug51192.phpt new file mode 100644 index 000000000..96c67eae1 --- /dev/null +++ b/ext/filter/tests/bug51192.phpt @@ -0,0 +1,13 @@ +--TEST-- +bug 51192, FILTER_VALIDATE_URL will invalidate a hostname that includes '-' +--SKIPIF-- +<?php if (!extension_loaded("filter")) die("skip"); ?> +--FILE-- +<?php +var_dump(filter_var('http://example.com/path', FILTER_VALIDATE_URL)); +var_dump(filter_var('http://exa-mple.com/path', FILTER_VALIDATE_URL)); +var_dump(filter_var('http://exa_mple.com/path', FILTER_VALIDATE_URL)); +--EXPECT-- +string(23) "http://example.com/path" +string(24) "http://exa-mple.com/path" +bool(false) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index be6c03f8a..1a64040e9 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ftp.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: ftp.c 295820 2010-03-04 12:52:58Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -948,7 +948,7 @@ ftp_put(ftpbuf_t *ftp, const char *path, php_stream *instream, ftptype_t type, i } ftp->data = data = data_close(ftp, data); - if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250)) { + if (!ftp_getresp(ftp) || (ftp->resp != 226 && ftp->resp != 250 && ftp->resp != 200)) { goto bail; } return 1; diff --git a/ext/gd/config.w32 b/ext/gd/config.w32 index 491f9a9c4..9299c1b16 100644 --- a/ext/gd/config.w32 +++ b/ext/gd/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 281216 2009-05-27 08:18:24Z pajoye $ +// $Id: config.w32 300833 2010-06-28 23:26:48Z pajoye $ // vim:ft=javascript ARG_WITH("gd", "Bundled GD support", "yes,shared"); @@ -10,7 +10,7 @@ if (PHP_GD != "no") { CHECK_LIB("libpng_a.lib;libpng.lib", "gd", PHP_GD) && CHECK_HEADER_ADD_INCLUDE("gd.h", "CFLAGS_GD", PHP_GD + ";ext\\gd\\libgd") && CHECK_HEADER_ADD_INCLUDE("png.h", "CFLAGS_GD", PHP_GD + ";" + PHP_PHP_BUILD + "\\include\\libpng12") && - (CHECK_LIB("libiconv_a.lib;libiconv.llib", "gd", PHP_GD) || CHECK_LIB("iconv_a.lib;iconv.lib", "gd", PHP_GD)) && + (CHECK_LIB("libiconv_a.lib;libiconv.lib", "gd", PHP_GD) || CHECK_LIB("iconv_a.lib;iconv.lib", "gd", PHP_GD)) && CHECK_HEADER_ADD_INCLUDE("iconv.h", "CFLAGS_GD", PHP_GD) && (((PHP_ZLIB=="no") && (CHECK_LIB("zlib_a.lib;zlib.lib", "gd", PHP_GD) )) || (PHP_ZLIB_SHARED && CHECK_LIB("zlib.lib", "gd", PHP_GD)) || (PHP_ZLIB == "yes" && (!PHP_ZLIB_SHARED))) diff --git a/ext/gd/gd.c b/ext/gd/gd.c index 8459ac210..5fdfd9b36 100644 --- a/ext/gd/gd.c +++ b/ext/gd/gd.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c 294458 2010-02-03 20:42:50Z pajoye $ */ +/* $Id: gd.c 293588 2010-01-15 17:09:14Z tabe $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ diff --git a/ext/gd/libgd/gd.c b/ext/gd/libgd/gd.c index e4e2e0f1a..0cc2e1d7d 100644 --- a/ext/gd/libgd/gd.c +++ b/ext/gd/libgd/gd.c @@ -1845,9 +1845,9 @@ void gdImageFillToBorder (gdImagePtr im, int x, int y, int border, int color) struct seg {int y, xl, xr, dy;}; /* max depth of stack */ -#define FILL_MAX 1200000 +#define FILL_MAX ((int)(im->sy*im->sx)/4) #define FILL_PUSH(Y, XL, XR, DY) \ - if (sp<stack+FILL_MAX*10 && Y+(DY)>=0 && Y+(DY)<wy2) \ + if (sp<stack+FILL_MAX && Y+(DY)>=0 && Y+(DY)<wy2) \ {sp->y = Y; sp->xl = XL; sp->xr = XR; sp->dy = DY; sp++;} #define FILL_POP(Y, XL, XR, DY) \ @@ -1889,8 +1889,8 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) } /* Do not use the 4 neighbors implementation with - * small images - */ + * small images + */ if (im->sx < 4) { int ix = x, iy = y, c; do { @@ -1907,7 +1907,7 @@ void gdImageFill(gdImagePtr im, int x, int y, int nc) goto done; } gdImageSetPixel(im, ix, iy, nc); - } while(ix++ < (im->sx -1)); + } while(iy++ < (im->sy -1)); goto done; } diff --git a/ext/gd/libgd/gd_gif_out.c b/ext/gd/libgd/gd_gif_out.c index 1fe36880a..14045385a 100644 --- a/ext/gd/libgd/gd_gif_out.c +++ b/ext/gd/libgd/gd_gif_out.c @@ -117,9 +117,8 @@ void gdImageGif (gdImagePtr im, FILE * outFile) void gdImageGifCtx(gdImagePtr im, gdIOCtxPtr out) { gdImagePtr pim = 0, tim = im; - int interlace, transparent, BitsPerPixel; + int interlace, BitsPerPixel; interlace = im->interlace; - transparent = im->transparent; if (im->trueColor) { /* Expensive, but the only way that produces an acceptable result: mix down to a palette diff --git a/ext/gd/libgd/gd_jpeg.c b/ext/gd/libgd/gd_jpeg.c index 0d9bae151..175c5b85f 100644 --- a/ext/gd/libgd/gd_jpeg.c +++ b/ext/gd/libgd/gd_jpeg.c @@ -51,8 +51,8 @@ static long php_jpeg_emit_message(j_common_ptr jpeg_info, int level) char message[JMSG_LENGTH_MAX]; jmpbuf_wrapper *jmpbufw; int ignore_warning = 0; - - jmpbufw = (jmpbuf_wrapper *) jpeg_info->client_data; + + jmpbufw = (jmpbuf_wrapper *) jpeg_info->client_data; if (jmpbufw != 0) { ignore_warning = jmpbufw->ignore_warning; @@ -113,6 +113,15 @@ const char * gdJpegGetVersionString() case 62: return "6b"; break; + + case 70: + return "7"; + break; + + case 80: + return "8"; + break; + default: return "unknown"; } diff --git a/ext/gd/libgd/gd_png.c b/ext/gd/libgd/gd_png.c index 52a087e78..49f7cb077 100644 --- a/ext/gd/libgd/gd_png.c +++ b/ext/gd/libgd/gd_png.c @@ -515,6 +515,10 @@ void gdImagePngCtxEx (gdImagePtr im, gdIOCtx * outfile, int level, int basefilte /* png_set_filter(png_ptr, 0, PNG_FILTER_NONE); */ /* 2.0.12: this is finally a parameter */ + if (level != -1 && (level < 0 || level > 9)) { + php_gd_error("gd-png error: compression level must be 0 through 9"); + return; + } png_set_compression_level(png_ptr, level); if (basefilter >= 0) { png_set_filter(png_ptr, PNG_FILTER_TYPE_BASE, basefilter); diff --git a/ext/gd/libgd/gdft.c b/ext/gd/libgd/gdft.c index a3ced0ab1..ac2bf344f 100644 --- a/ext/gd/libgd/gdft.c +++ b/ext/gd/libgd/gdft.c @@ -1101,7 +1101,7 @@ gdImageStringFTEx (gdImage * im, int *brect, int fg, char *fontlist, double ptsi /* now, draw to our target surface */ bm = (FT_BitmapGlyph) image; - gdft_draw_bitmap(tc_cache, im, fg, bm->bitmap, x + x1 + ((pen.x + 31) >> 6), y + y1 + ((pen.y + 31) >> 6) - bm->top); + gdft_draw_bitmap(tc_cache, im, fg, bm->bitmap, x + x1 + ((pen.x + 31) >> 6) + bm->left, y + y1 + ((pen.y + 31) >> 6) - bm->top); } /* record current glyph index for kerning */ diff --git a/ext/gd/tests/bug42434.phpt b/ext/gd/tests/bug42434.phpt index cede1ac17..bc0790ede 100644 --- a/ext/gd/tests/bug42434.phpt +++ b/ext/gd/tests/bug42434.phpt @@ -5,6 +5,7 @@ Bug #42434 (ImageLine w/ antialias = 1px shorter) if (!extension_loaded('gd')) {
die('skip gd extension not available');
}
+if (!GD_BUNDLED) die("skip requires bundled GD library\n");
?>
--FILE--
<?php
diff --git a/ext/gd/tests/bug51263.phpt b/ext/gd/tests/bug51263.phpt new file mode 100644 index 000000000..8e86f4176 --- /dev/null +++ b/ext/gd/tests/bug51263.phpt @@ -0,0 +1,32 @@ +--TEST-- +Bug #51263 (imagettftext and rotated text uses wrong baseline) +--SKIPIF-- +<?php + if(!extension_loaded('gd')){ die('skip gd extension not available'); } + if(!function_exists('imagettftext')) die('skip imagettftext() not available'); +?> +--FILE-- +<?php +$cwd = dirname(__FILE__); +$ttf = "$cwd/Tuffy.ttf"; +$w = 23; +$h = 70; +$img = imagecreatetruecolor($w, $h); +$blk = imagecolorallocate($img, 0, 0, 0); +imagefilledrectangle($img, 0, 0, $w-1, $h-1, $blk); +$col = imagecolorallocate($img, 255, 255, 255); +imagettftext($img, 8, 90, 10, 60, $col, $ttf, "foo bar qux"); +$x = array(0, 1, 2, 3, 13); +for ($j=0; $j<30; $j++) { + foreach ($x as $i) { + $c = imagecolorat($img, $i, $j); + if ($c != 0) { + echo "KO: ($i, $j)\n"; + exit; + } + } +} +echo "OK\n"; +?> +--EXPECTF-- +OK diff --git a/ext/gd/tests/bug51671.phpt b/ext/gd/tests/bug51671.phpt new file mode 100644 index 000000000..5dd77fe67 --- /dev/null +++ b/ext/gd/tests/bug51671.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #51671 (imagefill does not work correctly for small images) +--SKIPIF-- +<?php + if(!extension_loaded('gd')){ die('skip gd extension not available'); } +?> +--FILE-- +<?php +$w = 1; +$h = 50; +$im = imagecreatetruecolor($w, $h); +$white = imagecolorallocate($im, 255, 255, 255); +imagefill($im, 0, 0, $white); + +for ($iy = 0; $iy < $h; $iy++) { + if (($c = imagecolorat($im, 0, $iy)) != $white) { + printf("Failed, (0, $iy) is %X\n", $c); + } +} + +echo "OK\n"; +?> +--EXPECTF-- +OK diff --git a/ext/gd/tests/imageantialias_error1.phpt b/ext/gd/tests/imageantialias_error1.phpt index 53fe0cc66..e9475e957 100755 --- a/ext/gd/tests/imageantialias_error1.phpt +++ b/ext/gd/tests/imageantialias_error1.phpt @@ -6,6 +6,7 @@ Guilherme Blanco <guilhermeblanco [at] hotmail [dot] com> --SKIPIF-- <?php if (!extension_loaded("gd")) die("skip GD not present"); +if (!GD_BUNDLED) die("skip requires bundled GD library\n"); ?> --FILE-- <?php diff --git a/ext/gd/tests/imageantialias_error2.phpt b/ext/gd/tests/imageantialias_error2.phpt index 8dad8bd11..64b0a60eb 100755 --- a/ext/gd/tests/imageantialias_error2.phpt +++ b/ext/gd/tests/imageantialias_error2.phpt @@ -6,6 +6,7 @@ Guilherme Blanco <guilhermeblanco [at] hotmail [dot] com> --SKIPIF-- <?php if (!extension_loaded("gd")) die("skip GD not present"); +if (!GD_BUNDLED) die("skip requires bundled GD library\n"); ?> --FILE-- <?php diff --git a/ext/gd/tests/imagelayereffect_basic.phpt b/ext/gd/tests/imagelayereffect_basic.phpt index 6dbc8600c..a34e05e02 100644 --- a/ext/gd/tests/imagelayereffect_basic.phpt +++ b/ext/gd/tests/imagelayereffect_basic.phpt @@ -6,7 +6,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com> --SKIPIF-- <?php if (!extension_loaded("gd")) die("skip GD not present"); - if (!GD_BUNDLED) die('function only available in bundled, external GD detected'); + if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected'); ?> --FILE-- <?php diff --git a/ext/gd/tests/imagelayereffect_error1.phpt b/ext/gd/tests/imagelayereffect_error1.phpt index ad457103c..21f37a8a1 100644 --- a/ext/gd/tests/imagelayereffect_error1.phpt +++ b/ext/gd/tests/imagelayereffect_error1.phpt @@ -6,7 +6,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com> --SKIPIF-- <?php if (!extension_loaded("gd")) die("skip GD not present"); - if (!GD_BUNDLED) die('function only available in bundled, external GD detected'); + if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected'); ?> --FILE-- <?php diff --git a/ext/gd/tests/imagelayereffect_error2.phpt b/ext/gd/tests/imagelayereffect_error2.phpt index 7fb993969..d8d331bfd 100644 --- a/ext/gd/tests/imagelayereffect_error2.phpt +++ b/ext/gd/tests/imagelayereffect_error2.phpt @@ -6,7 +6,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com> --SKIPIF-- <?php if (!extension_loaded("gd")) die("skip GD not present"); - if (!GD_BUNDLED) die('function only available in bundled, external GD detected'); + if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected'); ?> --FILE-- <?php diff --git a/ext/gd/tests/imagelayereffect_error3.phpt b/ext/gd/tests/imagelayereffect_error3.phpt index 9f9918633..d4deff107 100644 --- a/ext/gd/tests/imagelayereffect_error3.phpt +++ b/ext/gd/tests/imagelayereffect_error3.phpt @@ -6,7 +6,7 @@ Rafael Dohms <rdohms [at] gmail [dot] com> --SKIPIF-- <?php if (!extension_loaded("gd")) die("skip GD not present"); - if (!GD_BUNDLED) die('function only available in bundled, external GD detected'); + if (!GD_BUNDLED) die('skip function only available in bundled, external GD detected'); ?> --FILE-- <?php diff --git a/ext/hash/hash.c b/ext/hash/hash.c index 96c0ae216..b08bcc1e5 100644 --- a/ext/hash/hash.c +++ b/ext/hash/hash.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: hash.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: hash.c 300972 2010-07-03 13:06:14Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -556,8 +556,10 @@ PHP_FUNCTION(hash_copy) copy_hash->ops = hash->ops; copy_hash->context = context; copy_hash->options = hash->options; - copy_hash->key = hash->key; - + copy_hash->key = ecalloc(1, hash->ops->block_size); + if (hash->key) { + memcpy(copy_hash->key, hash->key, hash->ops->block_size); + } ZEND_REGISTER_RESOURCE(return_value, copy_hash, php_hash_le_hash); } /* }}} */ @@ -739,15 +741,17 @@ PHP_FUNCTION(mhash_get_block_size) Generates a key using hash functions */ PHP_FUNCTION(mhash_keygen_s2k) { - long algorithm, bytes; + long algorithm, l_bytes; + int bytes; char *password, *salt; int password_len, salt_len; char padded_salt[SALT_SIZE]; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &bytes) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lssl", &algorithm, &password, &password_len, &salt, &salt_len, &l_bytes) == FAILURE) { return; } + bytes = (int)l_bytes; if (bytes <= 0){ php_error_docref(NULL TSRMLS_CC, E_WARNING, "the byte parameter must be greater than 0"); RETURN_FALSE; diff --git a/ext/hash/php_hash_tiger.h b/ext/hash/php_hash_tiger.h index 78b05e1a8..4949d4744 100644 --- a/ext/hash/php_hash_tiger.h +++ b/ext/hash/php_hash_tiger.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_hash_tiger.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_hash_tiger.h 301252 2010-07-13 23:59:54Z kalle $ */ #ifndef PHP_HASH_TIGER_H #define PHP_HASH_TIGER_H @@ -25,8 +25,8 @@ typedef struct { php_hash_uint64 state[3]; php_hash_uint64 passed; - unsigned char passes:1; - unsigned char length:7; + unsigned int passes:1; + unsigned int length:7; unsigned char buffer[64]; } PHP_TIGER_CTX; diff --git a/ext/hash/tests/bug52240.phpt b/ext/hash/tests/bug52240.phpt new file mode 100644 index 000000000..1f8472c77 --- /dev/null +++ b/ext/hash/tests/bug52240.phpt @@ -0,0 +1,19 @@ +--TEST-- +Bug #52240 (hash_copy() does not copy the HMAC key, causes wrong results and PHP crashes) +--SKIPIF-- +<?php extension_loaded('hash') or die('skip'); ?> +--FILE-- +<?php + +$h = hash_init('crc32b', HASH_HMAC, '123456' ); +$h2 = hash_copy($h); +var_dump(hash_final($h)); +$h3 = hash_copy($h2); +var_dump(hash_final($h2)); +var_dump(hash_final($h3)); + +?> +--EXPECT-- +string(8) "278af264" +string(8) "278af264" +string(8) "278af264" diff --git a/ext/iconv/config.w32 b/ext/iconv/config.w32 index cd800f354..5fe9715b3 100644 --- a/ext/iconv/config.w32 +++ b/ext/iconv/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 262128 2008-07-06 16:59:13Z pajoye $ +// $Id: config.w32 295968 2010-03-08 15:51:08Z kalle $ // vim: ft=javascript ARG_WITH("iconv", "iconv support", "yes"); @@ -12,6 +12,7 @@ if (PHP_ICONV != "no") { AC_DEFINE("HAVE_ICONV", 1, "Define if iconv extension is enabled"); AC_DEFINE("HAVE_LIBICONV", 1, "Define if libiconv is available"); + AC_DEFINE("ICONV_ALIASED_LIBICONV", 1, "The iconv function is called iconv() in libiconv"); AC_DEFINE("PHP_ICONV_IMPL", "\"libiconv\"", "Which iconv implementation to use"); AC_DEFINE("ICONV_SUPPORTS_ERRNO", 1, "Whether iconv supports errno or not"); ADD_FLAG("CFLAGS_ICONV", "/D PHP_ICONV_EXPORTS "); diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 8007fec12..246e1d522 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: iconv.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: iconv.c 298963 2010-05-04 11:56:59Z aharvey $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -182,7 +182,7 @@ static PHP_GINIT_FUNCTION(iconv) } /* }}} */ -#ifdef HAVE_LIBICONV +#if defined(HAVE_LIBICONV) && defined(ICONV_ALIASED_LIBICONV) #define iconv libiconv #endif @@ -1206,7 +1206,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn prev_in_left = ini_in_left = in_left; ini_in_p = in_p; - for (out_size = char_cnt; out_size > 0;) { + for (out_size = (char_cnt - 2) / 3; out_size > 0;) { size_t prev_out_left; nbytes_required = 0; @@ -1267,7 +1267,7 @@ static php_iconv_err_t _php_iconv_mime_encode(smart_str *pretval, const char *fn break; } - out_size -= ((nbytes_required - (char_cnt - 2)) + 1) / (3 - 1); + out_size -= ((nbytes_required - (char_cnt - 2)) + 1) / 3; in_left = ini_in_left; in_p = ini_in_p; } diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index 332ff3357..9ed9b2a3f 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Revision: 293978 $ */ +/* $Revision: 295968 $ */ #ifndef PHP_ICONV_H #define PHP_ICONV_H @@ -37,6 +37,7 @@ #ifdef PHP_ATOM_INC #include "ext/iconv/php_have_iconv.h" #include "ext/iconv/php_have_libiconv.h" +#include "ext/iconv/php_iconv_aliased_libiconv.h" #include "ext/iconv/php_have_glibc_iconv.h" #include "ext/iconv/php_have_bsd_iconv.h" #include "ext/iconv/php_have_ibm_iconv.h" diff --git a/ext/iconv/tests/bug48289.phpt b/ext/iconv/tests/bug48289.phpt new file mode 100644 index 000000000..fc2cd360b --- /dev/null +++ b/ext/iconv/tests/bug48289.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #48289 (iconv_mime_encode() quoted-printable scheme is broken) +--SKIPIF-- +<?php extension_loaded('iconv') or die('skip iconv extension is not available'); ?> +--FILE-- +<?php +$text = "\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88\xE3\x83\x86\xE3\x82\xB9\xE3\x83\x88"; +$options = array( + 'scheme' => 'Q', + 'input-charset' => 'UTF-8', + 'output-charset' => 'UTF-8', + 'line-length' => 30, +); + +echo iconv_mime_encode('Subject', $text, $options); +--EXPECT-- +Subject: =?UTF-8?Q?=E3=83=86?= + =?UTF-8?Q?=E3=82=B9?= + =?UTF-8?Q?=E3=83=88?= + =?UTF-8?Q?=E3=83=86?= + =?UTF-8?Q?=E3=82=B9?= + =?UTF-8?Q?=E3=83=88?= diff --git a/ext/imap/php_imap.c b/ext/imap/php_imap.c index 34e55fca4..718c7f269 100644 --- a/ext/imap/php_imap.c +++ b/ext/imap/php_imap.c @@ -26,7 +26,7 @@ | PHP 4.0 updates: Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_imap.c 294699 2010-02-07 13:06:54Z pajoye $ */ +/* $Id: php_imap.c 297983 2010-04-14 09:45:37Z pajoye $ */ #define IMAP41 @@ -3420,6 +3420,7 @@ PHP_FUNCTION(imap_fetch_overview) add_property_long(myoverview, "deleted", elt->deleted); add_property_long(myoverview, "seen", elt->seen); add_property_long(myoverview, "draft", elt->draft); + add_property_long(myoverview, "udate", mail_longdate(elt)); add_next_index_object(return_value, myoverview TSRMLS_CC); } } diff --git a/ext/imap/tests/imap_fetch_overview_basic.phpt b/ext/imap/tests/imap_fetch_overview_basic.phpt index 2b4623feb..83fab1239 100644 --- a/ext/imap/tests/imap_fetch_overview_basic.phpt +++ b/ext/imap/tests/imap_fetch_overview_basic.phpt @@ -23,28 +23,11 @@ $stream_id = setup_test_mailbox('', 2, $mailbox, 'notSimple'); $msg_no = imap_uid($stream_id, 1); $options = FT_UID; -//Set mandatory response fields -$mandatoryFields = array( - 'size', - 'uid', - 'msgno', - 'recent', - 'flagged', - 'answered', - 'deleted', - 'seen', - 'draft', - ); - // Calling imap_fetch_overview() with all possible arguments echo "\n-- All possible arguments --\n"; $a = imap_fetch_overview($stream_id, "$msg_no", $options) ; echo "\n--> Object #1\n"; -foreach ($mandatoryFields as $mf) -{ - $z = $a[0]->$mf; - echo "$mf is $z\n"; -} +displayOverviewFields($a[0]); // Calling imap_fetch_overview() with mandatory arguments echo "\n-- Mandatory arguments --\n"; @@ -52,19 +35,11 @@ $a = imap_fetch_overview($stream_id, '1:2') ; //first object in array echo "\n--> Object #1\n"; -foreach ($mandatoryFields as $mf) -{ - $z = $a[0]->$mf; - echo "$mf is $z\n"; -} +displayOverviewFields($a[0]); //Second object in array echo "\n--> Object #2\n"; -foreach ($mandatoryFields as $mf) -{ - $z = $a[1]->$mf; - echo "$mf is $z\n"; -} +displayOverviewFields($a[1]); imap_close($stream_id); @@ -91,6 +66,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK -- Mandatory arguments -- @@ -104,6 +80,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK --> Object #2 size is %d @@ -115,4 +92,5 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK ===DONE=== diff --git a/ext/imap/tests/imap_fetch_overview_variation2.phpt b/ext/imap/tests/imap_fetch_overview_variation2.phpt index 8634cefab..086885f6a 100644 --- a/ext/imap/tests/imap_fetch_overview_variation2.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation2.phpt @@ -22,20 +22,6 @@ require_once(dirname(__FILE__).'/imap_include.inc'); // Initialise function arguments not being substituted $stream_id = setup_test_mailbox('', 1, $mailbox, 'notSimple'); // set up temp mailbox with 1 msg -//Set mandatory response fields -$mandatoryFields = array( - 'size', - 'uid', - 'msgno', - 'recent', - 'flagged', - 'answered', - 'deleted', - 'seen', - 'draft', - ); - - //get an unset variable $unset_var = 10; unset ($unset_var); @@ -114,11 +100,7 @@ foreach($inputs as $input) { if (!$overview) { echo imap_last_error() . "\n"; } else { - foreach ($mandatoryFields as $mf) - { - $z = $overview[0]->$mf; - echo "$mf is $z\n"; - } + displayOverviewFields($overview[0]); } $iterator++; }; @@ -151,6 +133,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK -- Testing with second argument value: int(12345) Sequence out of range @@ -189,6 +172,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK -- Testing with second argument value: bool(false) Sequence out of range @@ -203,6 +187,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK -- Testing with second argument value: bool(false) Sequence out of range diff --git a/ext/imap/tests/imap_fetch_overview_variation5.phpt b/ext/imap/tests/imap_fetch_overview_variation5.phpt index d5bc88858..5feeedb52 100644 --- a/ext/imap/tests/imap_fetch_overview_variation5.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation5.phpt @@ -22,19 +22,6 @@ require_once(dirname(__FILE__).'/imap_include.inc'); $stream_id = setup_test_mailbox('', 3, $mailbox, 'notSimple'); // set up temp mailbox with 3 msgs -//Set mandatory response fields -$mandatoryFields = array( - 'size', - 'uid', - 'msgno', - 'recent', - 'flagged', - 'answered', - 'deleted', - 'seen', - 'draft', - ); - $sequences = array (0, 4, '4', // out of range '2', '1,3', '1, 2', '1:3'); // pass uid without setting FT_UID option @@ -47,11 +34,7 @@ foreach($sequences as $msg_no) { } else { foreach($overview as $ov) { echo "\n"; - foreach ($mandatoryFields as $mf) - { - $z = $ov->$mf; - echo "$mf is $z\n"; - } + displayOverviewFields($ov); } } } @@ -89,6 +72,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK -- $msg_no is 1,3 -- @@ -101,6 +85,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK size is %d uid is %d @@ -111,6 +96,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK -- $msg_no is 1, 2 -- Syntax error in sequence @@ -126,6 +112,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK size is %d uid is %d @@ -136,6 +123,7 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK size is %d uid is %d @@ -146,4 +134,5 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK ===DONE=== diff --git a/ext/imap/tests/imap_fetch_overview_variation6.phpt b/ext/imap/tests/imap_fetch_overview_variation6.phpt index 6ee65f68f..bdf05579d 100644 --- a/ext/imap/tests/imap_fetch_overview_variation6.phpt +++ b/ext/imap/tests/imap_fetch_overview_variation6.phpt @@ -22,30 +22,13 @@ require_once(dirname(__FILE__).'/imap_include.inc'); $stream_id = setup_test_mailbox('', 0, $mailbox); // setup temp mailbox create_multipart_message($stream_id, $mailbox); -//Set mandatory response fields -$mandatoryFields = array( - 'size', - 'uid', - 'msgno', - 'recent', - 'flagged', - 'answered', - 'deleted', - 'seen', - 'draft', - ); - // refresh msg numbers imap_check($stream_id); $msg_no = 1; $a = imap_fetch_overview($stream_id, $msg_no); echo "\n--> Object #1\n"; -foreach ($mandatoryFields as $mf) -{ - $z = $a[0]->$mf; - echo "$mf is $z\n"; -} +displayOverviewFields($a[0]); @@ -122,4 +105,5 @@ answered is 0 deleted is 0 seen is 0 draft is 0 +udate is OK ===DONE=== diff --git a/ext/imap/tests/imap_include.inc b/ext/imap/tests/imap_include.inc index 3f9845476..ed3623957 100644 --- a/ext/imap/tests/imap_include.inc +++ b/ext/imap/tests/imap_include.inc @@ -9,10 +9,56 @@ $password = 'p4ssw0rd'; $users = array("webmaster", "info", "admin", "foo"); // tests require 4 valid userids $mailbox_prefix = "phpttest"; // name used for test mailbox +// record test start time (used by displayOverviewFields()) +$start_time = time(); + +// list of fields to expect +$mandatory_overview_fields = array( + 'size', + 'uid', + 'msgno', + 'recent', + 'flagged', + 'answered', + 'deleted', + 'seen', + 'draft', + 'udate', + ); + +/** + * Display all fields in an element from an imap_fetch_overview() response + * + * Special handling for 'udate', which will vary run-to-run; assumes an IMAP + * server with its clock synced to the current system, which is consistent with + * setup instructions in ext/imap/tests/README + * + * @param array resp element from the return value of imap_fetch_overview() + */ +function displayOverviewFields($resp, $fields=null) { + global $mandatory_overview_fields; + global $start_time; + + foreach ($fields ? $fields : $mandatory_overview_fields as $mf) + { + $z = $resp->$mf; + if ($mf == 'udate') { + if (($z >= $start_time) && ($z <= time())) { + echo "$mf is OK\n"; + } else { + echo "$mf is BAD ($z)\n"; + } + } else { + echo "$mf is $z\n"; + } + } +} + + /** * Create a test mailbox and populate with msgs * - * @para, string mailbox_suffix Suffix used to uniquely identify mailboxes + * @param string mailbox_suffix Suffix used to uniquely identify mailboxes * @param int message_count number of test msgs to be written to new mailbox * * @return IMAP stream to new mailbox on sucesss; FALSE on failure diff --git a/ext/interbase/interbase.c b/ext/interbase/interbase.c index 18ffbf271..2cd54684c 100644 --- a/ext/interbase/interbase.c +++ b/ext/interbase/interbase.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: interbase.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: interbase.c 300764 2010-06-26 16:03:39Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -385,62 +385,62 @@ const zend_function_entry ibase_functions[] = { * Firebird users should use the aliases, so future InterBase-specific changes will * not affect their code */ - PHP_FALIAS(fbird_connect,ibase_connect, NULL) - PHP_FALIAS(fbird_pconnect,ibase_pconnect, NULL) - PHP_FALIAS(fbird_close,ibase_close, NULL) - PHP_FALIAS(fbird_drop_db,ibase_drop_db, NULL) - PHP_FALIAS(fbird_query,ibase_query, NULL) - PHP_FALIAS(fbird_fetch_row,ibase_fetch_row, NULL) - PHP_FALIAS(fbird_fetch_assoc,ibase_fetch_assoc, NULL) - PHP_FALIAS(fbird_fetch_object,ibase_fetch_object, NULL) - PHP_FALIAS(fbird_free_result,ibase_free_result, NULL) - PHP_FALIAS(fbird_name_result,ibase_name_result, NULL) - PHP_FALIAS(fbird_prepare,ibase_prepare, NULL) - PHP_FALIAS(fbird_execute,ibase_execute, NULL) - PHP_FALIAS(fbird_free_query,ibase_free_query, NULL) - PHP_FALIAS(fbird_gen_id,ibase_gen_id, NULL) - PHP_FALIAS(fbird_num_fields,ibase_num_fields, NULL) - PHP_FALIAS(fbird_num_params,ibase_num_params, NULL) + PHP_FALIAS(fbird_connect, ibase_connect, arginfo_ibase_connect) + PHP_FALIAS(fbird_pconnect, ibase_pconnect, arginfo_ibase_pconnect) + PHP_FALIAS(fbird_close, ibase_close, arginfo_ibase_close) + PHP_FALIAS(fbird_drop_db, ibase_drop_db, arginfo_ibase_drop_db) + PHP_FALIAS(fbird_query, ibase_query, arginfo_ibase_query) + PHP_FALIAS(fbird_fetch_row, ibase_fetch_row, arginfo_ibase_fetch_row) + PHP_FALIAS(fbird_fetch_assoc, ibase_fetch_assoc, arginfo_ibase_fetch_assoc) + PHP_FALIAS(fbird_fetch_object, ibase_fetch_object, arginfo_ibase_fetch_object) + PHP_FALIAS(fbird_free_result, ibase_free_result, arginfo_ibase_free_result) + PHP_FALIAS(fbird_name_result, ibase_name_result, arginfo_ibase_name_result) + PHP_FALIAS(fbird_prepare, ibase_prepare, arginfo_ibase_prepare) + PHP_FALIAS(fbird_execute, ibase_execute, arginfo_ibase_execute) + PHP_FALIAS(fbird_free_query, ibase_free_query, arginfo_ibase_free_query) + PHP_FALIAS(fbird_gen_id, ibase_gen_id, arginfo_ibase_gen_id) + PHP_FALIAS(fbird_num_fields, ibase_num_fields, arginfo_ibase_num_fields) + PHP_FALIAS(fbird_num_params, ibase_num_params, arginfo_ibase_num_params) #if abies_0 - PHP_FALIAS(fbird_num_rows,ibase_num_rows, NULL) + PHP_FALIAS(fbird_num_rows, ibase_num_rows, arginfo_ibase_num_rows) #endif - PHP_FALIAS(fbird_affected_rows,ibase_affected_rows, NULL) - PHP_FALIAS(fbird_field_info,ibase_field_info, NULL) - PHP_FALIAS(fbird_param_info,ibase_param_info, NULL) - - PHP_FALIAS(fbird_trans,ibase_trans, NULL) - PHP_FALIAS(fbird_commit,ibase_commit, NULL) - PHP_FALIAS(fbird_rollback,ibase_rollback, NULL) - PHP_FALIAS(fbird_commit_ret,ibase_commit_ret, NULL) - PHP_FALIAS(fbird_rollback_ret,ibase_rollback_ret, NULL) - - PHP_FALIAS(fbird_blob_info,ibase_blob_info, NULL) - PHP_FALIAS(fbird_blob_create,ibase_blob_create, NULL) - PHP_FALIAS(fbird_blob_add,ibase_blob_add, NULL) - PHP_FALIAS(fbird_blob_cancel,ibase_blob_cancel, NULL) - PHP_FALIAS(fbird_blob_close,ibase_blob_close, NULL) - PHP_FALIAS(fbird_blob_open,ibase_blob_open, NULL) - PHP_FALIAS(fbird_blob_get,ibase_blob_get, NULL) - PHP_FALIAS(fbird_blob_echo,ibase_blob_echo, NULL) - PHP_FALIAS(fbird_blob_import,ibase_blob_import, NULL) - PHP_FALIAS(fbird_errmsg,ibase_errmsg, NULL) - PHP_FALIAS(fbird_errcode,ibase_errcode, NULL) - - PHP_FALIAS(fbird_add_user,ibase_add_user, NULL) - PHP_FALIAS(fbird_modify_user,ibase_modify_user, NULL) - PHP_FALIAS(fbird_delete_user,ibase_delete_user, NULL) - - PHP_FALIAS(fbird_service_attach,ibase_service_attach, NULL) - PHP_FALIAS(fbird_service_detach,ibase_service_detach, NULL) - PHP_FALIAS(fbird_backup,ibase_backup, NULL) - PHP_FALIAS(fbird_restore,ibase_restore, NULL) - PHP_FALIAS(fbird_maintain_db,ibase_maintain_db, NULL) - PHP_FALIAS(fbird_db_info,ibase_db_info, NULL) - PHP_FALIAS(fbird_server_info,ibase_server_info, NULL) - - PHP_FALIAS(fbird_wait_event,ibase_wait_event, NULL) - PHP_FALIAS(fbird_set_event_handler,ibase_set_event_handler, NULL) - PHP_FALIAS(fbird_free_event_handler,ibase_free_event_handler, NULL) + PHP_FALIAS(fbird_affected_rows, ibase_affected_rows, arginfo_ibase_affected_rows) + PHP_FALIAS(fbird_field_info, ibase_field_info, arginfo_ibase_field_info) + PHP_FALIAS(fbird_param_info, ibase_param_info, arginfo_ibase_param_info) + + PHP_FALIAS(fbird_trans, ibase_trans, arginfo_ibase_trans) + PHP_FALIAS(fbird_commit, ibase_commit, arginfo_ibase_commit) + PHP_FALIAS(fbird_rollback, ibase_rollback, arginfo_ibase_rollback) + PHP_FALIAS(fbird_commit_ret, ibase_commit_ret, arginfo_ibase_commit_ret) + PHP_FALIAS(fbird_rollback_ret, ibase_rollback_ret, arginfo_ibase_rollback_ret) + + PHP_FALIAS(fbird_blob_info, ibase_blob_info, arginfo_ibase_blob_info) + PHP_FALIAS(fbird_blob_create, ibase_blob_create, arginfo_ibase_blob_create) + PHP_FALIAS(fbird_blob_add, ibase_blob_add, arginfo_ibase_blob_add) + PHP_FALIAS(fbird_blob_cancel, ibase_blob_cancel, arginfo_ibase_blob_cancel) + PHP_FALIAS(fbird_blob_close, ibase_blob_close, arginfo_ibase_blob_close) + PHP_FALIAS(fbird_blob_open, ibase_blob_open, arginfo_ibase_blob_open) + PHP_FALIAS(fbird_blob_get, ibase_blob_get, arginfo_ibase_blob_get) + PHP_FALIAS(fbird_blob_echo, ibase_blob_echo, arginfo_ibase_blob_echo) + PHP_FALIAS(fbird_blob_import, ibase_blob_import, arginfo_ibase_blob_import) + PHP_FALIAS(fbird_errmsg, ibase_errmsg, arginfo_ibase_errmsg) + PHP_FALIAS(fbird_errcode, ibase_errcode, arginfo_ibase_errcode) + + PHP_FALIAS(fbird_add_user, ibase_add_user, arginfo_ibase_add_user) + PHP_FALIAS(fbird_modify_user, ibase_modify_user, arginfo_ibase_modify_user) + PHP_FALIAS(fbird_delete_user, ibase_delete_user, arginfo_ibase_delete_user) + + PHP_FALIAS(fbird_service_attach, ibase_service_attach, arginfo_ibase_service_attach) + PHP_FALIAS(fbird_service_detach, ibase_service_detach, arginfo_ibase_service_detach) + PHP_FALIAS(fbird_backup, ibase_backup, arginfo_ibase_backup) + PHP_FALIAS(fbird_restore, ibase_restore, arginfo_ibase_restore) + PHP_FALIAS(fbird_maintain_db, ibase_maintain_db, arginfo_ibase_maintain_db) + PHP_FALIAS(fbird_db_info, ibase_db_info, arginfo_ibase_db_info) + PHP_FALIAS(fbird_server_info, ibase_server_info, arginfo_ibase_server_info) + + PHP_FALIAS(fbird_wait_event, ibase_wait_event, arginfo_ibase_wait_event) + PHP_FALIAS(fbird_set_event_handler, ibase_set_event_handler, arginfo_ibase_set_event_handler) + PHP_FALIAS(fbird_free_event_handler, ibase_free_event_handler, arginfo_ibase_free_event_handler) {NULL, NULL, NULL} }; diff --git a/ext/intl/config.w32 b/ext/intl/config.w32 index 6635b8903..779b9fc4c 100755 --- a/ext/intl/config.w32 +++ b/ext/intl/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 294108 2010-01-27 17:29:38Z johannes $ +// $Id: config.w32 293114 2010-01-04 21:44:45Z stas $ // vim:ft=javascript ARG_ENABLE("intl", "Enable internationalization support", "no"); diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c index 158b76e85..728172a8b 100644 --- a/ext/intl/idn/idn.c +++ b/ext/intl/idn/idn.c @@ -15,7 +15,7 @@ | Author: Pierre A. Joye <pierre@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: idn.c 293979 2010-01-25 13:59:35Z johannes $ */ +/* $Id: idn.c 292566 2009-12-23 21:41:05Z stas $ */ /* {{{ includes */ #ifdef HAVE_CONFIG_H diff --git a/ext/intl/locale/locale_methods.c b/ext/intl/locale/locale_methods.c index 438e905f9..51c02923e 100755 --- a/ext/intl/locale/locale_methods.c +++ b/ext/intl/locale/locale_methods.c @@ -14,7 +14,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: locale_methods.c 293979 2010-01-25 13:59:35Z johannes $ */ +/* $Id: locale_methods.c 292566 2009-12-23 21:41:05Z stas $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/intl/php_intl.h b/ext/intl/php_intl.h index 3ae530a0a..4ede069e2 100755 --- a/ext/intl/php_intl.h +++ b/ext/intl/php_intl.h @@ -63,7 +63,7 @@ PHP_RINIT_FUNCTION(intl); PHP_RSHUTDOWN_FUNCTION(intl); PHP_MINFO_FUNCTION(intl); -#define PHP_INTL_VERSION "1.0.3" +#define PHP_INTL_VERSION "1.1.0" #endif /* PHP_INTL_H */ diff --git a/ext/intl/resourcebundle/resourcebundle.c b/ext/intl/resourcebundle/resourcebundle.c index 3d881a229..b525ed1a3 100644 --- a/ext/intl/resourcebundle/resourcebundle.c +++ b/ext/intl/resourcebundle/resourcebundle.c @@ -1,4 +1,4 @@ -/* + /* +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ diff --git a/ext/intl/resourcebundle/resourcebundle_class.c b/ext/intl/resourcebundle/resourcebundle_class.c index 1c9a689b2..bebd0e828 100644 --- a/ext/intl/resourcebundle/resourcebundle_class.c +++ b/ext/intl/resourcebundle/resourcebundle_class.c @@ -126,7 +126,7 @@ ZEND_BEGIN_ARG_INFO_EX( arginfo_resourcebundle___construct, 0, 0, 2 ) ZEND_END_ARG_INFO() /* }}} */ -/* {{{ proto void ResourceBundle::__construct( string $bundlename [, string $locale [, bool $fallback = true ]] ) +/* {{{ proto void ResourceBundle::__construct( string $locale [, string $bundlename [, bool $fallback = true ]] ) * ResourceBundle object constructor */ PHP_METHOD( ResourceBundle, __construct ) @@ -136,8 +136,9 @@ PHP_METHOD( ResourceBundle, __construct ) } /* }}} */ -/* {{{ proto ResourceBundle ResourceBundle::create( string $bundlename [, string $locale [, bool $fallback = true ]] ) -proto ResourceBundle resourcebundle_create( string $bundlename [, string $locale [, bool $fallback = true ]] ) */ +/* {{{ proto ResourceBundle ResourceBundle::create( string $locale [, string $bundlename [, bool $fallback = true ]] ) +proto ResourceBundle resourcebundle_create( string $locale [, string $bundlename [, bool $fallback = true ]] ) +*/ PHP_FUNCTION( resourcebundle_create ) { object_init_ex( return_value, ResourceBundle_ce_ptr ); diff --git a/ext/json/json.c b/ext/json/json.c index c43401868..3e5d23fd9 100644 --- a/ext/json/json.c +++ b/ext/json/json.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: json.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: json.c 301028 2010-07-06 17:01:30Z scottmac $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -37,15 +37,6 @@ static PHP_FUNCTION(json_last_error); static const char digits[] = "0123456789abcdef"; -#define PHP_JSON_HEX_TAG (1<<0) -#define PHP_JSON_HEX_AMP (1<<1) -#define PHP_JSON_HEX_APOS (1<<2) -#define PHP_JSON_HEX_QUOT (1<<3) -#define PHP_JSON_FORCE_OBJECT (1<<4) - -#define PHP_JSON_OUTPUT_ARRAY 0 -#define PHP_JSON_OUTPUT_OBJECT 1 - ZEND_DECLARE_MODULE_GLOBALS(json) /* {{{ arginfo */ @@ -81,12 +72,14 @@ static PHP_MINIT_FUNCTION(json) REGISTER_LONG_CONSTANT("JSON_HEX_APOS", PHP_JSON_HEX_APOS, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_HEX_QUOT", PHP_JSON_HEX_QUOT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_FORCE_OBJECT", PHP_JSON_FORCE_OBJECT, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("JSON_NUMERIC_CHECK", PHP_JSON_NUMERIC_CHECK, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_NONE", PHP_JSON_ERROR_NONE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_DEPTH", PHP_JSON_ERROR_DEPTH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_STATE_MISMATCH", PHP_JSON_ERROR_STATE_MISMATCH, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_CTRL_CHAR", PHP_JSON_ERROR_CTRL_CHAR, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("JSON_ERROR_SYNTAX", PHP_JSON_ERROR_SYNTAX, CONST_CS | CONST_PERSISTENT); + REGISTER_LONG_CONSTANT("JSON_ERROR_UTF8", PHP_JSON_ERROR_UTF8, CONST_CS | CONST_PERSISTENT); return SUCCESS; } @@ -293,6 +286,30 @@ static void json_escape_string(smart_str *buf, char *s, int len, int options TSR return; } + if (options & PHP_JSON_NUMERIC_CHECK) { + double d; + int type; + long p; + + if ((type = is_numeric_string(s, len, &p, &d, 0)) != 0) { + if (type == IS_LONG) { + smart_str_append_long(buf, p); + } else if (type == IS_DOUBLE) { + if (!zend_isinf(d) && !zend_isnan(d)) { + char *tmp; + int l = spprintf(&tmp, 0, "%.*k", (int) EG(precision), d); + smart_str_appendl(buf, tmp, l); + efree(tmp); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "double %.9g does not conform to the JSON spec, encoded as 0", d); + smart_str_appendc(buf, '0'); + } + } + return; + } + + } + utf16 = (unsigned short *) safe_emalloc(len, sizeof(unsigned short), 0); len = utf8_to_utf16(utf16, s, len); @@ -444,7 +461,7 @@ PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_ smart_str_appendl(buf, d, len); efree(d); } else { - zend_error(E_WARNING, "[json] (php_json_encode) double %.9g does not conform to the JSON spec, encoded as 0", dbl); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "double %.9g does not conform to the JSON spec, encoded as 0", dbl); smart_str_appendc(buf, '0'); } } @@ -460,7 +477,7 @@ PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_ break; default: - zend_error(E_WARNING, "[json] (php_json_encode) type is unsupported, encoded as null"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "type is unsupported, encoded as null"); smart_str_appendl(buf, "null", 4); break; } @@ -483,6 +500,7 @@ PHP_JSON_API void php_json_decode(zval *return_value, char *str, int str_len, ze if (utf16) { efree(utf16); } + JSON_G(error_code) = PHP_JSON_ERROR_UTF8; RETURN_NULL(); } diff --git a/ext/json/php_json.h b/ext/json/php_json.h index 44c876f21..37efd9c64 100644 --- a/ext/json/php_json.h +++ b/ext/json/php_json.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_json.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_json.h 299535 2010-05-20 19:37:52Z iliaa $ */ #ifndef PHP_JSON_H #define PHP_JSON_H @@ -50,6 +50,16 @@ ZEND_END_MODULE_GLOBALS(json) PHP_JSON_API void php_json_encode(smart_str *buf, zval *val, int options TSRMLS_DC); PHP_JSON_API void php_json_decode(zval *return_value, char *str, int str_len, zend_bool assoc, long depth TSRMLS_DC); +#define PHP_JSON_HEX_TAG (1<<0) +#define PHP_JSON_HEX_AMP (1<<1) +#define PHP_JSON_HEX_APOS (1<<2) +#define PHP_JSON_HEX_QUOT (1<<3) +#define PHP_JSON_FORCE_OBJECT (1<<4) +#define PHP_JSON_NUMERIC_CHECK (1<<5) + +#define PHP_JSON_OUTPUT_ARRAY 0 +#define PHP_JSON_OUTPUT_OBJECT 1 + #endif /* PHP_JSON_H */ /* diff --git a/ext/json/tests/003.phpt b/ext/json/tests/003.phpt index f10baa9d1..3b52fb088 100644 --- a/ext/json/tests/003.phpt +++ b/ext/json/tests/003.phpt @@ -21,10 +21,7 @@ array(1) { [0]=> &array(1) { [0]=> - &array(1) { - [0]=> - *RECURSION* - } + *RECURSION* } } diff --git a/ext/json/tests/004.phpt b/ext/json/tests/004.phpt index 884d87420..1d282f9a9 100644 --- a/ext/json/tests/004.phpt +++ b/ext/json/tests/004.phpt @@ -16,10 +16,7 @@ echo "Done\n"; --EXPECTF-- object(stdClass)#%d (1) { ["prop"]=> - object(stdClass)#%d (1) { - ["prop"]=> - *RECURSION* - } + *RECURSION* } Warning: json_encode(): recursion detected in %s on line %d diff --git a/ext/json/tests/json_encode_basic.phpt b/ext/json/tests/json_encode_basic.phpt index 4124d0658..003fcd44c 100644 --- a/ext/json/tests/json_encode_basic.phpt +++ b/ext/json/tests/json_encode_basic.phpt @@ -151,8 +151,8 @@ string(4) "null" string(4) "null" -- Iteration 26 -- -Warning: [json] (php_json_encode) type is unsupported, encoded as null in %s on line %d +Warning: json_encode(): type is unsupported, encoded as null in %s on line %d string(4) "null" -- Iteration 27 -- string(82) "{"MyInt":99,"MyFloat":123.45,"MyBool":true,"MyNull":null,"MyString":"Hello World"}" -===Done===
\ No newline at end of file +===Done=== diff --git a/ext/ldap/config.w32 b/ext/ldap/config.w32 index f521fe574..42d285fd4 100644 --- a/ext/ldap/config.w32 +++ b/ext/ldap/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 263930 2008-07-31 18:04:49Z pajoye $ +// $Id: config.w32 299434 2010-05-17 20:09:42Z pajoye $ // vim:ft=javascript ARG_WITH("ldap", "LDAP support", "no"); @@ -11,13 +11,17 @@ if (PHP_LDAP != "no") { CHECK_LIB("ssleay32.lib", "ldap", PHP_LDAP) && CHECK_LIB("libeay32.lib", "ldap", PHP_LDAP) && CHECK_LIB("oldap32_a.lib", "ldap", PHP_LDAP) && - CHECK_LIB("olber32_a.lib", "ldap", PHP_LDAP)) { + CHECK_LIB("olber32_a.lib", "ldap", PHP_LDAP)&& + CHECK_LIB("libsasl.lib", "ldap", PHP_LDAP)) { EXTENSION('ldap', 'ldap.c'); AC_DEFINE('HAVE_LDAP_PARSE_RESULT', 1); AC_DEFINE('HAVE_LDAP_PARSE_REFERENCE', 1); AC_DEFINE('HAVE_LDAP_START_TLS_S', 1); AC_DEFINE('HAVE_LDAP', 1); + AC_DEFINE('HAVE_LDAP_SASL', 1); + AC_DEFINE('HAVE_LDAP_SASL_SASL_H', 1); + AC_DEFINE('LDAP_DEPRECATED', 1); } else { WARNING("ldap not enabled; libraries and headers not found"); diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index c13912496..c436bb4ad 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -23,7 +23,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: ldap.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: ldap.c 299434 2010-05-17 20:09:42Z pajoye $ */ #define IS_EXT_MODULE #ifdef HAVE_CONFIG_H @@ -46,6 +46,7 @@ #ifdef PHP_WIN32 #include <string.h> +#include "config.w32.h" #if HAVE_NSLDAP #include <winsock2.h> #endif @@ -225,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 293036 2010-01-03 09:23:27Z sebastian $"); + php_info_print_table_row(2, "RCS Version", "$Id: ldap.c 299434 2010-05-17 20:09:42Z pajoye $"); 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 fc4e3e8f2..c6cab4eaf 100644 --- a/ext/ldap/php_ldap.h +++ b/ext/ldap/php_ldap.h @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_ldap.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_ldap.h 299434 2010-05-17 20:09:42Z pajoye $ */ #ifndef PHP_LDAP_H #define PHP_LDAP_H @@ -26,6 +26,7 @@ #ifndef HAVE_ORALDAP #include <lber.h> #endif + #include <ldap.h> extern zend_module_entry ldap_module_entry; diff --git a/ext/mbstring/config.m4 b/ext/mbstring/config.m4 index ef7678347..1ed7843c3 100644 --- a/ext/mbstring/config.m4 +++ b/ext/mbstring/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 291283 2009-11-25 01:30:06Z rasmus $ +dnl $Id: config.m4 296101 2010-03-12 04:55:37Z moriyoshi $ dnl AC_DEFUN([PHP_MBSTRING_ADD_SOURCES], [ @@ -229,17 +229,20 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_cp1251.c libmbfl/filters/mbfilter_cp1252.c libmbfl/filters/mbfilter_cp1254.c + libmbfl/filters/mbfilter_cp5022x.c + libmbfl/filters/mbfilter_cp51932.c + libmbfl/filters/mbfilter_cp850.c libmbfl/filters/mbfilter_cp866.c libmbfl/filters/mbfilter_cp932.c libmbfl/filters/mbfilter_cp936.c libmbfl/filters/mbfilter_euc_cn.c libmbfl/filters/mbfilter_euc_jp.c libmbfl/filters/mbfilter_euc_jp_win.c - libmbfl/filters/mbfilter_cp51932.c libmbfl/filters/mbfilter_euc_kr.c libmbfl/filters/mbfilter_euc_tw.c libmbfl/filters/mbfilter_htmlent.c libmbfl/filters/mbfilter_hz.c + libmbfl/filters/mbfilter_iso2022_jp_ms.c libmbfl/filters/mbfilter_iso2022_kr.c libmbfl/filters/mbfilter_iso8859_1.c libmbfl/filters/mbfilter_iso8859_10.c @@ -256,11 +259,12 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_iso8859_8.c libmbfl/filters/mbfilter_iso8859_9.c libmbfl/filters/mbfilter_jis.c - libmbfl/filters/mbfilter_iso2022_jp_ms.c libmbfl/filters/mbfilter_koi8r.c libmbfl/filters/mbfilter_armscii8.c libmbfl/filters/mbfilter_qprint.c libmbfl/filters/mbfilter_sjis.c + libmbfl/filters/mbfilter_sjis_open.c + libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c libmbfl/filters/mbfilter_ucs2.c libmbfl/filters/mbfilter_ucs4.c libmbfl/filters/mbfilter_uhc.c @@ -271,7 +275,6 @@ AC_DEFUN([PHP_MBSTRING_SETUP_LIBMBFL], [ libmbfl/filters/mbfilter_utf8.c libmbfl/filters/mbfilter_uuencode.c libmbfl/filters/mbfilter_koi8u.c - libmbfl/filters/mbfilter_cp850.c libmbfl/mbfl/mbfilter.c libmbfl/mbfl/mbfilter_8bit.c libmbfl/mbfl/mbfilter_pass.c diff --git a/ext/mbstring/config.w32 b/ext/mbstring/config.w32 index ca1ef2315..4e6e4158e 100644 --- a/ext/mbstring/config.w32 +++ b/ext/mbstring/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 282040 2009-06-12 16:15:51Z kalle $ +// $Id: config.w32 296250 2010-03-15 16:20:19Z rrichards $ // vim:ft=javascript ARG_ENABLE("mbstring", "multibyte string functions", "no"); @@ -7,7 +7,7 @@ ARG_ENABLE("mbregex-backtrack", "check multibyte regex backtrack", "yes"); if (PHP_MBSTRING != "no") { - FSO.CopyFile("ext\\mbstring\\libmbfl\\config.h.vc6", + FSO.CopyFile("ext\\mbstring\\libmbfl\\config.h.w32", "ext\\mbstring\\libmbfl\\config.h", true); FSO.CopyFile("ext\\mbstring\\oniguruma\\win32\\config.h", "ext\\mbstring\\oniguruma\\config.h", true); @@ -34,7 +34,9 @@ if (PHP_MBSTRING != "no") { mbfilter_ucs4.c mbfilter_uhc.c mbfilter_utf16.c mbfilter_utf32.c \ mbfilter_utf7.c mbfilter_utf7imap.c mbfilter_utf8.c \ mbfilter_koi8u.c mbfilter_cp1254.c \ - mbfilter_uuencode.c mbfilter_armscii8.c mbfilter_cp850.c ", "mbstring"); + mbfilter_uuencode.c mbfilter_armscii8.c mbfilter_cp850.c \ + mbfilter_cp5022x.c mbfilter_sjis_open.c \ + mbfilter_tl_jisx0201_jisx0208.c", "mbstring"); ADD_SOURCES("ext/mbstring/libmbfl/mbfl", "mbfilter.c mbfilter_8bit.c \ mbfilter_pass.c mbfilter_wchar.c mbfl_convert.c mbfl_encoding.c \ diff --git a/ext/mbstring/libmbfl/Makefile.am b/ext/mbstring/libmbfl/Makefile.am index 070a7fcc6..788610486 100644 --- a/ext/mbstring/libmbfl/Makefile.am +++ b/ext/mbstring/libmbfl/Makefile.am @@ -2,8 +2,6 @@ AUTOMAKE_OPTIONS=dejagnu DEJATOOL=conv_encoding conv_kana strwidth strcut RUNTESTDEFAULTFLAGS=--tool $$tool --srcdir "$$srcdir"/tests LANG=C -EXTRA_DIST=AUTHORS DISCLAIMER LICENSE Makefile.bcc32 \ - config.h.bcc32 config.h.vc6 \ - libmbfl.dsp libmbfl.dsw libmbfl.sln libmbfl.vcproj mbfl.rc \ - mksbcc32.bat rules.mak.bcc32 +EXTRA_DIST=AUTHORS DISCLAIMER LICENSE buildconf SUBDIRS = nls filters mbfl tests +CLEANFILES=*.log *.sum diff --git a/ext/mbstring/libmbfl/Makefile.bcc32 b/ext/mbstring/libmbfl/Makefile.bcc32 deleted file mode 100644 index 6dde6b838..000000000 --- a/ext/mbstring/libmbfl/Makefile.bcc32 +++ /dev/null @@ -1,33 +0,0 @@ -!include rules.mak.bcc32 - -SUBDIRS=mbfl nls filters - -all: mbfl.dll mbfl.lib - -mbfl.lib: mbfl.dll - implib -a mbfl.lib mbfl.dll - -mbfl.dll: compile mbfl.res - @if exist linker.rsp del linker.rsp - @for %i in ($(SUBDIRS)) do @for %j in (%i\*.obj) do @echo %j+ >> linker.rsp - ilink32 $(LDFLAGS) @linker.rsp,mbfl.dll,,$(LIBS),,mbfl.res - del linker.rsp - -mbfl.res: mbfl.rc - brcc32 -r mbfl.rc - -prepare: config.h.bcc32 - @if exist linker.rsp del linker.rsp - @copy config.h.bcc32 config.h - -clean: - @for %i in ($(SUBDIRS)) do $(COMSPEC) /C mksbcc32.bat $(MAKE) %i clean - @if exist linker.rsp del linker.rsp - @if exist mbfl.RES del mbfl.RES - @if exist mbfl.dll del mbfl.dll - @if exist mbfl.lib del mbfl.lib - @if exist config.h del config.h - -compile: prepare - @for %i in ($(SUBDIRS)) do $(COMSPEC) /C mksbcc32.bat $(MAKE) %i - diff --git a/ext/mbstring/libmbfl/config.h.in b/ext/mbstring/libmbfl/config.h.in index 8e7493257..bded33ae7 100644 --- a/ext/mbstring/libmbfl/config.h.in +++ b/ext/mbstring/libmbfl/config.h.in @@ -50,6 +50,10 @@ /* Define to 1 if you have the <unistd.h> header file. */ #undef HAVE_UNISTD_H +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE @@ -65,6 +69,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -83,5 +90,5 @@ /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc -/* Define to `unsigned' if <sys/types.h> does not define. */ +/* Define to `unsigned int' if <sys/types.h> does not define. */ #undef size_t diff --git a/ext/mbstring/libmbfl/config.h.vc6 b/ext/mbstring/libmbfl/config.h.vc6 deleted file mode 100644 index 7458e441e..000000000 --- a/ext/mbstring/libmbfl/config.h.vc6 +++ /dev/null @@ -1,12 +0,0 @@ -#define HAVE_STDIO_H 1 -#define HAVE_STDLIB_H 1 -#define HAVE_STDDEF_H 1 -#define HAVE_ASSERT_H 1 -#define HAVE_MEMORY_H 1 -/* #undef HAVE_STRINGS_H */ -#define HAVE_STRING_H 1 -/* #undef HAVE_STRCASECMP */ -#define HAVE_STRICMP 1 -#define HAVE_WIN32_NATIVE_THREAD 1 -#define USE_WIN32_NATIVE_THREAD 1 -#define ENABLE_THREADS 1 diff --git a/ext/mbstring/libmbfl/config.h.bcc32 b/ext/mbstring/libmbfl/config.h.w32 index 7458e441e..7458e441e 100644 --- a/ext/mbstring/libmbfl/config.h.bcc32 +++ b/ext/mbstring/libmbfl/config.h.w32 diff --git a/ext/mbstring/libmbfl/configure.in b/ext/mbstring/libmbfl/configure.in index 47e1026c7..f7fd58f85 100644 --- a/ext/mbstring/libmbfl/configure.in +++ b/ext/mbstring/libmbfl/configure.in @@ -1,10 +1,12 @@ # Process this file with autoconf to produce a configure script. AC_INIT(mbfl/mbfilter.c) -AM_INIT_AUTOMAKE(libmbfl, 1.0.2) +AM_INIT_AUTOMAKE(libmbfl, 1.1.0) AC_CONFIG_SRCDIR(mbfl/mbfilter.c) AM_CONFIG_HEADER(config.h) -SHLIB_VERSION="1:0:2" +# SHLIB isn't a version number but the API reference +# Read http://www.gnu.org/software/libtool/manual/libtool.html#Updating-version-info +SHLIB_VERSION="1:1:0" AC_SUBST(SHLIB_VERSION) # Checks for programs. diff --git a/ext/mbstring/libmbfl/filters/Makefile.am b/ext/mbstring/libmbfl/filters/Makefile.am index 802af4e61..99df73b8d 100644 --- a/ext/mbstring/libmbfl/filters/Makefile.am +++ b/ext/mbstring/libmbfl/filters/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST=Makefile.bcc32 mk_sb_tbl.awk +EXTRA_DIST=mk_sb_tbl.awk noinst_LTLIBRARIES=libmbfl_filters.la INCLUDES=-I../mbfl libmbfl_filters_la_LDFLAGS=-version-info $(SHLIB_VERSION) @@ -32,6 +32,7 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_uuencode.c \ mbfilter_base64.c \ mbfilter_sjis.c \ + mbfilter_sjis_open.c \ mbfilter_7bit.c \ mbfilter_qprint.c \ mbfilter_ucs4.c \ @@ -47,12 +48,15 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_euc_cn.c \ mbfilter_euc_kr.c \ mbfilter_uhc.c \ + mbfilter_iso2022_jp_ms.c \ mbfilter_iso2022_kr.c \ mbfilter_cp866.c \ mbfilter_koi8r.c \ mbfilter_koi8u.c \ mbfilter_armscii8.c \ mbfilter_cp850.c \ + mbfilter_cp5022x.c \ + mbfilter_tl_jisx0201_jisx0208.c \ html_entities.c \ cp932_table.h \ html_entities.h \ @@ -75,6 +79,7 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_euc_tw.h \ mbfilter_htmlent.h \ mbfilter_hz.h \ + mbfilter_iso2022_jp_ms.h \ mbfilter_iso2022_kr.h \ mbfilter_iso8859_1.h \ mbfilter_iso8859_10.h \ @@ -96,6 +101,7 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_armscii8.h \ mbfilter_qprint.h \ mbfilter_sjis.h \ + mbfilter_sjis_open.h \ mbfilter_ucs2.h \ mbfilter_ucs4.h \ mbfilter_uhc.h \ @@ -105,8 +111,10 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ mbfilter_utf7imap.h \ mbfilter_utf8.h \ mbfilter_uuencode.h \ + mbfilter_cp5022x.h \ mbfilter_cp51932.h \ mbfilter_cp850.h \ + mbfilter_tl_jisx0201_jisx0208.h \ unicode_prop.h \ unicode_table_big5.h \ unicode_table_cns11643.h \ @@ -134,7 +142,8 @@ libmbfl_filters_la_SOURCES=mbfilter_cp936.c \ unicode_table_koi8u.h \ unicode_table_armscii8.h \ unicode_table_cp850.h \ - unicode_table_uhc.h + unicode_table_uhc.h \ + translit_kana_jisx0201_jisx0208.h mbfilter_iso8859_2.c: unicode_table_iso8859_2.h diff --git a/ext/mbstring/libmbfl/filters/Makefile.bcc32 b/ext/mbstring/libmbfl/filters/Makefile.bcc32 deleted file mode 100644 index 841c09632..000000000 --- a/ext/mbstring/libmbfl/filters/Makefile.bcc32 +++ /dev/null @@ -1,59 +0,0 @@ -!include ..\rules.mak.bcc32 -INCLUDES=$(INCLUDES) -I../mbfl -OBJS=mbfilter_cp936.obj \ - mbfilter_hz.obj \ - mbfilter_euc_tw.obj \ - mbfilter_big5.obj \ - mbfilter_euc_jp.obj \ - mbfilter_jis.obj \ - mbfilter_iso8859_1.obj \ - mbfilter_iso8859_2.obj \ - mbfilter_cp1252.obj \ - mbfilter_cp1251.obj \ - mbfilter_cp1254.obj \ - mbfilter_ascii.obj \ - mbfilter_iso8859_3.obj \ - mbfilter_iso8859_4.obj \ - mbfilter_iso8859_5.obj \ - mbfilter_iso8859_6.obj \ - mbfilter_iso8859_7.obj \ - mbfilter_iso8859_8.obj \ - mbfilter_iso8859_9.obj \ - mbfilter_iso8859_10.obj \ - mbfilter_iso8859_13.obj \ - mbfilter_iso8859_14.obj \ - mbfilter_iso8859_15.obj \ - mbfilter_iso8859_16.obj \ - mbfilter_htmlent.obj \ - mbfilter_byte2.obj \ - mbfilter_byte4.obj \ - mbfilter_uuencode.obj \ - mbfilter_base64.obj \ - mbfilter_sjis.obj \ - mbfilter_7bit.obj \ - mbfilter_qprint.obj \ - mbfilter_ucs4.obj \ - mbfilter_ucs2.obj \ - mbfilter_utf32.obj \ - mbfilter_utf16.obj \ - mbfilter_utf8.obj \ - mbfilter_utf7.obj \ - mbfilter_utf7imap.obj \ - mbfilter_euc_jp_win.obj \ - mbfilter_cp932.obj \ - mbfilter_euc_cn.obj \ - mbfilter_euc_kr.obj \ - mbfilter_uhc.obj \ - mbfilter_iso2022_kr.obj \ - mbfilter_cp866.obj \ - mbfilter_koi8r.obj \ - mbfilter_koi8u.obj \ - html_entities.obj \ - mbfilter_armscii8.obj \ - mbfilter_cp850.obj - -all: $(OBJS) - -clean: - @for %i in ($(OBJS)) do @if exist %i del %i - diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c new file mode 100644 index 000000000..587bff88c --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.c @@ -0,0 +1,1299 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: Moriyoshi Koizumi <koizumi@gree.co.jp> + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_cp5022x.h" +#include "mbfilter_jis.h" +#include "mbfilter_tl_jisx0201_jisx0208.h" + +#include "unicode_table_cp932_ext.h" +#include "unicode_table_jis.h" +#include "cp932_table.h" + +typedef struct _mbfl_filt_conv_wchar_cp50220_ctx { + mbfl_filt_tl_jisx0201_jisx0208_param tl_param; + mbfl_convert_filter last; +} mbfl_filt_conv_wchar_cp50220_ctx; + +static int mbfl_filt_ident_jis_ms(int c, mbfl_identify_filter *filter); +static int mbfl_filt_ident_cp50220(int c, mbfl_identify_filter *filter); +static int mbfl_filt_ident_cp50221(int c, mbfl_identify_filter *filter); +static int mbfl_filt_ident_cp50222(int c, mbfl_identify_filter *filter); +static void mbfl_filt_conv_wchar_cp50220_ctor(mbfl_convert_filter *filt); +static void mbfl_filt_conv_wchar_cp50220_dtor(mbfl_convert_filter *filt); +static void mbfl_filt_conv_wchar_cp50220_copy(mbfl_convert_filter *src, mbfl_convert_filter *dest); + +const mbfl_encoding mbfl_encoding_jis_ms = { + mbfl_no_encoding_jis_ms, + "JIS-ms", + "ISO-2022-JP", + NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE +}; + +const mbfl_encoding mbfl_encoding_cp50220 = { + mbfl_no_encoding_cp50220, + "CP50220", + "ISO-2022-JP", + (const char *(*)[])NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE +}; + +const mbfl_encoding mbfl_encoding_cp50220raw = { + mbfl_no_encoding_cp50220raw, + "CP50220raw", + "ISO-2022-JP", + (const char *(*)[])NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE +}; + +const mbfl_encoding mbfl_encoding_cp50221 = { + mbfl_no_encoding_cp50221, + "CP50221", + "ISO-2022-JP", + NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE +}; + +const mbfl_encoding mbfl_encoding_cp50222 = { + mbfl_no_encoding_cp50222, + "CP50222", + "ISO-2022-JP", + NULL, + NULL, + MBFL_ENCTYPE_MBCS | MBFL_ENCTYPE_SHFTCODE +}; + +const struct mbfl_identify_vtbl vtbl_identify_jis_ms = { + mbfl_no_encoding_jis_ms, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_jis_ms +}; + +const struct mbfl_identify_vtbl vtbl_identify_cp50220 = { + mbfl_no_encoding_cp50220, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_cp50220 +}; + +const struct mbfl_identify_vtbl vtbl_identify_cp50220raw = { + mbfl_no_encoding_cp50220raw, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_cp50220 +}; + +const struct mbfl_identify_vtbl vtbl_identify_cp50221 = { + mbfl_no_encoding_cp50221, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_cp50221 +}; + +const struct mbfl_identify_vtbl vtbl_identify_cp50222 = { + mbfl_no_encoding_cp50222, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_cp50222 +}; + +const struct mbfl_convert_vtbl vtbl_jis_ms_wchar = { + mbfl_no_encoding_jis_ms, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis_ms_wchar, + mbfl_filt_conv_common_flush, +}; + +const struct mbfl_convert_vtbl vtbl_wchar_jis_ms = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_jis_ms, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_jis_ms, + mbfl_filt_conv_any_jis_flush +}; + +const struct mbfl_convert_vtbl vtbl_cp50220_wchar = { + mbfl_no_encoding_cp50220, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis_ms_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_cp50220 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_cp50220, + mbfl_filt_conv_wchar_cp50220_ctor, + mbfl_filt_conv_wchar_cp50220_dtor, + mbfl_filt_conv_wchar_cp50221, + mbfl_filt_conv_any_jis_flush, + mbfl_filt_conv_wchar_cp50220_copy +}; + +const struct mbfl_convert_vtbl vtbl_cp50220raw_wchar = { + mbfl_no_encoding_cp50220raw, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis_ms_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_cp50220raw = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_cp50220raw, + mbfl_filt_conv_wchar_cp50220_ctor, + mbfl_filt_conv_wchar_cp50220_dtor, + mbfl_filt_conv_wchar_cp50220raw, + mbfl_filt_conv_any_jis_flush, + mbfl_filt_conv_wchar_cp50220_copy +}; + +const struct mbfl_convert_vtbl vtbl_cp50221_wchar = { + mbfl_no_encoding_cp50221, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis_ms_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_cp50221 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_cp50221, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_cp50221, + mbfl_filt_conv_any_jis_flush +}; + +const struct mbfl_convert_vtbl vtbl_cp50222_wchar = { + mbfl_no_encoding_cp50222, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_jis_ms_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_cp50222 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_cp50222, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_cp50222, + mbfl_filt_conv_wchar_cp50222_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +/* + * JIS-ms => wchar + */ +int +mbfl_filt_conv_jis_ms_wchar(int c, mbfl_convert_filter *filter) +{ + int c1, s, w; + +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x10: X 0201 latin */ +/* case 0x20: X 0201 kana */ +/* case 0x80: X 0208 */ +/* case 0x90: X 0212 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (c == 0x0e) { /* "kana in" */ + filter->status = 0x20; + } else if (c == 0x0f) { /* "kana out" */ + filter->status = 0; + } else if (filter->status == 0x10 && c == 0x5c) { /* YEN SIGN */ + CK((*filter->output_function)(0xa5, filter->data)); + } else if (filter->status == 0x10 && c == 0x7e) { /* OVER LINE */ + CK((*filter->output_function)(0x203e, filter->data)); + } else if (filter->status == 0x20 && c > 0x20 && c < 0x60) { /* kana */ + CK((*filter->output_function)(0xff40 + c, filter->data)); + } else if ((filter->status == 0x80 || filter->status == 0x90) && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->cache = c; + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else if (c > 0xa0 && c < 0xe0) { /* GR kana */ + CK((*filter->output_function)(0xfec0 + c, filter->data)); + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + +/* case 0x81: X 0208 second char */ +/* case 0x91: X 0212 second char */ + case 1: + filter->status &= ~0xf; + c1 = filter->cache; + if (c > 0x20 && c < 0x7f) { + s = (c1 - 0x21)*94 + c - 0x21; + if (filter->status == 0x80) { + if (s >= 0 && s < jisx0208_ucs_table_size) { + w = jisx0208_ucs_table[s]; + } else if (s >= cp932ext1_ucs_table_min && s < cp932ext1_ucs_table_max) { + w = cp932ext1_ucs_table[s - cp932ext1_ucs_table_min]; + } else if (s >= cp932ext2_ucs_table_min && s < cp932ext2_ucs_table_max) { + w = cp932ext2_ucs_table[s - cp932ext2_ucs_table_min]; + } else if (s >= cp932ext3_ucs_table_min && s < cp932ext2_ucs_table_max) { + w = cp932ext3_ucs_table[s - cp932ext3_ucs_table_min]; + } else if (s >= 94 * 94 && s < 114 * 94) { + /* user-defined => PUA (Microsoft extended) */ + w = (s & 0xff) + ((s >> 8) - 94) * 94 + 0xe000; + } else if (s >= 212 * 94 && s < 222 * 94) { + /* user-defined => PUA (G3 85 - 94 Ku) */ + w = (s & 0xff) + ((s >> 8) - 212) * 94 + 0xe000 + 10 * 94; + } else { + w = 0; + } + if (w <= 0) { + w = (c1 << 8) | c; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0208; + } + } else { + if (s >= 0 && s < jisx0212_ucs_table_size) { + w = jisx0212_ucs_table[s]; + } else { + w = 0; + } + if (w <= 0) { + w = (c1 << 8) | c; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_JIS0212; + } + } + CK((*filter->output_function)(w, filter->data)); + } else if (c == 0x1b) { + filter->status += 2; + } else if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else { + w = (c1 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + /* ESC */ +/* case 0x02: */ +/* case 0x12: */ +/* case 0x22: */ +/* case 0x82: */ +/* case 0x92: */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + goto retry; + } + break; + + /* ESC $ */ +/* case 0x03: */ +/* case 0x13: */ +/* case 0x23: */ +/* case 0x83: */ +/* case 0x93: */ + case 3: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else if (c == 0x28) { /* '(' */ + filter->status++; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x24, filter->data)); + goto retry; + } + break; + + /* ESC $ ( */ +/* case 0x04: */ +/* case 0x14: */ +/* case 0x24: */ +/* case 0x84: */ +/* case 0x94: */ + case 4: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else if (c == 0x44) { /* 'D' */ + filter->status = 0x90; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x24, filter->data)); + CK((*filter->output_function)(0x28, filter->data)); + goto retry; + } + break; + + /* ESC ( */ +/* case 0x05: */ +/* case 0x15: */ +/* case 0x25: */ +/* case 0x85: */ +/* case 0x95: */ + case 5: + if (c == 0x42 || c == 0x48) { /* 'B' or 'H' */ + filter->status = 0; + } else if (c == 0x4a) { /* 'J' */ + filter->status = 0x10; + } else if (c == 0x49) { /* 'I' */ + filter->status = 0x20; + } else { + filter->status &= ~0xf; + CK((*filter->output_function)(0x1b, filter->data)); + CK((*filter->output_function)(0x28, filter->data)); + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +/* + * wchar => JIS + */ +int +mbfl_filt_conv_wchar_jis_ms(int c, mbfl_convert_filter *filter) +{ + int c1, s; + + s = 0; + if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { + s = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { + s = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; + } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { + s = ucs_i_jis_table[c - ucs_i_jis_table_min]; + } else if (c >= ucs_r_jis_table_min && c < ucs_r_jis_table_max) { + s = ucs_r_jis_table[c - ucs_r_jis_table_min]; + } else if (c >= 0xe000 && c < (0xe000 + 10 * 94)) { + /* PUE => Microsoft extended (pseudo 95ku - 114ku) */ + /* See http://www.opengroup.or.jp/jvc/cde/ucs-conv.html#ch4_2 */ + s = c - 0xe000; + s = (s / 94 + 0x75) << 8 | (s % 94 + 0x21); + } else if (c >= (0xe000 + 10 * 94) && c <= (0xe000 + 20 * 94)) { + /* PUE => JISX0212 user-defined (G3 85ku - 94ku) */ + /* See http://www.opengroup.or.jp/jvc/cde/ucs-conv.html#ch4_2 */ + s = c - (0xe000 + 10 * 94); + s = (s / 94 + 0xf5) << 8 | (s % 94 + 0xa1); + } + + /* do some transliteration */ + if (s <= 0) { + c1 = c & ~MBFL_WCSPLANE_MASK; + if (c1 == MBFL_WCSPLANE_JIS0208) { + s = c & MBFL_WCSPLANE_MASK; + } else if (c1 == MBFL_WCSPLANE_JIS0212) { + s = c & MBFL_WCSPLANE_MASK; + s |= 0x8080; + } else if (c == 0xa5) { /* YEN SIGN */ + s = 0x1005c; + } else if (c == 0x203e) { /* OVER LINE */ + s = 0x1007e; + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s = 0x2140; + } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ + s = 0x2141; + } else if (c == 0x2225) { /* PARALLEL TO */ + s = 0x2142; + } else if (c == 0xff0d) { /* FULLWIDTH HYPHEN-MINUS */ + s = 0x215d; + } else if (c == 0xffe0) { /* FULLWIDTH CENT SIGN */ + s = 0x2171; + } else if (c == 0xffe1) { /* FULLWIDTH POUND SIGN */ + s = 0x2172; + } else if (c == 0xffe2) { /* FULLWIDTH NOT SIGN */ + s = 0x224c; + } + } + if (s <= 0 || s >= 0x8080 && s < 0x10000) { + int i; + s = -1; + + for (i = 0; + i < cp932ext1_ucs_table_max - cp932ext1_ucs_table_min; i++) { + const int oh = cp932ext1_ucs_table_min / 94; + + if (c == cp932ext1_ucs_table[i]) { + s = ((i / 94 + oh + 0x21) << 8) + (i % 94 + 0x21); + break; + } + } + + if (s < 0) { + const int oh = cp932ext2_ucs_table_min / 94; + const int cp932ext2_ucs_table_size = + cp932ext2_ucs_table_max - cp932ext2_ucs_table_min; + for (i = 0; i < cp932ext2_ucs_table_size; i++) { + if (c == cp932ext2_ucs_table[i]) { + s = ((i / 94 + oh + 0x21) << 8) + (i % 94 + 0x21); + break; + } + } + } + + if (s < 0) { + const int cp932ext3_ucs_table_size = + cp932ext3_ucs_table_max - cp932ext3_ucs_table_min; + const int limit = cp932ext3_ucs_table_size > + cp932ext3_eucjp_table_size ? + cp932ext3_eucjp_table_size: + cp932ext3_ucs_table_size; + for (i = 0; i < limit; i++) { + if (c == cp932ext3_ucs_table[i]) { + s = cp932ext3_eucjp_table[i]; + break; + } + } + } + + if (c == 0) { + s = 0; + } else if (s <= 0) { + s = -1; + } + } + + if (s >= 0) { + if (s < 0x80) { /* ASCII */ + if ((filter->status & 0xff00) != 0) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + } + filter->status = 0; + CK((*filter->output_function)(s, filter->data)); + } else if (s < 0x100) { /* kana */ + if ((filter->status & 0xff00) != 0x100) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x49, filter->data)); /* 'I' */ + } + filter->status = 0x100; + CK((*filter->output_function)(s & 0x7f, filter->data)); + } else if (s < 0x8080) { /* X 0208 */ + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + } + filter->status = 0x200; + CK((*filter->output_function)((s >> 8) & 0x7f, filter->data)); + CK((*filter->output_function)(s & 0x7f, filter->data)); + } else if (s < 0x10000) { /* X 0212 */ + if ((filter->status & 0xff00) != 0x300) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x44, filter->data)); /* 'D' */ + } + filter->status = 0x300; + CK((*filter->output_function)((s >> 8) & 0x7f, filter->data)); + CK((*filter->output_function)(s & 0x7f, filter->data)); + } else { /* X 0201 latin */ + if ((filter->status & 0xff00) != 0x400) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x4a, filter->data)); /* 'J' */ + } + filter->status = 0x400; + CK((*filter->output_function)(s & 0x7f, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} + +/* + * wchar => CP50220 + */ +static void +mbfl_filt_conv_wchar_cp50220_ctor(mbfl_convert_filter *filt) +{ + mbfl_filt_conv_wchar_cp50220_ctx *ctx; + + mbfl_filt_conv_common_ctor(filt); + + ctx = mbfl_malloc(sizeof(mbfl_filt_conv_wchar_cp50220_ctx)); + if (ctx == NULL) { + mbfl_filt_conv_common_dtor(filt); + return; + } + + ctx->tl_param.mode = MBFL_FILT_TL_HAN2ZEN_KATAKANA | MBFL_FILT_TL_HAN2ZEN_GLUE; + + ctx->last = *filt; + ctx->last.opaque = ctx; + ctx->last.data = filt->data; + filt->filter_function = vtbl_tl_jisx0201_jisx0208.filter_function; + filt->filter_flush = vtbl_tl_jisx0201_jisx0208.filter_flush; + filt->output_function = (int(*)(int, void *))ctx->last.filter_function; + filt->flush_function = (int(*)(void *))ctx->last.filter_flush; + filt->data = &ctx->last; + filt->opaque = ctx; + vtbl_tl_jisx0201_jisx0208.filter_ctor(filt); +} + +static void +mbfl_filt_conv_wchar_cp50220_copy(mbfl_convert_filter *src, mbfl_convert_filter *dest) +{ + mbfl_filt_conv_wchar_cp50220_ctx *ctx; + + *dest = *src; + ctx = mbfl_malloc(sizeof(mbfl_filt_conv_wchar_cp50220_ctx)); + if (ctx != NULL) { + *ctx = *(mbfl_filt_conv_wchar_cp50220_ctx*)src->opaque; + } + + dest->opaque = ctx; + dest->data = &ctx->last; +} + +static void +mbfl_filt_conv_wchar_cp50220_dtor(mbfl_convert_filter *filt) +{ + vtbl_tl_jisx0201_jisx0208.filter_dtor(filt); + + if (filt->opaque != NULL) { + mbfl_free(filt->opaque); + } + + mbfl_filt_conv_common_dtor(filt); +} + +/* + * wchar => cp50220raw + */ +int +mbfl_filt_conv_wchar_cp50220raw(int c, mbfl_convert_filter *filter) +{ + if (c & MBFL_WCSPLANE_JIS0208) { + const int s = c & MBFL_WCSPLANE_MASK; + + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + filter->status = 0x200; + } + CK((*filter->output_function)((s >> 8) & 0x7f, filter->data)); + CK((*filter->output_function)(s & 0x7f, filter->data)); + return c; + } else { + return mbfl_filt_conv_wchar_cp50221(c, filter); + } +} + +/* + * wchar => CP50221 + */ +int +mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter) +{ + int s = 0; + + if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { + s = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { + s = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; + } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { + s = ucs_i_jis_table[c - ucs_i_jis_table_min]; + } else if (c >= ucs_r_jis_table_min && c < ucs_r_jis_table_max) { + s = ucs_r_jis_table[c - ucs_r_jis_table_min]; + } else if (c >= 0xe000 && c < (0xe000 + 10 * 94)) { + /* PUE => Microsoft extended */ + /* See http://www.opengroup.or.jp/jvc/cde/ucs-conv.html#ch4_2 */ + s = c - 0xe000; + s = (s / 94 + 0x75) << 8 | (s % 94 + 0x21); + } else if (c >= (0xe000 + 10 * 94) && c <= (0xe000 + 20 * 94)) { + /* PUE => JISX0212 user-defined (G3 85ku - 94ku) */ + /* See http://www.opengroup.or.jp/jvc/cde/ucs-conv.html#ch4_2 */ + s = c - (0xe000 + 10 * 94); + s = (s / 94 + 0xf5) << 8 | (s % 94 + 0xa1); + } + + if (s <= 0) { + if (c == 0xa5) { /* YEN SIGN */ + s = 0x1005c; + } else if (c == 0x203e) { /* OVER LINE */ + s = 0x1007e; + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s = 0x2140; + } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ + s = 0x2141; + } else if (c == 0x2225) { /* PARALLEL TO */ + s = 0x2142; + } else if (c == 0xff0d) { /* FULLWIDTH HYPHEN-MINUS */ + s = 0x215d; + } else if (c == 0xffe0) { /* FULLWIDTH CENT SIGN */ + s = 0x2171; + } else if (c == 0xffe1) { /* FULLWIDTH POUND SIGN */ + s = 0x2172; + } else if (c == 0xffe2) { /* FULLWIDTH NOT SIGN */ + s = 0x224c; + } + } + if (s <= 0 || s >= 0x8080 && s < 0x10000) { + int i; + s = -1; + + for (i = 0; + i < cp932ext1_ucs_table_max - cp932ext1_ucs_table_min; + i++) { + const int oh = cp932ext1_ucs_table_min / 94; + + if (c == cp932ext1_ucs_table[i]) { + s = ((i / 94 + oh + 0x21) << 8) + (i % 94 + 0x21); + break; + } + } + + if (s < 0) { + const int oh = cp932ext2_ucs_table_min / 94; + const int cp932ext2_ucs_table_size = + cp932ext2_ucs_table_max - cp932ext2_ucs_table_min; + for (i = 0; i < cp932ext2_ucs_table_size; i++) { + if (c == cp932ext2_ucs_table[i]) { + s = ((i / 94 + oh + 0x21) << 8) + (i % 94 + 0x21); + break; + } + } + } + + if (s < 0) { + const int cp932ext3_ucs_table_size = + cp932ext3_ucs_table_max - cp932ext3_ucs_table_min; + const int limit = cp932ext3_ucs_table_size > + cp932ext3_eucjp_table_size ? + cp932ext3_eucjp_table_size: + cp932ext3_ucs_table_size; + for (i = 0; i < limit; i++) { + if (c == cp932ext3_ucs_table[i]) { + s = cp932ext3_eucjp_table[i]; + break; + } + } + } + + if (c == 0) { + s = 0; + } else if (s <= 0) { + s = -1; + } + } + + if (s >= 0) { + if (s < 0x80) { /* ASCII */ + if ((filter->status & 0xff00) != 0) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + filter->status = 0; + } + CK((*filter->output_function)(s, filter->data)); + } else if (s >= 0xa0 && s < 0xe0) { /* X 0201 kana */ + if ((filter->status & 0xff00) != 0x500) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x49, filter->data)); /* 'I' */ + filter->status = 0x500; + } + CK((*filter->output_function)(s - 0x80, filter->data)); + } else if (s < 0x8080) { /* X 0208 */ + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + filter->status = 0x200; + } + CK((*filter->output_function)((s >> 8) & 0x7f, filter->data)); + CK((*filter->output_function)(s & 0x7f, filter->data)); + } else if (s < 0x10000) { /* X0212 */ + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } else { /* X 0201 latin */ + if ((filter->status & 0xff00) != 0x400) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x4a, filter->data)); /* 'J' */ + } + filter->status = 0x400; + CK((*filter->output_function)(s & 0x7f, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} + +/* + * wchar => CP50222 + */ +int +mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter) +{ + int s; + + s = 0; + + if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { + s = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { + s = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; + } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { + s = ucs_i_jis_table[c - ucs_i_jis_table_min]; + } else if (c >= ucs_r_jis_table_min && c < ucs_r_jis_table_max) { + s = ucs_r_jis_table[c - ucs_r_jis_table_min]; + } else if (c >= 0xe000 && c < (0xe000 + 10 * 94)) { + /* PUE => Microsoft extended */ + /* See http://www.opengroup.or.jp/jvc/cde/ucs-conv.html#ch4_2 */ + s = c - 0xe000; + s = (s / 94 + 0x75) << 8 | (s % 94 + 0x21); + } else if (c >= (0xe000 + 10 * 94) && c <= (0xe000 + 20 * 94)) { + /* PUE => JISX0212 user-defined (G3 85ku - 94ku) */ + /* See http://www.opengroup.or.jp/jvc/cde/ucs-conv.html#ch4_2 */ + s = c - (0xe000 + 10 * 94); + s = (s / 94 + 0xf5) << 8 | (s % 94 + 0xa1); + } + + if (s <= 0) { + if (c == 0xa5) { /* YEN SIGN */ + s = 0x1005c; + } else if (c == 0x203e) { /* OVER LINE */ + s = 0x1007e; + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s = 0x2140; + } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ + s = 0x2141; + } else if (c == 0x2225) { /* PARALLEL TO */ + s = 0x2142; + } else if (c == 0xff0d) { /* FULLWIDTH HYPHEN-MINUS */ + s = 0x215d; + } else if (c == 0xffe0) { /* FULLWIDTH CENT SIGN */ + s = 0x2171; + } else if (c == 0xffe1) { /* FULLWIDTH POUND SIGN */ + s = 0x2172; + } else if (c == 0xffe2) { /* FULLWIDTH NOT SIGN */ + s = 0x224c; + } + } + if (s <= 0 || s >= 0x8080 && s < 0x10000) { + int i; + s = -1; + + for (i = 0; + i < cp932ext1_ucs_table_max - cp932ext1_ucs_table_min; i++) { + const int oh = cp932ext1_ucs_table_min / 94; + + if (c == cp932ext1_ucs_table[i]) { + s = ((i / 94 + oh + 0x21) << 8) + (i % 94 + 0x21); + break; + } + } + + if (s <= 0) { + const int oh = cp932ext2_ucs_table_min / 94; + const int cp932ext2_ucs_table_size = + cp932ext2_ucs_table_max - cp932ext2_ucs_table_min; + for (i = 0; i < cp932ext2_ucs_table_size; i++) { + if (c == cp932ext2_ucs_table[i]) { + s = ((i / 94 + oh + 0x21) << 8) + (i % 94 + 0x21); + break; + } + } + } + + if (s <= 0) { + const int cp932ext3_ucs_table_size = + cp932ext3_ucs_table_max - cp932ext3_ucs_table_min; + const int limit = cp932ext3_ucs_table_size > + cp932ext3_eucjp_table_size ? + cp932ext3_eucjp_table_size: + cp932ext3_ucs_table_size; + for (i = 0; i < limit; i++) { + if (c == cp932ext3_ucs_table[i]) { + s = cp932ext3_eucjp_table[i]; + break; + } + } + } + + if (c == 0) { + s = 0; + } else if (s <= 0) { + s = -1; + } + } + + if (s >= 0) { + if (s < 0x80) { /* ASCII */ + if ((filter->status & 0xff00) == 0x500) { + CK((*filter->output_function)(0x0f, filter->data)); /* SO */ + filter->status = 0; + } else if ((filter->status & 0xff00) != 0) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + filter->status = 0; + } + CK((*filter->output_function)(s, filter->data)); + } else if (s >= 0xa0 && s < 0xe0) { /* X 0201 kana */ + if ((filter->status & 0xff00) != 0x500) { + CK((*filter->output_function)(0x0e, filter->data)); /* SI */ + filter->status = 0x500; + } + CK((*filter->output_function)(s - 0x80, filter->data)); + } else if (s < 0x8080) { /* X 0208 */ + if ((filter->status & 0xff00) == 0x500) { + CK((*filter->output_function)(0x0f, filter->data)); /* SO */ + filter->status = 0; + } + if ((filter->status & 0xff00) != 0x200) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x24, filter->data)); /* '$' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + filter->status = 0x200; + } + CK((*filter->output_function)((s >> 8) & 0x7f, filter->data)); + CK((*filter->output_function)(s & 0x7f, filter->data)); + } else if (s < 0x10000) { /* X0212 */ + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } else { /* X 0201 latin */ + if ((filter->status & 0xff00) == 0x500) { + CK((*filter->output_function)(0x0f, filter->data)); /* SO */ + filter->status = 0; + } + if ((filter->status & 0xff00) != 0x400) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x4a, filter->data)); /* 'J' */ + } + filter->status = 0x400; + CK((*filter->output_function)(s & 0x7f, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} + +int +mbfl_filt_conv_wchar_cp50222_flush(mbfl_convert_filter *filter) +{ + /* back to latin */ + if ((filter->status & 0xff00) == 0x500) { + CK((*filter->output_function)(0x0f, filter->data)); /* SO */ + } else if ((filter->status & 0xff00) != 0) { + CK((*filter->output_function)(0x1b, filter->data)); /* ESC */ + CK((*filter->output_function)(0x28, filter->data)); /* '(' */ + CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ + } + filter->status &= 0xff; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + + return 0; +} + + +static int mbfl_filt_ident_jis_ms(int c, mbfl_identify_filter *filter) +{ +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x10: X 0201 latin */ +/* case 0x20: X 0201 kana */ +/* case 0x80: X 0208 */ +/* case 0x90: X 0212 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (c == 0x0e) { /* "kana in" */ + filter->status = 0x20; + } else if (c == 0x0f) { /* "kana out" */ + filter->status = 0; + } else if ((filter->status == 0x80 || filter->status == 0x90) && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + ; + } else { + filter->flag = 1; /* bad */ + } + break; + +/* case 0x81: X 0208 second char */ +/* case 0x91: X 0212 second char */ + case 1: + filter->status &= ~0xf; + if (c == 0x1b) { + goto retry; + } else if (c < 0x21 || c > 0x7e) { /* bad */ + filter->flag = 1; + } + break; + + /* ESC */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ */ + case 3: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else if (c == 0x28) { /* '(' */ + filter->status++; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ ( */ + case 4: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else if (c == 0x44) { /* 'D' */ + filter->status = 0x90; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC ( */ + case 5: + if (c == 0x42 || c == 0x48) { /* 'B' or 'H' */ + filter->status = 0; + } else if (c == 0x4a) { /* 'J' */ + filter->status = 0x10; + } else if (c == 0x49) { /* 'I' */ + filter->status = 0x20; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +static int mbfl_filt_ident_cp50220(int c, mbfl_identify_filter *filter) +{ +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x10: X 0201 latin */ +/* case 0x80: X 0208 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (filter->status == 0x80 && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + ; + } else { + filter->flag = 1; /* bad */ + } + break; + +/* case 0x81: X 0208 second char */ + case 1: + if (c == 0x1b) { + filter->status++; + } else { + filter->status &= ~0xf; + if (c < 0x21 || c > 0x7e) { /* bad */ + filter->flag = 1; + } + } + break; + + /* ESC */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ */ + case 3: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC ( */ + case 5: + if (c == 0x42) { /* 'B' */ + filter->status = 0; + } else if (c == 0x4a) { /* 'J' */ + filter->status = 0x10; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +static int mbfl_filt_ident_cp50221(int c, mbfl_identify_filter *filter) +{ +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x10: X 0201 latin */ +/* case 0x80: X 0208 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (filter->status == 0x80 && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + ; + } else { + filter->flag = 1; /* bad */ + } + break; + +/* case 0x81: X 0208 second char */ + case 1: + if (c == 0x1b) { + filter->status++; + } else { + filter->status &= ~0xf; + if (c < 0x21 || c > 0x7e) { /* bad */ + filter->flag = 1; + } + } + break; + + /* ESC */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ */ + case 3: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC ( */ + case 5: + if (c == 0x42) { /* 'B' */ + filter->status = 0; + } else if (c == 0x4a) { /* 'J' */ + filter->status = 0x10; + } else if (c == 0x49) { /* 'I' */ + filter->status = 0x20; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +static int mbfl_filt_ident_cp50222(int c, mbfl_identify_filter *filter) +{ +retry: + switch (filter->status & 0xf) { +/* case 0x00: ASCII */ +/* case 0x10: X 0201 latin */ +/* case 0x80: X 0208 */ + case 0: + if (c == 0x1b) { + filter->status += 2; + } else if (filter->status == 0x80 && c > 0x20 && c < 0x7f) { /* kanji first char */ + filter->status += 1; + } else if (c >= 0 && c < 0x80) { /* latin, CTLs */ + ; + } else { + filter->flag = 1; /* bad */ + } + break; + +/* case 0x81: X 0208 second char */ + case 1: + if (c == 0x1b) { + filter->status++; + } else { + filter->status &= ~0xf; + if (c < 0x21 || c > 0x7e) { /* bad */ + filter->flag = 1; + } + } + break; + + /* ESC */ + case 2: + if (c == 0x24) { /* '$' */ + filter->status++; + } else if (c == 0x28) { /* '(' */ + filter->status += 3; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC $ */ + case 3: + if (c == 0x40 || c == 0x42) { /* '@' or 'B' */ + filter->status = 0x80; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + /* ESC ( */ + case 5: + if (c == 0x42) { /* 'B' */ + filter->status = 0; + } else if (c == 0x4a) { /* 'J' */ + filter->status = 0x10; + } else { + filter->flag = 1; /* bad */ + filter->status &= ~0xf; + goto retry; + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + + + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.h b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.h new file mode 100644 index 000000000..a462f70ec --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp5022x.h @@ -0,0 +1,64 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * The source code included in this files was separated from mbfilter_ja.c + * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. + * + */ + +#ifndef MBFL_MBFILTER_CP50221_h +#define MBFL_MBFILTER_CP50221_h + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_jis_ms; +extern const mbfl_encoding mbfl_encoding_cp50220; +extern const mbfl_encoding mbfl_encoding_cp50220raw; +extern const mbfl_encoding mbfl_encoding_cp50221; +extern const mbfl_encoding mbfl_encoding_cp50222; +extern const struct mbfl_identify_vtbl vtbl_identify_jis_ms; +extern const struct mbfl_identify_vtbl vtbl_identify_cp50220; +extern const struct mbfl_identify_vtbl vtbl_identify_cp50220raw; +extern const struct mbfl_identify_vtbl vtbl_identify_cp50221; +extern const struct mbfl_identify_vtbl vtbl_identify_cp50222; +extern const struct mbfl_convert_vtbl vtbl_jis_ms_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_jis_ms; +extern const struct mbfl_convert_vtbl vtbl_cp50220_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_cp50220; +extern const struct mbfl_convert_vtbl vtbl_cp50220raw_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_cp50220raw; +extern const struct mbfl_convert_vtbl vtbl_cp50221_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_cp50221; +extern const struct mbfl_convert_vtbl vtbl_cp50222_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_cp50222; + +int mbfl_filt_conv_jis_ms_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_jis_ms(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_cp50220(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_cp50220raw(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_cp50221(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_cp50222(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_cp50222_flush(mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_CP50221_h */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c index f1505ae9b..f84be1e29 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp51932.c @@ -200,21 +200,6 @@ mbfl_filt_conv_cp51932_wchar(int c, mbfl_convert_filter *filter) return c; } -int -cp932ext3_to_cp51932(int c) -{ - int idx; - - idx = sjistoidx(c >> 8, c & 0xff); - if (idx >= sjistoidx(0xfa, 0x5c)) - idx -= sjistoidx(0xfa, 0x5c) - sjistoidx(0xed, 0x40); - else if (idx >= sjistoidx(0xfa, 0x55)) - idx -= sjistoidx(0xfa, 0x55) - sjistoidx(0xee, 0xfa); - else if (idx >= sjistoidx(0xfa, 0x40)) - idx -= sjistoidx(0xfa, 0x40) - sjistoidx(0xee, 0xef); - return idxtoeuc1(idx) << 8 | idxtoeuc2(idx); -} - /* * wchar => cp51932 */ @@ -250,9 +235,9 @@ mbfl_filt_conv_wchar_cp51932(int c, mbfl_convert_filter *filter) s1 = -1; } } else if (c == 0xa5) { /* YEN SIGN */ - s1 = 0x216f; /* FULLWIDTH YEN SIGN */ + s1 = 0x005c; /* YEN SIGN */ } else if (c == 0x203e) { /* OVER LINE */ - s1 = 0x2131; /* FULLWIDTH MACRON */ + s1 = 0x007e; /* FULLWIDTH MACRON */ } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ s1 = 0x2140; } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c index 8fa254b6c..6e54d53f4 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp932.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp932.c @@ -37,7 +37,7 @@ #include "unicode_table_cp932_ext.h" #include "unicode_table_jis.h" -static int mbfl_filt_ident_sjiswin(int c, mbfl_identify_filter *filter); +static int mbfl_filt_ident_cp932(int c, mbfl_identify_filter *filter); static const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -58,39 +58,39 @@ static const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }; -static const char *mbfl_encoding_sjis_win_aliases[] = {"SJIS-open", "CP932", "Windows-31J", "MS_Kanji", NULL}; +static const char *mbfl_encoding_cp932_aliases[] = {"MS932", "Windows-31J", "MS_Kanji", NULL}; -const mbfl_encoding mbfl_encoding_sjis_win = { - mbfl_no_encoding_sjis_win, - "SJIS-win", +const mbfl_encoding mbfl_encoding_cp932 = { + mbfl_no_encoding_cp932, + "CP932", "Shift_JIS", - (const char *(*)[])&mbfl_encoding_sjis_win_aliases, + (const char *(*)[])&mbfl_encoding_cp932_aliases, mblen_table_sjis, MBFL_ENCTYPE_MBCS }; -const struct mbfl_identify_vtbl vtbl_identify_sjiswin = { - mbfl_no_encoding_sjis_win, +const struct mbfl_identify_vtbl vtbl_identify_cp932 = { + mbfl_no_encoding_cp932, mbfl_filt_ident_common_ctor, mbfl_filt_ident_common_dtor, - mbfl_filt_ident_sjiswin + mbfl_filt_ident_cp932 }; -const struct mbfl_convert_vtbl vtbl_sjiswin_wchar = { - mbfl_no_encoding_sjis_win, +const struct mbfl_convert_vtbl vtbl_cp932_wchar = { + mbfl_no_encoding_cp932, mbfl_no_encoding_wchar, mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, - mbfl_filt_conv_sjiswin_wchar, + mbfl_filt_conv_cp932_wchar, mbfl_filt_conv_common_flush }; -const struct mbfl_convert_vtbl vtbl_wchar_sjiswin = { +const struct mbfl_convert_vtbl vtbl_wchar_cp932 = { mbfl_no_encoding_wchar, - mbfl_no_encoding_sjis_win, + mbfl_no_encoding_cp932, mbfl_filt_conv_common_ctor, mbfl_filt_conv_common_dtor, - mbfl_filt_conv_wchar_sjiswin, + mbfl_filt_conv_wchar_cp932, mbfl_filt_conv_common_flush }; @@ -144,7 +144,7 @@ const struct mbfl_convert_vtbl vtbl_wchar_sjiswin = { * SJIS-win => wchar */ int -mbfl_filt_conv_sjiswin_wchar(int c, mbfl_convert_filter *filter) +mbfl_filt_conv_cp932_wchar(int c, mbfl_convert_filter *filter) { int c1, s, s1, s2, w; @@ -229,7 +229,7 @@ mbfl_filt_conv_sjiswin_wchar(int c, mbfl_convert_filter *filter) * wchar => SJIS-win */ int -mbfl_filt_conv_wchar_sjiswin(int c, mbfl_convert_filter *filter) +mbfl_filt_conv_wchar_cp932(int c, mbfl_convert_filter *filter) { int c1, c2, s1, s2; @@ -261,9 +261,9 @@ mbfl_filt_conv_wchar_sjiswin(int c, mbfl_convert_filter *filter) s1 = c & MBFL_WCSPLANE_MASK; s1 |= 0x8080; } else if (c == 0xa5) { /* YEN SIGN */ - s1 = 0x216f; /* FULLWIDTH YEN SIGN */ + s1 = 0x005c; /* YEN SIGN */ } else if (c == 0x203e) { /* OVER LINE */ - s1 = 0x2131; /* FULLWIDTH MACRON */ + s1 = 0x007e; /* FULLWIDTH MACRON */ } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ s1 = 0x2140; } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ @@ -327,7 +327,7 @@ mbfl_filt_conv_wchar_sjiswin(int c, mbfl_convert_filter *filter) return c; } -static int mbfl_filt_ident_sjiswin(int c, mbfl_identify_filter *filter) +static int mbfl_filt_ident_cp932(int c, mbfl_identify_filter *filter) { if (filter->status) { /* kanji second char */ if (c < 0x40 || c > 0xfc || c == 0x7f) { /* bad */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_cp932.h b/ext/mbstring/libmbfl/filters/mbfilter_cp932.h index f66baabea..b6a211412 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_cp932.h +++ b/ext/mbstring/libmbfl/filters/mbfilter_cp932.h @@ -32,12 +32,12 @@ #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_sjis_win; -extern const struct mbfl_identify_vtbl vtbl_identify_sjiswin; -extern const struct mbfl_convert_vtbl vtbl_sjiswin_wchar; -extern const struct mbfl_convert_vtbl vtbl_wchar_sjiswin; +extern const mbfl_encoding mbfl_encoding_cp932; +extern const struct mbfl_identify_vtbl vtbl_identify_cp932; +extern const struct mbfl_convert_vtbl vtbl_cp932_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_cp932; -int mbfl_filt_conv_sjiswin_wchar(int c, mbfl_convert_filter *filter); -int mbfl_filt_conv_wchar_sjiswin(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_cp932_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_cp932(int c, mbfl_convert_filter *filter); #endif /* MBFL_MBFILTER_CP932_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c index ece0c7ee4..eb8949a29 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_euc_jp_win.c @@ -153,8 +153,8 @@ mbfl_filt_conv_eucjpwin_wchar(int c, mbfl_convert_filter *filter) w = cp932ext1_ucs_table[s - cp932ext1_ucs_table_min]; } else if (s >= 0 && s < jisx0208_ucs_table_size) { /* X 0208 */ w = jisx0208_ucs_table[s]; - } else if (s >= (84*94)) { /* user (85ku - 94ku) */ - w = s - (84*94) + 0xe000; + } else if (s >= (84 * 94)) { /* user (85ku - 94ku) */ + w = s - (84 * 94) + 0xe000; } } if (w <= 0) { @@ -327,8 +327,10 @@ mbfl_filt_conv_wchar_eucjpwin(int c, mbfl_convert_filter *filter) c1 = 0; c2 = cp932ext1_ucs_table_max - cp932ext1_ucs_table_min; while (c1 < c2) { /* CP932 vendor ext1 (13ku) */ + const int oh = cp932ext1_ucs_table_min / 94; + if (c == cp932ext1_ucs_table[c1]) { - s1 = ((c1/94 + 0x2d) << 8) + (c1%94 + 0x21); + s1 = ((c1 / 94 + oh + 0x21) << 8) + (c1 % 94 + 0x21); break; } c1++; diff --git a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c index 0163520f5..1fe0e6b73 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_htmlent.c @@ -146,6 +146,11 @@ int mbfl_filt_conv_html_enc_flush(mbfl_convert_filter *filter) { filter->status = 0; filter->opaque = NULL; + + if (filter->flush_function != NULL) { + (*filter->flush_function)(filter->data); + } + return 0; } @@ -289,12 +294,18 @@ int mbfl_filt_conv_html_dec_flush(mbfl_convert_filter *filter) buffer = (unsigned char*)filter->opaque; status = filter->status; filter->status = 0; + /* flush fragments */ while (status--) { int e = (*filter->output_function)(buffer[pos++], filter->data); if (e != 0) err = e; } + + if (filter->flush_function != NULL) { + (*filter->flush_function)(filter->data); + } + return err; } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c index df961677d..1bf77172b 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_jp_ms.c @@ -321,7 +321,7 @@ mbfl_filt_conv_wchar_2022jpms(int c, mbfl_convert_filter *filter) s1 = c & MBFL_WCSPLANE_MASK; s1 |= 0x8080; } else if (c == 0xa5) { /* YEN SIGN */ - s1 = 0x216f; /* FULLWIDTH YEN SIGN */ + s1 = 0x216f; /* FULLWIDTH YEN SIGN */ } else if (c == 0x203e) { /* OVER LINE */ s1 = 0x2131; /* FULLWIDTH MACRON */ } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ @@ -423,7 +423,13 @@ mbfl_filt_conv_any_2022jpms_flush(mbfl_convert_filter *filter) CK((*filter->output_function)(0x28, filter->data)); /* '(' */ CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ } + filter->status &= 0xff; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + return 0; } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c index 263476d62..77c95c5ad 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_iso2022_kr.c @@ -276,7 +276,13 @@ mbfl_filt_conv_any_2022kr_flush(mbfl_convert_filter *filter) if ((filter->status & 0xff00) != 0) { CK((*filter->output_function)(0x0f, filter->data)); /* SI */ } + filter->status &= 0xff; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + return 0; } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_jis.c b/ext/mbstring/libmbfl/filters/mbfilter_jis.c index 58336d4e2..6b1aef364 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_jis.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_jis.c @@ -478,6 +478,11 @@ mbfl_filt_conv_any_jis_flush(mbfl_convert_filter *filter) CK((*filter->output_function)(0x42, filter->data)); /* 'B' */ } filter->status &= 0xff; + + if (filter->flush_function != NULL) { + return (*filter->flush_function)(filter->data); + } + return 0; } diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c new file mode 100644 index 000000000..38244a0ac --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.c @@ -0,0 +1,350 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * the source code included in this files was separated from mbfilter_ja.c + * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. + * + */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "mbfilter.h" +#include "mbfilter_sjis_open.h" + +#include "unicode_table_cp932_ext.h" +#include "unicode_table_jis.h" + +static int mbfl_filt_ident_sjis_open(int c, mbfl_identify_filter *filter); + +static const unsigned char mblen_table_sjis[] = { /* 0x80-0x9f,0xE0-0xFF */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 +}; + +static const char *mbfl_encoding_sjis_open_aliases[] = {"SJIS-open", "SJIS-ms", NULL}; + +const mbfl_encoding mbfl_encoding_sjis_open = { + mbfl_no_encoding_sjis_open, + "SJIS-win", + "Shift_JIS", + (const char *(*)[])&mbfl_encoding_sjis_open_aliases, + mblen_table_sjis, + MBFL_ENCTYPE_MBCS +}; + +const struct mbfl_identify_vtbl vtbl_identify_sjis_open = { + mbfl_no_encoding_sjis_open, + mbfl_filt_ident_common_ctor, + mbfl_filt_ident_common_dtor, + mbfl_filt_ident_sjis_open +}; + +const struct mbfl_convert_vtbl vtbl_sjis_open_wchar = { + mbfl_no_encoding_sjis_open, + mbfl_no_encoding_wchar, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_sjis_open_wchar, + mbfl_filt_conv_common_flush +}; + +const struct mbfl_convert_vtbl vtbl_wchar_sjis_open = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_sjis_open, + mbfl_filt_conv_common_ctor, + mbfl_filt_conv_common_dtor, + mbfl_filt_conv_wchar_sjis_open, + mbfl_filt_conv_common_flush +}; + +#define CK(statement) do { if ((statement) < 0) return (-1); } while (0) + +#define SJIS_ENCODE(c1,c2,s1,s2) \ + do { \ + s1 = c1; \ + s1--; \ + s1 >>= 1; \ + if ((c1) < 0x5f) { \ + s1 += 0x71; \ + } else { \ + s1 += 0xb1; \ + } \ + s2 = c2; \ + if ((c1) & 1) { \ + if ((c2) < 0x60) { \ + s2--; \ + } \ + s2 += 0x20; \ + } else { \ + s2 += 0x7e; \ + } \ + } while (0) + +#define SJIS_DECODE(c1,c2,s1,s2) \ + do { \ + s1 = c1; \ + if (s1 < 0xa0) { \ + s1 -= 0x81; \ + } else { \ + s1 -= 0xc1; \ + } \ + s1 <<= 1; \ + s1 += 0x21; \ + s2 = c2; \ + if (s2 < 0x9f) { \ + if (s2 < 0x7f) { \ + s2++; \ + } \ + s2 -= 0x20; \ + } else { \ + s1++; \ + s2 -= 0x7e; \ + } \ + } while (0) + + +/* + * SJIS-win => wchar + */ +int +mbfl_filt_conv_sjis_open_wchar(int c, mbfl_convert_filter *filter) +{ + int c1, s, s1, s2, w; + + switch (filter->status) { + case 0: + if (c >= 0 && c < 0x80) { /* latin */ + CK((*filter->output_function)(c, filter->data)); + } else if (c > 0xa0 && c < 0xe0) { /* kana */ + CK((*filter->output_function)(0xfec0 + c, filter->data)); + } else if (c > 0x80 && c < 0xfd && c != 0xa0) { /* kanji first char */ + filter->status = 1; + filter->cache = c; + } else { + w = c & MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + case 1: /* kanji second char */ + filter->status = 0; + c1 = filter->cache; + if (c >= 0x40 && c <= 0xfc && c != 0x7f) { + w = 0; + SJIS_DECODE(c1, c, s1, s2); + s = (s1 - 0x21)*94 + s2 - 0x21; + if (s <= 137) { + if (s == 31) { + w = 0xff3c; /* FULLWIDTH REVERSE SOLIDUS */ + } else if (s == 32) { + w = 0xff5e; /* FULLWIDTH TILDE */ + } else if (s == 33) { + w = 0x2225; /* PARALLEL TO */ + } else if (s == 60) { + w = 0xff0d; /* FULLWIDTH HYPHEN-MINUS */ + } else if (s == 80) { + w = 0xffe0; /* FULLWIDTH CENT SIGN */ + } else if (s == 81) { + w = 0xffe1; /* FULLWIDTH POUND SIGN */ + } else if (s == 137) { + w = 0xffe2; /* FULLWIDTH NOT SIGN */ + } + } + if (w == 0) { + if (s >= cp932ext1_ucs_table_min && s < cp932ext1_ucs_table_max) { /* vendor ext1 (13ku) */ + w = cp932ext1_ucs_table[s - cp932ext1_ucs_table_min]; + } else if (s >= 0 && s < jisx0208_ucs_table_size) { /* X 0208 */ + w = jisx0208_ucs_table[s]; + } else if (s >= cp932ext2_ucs_table_min && s < cp932ext2_ucs_table_max) { /* vendor ext2 (89ku - 92ku) */ + w = cp932ext2_ucs_table[s - cp932ext2_ucs_table_min]; + } else if (s >= cp932ext3_ucs_table_min && s < cp932ext3_ucs_table_max) { /* vendor ext3 (115ku - 119ku) */ + w = cp932ext3_ucs_table[s - cp932ext3_ucs_table_min]; + } else if (s >= (94*94) && s < (114*94)) { /* user (95ku - 114ku) */ + w = s - (94*94) + 0xe000; + } + } + if (w <= 0) { + w = (s1 << 8) | s2; + w &= MBFL_WCSPLANE_MASK; + w |= MBFL_WCSPLANE_WINCP932; + } + CK((*filter->output_function)(w, filter->data)); + } else if ((c >= 0 && c < 0x21) || c == 0x7f) { /* CTLs */ + CK((*filter->output_function)(c, filter->data)); + } else { + w = (c1 << 8) | c; + w &= MBFL_WCSGROUP_MASK; + w |= MBFL_WCSGROUP_THROUGH; + CK((*filter->output_function)(w, filter->data)); + } + break; + + default: + filter->status = 0; + break; + } + + return c; +} + +/* + * wchar => SJIS-win + */ +int +mbfl_filt_conv_wchar_sjis_open(int c, mbfl_convert_filter *filter) +{ + int c1, c2, s1, s2; + + s1 = 0; + s2 = 0; + if (c >= ucs_a1_jis_table_min && c < ucs_a1_jis_table_max) { + s1 = ucs_a1_jis_table[c - ucs_a1_jis_table_min]; + } else if (c >= ucs_a2_jis_table_min && c < ucs_a2_jis_table_max) { + s1 = ucs_a2_jis_table[c - ucs_a2_jis_table_min]; + } else if (c >= ucs_i_jis_table_min && c < ucs_i_jis_table_max) { + s1 = ucs_i_jis_table[c - ucs_i_jis_table_min]; + } else if (c >= ucs_r_jis_table_min && c < ucs_r_jis_table_max) { + s1 = ucs_r_jis_table[c - ucs_r_jis_table_min]; + } else if (c >= 0xe000 && c < (0xe000 + 20*94)) { /* user (95ku - 114ku) */ + s1 = c - 0xe000; + c1 = s1/94 + 0x7f; + c2 = s1%94 + 0x21; + s1 = (c1 << 8) | c2; + s2 = 1; + } + if (s1 <= 0) { + c1 = c & ~MBFL_WCSPLANE_MASK; + if (c1 == MBFL_WCSPLANE_WINCP932) { + s1 = c & MBFL_WCSPLANE_MASK; + s2 = 1; + } else if (c1 == MBFL_WCSPLANE_JIS0208) { + s1 = c & MBFL_WCSPLANE_MASK; + } else if (c1 == MBFL_WCSPLANE_JIS0212) { + s1 = c & MBFL_WCSPLANE_MASK; + s1 |= 0x8080; + } else if (c == 0xa5) { /* YEN SIGN */ + s1 = 0x216f; /* FULLWIDTH YEN SIGN */ + } else if (c == 0x203e) { /* OVER LINE */ + s1 = 0x2131; /* FULLWIDTH MACRON */ + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s1 = 0x2140; + } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ + s1 = 0x2141; + } else if (c == 0x2225) { /* PARALLEL TO */ + s1 = 0x2142; + } else if (c == 0xff0d) { /* FULLWIDTH HYPHEN-MINUS */ + s1 = 0x215d; + } else if (c == 0xffe0) { /* FULLWIDTH CENT SIGN */ + s1 = 0x2171; + } else if (c == 0xffe1) { /* FULLWIDTH POUND SIGN */ + s1 = 0x2172; + } else if (c == 0xffe2) { /* FULLWIDTH NOT SIGN */ + s1 = 0x224c; + } + } + if ((s1 <= 0) || (s1 >= 0x8080 && s2 == 0)) { /* not found or X 0212 */ + s1 = -1; + c1 = 0; + c2 = cp932ext1_ucs_table_max - cp932ext1_ucs_table_min; + while (c1 < c2) { /* CP932 vendor ext1 (13ku) */ + if (c == cp932ext1_ucs_table[c1]) { + s1 = ((c1/94 + 0x2d) << 8) + (c1%94 + 0x21); + break; + } + c1++; + } + if (s1 <= 0) { + c1 = 0; + c2 = cp932ext3_ucs_table_max - cp932ext3_ucs_table_min; + while (c1 < c2) { /* CP932 vendor ext3 (115ku - 119ku) */ + if (c == cp932ext3_ucs_table[c1]) { + s1 = ((c1/94 + 0x93) << 8) + (c1%94 + 0x21); + break; + } + c1++; + } + } + if (c == 0) { + s1 = 0; + } else if (s1 <= 0) { + s1 = -1; + } + } + if (s1 >= 0) { + if (s1 < 0x100) { /* latin or kana */ + CK((*filter->output_function)(s1, filter->data)); + } else { /* kanji */ + c1 = (s1 >> 8) & 0xff; + c2 = s1 & 0xff; + SJIS_ENCODE(c1, c2, s1, s2); + CK((*filter->output_function)(s1, filter->data)); + CK((*filter->output_function)(s2, filter->data)); + } + } else { + if (filter->illegal_mode != MBFL_OUTPUTFILTER_ILLEGAL_MODE_NONE) { + CK(mbfl_filt_conv_illegal_output(c, filter)); + } + } + + return c; +} + +static int mbfl_filt_ident_sjis_open(int c, mbfl_identify_filter *filter) +{ + if (filter->status) { /* kanji second char */ + if (c < 0x40 || c > 0xfc || c == 0x7f) { /* bad */ + filter->flag = 1; + } + filter->status = 0; + } else if (c >= 0 && c < 0x80) { /* latin ok */ + ; + } else if (c > 0xa0 && c < 0xe0) { /* kana ok */ + ; + } else if (c > 0x80 && c < 0xfd && c != 0xa0) { /* kanji first char */ + filter->status = 1; + } else { /* bad */ + filter->flag = 1; + } + + return c; +} + + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h new file mode 100644 index 000000000..0bfe1d21a --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_sjis_open.h @@ -0,0 +1,43 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: + * + */ +/* + * the source code included in this files was separated from mbfilter_ja.c + * by moriyoshi koizumi <moriyoshi@php.net> on 4 dec 2002. + * + */ + +#ifndef MBFL_MBFILTER_SJIS_OPEN_H +#define MBFL_MBFILTER_SJIS_OPEN_H + +#include "mbfilter.h" + +extern const mbfl_encoding mbfl_encoding_sjis_open; +extern const struct mbfl_identify_vtbl vtbl_identify_sjis_open; +extern const struct mbfl_convert_vtbl vtbl_sjis_open_wchar; +extern const struct mbfl_convert_vtbl vtbl_wchar_sjis_open; + +int mbfl_filt_conv_sjis_open_wchar(int c, mbfl_convert_filter *filter); +int mbfl_filt_conv_wchar_sjis_open(int c, mbfl_convert_filter *filter); + +#endif /* MBFL_MBFILTER_SJIS_OPEN_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c new file mode 100644 index 000000000..c66c51f24 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.c @@ -0,0 +1,302 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: Moriyoshi Koizumi <koizumi@gree.co.jp> + * + */ + +#include "mbfl_allocators.h" +#include "mbfilter_tl_jisx0201_jisx0208.h" +#include "translit_kana_jisx0201_jisx0208.h" + +void +mbfl_filt_tl_jisx0201_jisx0208_init(mbfl_convert_filter *filt) +{ + mbfl_filt_conv_common_ctor(filt); +} + +void +mbfl_filt_tl_jisx0201_jisx0208_cleanup(mbfl_convert_filter *filt) +{ +} + +int +mbfl_filt_tl_jisx0201_jisx0208(int c, mbfl_convert_filter *filt) +{ + int s, n; + int mode = ((mbfl_filt_tl_jisx0201_jisx0208_param *)filt->opaque)->mode; + + s = c; + + if ((mode & MBFL_FILT_TL_HAN2ZEN_ALL) + && c >= 0x21 && c <= 0x7d && c != 0x22 && c != 0x27 && c != 0x5c) { + /* all except <"> <'> <\> <~> */ + s = c + 0xfee0; + } else if ((mode & MBFL_FILT_TL_HAN2ZEN_ALPHA) && + ((c >= 0x41 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a))) { + /* alpha */ + s = c + 0xfee0; + } else if ((mode & MBFL_FILT_TL_HAN2ZEN_NUMERIC) && + c >= 0x30 && c <= 0x39) { + /* num */ + s = c + 0xfee0; + } else if ((mode & MBFL_FILT_TL_HAN2ZEN_SPACE) && c == 0x20) { + /* space */ + s = 0x3000; + } + + if (mode & + (MBFL_FILT_TL_HAN2ZEN_KATAKANA | MBFL_FILT_TL_HAN2ZEN_HIRAGANA)) { + /* hankaku kana to zenkaku kana */ + if ((mode & MBFL_FILT_TL_HAN2ZEN_KATAKANA) && + (mode & MBFL_FILT_TL_HAN2ZEN_GLUE)) { + /* hankaku kana to zenkaku katakana and glue voiced sound mark */ + if (c >= 0xff61 && c <= 0xff9f) { + if (filt->status) { + n = (filt->cache - 0xff60) & 0x3f; + if (c == 0xff9e && ((n >= 22 && n <= 36) || (n >= 42 && n <= 46))) { + filt->status = 0; + s = 0x3001 + hankana2zenkana_table[n]; + } else if (c == 0xff9e && n == 19) { + filt->status = 0; + s = 0x30f4; + } else if (c == 0xff9f && (n >= 42 && n <= 46)) { + filt->status = 0; + s = 0x3002 + hankana2zenkana_table[n]; + } else { + filt->status = 1; + filt->cache = c; + s = 0x3000 + hankana2zenkana_table[n]; + } + } else { + filt->status = 1; + filt->cache = c; + return c; + } + } else { + if (filt->status) { + n = (filt->cache - 0xff60) & 0x3f; + filt->status = 0; + (*filt->output_function)(0x3000 + hankana2zenkana_table[n], filt->data); + } + } + } else if ((mode & MBFL_FILT_TL_HAN2ZEN_HIRAGANA) && + (mode & MBFL_FILT_TL_HAN2ZEN_GLUE)) { + /* hankaku kana to zenkaku hirangana and glue voiced sound mark */ + if (c >= 0xff61 && c <= 0xff9f) { + if (filt->status) { + n = (filt->cache - 0xff60) & 0x3f; + if (c == 0xff9e && ((n >= 22 && n <= 36) || (n >= 42 && n <= 46))) { + filt->status = 0; + s = 0x3001 + hankana2zenhira_table[n]; + } else if (c == 0xff9f && (n >= 42 && n <= 46)) { + filt->status = 0; + s = 0x3002 + hankana2zenhira_table[n]; + } else { + filt->status = 1; + filt->cache = c; + s = 0x3000 + hankana2zenhira_table[n]; + } + } else { + filt->status = 1; + filt->cache = c; + return c; + } + } else { + if (filt->status) { + n = (filt->cache - 0xff60) & 0x3f; + filt->status = 0; + (*filt->output_function)(0x3000 + hankana2zenhira_table[n], filt->data); + } + } + } else if ((mode & MBFL_FILT_TL_HAN2ZEN_KATAKANA) && + c >= 0xff61 && c <= 0xff9f) { + /* hankaku kana to zenkaku katakana */ + s = 0x3000 + hankana2zenkana_table[c - 0xff60]; + } else if ((mode & MBFL_FILT_TL_HAN2ZEN_HIRAGANA) + && c >= 0xff61 && c <= 0xff9f) { + /* hankaku kana to zenkaku hirangana */ + s = 0x3000 + hankana2zenhira_table[c - 0xff60]; + } + } + + if (mode & MBFL_FILT_TL_HAN2ZEN_COMPAT1) { + /* special ascii to symbol */ + if (c == 0x5c) { + s = 0xffe5; /* FULLWIDTH YEN SIGN */ + } else if (c == 0xa5) { /* YEN SIGN */ + s = 0xffe5; /* FULLWIDTH YEN SIGN */ + } else if (c == 0x7e) { + s = 0xffe3; /* FULLWIDTH MACRON */ + } else if (c == 0x203e) { /* OVERLINE */ + s = 0xffe3; /* FULLWIDTH MACRON */ + } else if (c == 0x27) { + s = 0x2019; /* RIGHT SINGLE QUOTATION MARK */ + } else if (c == 0x22) { + s = 0x201d; /* RIGHT DOUBLE QUOTATION MARK */ + } + } else if (mode & MBFL_FILT_TL_HAN2ZEN_COMPAT2) { + /* special ascii to symbol */ + if (c == 0x5c) { + s = 0xff3c; /* FULLWIDTH REVERSE SOLIDUS */ + } else if (c == 0x7e) { + s = 0xff5e; /* FULLWIDTH TILDE */ + } else if (c == 0x27) { + s = 0xff07; /* FULLWIDTH APOSTROPHE */ + } else if (c == 0x22) { + s = 0xff02; /* FULLWIDTH QUOTATION MARK */ + } + } + + if (mode & 0xf0) { /* zenkaku to hankaku */ + if ((mode & 0x10) && c >= 0xff01 && c <= 0xff5d && c != 0xff02 && c != 0xff07 && c!= 0xff3c) { /* all except <"> <'> <\> <~> */ + s = c - 0xfee0; + } else if ((mode & 0x20) && ((c >= 0xff21 && c <= 0xff3a) || (c >= 0xff41 && c <= 0xff5a))) { /* alpha */ + s = c - 0xfee0; + } else if ((mode & 0x40) && (c >= 0xff10 && c <= 0xff19)) { /* num */ + s = c - 0xfee0; + } else if ((mode & 0x80) && (c == 0x3000)) { /* spase */ + s = 0x20; + } else if ((mode & 0x10) && (c == 0x2212)) { /* MINUS SIGN */ + s = 0x2d; + } + } + + if (mode & + (MBFL_FILT_TL_ZEN2HAN_KATAKANA | MBFL_FILT_TL_ZEN2HAN_HIRAGANA)) { + /* Zenkaku kana to hankaku kana */ + if ((mode & MBFL_FILT_TL_ZEN2HAN_KATAKANA) && + c >= 0x30a1 && c <= 0x30f4) { + /* Zenkaku katakana to hankaku kana */ + n = c - 0x30a1; + if (zenkana2hankana_table[n][1] != 0) { + (filt->output_function)(0xff00 + zenkana2hankana_table[n][0], filt->data); + s = 0xff00 + zenkana2hankana_table[n][1]; + } else { + s = 0xff00 + zenkana2hankana_table[n][0]; + } + } else if ((mode & MBFL_FILT_TL_ZEN2HAN_HIRAGANA) && + c >= 0x3041 && c <= 0x3093) { + /* Zenkaku hirangana to hankaku kana */ + n = c - 0x3041; + if (zenkana2hankana_table[n][1] != 0) { + (filt->output_function)(0xff00 + zenkana2hankana_table[n][0], filt->data); + s = 0xff00 + zenkana2hankana_table[n][1]; + } else { + s = 0xff00 + zenkana2hankana_table[n][0]; + } + } else if (c == 0x3001) { + s = 0xff64; /* HALFWIDTH IDEOGRAPHIC COMMA */ + } else if (c == 0x3002) { + s = 0xff61; /* HALFWIDTH IDEOGRAPHIC FULL STOP */ + } else if (c == 0x300c) { + s = 0xff62; /* HALFWIDTH LEFT CORNER BRACKET */ + } else if (c == 0x300d) { + s = 0xff63; /* HALFWIDTH RIGHT CORNER BRACKET */ + } else if (c == 0x309b) { + s = 0xff9e; /* HALFWIDTH KATAKANA VOICED SOUND MARK */ + } else if (c == 0x309c) { + s = 0xff9f; /* HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK */ + } else if (c == 0x30fc) { + s = 0xff70; /* HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK */ + } else if (c == 0x30fb) { + s = 0xff65; /* HALFWIDTH KATAKANA MIDDLE DOT */ + } + } else if (mode & (MBFL_FILT_TL_ZEN2HAN_HIRA2KANA + | MBFL_FILT_TL_ZEN2HAN_KANA2HIRA)) { + if ((mode & MBFL_FILT_TL_ZEN2HAN_HIRA2KANA) && + c >= 0x3041 && c <= 0x3093) { + /* Zenkaku hirangana to Zenkaku katakana */ + s = c + 0x60; + } else if ((mode & MBFL_FILT_TL_ZEN2HAN_KANA2HIRA) && + c >= 0x30a1 && c <= 0x30f3) { + /* Zenkaku katakana to Zenkaku hirangana */ + s = c - 0x60; + } + } + + if (mode & MBFL_FILT_TL_ZEN2HAN_COMPAT1) { /* special symbol to ascii */ + if (c == 0xffe5) { /* FULLWIDTH YEN SIGN */ + s = 0x5c; + } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s = 0x5c; + } else if (c == 0xffe3) { /* FULLWIDTH MACRON */ + s = 0x7e; + } else if (c == 0x203e) { /* OVERLINE */ + s = 0x7e; + } else if (c == 0x2018) { /* LEFT SINGLE QUOTATION MARK*/ + s = 0x27; + } else if (c == 0x2019) { /* RIGHT SINGLE QUOTATION MARK */ + s = 0x27; + } else if (c == 0x201c) { /* LEFT DOUBLE QUOTATION MARK */ + s = 0x22; + } else if (c == 0x201d) { /* RIGHT DOUBLE QUOTATION MARK */ + s = 0x22; + } + } + + if (mode & MBFL_FILT_TL_ZEN2HAN_COMPAT2) { /* special symbol to ascii */ + if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ + s = 0x5c; + } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ + s = 0x7e; + } else if (c == 0xff07) { /* FULLWIDTH APOSTROPHE */ + s = 0x27; + } else if (c == 0xff02) { /* FULLWIDTH QUOTATION MARK */ + s = 0x22; + } + } + + return (*filt->output_function)(s, filt->data); +} + +int +mbfl_filt_tl_jisx0201_jisx0208_flush(mbfl_convert_filter *filt) +{ + int ret, n; + int mode = ((mbfl_filt_tl_jisx0201_jisx0208_param *)filt->opaque)->mode; + + ret = 0; + if (filt->status) { + n = (filt->cache - 0xff60) & 0x3f; + if (mode & 0x100) { /* hankaku kana to zenkaku katakana */ + ret = (*filt->output_function)(0x3000 + hankana2zenkana_table[n], filt->data); + } else if (mode & 0x200) { /* hankaku kana to zenkaku hirangana */ + ret = (*filt->output_function)(0x3000 + hankana2zenhira_table[n], filt->data); + } + filt->status = 0; + } + + if (filt->flush_function != NULL) { + return (*filt->flush_function)(filt->data); + } + + return ret; +} + +const struct mbfl_convert_vtbl vtbl_tl_jisx0201_jisx0208 = { + mbfl_no_encoding_wchar, + mbfl_no_encoding_wchar, + mbfl_filt_tl_jisx0201_jisx0208_init, + mbfl_filt_tl_jisx0201_jisx0208_cleanup, + mbfl_filt_tl_jisx0201_jisx0208, + mbfl_filt_tl_jisx0201_jisx0208_flush +}; + diff --git a/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.h b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.h new file mode 100644 index 000000000..b52b38ee9 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/mbfilter_tl_jisx0201_jisx0208.h @@ -0,0 +1,79 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: Moriyoshi Koizumi <koizumi@gree.co.jp> + * + */ + +#ifndef MBFILTER_TL_KANA_JISX0201_JISX0208_H +#define MBFILTER_TL_KANA_JISX0201_JISX0208_H + +#include "mbfl_convert.h" + +#define MBFL_FILT_TL_HAN2ZEN_ALL 0x00000001 +#define MBFL_FILT_TL_HAN2ZEN_ALPHA 0x00000002 +#define MBFL_FILT_TL_HAN2ZEN_NUMERIC 0x00000004 +#define MBFL_FILT_TL_HAN2ZEN_SPACE 0x00000008 +#define MBFL_FILT_TL_ZEN2HAN_ALL 0x00000010 +#define MBFL_FILT_TL_ZEN2HAN_ALPHA 0x00000020 +#define MBFL_FILT_TL_ZEN2HAN_NUMERIC 0x00000040 +#define MBFL_FILT_TL_ZEN2HAN_SPACE 0x00000080 +#define MBFL_FILT_TL_HAN2ZEN_KATAKANA 0x00000100 +#define MBFL_FILT_TL_HAN2ZEN_HIRAGANA 0x00000200 +#define MBFL_FILT_TL_HAN2ZEN_GLUE 0x00000800 +#define MBFL_FILT_TL_ZEN2HAN_KATAKANA 0x00001000 +#define MBFL_FILT_TL_ZEN2HAN_HIRAGANA 0x00002000 +#define MBFL_FILT_TL_ZEN2HAN_HIRA2KANA 0x00010000 +#define MBFL_FILT_TL_ZEN2HAN_KANA2HIRA 0x00020000 +#define MBFL_FILT_TL_HAN2ZEN_COMPAT1 0x00100000 +#define MBFL_FILT_TL_ZEN2HAN_COMPAT1 0x00200000 +#define MBFL_FILT_TL_HAN2ZEN_COMPAT2 0x00400000 +#define MBFL_FILT_TL_ZEN2HAN_COMPAT2 0x00800000 +#define MBFL_FILT_TL_HAN2ZEN_MASK ( \ + MBFL_FILT_TL_HAN2ZEN_ALL |\ + MBFL_FILT_TL_HAN2ZEN_ALPHA |\ + MBFL_FILT_TL_HAN2ZEN_NUMERIC |\ + MBFL_FILT_TL_HAN2ZEN_SPACE |\ + MBFL_FILT_TL_HAN2ZEN_KATAKANA |\ + MBFL_FILT_TL_HAN2ZEN_HIRAGANA |\ + MBFL_FILT_TL_HAN2ZEN_GLUE |\ + MBFL_FILT_TL_HAN2ZEN_COMPAT1 |\ + MBFL_FILT_TL_HAN2ZEN_COMPAT2) +#define MBFL_FILT_TL_ZEN2HAN_MASK ( \ + MBFL_FILT_TL_ZEN2HAN_ALL | \ + MBFL_FILT_TL_ZEN2HAN_ALPHA | \ + MBFL_FILT_TL_ZEN2HAN_NUMERIC | \ + MBFL_FILT_TL_ZEN2HAN_SPACE | \ + MBFL_FILT_TL_ZEN2HAN_KATAKANA | \ + MBFL_FILT_TL_ZEN2HAN_HIRAGANA | \ + MBFL_FILT_TL_ZEN2HAN_HIRA2KANA | \ + MBFL_FILT_TL_ZEN2HAN_KANA2HIRA | \ + MBFL_FILT_TL_ZEN2HAN_COMPAT1 | \ + MBFL_FILT_TL_ZEN2HAN_COMPAT2) + + +typedef struct _mbfl_filt_tl_jisx0201_jisx0208_param { + mbfl_convert_filter *next_filter; + int mode; +} mbfl_filt_tl_jisx0201_jisx0208_param; + +extern const struct mbfl_convert_vtbl vtbl_tl_jisx0201_jisx0208; + +#endif /* MBFILTER_TL_KANA_JISX0201_JISX0208_H */ diff --git a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c index ea3707376..ad0205bee 100644 --- a/ext/mbstring/libmbfl/filters/mbfilter_utf7.c +++ b/ext/mbstring/libmbfl/filters/mbfilter_utf7.c @@ -405,6 +405,11 @@ int mbfl_filt_conv_wchar_utf7_flush(mbfl_convert_filter *filter) CK((*filter->output_function)(0x2d, filter->data)); /* '-' */ break; } + + if (filter->flush_function != NULL) { + (*filter->flush_function)(filter->data); + } + return 0; } diff --git a/ext/mbstring/libmbfl/filters/translit_kana_jisx0201_jisx0208.h b/ext/mbstring/libmbfl/filters/translit_kana_jisx0201_jisx0208.h new file mode 100644 index 000000000..4f8f4b7b1 --- /dev/null +++ b/ext/mbstring/libmbfl/filters/translit_kana_jisx0201_jisx0208.h @@ -0,0 +1,67 @@ +/* + * "streamable kanji code filter and converter" + * Copyright (c) 1998-2002 HappySize, Inc. All rights reserved. + * + * LICENSE NOTICES + * + * This file is part of "streamable kanji code filter and converter", + * which is distributed under the terms of GNU Lesser General Public + * License (version 2) as published by the Free Software Foundation. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with "streamable kanji code filter and converter"; + * if not, write to the Free Software Foundation, Inc., 59 Temple Place, + * Suite 330, Boston, MA 02111-1307 USA + * + * The author of this file: Moriyoshi Koizumi <koizumi@gree.co.jp> + * + */ + +#ifndef TRANSLIT_KANA_JISX0201_JISX0208_H +#define TRANSLIT_KANA_JISX0201_JISX0208_H + +static const unsigned char hankana2zenkana_table[64] = { + 0x00,0x02,0x0C,0x0D,0x01,0xFB,0xF2,0xA1,0xA3,0xA5, + 0xA7,0xA9,0xE3,0xE5,0xE7,0xC3,0xFC,0xA2,0xA4,0xA6, + 0xA8,0xAA,0xAB,0xAD,0xAF,0xB1,0xB3,0xB5,0xB7,0xB9, + 0xBB,0xBD,0xBF,0xC1,0xC4,0xC6,0xC8,0xCA,0xCB,0xCC, + 0xCD,0xCE,0xCF,0xD2,0xD5,0xD8,0xDB,0xDE,0xDF,0xE0, + 0xE1,0xE2,0xE4,0xE6,0xE8,0xE9,0xEA,0xEB,0xEC,0xED, + 0xEF,0xF3,0x9B,0x9C +}; + +static const unsigned char hankana2zenhira_table[64] = { + 0x00,0x02,0x0C,0x0D,0x01,0xFB,0x92,0x41,0x43,0x45, + 0x47,0x49,0x83,0x85,0x87,0x63,0xFC,0x42,0x44,0x46, + 0x48,0x4A,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59, + 0x5B,0x5D,0x5F,0x61,0x64,0x66,0x68,0x6A,0x6B,0x6C, + 0x6D,0x6E,0x6F,0x72,0x75,0x78,0x7B,0x7E,0x7F,0x80, + 0x81,0x82,0x84,0x86,0x88,0x89,0x8A,0x8B,0x8C,0x8D, + 0x8F,0x93,0x9B,0x9C +}; +static const unsigned char zenkana2hankana_table[84][2] = { + {0x67,0x00},{0x71,0x00},{0x68,0x00},{0x72,0x00},{0x69,0x00}, + {0x73,0x00},{0x6A,0x00},{0x74,0x00},{0x6B,0x00},{0x75,0x00}, + {0x76,0x00},{0x76,0x9E},{0x77,0x00},{0x77,0x9E},{0x78,0x00}, + {0x78,0x9E},{0x79,0x00},{0x79,0x9E},{0x7A,0x00},{0x7A,0x9E}, + {0x7B,0x00},{0x7B,0x9E},{0x7C,0x00},{0x7C,0x9E},{0x7D,0x00}, + {0x7D,0x9E},{0x7E,0x00},{0x7E,0x9E},{0x7F,0x00},{0x7F,0x9E}, + {0x80,0x00},{0x80,0x9E},{0x81,0x00},{0x81,0x9E},{0x6F,0x00}, + {0x82,0x00},{0x82,0x9E},{0x83,0x00},{0x83,0x9E},{0x84,0x00}, + {0x84,0x9E},{0x85,0x00},{0x86,0x00},{0x87,0x00},{0x88,0x00}, + {0x89,0x00},{0x8A,0x00},{0x8A,0x9E},{0x8A,0x9F},{0x8B,0x00}, + {0x8B,0x9E},{0x8B,0x9F},{0x8C,0x00},{0x8C,0x9E},{0x8C,0x9F}, + {0x8D,0x00},{0x8D,0x9E},{0x8D,0x9F},{0x8E,0x00},{0x8E,0x9E}, + {0x8E,0x9F},{0x8F,0x00},{0x90,0x00},{0x91,0x00},{0x92,0x00}, + {0x93,0x00},{0x6C,0x00},{0x94,0x00},{0x6D,0x00},{0x95,0x00}, + {0x6E,0x00},{0x96,0x00},{0x97,0x00},{0x98,0x00},{0x99,0x00}, + {0x9A,0x00},{0x9B,0x00},{0x9C,0x00},{0x9C,0x00},{0x72,0x00}, + {0x74,0x00},{0x66,0x00},{0x9D,0x00},{0x73,0x9E} +}; + +#endif /* TRANSLIT_KANA_JISX0201_JISX0208_H */ diff --git a/ext/mbstring/libmbfl/libmbfl.dsp b/ext/mbstring/libmbfl/libmbfl.dsp deleted file mode 100644 index a6d9cfc72..000000000 --- a/ext/mbstring/libmbfl/libmbfl.dsp +++ /dev/null @@ -1,807 +0,0 @@ -# Microsoft Developer Studio Project File - Name="libmbfl" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-
-CFG=libmbfl - Win32 Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libmbfl.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libmbfl.mak" CFG="libmbfl - Win32 Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libmbfl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libmbfl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "libmbfl - Win32 Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "Release"
-# PROP BASE Intermediate_Dir "Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Release"
-# PROP Intermediate_Dir "Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMBFL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GX /O2 /I "mbfl" /I "." /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMBFL_EXPORTS" /D "HAVE_CONFIG_H" /YX /FD /c
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-
-!ELSEIF "$(CFG)" == "libmbfl - Win32 Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "Debug"
-# PROP BASE Intermediate_Dir "Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Debug"
-# PROP Intermediate_Dir "Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMBFL_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "mbfl" /I "." /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMBFL_EXPORTS" /D "MBFL_DLL_EXPORT" /D HAVE_CONFIG_H=1 /YX /FD /GZ /c
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD BASE RSC /l 0x411 /d "_DEBUG"
-# ADD RSC /l 0x411 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "libmbfl - Win32 Release"
-# Name "libmbfl - Win32 Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "vc6"
-# Begin Source File
-
-SOURCE=.\filters\html_entities.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_7bit.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter_8bit.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_ascii.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_base64.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_big5.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_byte2.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_byte4.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp1251.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp1252.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp866.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp932.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp936.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_cn.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_jp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_jp_win.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_kr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_tw.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_htmlent.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_hz.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso2022_kr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_1.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_10.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_13.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_14.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_15.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_16.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_2.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_3.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_4.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_5.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_6.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_7.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_8.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_9.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_jis.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_koi8r.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_koi8u.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_armscii8.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter_pass.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_qprint.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_sjis.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_ucs2.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_ucs4.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_uhc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf16.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf32.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf7.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf7imap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf8.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_uuencode.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter_wchar.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_allocators.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_convert.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_encoding.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_filter_output.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_ident.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_language.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_memory_device.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_string.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_de.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_en.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_ja.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_hy.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_kr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_neutral.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_ru.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_uni.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_zh.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=.\config.h.vc6
-
-!IF "$(CFG)" == "libmbfl - Win32 Release"
-
-# Begin Custom Build
-InputDir=.
-InputPath=.\config.h.vc6
-
-"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "libmbfl - Win32 Debug"
-
-# Begin Custom Build
-InputDir=.
-InputPath=.\config.h.vc6
-
-"$(InputDir)\config.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\cp932_table.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\html_entities.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_7bit.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter_8bit.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_ascii.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_base64.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_big5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_byte2.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_byte4.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp1251.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp1252.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp866.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp932.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_cp936.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_cn.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_jp.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_jp_win.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_kr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_euc_tw.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_htmlent.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_hz.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso2022_kr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_1.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_10.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_13.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_14.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_15.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_16.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_2.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_3.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_4.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_6.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_7.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_8.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_iso8859_9.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_jis.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_koi8r.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_koi8u.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_armscii8.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter_pass.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_qprint.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_sjis.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_ucs2.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_ucs4.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_uhc.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf16.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf32.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf7.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf7imap.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_utf8.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\mbfilter_uuencode.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfilter_wchar.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_allocators.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_consts.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_convert.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_encoding.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_filter_output.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_ident.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_language.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_memory_device.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\mbfl\mbfl_string.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_de.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_en.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_ja.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_hy.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_kr.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_neutral.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_ru.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_uni.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\nls\nls_zh.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_prop.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_big5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_cns11643.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_cp1251.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_cp1252.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_cp866.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_cp932_ext.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_cp936.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_10.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_13.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_14.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_15.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_16.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_2.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_3.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_4.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_5.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_6.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_7.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_8.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_iso8859_9.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_jis.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_koi8r.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_koi8u.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_armscii8.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\filters\unicode_table_uhc.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=.\mbfl.rc
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/ext/mbstring/libmbfl/libmbfl.dsw b/ext/mbstring/libmbfl/libmbfl.dsw deleted file mode 100644 index 69e7bf1b9..000000000 --- a/ext/mbstring/libmbfl/libmbfl.dsw +++ /dev/null @@ -1,29 +0,0 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "libmbfl"=".\libmbfl.dsp" - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - diff --git a/ext/mbstring/libmbfl/libmbfl.sln b/ext/mbstring/libmbfl/libmbfl.sln deleted file mode 100755 index becef513a..000000000 --- a/ext/mbstring/libmbfl/libmbfl.sln +++ /dev/null @@ -1,19 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libmbfl", "libmbfl.vcproj", "{B3636594-A785-4270-A765-8EAE922B5207}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B3636594-A785-4270-A765-8EAE922B5207}.Debug|Win32.ActiveCfg = Debug|Win32 - {B3636594-A785-4270-A765-8EAE922B5207}.Debug|Win32.Build.0 = Debug|Win32 - {B3636594-A785-4270-A765-8EAE922B5207}.Release|Win32.ActiveCfg = Release|Win32 - {B3636594-A785-4270-A765-8EAE922B5207}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/ext/mbstring/libmbfl/libmbfl.vcproj b/ext/mbstring/libmbfl/libmbfl.vcproj deleted file mode 100755 index 0111012d6..000000000 --- a/ext/mbstring/libmbfl/libmbfl.vcproj +++ /dev/null @@ -1,977 +0,0 @@ -<?xml version="1.0" encoding="shift_jis"?> -<VisualStudioProject - ProjectType="Visual C++" - Version="9.00" - Name="libmbfl" - ProjectGUID="{B3636594-A785-4270-A765-8EAE922B5207}" - RootNamespace="libmbfl" - TargetFrameworkVersion="131072" - > - <Platforms> - <Platform - Name="Win32" - /> - </Platforms> - <ToolFiles> - </ToolFiles> - <Configurations> - <Configuration - Name="Debug|Win32" - OutputDirectory=".\Debug" - IntermediateDirectory=".\Debug" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" - MkTypLibCompatible="true" - SuppressStartupBanner="true" - TargetEnvironment="1" - TypeLibraryName=".\Debug/mbfl.tlb" - /> - <Tool - Name="VCCLCompilerTool" - Optimization="0" - AdditionalIncludeDirectories="mbfl,." - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBMBFL_EXPORTS;MBFL_DLL_EXPORT;HAVE_CONFIG_H=1" - BasicRuntimeChecks="3" - RuntimeLibrary="1" - UsePrecompiledHeader="0" - PrecompiledHeaderFile=".\Debug/mbfl.pch" - AssemblerListingLocation=".\Debug/" - ObjectFile=".\Debug/" - ProgramDataBaseFileName=".\Debug/" - WarningLevel="3" - SuppressStartupBanner="true" - DebugInformationFormat="4" - CompileAs="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG" - Culture="1041" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\Debug/mbfl.dll" - LinkIncremental="2" - SuppressStartupBanner="true" - ModuleDefinitionFile="" - GenerateDebugInformation="true" - ProgramDatabaseFile=".\Debug/mbfl.pdb" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - ImportLibrary=".\Debug/mbfl.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - <Configuration - Name="Release|Win32" - OutputDirectory=".\Release" - IntermediateDirectory=".\Release" - ConfigurationType="2" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC70.vsprops" - UseOfMFC="0" - ATLMinimizesCRunTimeLibraryUsage="false" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" - MkTypLibCompatible="true" - SuppressStartupBanner="true" - TargetEnvironment="1" - TypeLibraryName=".\Release/mbfl.tlb" - /> - <Tool - Name="VCCLCompilerTool" - InlineFunctionExpansion="1" - AdditionalIncludeDirectories="mbfl,." - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBMBFL_EXPORTS;HAVE_CONFIG_H" - StringPooling="true" - RuntimeLibrary="0" - EnableFunctionLevelLinking="true" - UsePrecompiledHeader="0" - PrecompiledHeaderFile=".\Release/mbfl.pch" - AssemblerListingLocation=".\Release/" - ObjectFile=".\Release/" - ProgramDataBaseFileName=".\Release/" - WarningLevel="3" - SuppressStartupBanner="true" - CompileAs="0" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG" - Culture="1033" - /> - <Tool - Name="VCPreLinkEventTool" - /> - <Tool - Name="VCLinkerTool" - AdditionalOptions="/MACHINE:I386" - AdditionalDependencies="odbc32.lib odbccp32.lib" - OutputFile=".\Release/mbfl.dll" - LinkIncremental="1" - SuppressStartupBanner="true" - ModuleDefinitionFile="" - ProgramDatabaseFile=".\Release/mbfl.pdb" - RandomizedBaseAddress="1" - DataExecutionPrevention="0" - ImportLibrary=".\Release/mbfl.lib" - /> - <Tool - Name="VCALinkTool" - /> - <Tool - Name="VCManifestTool" - /> - <Tool - Name="VCXDCMakeTool" - /> - <Tool - Name="VCBscMakeTool" - /> - <Tool - Name="VCFxCopTool" - /> - <Tool - Name="VCAppVerifierTool" - /> - <Tool - Name="VCPostBuildEventTool" - /> - </Configuration> - </Configurations> - <References> - </References> - <Files> - <Filter - Name="Source Files" - Filter="vc6" - > - <File - RelativePath=".\filters\html_entities.c" - > - </File> - <File - RelativePath=".\mbfl\mbfilter.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_7bit.c" - > - </File> - <File - RelativePath=".\mbfl\mbfilter_8bit.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_ascii.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_base64.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_big5.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_byte2.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_byte4.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp1251.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp1252.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp1254.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp866.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp932.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp936.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_cn.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_jp.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_jp_win.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_kr.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_tw.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_htmlent.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_hz.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso2022_kr.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_1.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_10.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_13.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_14.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_15.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_16.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_2.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_3.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_4.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_5.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_6.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_7.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_8.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_9.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_jis.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_koi8r.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_koi8u.c" - > - </File> - <File - RelativePath=".\mbfl\mbfilter_pass.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_qprint.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_sjis.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_ucs2.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_ucs4.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_uhc.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf16.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf32.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf7.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf7imap.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf8.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_uuencode.c" - > - </File> - <File - RelativePath=".\mbfl\mbfilter_wchar.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_allocators.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_convert.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_encoding.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_filter_output.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_ident.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_language.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_memory_device.c" - > - </File> - <File - RelativePath=".\mbfl\mbfl_string.c" - > - </File> - <File - RelativePath=".\nls\nls_de.c" - > - </File> - <File - RelativePath=".\nls\nls_en.c" - > - </File> - <File - RelativePath=".\nls\nls_ja.c" - > - </File> - <File - RelativePath=".\nls\nls_kr.c" - > - </File> - <File - RelativePath=".\nls\nls_neutral.c" - > - </File> - <File - RelativePath=".\nls\nls_ru.c" - > - </File> - <File - RelativePath=".\nls\nls_uni.c" - > - </File> - <File - RelativePath=".\nls\nls_zh.c" - > - </File> - </Filter> - <Filter - Name="Header Files" - Filter="h;hpp;hxx;hm;inl" - > - <File - RelativePath=".\config.h.vc6" - > - <FileConfiguration - Name="Debug|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"
" - Outputs="$(InputDir)\config.h" - /> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32" - > - <Tool - Name="VCCustomBuildTool" - CommandLine="copy $(InputDir)\config.h.vc6 "$(InputDir)\config.h"
" - Outputs="$(InputDir)\config.h" - /> - </FileConfiguration> - </File> - <File - RelativePath=".\filters\cp932_table.h" - > - </File> - <File - RelativePath=".\filters\html_entities.h" - > - </File> - <File - RelativePath=".\mbfl\mbfilter.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_7bit.h" - > - </File> - <File - RelativePath=".\mbfl\mbfilter_8bit.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_armscii8.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_ascii.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_base64.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_big5.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_byte2.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_byte4.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp1251.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp1252.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp1254.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp5022x.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp51932.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp866.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp932.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp936.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_cn.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_jp.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_jp_win.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_kr.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_euc_tw.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_htmlent.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_hz.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso2022_kr.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_1.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_10.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_13.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_14.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_15.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_16.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_2.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_3.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_4.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_5.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_6.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_7.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_8.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_iso8859_9.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_jis.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_koi8r.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_koi8u.h" - > - </File> - <File - RelativePath=".\mbfl\mbfilter_pass.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_qprint.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_sjis.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_tl_jisx0201_jisx0208.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_ucs2.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_ucs4.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_uhc.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf16.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf32.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf7.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf7imap.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_utf8.h" - > - </File> - <File - RelativePath=".\filters\mbfilter_uuencode.h" - > - </File> - <File - RelativePath=".\mbfl\mbfilter_wchar.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_allocators.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_consts.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_convert.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_encoding.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_filter_output.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_ident.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_language.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_memory_device.h" - > - </File> - <File - RelativePath=".\mbfl\mbfl_string.h" - > - </File> - <File - RelativePath=".\nls\nls_de.h" - > - </File> - <File - RelativePath=".\nls\nls_en.h" - > - </File> - <File - RelativePath=".\nls\nls_hy.h" - > - </File> - <File - RelativePath=".\nls\nls_ja.h" - > - </File> - <File - RelativePath=".\nls\nls_kr.h" - > - </File> - <File - RelativePath=".\nls\nls_neutral.h" - > - </File> - <File - RelativePath=".\nls\nls_ru.h" - > - </File> - <File - RelativePath=".\nls\nls_tr.h" - > - </File> - <File - RelativePath=".\nls\nls_ua.h" - > - </File> - <File - RelativePath=".\nls\nls_uni.h" - > - </File> - <File - RelativePath=".\nls\nls_zh.h" - > - </File> - <File - RelativePath=".\filters\unicode_prop.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_armscii8.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_big5.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cns11643.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cp1251.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cp1252.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cp1254.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cp866.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cp932_ext.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_cp936.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_10.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_13.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_14.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_15.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_16.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_2.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_3.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_4.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_5.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_6.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_7.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_8.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_iso8859_9.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_jis.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_koi8r.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_koi8u.h" - > - </File> - <File - RelativePath=".\filters\unicode_table_uhc.h" - > - </File> - </Filter> - <Filter - Name="Resource Files" - Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" - > - <File - RelativePath=".\mbfl.rc" - > - </File> - </Filter> - <File - RelativePath=".\filters\mbfilter_armscii8.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp5022x.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_cp51932.c" - > - </File> - <File - RelativePath=".\filters\mbfilter_tl_jisx0201_jisx0208.c" - > - </File> - <File - RelativePath=".\nls\nls_hy.c" - > - </File> - <File - RelativePath=".\nls\nls_tr.c" - > - </File> - <File - RelativePath=".\nls\nls_ua.c" - > - </File> - </Files> - <Globals> - </Globals> -</VisualStudioProject> diff --git a/ext/mbstring/libmbfl/mbfl.def b/ext/mbstring/libmbfl/mbfl.def deleted file mode 100644 index e6844f5f8..000000000 --- a/ext/mbstring/libmbfl/mbfl.def +++ /dev/null @@ -1,80 +0,0 @@ -LIBRARY mbfl.dll - -DESCRIPTION "streamable kanji code filter" - -EXPORTS - _mbfl_buffer_converter_new @1 - _mbfl_buffer_converter_delete @2 - _mbfl_buffer_converter_reset @3 - _mbfl_buffer_converter_illegal_mode @4 - _mbfl_buffer_converter_illegal_substchar @5 - _mbfl_buffer_converter_strncat @6 - _mbfl_buffer_converter_feed @7 - _mbfl_buffer_converter_flush @8 - _mbfl_buffer_converter_getbuffer @9 - _mbfl_buffer_converter_result @10 - _mbfl_buffer_converter_feed_result @11 - _mbfl_encoding_detector_new @12 - _mbfl_encoding_detector_delete @13 - _mbfl_encoding_detector_feed @14 - _mbfl_encoding_detector_judge @15 - _mbfl_convert_encoding @16 - _mbfl_identify_encoding @17 - _mbfl_identify_encoding_name @18 - _mbfl_identify_encoding_no @19 - _mbfl_strlen @20 - _mbfl_oddlen @21 - _mbfl_strpos @22 - _mbfl_substr_count @23 - _mbfl_substr @24 - _mbfl_strcut @25 - _mbfl_strwidth @26 - _mbfl_strimwidth @27 - _mbfl_mime_header_encode @28 - _mbfl_mime_header_decode @29 - _mbfl_html_numeric_entity @30 - _mbfl_ja_jp_hantozen @31 - ___mbfl_allocators @32 - _mbfl_convert_filter_list @33 - _mbfl_convert_filter_new @34 - _mbfl_convert_filter_delete @35 - _mbfl_convert_filter_feed @36 - _mbfl_convert_filter_flush @37 - _mbfl_convert_filter_reset @38 - _mbfl_convert_filter_copy @39 - _mbfl_filt_conv_illegal_output @40 - _mbfl_convert_filter_select_vtbl @41 - _mbfl_convert_filter_get_vtbl @42 - _mbfl_filt_conv_common_ctor @43 - _mbfl_filt_conv_common_flush @44 - _mbfl_filt_conv_common_dtor @45 - _mbfl_encoding_8bit @46 - _mbfl_encoding_pass @47 - _mbfl_encoding_wchar @48 - _mbfl_name2encoding @49 - _mbfl_no2encoding @50 - _mbfl_name2no_encoding @51 - _mbfl_no_encoding2name @52 - _mbfl_no2preferred_mime_name @53 - _mbfl_is_support_encoding @54 - _mbfl_filter_output_pipe @55 - _mbfl_filter_output_null @56 - _mbfl_name2language @57 - _mbfl_no2language @58 - _mbfl_name2no_language @59 - _mbfl_no_language2name @60 - _mbfl_memory_device_init @61 - _mbfl_memory_device_realloc @62 - _mbfl_memory_device_clear @63 - _mbfl_memory_device_reset @64 - _mbfl_memory_device_result @65 - _mbfl_memory_device_output @66 - _mbfl_memory_device_output2 @67 - _mbfl_memory_device_output4 @68 - _mbfl_memory_device_strcat @69 - _mbfl_memory_device_devcat @70 - _mbfl_wchar_device_init @71 - _mbfl_wchar_device_output @72 - _mbfl_string_init @73 - _mbfl_string_init_set @74 - _mbfl_string_clear @75 diff --git a/ext/mbstring/libmbfl/mbfl.rc b/ext/mbstring/libmbfl/mbfl.rc deleted file mode 100644 index d885c624d..000000000 --- a/ext/mbstring/libmbfl/mbfl.rc +++ /dev/null @@ -1,24 +0,0 @@ -/* $Id: mbfl.rc 262042 2008-07-05 06:52:04Z hirokawa $ */ -1 VERSIONINFO -FILEVERSION 1,0,2,0 -PRODUCTVERSION 1,0,2,0 -FILEFLAGSMASK 0 -FILEOS 0x40000 -FILETYPE 1 -{ - BLOCK "StringFileInfo" - { - BLOCK "040904E4" - { - VALUE "CompanyName", "-\0" - VALUE "FileDescription", "streamable kanji code filter\0" - VALUE "FileVersion", "1.0.2\0" - VALUE "InternalName", "mbfl\0" - VALUE "LegalCopyright", "GNU Lesser Public License Version 2.0\0" - VALUE "OriginalFilename", "mbfl.dll\0" - VALUE "ProductName", "mbfl\0" - VALUE "ProductVersion", "1.0.2\0" - } - } -} - diff --git a/ext/mbstring/libmbfl/mbfl/Makefile.am b/ext/mbstring/libmbfl/mbfl/Makefile.am index 6e662d14e..6774d8879 100644 --- a/ext/mbstring/libmbfl/mbfl/Makefile.am +++ b/ext/mbstring/libmbfl/mbfl/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST=Makefile.bcc32 mk_eaw_tbl.awk +EXTRA_DIST=mk_eaw_tbl.awk lib_LTLIBRARIES=libmbfl.la libmbfl_la_SOURCES=mbfilter.c \ mbfl_string.c \ diff --git a/ext/mbstring/libmbfl/mbfl/Makefile.bcc32 b/ext/mbstring/libmbfl/mbfl/Makefile.bcc32 deleted file mode 100644 index 1b43a49ef..000000000 --- a/ext/mbstring/libmbfl/mbfl/Makefile.bcc32 +++ /dev/null @@ -1,18 +0,0 @@ -!include ..\rules.mak.bcc32 -OBJS=mbfilter.obj \ - mbfilter_8bit.obj \ - mbfilter_pass.obj \ - mbfilter_wchar.obj \ - mbfl_allocators.obj \ - mbfl_convert.obj \ - mbfl_encoding.obj \ - mbfl_filter_output.obj \ - mbfl_ident.obj \ - mbfl_language.obj \ - mbfl_memory_device.obj \ - mbfl_string.obj - -all: $(OBJS) - -clean: - @for %i in ($(OBJS)) do @if exist %i del %i diff --git a/ext/mbstring/libmbfl/mbfl/eaw_table.h b/ext/mbstring/libmbfl/mbfl/eaw_table.h index 95c895df1..a4f1e4fdf 100644 --- a/ext/mbstring/libmbfl/mbfl/eaw_table.h +++ b/ext/mbstring/libmbfl/mbfl/eaw_table.h @@ -2,7 +2,7 @@ static const struct { int begin; int end; } mbfl_eaw_table[] = { - { 0x1100, 0x1159 }, + { 0x1100, 0x1159 }, { 0x115f, 0x115f }, { 0x2329, 0x232a }, { 0x2e80, 0x2e99 }, @@ -32,5 +32,5 @@ static const struct { { 0xff01, 0xff60 }, { 0xffe0, 0xffe6 }, { 0x20000, 0x2fffd }, - { 0x30000, 0x3fffd } + { 0x30000, 0x3fffd } }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.c b/ext/mbstring/libmbfl/mbfl/mbfilter.c index 4997c5a88..d11cebe44 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.c +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.c @@ -102,6 +102,7 @@ #include "mbfilter.h" #include "mbfl_filter_output.h" #include "mbfilter_pass.h" +#include "filters/mbfilter_tl_jisx0201_jisx0208.h" #include "eaw_table.h" @@ -149,11 +150,15 @@ mbfl_buffer_converter_new( convd->filter1 = NULL; convd->filter2 = NULL; if (mbfl_convert_filter_get_vtbl(convd->from->no_encoding, convd->to->no_encoding) != NULL) { - convd->filter1 = mbfl_convert_filter_new(convd->from->no_encoding, convd->to->no_encoding, mbfl_memory_device_output, 0, &convd->device); + convd->filter1 = mbfl_convert_filter_new(convd->from->no_encoding, convd->to->no_encoding, mbfl_memory_device_output, NULL, &convd->device); } else { - convd->filter2 = mbfl_convert_filter_new(mbfl_no_encoding_wchar, convd->to->no_encoding, mbfl_memory_device_output, 0, &convd->device); + convd->filter2 = mbfl_convert_filter_new(mbfl_no_encoding_wchar, convd->to->no_encoding, mbfl_memory_device_output, NULL, &convd->device); if (convd->filter2 != NULL) { - convd->filter1 = mbfl_convert_filter_new(convd->from->no_encoding, mbfl_no_encoding_wchar, (int (*)(int, void*))convd->filter2->filter_function, NULL, convd->filter2); + convd->filter1 = mbfl_convert_filter_new(convd->from->no_encoding, + mbfl_no_encoding_wchar, + (int (*)(int, void*))convd->filter2->filter_function, + (int (*)(void*))convd->filter2->filter_flush, + convd->filter2); if (convd->filter1 == NULL) { mbfl_convert_filter_delete(convd->filter2); } @@ -468,7 +473,8 @@ enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *ident } n--; } - + + /* fallback judge */ if (encoding == mbfl_no_encoding_invalid) { n = identd->filter_list_size - 1; while (n >= 0) { @@ -477,7 +483,7 @@ enum mbfl_no_encoding mbfl_encoding_detector_judge(mbfl_encoding_detector *ident encoding = filter->encoding->no_encoding; } n--; - } + } } } @@ -611,8 +617,8 @@ mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int el filter = &flist[i]; if (!filter->flag) { if (strict && filter->status) { - continue; - } + continue; + } encoding = filter->encoding; break; } @@ -628,7 +634,7 @@ mbfl_identify_encoding(mbfl_string *string, enum mbfl_no_encoding *elist, int el } } } - + /* cleanup */ /* dtors should be called in reverse order */ i = num; while (--i >= 0) { @@ -1326,7 +1332,6 @@ mbfl_substr( return result; } - /* * strcut */ @@ -1338,183 +1343,280 @@ mbfl_strcut( int length) { const mbfl_encoding *encoding; - int n, m, k, len, start, end; - unsigned char *p, *w; - const unsigned char *mbtab; mbfl_memory_device device; - mbfl_convert_filter *encoder, *encoder_tmp, *decoder, *decoder_tmp; + + /* validate the parameters */ + if (string == NULL || string->val == NULL || result == NULL) { + return NULL; + } + + if (from < 0 || length < 0) { + return NULL; + } + + if (from >= string->len) { + from = string->len; + } encoding = mbfl_no2encoding(string->no_encoding); - if (encoding == NULL || string == NULL || result == NULL) { + if (encoding == NULL) { return NULL; } + mbfl_string_init(result); result->no_language = string->no_language; result->no_encoding = string->no_encoding; - if ((encoding->flag & (MBFL_ENCTYPE_SBCS | MBFL_ENCTYPE_WCS2BE | MBFL_ENCTYPE_WCS2LE | MBFL_ENCTYPE_WCS4BE | MBFL_ENCTYPE_WCS4LE)) || - encoding->mblen_table != NULL) { - len = string->len; - start = from; - end = from + length; + if ((encoding->flag & (MBFL_ENCTYPE_SBCS + | MBFL_ENCTYPE_WCS2BE + | MBFL_ENCTYPE_WCS2LE + | MBFL_ENCTYPE_WCS4BE + | MBFL_ENCTYPE_WCS4LE)) + || encoding->mblen_table != NULL) { + const unsigned char *start = NULL; + const unsigned char *end = NULL; + unsigned char *w; + unsigned int sz; + if (encoding->flag & (MBFL_ENCTYPE_WCS2BE | MBFL_ENCTYPE_WCS2LE)) { - start /= 2; - start *= 2; - end = length/2; - end *= 2; - end += start; + from &= -2; + + if (from + length >= string->len) { + length = string->len - from; + } + + start = string->val + from; + end = start + (length & -2); } else if (encoding->flag & (MBFL_ENCTYPE_WCS4BE | MBFL_ENCTYPE_WCS4LE)) { - start /= 4; - start *= 4; - end = length/4; - end *= 4; - end += start; + from &= -4; + + if (from + length >= string->len) { + length = string->len - from; + } + + start = string->val + from; + end = start + (length & -4); + } else if ((encoding->flag & MBFL_ENCTYPE_SBCS)) { + start = string->val + from; + end = start + length; } else if (encoding->mblen_table != NULL) { - mbtab = encoding->mblen_table; - start = 0; - end = 0; - n = 0; - p = string->val; - if (p != NULL) { - /* search start position */ - for (;;) { - m = mbtab[*p]; - n += m; - p += m; - if (n > from) { - break; - } - start = n; - } - /* search end position */ - k = start + length; - if (k >= (int)string->len) { - end = string->len; - } else { - end = start; - while (n <= k) { - end = n; - m = mbtab[*p]; - n += m; - p += m; - } + const unsigned char *mbtab = encoding->mblen_table; + const unsigned char *p, *q; + int m; + + /* search start position */ + for (m = 0, p = string->val, q = p + from; + p < q; p += (m = mbtab[*p])); + + if (p > q) { + p -= m; + } + + start = p; + + /* search end position */ + if ((start - string->val) + length >= (int)string->len) { + end = string->val + string->len; + } else { + for (q = p + length; p < q; p += (m = mbtab[*p])); + + if (p > q) { + p -= m; } + end = p; } + } else { + /* never reached */ + return NULL; } - if (start > len) { - start = len; - } - if (start < 0) { - start = 0; - } - if (end > len) { - end = len; - } - if (end < 0) { - end = 0; - } - if (start > end) { - start = end; - } /* allocate memory and copy string */ - n = end - start; - result->len = 0; - result->val = w = (unsigned char*)mbfl_malloc((n + 8)*sizeof(unsigned char)); - if (w != NULL) { - result->len = n; - p = &(string->val[start]); - while (n > 0) { - *w++ = *p++; - n--; - } - *w++ = '\0'; - *w++ = '\0'; - *w++ = '\0'; - *w = '\0'; - } else { - result = NULL; + sz = end - start; + if ((w = (unsigned char*)mbfl_calloc(sz + 8, + sizeof(unsigned char))) == NULL) { + return NULL; } + + memcpy(w, start, sz); + w[sz] = '\0'; + w[sz + 1] = '\0'; + w[sz + 2] = '\0'; + w[sz + 3] = '\0'; + + result->val = w; + result->len = sz; } else { - /* wchar filter */ - encoder = mbfl_convert_filter_new( - string->no_encoding, - mbfl_no_encoding_wchar, - mbfl_filter_output_null, 0, 0); - encoder_tmp = mbfl_convert_filter_new( - string->no_encoding, - mbfl_no_encoding_wchar, - mbfl_filter_output_null, 0, 0); + mbfl_convert_filter *encoder = NULL; + mbfl_convert_filter *decoder = NULL; + const unsigned char *p, *q, *r; + struct { + mbfl_convert_filter encoder; + mbfl_convert_filter decoder; + const unsigned char *p; + int pos; + } bk, _bk; + /* output code filter */ - decoder = mbfl_convert_filter_new( - mbfl_no_encoding_wchar, - string->no_encoding, - mbfl_memory_device_output, 0, &device); - decoder_tmp = mbfl_convert_filter_new( - mbfl_no_encoding_wchar, - string->no_encoding, - mbfl_memory_device_output, 0, &device); - if (encoder == NULL || encoder_tmp == NULL || decoder == NULL || decoder_tmp == NULL) { - mbfl_convert_filter_delete(encoder); - mbfl_convert_filter_delete(encoder_tmp); + if (!(decoder = mbfl_convert_filter_new( + mbfl_no_encoding_wchar, + string->no_encoding, + mbfl_memory_device_output, 0, &device))) { + return NULL; + } + + /* wchar filter */ + if (!(encoder = mbfl_convert_filter_new( + string->no_encoding, + mbfl_no_encoding_wchar, + mbfl_filter_output_null, + NULL, NULL))) { mbfl_convert_filter_delete(decoder); - mbfl_convert_filter_delete(decoder_tmp); return NULL; } + mbfl_memory_device_init(&device, length + 8, 0); - k = 0; - n = 0; + p = string->val; - if (p != NULL) { - /* seartch start position */ - while (n < from) { - (*encoder->filter_function)(*p++, encoder); - n++; - } + + /* search start position */ + for (q = string->val + from; p < q; p++) { + (*encoder->filter_function)(*p, encoder); + } + + /* switch the drain direction */ + encoder->output_function = (int(*)(int,void *))decoder->filter_function; + encoder->flush_function = (int(*)(void *))decoder->filter_flush; + encoder->data = decoder; + + q = string->val + string->len; + + /* save the encoder, decoder state and the pointer */ + mbfl_convert_filter_copy(decoder, &_bk.decoder); + mbfl_convert_filter_copy(encoder, &_bk.encoder); + _bk.p = p; + _bk.pos = device.pos; + + if (length > q - p) { + length = q - p; + } + + if (length >= 20) { /* output a little shorter than "length" */ - encoder->output_function = mbfl_filter_output_pipe; - encoder->data = decoder; - k = length - 20; - len = string->len; - while (n < len && device.pos < k) { - (*encoder->filter_function)(*p++, encoder); - n++; - } - /* detect end position */ - for (;;) { - /* backup current state */ - k = device.pos; - mbfl_convert_filter_copy(encoder, encoder_tmp); - mbfl_convert_filter_copy(decoder, decoder_tmp); - if (n >= len) { - break; - } - /* feed 1byte and flush */ + /* XXX: the constant "20" was determined purely on the heuristics. */ + for (r = p + length - 20; p < r; p++) { (*encoder->filter_function)(*p, encoder); + } + + /* if the offset of the resulting string exceeds the length, + * then restore the state */ + if (device.pos > length) { + p = _bk.p; + device.pos = _bk.pos; + decoder->filter_dtor(decoder); + encoder->filter_dtor(encoder); + mbfl_convert_filter_copy(&_bk.decoder, decoder); + mbfl_convert_filter_copy(&_bk.encoder, encoder); + bk = _bk; + } else { + /* save the encoder, decoder state and the pointer */ + mbfl_convert_filter_copy(decoder, &bk.decoder); + mbfl_convert_filter_copy(encoder, &bk.encoder); + bk.p = p; + bk.pos = device.pos; + + /* flush the stream */ (*encoder->filter_flush)(encoder); - (*decoder->filter_flush)(decoder); + + /* if the offset of the resulting string exceeds the length, + * then restore the state */ if (device.pos > length) { - break; + bk.decoder.filter_dtor(&bk.decoder); + bk.encoder.filter_dtor(&bk.encoder); + + p = _bk.p; + device.pos = _bk.pos; + decoder->filter_dtor(decoder); + encoder->filter_dtor(encoder); + mbfl_convert_filter_copy(&_bk.decoder, decoder); + mbfl_convert_filter_copy(&_bk.encoder, encoder); + bk = _bk; + } else { + _bk.decoder.filter_dtor(&_bk.decoder); + _bk.encoder.filter_dtor(&_bk.encoder); + + p = bk.p; + device.pos = bk.pos; + decoder->filter_dtor(decoder); + encoder->filter_dtor(encoder); + mbfl_convert_filter_copy(&bk.decoder, decoder); + mbfl_convert_filter_copy(&bk.encoder, encoder); } - /* restore filter and re-feed data */ - device.pos = k; - mbfl_convert_filter_copy(encoder_tmp, encoder); - mbfl_convert_filter_copy(decoder_tmp, decoder); - (*encoder->filter_function)(*p, encoder); - p++; - n++; } - device.pos = k; - mbfl_convert_filter_copy(encoder_tmp, encoder); - mbfl_convert_filter_copy(decoder_tmp, decoder); - mbfl_convert_filter_flush(encoder); - mbfl_convert_filter_flush(decoder); + } else { + bk = _bk; + } + + /* detect end position */ + while (p < q) { + (*encoder->filter_function)(*p, encoder); + + if (device.pos > length) { + /* restore filter */ + p = bk.p; + device.pos = bk.pos; + decoder->filter_dtor(decoder); + encoder->filter_dtor(encoder); + mbfl_convert_filter_copy(&bk.decoder, decoder); + mbfl_convert_filter_copy(&bk.encoder, encoder); + break; + } + + p++; + + /* backup current state */ + mbfl_convert_filter_copy(decoder, &_bk.decoder); + mbfl_convert_filter_copy(encoder, &_bk.encoder); + _bk.pos = device.pos; + _bk.p = p; + + (*encoder->filter_flush)(encoder); + + if (device.pos > length) { + _bk.decoder.filter_dtor(&_bk.decoder); + _bk.encoder.filter_dtor(&_bk.encoder); + + /* restore filter */ + p = bk.p; + device.pos = bk.pos; + decoder->filter_dtor(decoder); + encoder->filter_dtor(encoder); + mbfl_convert_filter_copy(&bk.decoder, decoder); + mbfl_convert_filter_copy(&bk.encoder, encoder); + break; + } + + bk.decoder.filter_dtor(&bk.decoder); + bk.encoder.filter_dtor(&bk.encoder); + + p = _bk.p; + device.pos = _bk.pos; + decoder->filter_dtor(decoder); + encoder->filter_dtor(encoder); + mbfl_convert_filter_copy(&_bk.decoder, decoder); + mbfl_convert_filter_copy(&_bk.encoder, encoder); + + bk = _bk; } + + (*encoder->filter_flush)(encoder); + + bk.decoder.filter_dtor(&bk.decoder); + bk.encoder.filter_dtor(&bk.encoder); + result = mbfl_memory_device_result(&device, result); + mbfl_convert_filter_delete(encoder); - mbfl_convert_filter_delete(encoder_tmp); mbfl_convert_filter_delete(decoder); - mbfl_convert_filter_delete(decoder_tmp); } return result; @@ -1731,276 +1833,6 @@ mbfl_strimwidth( return result; } - - -/* - * convert Hankaku and Zenkaku - */ -struct collector_hantozen_data { - mbfl_convert_filter *next_filter; - int mode; - int status; - int cache; -}; - -static const unsigned char hankana2zenkata_table[64] = { - 0x00,0x02,0x0C,0x0D,0x01,0xFB,0xF2,0xA1,0xA3,0xA5, - 0xA7,0xA9,0xE3,0xE5,0xE7,0xC3,0xFC,0xA2,0xA4,0xA6, - 0xA8,0xAA,0xAB,0xAD,0xAF,0xB1,0xB3,0xB5,0xB7,0xB9, - 0xBB,0xBD,0xBF,0xC1,0xC4,0xC6,0xC8,0xCA,0xCB,0xCC, - 0xCD,0xCE,0xCF,0xD2,0xD5,0xD8,0xDB,0xDE,0xDF,0xE0, - 0xE1,0xE2,0xE4,0xE6,0xE8,0xE9,0xEA,0xEB,0xEC,0xED, - 0xEF,0xF3,0x9B,0x9C -}; -static const unsigned char hankana2zenhira_table[64] = { - 0x00,0x02,0x0C,0x0D,0x01,0xFB,0x92,0x41,0x43,0x45, - 0x47,0x49,0x83,0x85,0x87,0x63,0xFC,0x42,0x44,0x46, - 0x48,0x4A,0x4B,0x4D,0x4F,0x51,0x53,0x55,0x57,0x59, - 0x5B,0x5D,0x5F,0x61,0x64,0x66,0x68,0x6A,0x6B,0x6C, - 0x6D,0x6E,0x6F,0x72,0x75,0x78,0x7B,0x7E,0x7F,0x80, - 0x81,0x82,0x84,0x86,0x88,0x89,0x8A,0x8B,0x8C,0x8D, - 0x8F,0x93,0x9B,0x9C -}; -static const unsigned char zenkana2hankana_table[84][2] = { - {0x67,0x00},{0x71,0x00},{0x68,0x00},{0x72,0x00},{0x69,0x00}, - {0x73,0x00},{0x6A,0x00},{0x74,0x00},{0x6B,0x00},{0x75,0x00}, - {0x76,0x00},{0x76,0x9E},{0x77,0x00},{0x77,0x9E},{0x78,0x00}, - {0x78,0x9E},{0x79,0x00},{0x79,0x9E},{0x7A,0x00},{0x7A,0x9E}, - {0x7B,0x00},{0x7B,0x9E},{0x7C,0x00},{0x7C,0x9E},{0x7D,0x00}, - {0x7D,0x9E},{0x7E,0x00},{0x7E,0x9E},{0x7F,0x00},{0x7F,0x9E}, - {0x80,0x00},{0x80,0x9E},{0x81,0x00},{0x81,0x9E},{0x6F,0x00}, - {0x82,0x00},{0x82,0x9E},{0x83,0x00},{0x83,0x9E},{0x84,0x00}, - {0x84,0x9E},{0x85,0x00},{0x86,0x00},{0x87,0x00},{0x88,0x00}, - {0x89,0x00},{0x8A,0x00},{0x8A,0x9E},{0x8A,0x9F},{0x8B,0x00}, - {0x8B,0x9E},{0x8B,0x9F},{0x8C,0x00},{0x8C,0x9E},{0x8C,0x9F}, - {0x8D,0x00},{0x8D,0x9E},{0x8D,0x9F},{0x8E,0x00},{0x8E,0x9E}, - {0x8E,0x9F},{0x8F,0x00},{0x90,0x00},{0x91,0x00},{0x92,0x00}, - {0x93,0x00},{0x6C,0x00},{0x94,0x00},{0x6D,0x00},{0x95,0x00}, - {0x6E,0x00},{0x96,0x00},{0x97,0x00},{0x98,0x00},{0x99,0x00}, - {0x9A,0x00},{0x9B,0x00},{0x9C,0x00},{0x9C,0x00},{0x72,0x00}, - {0x74,0x00},{0x66,0x00},{0x9D,0x00},{0x73,0x9E} -}; - -static int -collector_hantozen(int c, void* data) -{ - int s, mode, n; - struct collector_hantozen_data *pc = (struct collector_hantozen_data*)data; - - s = c; - mode = pc->mode; - - if (mode & 0xf) { /* hankaku to zenkaku */ - if ((mode & 0x1) && c >= 0x21 && c <= 0x7d && c != 0x22 && c != 0x27 && c != 0x5c) { /* all except <"> <'> <\> <~> */ - s = c + 0xfee0; - } else if ((mode & 0x2) && ((c >= 0x41 && c <= 0x5a) || (c >= 0x61 && c <= 0x7a))) { /* alpha */ - s = c + 0xfee0; - } else if ((mode & 0x4) && c >= 0x30 && c <= 0x39) { /* num */ - s = c + 0xfee0; - } else if ((mode & 0x8) && c == 0x20) { /* spase */ - s = 0x3000; - } - } - - if (mode & 0xf0) { /* zenkaku to hankaku */ - if ((mode & 0x10) && c >= 0xff01 && c <= 0xff5d && c != 0xff02 && c != 0xff07 && c!= 0xff3c) { /* all except <"> <'> <\> <~> */ - s = c - 0xfee0; - } else if ((mode & 0x20) && ((c >= 0xff21 && c <= 0xff3a) || (c >= 0xff41 && c <= 0xff5a))) { /* alpha */ - s = c - 0xfee0; - } else if ((mode & 0x40) && (c >= 0xff10 && c <= 0xff19)) { /* num */ - s = c - 0xfee0; - } else if ((mode & 0x80) && (c == 0x3000)) { /* spase */ - s = 0x20; - } else if ((mode & 0x10) && (c == 0x2212)) { /* MINUS SIGN */ - s = 0x2d; - } - } - - if (mode & 0x300) { /* hankaku kana to zenkaku kana */ - if ((mode & 0x100) && (mode & 0x800)) { /* hankaku kana to zenkaku katakana and glue voiced sound mark */ - if (c >= 0xff61 && c <= 0xff9f) { - if (pc->status) { - n = (pc->cache - 0xff60) & 0x3f; - if (c == 0xff9e && ((n >= 22 && n <= 36) || (n >= 42 && n <= 46))) { - pc->status = 0; - s = 0x3001 + hankana2zenkata_table[n]; - } else if (c == 0xff9e && n == 19) { - pc->status = 0; - s = 0x30f4; - } else if (c == 0xff9f && (n >= 42 && n <= 46)) { - pc->status = 0; - s = 0x3002 + hankana2zenkata_table[n]; - } else { - pc->status = 1; - pc->cache = c; - s = 0x3000 + hankana2zenkata_table[n]; - } - } else { - pc->status = 1; - pc->cache = c; - return c; - } - } else { - if (pc->status) { - n = (pc->cache - 0xff60) & 0x3f; - pc->status = 0; - (*pc->next_filter->filter_function)(0x3000 + hankana2zenkata_table[n], pc->next_filter); - } - } - } else if ((mode & 0x200) && (mode & 0x800)) { /* hankaku kana to zenkaku hirangana and glue voiced sound mark */ - if (c >= 0xff61 && c <= 0xff9f) { - if (pc->status) { - n = (pc->cache - 0xff60) & 0x3f; - if (c == 0xff9e && ((n >= 22 && n <= 36) || (n >= 42 && n <= 46))) { - pc->status = 0; - s = 0x3001 + hankana2zenhira_table[n]; - } else if (c == 0xff9f && (n >= 42 && n <= 46)) { - pc->status = 0; - s = 0x3002 + hankana2zenhira_table[n]; - } else { - pc->status = 1; - pc->cache = c; - s = 0x3000 + hankana2zenhira_table[n]; - } - } else { - pc->status = 1; - pc->cache = c; - return c; - } - } else { - if (pc->status) { - n = (pc->cache - 0xff60) & 0x3f; - pc->status = 0; - (*pc->next_filter->filter_function)(0x3000 + hankana2zenhira_table[n], pc->next_filter); - } - } - } else if ((mode & 0x100) && c >= 0xff61 && c <= 0xff9f) { /* hankaku kana to zenkaku katakana */ - s = 0x3000 + hankana2zenkata_table[c - 0xff60]; - } else if ((mode & 0x200) && c >= 0xff61 && c <= 0xff9f) { /* hankaku kana to zenkaku hirangana */ - s = 0x3000 + hankana2zenhira_table[c - 0xff60]; - } - } - - if (mode & 0x3000) { /* Zenkaku kana to hankaku kana */ - if ((mode & 0x1000) && c >= 0x30a1 && c <= 0x30f4) { /* Zenkaku katakana to hankaku kana */ - n = c - 0x30a1; - if (zenkana2hankana_table[n][1] != 0) { - (*pc->next_filter->filter_function)(0xff00 + zenkana2hankana_table[n][0], pc->next_filter); - s = 0xff00 + zenkana2hankana_table[n][1]; - } else { - s = 0xff00 + zenkana2hankana_table[n][0]; - } - } else if ((mode & 0x2000) && c >= 0x3041 && c <= 0x3093) { /* Zenkaku hirangana to hankaku kana */ - n = c - 0x3041; - if (zenkana2hankana_table[n][1] != 0) { - (*pc->next_filter->filter_function)(0xff00 + zenkana2hankana_table[n][0], pc->next_filter); - s = 0xff00 + zenkana2hankana_table[n][1]; - } else { - s = 0xff00 + zenkana2hankana_table[n][0]; - } - } else if (c == 0x3001) { - s = 0xff64; /* HALFWIDTH IDEOGRAPHIC COMMA */ - } else if (c == 0x3002) { - s = 0xff61; /* HALFWIDTH IDEOGRAPHIC FULL STOP */ - } else if (c == 0x300c) { - s = 0xff62; /* HALFWIDTH LEFT CORNER BRACKET */ - } else if (c == 0x300d) { - s = 0xff63; /* HALFWIDTH RIGHT CORNER BRACKET */ - } else if (c == 0x309b) { - s = 0xff9e; /* HALFWIDTH KATAKANA VOICED SOUND MARK */ - } else if (c == 0x309c) { - s = 0xff9f; /* HALFWIDTH KATAKANA SEMI-VOICED SOUND MARK */ - } else if (c == 0x30fc) { - s = 0xff70; /* HALFWIDTH KATAKANA-HIRAGANA PROLONGED SOUND MARK */ - } else if (c == 0x30fb) { - s = 0xff65; /* HALFWIDTH KATAKANA MIDDLE DOT */ - } - } else if (mode & 0x30000) { - if ((mode & 0x10000) && c >= 0x3041 && c <= 0x3093) { /* Zenkaku hirangana to Zenkaku katakana */ - s = c + 0x60; - } else if ((mode & 0x20000) && c >= 0x30a1 && c <= 0x30f3) { /* Zenkaku katakana to Zenkaku hirangana */ - s = c - 0x60; - } - } - - if (mode & 0x100000) { /* special ascii to symbol */ - if (c == 0x5c) { - s = 0xffe5; /* FULLWIDTH YEN SIGN */ - } else if (c == 0xa5) { /* YEN SIGN */ - s = 0xffe5; /* FULLWIDTH YEN SIGN */ - } else if (c == 0x7e) { - s = 0xffe3; /* FULLWIDTH MACRON */ - } else if (c == 0x203e) { /* OVERLINE */ - s = 0xffe3; /* FULLWIDTH MACRON */ - } else if (c == 0x27) { - s = 0x2019; /* RIGHT SINGLE QUOTATION MARK */ - } else if (c == 0x22) { - s = 0x201d; /* RIGHT DOUBLE QUOTATION MARK */ - } - } else if (mode & 0x200000) { /* special symbol to ascii */ - if (c == 0xffe5) { /* FULLWIDTH YEN SIGN */ - s = 0x5c; - } else if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ - s = 0x5c; - } else if (c == 0xffe3) { /* FULLWIDTH MACRON */ - s = 0x7e; - } else if (c == 0x203e) { /* OVERLINE */ - s = 0x7e; - } else if (c == 0x2018) { /* LEFT SINGLE QUOTATION MARK*/ - s = 0x27; - } else if (c == 0x2019) { /* RIGHT SINGLE QUOTATION MARK */ - s = 0x27; - } else if (c == 0x201c) { /* LEFT DOUBLE QUOTATION MARK */ - s = 0x22; - } else if (c == 0x201d) { /* RIGHT DOUBLE QUOTATION MARK */ - s = 0x22; - } - } - - if (mode & 0x400000) { /* special ascii to symbol */ - if (c == 0x5c) { - s = 0xff3c; /* FULLWIDTH REVERSE SOLIDUS */ - } else if (c == 0x7e) { - s = 0xff5e; /* FULLWIDTH TILDE */ - } else if (c == 0x27) { - s = 0xff07; /* FULLWIDTH APOSTROPHE */ - } else if (c == 0x22) { - s = 0xff02; /* FULLWIDTH QUOTATION MARK */ - } - } else if (mode & 0x800000) { /* special symbol to ascii */ - if (c == 0xff3c) { /* FULLWIDTH REVERSE SOLIDUS */ - s = 0x5c; - } else if (c == 0xff5e) { /* FULLWIDTH TILDE */ - s = 0x7e; - } else if (c == 0xff07) { /* FULLWIDTH APOSTROPHE */ - s = 0x27; - } else if (c == 0xff02) { /* FULLWIDTH QUOTATION MARK */ - s = 0x22; - } - } - - return (*pc->next_filter->filter_function)(s, pc->next_filter); -} - -static int -collector_hantozen_flush(struct collector_hantozen_data *pc) -{ - int ret, n; - - ret = 0; - if (pc->status) { - n = (pc->cache - 0xff60) & 0x3f; - if (pc->mode & 0x100) { /* hankaku kana to zenkaku katakana */ - ret = (*pc->next_filter->filter_function)(0x3000 + hankana2zenkata_table[n], pc->next_filter); - } else if (pc->mode & 0x200) { /* hankaku kana to zenkaku hirangana */ - ret = (*pc->next_filter->filter_function)(0x3000 + hankana2zenhira_table[n], pc->next_filter); - } - pc->status = 0; - } - - return ret; -} - mbfl_string * mbfl_ja_jp_hantozen( mbfl_string *string, @@ -2011,39 +1843,67 @@ mbfl_ja_jp_hantozen( unsigned char *p; const mbfl_encoding *encoding; mbfl_memory_device device; - struct collector_hantozen_data pc; - mbfl_convert_filter *decoder; - mbfl_convert_filter *encoder; + mbfl_convert_filter *decoder = NULL; + mbfl_convert_filter *encoder = NULL; + mbfl_convert_filter *tl_filter = NULL; + mbfl_convert_filter *next_filter = NULL; + mbfl_filt_tl_jisx0201_jisx0208_param *param = NULL; - /* initialize */ + /* validate parameters */ if (string == NULL || result == NULL) { return NULL; } + encoding = mbfl_no2encoding(string->no_encoding); if (encoding == NULL) { return NULL; } + mbfl_memory_device_init(&device, string->len, 0); mbfl_string_init(result); + result->no_language = string->no_language; result->no_encoding = string->no_encoding; + decoder = mbfl_convert_filter_new( - mbfl_no_encoding_wchar, - string->no_encoding, - mbfl_memory_device_output, 0, &device); + mbfl_no_encoding_wchar, + string->no_encoding, + mbfl_memory_device_output, 0, &device); + if (decoder == NULL) { + goto out; + } + next_filter = decoder; + + param = + (mbfl_filt_tl_jisx0201_jisx0208_param *)mbfl_malloc(sizeof(mbfl_filt_tl_jisx0201_jisx0208_param)); + if (param == NULL) { + goto out; + } + + param->mode = mode; + + tl_filter = mbfl_convert_filter_new2( + &vtbl_tl_jisx0201_jisx0208, + (int(*)(int, void*))next_filter->filter_function, + (int(*)(void*))next_filter->filter_flush, + next_filter); + if (tl_filter == NULL) { + mbfl_free(param); + goto out; + } + + tl_filter->opaque = param; + next_filter = tl_filter; + encoder = mbfl_convert_filter_new( - string->no_encoding, - mbfl_no_encoding_wchar, - collector_hantozen, 0, &pc); - if (decoder == NULL || encoder == NULL) { - mbfl_convert_filter_delete(encoder); - mbfl_convert_filter_delete(decoder); - return NULL; + string->no_encoding, + mbfl_no_encoding_wchar, + (int(*)(int, void*))next_filter->filter_function, + (int(*)(void*))next_filter->filter_flush, + next_filter); + if (encoder == NULL) { + goto out; } - pc.next_filter = decoder; - pc.mode = mode; - pc.status = 0; - pc.cache = 0; /* feed data */ p = string->val; @@ -2058,11 +1918,22 @@ mbfl_ja_jp_hantozen( } mbfl_convert_filter_flush(encoder); - collector_hantozen_flush(&pc); - mbfl_convert_filter_flush(decoder); result = mbfl_memory_device_result(&device, result); - mbfl_convert_filter_delete(encoder); - mbfl_convert_filter_delete(decoder); +out: + if (tl_filter != NULL) { + if (tl_filter->opaque != NULL) { + mbfl_free(tl_filter->opaque); + } + mbfl_convert_filter_delete(tl_filter); + } + + if (decoder != NULL) { + mbfl_convert_filter_delete(decoder); + } + + if (encoder != NULL) { + mbfl_convert_filter_delete(encoder); + } return result; } diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter.h b/ext/mbstring/libmbfl/mbfl/mbfilter.h index a00c51b5f..4565fc698 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter.h @@ -102,8 +102,8 @@ * version information */ #define MBFL_VERSION_MAJOR 1 -#define MBFL_VERSION_MINOR 0 -#define MBFL_VERSION_TEENY 2 +#define MBFL_VERSION_MINOR 1 +#define MBFL_VERSION_TEENY 0 /* * convert filter diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h index 4fc892260..a87c56461 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_8bit.h @@ -34,6 +34,6 @@ #include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_8bit; +MBFLAPI extern const mbfl_encoding mbfl_encoding_8bit; #endif /* MBFL_MBFILTER_8BIT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h index 087aa2c3b..49d169c66 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_pass.h @@ -33,8 +33,8 @@ #include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_pass; -extern const struct mbfl_convert_vtbl vtbl_pass; +MBFLAPI extern const mbfl_encoding mbfl_encoding_pass; +MBFLAPI extern const struct mbfl_convert_vtbl vtbl_pass; MBFLAPI extern int mbfl_filt_conv_pass(int c, mbfl_convert_filter *filter); diff --git a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h index 24bf7473c..9e9396a77 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h +++ b/ext/mbstring/libmbfl/mbfl/mbfilter_wchar.h @@ -34,6 +34,6 @@ #include "mbfl_defs.h" #include "mbfilter.h" -extern const mbfl_encoding mbfl_encoding_wchar; +MBFLAPI extern const mbfl_encoding mbfl_encoding_wchar; #endif /* MBFL_MBFILTER_WCHAR_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c index 725a674b3..d81b533dd 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.c @@ -51,6 +51,7 @@ #include "filters/mbfilter_euc_kr.h" #include "filters/mbfilter_iso2022_kr.h" #include "filters/mbfilter_sjis.h" +#include "filters/mbfilter_sjis_open.h" #include "filters/mbfilter_cp51932.h" #include "filters/mbfilter_jis.h" #include "filters/mbfilter_iso2022_jp_ms.h" @@ -65,6 +66,7 @@ #include "filters/mbfilter_cp1251.h" #include "filters/mbfilter_cp1252.h" #include "filters/mbfilter_cp1254.h" +#include "filters/mbfilter_cp5022x.h" #include "filters/mbfilter_iso8859_1.h" #include "filters/mbfilter_iso8859_2.h" #include "filters/mbfilter_iso8859_3.h" @@ -95,8 +97,6 @@ #include "filters/mbfilter_armscii8.h" #include "filters/mbfilter_cp850.h" -static void mbfl_convert_filter_reset_vtbl(mbfl_convert_filter *filter); - /* hex character table "0123456789ABCDEF" */ static char mbfl_hexchar_table[] = { 0x30,0x31,0x32,0x33,0x34,0x35,0x36,0x37,0x38,0x39,0x41,0x42,0x43,0x44,0x45,0x46 @@ -109,18 +109,22 @@ const struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = { &vtbl_wchar_eucjp, &vtbl_sjis_wchar, &vtbl_wchar_sjis, + &vtbl_sjis_open_wchar, + &vtbl_wchar_sjis_open, &vtbl_cp51932_wchar, &vtbl_wchar_cp51932, &vtbl_jis_wchar, &vtbl_wchar_jis, + &vtbl_jis_ms_wchar, + &vtbl_wchar_jis_ms, &vtbl_2022jp_wchar, &vtbl_wchar_2022jp, &vtbl_2022jpms_wchar, &vtbl_wchar_2022jpms, &vtbl_eucjpwin_wchar, &vtbl_wchar_eucjpwin, - &vtbl_sjiswin_wchar, - &vtbl_wchar_sjiswin, + &vtbl_cp932_wchar, + &vtbl_wchar_cp932, &vtbl_euccn_wchar, &vtbl_wchar_euccn, &vtbl_cp936_wchar, @@ -149,6 +153,14 @@ const struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = { &vtbl_wchar_cp1252, &vtbl_cp1254_wchar, &vtbl_wchar_cp1254, + &vtbl_cp50220_wchar, + &vtbl_wchar_cp50220, + &vtbl_cp50220raw_wchar, + &vtbl_wchar_cp50220raw, + &vtbl_cp50221_wchar, + &vtbl_wchar_cp50221, + &vtbl_cp50222_wchar, + &vtbl_wchar_cp50222, &vtbl_ascii_wchar, &vtbl_wchar_ascii, &vtbl_8859_1_wchar, @@ -230,6 +242,48 @@ const struct mbfl_convert_vtbl *mbfl_convert_filter_list[] = { NULL }; +static int +mbfl_convert_filter_common_init( + mbfl_convert_filter *filter, + enum mbfl_no_encoding from, + enum mbfl_no_encoding to, + const struct mbfl_convert_vtbl *vtbl, + int (*output_function)(int, void* ), + int (*flush_function)(void*), + void* data) +{ + /* encoding structure */ + if ((filter->from = mbfl_no2encoding(from)) == NULL) { + return 1; + } + + if ((filter->to = mbfl_no2encoding(to)) == NULL) { + return 1; + } + + if (output_function != NULL) { + filter->output_function = output_function; + } else { + filter->output_function = mbfl_filter_output_null; + } + + filter->flush_function = flush_function; + filter->data = data; + filter->illegal_mode = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; + filter->illegal_substchar = 0x3f; /* '?' */ + filter->num_illegalchar = 0; + filter->filter_ctor = vtbl->filter_ctor; + filter->filter_dtor = vtbl->filter_dtor; + filter->filter_function = vtbl->filter_function; + filter->filter_flush = vtbl->filter_flush; + filter->filter_copy = vtbl->filter_copy; + + (*filter->filter_ctor)(filter); + + return 0; +} + + mbfl_convert_filter * mbfl_convert_filter_new( enum mbfl_no_encoding from, @@ -239,6 +293,13 @@ mbfl_convert_filter_new( void* data) { mbfl_convert_filter * filter; + const struct mbfl_convert_vtbl *vtbl; + + vtbl = mbfl_convert_filter_get_vtbl(from, to); + + if (vtbl == NULL) { + vtbl = &vtbl_pass; + } /* allocate */ filter = (mbfl_convert_filter *)mbfl_malloc(sizeof(mbfl_convert_filter)); @@ -246,32 +307,39 @@ mbfl_convert_filter_new( return NULL; } - /* encoding structure */ - filter->from = mbfl_no2encoding(from); - filter->to = mbfl_no2encoding(to); - if (filter->from == NULL) { - filter->from = &mbfl_encoding_pass; - } - if (filter->to == NULL) { - filter->to = &mbfl_encoding_pass; + if (mbfl_convert_filter_common_init(filter, from, to, vtbl, + output_function, flush_function, data)) { + mbfl_free(filter); + return NULL; } - if (output_function != NULL) { - filter->output_function = output_function; - } else { - filter->output_function = mbfl_filter_output_null; + return filter; +} + +mbfl_convert_filter * +mbfl_convert_filter_new2( + const struct mbfl_convert_vtbl *vtbl, + int (*output_function)(int, void* ), + int (*flush_function)(void*), + void* data) +{ + mbfl_convert_filter * filter; + + if (vtbl == NULL) { + vtbl = &vtbl_pass; } - filter->flush_function = flush_function; - filter->data = data; - filter->illegal_mode = MBFL_OUTPUTFILTER_ILLEGAL_MODE_CHAR; - filter->illegal_substchar = 0x3f; /* '?' */ - filter->num_illegalchar = 0; - /* setup the function table */ - mbfl_convert_filter_reset_vtbl(filter); + /* allocate */ + filter = (mbfl_convert_filter *)mbfl_malloc(sizeof(mbfl_convert_filter)); + if (filter == NULL) { + return NULL; + } - /* constructor */ - (*filter->filter_ctor)(filter); + if (mbfl_convert_filter_common_init(filter, vtbl->from, vtbl->to, vtbl, + output_function, flush_function, data)) { + mbfl_free(filter); + return NULL; + } return filter; } @@ -301,39 +369,32 @@ mbfl_convert_filter_flush(mbfl_convert_filter *filter) void mbfl_convert_filter_reset(mbfl_convert_filter *filter, enum mbfl_no_encoding from, enum mbfl_no_encoding to) { + const struct mbfl_convert_vtbl *vtbl; + /* destruct old filter */ (*filter->filter_dtor)(filter); - /* resset filter member */ - filter->from = mbfl_no2encoding(from); - filter->to = mbfl_no2encoding(to); + vtbl = mbfl_convert_filter_get_vtbl(from, to); - /* set the vtbl */ - mbfl_convert_filter_reset_vtbl(filter); + if (vtbl == NULL) { + vtbl = &vtbl_pass; + } - /* construct new filter */ - (*filter->filter_ctor)(filter); + mbfl_convert_filter_common_init(filter, from, to, vtbl, + filter->output_function, filter->flush_function, filter->data); } void mbfl_convert_filter_copy( mbfl_convert_filter *src, - mbfl_convert_filter *dist) + mbfl_convert_filter *dest) { - dist->filter_ctor = src->filter_ctor; - dist->filter_dtor = src->filter_dtor; - dist->filter_function = src->filter_function; - dist->filter_flush = src->filter_flush; - dist->output_function = src->output_function; - dist->flush_function = src->flush_function; - dist->data = src->data; - dist->status = src->status; - dist->cache = src->cache; - dist->from = src->from; - dist->to = src->to; - dist->illegal_mode = src->illegal_mode; - dist->illegal_substchar = src->illegal_substchar; - dist->num_illegalchar = src->num_illegalchar; + if (src->filter_copy != NULL) { + src->filter_copy(src, dest); + return; + } + + *dest = *src; } int mbfl_convert_filter_devcat(mbfl_convert_filter *filter, mbfl_memory_device *src) @@ -466,6 +527,7 @@ mbfl_filt_conv_illegal_output(int c, mbfl_convert_filter *filter) } filter->illegal_mode = mode_backup; filter->num_illegalchar++; + return ret; } @@ -494,22 +556,6 @@ const struct mbfl_convert_vtbl * mbfl_convert_filter_get_vtbl(enum mbfl_no_encod return NULL; } - -static void mbfl_convert_filter_reset_vtbl(mbfl_convert_filter *filter) -{ - const struct mbfl_convert_vtbl *vtbl; - - vtbl = mbfl_convert_filter_get_vtbl(filter->from->no_encoding, filter->to->no_encoding); - if (vtbl == NULL) { - vtbl = &vtbl_pass; - } - - filter->filter_ctor = vtbl->filter_ctor; - filter->filter_dtor = vtbl->filter_dtor; - filter->filter_function = vtbl->filter_function; - filter->filter_flush = vtbl->filter_flush; -} - /* * commonly used constructor and destructor */ @@ -523,6 +569,10 @@ int mbfl_filt_conv_common_flush(mbfl_convert_filter *filter) { filter->status = 0; filter->cache = 0; + + if (filter->flush_function != NULL) { + (*filter->flush_function)(filter->data); + } return 0; } diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_convert.h b/ext/mbstring/libmbfl/mbfl/mbfl_convert.h index bf8b3bd63..8b5ba5bc1 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_convert.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_convert.h @@ -40,6 +40,7 @@ typedef struct _mbfl_convert_filter mbfl_convert_filter; struct _mbfl_convert_filter { void (*filter_ctor)(mbfl_convert_filter *filter); void (*filter_dtor)(mbfl_convert_filter *filter); + void (*filter_copy)(mbfl_convert_filter *src, mbfl_convert_filter *dest); int (*filter_function)(int c, mbfl_convert_filter *filter); int (*filter_flush)(mbfl_convert_filter *filter); int (*output_function)(int c, void *data); @@ -62,6 +63,7 @@ struct mbfl_convert_vtbl { void (*filter_dtor)(mbfl_convert_filter *filter); int (*filter_function)(int c, mbfl_convert_filter *filter); int (*filter_flush)(mbfl_convert_filter *filter); + void (*filter_copy)(mbfl_convert_filter *src, mbfl_convert_filter *dest); }; MBFLAPI extern const struct mbfl_convert_vtbl *mbfl_convert_filter_list[]; @@ -72,6 +74,11 @@ MBFLAPI extern mbfl_convert_filter *mbfl_convert_filter_new( int (*output_function)(int, void *), int (*flush_function)(void *), void *data ); +MBFLAPI extern mbfl_convert_filter *mbfl_convert_filter_new2( + const struct mbfl_convert_vtbl *vtbl, + int (*output_function)(int, void *), + int (*flush_function)(void *), + void *data ); MBFLAPI extern void mbfl_convert_filter_delete(mbfl_convert_filter *filter); MBFLAPI extern int mbfl_convert_filter_feed(int c, mbfl_convert_filter *filter); MBFLAPI extern int mbfl_convert_filter_flush(mbfl_convert_filter *filter); diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c index 76956f053..17955b2c9 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.c @@ -57,6 +57,7 @@ #include "filters/mbfilter_euc_kr.h" #include "filters/mbfilter_iso2022_kr.h" #include "filters/mbfilter_sjis.h" +#include "filters/mbfilter_sjis_open.h" #include "filters/mbfilter_cp51932.h" #include "filters/mbfilter_jis.h" #include "filters/mbfilter_iso2022_jp_ms.h" @@ -71,6 +72,7 @@ #include "filters/mbfilter_cp1251.h" #include "filters/mbfilter_cp1252.h" #include "filters/mbfilter_cp1254.h" +#include "filters/mbfilter_cp5022x.h" #include "filters/mbfilter_iso8859_1.h" #include "filters/mbfilter_iso8859_2.h" #include "filters/mbfilter_iso8859_3.h" @@ -153,7 +155,8 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_euc_jp, &mbfl_encoding_sjis, &mbfl_encoding_eucjp_win, - &mbfl_encoding_sjis_win, + &mbfl_encoding_sjis_open, + &mbfl_encoding_cp932, &mbfl_encoding_cp51932, &mbfl_encoding_jis, &mbfl_encoding_2022jp, @@ -188,6 +191,11 @@ static const mbfl_encoding *mbfl_encoding_ptr_list[] = { &mbfl_encoding_koi8u, &mbfl_encoding_armscii8, &mbfl_encoding_cp850, + &mbfl_encoding_jis_ms, + &mbfl_encoding_cp50220, + &mbfl_encoding_cp50220raw, + &mbfl_encoding_cp50221, + &mbfl_encoding_cp50222, NULL }; @@ -209,7 +217,7 @@ mbfl_name2encoding(const char *name) } } - /* search MIME charset name */ + /* serch MIME charset name */ i = 0; while ((encoding = mbfl_encoding_ptr_list[i++]) != NULL) { if (encoding->mime_name != NULL) { @@ -219,7 +227,7 @@ mbfl_name2encoding(const char *name) } } - /* search aliases */ + /* serch aliases */ i = 0; while ((encoding = mbfl_encoding_ptr_list[i++]) != NULL) { if (encoding->aliases != NULL) { diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h index 2599e1107..fd3a66df6 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_encoding.h @@ -68,8 +68,8 @@ enum mbfl_no_encoding { mbfl_no_encoding_euc_jp, mbfl_no_encoding_sjis, mbfl_no_encoding_eucjp_win, - mbfl_no_encoding_sjis_win, - mbfl_no_encoding_sjis_mac, + mbfl_no_encoding_sjis_open, + mbfl_no_encoding_cp932, mbfl_no_encoding_cp51932, mbfl_no_encoding_jis, mbfl_no_encoding_2022jp, @@ -104,6 +104,11 @@ enum mbfl_no_encoding { mbfl_no_encoding_8859_16, mbfl_no_encoding_armscii8, mbfl_no_encoding_cp850, + mbfl_no_encoding_jis_ms, + mbfl_no_encoding_cp50220, + mbfl_no_encoding_cp50220raw, + mbfl_no_encoding_cp50221, + mbfl_no_encoding_cp50222, mbfl_no_encoding_charset_max }; diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c index 2b6347821..341047d5b 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.c @@ -41,9 +41,17 @@ int mbfl_filter_output_pipe(int c, void* data) return (*filter->filter_function)(c, filter); } +int mbfl_filter_output_pipe_flush(void *data) +{ + mbfl_convert_filter *filter = (mbfl_convert_filter*)data; + if (filter->filter_flush != NULL) { + return (*filter->filter_flush)(filter); + } + + return 0; +} + int mbfl_filter_output_null(int c, void* data) { return c; } - - diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h index ce5192935..d477653d3 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h +++ b/ext/mbstring/libmbfl/mbfl/mbfl_filter_output.h @@ -32,6 +32,7 @@ #define MBFL_FILTER_OUTPUT_H MBFLAPI extern int mbfl_filter_output_pipe(int c, void* data); +MBFLAPI extern int mbfl_filter_output_pipe_flush(void* data); MBFLAPI extern int mbfl_filter_output_null(int c, void* data); #endif /* MBFL_FILTER_OUTPUT_H */ diff --git a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c index 4f3bd5c58..9a8980705 100644 --- a/ext/mbstring/libmbfl/mbfl/mbfl_ident.c +++ b/ext/mbstring/libmbfl/mbfl/mbfl_ident.c @@ -50,6 +50,7 @@ #include "filters/mbfilter_euc_kr.h" #include "filters/mbfilter_iso2022_kr.h" #include "filters/mbfilter_sjis.h" +#include "filters/mbfilter_sjis_open.h" #include "filters/mbfilter_jis.h" #include "filters/mbfilter_iso2022_jp_ms.h" #include "filters/mbfilter_euc_jp.h" @@ -64,6 +65,7 @@ #include "filters/mbfilter_cp1252.h" #include "filters/mbfilter_cp1254.h" #include "filters/mbfilter_cp51932.h" +#include "filters/mbfilter_cp5022x.h" #include "filters/mbfilter_iso8859_1.h" #include "filters/mbfilter_iso8859_2.h" #include "filters/mbfilter_iso8859_3.h" @@ -107,8 +109,9 @@ static const struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = { &vtbl_identify_ascii, &vtbl_identify_eucjp, &vtbl_identify_sjis, + &vtbl_identify_sjis_open, &vtbl_identify_eucjpwin, - &vtbl_identify_sjiswin, + &vtbl_identify_cp932, &vtbl_identify_jis, &vtbl_identify_2022jp, &vtbl_identify_2022jpms, @@ -142,6 +145,10 @@ static const struct mbfl_identify_vtbl *mbfl_identify_filter_list[] = { &vtbl_identify_8859_15, &vtbl_identify_armscii8, &vtbl_identify_cp850, + &vtbl_identify_jis_ms, + &vtbl_identify_cp50220, + &vtbl_identify_cp50221, + &vtbl_identify_cp50222, &vtbl_identify_false, NULL }; diff --git a/ext/mbstring/libmbfl/mksbcc32.bat b/ext/mbstring/libmbfl/mksbcc32.bat deleted file mode 100644 index cdc3dd6ca..000000000 --- a/ext/mbstring/libmbfl/mksbcc32.bat +++ /dev/null @@ -1,5 +0,0 @@ -@echo off -cd %2 -%1 -f Makefile.bcc32 %3 -cd .. -exit diff --git a/ext/mbstring/libmbfl/nls/Makefile.am b/ext/mbstring/libmbfl/nls/Makefile.am index 454a07c63..a9f987b33 100644 --- a/ext/mbstring/libmbfl/nls/Makefile.am +++ b/ext/mbstring/libmbfl/nls/Makefile.am @@ -1,4 +1,3 @@ -EXTRA_DIST=Makefile.bcc32 noinst_LTLIBRARIES=libmbfl_nls.la INCLUDES=-I../mbfl libmbfl_nls_la_LDFLAGS=-version-info $(SHLIB_VERSION) diff --git a/ext/mbstring/libmbfl/nls/Makefile.bcc32 b/ext/mbstring/libmbfl/nls/Makefile.bcc32 deleted file mode 100644 index dea8689cb..000000000 --- a/ext/mbstring/libmbfl/nls/Makefile.bcc32 +++ /dev/null @@ -1,18 +0,0 @@ -!include ..\rules.mak.bcc32 -INCLUDES=$(INCLUDES) -I..\mbfl -OBJS=nls_ja.obj \ - nls_de.obj \ - nls_en.obj \ - nls_hy.obj \ - nls_tr.obj \ - nls_kr.obj \ - nls_ru.obj \ - nls_ua.obj \ - nls_zh.obj \ - nls_uni.obj \ - nls_neutral.obj - -all: $(OBJS) - -clean: - @for %i in ($(OBJS)) do @if exist %i del %i diff --git a/ext/mbstring/libmbfl/rules.mak.bcc32 b/ext/mbstring/libmbfl/rules.mak.bcc32 deleted file mode 100644 index 50fafa96b..000000000 --- a/ext/mbstring/libmbfl/rules.mak.bcc32 +++ /dev/null @@ -1,7 +0,0 @@ -.suffixes .c -CFLAGS=-DHAVE_CONFIG_H -DMBFL_DLL_EXPORT -DWIN32 -INCLUDES=-I. -I.. -LIBS=import32.lib cw32mt.lib c0d32.obj -LDFLAGS=-c -Tpd -Gn -.c.obj: - bcc32 $(CFLAGS) $(INCLUDES) -c $< diff --git a/ext/mbstring/libmbfl/tests/conv_encoding.tests/Makefile.am b/ext/mbstring/libmbfl/tests/conv_encoding.tests/Makefile.am index 37713c395..6a626bd5a 100644 --- a/ext/mbstring/libmbfl/tests/conv_encoding.tests/Makefile.am +++ b/ext/mbstring/libmbfl/tests/conv_encoding.tests/Makefile.am @@ -1 +1,31 @@ -EXTRA_DIST=*.exp +EXTRA_DIST=\ + cp51932_cp50220raw.exp\ + ujis_sjis.exp\ + utf8_sjis.exp\ + yensign.exp +noinst_PROGRAMS=gen_exp +gen_exp_SOURCES=gen_exp.c +CLEANFILES=\ + uni_to_cp932.exp\ + uni_to_cp50220.exp\ + uni_to_cp50222.exp\ + cp932_to_uni.exp + +CP932.TXT: + $(FETCH_VIA_FTP) ftp://unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT + +cp932_to_uni.exp: gen_exp CP932.TXT + ./gen_exp from_cp932 > "$@" + +uni_to_cp932.exp: gen_exp CP932.TXT + ./gen_exp to_cp932 > "$@" + +uni_to_cp50220.exp: gen_exp CP932.TXT + ./gen_exp to_cp50220 > "$@" + +uni_to_cp50222.exp: gen_exp CP932.TXT + ./gen_exp to_cp50222 > "$@" + +check-local: uni_to_cp932.exp uni_to_cp50220.exp uni_to_cp50222.exp + +.PHONY: check-local diff --git a/ext/mbstring/libmbfl/tests/conv_encoding.tests/gen_exp.c b/ext/mbstring/libmbfl/tests/conv_encoding.tests/gen_exp.c new file mode 100644 index 000000000..93a0fb30c --- /dev/null +++ b/ext/mbstring/libmbfl/tests/conv_encoding.tests/gen_exp.c @@ -0,0 +1,497 @@ +#include <stdio.h> +#include <stddef.h> +#include <string.h> +#include <stdlib.h> +#include <errno.h> + +struct mappings_entry { + int cp_uni; + int n; + int cp_932[16]; +}; + +struct mappings { + size_t n; + size_t nalloc; + struct mappings_entry *entries; +}; + +static void mappings_init(struct mappings *map) +{ + map->n = 0; + map->nalloc = 0; + map->entries = 0; +} + +static void mappings_destroy(struct mappings *map) +{ + if (map->entries) + free(map->entries); +} + +static int mappings_grow(struct mappings *map) +{ + if (map->n >= map->nalloc) { + struct mappings_entry *new_entries; + size_t n = map->nalloc << 1, a; + if (n == 0) + n = 1; + else if (n <= map->n) + return 2; + a = sizeof(*map->entries) * n; + if (a / n != sizeof(*map->entries)) + return 2; + new_entries = realloc(map->entries, a); + if (!new_entries) + return 2; + map->entries = new_entries; + map->nalloc = n; + } + return 0; +} + +static int mappings_add(struct mappings *map, int cp_uni, int cp_932) +{ + size_t i; + size_t s = 0, e = map->n; + struct mappings_entry *entry; + + for (;;) { + i = (s + e) / 2; + entry = &map->entries[i]; + if (e == i || entry->cp_uni > cp_uni) { + if (e == i) { + int r = mappings_grow(map); + if (r) + return r; + if (map->n > i) { + size_t n = map->n - i, a = sizeof(*map->entries) * n; + if (a / n != sizeof(*map->entries)) + return 2; + memmove(&map->entries[i + 1], &map->entries[i], a); + } + ++map->n; + entry = &map->entries[i]; + entry->cp_uni = cp_uni; + entry->n = 0; + break; + } + e = i; + } else if (entry->cp_uni < cp_uni) { + if (s == i) { + int r = mappings_grow(map); + if (r) + return r; + if (map->n > i + 1) { + size_t n = (map->n - i - 1), a = sizeof(*map->entries) * n; + if (a / n != sizeof(*map->entries)) + return 2; + memmove(&map->entries[i + 2], &map->entries[i + 1], a); + } + ++map->n; + entry = &map->entries[i + 1]; + entry->cp_uni = cp_uni; + entry->n = 0; + break; + } + s = i; + } else { + break; + } + } + if (entry->n >= sizeof(entry->cp_932) / sizeof(*entry->cp_932)) + return 1; + entry->cp_932[entry->n++] = cp_932; + return 0; +} + +struct generator_entry { + const char *name; + const char *prologue; + const char *epilogue; + void(*visitor)(const struct mappings_entry *); +}; + +static int utf32_utf8(char *buf, int k) +{ + int retval = 0; + + if (k < 0x80) { + buf[0] = k; + retval = 1; + } else if (k < 0x800) { + buf[0] = 0xc0 | (k >> 6); + buf[1] = 0x80 | (k & 0x3f); + retval = 2; + } else if (k < 0x10000) { + buf[0] = 0xe0 | (k >> 12); + buf[1] = 0x80 | ((k >> 6) & 0x3f); + buf[2] = 0x80 | (k & 0x3f); + retval = 3; + } else if (k < 0x200000) { + buf[0] = 0xf0 | (k >> 18); + buf[1] = 0x80 | ((k >> 12) & 0x3f); + buf[2] = 0x80 | ((k >> 6) & 0x3f); + buf[3] = 0x80 | (k & 0x3f); + retval = 4; + } else if (k < 0x4000000) { + buf[0] = 0xf8 | (k >> 24); + buf[1] = 0x80 | ((k >> 18) & 0x3f); + buf[2] = 0x80 | ((k >> 12) & 0x3f); + buf[3] = 0x80 | ((k >> 6) & 0x3f); + buf[4] = 0x80 | (k & 0x3f); + retval = 5; + } else { + buf[0] = 0xfc | (k >> 30); + buf[1] = 0x80 | ((k >> 24) & 0x3f); + buf[2] = 0x80 | ((k >> 18) & 0x3f); + buf[3] = 0x80 | ((k >> 12) & 0x3f); + buf[4] = 0x80 | ((k >> 6) & 0x3f); + buf[5] = 0x80 | (k & 0x3f); + retval = 6; + } + buf[retval] = '\0'; + + return retval; +} + +static const char epilogue[] = +"close\n"; + +static const char prologue_to_cp932[] = +"#!/usr/bin/expect -f\n" +"spawn tests/conv_encoding Japanese CP932 UTF-8\n" +"set timeout 1\n" +"\n" +"expect_after {\n" +" \"\\[^\\r\\n\\]*\\r\\n\" { fail $test }\n" +"}\n"; + +static const char prologue_to_cp50220[] = +"#!/usr/bin/expect -f\n" +"spawn tests/conv_encoding Japanese CP50220 UTF-8\n" +"set timeout 1\n" +"\n" +"expect_after {\n" +" \"\\[^\\r\\n\\]*\\r\\n\" { fail $test }\n" +"}\n"; + +static const char prologue_to_cp50222[] = +"#!/usr/bin/expect -f\n" +"spawn tests/conv_encoding Japanese CP50222 UTF-8\n" +"set timeout 1\n" +"\n" +"expect_after {\n" +" \"\\[^\\r\\n\\]*\\r\\n\" { fail $test }\n" +"}\n"; + +static const char prologue_from_cp932[] = +"#!/usr/bin/expect -f\n" +"spawn tests/conv_encoding Japanese UTF-8 CP932\n" +"set timeout 1\n" +"\n" +"expect_after {\n" +" \"\\[^\\r\\n\\]*\\r\\n\" { fail $test }\n" +"}\n"; + +static void to_cp932_visitor(const struct mappings_entry *entry) +{ + char buf_uni[32], buf_cp932[8]; + int i; + + if (entry->cp_uni < 32 || entry->cp_uni == 127) + return; + + i = utf32_utf8(buf_uni, entry->cp_uni); + buf_uni[i * 4] = '\0'; + while (--i >= 0) { + unsigned char c = ((unsigned char *)buf_uni)[i]; + buf_uni[i * 4] = '\\'; + buf_uni[i * 4 + 1] = 'x'; + buf_uni[i * 4 + 2] = "0123456789abcdef"[c >> 4]; + buf_uni[i * 4 + 3] = "0123456789abcdef"[c & 15]; + } + + printf("set test \"U+%06X\"\n" + "send -- \"%s\r\"\n" + "sleep 0.001\n" + "expect {\n", entry->cp_uni, buf_uni); + + for (i = 0; i < entry->n; ++i) { + int len = 0; + const int c = entry->cp_932[i]; + if (c >= 0x100) { + len = 2; + sprintf(buf_cp932, "%%%02x%%%02x", (c >> 8) & 0xff, c & 0xff); + } else { + len = 1; + sprintf(buf_cp932, "%%%02x", c); + } + printf(" \"%s (%d)\\r\\n\" { pass $test }\n", buf_cp932, len); + } + + printf("}\n"); +} + +static void from_cp932_visitor(const struct mappings_entry *entry) +{ + char buf_uni[32], buf_cp932[8]; + int i, len; + + if (entry->cp_uni < 32 || entry->cp_uni == 127) + return; + + len = utf32_utf8(buf_uni, entry->cp_uni); + buf_uni[len * 3] = '\0'; + i = len; + while (--i >= 0) { + unsigned char c = ((unsigned char *)buf_uni)[i]; + buf_uni[i * 3] = '%'; + buf_uni[i * 3 + 1] = "0123456789abcdef"[c >> 4]; + buf_uni[i * 3 + 2] = "0123456789abcdef"[c & 15]; + } + + for (i = 0; i < entry->n; ++i) { + const int c = entry->cp_932[i]; + if (c >= 0x100) + sprintf(buf_cp932, "\\x%02x\\x%02x", (c >> 8) & 0xff, c & 0xff); + else + sprintf(buf_cp932, "\\x%02x", c); + printf("set test \"U+%06X\"\n" + "send -- \"%s\r\"\n" + "sleep 0.001\n" + "expect {\n" + " \"%s (%d)\\r\\n\" { pass $test }\n" + "}\n", + entry->cp_uni, buf_cp932, buf_uni, len); + } +} + +static void to_cp50220_visitor(const struct mappings_entry *entry) +{ + char buf_uni[32], buf_cp50220[32]; + int i; + + if (entry->cp_uni < 32 || entry->cp_uni == 127) + return; + + i = utf32_utf8(buf_uni, entry->cp_uni); + buf_uni[i * 4] = '\0'; + while (--i >= 0) { + unsigned char c = ((unsigned char *)buf_uni)[i]; + buf_uni[i * 4] = '\\'; + buf_uni[i * 4 + 1] = 'x'; + buf_uni[i * 4 + 2] = "0123456789abcdef"[c >> 4]; + buf_uni[i * 4 + 3] = "0123456789abcdef"[c & 15]; + } + + printf("set test \"U+%06X\"\n" + "send -- \"%s\r\"\n" + "sleep 0.001\n" + "expect {\n", entry->cp_uni, buf_uni); + + for (i = 0; i < entry->n; ++i) { + int len = 0; + const int c = entry->cp_932[i]; + if (c >= 0xa1 && c < 0xe0) { + static const int jisx0208_tl_map[] = { + 0x0000, 0x2123, 0x2156, 0x2157, 0x2122, 0x2126, 0x2572, 0x2521, + 0x2523, 0x2525, 0x2527, 0x2529, 0x2563, 0x2565, 0x2567, 0x2543, + 0x213c, 0x2522, 0x2524, 0x2526, 0x2528, 0x252a, 0x252b, 0x252d, + 0x252f, 0x2531, 0x2533, 0x2535, 0x2537, 0x2539, 0x253b, 0x253d, + 0x253f, 0x2541, 0x2544, 0x2546, 0x2548, 0x254a, 0x254b, 0x254c, + 0x254d, 0x254e, 0x254f, 0x2552, 0x2555, 0x2558, 0x255b, 0x255e, + 0x255f, 0x2560, 0x2561, 0x2562, 0x2564, 0x2566, 0x2568, 0x2569, + 0x256a, 0x256b, 0x256c, 0x256d, 0x256f, 0x2573, 0x212b, 0x212c + }; + const int j = jisx0208_tl_map[c - 0xa0]; + len = 8; + sprintf(buf_cp50220, "%%1b%%24%%42%%%02x%%%02x%%1b%%28%%42", j >> 8, j & 0xff); + } else if (c >= 0x100) { + const int j = ((((c & 0xff00) - (c >= 0xe000 ? 0xb000: 0x7000)) << 1) | ((c & 0xff) - (c & 0x80 ? 32: 31))) - ((c & 0xff) >= 159 ? 94: 0x100); + len = 8; + sprintf(buf_cp50220, "%%1b%%24%%42%%%02x%%%02x%%1b%%28%%42", j >> 8, j & 0xff); + } else { + len = 1; + sprintf(buf_cp50220, "%%%02x", c); + } + printf(" \"%s (%d)\\r\\n\" { pass $test }\n", buf_cp50220, len); + } + + printf("}\n"); +} + +static void to_cp50222_visitor(const struct mappings_entry *entry) +{ + char buf_uni[32], buf_cp50220[32]; + int i; + + if (entry->cp_uni < 32 || entry->cp_uni == 127) + return; + + i = utf32_utf8(buf_uni, entry->cp_uni); + buf_uni[i * 4] = '\0'; + while (--i >= 0) { + unsigned char c = ((unsigned char *)buf_uni)[i]; + buf_uni[i * 4] = '\\'; + buf_uni[i * 4 + 1] = 'x'; + buf_uni[i * 4 + 2] = "0123456789abcdef"[c >> 4]; + buf_uni[i * 4 + 3] = "0123456789abcdef"[c & 15]; + } + + printf("set test \"U+%06X\"\n" + "send -- \"%s\r\"\n" + "sleep 0.001\n" + "expect {\n", entry->cp_uni, buf_uni); + + for (i = 0; i < entry->n; ++i) { + int len = 0; + const int c = entry->cp_932[i]; + if (c >= 0xa1 && c < 0xe0) { + len = 3; + sprintf(buf_cp50220, "%%0e%%%02x%%0f", c - 0x80); + } else if (c >= 0x100) { + const int j = ((((c & 0xff00) - (c >= 0xe000 ? 0xb000: 0x7000)) << 1) | ((c & 0xff) - (c & 0x80 ? 32: 31))) - ((c & 0xff) >= 159 ? 94: 0x100); + len = 8; + sprintf(buf_cp50220, "%%1b%%24%%42%%%02x%%%02x%%1b%%28%%42", j >> 8, j & 0xff); + } else { + len = 1; + sprintf(buf_cp50220, "%%%02x", c); + } + printf(" \"%s (%d)\\r\\n\" { pass $test }\n", buf_cp50220, len); + } + + printf("}\n"); +} + + +static struct generator_entry entries[] = { + { "to_cp932", prologue_to_cp932, epilogue, to_cp932_visitor }, + { "to_cp50220", prologue_to_cp50220, epilogue, to_cp50220_visitor }, + { "to_cp50222", prologue_to_cp50222, epilogue, to_cp50222_visitor }, + { "from_cp932", prologue_from_cp932, epilogue, from_cp932_visitor }, + { NULL } +}; + +static const char cp932_txt[] = "CP932.TXT"; + +int main(int argc, char **argv) +{ + int retval = 0; + FILE *fp; + char buf[1024]; + struct generator_entry* gen; + struct mappings map; + + if (argc <= 1) { + fprintf(stderr, "usage: %s generator\n", argv[0]); + return 255; + } + + for (gen = entries;; ++gen) { + if (!gen->name) { + fprintf(stderr, "Unknown generator: %s\n", argv[1]); + return 1; + } + if (strcmp(gen->name, argv[1]) == 0) + break; + } + + fp = fopen(cp932_txt, "r"); + if (!fp) { + fprintf(stderr, "Failed to open %s\n", cp932_txt); + return 2; + } + + mappings_init(&map); + + while (fgets(buf, sizeof(buf), fp)) { + const char *fields[16]; + char *p = buf; + int field = 0; + int cp_932, cp_uni; + for (;;) { + char *q = 0; + int eol = 0; + + if (field >= sizeof(fields) / sizeof(*fields)) { + fprintf(stderr, "Too many fields (incorrect file?)\n"); + retval = 3; + goto out; + } + + for (;;) { + if (*p == '\0' || *p == '#' || *p == 0x0a) { + eol = 1; + break; + } else if (*p != ' ' && *p != '\t') { + break; + } + ++p; + } + + if (eol) + break; + + q = p; + + for (;;) { + if (*p == '\0' || *p == '#' || *p == 0x0a) { + eol = 1; + break; + } else if (*p == ' ' || *p == '\t') { + break; + } + ++p; + } + + *p = '\0'; + fields[field++] = q; + + if (eol) + break; + ++p; + } + if (field == 0 || field == 1) { + continue; + } else if (field != 2) { + fprintf(stderr, "Unexpected field count (expected 2, got %d)\n", field); + retval = 3; + goto out; + } + cp_932 = strtol(fields[0], NULL, 0); + if (errno == ERANGE || errno == EINVAL) { + fprintf(stderr, "Malformed field value: %s\n", fields[0]); + retval = 4; + goto out; + } + cp_uni = strtol(fields[1], NULL, 0); + if (errno == ERANGE || errno == EINVAL) { + fprintf(stderr, "Malformed field value: %s\n", fields[1]); + retval = 4; + goto out; + } + + if (mappings_add(&map, cp_uni, cp_932)) { + fprintf(stderr, "Too many mappings to the same Unicode codepoint (U+%06X)\n", cp_uni); + retval = 4; + goto out; + } + } + + { + size_t i; + printf("%s", gen->prologue); + for (i = 0; i < map.n; ++i) + gen->visitor(&map.entries[i]); + printf("%s", gen->epilogue); + } + +out: + mappings_destroy(&map); + return retval; +} + +/* + * vim: sts=4 sw=4 ts=4 noet + */ diff --git a/ext/mbstring/libmbfl/tests/conv_encoding.tests/yensign.exp b/ext/mbstring/libmbfl/tests/conv_encoding.tests/yensign.exp new file mode 100644 index 000000000..03f2faffc --- /dev/null +++ b/ext/mbstring/libmbfl/tests/conv_encoding.tests/yensign.exp @@ -0,0 +1,99 @@ +#!/usr/bin/expect -f +set timeout 1 + +spawn tests/conv_encoding Japanese CP932 UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "CP932" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%5c (1)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese SJIS-open UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "SJIS-open" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%81%8f (2)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese eucJP-open UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "eucJP-open" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%a1%ef (2)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese CP51932 UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "CP51932" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%5c (1)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese ISO-2022-JP-MS UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "ISO-2022-JP-MS" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%1b%24%42%21%6f%1b%28%42 (8)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese CP50220 UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "CP50220" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%1b%28%4a%5c%1b%28%42 (7)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese CP50221 UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "CP50221" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%1b%28%4a%5c%1b%28%42 (7)\r\n" { pass $test } +} +close + +spawn tests/conv_encoding Japanese CP50222 UTF-8 +expect_after { + "\[^\r\n\]*\r\n" { fail $test } +} +set test "CP50222" +send "\xc2\xa5\r" +sleep 0.01 +expect { + "%1b%28%4a%5c%1b%28%42 (7)\r\n" { pass $test } +} +close +# vim: sts=4 ts=4 sw=4 et diff --git a/ext/mbstring/libmbfl/tests/sample.c b/ext/mbstring/libmbfl/tests/sample.c index 54f809378..d96196495 100644 --- a/ext/mbstring/libmbfl/tests/sample.c +++ b/ext/mbstring/libmbfl/tests/sample.c @@ -1,8 +1,8 @@ -/* - this is a small sample script to use libmbfl. - Rui Hirokawa <hirokawa@php.net> - - this file is encoded in EUC-JP. +/** + * this is a small sample script to use libmbfl. + * Rui Hirokawa <hirokawa@php.net> + * + * this file is encoded in EUC-JP. */ #include <stdio.h> @@ -10,29 +10,29 @@ int main() { - enum mbfl_no_encoding from_encoding, to_encoding; - enum mbfl_no_language no_language; - mbfl_buffer_converter *convd = NULL; - mbfl_string string, result, *ret; - mbfl_language lang; - unsigned char input[] = "���ܸ�ʸ����"; /* EUC-JP kanji string */ + enum mbfl_no_encoding from_encoding, to_encoding; + enum mbfl_no_language no_language; + mbfl_buffer_converter *convd = NULL; + mbfl_string string, result, *ret; + mbfl_language lang; + unsigned char input[] = "���ܸ�ʸ����"; /* EUC-JP kanji string */ - no_language = mbfl_name2no_language("Japanese"); - from_encoding = mbfl_name2no_encoding("EUC-JP"); - to_encoding = mbfl_name2no_encoding("SJIS"); + no_language = mbfl_name2no_language("Japanese"); + from_encoding = mbfl_name2no_encoding("EUC-JP"); + to_encoding = mbfl_name2no_encoding("SJIS"); - mbfl_string_init(&string); - mbfl_string_init(&result); + mbfl_string_init(&string); + mbfl_string_init(&result); - string.no_encoding = from_encoding; - string.no_language = no_language; - string.val = (unsigned char *)input; - string.len = strlen(input); + string.no_encoding = from_encoding; + string.no_language = no_language; + string.val = (unsigned char *)input; + string.len = strlen(input); - convd = mbfl_buffer_converter_new(from_encoding, to_encoding, 0); - ret = mbfl_buffer_converter_feed_result(convd, &string, &result); - mbfl_buffer_converter_delete(convd); + convd = mbfl_buffer_converter_new(from_encoding, to_encoding, 0); + ret = mbfl_buffer_converter_feed_result(convd, &string, &result); + mbfl_buffer_converter_delete(convd); - puts(ret->val); - return 1; + puts(ret->val); + return 1; } diff --git a/ext/mbstring/libmbfl/tests/strcut.tests/iso2022jp.exp b/ext/mbstring/libmbfl/tests/strcut.tests/iso2022jp.exp index f203bbf5f..7e3d0fd1e 100644 --- a/ext/mbstring/libmbfl/tests/strcut.tests/iso2022jp.exp +++ b/ext/mbstring/libmbfl/tests/strcut.tests/iso2022jp.exp @@ -106,8 +106,8 @@ expect { begin_strcut_test 8 21 set test "non-asciish characters (2) ($from, $length)" -sleep 1 send "\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x24\x46\x24\x39\x24\x48\x1b\x28\x49\x4a\x5e\x4a\x5e\x4a\x5e\x43\x3d\x44\x1b\x28\x42\x74\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x1b\x28\x42\x74\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x1b\x28\x42\x74\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x1b\x28\x42\x74\r" +sleep 1 expect { -ex "%74%1b%24%42%25%39%1b%28%42%74%1b%24%42%25%48%24%46%1b%28%42 (20)\r\n" { pass $test @@ -117,8 +117,8 @@ expect { begin_strcut_test 11 17 set test "non-asciish characters (2) ($from, $length)" -sleep 1 send "\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x24\x46\x24\x39\x24\x48\x1b\x28\x49\x4a\x5e\x4a\x5e\x4a\x5e\x43\x3d\x44\x1b\x28\x42\x74\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x1b\x28\x42\x74\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x1b\x28\x42\x74\x1b\x24\x42\x25\x46\x1b\x28\x42\x74\x1b\x24\x42\x25\x39\x1b\x28\x42\x74\x1b\x24\x42\x25\x48\x1b\x28\x42\x74\r" +sleep 1 expect { -ex "%1b%24%42%25%39%1b%28%42%74%1b%24%42%25%48%1b%28%42 (17)\r\n" { pass $test diff --git a/ext/mbstring/tests/mb_send_mail01.phpt b/ext/mbstring/tests/mb_send_mail01.phpt index 26d2ed2ec..90cc3aa9c 100644 --- a/ext/mbstring/tests/mb_send_mail01.phpt +++ b/ext/mbstring/tests/mb_send_mail01.phpt @@ -8,6 +8,7 @@ if (!function_exists("mb_send_mail") || !mb_language("neutral")) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mbstring/tests/mb_send_mail02.phpt b/ext/mbstring/tests/mb_send_mail02.phpt index 6a2dbcfeb..81f2464d5 100644 --- a/ext/mbstring/tests/mb_send_mail02.phpt +++ b/ext/mbstring/tests/mb_send_mail02.phpt @@ -8,6 +8,7 @@ if (!function_exists("mb_send_mail") || !mb_language("japanese")) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mbstring/tests/mb_send_mail03.phpt b/ext/mbstring/tests/mb_send_mail03.phpt index 4be1f8346..1334fadd7 100644 --- a/ext/mbstring/tests/mb_send_mail03.phpt +++ b/ext/mbstring/tests/mb_send_mail03.phpt @@ -8,6 +8,7 @@ if (!function_exists("mb_send_mail") || !mb_language("english")) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mbstring/tests/mb_send_mail04.phpt b/ext/mbstring/tests/mb_send_mail04.phpt index 06aa3a415..0dcc318cc 100644 --- a/ext/mbstring/tests/mb_send_mail04.phpt +++ b/ext/mbstring/tests/mb_send_mail04.phpt @@ -8,6 +8,7 @@ if (!function_exists("mb_send_mail") || !mb_language("german")) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mbstring/tests/mb_send_mail05.phpt b/ext/mbstring/tests/mb_send_mail05.phpt index cd3eaf4ed..a93fa791a 100644 --- a/ext/mbstring/tests/mb_send_mail05.phpt +++ b/ext/mbstring/tests/mb_send_mail05.phpt @@ -11,6 +11,7 @@ if (!@mb_internal_encoding('GB2312')) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mbstring/tests/mb_send_mail06.phpt b/ext/mbstring/tests/mb_send_mail06.phpt index 08cf24013..9970340d5 100644 --- a/ext/mbstring/tests/mb_send_mail06.phpt +++ b/ext/mbstring/tests/mb_send_mail06.phpt @@ -11,6 +11,7 @@ if (!@mb_internal_encoding('BIG5')) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mbstring/tests/mb_send_mail07.phpt b/ext/mbstring/tests/mb_send_mail07.phpt index ef2965265..afd9a0b15 100644 --- a/ext/mbstring/tests/mb_send_mail07.phpt +++ b/ext/mbstring/tests/mb_send_mail07.phpt @@ -11,6 +11,7 @@ if (!@mb_internal_encoding('ISO-2022-KR')) { ?> --INI-- sendmail_path=/bin/cat +mail.add_x_header=off --FILE-- <?php $to = 'example@example.com'; diff --git a/ext/mcrypt/config.m4 b/ext/mcrypt/config.m4 index c45cf1bda..f18280e2b 100644 --- a/ext/mcrypt/config.m4 +++ b/ext/mcrypt/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 225644 2006-12-23 17:58:47Z derick $ +dnl $Id: config.m4 293594 2010-01-15 21:02:20Z stas $ dnl AC_DEFUN([PHP_MCRYPT_CHECK_VERSION],[ @@ -55,5 +55,5 @@ if test "$PHP_MCRYPT" != "no"; then PHP_ADD_INCLUDE($MCRYPT_DIR/include) PHP_SUBST(MCRYPT_SHARED_LIBADD) - PHP_NEW_EXTENSION(mcrypt, mcrypt.c, $ext_shared) + PHP_NEW_EXTENSION(mcrypt, mcrypt.c mcrypt_filter.c, $ext_shared) fi diff --git a/ext/mcrypt/config.w32 b/ext/mcrypt/config.w32 index 2e23c776a..ad2f313ba 100644 --- a/ext/mcrypt/config.w32 +++ b/ext/mcrypt/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 264237 2008-08-05 17:20:10Z pajoye $ +// $Id: config.w32 300087 2010-06-02 10:00:58Z pajoye $ // vim:ft=javascript ARG_WITH("mcrypt", "mcrypt support", "no"); @@ -9,7 +9,7 @@ if (PHP_MCRYPT != "no") { CHECK_LIB('libmcrypt_a.lib;libmcrypt.lib', 'mcrypt') && CHECK_LIB('Advapi32.lib', 'mcrypt') ) { - EXTENSION('mcrypt', 'mcrypt.c', false); + EXTENSION('mcrypt', 'mcrypt.c mcrypt_filter.c', PHP_MCRYPT_SHARED); AC_DEFINE('HAVE_LIBMCRYPT', 1); AC_DEFINE('HAVE_LIBMCRYPT24', 1); } else { diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c index 898bb3e07..44b7b9ea9 100644 --- a/ext/mcrypt/mcrypt.c +++ b/ext/mcrypt/mcrypt.c @@ -16,7 +16,7 @@ | Derick Rethans <derick@derickrethans.nl> | +----------------------------------------------------------------------+ */ -/* $Id: mcrypt.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: mcrypt.c 300289 2010-06-08 18:27:23Z pajoye $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -27,8 +27,7 @@ #if HAVE_LIBMCRYPT #if PHP_WIN32 -# include <Wincrypt.h> -# include <Ntsecapi.h> +# include "win32/winutil.h" #endif #include "php_mcrypt.h" @@ -41,6 +40,7 @@ #include "php_globals.h" #include "ext/standard/info.h" #include "ext/standard/php_rand.h" +#include "php_mcrypt_filter.h" static int le_mcrypt; @@ -419,16 +419,16 @@ static void php_mcrypt_module_dtor(zend_rsrc_list_entry *rsrc TSRMLS_DC) /* {{{ static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */ { le_mcrypt = zend_register_list_destructors_ex(php_mcrypt_module_dtor, NULL, "mcrypt", module_number); - + /* modes for mcrypt_??? routines */ REGISTER_LONG_CONSTANT("MCRYPT_ENCRYPT", 0, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MCRYPT_DECRYPT", 1, CONST_PERSISTENT); - + /* sources for mcrypt_create_iv */ REGISTER_LONG_CONSTANT("MCRYPT_DEV_RANDOM", 0, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MCRYPT_DEV_URANDOM", 1, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MCRYPT_RAND", 2, CONST_PERSISTENT); - + /* ciphers */ MCRYPT_ENTRY2_2_4(3DES, "tripledes"); MCRYPT_ENTRY2_2_4(ARCFOUR_IV, "arcfour-iv"); @@ -469,12 +469,19 @@ static PHP_MINIT_FUNCTION(mcrypt) /* {{{ */ MCRYPT_ENTRY2_2_4(MODE_OFB, "ofb"); MCRYPT_ENTRY2_2_4(MODE_STREAM, "stream"); REGISTER_INI_ENTRIES(); + + php_stream_filter_register_factory("mcrypt.*", &php_mcrypt_filter_factory TSRMLS_CC); + php_stream_filter_register_factory("mdecrypt.*", &php_mcrypt_filter_factory TSRMLS_CC); + return SUCCESS; } /* }}} */ static PHP_MSHUTDOWN_FUNCTION(mcrypt) /* {{{ */ { + php_stream_filter_unregister_factory("mcrypt.*" TSRMLS_CC); + php_stream_filter_unregister_factory("mdecrypt.*" TSRMLS_CC); + UNREGISTER_INI_ENTRIES(); return SUCCESS; } @@ -516,6 +523,7 @@ PHP_MINFO_FUNCTION(mcrypt) /* {{{ */ php_info_print_table_start(); php_info_print_table_header(2, "mcrypt support", "enabled"); + php_info_print_table_header(2, "mcrypt_filter support", "enabled"); php_info_print_table_row(2, "Version", LIBMCRYPT_VERSION); php_info_print_table_row(2, "Api No", mcrypt_api_no); php_info_print_table_row(2, "Supported ciphers", tmp1.c); @@ -1382,21 +1390,14 @@ PHP_FUNCTION(mcrypt_create_iv) if (source == RANDOM || source == URANDOM) { #if PHP_WIN32 - /* random/urandom equivalent on Windows */ - HCRYPTPROV hCryptProv; - BYTE *iv_b = (BYTE *) iv; - - /* It could be done using LoadLibrary but as we rely on 2k+ for 5.3, cleaner to use a clear dependency (Advapi32) and a - standard API call (no f=getAddr..; f();) */ - if(!CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, CRYPT_VERIFYCONTEXT)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Cannot open random device"); - RETURN_FALSE; - } - if(!CryptGenRandom(hCryptProv, size, iv_b)) { - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not gather sufficient random data"); - RETURN_FALSE; - } - n = size; + /* random/urandom equivalent on Windows */ + BYTE *iv_b = (BYTE *) iv; + if (php_win32_get_random_bytes(iv_b, (size_t) size) == FAILURE){ + efree(iv); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Could not gather sufficient random data"); + RETURN_FALSE; + } + n = size; #else int fd; size_t read_bytes = 0; diff --git a/ext/mcrypt/mcrypt_filter.c b/ext/mcrypt/mcrypt_filter.c new file mode 100644 index 000000000..97366bb77 --- /dev/null +++ b/ext/mcrypt/mcrypt_filter.c @@ -0,0 +1,283 @@ +/* + +----------------------------------------------------------------------+ + | 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. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon <pollita@php.net> | + +----------------------------------------------------------------------+ + + $Id: mcrypt_filter.c 293594 2010-01-15 21:02:20Z stas $ +*/ + +#include "php.h" + +#include "php_mcrypt_filter.h" +#include "php_ini.h" +#include <mcrypt.h> + +typedef struct _php_mcrypt_filter_data { + MCRYPT module; + char encrypt; + int blocksize; + char *block_buffer; + int block_used; + char persistent; +} php_mcrypt_filter_data; + +static php_stream_filter_status_t php_mcrypt_filter( + php_stream *stream, + php_stream_filter *thisfilter, + php_stream_bucket_brigade *buckets_in, + php_stream_bucket_brigade *buckets_out, + size_t *bytes_consumed, + int flags TSRMLS_DC) +{ + php_mcrypt_filter_data *data; + php_stream_bucket *bucket; + size_t consumed = 0; + php_stream_filter_status_t exit_status = PSFS_FEED_ME; + + if (!thisfilter || !thisfilter->abstract) { + /* Should never happen */ + return PSFS_ERR_FATAL; + } + + data = (php_mcrypt_filter_data *)(thisfilter->abstract); + while(buckets_in->head) { + bucket = buckets_in->head; + + consumed += bucket->buflen; + + if (data->blocksize) { + /* Blockmode cipher */ + char *outchunk; + int chunklen = bucket->buflen + data->block_used, n; + php_stream_bucket *newbucket; + + outchunk = pemalloc(chunklen, data->persistent); + if (data->block_used) { + memcpy(outchunk, data->block_buffer, data->block_used); + } + memcpy(outchunk + data->block_used, bucket->buf, bucket->buflen); + + for(n=0; (n + data->blocksize) <= chunklen; n += data->blocksize) { + + if (data->encrypt) { + mcrypt_generic(data->module, outchunk + n, data->blocksize); + } else { + mdecrypt_generic(data->module, outchunk + n, data->blocksize); + } + } + data->block_used = chunklen - n; + memcpy(data->block_buffer, outchunk + n, data->block_used); + + newbucket = php_stream_bucket_new(stream, outchunk, n, 1, data->persistent TSRMLS_CC); + php_stream_bucket_append(buckets_out, newbucket TSRMLS_CC); + + exit_status = PSFS_PASS_ON; + + php_stream_bucket_unlink(bucket TSRMLS_CC); + php_stream_bucket_delref(bucket TSRMLS_CC); + } else { + /* Stream cipher */ + php_stream_bucket_make_writeable(bucket TSRMLS_CC); + if (data->encrypt) { + mcrypt_generic(data->module, bucket->buf, bucket->buflen); + } else { + mdecrypt_generic(data->module, bucket->buf, bucket->buflen); + } + php_stream_bucket_append(buckets_out, bucket TSRMLS_CC); + + exit_status = PSFS_PASS_ON; + } + } + + if ((flags & PSFS_FLAG_FLUSH_CLOSE) && data->blocksize && data->block_used) { + php_stream_bucket *newbucket; + + memset(data->block_buffer + data->block_used, 0, data->blocksize - data->block_used); + if (data->encrypt) { + mcrypt_generic(data->module, data->block_buffer, data->blocksize); + } else { + mdecrypt_generic(data->module, data->block_buffer, data->blocksize); + } + + newbucket = php_stream_bucket_new(stream, data->block_buffer, data->blocksize, 0, data->persistent TSRMLS_CC); + php_stream_bucket_append(buckets_out, newbucket TSRMLS_CC); + + exit_status = PSFS_PASS_ON; + } + + if (bytes_consumed) { + *bytes_consumed = consumed; + } + + return exit_status; +} + +static void php_mcrypt_filter_dtor(php_stream_filter *thisfilter TSRMLS_DC) +{ + if (thisfilter && thisfilter->abstract) { + php_mcrypt_filter_data *data = (php_mcrypt_filter_data*)thisfilter->abstract; + + if (data->block_buffer) { + pefree(data->block_buffer, data->persistent); + } + + mcrypt_generic_deinit(data->module); + mcrypt_module_close(data->module); + + pefree(data, data->persistent); + } +} + +static php_stream_filter_ops php_mcrypt_filter_ops = { + php_mcrypt_filter, + php_mcrypt_filter_dtor, + "mcrypt.*" +}; + +/* {{{ php_mcrypt_filter_create + * Instantiate mcrypt filter + */ +static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval *filterparams, int persistent TSRMLS_DC) +{ + int encrypt = 1, iv_len, key_len, keyl, result; + const char *cipher = filtername + sizeof("mcrypt.") - 1; + zval **tmpzval; + MCRYPT mcrypt_module; + char *iv = NULL, *key = NULL; + char *algo_dir = INI_STR("mcrypt.algorithms_dir"); + char *mode_dir = INI_STR("mcrypt.modes_dir"); + char *mode = "cbc"; + php_mcrypt_filter_data *data; + + if (strncasecmp(filtername, "mdecrypt.", sizeof("mdecrypt.") - 1) == 0) { + encrypt = 0; + cipher += sizeof("de") - 1; + } else if (strncasecmp(filtername, "mcrypt.", sizeof("mcrypt.") - 1) != 0) { + /* Should never happen */ + return NULL; + } + + if (!filterparams || Z_TYPE_P(filterparams) != IS_ARRAY) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filter parameters for %s must be an array", filtername); + return NULL; + } + + if (zend_hash_find(HASH_OF(filterparams), "mode", sizeof("mode"), (void**)&tmpzval) == SUCCESS) { + if (Z_TYPE_PP(tmpzval) == IS_STRING) { + mode = Z_STRVAL_PP(tmpzval); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "mode is not a string, ignoring"); + } + } + + if (zend_hash_find(HASH_OF(filterparams), "algorithms_dir", sizeof("algorithms_dir"), (void**)&tmpzval) == SUCCESS) { + if (Z_TYPE_PP(tmpzval) == IS_STRING) { + algo_dir = Z_STRVAL_PP(tmpzval); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "algorithms_dir is not a string, ignoring"); + } + } + + if (zend_hash_find(HASH_OF(filterparams), "modes_dir", sizeof("modes_dir"), (void**)&tmpzval) == SUCCESS) { + if (Z_TYPE_PP(tmpzval) == IS_STRING) { + mode_dir = Z_STRVAL_PP(tmpzval); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "modes_dir is not a string, ignoring"); + } + } + + if (zend_hash_find(HASH_OF(filterparams), "key", sizeof("key"), (void**)&tmpzval) == SUCCESS && + Z_TYPE_PP(tmpzval) == IS_STRING) { + key = Z_STRVAL_PP(tmpzval); + key_len = Z_STRLEN_PP(tmpzval); + } else { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "key not specified or is not a string"); + return NULL; + } + + mcrypt_module = mcrypt_module_open(cipher, algo_dir, mode, mode_dir); + if (mcrypt_module == MCRYPT_FAILED) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Could not open encryption module"); + return NULL; + } + iv_len = mcrypt_enc_get_iv_size(mcrypt_module); + keyl = mcrypt_enc_get_key_size(mcrypt_module); + if (keyl < key_len) { + key_len = keyl; + } + + if (zend_hash_find(HASH_OF(filterparams), "iv", sizeof("iv"), (void**) &tmpzval) == FAILURE || + Z_TYPE_PP(tmpzval) != IS_STRING) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filter parameter[iv] not provided or not of type: string"); + mcrypt_module_close(mcrypt_module); + return NULL; + } + + iv = emalloc(iv_len + 1); + if (iv_len <= Z_STRLEN_PP(tmpzval)) { + memcpy(iv, Z_STRVAL_PP(tmpzval), iv_len); + } else { + memcpy(iv, Z_STRVAL_PP(tmpzval), Z_STRLEN_PP(tmpzval)); + memset(iv + Z_STRLEN_PP(tmpzval), 0, iv_len - Z_STRLEN_PP(tmpzval)); + } + + result = mcrypt_generic_init(mcrypt_module, key, key_len, iv); + efree(iv); + if (result < 0) { + switch (result) { + case -3: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Key length incorrect"); + break; + case -4: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Memory allocation error"); + break; + case -1: + default: + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown error"); + break; + } + mcrypt_module_close(mcrypt_module); + return NULL; + } + + data = pemalloc(sizeof(php_mcrypt_filter_data), persistent); + data->module = mcrypt_module; + data->encrypt = encrypt; + if (mcrypt_enc_is_block_mode(mcrypt_module)) { + data->blocksize = mcrypt_enc_get_block_size(mcrypt_module); + data->block_buffer = pemalloc(data->blocksize, persistent); + } else { + data->blocksize = 0; + data->block_buffer = NULL; + } + data->block_used = 0; + data->persistent = persistent; + + return php_stream_filter_alloc(&php_mcrypt_filter_ops, data, persistent); +} +/* }}} */ + +php_stream_filter_factory php_mcrypt_filter_factory = { + php_mcrypt_filter_create +}; + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */ diff --git a/ext/mcrypt/php_mcrypt_filter.h b/ext/mcrypt/php_mcrypt_filter.h new file mode 100644 index 000000000..cee1218fe --- /dev/null +++ b/ext/mcrypt/php_mcrypt_filter.h @@ -0,0 +1,39 @@ +/* + +----------------------------------------------------------------------+ + | 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. | + +----------------------------------------------------------------------+ + | Author: Sara Golemon <pollita@php.net> | + +----------------------------------------------------------------------+ + + $Id: php_mcrypt_filter.h 293594 2010-01-15 21:02:20Z stas $ +*/ + +#ifndef PHP_MCRYPT_FILTER_H +#define PHP_MCRYPT_FILTER_H + +extern php_stream_filter_factory php_mcrypt_filter_factory; + +PHP_MINIT_FUNCTION(mcrypt_filter); +PHP_MSHUTDOWN_FUNCTION(mcrypt_filter); +PHP_MINFO_FUNCTION(mcrypt_filter); + +#endif /* PHP_MCRYPT_FILTER_H */ + + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * indent-tabs-mode: t + * End: + */ diff --git a/ext/mcrypt/tests/mcrypt_filters.phpt b/ext/mcrypt/tests/mcrypt_filters.phpt new file mode 100644 index 000000000..f52821950 --- /dev/null +++ b/ext/mcrypt/tests/mcrypt_filters.phpt @@ -0,0 +1,41 @@ +--TEST-- +mcrypt filters +--SKIPIF-- +<?php if (!extension_loaded("mcrypt")) print "skip"; ?> +--FILE-- +<?php +foreach (stream_get_filters() as $f) { + if ($f == "mcrypt.*" || $f == "mdecrypt.*") { + echo "FOUND\n"; + } +} + +$secretfile = 'secert-file.tmp'; +$passphrase = 'My secret'; + +$iv = substr(md5('iv'.$passphrase, true), 0, 8); +$key = substr(md5('pass1'.$passphrase, true) . + md5('pass2'.$passphrase, true), 0, 24); +$opts = array('iv'=>$iv, 'key'=>$key); + +$fp = fopen($secretfile, 'wb'); +stream_filter_append($fp, 'mcrypt.tripledes', STREAM_FILTER_WRITE, $opts); +fwrite($fp, 'Secret secret secret data'); +fclose($fp); + +echo md5_file($secretfile)."\n"; + +$fp = fopen($secretfile, 'rb'); +stream_filter_append($fp, 'mdecrypt.tripledes', STREAM_FILTER_READ, $opts); +$data = stream_get_contents($fp); +fclose($fp); + +echo $data."\n"; + +@unlink($secretfile); + +--EXPECTF-- +FOUND +FOUND +32e14bd3c31f2bd666e4290ebdb166a7 +Secret secret secret data
\ No newline at end of file diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index 8603add56..18dad7100 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mssql.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_mssql.c 298255 2010-04-21 14:19:27Z felipe $ */ #ifdef COMPILE_DL_MSSQL #define HAVE_MSSQL 1 @@ -1311,6 +1311,7 @@ PHP_FUNCTION(mssql_query) mssql_result *result; int id = -1; + dbsettime(MS_SQL_G(timeout)); batchsize = MS_SQL_G(batchsize); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|rl", &query, &query_len, &mssql_link_index, &zbatchsize) == FAILURE) { diff --git a/ext/mysql/php_mysql.c b/ext/mysql/php_mysql.c index 28d4d8ec5..d8b67a44d 100644 --- a/ext/mysql/php_mysql.c +++ b/ext/mysql/php_mysql.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysql.c 294891 2010-02-11 17:14:44Z johannes $ */ +/* $Id: php_mysql.c 300792 2010-06-28 01:19:08Z felipe $ */ /* TODO: * @@ -135,90 +135,191 @@ typedef struct _php_mysql_conn { #define MYSQL_DISABLE_MQ #endif +/* {{{ arginfo */ +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_connect, 0, 0, 0) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, new) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_pconnect, 0, 0, 0) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo__optional_mysql_link, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_select_db, 0, 0, 1) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo__void_mysql_arg, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_set_charset, 0, 0, 1) + ZEND_ARG_INFO(0, charset_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_query, 0, 0, 1) + ZEND_ARG_INFO(0, query) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_db_query, 0, 0, 2) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, query) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_list_fields, 0, 0, 2) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, table_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_escape_string, 0, 0, 1) + ZEND_ARG_INFO(0, string) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_real_escape_string, 0, 0, 1) + ZEND_ARG_INFO(0, string) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_result, 0, 0, 2) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, row) + ZEND_ARG_INFO(0, field) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo__result_mysql_arg, 0, 0, 1) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_fetch_object, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, class_name) + ZEND_ARG_INFO(0, ctor_params) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_fetch_array, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_data_seek, 0, 0, 2) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, row_number) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_fetch_field, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_field_seek, 0, 0, 2) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysql_field_name, 0, 0, 2) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() +/* }}} */ + /* {{{ mysql_functions[] */ static const zend_function_entry mysql_functions[] = { - PHP_FE(mysql_connect, NULL) - PHP_FE(mysql_pconnect, NULL) - PHP_FE(mysql_close, NULL) - PHP_FE(mysql_select_db, NULL) + PHP_FE(mysql_connect, arginfo_mysql_connect) + PHP_FE(mysql_pconnect, arginfo_mysql_pconnect) + PHP_FE(mysql_close, arginfo__optional_mysql_link) + PHP_FE(mysql_select_db, arginfo_mysql_select_db) #ifndef NETWARE /* The below two functions not supported on NetWare */ #if MYSQL_VERSION_ID < 40000 - PHP_DEP_FE(mysql_create_db, NULL) - PHP_DEP_FE(mysql_drop_db, NULL) + PHP_DEP_FE(mysql_create_db, arginfo_mysql_select_db) + PHP_DEP_FE(mysql_drop_db, arginfo_mysql_select_db) #endif #endif /* NETWARE */ - PHP_FE(mysql_query, NULL) - PHP_FE(mysql_unbuffered_query, NULL) - PHP_FE(mysql_db_query, NULL) - PHP_FE(mysql_list_dbs, NULL) - PHP_DEP_FE(mysql_list_tables, NULL) - PHP_FE(mysql_list_fields, NULL) - PHP_FE(mysql_list_processes, NULL) - PHP_FE(mysql_error, NULL) + PHP_FE(mysql_query, arginfo_mysql_query) + PHP_FE(mysql_unbuffered_query, arginfo_mysql_query) + PHP_FE(mysql_db_query, arginfo_mysql_db_query) + PHP_FE(mysql_list_dbs, arginfo__optional_mysql_link) + PHP_DEP_FE(mysql_list_tables, arginfo_mysql_select_db) + PHP_FE(mysql_list_fields, arginfo_mysql_list_fields) + PHP_FE(mysql_list_processes, arginfo__optional_mysql_link) + PHP_FE(mysql_error, arginfo__optional_mysql_link) #ifdef HAVE_MYSQL_ERRNO - PHP_FE(mysql_errno, NULL) -#endif - PHP_FE(mysql_affected_rows, NULL) - PHP_FE(mysql_insert_id, NULL) - PHP_FE(mysql_result, NULL) - PHP_FE(mysql_num_rows, NULL) - PHP_FE(mysql_num_fields, NULL) - PHP_FE(mysql_fetch_row, NULL) - PHP_FE(mysql_fetch_array, NULL) - PHP_FE(mysql_fetch_assoc, NULL) - PHP_FE(mysql_fetch_object, NULL) - PHP_FE(mysql_data_seek, NULL) - PHP_FE(mysql_fetch_lengths, NULL) - PHP_FE(mysql_fetch_field, NULL) - PHP_FE(mysql_field_seek, NULL) - PHP_FE(mysql_free_result, NULL) - PHP_FE(mysql_field_name, NULL) - PHP_FE(mysql_field_table, NULL) - PHP_FE(mysql_field_len, NULL) - PHP_FE(mysql_field_type, NULL) - PHP_FE(mysql_field_flags, NULL) - PHP_FE(mysql_escape_string, NULL) - PHP_FE(mysql_real_escape_string, NULL) - PHP_FE(mysql_stat, NULL) - PHP_FE(mysql_thread_id, NULL) - PHP_FE(mysql_client_encoding, NULL) - PHP_FE(mysql_ping, NULL) + PHP_FE(mysql_errno, arginfo__optional_mysql_link) +#endif + PHP_FE(mysql_affected_rows, arginfo__optional_mysql_link) + PHP_FE(mysql_insert_id, arginfo__optional_mysql_link) + PHP_FE(mysql_result, arginfo_mysql_result) + PHP_FE(mysql_num_rows, arginfo__result_mysql_arg) + PHP_FE(mysql_num_fields, arginfo__result_mysql_arg) + PHP_FE(mysql_fetch_row, arginfo__result_mysql_arg) + PHP_FE(mysql_fetch_array, arginfo_mysql_fetch_array) + PHP_FE(mysql_fetch_assoc, arginfo__result_mysql_arg) + PHP_FE(mysql_fetch_object, arginfo_mysql_fetch_object) + PHP_FE(mysql_data_seek, arginfo_mysql_data_seek) + PHP_FE(mysql_fetch_lengths, arginfo__result_mysql_arg) + PHP_FE(mysql_fetch_field, arginfo_mysql_fetch_field) + PHP_FE(mysql_field_seek, arginfo_mysql_field_seek) + PHP_FE(mysql_free_result, arginfo__result_mysql_arg) + PHP_FE(mysql_field_name, arginfo_mysql_field_name) + PHP_FE(mysql_field_table, arginfo_mysql_field_seek) + PHP_FE(mysql_field_len, arginfo_mysql_field_seek) + PHP_FE(mysql_field_type, arginfo_mysql_field_seek) + PHP_FE(mysql_field_flags, arginfo_mysql_field_seek) + PHP_FE(mysql_escape_string, arginfo_mysql_escape_string) + PHP_FE(mysql_real_escape_string, arginfo_mysql_real_escape_string) + PHP_FE(mysql_stat, arginfo__optional_mysql_link) + PHP_FE(mysql_thread_id, arginfo__optional_mysql_link) + PHP_FE(mysql_client_encoding, arginfo__optional_mysql_link) + PHP_FE(mysql_ping, arginfo__optional_mysql_link) #ifdef HAVE_GETINFO_FUNCS - PHP_FE(mysql_get_client_info, NULL) - PHP_FE(mysql_get_host_info, NULL) - PHP_FE(mysql_get_proto_info, NULL) - PHP_FE(mysql_get_server_info, NULL) + PHP_FE(mysql_get_client_info, arginfo__void_mysql_arg) + PHP_FE(mysql_get_host_info, arginfo__optional_mysql_link) + PHP_FE(mysql_get_proto_info, arginfo__optional_mysql_link) + PHP_FE(mysql_get_server_info, arginfo__optional_mysql_link) #endif - PHP_FE(mysql_info, NULL) + PHP_FE(mysql_info, arginfo__optional_mysql_link) #ifdef MYSQL_HAS_SET_CHARSET - PHP_FE(mysql_set_charset, NULL) + PHP_FE(mysql_set_charset, arginfo_mysql_set_charset) #endif /* for downwards compatability */ - PHP_FALIAS(mysql, mysql_db_query, NULL) - PHP_FALIAS(mysql_fieldname, mysql_field_name, NULL) - PHP_FALIAS(mysql_fieldtable, mysql_field_table, NULL) - PHP_FALIAS(mysql_fieldlen, mysql_field_len, NULL) - PHP_FALIAS(mysql_fieldtype, mysql_field_type, NULL) - PHP_FALIAS(mysql_fieldflags, mysql_field_flags, NULL) - PHP_FALIAS(mysql_selectdb, mysql_select_db, NULL) + PHP_FALIAS(mysql, mysql_db_query, arginfo_mysql_db_query) + PHP_FALIAS(mysql_fieldname, mysql_field_name, arginfo_mysql_field_name) + PHP_FALIAS(mysql_fieldtable, mysql_field_table, arginfo_mysql_field_seek) + PHP_FALIAS(mysql_fieldlen, mysql_field_len, arginfo_mysql_field_seek) + PHP_FALIAS(mysql_fieldtype, mysql_field_type, arginfo_mysql_field_seek) + PHP_FALIAS(mysql_fieldflags, mysql_field_flags, arginfo_mysql_field_seek) + PHP_FALIAS(mysql_selectdb, mysql_select_db, arginfo_mysql_select_db) #ifndef NETWARE /* The below two functions not supported on NetWare */ #if MYSQL_VERSION_ID < 40000 - PHP_DEP_FALIAS(mysql_createdb, mysql_create_db, NULL) - PHP_DEP_FALIAS(mysql_dropdb, mysql_drop_db, NULL) + PHP_DEP_FALIAS(mysql_createdb, mysql_create_db, arginfo_mysql_select_db) + PHP_DEP_FALIAS(mysql_dropdb, mysql_drop_db, arginfo_mysql_select_db) #endif #endif /* NETWARE */ - PHP_FALIAS(mysql_freeresult, mysql_free_result, NULL) - PHP_FALIAS(mysql_numfields, mysql_num_fields, NULL) - PHP_FALIAS(mysql_numrows, mysql_num_rows, NULL) - PHP_FALIAS(mysql_listdbs, mysql_list_dbs, NULL) - PHP_DEP_FALIAS(mysql_listtables,mysql_list_tables, NULL) - PHP_FALIAS(mysql_listfields, mysql_list_fields, NULL) - PHP_FALIAS(mysql_db_name, mysql_result, NULL) - PHP_FALIAS(mysql_dbname, mysql_result, NULL) - PHP_FALIAS(mysql_tablename, mysql_result, NULL) - PHP_FALIAS(mysql_table_name, mysql_result, NULL) + PHP_FALIAS(mysql_freeresult, mysql_free_result, arginfo__result_mysql_arg) + PHP_FALIAS(mysql_numfields, mysql_num_fields, arginfo__result_mysql_arg) + PHP_FALIAS(mysql_numrows, mysql_num_rows, arginfo__result_mysql_arg) + PHP_FALIAS(mysql_listdbs, mysql_list_dbs, arginfo__optional_mysql_link) + PHP_DEP_FALIAS(mysql_listtables,mysql_list_tables, arginfo_mysql_select_db) + PHP_FALIAS(mysql_listfields, mysql_list_fields, arginfo_mysql_list_fields) + PHP_FALIAS(mysql_db_name, mysql_result, arginfo_mysql_result) + PHP_FALIAS(mysql_dbname, mysql_result, arginfo_mysql_result) + PHP_FALIAS(mysql_tablename, mysql_result, arginfo_mysql_result) + PHP_FALIAS(mysql_table_name, mysql_result, arginfo_mysql_result) {NULL, NULL, NULL} }; /* }}} */ @@ -664,7 +765,11 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) } /* disable local infile option for open_basedir */ +#if PHP_API_VERSION < 20100412 if (((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) && (client_flags & CLIENT_LOCAL_FILES)) { +#else + if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') && (client_flags & CLIENT_LOCAL_FILES)) { +#endif client_flags ^= CLIENT_LOCAL_FILES; } @@ -855,9 +960,17 @@ static void php_mysql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) #else mysql->conn = mysql_init(persistent); #endif + if (!mysql->conn) { + MySG(connect_error) = estrdup("OOM"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OOM"); + efree(hashed_details); + efree(mysql); + MYSQL_DO_CONNECT_RETURN_FALSE(); + } - if (connect_timeout != -1) - mysql_options(mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); + if (connect_timeout != -1) { + mysql_options(mysql->conn, MYSQL_OPT_CONNECT_TIMEOUT, (const char *)&connect_timeout); + } #ifndef MYSQL_USE_MYSQLND if (mysql_real_connect(mysql->conn, host, user, passwd, NULL, port, socket, client_flags)==NULL) @@ -1989,7 +2102,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, } } #else - mysqlnd_fetch_into(mysql_result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQL); + mysqlnd_fetch_into(mysql_result, ((result_type & MYSQL_NUM)? MYSQLND_FETCH_NUM:0) | ((result_type & MYSQL_ASSOC)? MYSQLND_FETCH_ASSOC:0), return_value, MYSQLND_MYSQL); #endif #ifdef ZEND_ENGINE_2 @@ -2067,19 +2180,7 @@ static void php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, Gets a result row as an enumerated array */ PHP_FUNCTION(mysql_fetch_row) { -#ifdef MYSQL_USE_MYSQLND - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &mysql_result) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, -1, "MySQL result", le_result); - - mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, return_value, MYSQLND_MYSQL); -#else php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_NUM, 1, 0); -#endif } /* }}} */ @@ -2101,25 +2202,7 @@ PHP_FUNCTION(mysql_fetch_object) Fetch a result row as an array (associative, numeric or both) */ PHP_FUNCTION(mysql_fetch_array) { -#ifndef MYSQL_USE_MYSQLND php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 2, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - long mode = MYSQLND_FETCH_BOTH; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &mysql_result, &mode) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, -1, "MySQL result", le_result); - - if (mode & ~MYSQL_BOTH) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either MYSQL_NUM, MYSQL_ASSOC or MYSQL_BOTH"); - mode = MYSQL_BOTH; - } - - mysqlnd_fetch_into(result, mode, return_value, MYSQLND_MYSQL); -#endif } /* }}} */ @@ -2128,19 +2211,7 @@ PHP_FUNCTION(mysql_fetch_array) Fetch a result row as an associative array */ PHP_FUNCTION(mysql_fetch_assoc) { -#ifndef MYSQL_USE_MYSQLND php_mysql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQL_ASSOC, 1, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &mysql_result) == FAILURE) { - return; - } - ZEND_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, -1, "MySQL result", le_result); - - mysqlnd_fetch_into(result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQL); -#endif } /* }}} */ diff --git a/ext/mysql/tests/bug51242.phpt b/ext/mysql/tests/bug51242.phpt new file mode 100644 index 000000000..9b62cdb4c --- /dev/null +++ b/ext/mysql/tests/bug51242.phpt @@ -0,0 +1,38 @@ +--TEST-- +Bug #51242 (Empty mysql.default_port does not default to 3306 anymore, but 0) +--INI-- +mysql.default_port= +mysql.default_socket=/this/does/not/really/need/to/exist +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifnotmysqlnd.inc'); + +// Specific to this bug: we need to be able to connect via TCP. We'll use +// 127.0.0.1:3306 as a (hopefully) moderately sensible default if the hostname +// is actually specified as localhost. +if ($host == 'localhost') { + $host = '127.0.0.1'; +} + +if (!@mysql_connect("$host:3306", $user, $passwd)) { + die("skip mysql not available at $host:3306"); +} +?> +--FILE-- +<?php +require_once('connect.inc'); + +if ($host == 'localhost') { + $host = '127.0.0.1'; +} + +if ($link = my_mysql_connect($host, $user, $passwd, $db, null, $socket)) { + var_dump($link); +} else { + printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, null, $socket); +} +?> +--EXPECTF-- +resource(%d) of type (mysql link) diff --git a/ext/mysql/tests/connect.inc b/ext/mysql/tests/connect.inc index b5cc03ecb..97fed4214 100755 --- a/ext/mysql/tests/connect.inc +++ b/ext/mysql/tests/connect.inc @@ -69,7 +69,9 @@ $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); +} /* Development setting: test experimal features and/or feature requests that never worked before? */ $TEST_EXPERIMENTAL = (in_array(getenv("MYSQL_TEST_EXPERIMENTAL"), array(0, 1))) ? ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) : diff --git a/ext/mysql/tests/mysql_constants.phpt b/ext/mysql/tests/mysql_constants.phpt index e88e6556f..134610020 100644 --- a/ext/mysql/tests/mysql_constants.phpt +++ b/ext/mysql/tests/mysql_constants.phpt @@ -38,7 +38,7 @@ $unexpected_constants = array(); foreach ($constants as $group => $consts) { foreach ($consts as $name => $value) { - if (stristr($name, 'mysql') && !stristr($name, 'mysqli')) { + if (stristr($name, 'mysql') && !preg_match("/^mysql([^_]+)_/iu", $name)) { $name = strtoupper($name); if (isset($expected_constants[$name])) { unset($expected_constants[$name]); diff --git a/ext/mysql/tests/mysql_fetch_array.phpt b/ext/mysql/tests/mysql_fetch_array.phpt index 635e6d109..362cf99dd 100644 --- a/ext/mysql/tests/mysql_fetch_array.phpt +++ b/ext/mysql/tests/mysql_fetch_array.phpt @@ -50,7 +50,7 @@ mysql_free_result($res); if (!$res = mysql_query("SELECT 1 AS a, 2 AS b, 3 AS c, 4 AS C", $link)) { printf("[012] Cannot run query, [%d] %s\n", mysql_errno($link), $mysql_error($link)); -exit(1); + exit(1); } do { @@ -76,7 +76,6 @@ function func_mysql_fetch_array($link, $engine, $sql_type, $sql_value, $php_valu } if (!mysql_query($sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine), $link)) { - print $sql; // don't bail, engine might not support the datatype return false; } @@ -225,11 +224,11 @@ func_mysql_fetch_array($link, $engine, "CHAR(255)", $string255, $string255, 550 func_mysql_fetch_array($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560); func_mysql_fetch_array($link, $engine, "CHAR(1)", NULL, NULL, 570); -$string65k = func_mysql_fetch_array_make_string(65535); +$string65k = func_mysql_fetch_array_make_string(65400); func_mysql_fetch_array($link, $engine, "VARCHAR(1)", "a", "a", 580); func_mysql_fetch_array($link, $engine, "VARCHAR(255)", $string255, $string255, 590); -func_mysql_fetch_array($link, $engine, "VARCHAR(65635)", $string65k, $string65k, 600); +func_mysql_fetch_array($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600); func_mysql_fetch_array($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610); func_mysql_fetch_array($link, $engine, "VARCHAR(1)", NULL, NULL, 620); diff --git a/ext/mysql/tests/mysql_fetch_field.phpt b/ext/mysql/tests/mysql_fetch_field.phpt index 65c44edc5..ef0327908 100644 --- a/ext/mysql/tests/mysql_fetch_field.phpt +++ b/ext/mysql/tests/mysql_fetch_field.phpt @@ -51,6 +51,7 @@ require_once('skipifconnectfailure.inc'); 'BIT' => array(1, 'int'), 'TINYINT' => array(1, 'int'), 'BOOL' => array('true', 'int'), + 'BOOL' => array(1, 'int'), 'SMALLINT' => array(32767, 'int'), 'MEDIUMINT' => array(8388607, 'int'), 'INT' => array(100, 'int'), @@ -86,7 +87,17 @@ require_once('skipifconnectfailure.inc'); // server and/or engine might not support the data type continue; } - if (!mysql_query(sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $type_desc[0]), $link)) { + + if (is_string($type_desc[0])) + $insert = sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $type_desc[0]); + else + $insert = sprintf("INSERT INTO test(id, label) VALUES (1, %s)", $type_desc[0]); + + if (!mysql_query($insert, $link)) { + if (1366 == mysql_errno($link)) { + /* Strict SQL mode - 1366, Incorrect integer value: 'true' for column 'label' at row 1 */ + continue; + } printf("[009/%s] [%d] %s\n", $type_name, mysql_errno($link), mysql_error($link)); continue; } diff --git a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt index a257f5fb8..ff62f4227 100644 --- a/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt +++ b/ext/mysql/tests/mysql_query_load_data_openbasedir.phpt @@ -26,7 +26,6 @@ if ($socket == "" && $host != NULL && $host != 'localhost' && $host != '.') { } ?> --INI-- -safe_mode=0 open_basedir="." --FILE-- <?php diff --git a/ext/mysql/tests/skipifnotmysqlnd.inc b/ext/mysql/tests/skipifnotmysqlnd.inc new file mode 100644 index 000000000..9cccdc7bf --- /dev/null +++ b/ext/mysql/tests/skipifnotmysqlnd.inc @@ -0,0 +1,5 @@ +<?php +if (strpos(mysql_get_client_info(), 'mysqlnd') === false) { + die('skip mysqlnd extension not available'); +} +?> diff --git a/ext/mysqli/mysqli.c b/ext/mysqli/mysqli.c index 3ba50a17f..6e78fc4ea 100644 --- a/ext/mysqli/mysqli.c +++ b/ext/mysqli/mysqli.c @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli.c 293779 2010-01-20 17:09:28Z johannes $ + $Id: mysqli.c 299771 2010-05-26 07:28:43Z andrey $ */ #ifdef HAVE_CONFIG_H @@ -222,10 +222,11 @@ static void mysqli_link_free_storage(void *object TSRMLS_DC) if (my_res && my_res->ptr) { MY_MYSQL *mysql = (MY_MYSQL *)my_res->ptr; if (mysql->mysql) { - php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT TSRMLS_CC); + php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT, my_res->status TSRMLS_CC); } php_clear_mysql(mysql); efree(mysql); + my_res->status = MYSQLI_STATUS_UNKNOWN; } mysqli_objects_free_storage(object TSRMLS_CC); } @@ -981,7 +982,7 @@ PHP_FUNCTION(mysqli_stmt_construct) if (zend_parse_parameters(1 TSRMLS_CC, "O", &mysql_link, mysqli_link_class_entry)==FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); @@ -991,7 +992,7 @@ PHP_FUNCTION(mysqli_stmt_construct) if (zend_parse_parameters(2 TSRMLS_CC, "Os", &mysql_link, mysqli_link_class_entry, &statement, &statement_len)==FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); @@ -1045,7 +1046,7 @@ PHP_FUNCTION(mysqli_result_construct) WRONG_PARAM_COUNT; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); switch (resmode) { case MYSQLI_STORE_RESULT: @@ -1194,7 +1195,7 @@ void php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAMETERS, int override_flags } } #else - mysqlnd_fetch_into(result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQLI); + mysqlnd_fetch_into(result, ((fetchtype & MYSQLI_NUM)? MYSQLND_FETCH_NUM:0) | ((fetchtype & MYSQLI_ASSOC)? MYSQLND_FETCH_ASSOC:0), return_value, MYSQLND_MYSQLI); #endif if (into_object && Z_TYPE_P(return_value) != IS_NULL) { diff --git a/ext/mysqli/mysqli_api.c b/ext/mysqli/mysqli_api.c index 81cfeef7e..1b4694f96 100644 --- a/ext/mysqli/mysqli_api.c +++ b/ext/mysqli/mysqli_api.c @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_api.c 294543 2010-02-04 20:28:55Z johannes $ + $Id: mysqli_api.c 300436 2010-06-14 18:19:13Z andrey $ */ #ifdef HAVE_CONFIG_H @@ -44,7 +44,7 @@ PHP_FUNCTION(mysqli_affected_rows) return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); rc = mysql_affected_rows(mysql->mysql); if (rc == (my_ulonglong) -1) { @@ -66,7 +66,7 @@ PHP_FUNCTION(mysqli_autocommit) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ob", &mysql_link, mysqli_link_class_entry, &automode) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql_autocommit(mysql->mysql, (my_bool)automode)) { RETURN_FALSE; @@ -166,7 +166,10 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in if (argc == start) { return PASS; } - params = safe_emalloc(argc - start, sizeof(MYSQLND_PARAM_BIND), 0); + params = mysqlnd_stmt_alloc_param_bind(stmt->stmt); + if (!params) { + goto end; + } for (i = 0; i < (argc - start); i++) { zend_uchar type; switch (types[i]) { @@ -190,7 +193,7 @@ int mysqli_stmt_bind_param_do_bind(MY_STMT *stmt, unsigned int argc, unsigned in /* We count parameters from 1 */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Undefined fieldtype %c (parameter %d)", types[i], i + start + 1); ret = FAIL; - efree(params); + mysqlnd_stmt_free_param_bind(stmt->stmt, params); goto end; } params[i].zv = *(args[i + start]); @@ -229,7 +232,7 @@ PHP_FUNCTION(mysqli_stmt_bind_param) return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); num_vars = argc - 1; if (getThis()) { @@ -452,13 +455,14 @@ static int mysqli_stmt_bind_result_do_bind(MY_STMT *stmt, zval ***args, unsigned int argc, unsigned int start TSRMLS_DC) { unsigned int i; - MYSQLND_RESULT_BIND *params; - - params = safe_emalloc(argc - start, sizeof(MYSQLND_RESULT_BIND), 0); - for (i = 0; i < (argc - start); i++) { - params[i].zv = *(args[i + start]); + MYSQLND_RESULT_BIND * params = mysqlnd_stmt_alloc_result_bind(stmt->stmt); + if (params) { + for (i = 0; i < (argc - start); i++) { + params[i].zv = *(args[i + start]); + } + return mysqlnd_stmt_bind_result(stmt->stmt, params); } - return mysqlnd_stmt_bind_result(stmt->stmt, params); + return FAIL; } #endif /* }}} */ @@ -482,7 +486,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result) return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (argc < (getThis() ? 1 : 2)) { WRONG_PARAM_COUNT; @@ -517,11 +521,18 @@ PHP_FUNCTION(mysqli_change_user) char *user, *password, *dbname; int user_len, password_len, dbname_len; ulong rc; +#if !defined(MYSQLI_USE_MYSQLND) && defined(HAVE_MYSQLI_SET_CHARSET) + const CHARSET_INFO * old_charset; +#endif if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osss", &mysql_link, mysqli_link_class_entry, &user, &user_len, &password, &password_len, &dbname, &dbname_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); + +#if !defined(MYSQLI_USE_MYSQLND) && defined(HAVE_MYSQLI_SET_CHARSET) + old_charset = mysql->mysql->charset; +#endif rc = mysql_change_user(mysql->mysql, user, password, dbname); MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); @@ -529,6 +540,16 @@ PHP_FUNCTION(mysqli_change_user) if (rc) { RETURN_FALSE; } +#if !defined(MYSQLI_USE_MYSQLND) && defined(HAVE_MYSQLI_SET_CHARSET) + if (mysql_get_server_version(mysql->mysql) < 501023L) { + /* + 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 + */ + rc = mysql_set_character_set(mysql->mysql, old_charset->csname); + } +#endif RETURN_TRUE; } @@ -545,7 +566,7 @@ PHP_FUNCTION(mysqli_character_set_name) return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_STRING((char *)mysql_character_set_name(mysql->mysql), 1); } @@ -553,8 +574,12 @@ PHP_FUNCTION(mysqli_character_set_name) /* {{{ php_mysqli_close */ -void php_mysqli_close(MY_MYSQL * mysql, int close_type TSRMLS_DC) +void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status TSRMLS_DC) { + if (resource_status > MYSQLI_STATUS_INITIALIZED) { + MyG(num_links)--; + } + if (!mysql->persistent) { mysqli_close(mysql->mysql, close_type); } else { @@ -564,7 +589,6 @@ void php_mysqli_close(MY_MYSQL * mysql, int close_type TSRMLS_DC) mysqli_plist_entry *plist = (mysqli_plist_entry *) le->ptr; zend_ptr_stack_push(&plist->free_links, mysql->mysql); - MyG(num_links)--; MyG(num_active_persistent)--; MyG(num_inactive_persistent)++; } @@ -589,9 +613,10 @@ PHP_FUNCTION(mysqli_close) return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_INITIALIZED); - php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT TSRMLS_CC); + php_mysqli_close(mysql, MYSQLI_CLOSE_EXPLICIT, ((MYSQLI_RESOURCE *)((mysqli_object *)zend_object_store_get_object(mysql_link TSRMLS_CC))->ptr)->status TSRMLS_CC); + ((MYSQLI_RESOURCE *)((mysqli_object *)zend_object_store_get_object(mysql_link TSRMLS_CC))->ptr)->status = MYSQLI_STATUS_UNKNOWN; MYSQLI_CLEAR_RESOURCE(&mysql_link); efree(mysql); @@ -609,7 +634,7 @@ PHP_FUNCTION(mysqli_commit) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql_commit(mysql->mysql)) { RETURN_FALSE; } @@ -672,7 +697,7 @@ PHP_FUNCTION(mysqli_dump_debug_info) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_BOOL(!mysql_dump_debug_info(mysql->mysql)) } @@ -688,7 +713,7 @@ PHP_FUNCTION(mysqli_errno) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_errno(mysql->mysql)); } /* }}} */ @@ -703,7 +728,7 @@ PHP_FUNCTION(mysqli_error) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_STRING((char *)mysql_error(mysql->mysql),1); } /* }}} */ @@ -738,7 +763,7 @@ PHP_FUNCTION(mysqli_stmt_execute) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); #ifndef MYSQLI_USE_MYSQLND if (stmt->param.var_cnt) { @@ -832,7 +857,7 @@ void mysqli_stmt_fetch_libmysql(INTERNAL_FUNCTION_PARAMETERS) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); /* reset buffers */ for (i = 0; i < stmt->result.var_cnt; i++) { @@ -989,7 +1014,7 @@ void mysqli_stmt_fetch_mysqlnd(INTERNAL_FUNCTION_PARAMETERS) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (FAIL == mysqlnd_stmt_fetch(stmt->stmt, &fetched_anything)) { RETURN_BOOL(FALSE); @@ -1146,18 +1171,7 @@ PHP_FUNCTION(mysqli_fetch_lengths) Get a result row as an enumerated array */ PHP_FUNCTION(mysqli_fetch_row) { -#if !defined(MYSQLI_USE_MYSQLND) php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQLI_NUM, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) { - return; - } - MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result", MYSQLI_STATUS_VALID); - mysqlnd_fetch_into(result, MYSQLND_FETCH_NUM, return_value, MYSQLND_MYSQLI); -#endif } /* }}} */ @@ -1172,7 +1186,7 @@ PHP_FUNCTION(mysqli_field_count) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_field_count(mysql->mysql)); } @@ -1261,7 +1275,7 @@ PHP_FUNCTION(mysqli_get_host_info) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_STRING((mysql->mysql->host_info) ? mysql->mysql->host_info : "", 1); } @@ -1277,7 +1291,7 @@ PHP_FUNCTION(mysqli_get_proto_info) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_get_proto_info(mysql->mysql)); } /* }}} */ @@ -1292,7 +1306,7 @@ PHP_FUNCTION(mysqli_get_server_info) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_STRING((char *)mysql_get_server_info(mysql->mysql), 1); } @@ -1309,7 +1323,7 @@ PHP_FUNCTION(mysqli_get_server_version) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_get_server_version(mysql->mysql)); } @@ -1326,7 +1340,7 @@ PHP_FUNCTION(mysqli_info) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); info = mysql_info(mysql->mysql); RETURN_STRING((info) ? (char *)info : "", 1); @@ -1392,7 +1406,7 @@ PHP_FUNCTION(mysqli_insert_id) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); rc = mysql_insert_id(mysql->mysql); MYSQLI_RETURN_LONG_LONG(rc) } @@ -1409,7 +1423,7 @@ PHP_FUNCTION(mysqli_kill) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &mysql_link, mysqli_link_class_entry, &processid) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (processid <= 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "processid should have positive value"); @@ -1436,7 +1450,7 @@ PHP_FUNCTION(mysqli_set_local_infile_default) return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql->li_read) { zval_ptr_dtor(&(mysql->li_read)); @@ -1459,7 +1473,7 @@ PHP_FUNCTION(mysqli_set_local_infile_handler) return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); /* check callback function */ if (!zend_is_callable(callback_func, 0, &callback_name TSRMLS_CC)) { @@ -1492,7 +1506,7 @@ PHP_FUNCTION(mysqli_more_results) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_BOOL(mysql_more_results(mysql->mysql)); } @@ -1507,7 +1521,7 @@ PHP_FUNCTION(mysqli_next_result) { if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (!mysql_more_results(mysql->mysql)) { php_error_docref(NULL TSRMLS_CC, E_STRICT, "There is no next result set. " @@ -1530,7 +1544,7 @@ PHP_FUNCTION(mysqli_stmt_more_results) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); RETURN_BOOL(mysqlnd_stmt_more_results(stmt->stmt)); } @@ -1546,7 +1560,7 @@ PHP_FUNCTION(mysqli_stmt_next_result) { if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (!mysqlnd_stmt_more_results(stmt->stmt)) { php_error_docref(NULL TSRMLS_CC, E_STRICT, "There is no next result set. " @@ -1665,30 +1679,34 @@ PHP_FUNCTION(mysqli_options) { MY_MYSQL *mysql; zval *mysql_link = NULL; - zval *mysql_value; + zval **mysql_value; long mysql_option; unsigned int l_value; long ret; int expected_type; - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olz", &mysql_link, mysqli_link_class_entry, &mysql_option, &mysql_value) == FAILURE) { + if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "OlZ", &mysql_link, mysqli_link_class_entry, &mysql_option, &mysql_value) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_INITIALIZED); +#if PHP_API_VERSION < 20100412 if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) { +#else + if (PG(open_basedir) && PG(open_basedir)[0] != '\0') { +#endif if(mysql_option == MYSQL_OPT_LOCAL_INFILE) { RETURN_FALSE; } } expected_type = mysqli_options_get_option_zval_type(mysql_option); - if (expected_type != Z_TYPE_P(mysql_value)) { + if (expected_type != Z_TYPE_PP(mysql_value)) { switch (expected_type) { case IS_STRING: - convert_to_string_ex(&mysql_value); + convert_to_string_ex(mysql_value); break; case IS_LONG: - convert_to_long_ex(&mysql_value); + convert_to_long_ex(mysql_value); break; default: break; @@ -1696,10 +1714,10 @@ PHP_FUNCTION(mysqli_options) } switch (expected_type) { case IS_STRING: - ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_PP(&mysql_value)); + ret = mysql_options(mysql->mysql, mysql_option, Z_STRVAL_PP(mysql_value)); break; case IS_LONG: - l_value = Z_LVAL_PP(&mysql_value); + l_value = Z_LVAL_PP(mysql_value); ret = mysql_options(mysql->mysql, mysql_option, (char *)&l_value); break; default: @@ -1723,7 +1741,7 @@ PHP_FUNCTION(mysqli_ping) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); rc = mysql_ping(mysql->mysql); MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); @@ -1745,7 +1763,7 @@ PHP_FUNCTION(mysqli_prepare) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",&mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); #if !defined(MYSQLI_USE_MYSQLND) if (mysql->mysql->status == MYSQL_STATUS_GET_RESULT) { @@ -1830,7 +1848,7 @@ PHP_FUNCTION(mysqli_real_query) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); MYSQLI_DISABLE_MQ; /* disable multi statements/queries */ @@ -1860,7 +1878,7 @@ PHP_FUNCTION(mysqli_real_escape_string) { if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &escapestr, &escapestr_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); newstr = safe_emalloc(2, escapestr_len, 1); newstr_len = mysql_real_escape_string(mysql->mysql, newstr, escapestr, escapestr_len); @@ -1880,7 +1898,7 @@ PHP_FUNCTION(mysqli_rollback) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql_rollback(mysql->mysql)) { RETURN_FALSE; @@ -1902,7 +1920,7 @@ PHP_FUNCTION(mysqli_stmt_send_long_data) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols", &mysql_stmt, mysqli_stmt_class_entry, ¶m_nr, &data, &data_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (param_nr < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid parameter number"); @@ -1927,7 +1945,7 @@ PHP_FUNCTION(mysqli_stmt_affected_rows) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); rc = mysql_stmt_affected_rows(stmt->stmt); if (rc == (my_ulonglong) -1) { @@ -1947,7 +1965,7 @@ PHP_FUNCTION(mysqli_stmt_close) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); mysqli_stmt_close(stmt->stmt, FALSE); stmt->stmt = NULL; @@ -1973,7 +1991,7 @@ PHP_FUNCTION(mysqli_stmt_data_seek) RETURN_FALSE; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); mysql_stmt_data_seek(stmt->stmt, offset); } @@ -1989,7 +2007,7 @@ PHP_FUNCTION(mysqli_stmt_field_count) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_stmt_field_count(stmt->stmt)); } @@ -2006,7 +2024,7 @@ PHP_FUNCTION(mysqli_stmt_free_result) return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); mysql_stmt_free_result(stmt->stmt); } @@ -2023,7 +2041,7 @@ PHP_FUNCTION(mysqli_stmt_insert_id) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); rc = mysql_stmt_insert_id(stmt->stmt); MYSQLI_RETURN_LONG_LONG(rc) } @@ -2039,7 +2057,7 @@ PHP_FUNCTION(mysqli_stmt_param_count) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_stmt_param_count(stmt->stmt)); } @@ -2056,7 +2074,7 @@ PHP_FUNCTION(mysqli_stmt_reset) return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (mysql_stmt_reset(stmt->stmt)) { RETURN_FALSE; @@ -2077,7 +2095,7 @@ PHP_FUNCTION(mysqli_stmt_num_rows) return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); rc = mysql_stmt_num_rows(stmt->stmt); MYSQLI_RETURN_LONG_LONG(rc) @@ -2096,7 +2114,7 @@ PHP_FUNCTION(mysqli_select_db) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &dbname, &dbname_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql_select_db(mysql->mysql, dbname)) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); @@ -2116,14 +2134,13 @@ PHP_FUNCTION(mysqli_sqlstate) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_STRING((char *)mysql_sqlstate(mysql->mysql),1); } /* }}} */ /* {{{ proto bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher]) U */ -#if !defined(MYSQLI_USE_MYSQLND) PHP_FUNCTION(mysqli_ssl_set) { MY_MYSQL *mysql; @@ -2134,7 +2151,7 @@ PHP_FUNCTION(mysqli_ssl_set) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osssss", &mysql_link, mysqli_link_class_entry, &ssl_parm[0], &ssl_parm_len[0], &ssl_parm[1], &ssl_parm_len[1], &ssl_parm[2], &ssl_parm_len[2], &ssl_parm[3], &ssl_parm_len[3], &ssl_parm[4], &ssl_parm_len[4]) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_INITIALIZED); for (i = 0; i < 5; i++) { if (!ssl_parm_len[i]) { @@ -2146,7 +2163,6 @@ PHP_FUNCTION(mysqli_ssl_set) RETURN_TRUE; } -#endif /* }}} */ /* {{{ proto mixed mysqli_stat(object link) @@ -2163,7 +2179,7 @@ PHP_FUNCTION(mysqli_stat) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); #if !defined(MYSQLI_USE_MYSQLND) if ((stat = (char *)mysql_stat(mysql->mysql))) @@ -2192,7 +2208,7 @@ PHP_FUNCTION(mysqli_refresh) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &mysql_link, mysqli_link_class_entry, &options) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_INITIALIZED); #ifdef MYSQLI_USE_MYSQLND RETURN_BOOL(!mysql_refresh(mysql->mysql, (uint8_t) options)); #else @@ -2214,7 +2230,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oll", &mysql_stmt, mysqli_stmt_class_entry, &attr, &mode_in) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (mode_in < 0) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "mode should be non-negative, %ld passed", mode_in); @@ -2223,7 +2239,7 @@ PHP_FUNCTION(mysqli_stmt_attr_set) mode = mode_in; #if !defined(MYSQLI_USE_MYSQLND) - if (FALSE == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { + if (mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { #else if (FAIL == mysql_stmt_attr_set(stmt->stmt, attr, (void *)&mode)) { #endif @@ -2250,7 +2266,7 @@ PHP_FUNCTION(mysqli_stmt_attr_get) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol", &mysql_stmt, mysqli_stmt_class_entry, &attr) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if ((rc = mysql_stmt_attr_get(stmt->stmt, attr, &value))) { RETURN_FALSE; @@ -2269,7 +2285,7 @@ PHP_FUNCTION(mysqli_stmt_errno) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_INITIALIZED); RETURN_LONG(mysql_stmt_errno(stmt->stmt)); } @@ -2285,7 +2301,7 @@ PHP_FUNCTION(mysqli_stmt_error) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_INITIALIZED); RETURN_STRING((char *)mysql_stmt_error(stmt->stmt),1); } @@ -2304,7 +2320,7 @@ PHP_FUNCTION(mysqli_stmt_init) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",&mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); stmt = (MY_STMT *)ecalloc(1,sizeof(MY_STMT)); @@ -2333,7 +2349,7 @@ PHP_FUNCTION(mysqli_stmt_prepare) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_stmt, mysqli_stmt_class_entry, &query, &query_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_INITIALIZED); if (mysql_stmt_prepare(stmt->stmt, query, query_len)) { MYSQLI_REPORT_STMT_ERROR(stmt->stmt); @@ -2357,7 +2373,7 @@ PHP_FUNCTION(mysqli_stmt_result_metadata) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (!(result = mysql_stmt_result_metadata(stmt->stmt))){ MYSQLI_REPORT_STMT_ERROR(stmt->stmt); @@ -2381,7 +2397,7 @@ PHP_FUNCTION(mysqli_stmt_store_result) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); #if !defined(MYSQLI_USE_MYSQLND) { @@ -2426,7 +2442,7 @@ PHP_FUNCTION(mysqli_stmt_sqlstate) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); RETURN_STRING((char *)mysql_stmt_sqlstate(stmt->stmt),1); } @@ -2444,7 +2460,7 @@ PHP_FUNCTION(mysqli_store_result) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (!(result = mysql_store_result(mysql->mysql))) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); @@ -2472,7 +2488,7 @@ PHP_FUNCTION(mysqli_thread_id) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_LONG((long) mysql_thread_id(mysql->mysql)); } @@ -2498,7 +2514,7 @@ PHP_FUNCTION(mysqli_use_result) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (!(result = mysql_use_result(mysql->mysql))) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); @@ -2525,7 +2541,7 @@ PHP_FUNCTION(mysqli_warning_count) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); RETURN_LONG(mysql_warning_count(mysql->mysql)); } diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 5e87842fc..a67204142 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -12,10 +12,12 @@ | obtain it through the world-wide-web, please send a note to | | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ - | Author: Georg Richter <georg@php.net> | + | Authors: Georg Richter <georg@php.net> | + | Andrey Hristov <andrey@php.net> | + | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_fe.c 293036 2010-01-03 09:23:27Z sebastian $ + $Id: mysqli_fe.c 301049 2010-07-07 12:09:36Z andrey $ */ #ifdef HAVE_CONFIG_H @@ -29,14 +31,30 @@ #include "ext/standard/info.h" #include "php_mysqli_structs.h" +#if PHP_VERSION_ID >= 50399 +#define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_OBJ_INFO(0, link, mysqli, 0) +#define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_OBJ_INFO(0, result, mysqli_result, 0) +#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_OBJ_INFO(0, stmt, mysqli_stmt, 0) +#else +#define MYSQLI_ZEND_ARG_OBJ_INFO_LINK() ZEND_ARG_INFO(0, link) +#define MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() ZEND_ARG_INFO(0, result) +#define MYSQLI_ZEND_ARG_OBJ_INFO_STMT() ZEND_ARG_INFO(0, stmt) +#endif + +ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_result, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() +ZEND_END_ARG_INFO(); + +ZEND_BEGIN_ARG_INFO(arginfo_mysqli_stmt_bind_param, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, types) +ZEND_END_ARG_INFO(); -ZEND_BEGIN_ARG_INFO(second_arg_force_by_ref_rest, 1) - ZEND_ARG_PASS_INFO(0) +ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_result, 1) ZEND_END_ARG_INFO(); -ZEND_BEGIN_ARG_INFO(third_arg_force_by_ref_rest, 1) - ZEND_ARG_PASS_INFO(0) - ZEND_ARG_PASS_INFO(0) +ZEND_BEGIN_ARG_INFO(arginfo_class_mysqli_stmt_bind_param, 1) + ZEND_ARG_INFO(0, types) ZEND_END_ARG_INFO(); ZEND_BEGIN_ARG_INFO(all_args_force_by_ref, 1) @@ -50,144 +68,401 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_poll, 0, 0, 4) ZEND_ARG_INFO(0, usec) ZEND_END_ARG_INFO(); +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_no_params, 0, 0, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_link, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_autocommit, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_autocommit, 0, 0, 1) + ZEND_ARG_INFO(0, mode) +ZEND_END_ARG_INFO() + + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_change_user, 0, 0, 4) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_change_user, 0, 0, 3) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_connect, 0, 0, 0) + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, socket) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_connect, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_connect, 0, 0, 0) + ZEND_ARG_INFO(0, host) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, port) + ZEND_ARG_INFO(0, socket) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_result, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_only_statement, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_data_seek, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_data_seek, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_data_seek, 0, 0, 1) + ZEND_ARG_INFO(0, offset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_debug, 0, 0, 1) + ZEND_ARG_INFO(0, debug_options) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_result_and_fieldnr, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, field_nr) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_result_and_fieldnr, 0, 0, 1) + ZEND_ARG_INFO(0, field_nr) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_array, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_array, 0, 0, 0) + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_fetch_object, 0, 0, 1) +#if PHP_VERSION_ID > 50399 + MYSQLI_ZEND_ARG_OBJ_INFO_RESULT() + ZEND_ARG_INFO(0, class_name) + ZEND_ARG_ARRAY_INFO(0, params, 0) +#endif +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_fetch_object, 0, 0, 0) +#if PHP_VERSION_ID > 50399 + ZEND_ARG_INFO(0, class_name) + ZEND_ARG_ARRAY_INFO(0, params, 0) +#endif +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_kill, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, connection_id) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_kill, 0, 0, 1) + ZEND_ARG_INFO(0, connection_id) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_local_infile_handler, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, read_callback) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_local_infile_handler, 0, 0, 1) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, read_callback) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_query, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_prepare, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_prepare, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_query, 0, 0, 1) + ZEND_ARG_INFO(0, query) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_options, 0, 0, 3) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_options, 0, 0, 2) + ZEND_ARG_INFO(0, option) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_report, 0, 0, 1) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_real_escape_string, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, string_to_escape) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_real_escape_string, 0, 0, 1) + ZEND_ARG_INFO(0, string_to_escape) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_select_db, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_select_db, 0, 0, 1) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_set_charset, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, charset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_set_charset, 0, 0, 1) + ZEND_ARG_INFO(0, charset) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_get, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, attribute) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_get, 0, 0, 1) + ZEND_ARG_INFO(0, attribute) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_attr_set, 0, 0, 3) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, attribute) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_attr_set, 0, 0, 2) + ZEND_ARG_INFO(0, attribute) + ZEND_ARG_INFO(0, value) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_stmt_send_long_data, 0, 0, 3) + MYSQLI_ZEND_ARG_OBJ_INFO_STMT() + ZEND_ARG_INFO(0, param_nr) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_stmt_send_long_data, 0, 0, 2) + ZEND_ARG_INFO(0, param_nr) + ZEND_ARG_INFO(0, data) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_ssl_set, 0, 0, 6) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, key) + ZEND_ARG_INFO(0, cert) + ZEND_ARG_INFO(0, certificate_authority) + ZEND_ARG_INFO(0, certificate_authority_path) + ZEND_ARG_INFO(0, cipher) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_ssl_set, 0, 0, 5) + ZEND_ARG_INFO(0, key) + ZEND_ARG_INFO(0, cert) + ZEND_ARG_INFO(0, certificate_authority) + ZEND_ARG_INFO(0, certificate_authority_path) + ZEND_ARG_INFO(0, cipher) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_mysqli_refresh, 0, 0, 2) + MYSQLI_ZEND_ARG_OBJ_INFO_LINK() + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_class_mysqli_refresh, 0, 0, 1) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + + /* {{{ mysqli_functions[] * * Every user visible function must have an entry in mysqli_functions[]. */ const zend_function_entry mysqli_functions[] = { - PHP_FE(mysqli_affected_rows, NULL) - PHP_FE(mysqli_autocommit, NULL) - PHP_FE(mysqli_change_user, NULL) - PHP_FE(mysqli_character_set_name, NULL) - PHP_FE(mysqli_close, NULL) - PHP_FE(mysqli_commit, NULL) - PHP_FE(mysqli_connect, NULL) - PHP_FE(mysqli_connect_errno, NULL) - PHP_FE(mysqli_connect_error, NULL) - PHP_FE(mysqli_data_seek, NULL) - PHP_FE(mysqli_dump_debug_info, NULL) - PHP_FE(mysqli_debug, NULL) + PHP_FE(mysqli_affected_rows, arginfo_mysqli_only_link) + PHP_FE(mysqli_autocommit, arginfo_mysqli_autocommit) + PHP_FE(mysqli_change_user, arginfo_mysqli_change_user) + PHP_FE(mysqli_character_set_name, arginfo_mysqli_only_link) + PHP_FE(mysqli_close, arginfo_mysqli_only_link) + PHP_FE(mysqli_commit, arginfo_mysqli_only_link) + PHP_FE(mysqli_connect, arginfo_mysqli_connect) + PHP_FE(mysqli_connect_errno, arginfo_mysqli_no_params) + PHP_FE(mysqli_connect_error, arginfo_mysqli_no_params) + PHP_FE(mysqli_data_seek, arginfo_mysqli_data_seek) + PHP_FE(mysqli_dump_debug_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_debug, arginfo_mysqli_debug) #if defined(HAVE_EMBEDDED_MYSQLI) PHP_FE(mysqli_embedded_server_end, NULL) PHP_FE(mysqli_embedded_server_start, NULL) #endif - PHP_FE(mysqli_errno, NULL) - PHP_FE(mysqli_error, NULL) - PHP_FE(mysqli_stmt_execute, NULL) - PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, NULL) - PHP_FE(mysqli_fetch_field, NULL) - PHP_FE(mysqli_fetch_fields, NULL) - PHP_FE(mysqli_fetch_field_direct, NULL) - PHP_FE(mysqli_fetch_lengths, NULL) + PHP_FE(mysqli_errno, arginfo_mysqli_only_link) + PHP_FE(mysqli_error, arginfo_mysqli_only_link) + PHP_FE(mysqli_stmt_execute, arginfo_mysqli_only_statement) + PHP_FALIAS(mysqli_execute, mysqli_stmt_execute, arginfo_mysqli_only_statement) + PHP_FE(mysqli_fetch_field, arginfo_mysqli_only_result) + PHP_FE(mysqli_fetch_fields, arginfo_mysqli_only_result) + PHP_FE(mysqli_fetch_field_direct, arginfo_mysqli_result_and_fieldnr) + PHP_FE(mysqli_fetch_lengths, arginfo_mysqli_only_result) #ifdef MYSQLI_USE_MYSQLND - PHP_FE(mysqli_fetch_all, NULL) + PHP_FE(mysqli_fetch_all, arginfo_mysqli_only_result) #endif - PHP_FE(mysqli_fetch_array, NULL) - PHP_FE(mysqli_fetch_assoc, NULL) - PHP_FE(mysqli_fetch_object, NULL) - PHP_FE(mysqli_fetch_row, NULL) - PHP_FE(mysqli_field_count, NULL) - PHP_FE(mysqli_field_seek, NULL) - PHP_FE(mysqli_field_tell, NULL) - PHP_FE(mysqli_free_result, NULL) + PHP_FE(mysqli_fetch_array, arginfo_mysqli_fetch_array) + PHP_FE(mysqli_fetch_assoc, arginfo_mysqli_only_result) + PHP_FE(mysqli_fetch_object, arginfo_mysqli_fetch_object) + PHP_FE(mysqli_fetch_row, arginfo_mysqli_only_result) + PHP_FE(mysqli_field_count, arginfo_mysqli_only_link) + PHP_FE(mysqli_field_seek, arginfo_mysqli_result_and_fieldnr) + PHP_FE(mysqli_field_tell, arginfo_mysqli_only_result) + PHP_FE(mysqli_free_result, arginfo_mysqli_only_result) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_get_cache_stats, NULL) - PHP_FE(mysqli_get_connection_stats, NULL) - PHP_FE(mysqli_get_client_stats, NULL) + PHP_FE(mysqli_get_cache_stats, arginfo_mysqli_no_params) + PHP_FE(mysqli_get_connection_stats, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_client_stats, arginfo_mysqli_no_params) #endif #ifdef HAVE_MYSQLI_GET_CHARSET - PHP_FE(mysqli_get_charset, NULL) + PHP_FE(mysqli_get_charset, arginfo_mysqli_only_link) #endif - PHP_FE(mysqli_get_client_info, NULL) - PHP_FE(mysqli_get_client_version, NULL) - PHP_FE(mysqli_get_host_info, NULL) - PHP_FE(mysqli_get_proto_info, NULL) - PHP_FE(mysqli_get_server_info, NULL) - PHP_FE(mysqli_get_server_version, NULL) - PHP_FE(mysqli_get_warnings, NULL) - PHP_FE(mysqli_init, NULL) - PHP_FE(mysqli_info, NULL) - PHP_FE(mysqli_insert_id, NULL) - PHP_FE(mysqli_kill, NULL) + PHP_FE(mysqli_get_client_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_client_version, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_host_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_proto_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_server_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_server_version, arginfo_mysqli_only_link) + PHP_FE(mysqli_get_warnings, arginfo_mysqli_only_link) + PHP_FE(mysqli_init, arginfo_mysqli_no_params) + PHP_FE(mysqli_info, arginfo_mysqli_only_link) + PHP_FE(mysqli_insert_id, arginfo_mysqli_only_link) + PHP_FE(mysqli_kill, arginfo_mysqli_kill) #if !defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_set_local_infile_default, NULL) - PHP_FE(mysqli_set_local_infile_handler, NULL) + PHP_FE(mysqli_set_local_infile_default, arginfo_mysqli_only_link) + PHP_FE(mysqli_set_local_infile_handler, arginfo_mysqli_set_local_infile_handler) #endif - PHP_FE(mysqli_more_results, NULL) - PHP_FE(mysqli_multi_query, NULL) - PHP_FE(mysqli_next_result, NULL) - PHP_FE(mysqli_num_fields, NULL) - PHP_FE(mysqli_num_rows, NULL) - PHP_FE(mysqli_options, NULL) - PHP_FE(mysqli_ping, NULL) + PHP_FE(mysqli_more_results, arginfo_mysqli_only_link) + PHP_FE(mysqli_multi_query, arginfo_mysqli_query) + PHP_FE(mysqli_next_result, arginfo_mysqli_only_link) + PHP_FE(mysqli_num_fields, arginfo_mysqli_only_result) + PHP_FE(mysqli_num_rows, arginfo_mysqli_only_result) + PHP_FE(mysqli_options, arginfo_mysqli_options) + PHP_FE(mysqli_ping, arginfo_mysqli_only_link) #if defined(MYSQLI_USE_MYSQLND) PHP_FE(mysqli_poll, arginfo_mysqli_poll) #endif - PHP_FE(mysqli_prepare, NULL) - PHP_FE(mysqli_report, NULL) - PHP_FE(mysqli_query, NULL) - PHP_FE(mysqli_real_connect, NULL) - PHP_FE(mysqli_real_escape_string, NULL) - PHP_FE(mysqli_real_query, NULL) + PHP_FE(mysqli_prepare, arginfo_mysqli_prepare) + PHP_FE(mysqli_report, arginfo_mysqli_report) + PHP_FE(mysqli_query, arginfo_mysqli_query) + PHP_FE(mysqli_real_connect, arginfo_mysqli_real_connect) + PHP_FE(mysqli_real_escape_string, arginfo_mysqli_real_escape_string) + PHP_FE(mysqli_real_query, arginfo_mysqli_query) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_reap_async_query, NULL) + PHP_FE(mysqli_reap_async_query, arginfo_mysqli_only_link) #endif - PHP_FE(mysqli_rollback, NULL) - PHP_FE(mysqli_select_db, NULL) + PHP_FE(mysqli_rollback, arginfo_mysqli_only_link) + PHP_FE(mysqli_select_db, arginfo_mysqli_select_db) #ifdef HAVE_MYSQLI_SET_CHARSET - PHP_FE(mysqli_set_charset, NULL) + PHP_FE(mysqli_set_charset, arginfo_mysqli_set_charset) #endif - PHP_FE(mysqli_stmt_attr_get, NULL) - PHP_FE(mysqli_stmt_attr_set, NULL) - PHP_FE(mysqli_stmt_field_count, NULL) - PHP_FE(mysqli_stmt_init, NULL) - PHP_FE(mysqli_stmt_prepare, NULL) - PHP_FE(mysqli_stmt_result_metadata, NULL) - PHP_FE(mysqli_stmt_send_long_data, NULL) - PHP_FE(mysqli_stmt_bind_param, third_arg_force_by_ref_rest) - PHP_FE(mysqli_stmt_bind_result, second_arg_force_by_ref_rest) - PHP_FE(mysqli_stmt_fetch, NULL) - PHP_FE(mysqli_stmt_free_result, NULL) + PHP_FE(mysqli_stmt_affected_rows, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_attr_get, arginfo_mysqli_stmt_attr_get) + PHP_FE(mysqli_stmt_attr_set, arginfo_mysqli_stmt_attr_set) + PHP_FE(mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) + PHP_FE(mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) + PHP_FE(mysqli_stmt_close, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_data_seek, arginfo_mysqli_stmt_data_seek) + PHP_FE(mysqli_stmt_errno, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_error, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_fetch, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_field_count, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_free_result, arginfo_mysqli_only_statement) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_stmt_get_result, NULL) + PHP_FE(mysqli_stmt_get_result, arginfo_mysqli_only_statement) #endif - PHP_FE(mysqli_stmt_get_warnings, NULL) - PHP_FE(mysqli_stmt_insert_id, NULL) - PHP_FE(mysqli_stmt_reset, NULL) - PHP_FE(mysqli_stmt_param_count, NULL) - PHP_FE(mysqli_sqlstate, NULL) -#if !defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_ssl_set, NULL) -#endif - PHP_FE(mysqli_stat, NULL) - PHP_FE(mysqli_stmt_affected_rows, NULL) - PHP_FE(mysqli_stmt_close, NULL) - PHP_FE(mysqli_stmt_data_seek, NULL) - PHP_FE(mysqli_stmt_errno, NULL) - PHP_FE(mysqli_stmt_error, NULL) + PHP_FE(mysqli_stmt_get_warnings, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_init, arginfo_mysqli_only_link) + PHP_FE(mysqli_stmt_insert_id, arginfo_mysqli_only_statement) #if defined(MYSQLI_USE_MYSQLND) - PHP_FE(mysqli_stmt_more_results, NULL) - PHP_FE(mysqli_stmt_next_result, NULL) + PHP_FE(mysqli_stmt_more_results, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_next_result, arginfo_mysqli_only_statement) #endif - PHP_FE(mysqli_stmt_num_rows, NULL) - PHP_FE(mysqli_stmt_sqlstate, NULL) - PHP_FE(mysqli_stmt_store_result, NULL) - PHP_FE(mysqli_store_result, NULL) - PHP_FE(mysqli_thread_id, NULL) - PHP_FE(mysqli_thread_safe, NULL) - PHP_FE(mysqli_use_result, NULL) - PHP_FE(mysqli_warning_count, NULL) + PHP_FE(mysqli_stmt_num_rows, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_param_count, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_prepare, arginfo_mysqli_stmt_prepare) + PHP_FE(mysqli_stmt_reset, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_result_metadata, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_send_long_data, arginfo_mysqli_stmt_send_long_data) + PHP_FE(mysqli_stmt_store_result, arginfo_mysqli_only_statement) + PHP_FE(mysqli_stmt_sqlstate, arginfo_mysqli_only_statement) + PHP_FE(mysqli_sqlstate, arginfo_mysqli_only_link) + PHP_FE(mysqli_ssl_set, arginfo_mysqli_ssl_set) + PHP_FE(mysqli_stat, arginfo_mysqli_only_link) + PHP_FE(mysqli_store_result, arginfo_mysqli_only_link) + PHP_FE(mysqli_thread_id, arginfo_mysqli_only_link) + PHP_FE(mysqli_thread_safe, arginfo_mysqli_no_params) + PHP_FE(mysqli_use_result, arginfo_mysqli_only_link) + PHP_FE(mysqli_warning_count, arginfo_mysqli_only_link) - PHP_FE(mysqli_refresh, NULL) + PHP_FE(mysqli_refresh, arginfo_mysqli_refresh) /* Aliases */ - PHP_FALIAS(mysqli_bind_param, mysqli_stmt_bind_param, third_arg_force_by_ref_rest) - PHP_FALIAS(mysqli_bind_result, mysqli_stmt_bind_result, second_arg_force_by_ref_rest) + PHP_FALIAS(mysqli_bind_param, mysqli_stmt_bind_param, arginfo_mysqli_stmt_bind_param) + PHP_FALIAS(mysqli_bind_result, mysqli_stmt_bind_result, arginfo_mysqli_stmt_bind_result) PHP_FALIAS(mysqli_client_encoding, mysqli_character_set_name, NULL) - PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, NULL) + PHP_FALIAS(mysqli_escape_string, mysqli_real_escape_string, arginfo_mysqli_query) PHP_FALIAS(mysqli_fetch, mysqli_stmt_fetch, NULL) PHP_FALIAS(mysqli_param_count, mysqli_stmt_param_count, NULL) - PHP_FALIAS(mysqli_get_metadata, mysqli_stmt_result_metadata, NULL) + PHP_FALIAS(mysqli_get_metadata, mysqli_stmt_result_metadata,NULL) PHP_FALIAS(mysqli_send_long_data, mysqli_stmt_send_long_data, NULL) PHP_FALIAS(mysqli_set_opt, mysqli_options, NULL) @@ -200,61 +475,58 @@ const zend_function_entry mysqli_functions[] = { * Every user visible function must have an entry in mysqli_functions[]. */ const zend_function_entry mysqli_link_methods[] = { - PHP_FALIAS(autocommit,mysqli_autocommit,NULL) - PHP_FALIAS(change_user,mysqli_change_user,NULL) - PHP_FALIAS(character_set_name, mysqli_character_set_name,NULL) - PHP_FALIAS(client_encoding, mysqli_character_set_name,NULL) - PHP_FALIAS(close,mysqli_close,NULL) - PHP_FALIAS(commit,mysqli_commit,NULL) - PHP_FALIAS(connect,mysqli_connect,NULL) - PHP_FALIAS(dump_debug_info,mysqli_dump_debug_info,NULL) - PHP_FALIAS(debug,mysqli_debug,NULL) + PHP_FALIAS(autocommit, mysqli_autocommit, arginfo_class_mysqli_autocommit) + PHP_FALIAS(change_user,mysqli_change_user, arginfo_class_mysqli_change_user) + PHP_FALIAS(character_set_name, mysqli_character_set_name, arginfo_mysqli_no_params) + PHP_FALIAS(client_encoding, mysqli_character_set_name, arginfo_mysqli_no_params) /* deprecated */ + PHP_FALIAS(close, mysqli_close, arginfo_mysqli_no_params) + PHP_FALIAS(commit, mysqli_commit, arginfo_mysqli_no_params) + PHP_FALIAS(connect, mysqli_connect, arginfo_mysqli_connect) + PHP_FALIAS(dump_debug_info, mysqli_dump_debug_info, arginfo_mysqli_no_params) + PHP_FALIAS(debug, mysqli_debug, arginfo_mysqli_debug) #ifdef HAVE_MYSQLI_GET_CHARSET - PHP_FALIAS(get_charset,mysqli_get_charset,NULL) + PHP_FALIAS(get_charset, mysqli_get_charset, arginfo_mysqli_no_params) #endif - PHP_FALIAS(get_client_info,mysqli_get_client_info,NULL) + PHP_FALIAS(get_client_info, mysqli_get_client_info, arginfo_mysqli_no_params) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(get_connection_stats,mysqli_get_connection_stats,NULL) + PHP_FALIAS(get_connection_stats, mysqli_get_connection_stats, arginfo_mysqli_no_params) #endif - PHP_FALIAS(get_server_info,mysqli_get_server_info,NULL) - PHP_FALIAS(get_warnings, mysqli_get_warnings, NULL) - PHP_FALIAS(init,mysqli_init,NULL) - PHP_FALIAS(kill,mysqli_kill,NULL) + PHP_FALIAS(get_server_info, mysqli_get_server_info, arginfo_mysqli_no_params) + PHP_FALIAS(get_warnings, mysqli_get_warnings, arginfo_mysqli_no_params) + PHP_FALIAS(init,mysqli_init, arginfo_mysqli_no_params) + PHP_FALIAS(kill,mysqli_kill, arginfo_class_mysqli_kill) #if !defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(set_local_infile_default,mysqli_set_local_infile_default,NULL) - PHP_FALIAS(set_local_infile_handler,mysqli_set_local_infile_handler,NULL) + PHP_FALIAS(set_local_infile_default, mysqli_set_local_infile_default, arginfo_mysqli_no_params) + PHP_FALIAS(set_local_infile_handler, mysqli_set_local_infile_handler, arginfo_class_mysqli_set_local_infile_handler) #endif - PHP_FALIAS(multi_query,mysqli_multi_query,NULL) - PHP_FALIAS(mysqli,mysqli_link_construct,NULL) - PHP_FALIAS(more_results,mysqli_more_results, NULL) - PHP_FALIAS(next_result, mysqli_next_result, NULL) - PHP_FALIAS(options,mysqli_options,NULL) - PHP_FALIAS(ping,mysqli_ping,NULL) - PHP_FALIAS(prepare,mysqli_prepare,NULL) - PHP_FALIAS(query,mysqli_query,NULL) - PHP_FALIAS(real_connect,mysqli_real_connect,NULL) - PHP_FALIAS(real_escape_string,mysqli_real_escape_string,NULL) + PHP_FALIAS(multi_query, mysqli_multi_query, arginfo_class_mysqli_query) + PHP_FALIAS(mysqli, mysqli_link_construct, arginfo_mysqli_connect) + PHP_FALIAS(more_results, mysqli_more_results, arginfo_mysqli_no_params) + PHP_FALIAS(next_result, mysqli_next_result, arginfo_mysqli_no_params) + PHP_FALIAS(options, mysqli_options, arginfo_class_mysqli_options) + PHP_FALIAS(ping, mysqli_ping, arginfo_mysqli_no_params) + PHP_FALIAS(prepare, mysqli_prepare, arginfo_class_mysqli_query) + PHP_FALIAS(query, mysqli_query, arginfo_class_mysqli_query) + PHP_FALIAS(real_connect, mysqli_real_connect, arginfo_class_mysqli_real_connect) + PHP_FALIAS(real_escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(poll,mysqli_poll,NULL) - PHP_FALIAS(reap_async_query,mysqli_reap_async_query,NULL) + PHP_FALIAS(reap_async_query, mysqli_reap_async_query, arginfo_mysqli_no_params) #endif - PHP_FALIAS(escape_string, mysqli_real_escape_string,NULL) - PHP_FALIAS(real_query,mysqli_real_query,NULL) - PHP_FALIAS(rollback,mysqli_rollback,NULL) - PHP_FALIAS(select_db,mysqli_select_db,NULL) + PHP_FALIAS(escape_string, mysqli_real_escape_string, arginfo_class_mysqli_real_escape_string) + PHP_FALIAS(real_query, mysqli_real_query, arginfo_class_mysqli_query) + PHP_FALIAS(rollback,mysqli_rollback, arginfo_mysqli_no_params) + PHP_FALIAS(select_db,mysqli_select_db, arginfo_class_mysqli_select_db) #ifdef HAVE_MYSQLI_SET_CHARSET - PHP_FALIAS(set_charset,mysqli_set_charset,NULL) -#endif - PHP_FALIAS(set_opt, mysqli_options,NULL) -#if !defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(ssl_set,mysqli_ssl_set,NULL) + PHP_FALIAS(set_charset, mysqli_set_charset, arginfo_class_mysqli_set_charset) #endif - PHP_FALIAS(stat,mysqli_stat,NULL) - PHP_FALIAS(stmt_init,mysqli_stmt_init, NULL) - PHP_FALIAS(store_result,mysqli_store_result,NULL) - PHP_FALIAS(thread_safe,mysqli_thread_safe,NULL) - PHP_FALIAS(use_result,mysqli_use_result,NULL) - PHP_FALIAS(refresh,mysqli_refresh,NULL) + PHP_FALIAS(set_opt, mysqli_options, arginfo_class_mysqli_options) + PHP_FALIAS(ssl_set, mysqli_ssl_set, arginfo_class_mysqli_ssl_set) + PHP_FALIAS(stat, mysqli_stat, arginfo_mysqli_no_params) + PHP_FALIAS(stmt_init, mysqli_stmt_init, arginfo_mysqli_no_params) + PHP_FALIAS(store_result, mysqli_store_result, arginfo_mysqli_no_params) + PHP_FALIAS(thread_safe, mysqli_thread_safe, arginfo_mysqli_no_params) + PHP_FALIAS(use_result, mysqli_use_result, arginfo_mysqli_no_params) + PHP_FALIAS(refresh,mysqli_refresh, arginfo_class_mysqli_refresh) {NULL, NULL, NULL} }; /* }}} */ @@ -265,21 +537,21 @@ const zend_function_entry mysqli_link_methods[] = { */ const zend_function_entry mysqli_result_methods[] = { PHP_FALIAS(__construct, mysqli_result_construct, NULL) - PHP_FALIAS(close,mysqli_free_result,NULL) - PHP_FALIAS(free,mysqli_free_result,NULL) - PHP_FALIAS(data_seek,mysqli_data_seek,NULL) - PHP_FALIAS(fetch_field,mysqli_fetch_field,NULL) - PHP_FALIAS(fetch_fields,mysqli_fetch_fields,NULL) - PHP_FALIAS(fetch_field_direct,mysqli_fetch_field_direct,NULL) + PHP_FALIAS(close, mysqli_free_result, arginfo_mysqli_no_params) + PHP_FALIAS(free, mysqli_free_result, arginfo_mysqli_no_params) + PHP_FALIAS(data_seek, mysqli_data_seek, arginfo_class_mysqli_data_seek) + PHP_FALIAS(fetch_field, mysqli_fetch_field, arginfo_mysqli_no_params) + PHP_FALIAS(fetch_fields, mysqli_fetch_fields, arginfo_mysqli_no_params) + PHP_FALIAS(fetch_field_direct, mysqli_fetch_field_direct, arginfo_class_mysqli_result_and_fieldnr) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(fetch_all,mysqli_fetch_all,NULL) + PHP_FALIAS(fetch_all, mysqli_fetch_all, arginfo_mysqli_no_params) #endif - PHP_FALIAS(fetch_array,mysqli_fetch_array,NULL) - PHP_FALIAS(fetch_assoc,mysqli_fetch_assoc,NULL) - PHP_FALIAS(fetch_object,mysqli_fetch_object,NULL) - PHP_FALIAS(fetch_row,mysqli_fetch_row,NULL) - PHP_FALIAS(field_seek,mysqli_field_seek,NULL) - PHP_FALIAS(free_result,mysqli_free_result,NULL) + PHP_FALIAS(fetch_array, mysqli_fetch_array, arginfo_class_mysqli_fetch_array) + PHP_FALIAS(fetch_assoc, mysqli_fetch_assoc, arginfo_mysqli_no_params) + PHP_FALIAS(fetch_object,mysqli_fetch_object, arginfo_class_mysqli_fetch_object) + PHP_FALIAS(fetch_row, mysqli_fetch_row, arginfo_mysqli_no_params) + PHP_FALIAS(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_and_fieldnr) + PHP_FALIAS(free_result, mysqli_free_result, arginfo_mysqli_no_params) {NULL, NULL, NULL} }; /* }}} */ @@ -290,29 +562,28 @@ const zend_function_entry mysqli_result_methods[] = { */ const zend_function_entry mysqli_stmt_methods[] = { PHP_FALIAS(__construct, mysqli_stmt_construct, NULL) - PHP_FALIAS(attr_get,mysqli_stmt_attr_get,NULL) - PHP_FALIAS(attr_set,mysqli_stmt_attr_set,NULL) - PHP_FALIAS(bind_param,mysqli_stmt_bind_param,second_arg_force_by_ref_rest) - PHP_FALIAS(bind_result,mysqli_stmt_bind_result,all_args_force_by_ref) - PHP_FALIAS(close,mysqli_stmt_close,NULL) - PHP_FALIAS(data_seek,mysqli_stmt_data_seek,NULL) - PHP_FALIAS(execute,mysqli_stmt_execute,NULL) - PHP_FALIAS(fetch,mysqli_stmt_fetch,NULL) - PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, NULL) - PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata,NULL) + PHP_FALIAS(attr_get, mysqli_stmt_attr_get, arginfo_class_mysqli_stmt_attr_get) + PHP_FALIAS(attr_set,mysqli_stmt_attr_set, arginfo_class_mysqli_stmt_attr_set) + PHP_FALIAS(bind_param,mysqli_stmt_bind_param, arginfo_class_mysqli_stmt_bind_param) + PHP_FALIAS(bind_result,mysqli_stmt_bind_result, arginfo_class_mysqli_stmt_bind_result) + PHP_FALIAS(close, mysqli_stmt_close, arginfo_mysqli_no_params) + PHP_FALIAS(data_seek, mysqli_stmt_data_seek, arginfo_class_mysqli_data_seek) + PHP_FALIAS(execute, mysqli_stmt_execute, arginfo_mysqli_no_params) + PHP_FALIAS(fetch, mysqli_stmt_fetch, arginfo_mysqli_no_params) + PHP_FALIAS(get_warnings, mysqli_stmt_get_warnings, arginfo_mysqli_no_params) + PHP_FALIAS(result_metadata, mysqli_stmt_result_metadata, arginfo_mysqli_no_params) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(more_results, mysqli_stmt_more_results,NULL) - PHP_FALIAS(next_result, mysqli_stmt_next_result,NULL) + PHP_FALIAS(more_results, mysqli_stmt_more_results, arginfo_mysqli_no_params) + PHP_FALIAS(next_result, mysqli_stmt_next_result, arginfo_mysqli_no_params) #endif - PHP_FALIAS(num_rows, mysqli_stmt_num_rows,NULL) - PHP_FALIAS(send_long_data,mysqli_stmt_send_long_data,NULL) - PHP_FALIAS(stmt,mysqli_prepare,NULL) - PHP_FALIAS(free_result,mysqli_stmt_free_result,NULL) - PHP_FALIAS(reset,mysqli_stmt_reset,NULL) - PHP_FALIAS(prepare,mysqli_stmt_prepare, NULL) - PHP_FALIAS(store_result,mysqli_stmt_store_result,NULL) + PHP_FALIAS(num_rows, mysqli_stmt_num_rows, arginfo_mysqli_no_params) + PHP_FALIAS(send_long_data, mysqli_stmt_send_long_data, arginfo_class_mysqli_stmt_send_long_data) + PHP_FALIAS(free_result, mysqli_stmt_free_result, arginfo_mysqli_no_params) + PHP_FALIAS(reset, mysqli_stmt_reset, arginfo_mysqli_no_params) + PHP_FALIAS(prepare, mysqli_stmt_prepare, arginfo_class_mysqli_query) + PHP_FALIAS(store_result, mysqli_stmt_store_result, arginfo_mysqli_no_params) #if defined(MYSQLI_USE_MYSQLND) - PHP_FALIAS(get_result,mysqli_stmt_get_result,NULL) + PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params) #endif {NULL, NULL, NULL} }; diff --git a/ext/mysqli/mysqli_libmysql.h b/ext/mysqli/mysqli_libmysql.h index 84fb7c81a..8e0c735b1 100644 --- a/ext/mysqli/mysqli_libmysql.h +++ b/ext/mysqli/mysqli_libmysql.h @@ -31,6 +31,7 @@ #define mysqli_result_is_unbuffered(r) ((r)->handle && (r)->handle->status == MYSQL_STATUS_USE_RESULT) #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) #define mysqli_stmt_server_status(s) (s)->mysql->server_status #define mysqli_stmt_get_connection(s) (s)->mysql diff --git a/ext/mysqli/mysqli_mysqlnd.h b/ext/mysqli/mysqli_mysqlnd.h index 1468ef224..3072835c5 100644 --- a/ext/mysqli/mysqli_mysqlnd.h +++ b/ext/mysqli/mysqli_mysqlnd.h @@ -32,9 +32,10 @@ #define mysqli_result_is_unbuffered(r) ((r)->unbuf) #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)) -#define mysqli_stmt_server_status(s) (s)->upsert_status.server_status -#define mysqli_stmt_get_connection(s) (s)->conn +#define mysqli_stmt_server_status(s) mysqlnd_stmt_server_status((s)) +#define mysqli_stmt_get_connection(s) (s)->data->conn #define mysqli_close(c, how) mysqlnd_close((c), (how)) #define mysqli_stmt_close(c, implicit) mysqlnd_stmt_close((c), (implicit)) #define mysqli_free_result(r, implicit) mysqlnd_free_result((r), (implicit)) diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index c2d9fa2f3..7575bd9c9 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_nonapi.c 294543 2010-02-04 20:28:55Z johannes $ + $Id: mysqli_nonapi.c 299771 2010-05-26 07:28:43Z andrey $ */ #ifdef HAVE_CONFIG_H @@ -69,6 +69,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne zend_bool new_connection = FALSE; zend_rsrc_list_entry *le; mysqli_plist_entry *plist = NULL; + zend_bool self_alloced = 0; #if !defined(MYSQL_USE_MYSQLND) @@ -99,6 +100,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne } if (!mysql) { mysql = (MY_MYSQL *) ecalloc(1, sizeof(MY_MYSQL)); + self_alloced = 1; } flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */ } else { @@ -110,7 +112,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne } mysqli_resource = ((mysqli_object *) zend_object_store_get_object(object TSRMLS_CC))->ptr; - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &object, "mysqli_link", MYSQLI_STATUS_INITIALIZED); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &object, MYSQLI_STATUS_INITIALIZED); /* set some required options */ flags |= CLIENT_MULTI_RESULTS; /* needed for mysql_multi_query() */ @@ -122,7 +124,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne } if (mysql->mysql && mysqli_resource && mysqli_resource->status > MYSQLI_STATUS_INITIALIZED) { /* already connected, we should close the connection */ - php_mysqli_close(mysql, MYSQLI_CLOSE_IMPLICIT TSRMLS_CC); + php_mysqli_close(mysql, MYSQLI_CLOSE_IMPLICIT, mysqli_resource->status TSRMLS_CC); } if (!socket_len || !socket) { @@ -197,11 +199,11 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne } } } - if (MyG(max_links) != -1 && MyG(num_links) >= MyG(max_links)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Too many open links (%ld)", MyG(num_links)); goto err; } + if (persistent && MyG(max_persistent) != -1 && (MyG(num_active_persistent) + MyG(num_inactive_persistent))>= MyG(max_persistent)) { @@ -243,6 +245,7 @@ void mysqli_common_connect(INTERNAL_FUNCTION_PARAMETERS, zend_bool is_real_conne if (!is_real_connect) { /* free mysql structure */ mysqli_close(mysql->mysql, MYSQLI_CLOSE_DISCONNECTED); + mysql->mysql = NULL; } goto err; } @@ -292,7 +295,7 @@ err: mysql->hash_key = NULL; mysql->persistent = FALSE; } - if (!is_real_connect) { + if (!is_real_connect && self_alloced) { efree(mysql); } RETVAL_FALSE; @@ -342,25 +345,7 @@ PHP_FUNCTION(mysqli_connect_error) Fetch a result row as an associative array, a numeric array, or both */ PHP_FUNCTION(mysqli_fetch_array) { -#if !defined(MYSQLI_USE_MYSQLND) php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - long mode = MYSQLND_FETCH_BOTH; - - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l", &mysql_result, mysqli_result_class_entry, &mode) == FAILURE) { - return; - } - MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result", MYSQLI_STATUS_VALID); - - if (mode < MYSQLI_ASSOC || mode > MYSQLI_BOTH) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "The result type should be either MYSQLI_NUM, MYSQLI_ASSOC or MYSQLI_BOTH"); - RETURN_FALSE; - } - - mysqlnd_fetch_into(result, mode, return_value, MYSQLND_MYSQLI); -#endif } /* }}} */ @@ -368,19 +353,7 @@ PHP_FUNCTION(mysqli_fetch_array) Fetch a result row as an associative array */ PHP_FUNCTION(mysqli_fetch_assoc) { -#if !defined(MYSQLI_USE_MYSQLND) php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQLI_ASSOC, 0); -#else - MYSQL_RES *result; - zval *mysql_result; - - if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_result, mysqli_result_class_entry) == FAILURE) { - return; - } - MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, &mysql_result, "mysqli_result", MYSQLI_STATUS_VALID); - mysqlnd_fetch_into(result, MYSQLND_FETCH_ASSOC, return_value, MYSQLND_MYSQLI); - -#endif } /* }}} */ @@ -445,7 +418,7 @@ PHP_FUNCTION(mysqli_get_connection_stats) &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); mysqlnd_get_connection_stats(mysql->mysql, return_value); } @@ -458,7 +431,6 @@ PHP_FUNCTION(mysqli_get_connection_stats) PHP_FUNCTION(mysqli_fetch_object) { php_mysqli_fetch_into_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, MYSQLI_ASSOC, 1); -/* todo: mysqlnd support */ } /* }}} */ @@ -474,7 +446,7 @@ PHP_FUNCTION(mysqli_multi_query) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &query, &query_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); MYSQLI_ENABLE_MQ; if (mysql_real_query(mysql->mysql, query, query_len)) { @@ -530,7 +502,7 @@ PHP_FUNCTION(mysqli_query) RETURN_FALSE; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); MYSQLI_DISABLE_MQ; @@ -778,7 +750,7 @@ PHP_FUNCTION(mysqli_reap_async_query) return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (FAIL == mysqlnd_reap_async_query(mysql->mysql)) { RETURN_FALSE; @@ -831,7 +803,7 @@ PHP_FUNCTION(mysqli_stmt_get_result) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_stmt, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &mysql_stmt, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &mysql_stmt, MYSQLI_STATUS_VALID); if (!(result = mysqlnd_stmt_get_result(stmt->stmt))) { MYSQLI_REPORT_STMT_ERROR(stmt->stmt); @@ -858,7 +830,7 @@ PHP_FUNCTION(mysqli_get_warnings) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql_warning_count(mysql->mysql)) { w = php_get_warnings(mysql->mysql TSRMLS_CC); @@ -883,7 +855,7 @@ PHP_FUNCTION(mysqli_stmt_get_warnings) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &stmt_link, mysqli_stmt_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT*, &stmt_link, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &stmt_link, MYSQLI_STATUS_VALID); if (mysqli_stmt_warning_count(stmt->stmt)) { w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt) TSRMLS_CC); @@ -910,7 +882,7 @@ PHP_FUNCTION(mysqli_set_charset) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os", &mysql_link, mysqli_link_class_entry, &cs_name, &csname_len) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); if (mysql_set_character_set(mysql->mysql, cs_name)) { RETURN_FALSE; @@ -938,7 +910,7 @@ PHP_FUNCTION(mysqli_get_charset) if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &mysql_link, MYSQLI_STATUS_VALID); object_init(return_value); diff --git a/ext/mysqli/mysqli_prop.c b/ext/mysqli/mysqli_prop.c index fdb304562..2578a5446 100644 --- a/ext/mysqli/mysqli_prop.c +++ b/ext/mysqli/mysqli_prop.c @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: mysqli_prop.c 293036 2010-01-03 09:23:27Z sebastian $ + $Id: mysqli_prop.c 296270 2010-03-16 12:36:57Z andrey $ */ #ifdef HAVE_CONFIG_H @@ -266,7 +266,7 @@ static int stmt_id_read(mysqli_object *obj, zval **retval TSRMLS_DC) if (!p) { ZVAL_NULL(*retval); } else { - ZVAL_LONG(*retval, p->stmt->stmt_id); + ZVAL_LONG(*retval, mysqli_stmt_get_id(p->stmt)); } return SUCCESS; } diff --git a/ext/mysqli/mysqli_warning.c b/ext/mysqli/mysqli_warning.c index 80c26eb0d..2236db926 100644 --- a/ext/mysqli/mysqli_warning.c +++ b/ext/mysqli/mysqli_warning.c @@ -280,11 +280,11 @@ PHP_METHOD(mysqli_warning, __construct) if (obj->zo.ce == mysqli_link_class_entry) { MY_MYSQL *mysql; - MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL *, &z, "mysqli_link", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_CONN(mysql, &z, MYSQLI_STATUS_VALID); hdl = mysql->mysql; } else if (obj->zo.ce == mysqli_stmt_class_entry) { MY_STMT *stmt; - MYSQLI_FETCH_RESOURCE(stmt, MY_STMT *, &z, "mysqli_stmt", MYSQLI_STATUS_VALID); + MYSQLI_FETCH_RESOURCE_STMT(stmt, &z, MYSQLI_STATUS_VALID); hdl = mysqli_stmt_get_connection(stmt->stmt); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid class argument"); diff --git a/ext/mysqli/php_mysqli_structs.h b/ext/mysqli/php_mysqli_structs.h index beecf01cc..4a7b40c5c 100644 --- a/ext/mysqli/php_mysqli_structs.h +++ b/ext/mysqli/php_mysqli_structs.h @@ -15,7 +15,7 @@ | Author: Georg Richter <georg@php.net> | +----------------------------------------------------------------------+ - $Id: php_mysqli_structs.h 294543 2010-02-04 20:28:55Z johannes $ + $Id: php_mysqli_structs.h 300436 2010-06-14 18:19:13Z andrey $ */ #ifndef PHP_MYSQLI_STRUCTS_H @@ -40,8 +40,44 @@ #include "ext/mysqlnd/mysqlnd.h" #include "mysqli_mysqlnd.h" #else + +/* + The libmysql headers (a PITA) also define it and there will be an warning. + Undef it and later we might need to define it again. +*/ +#ifdef HAVE_MBRLEN +#undef HAVE_MBRLEN +#define WE_HAD_MBRLEN +#endif +#ifdef HAVE_MBSTATE_T +#undef HAVE_MBSTATE_T +#define WE_HAD_MBSTATE_T +#endif + +#include <my_global.h> + +#if !defined(HAVE_MBRLEN) && defined(WE_HAD_MBRLEN) +#define HAVE_MBRLEN 1 +#endif + +#if !defined(HAVE_MBSTATE_T) && defined(WE_HAD_MBSTATE_T) +#define HAVE_MBSTATE_T 1 +#endif + +/* + We need more than mysql.h because we need CHARSET_INFO in one place. + This order has been borrowed from the ODBC driver. Nothing can be removed + from the list of headers :( +*/ + +#include <my_sys.h> #include <mysql.h> #include <errmsg.h> +#include <my_list.h> +#include <m_string.h> +#include <mysqld_error.h> +#include <my_list.h> +#include <m_ctype.h> #include "mysqli_libmysql.h" #endif @@ -215,7 +251,7 @@ extern zend_class_entry *mysqli_exception_class_entry; extern int php_le_pmysqli(void); extern void php_mysqli_dtor_p_elements(void *data); -extern void php_mysqli_close(MY_MYSQL * mysql, int close_type TSRMLS_DC); +extern void php_mysqli_close(MY_MYSQL * mysql, int close_type, int resource_status TSRMLS_DC); #ifdef HAVE_SPL @@ -275,6 +311,27 @@ PHP_MYSQLI_EXPORT(zend_object_value) mysqli_objects_new(zend_class_entry * TSRML }\ } +#define MYSQLI_FETCH_RESOURCE_CONN(__ptr, __id, __check) \ +{ \ + MYSQLI_FETCH_RESOURCE((__ptr), MY_MYSQL *, (__id), "mysqli_link", (__check)); \ + if (!(__ptr)->mysql) { \ + mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid object or resource %s\n", intern->zo.ce->name); \ + RETURN_NULL();\ + } \ +} + +#define MYSQLI_FETCH_RESOURCE_STMT(__ptr, __id, __check) \ +{ \ + MYSQLI_FETCH_RESOURCE((__ptr), MY_STMT *, (__id), "mysqli_stmt", (__check)); \ + if (!(__ptr)->stmt) { \ + mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "invalid object or resource %s\n", intern->zo.ce->name); \ + RETURN_NULL();\ + } \ +} + + #define MYSQLI_SET_STATUS(__id, __value) \ { \ mysqli_object *intern = (mysqli_object *)zend_object_store_get_object(*(__id) TSRMLS_CC);\ diff --git a/ext/mysqli/tests/bug34810.phpt b/ext/mysqli/tests/bug34810.phpt index 998d9f015..35eb71753 100644 --- a/ext/mysqli/tests/bug34810.phpt +++ b/ext/mysqli/tests/bug34810.phpt @@ -24,7 +24,24 @@ class DbConnection { $mysql->query("CREATE TABLE test_warnings (a int not null)"); $mysql->query("SET sql_mode=''"); $mysql->query("INSERT INTO test_warnings VALUES (1),(2),(NULL)"); - var_dump($mysql->get_warnings()); + + $warning = $mysql->get_warnings(); + if (!$warning) + printf("[001] No warning!\n"); + + if ($warning->errno == 1048 || $warning->errno == 1253) { + /* 1048 - Column 'a' cannot be null, 1263 - Data truncated; NULL supplied to NOT NULL column 'a' at row */ + if ("HY000" != $warning->sqlstate) + printf("[003] Wrong sql state code: %s\n", $warning->sqlstate); + + if ("" == $warning->message) + printf("[004] Message string must not be empty\n"); + + + } else { + printf("[002] Empty error message!\n"); + var_dump($warning); + } } } @@ -117,12 +134,4 @@ object(mysqli)#%d (%d) { [%u|b%"warning_count"]=> NULL } -object(mysqli_warning)#%d (%d) { - [%u|b%"message"]=> - %unicode|string%(25) "Column 'a' cannot be null" - [%u|b%"sqlstate"]=> - %unicode|string%(5) "HY000" - [%u|b%"errno"]=> - int(1048) -} Done diff --git a/ext/mysqli/tests/bug35759.phpt b/ext/mysqli/tests/bug35759.phpt index cbceb3b42..bcf9cb8e6 100644 --- a/ext/mysqli/tests/bug35759.phpt +++ b/ext/mysqli/tests/bug35759.phpt @@ -8,53 +8,51 @@ require_once('skipifconnectfailure.inc'); --FILE-- <?php -$sql=<<<EOSQL -CREATE TABLE blobby ( - a1 MEDIUMBLOB NOT NULL, - - -EOSQL; require_once("connect.inc"); $col_num= 1000; $mysql = new mysqli($host, $user, $passwd, $db, $port, $socket); - $mysql->query("DROP TABLE IF EXISTS blobby"); - $create = "CREATE TABLE blobby (a0 MEDIUMBLOB NOT NULL DEFAULT ''"; + $mysql->query("DROP TABLE IF EXISTS test"); + $create = "CREATE TABLE test (a0 MEDIUMBLOB NOT NULL DEFAULT ''"; $i= 0; while (++$i < $col_num) { $create .= ", a$i MEDIUMBLOB NOT NULL DEFAULT ''"; } - $create .= ")"; + $create .= ")"; + + if (!$mysql->query($create)) { + if (1101 == $mysql->errno) { + /* SQL strict mode - [1101] BLOB/TEXT column 'a0' can't have a default value */ + print "done!"; + exit(0); + } + printf("[001] [%d] %s\n", $mysql->errno, $mysql->error); + } - $mysql->query($create); - $mysql->query("INSERT INTO blobby (a0) VALUES ('')"); + if (!$mysql->query("INSERT INTO test (a0) VALUES ('')")) + printf("[002] [%d] %s\n", $mysql->errno, $mysql->error); - $stmt = $mysql->prepare("SELECT * FROM blobby"); - $stmt->execute(); - $stmt->store_result(); - for ($i = 0; $i < $col_num; $i++) { - $params[] = &$col_num; - } - call_user_func_array(array($stmt, "bind_result"), $params); - $stmt->fetch(); + $stmt = $mysql->prepare("SELECT * FROM test"); + if ($stmt) { - $stmt->close(); + $stmt->execute(); + $stmt->store_result(); + for ($i = 0; $i < $col_num; $i++) { + $params[] = &$col_num; + } + call_user_func_array(array($stmt, "bind_result"), $params); + $stmt->fetch(); - $mysql->query("DROP TABLE blobby"); + $stmt->close(); + } else { + printf("[003] [%d] %s\n", $mysql->errno, $mysql->error); + } $mysql->close(); - echo "OK\n"; -?> ---CLEAN-- -<?php -require_once("connect.inc"); -if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) - printf("[c001] [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); -if (!mysqli_query($link, "DROP TABLE IF EXISTS blobby")) - printf("[c002] Cannot drop table, [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - -mysqli_close($link); + echo "done!"; ?> +--CLEAN-- +<?php require("clean_table.inc"); ?> --EXPECT-- -OK +done!
\ No newline at end of file diff --git a/ext/mysqli/tests/bug48909.phpt b/ext/mysqli/tests/bug48909.phpt index 81df54419..76901390c 100644 --- a/ext/mysqli/tests/bug48909.phpt +++ b/ext/mysqli/tests/bug48909.phpt @@ -23,8 +23,15 @@ require_once('skipifconnectfailure.inc'); if (!$stmt->bind_param("bb",$bvar, $bvar)) printf("[004] [%d] %s\n", $stmt->errno, $stmt->error); - if (!$stmt->execute()) - printf("[005] [%d] %s\n", $stmt->errno, $stmt->error); + if (!$stmt->execute()) { + if ($stmt->errno != 1366) { + /* + $bvar is null, b is for BLOB - any error like this should be OK: + 1366 - Incorrect integer value: '' for column 'id' at row 1 + */ + printf("[005] [%d] %s\n", $stmt->errno, $stmt->error); + } + } $stmt->close(); $link->close(); diff --git a/ext/mysqli/tests/bug50772.phpt b/ext/mysqli/tests/bug50772.phpt index 4724d0f29..eecef84ad 100644 --- a/ext/mysqli/tests/bug50772.phpt +++ b/ext/mysqli/tests/bug50772.phpt @@ -12,7 +12,7 @@ require_once('skipifconnectfailure.inc'); // These calls fail $db1->options(MYSQLI_OPT_CONNECT_TIMEOUT, 3); - $db1->real_connect($host, $user, $passwd); + my_mysqli_real_connect($db1, $host, $user, $passwd, $db, $port, $socket); if(mysqli_connect_error()) { echo "error 1\n"; } else { @@ -22,7 +22,7 @@ require_once('skipifconnectfailure.inc'); $db2 = mysqli_init(); $db2->options(MYSQLI_OPT_CONNECT_TIMEOUT, 3); - $db2->real_connect($host, $user, $passwd); + my_mysqli_real_connect($db2, $host, $user, $passwd, $db, $port, $socket); if(mysqli_connect_error()) { echo "error 2\n"; } else { diff --git a/ext/mysqli/tests/bug51605.phpt b/ext/mysqli/tests/bug51605.phpt new file mode 100644 index 000000000..02328a5be --- /dev/null +++ b/ext/mysqli/tests/bug51605.phpt @@ -0,0 +1,44 @@ +--TEST-- +Bug #51605 Mysqli - zombie links +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> +--INI-- +mysqli.max_links = 1 +mysqli.allow_persistent = Off +mysqli.max_persistent = 0 +mysqli.reconnect = Off +--FILE-- +<?php + include ("connect.inc"); + + $link = mysqli_init(); + if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { + printf("[002] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + mysqli_close($link); + echo "closed once\n"; + + $link = mysqli_init(); + if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { + printf("[002] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + mysqli_close($link); + echo "closed twice\n"; + + $link = mysqli_init(); + if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { + printf("[003] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + mysqli_close($link); + echo "closed for third time\n"; + + print "done!"; +?> +--EXPECTF-- +closed once +closed twice +closed for third time +done! diff --git a/ext/mysqli/tests/bug51647.phpt b/ext/mysqli/tests/bug51647.phpt new file mode 100644 index 000000000..833f8edbb --- /dev/null +++ b/ext/mysqli/tests/bug51647.phpt @@ -0,0 +1,52 @@ +--TEST-- +Bug #51647 (Certificate file without private key (pk in another file) doesn't work) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php + include ("connect.inc"); + + if (!is_object($link = mysqli_init())) + printf("[001] Cannot create link\n"); + + $path_to_pems = !$IS_MYSQLND? "ext/mysqli/tests/" : ""; + if (!$link->ssl_set("{$path_to_pems}client-key.pem", "{$path_to_pems}client-cert.pem", "{$path_to_pems}cacert.pem","","")) + printf("[002] [%d] %s\n", $link->errno, $link->error); + + if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { + printf("[003] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!$res = $link->query('SHOW STATUS like "Ssl_cipher"')) { + if (1064 == $link->errno) { + /* ERROR 1064 (42000): You have an error in your SQL syntax; = sql strict mode */ + if ($res = $link->query("SHOW STATUS")) { + while ($row = $res->fetch_assoc()) + if ($row['Variable_name'] == 'Ssl_cipher') + break; + } else { + printf("[005] [%d] %s\n", $link->errno, $link->error); + } + } else { + printf("[004] [%d] %s\n", $link->errno, $link->error); + } + } else { + if (!$row = $res->fetch_assoc()) + printf("[006] [%d] %s\n", $link->errno, $link->error); + } + + var_dump($row); + + print "done!"; +?> +--EXPECTF-- +array(2) { + ["Variable_name"]=> + string(10) "Ssl_cipher" + ["Value"]=> + string(%d) "%S" +} +done! diff --git a/ext/mysqli/tests/bug52082.phpt b/ext/mysqli/tests/bug52082.phpt new file mode 100644 index 000000000..8e3bd59ba --- /dev/null +++ b/ext/mysqli/tests/bug52082.phpt @@ -0,0 +1,50 @@ +--TEST-- +Bug #52082 (character_set_client & character_set_connection reset after mysqli_change_user) +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); +?> +--FILE-- +<?php + require_once("connect.inc"); + $link = mysqli_init(); + $link->options(MYSQLI_SET_CHARSET_NAME, "latin2"); + if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) { + die("can't connect"); + } + var_dump($link->query("show variables like 'character_set_client'")->fetch_row()); + var_dump($link->query("show variables like 'character_set_connection'")->fetch_row()); + $link->change_user($user, $passwd, $db); + var_dump($link->query("show variables like 'character_set_client'")->fetch_row()); + var_dump($link->query("show variables like 'character_set_connection'")->fetch_row()); + + print "done!"; +?> +--EXPECTF-- +array(2) { + [0]=> + string(20) "character_set_client" + [1]=> + string(6) "latin2" +} +array(2) { + [0]=> + string(24) "character_set_connection" + [1]=> + string(6) "latin2" +} +array(2) { + [0]=> + string(20) "character_set_client" + [1]=> + string(6) "latin2" +} +array(2) { + [0]=> + string(24) "character_set_connection" + [1]=> + string(6) "latin2" +} +done!
\ No newline at end of file diff --git a/ext/mysqli/tests/cacert.pem b/ext/mysqli/tests/cacert.pem new file mode 100644 index 000000000..e44341384 --- /dev/null +++ b/ext/mysqli/tests/cacert.pem @@ -0,0 +1,17 @@ +-----BEGIN CERTIFICATE----- +MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV +BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD +VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkxMTQ3MTBaFw0xNTAxMjgxMTQ3MTBaMEQx +CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh +MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA +wQYsOEfrN4ESP3FjsI8cghE+tZVuyK2gck61lwieVxjgFMtBd65mI5a1y9pmlOI1 +yM4SB2Ppqcuw7/e1CdV1y7lvHrGNt5yqEHbN4QX1gvsN8TQauP/2WILturk4R4Hq +rKg0ZySu7f1Xhl0ed9a48LpaEHD17IcxWEGMMJwAxF0CAwEAAaOBpjCBozAMBgNV +HRMEBTADAQH/MB0GA1UdDgQWBBSvktYQ0ahLnyxyVKqty+WpBbBrDTB0BgNVHSME +bTBrgBSvktYQ0ahLnyxyVKqty+WpBbBrDaFIpEYwRDELMAkGA1UEBhMCU0UxEDAO +BgNVBAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FM +IEFCggkAwjvFkqOGsNswDQYJKoZIhvcNAQEEBQADgYEAdKN1PjwMHAKG2Ww1145g +JQGBnKxSFOUaoSvkBi/4ntTM+ysnViWh7WvxyWjR9zU9arfr7aqsDeQxm0XDOqzj +AQ/cQIla2/Li8tXyfc06bisH/IHRaSc2zWqioTKbEwMdVOdrvq4a8V8ic3xYyIWn +7F4WeS07J8LKardSvM0+hOA= +-----END CERTIFICATE----- diff --git a/ext/mysqli/tests/client-cert.pem b/ext/mysqli/tests/client-cert.pem new file mode 100644 index 000000000..ee7f2ab28 --- /dev/null +++ b/ext/mysqli/tests/client-cert.pem @@ -0,0 +1,46 @@ +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 1048577 (0x100001) + Signature Algorithm: md5WithRSAEncryption + Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB + Validity + Not Before: Jan 29 11:50:22 2010 GMT + Not After : Jan 28 11:50:22 2015 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (1024 bit) + Modulus: + 00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed: + 78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8: + a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4: + 9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be: + 15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7: + 87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16: + 8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48: + a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f: + fc:3d:78:9b:49:6e:86:83:77 + Exponent: 65537 (0x10001) + Signature Algorithm: md5WithRSAEncryption + 5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0: + 34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81: + c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99: + 01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b: + 89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77: + 02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee: + 02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35: + 32:0b +-----BEGIN CERTIFICATE----- +MIIB5zCCAVACAxAAATANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G +A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg +QUIwHhcNMTAwMTI5MTE1MDIyWhcNMTUwMTI4MTE1MDIyWjAyMQswCQYDVQQGEwJT +RTEQMA4GA1UECBMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwgQUIwgZ8wDQYJKoZI +hvcNAQEBBQADgY0AMIGJAoGBAMyaN0kTZtzP4wsToSPteNtOvRH2jA12+aMyVpr4 +oSFqVU5NP+ZnnSaZss2kmtIrWVzXitNgaPgYvcW+FeEqPKPUYcv1EZQXgYH3h4z2 +atLu2OZ39mJmTS4WjQiBSsnGSzHluceKhJZIp0eMDSaQVk7mpW6Ms/Kf/D14m0lu +hoN3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAXh+jU18kExz4KDKwf2lp8w7ANIcQ +A33aFYu9GbgaVjHnhUmByX9FIHQ+icDgJoRRzAQWzmmZAeEmmbPj9b3sX6CE5Dja +dXh7iZzSzWCVILqO43zm33Y6fIl3ApSGETrEYX1vcYMhihf7F+LuAmthwbRSY9fY +RrLFnG84kYo1Mgs= +-----END CERTIFICATE----- diff --git a/ext/mysqli/tests/client-key.pem b/ext/mysqli/tests/client-key.pem new file mode 100644 index 000000000..205b5f31c --- /dev/null +++ b/ext/mysqli/tests/client-key.pem @@ -0,0 +1,15 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m +Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi +Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB +AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J +HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm +l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f +T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as +WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL +qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo +HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb +uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy +xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU +RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx +-----END RSA PRIVATE KEY----- diff --git a/ext/mysqli/tests/connect.inc b/ext/mysqli/tests/connect.inc index 48ba893cc..92caa25e9 100644 --- a/ext/mysqli/tests/connect.inc +++ b/ext/mysqli/tests/connect.inc @@ -17,7 +17,9 @@ $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('mysqli.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))) ? ((1 == getenv("MYSQL_TEST_EXPERIMENTAL")) ? true : false) : diff --git a/ext/mysqli/tests/mysqli_change_user.phpt b/ext/mysqli/tests/mysqli_change_user.phpt index b699229ce..a9b8ae7ad 100644 --- a/ext/mysqli/tests/mysqli_change_user.phpt +++ b/ext/mysqli/tests/mysqli_change_user.phpt @@ -73,8 +73,18 @@ require_once('skipifconnectfailure.inc'); mysqli_close($link); + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("[020] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", + $host, $user, $db, $port, $socket); + } + + if (false !== ($tmp = mysqli_change_user($link, str_repeat('user', 16384), str_repeat('pass', 16384), str_repeat('dbase', 16384)))) + printf("[021] Expecting false, got %s/%s\n", gettype($tmp), $tmp); + + mysqli_close($link); + if (NULL !== ($tmp = @mysqli_change_user($link, $user, $passwd, $db))) - printf("[020] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + printf("[022] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); print "done!"; ?> diff --git a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt index 30ea54147..7d1c39814 100644 --- a/ext/mysqli/tests/mysqli_change_user_insert_id.phpt +++ b/ext/mysqli/tests/mysqli_change_user_insert_id.phpt @@ -8,15 +8,7 @@ require_once('skipifconnectfailure.inc'); require_once('connect.inc'); if (!$IS_MYSQLND) { - if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) - die("skip Can't test server version, might hit known bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184"); - - if ((mysqli_get_client_version($link) <= 50139) || (mysqli_get_server_version($link) <= 50139)) - /* #30472 got fixed in 5.1.23 but #45184 is open */ - die(sprintf("skip libmysql %s should have bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184", - mysqli_get_client_version($link))); - - mysqli_close($link); + die("skip Might hit known and open bugs http://bugs.mysql.com/bug.php?id=30472, http://bugs.mysql.com/bug.php?id=45184"); } ?> --FILE-- diff --git a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt index b86f69c44..c94b39dda 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_interface.phpt @@ -50,6 +50,7 @@ require_once('skipifconnectfailure.inc'); 'select_db' => true, 'set_charset' => true, 'set_opt' => true, + 'ssl_set' => true, 'stat' => true, 'stmt_init' => true, 'store_result' => true, @@ -61,7 +62,6 @@ require_once('skipifconnectfailure.inc'); /* $expected_methods['get_cache_stats'] = true; */ /* $expected_methods['get_client_stats'] = true; */ $expected_methods['get_connection_stats'] = true; - $expected_methods['poll'] = true; $expected_methods['reap_async_query'] = true; } else { // libmysql only diff --git a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt index 802e52433..910ede93c 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_reflection.phpt @@ -52,9 +52,51 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 8448 -Number of Parameters: 0 +Number of Parameters: 6 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'autocommit' isFinal: no isAbstract: no @@ -68,8 +110,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'mode' of method 'autocommit' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'change_user' isFinal: no @@ -84,8 +133,29 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 3 +Number of Required Parameters: 3 + +Inspecting parameter 'user' of method 'change_user' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'change_user' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'change_user' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'character_set_name' isFinal: no @@ -164,9 +234,51 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 +Number of Parameters: 6 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'debug' isFinal: no isAbstract: no @@ -180,8 +292,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'debug_options' of method 'debug' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'dump_debug_info' isFinal: no @@ -212,8 +331,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'string_to_escape' of method 'escape_string' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'get_charset' isFinal: no @@ -324,8 +450,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'connection_id' of method 'kill' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'more_results' isFinal: no @@ -356,8 +489,15 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'query' of method 'multi_query' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'mysqli' isFinal: no @@ -372,9 +512,51 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 8448 -Number of Parameters: 0 +Number of Parameters: 6 Number of Required Parameters: 0 +Inspecting parameter 'host' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'mysqli' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'next_result' isFinal: no isAbstract: no @@ -404,8 +586,22 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 2 +Number of Required Parameters: 2 + +Inspecting parameter 'option' of method 'options' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'value' of method 'options' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'ping' isFinal: no @@ -423,7 +619,7 @@ Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 -Inspecting method 'poll' +Inspecting method 'prepare' isFinal: no isAbstract: no isPublic: yes @@ -436,10 +632,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'prepare' +Inspecting parameter 'query' of method 'prepare' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'query' isFinal: no isAbstract: no isPublic: yes @@ -452,10 +655,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'query' +Inspecting parameter 'query' of method 'query' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'real_connect' isFinal: no isAbstract: no isPublic: yes @@ -468,10 +678,59 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 +Number of Parameters: 7 Number of Required Parameters: 0 -Inspecting method 'real_connect' +Inspecting parameter 'host' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'user' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'password' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'database' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'port' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'socket' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting parameter 'flags' of method 'real_connect' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + +Inspecting method 'real_escape_string' isFinal: no isAbstract: no isPublic: yes @@ -484,10 +743,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'real_escape_string' +Inspecting parameter 'string_to_escape' of method 'real_escape_string' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'real_query' isFinal: no isAbstract: no isPublic: yes @@ -500,10 +766,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'real_query' +Inspecting parameter 'query' of method 'real_query' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'reap_async_query' isFinal: no isAbstract: no isPublic: yes @@ -519,7 +792,7 @@ Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 -Inspecting method 'reap_async_query' +Inspecting method 'refresh' isFinal: no isAbstract: no isPublic: yes @@ -532,10 +805,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'refresh' +Inspecting parameter 'options' of method 'refresh' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'rollback' isFinal: no isAbstract: no isPublic: yes @@ -551,7 +831,7 @@ Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 -Inspecting method 'rollback' +Inspecting method 'select_db' isFinal: no isAbstract: no isPublic: yes @@ -564,10 +844,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'select_db' +Inspecting parameter 'database' of method 'select_db' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'set_charset' isFinal: no isAbstract: no isPublic: yes @@ -580,10 +867,17 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 1 +Number of Required Parameters: 1 -Inspecting method 'set_charset' +Inspecting parameter 'charset' of method 'set_charset' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'set_opt' isFinal: no isAbstract: no isPublic: yes @@ -596,10 +890,24 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 2 +Number of Required Parameters: 2 -Inspecting method 'set_opt' +Inspecting parameter 'option' of method 'set_opt' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'value' of method 'set_opt' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting method 'ssl_set' isFinal: no isAbstract: no isPublic: yes @@ -612,8 +920,43 @@ isInternal: yes isUserDefined: no returnsReference: no Modifiers: 256 -Number of Parameters: 0 -Number of Required Parameters: 0 +Number of Parameters: 5 +Number of Required Parameters: 5 + +Inspecting parameter 'key' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'cert' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'certificate_authority' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'certificate_authority_path' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no + +Inspecting parameter 'cipher' of method 'ssl_set' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'stat' isFinal: no diff --git a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt index cf5973249..b86129c57 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_result_reflection.phpt @@ -52,7 +52,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 8448 Number of Parameters: 0 Number of Required Parameters: 0 @@ -68,7 +68,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 8448 Number of Parameters: 0 Number of Required Parameters: 0 @@ -84,7 +84,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -100,9 +100,16 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'offset' of method 'data_seek' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'fetch_all' isFinal: no @@ -116,7 +123,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -132,10 +139,17 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 Number of Required Parameters: 0 +Inspecting parameter 'result_type' of method 'fetch_array' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: yes +isDefaultValueAvailable: no + Inspecting method 'fetch_assoc' isFinal: no isAbstract: no @@ -148,7 +162,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -164,7 +178,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -180,9 +194,16 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'field_nr' of method 'fetch_field_direct' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'fetch_fields' isFinal: no @@ -196,7 +217,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -212,7 +233,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -228,7 +249,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -244,9 +265,16 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d -Number of Parameters: 0 -Number of Required Parameters: 0 +Modifiers: 256 +Number of Parameters: 1 +Number of Required Parameters: 1 + +Inspecting parameter 'field_nr' of method 'field_seek' +isArray: no +allowsNull: no +isPassedByReference: no +isOptional: no +isDefaultValueAvailable: no Inspecting method 'free' isFinal: no @@ -260,7 +288,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -276,7 +304,7 @@ isDestructor: no isInternal: yes isUserDefined: no returnsReference: no -Modifiers: %d +Modifiers: 256 Number of Parameters: 0 Number of Required Parameters: 0 @@ -324,4 +352,4 @@ Default property 'field_count' Default property 'lengths' Default property 'num_rows' Default property 'type' -done! +done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt index 9ddb26e89..7cbb12721 100644 --- a/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt +++ b/ext/mysqli/tests/mysqli_class_mysqli_stmt_interface.phpt @@ -37,7 +37,6 @@ Interface of the class mysqli_stmt 'reset' => true, 'result_metadata' => true, 'send_long_data' => true, - 'stmt' => true, 'store_result' => true, ); diff --git a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt index 2636abdfd..bb643e8a3 100644 --- a/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt +++ b/ext/mysqli/tests/mysqli_connect_oo_defaults.phpt @@ -33,7 +33,7 @@ new mysqli() $tmp = $res->fetch_assoc(); $res->free_result(); - if (!isset($tmp['testing']) || $tmp['testing'] != $socket) { + if (!isset($tmp['testing']) || $tmp['testing'] != 'mysqli.default_socket') { printf("[002] mysqli.default_socket not properly set?\n"); var_dump($tmp); } diff --git a/ext/mysqli/tests/mysqli_constants.phpt b/ext/mysqli/tests/mysqli_constants.phpt index 32a259350..418eb070e 100644 --- a/ext/mysqli/tests/mysqli_constants.phpt +++ b/ext/mysqli/tests/mysqli_constants.phpt @@ -154,10 +154,7 @@ require_once('skipifconnectfailure.inc'); if (defined('MYSQLI_DATA_TRUNCATED')) $expected_constants["MYSQLI_DATA_TRUNCATED"] = true; - if ($IS_MYSQLND && $php_version >= 600) { - /* mysqlnd only */ - $expected_constants["MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE"] = true; - } else if (!$IS_MYSQLND) { + if (!$IS_MYSQLND) { /* libmysql only */ /* are they available in all versions of ext/mysqli ? diff --git a/ext/mysqli/tests/mysqli_errno_oo.phpt b/ext/mysqli/tests/mysqli_errno_oo.phpt index bef4a607e..5d5ea2508 100644 --- a/ext/mysqli/tests/mysqli_errno_oo.phpt +++ b/ext/mysqli/tests/mysqli_errno_oo.phpt @@ -14,8 +14,8 @@ require_once('skipifconnectfailure.inc'); $link = NULL; $mysqli = new mysqli(); - if (!is_null($tmp = @$mysqli->errno)) - printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + if (0 !== ($tmp = @$mysqli->errno)) + printf("[001] Expecting int/0, got %s/%s\n", gettype($tmp), $tmp); if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", diff --git a/ext/mysqli/tests/mysqli_error_oo.phpt b/ext/mysqli/tests/mysqli_error_oo.phpt index 31716d9aa..1f0589679 100644 --- a/ext/mysqli/tests/mysqli_error_oo.phpt +++ b/ext/mysqli/tests/mysqli_error_oo.phpt @@ -14,8 +14,8 @@ require_once('skipifconnectfailure.inc'); $link = NULL; $mysqli = new mysqli(); - if (!is_null($tmp = @$mysqli->error)) - printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); + if ('' !== ($tmp = @$mysqli->error)) + printf("[001] Expecting empty string, got %s/'%s'\n", gettype($tmp), $tmp); if (!$mysqli = new mysqli($host, $user, $passwd, $db, $port, $socket)) printf("[002] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n", diff --git a/ext/mysqli/tests/mysqli_fetch_all.phpt b/ext/mysqli/tests/mysqli_fetch_all.phpt index eacecc92d..63b6ad284 100644 --- a/ext/mysqli/tests/mysqli_fetch_all.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all.phpt @@ -99,24 +99,27 @@ if (!function_exists('mysqli_fetch_all')) } if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) { - print $sql; // don't bail, engine might not support the datatype return false; } - if (is_null($php_value) && !mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { + if (is_null($php_value)) { + if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); return false; - } - - if (!is_null($php_value)) { - if (is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; - } else if (!is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; + } + } else { + if (is_string($sql_value)) { + if (!mysqli_query($link, $sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) { + printf("[%04ds] [%d] %s - %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link), $sql); + return false; } + } else { + if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { + printf("[%04di] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); + return false; + } + } } if (!$res = mysqli_query($link, "SELECT id, label FROM test")) { @@ -190,27 +193,28 @@ if (!function_exists('mysqli_fetch_all')) func_mysqli_fetch_all($link, $engine, "INTEGER", -2147483648, "-2147483648", 200); func_mysqli_fetch_all($link, $engine, "INTEGER", 2147483647, "2147483647", 210); func_mysqli_fetch_all($link, $engine, "INTEGER", NULL, NULL, 220); - func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", 4294967295, "4294967295", 230); + func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230); func_mysqli_fetch_all($link, $engine, "INTEGER UNSIGNED", NULL, NULL, 240); - func_mysqli_fetch_all($link, $engine, "BIGINT", -9223372036854775808, "-9223372036854775808", 250); + func_mysqli_fetch_all($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 250); + func_mysqli_fetch_all($link, $engine, "BIGINT", NULL, NULL, 260); - func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", 18446744073709551615, "18446744073709551615", 270); + func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "18446744073709551615", 270); func_mysqli_fetch_all($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280); - func_mysqli_fetch_all($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); + func_mysqli_fetch_all($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); func_mysqli_fetch_all($link, $engine, "FLOAT", NULL, NULL, 300); - func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+19", 310, "/1\.84467e\+?[0]?19/iu"); + func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.84467e+19", 310, "/1\.84467e\+?[0]?19/iu"); func_mysqli_fetch_all($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320); - func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330); + func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330); func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340); - func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", 99999999.99, "99999999.99", 350); + func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350); func_mysqli_fetch_all($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360); - func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", -99999999.99, "-99999999.99", 370); + func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370); func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380); - func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", 99999999.99, "99999999.99", 390); + func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390); func_mysqli_fetch_all($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400); // don't care about date() strict TZ warnings... @@ -238,10 +242,10 @@ if (!function_exists('mysqli_fetch_all')) func_mysqli_fetch_all($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560); func_mysqli_fetch_all($link, $engine, "CHAR(1)", NULL, NULL, 570); - $string65k = func_mysqli_fetch_array_make_string(65535); + $string65k = func_mysqli_fetch_array_make_string(65400); func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", "a", "a", 580); func_mysqli_fetch_all($link, $engine, "VARCHAR(255)", $string255, $string255, 590); - func_mysqli_fetch_all($link, $engine, "VARCHAR(65635)", $string65k, $string65k, 600); + func_mysqli_fetch_all($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600); func_mysqli_fetch_all($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610); func_mysqli_fetch_all($link, $engine, "VARCHAR(1)", NULL, NULL, 620); @@ -299,7 +303,7 @@ if (!function_exists('mysqli_fetch_all')) ?> --CLEAN-- <?php - require_once("clean_table.inc"); + // require_once("clean_table.inc"); ?> --EXPECTF-- [005] @@ -379,7 +383,8 @@ array(2) { } } [011] -NULL +array(0) { +} [013] array(2) { [0]=> @@ -398,7 +403,8 @@ array(2) { } } [016] -NULL +array(0) { +} [017] array(1) { [0]=> diff --git a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt index a71eb2bce..575f95396 100644 --- a/ext/mysqli/tests/mysqli_fetch_all_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_all_oo.phpt @@ -100,24 +100,27 @@ if (!function_exists('mysqli_fetch_all')) } if (!$link->query($sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) { - print $sql; - // don't bail, engine might not support the datatype - return false; - } - - if (is_null($php_value) && !$link->query($sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { - printf("[%04d] [%d] %s\n", $offset + 1, $link->errno, $link->error); - return false; + // don't bail, engine might not support the datatype + return false; } - if (!is_null($php_value)) { - if (is_int($sql_value) && !$link->query(sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, $link->errno, $link->error); - return false; - } else if (!is_int($sql_value) && !$link->query(sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $sql_value))) { + if (is_null($php_value)) { + if (!$link->query($sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { printf("[%04d] [%d] %s\n", $offset + 1, $link->errno, $link->error); return false; } + } else { + if (is_string($sql_value)) { + if (!$link->query($sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) { + printf("[%04ds] [%d] %s - %s\n", $offset + 1, $link->errno, $link->error, $sql); + return false; + } + } else { + if (!$link->query($sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { + printf("[%04di] [%d] %s\n", $offset + 1, $link->errno, $link->error); + return false; + } + } } if (!$res = $link->query("SELECT id, label FROM test")) { @@ -178,7 +181,7 @@ if (!function_exists('mysqli_fetch_all')) func_mysqli_fetch_all_oo($link, $engine, "SMALLINT", -32768, "-32768", 100); func_mysqli_fetch_all_oo($link, $engine, "SMALLINT", 32767, "32767", 110); func_mysqli_fetch_all_oo($link, $engine, "SMALLINT", NULL, NULL, 120); - func_mysqli_fetch_all_oo($link, $engine, "SMALLINT UNSIGNED", 65535, "65535", 130); + func_mysqli_fetch_all_oo($link, $engine, "SMALLINT UNSIGNED", 65400, "65400", 130); func_mysqli_fetch_all_oo($link, $engine, "SMALLINT UNSIGNED", NULL, NULL, 140); func_mysqli_fetch_all_oo($link, $engine, "MEDIUMINT", -8388608, "-8388608", 150); @@ -190,27 +193,27 @@ if (!function_exists('mysqli_fetch_all')) func_mysqli_fetch_all_oo($link, $engine, "INTEGER", -2147483648, "-2147483648", 200); func_mysqli_fetch_all_oo($link, $engine, "INTEGER", 2147483647, "2147483647", 210); func_mysqli_fetch_all_oo($link, $engine, "INTEGER", NULL, NULL, 220); - func_mysqli_fetch_all_oo($link, $engine, "INTEGER UNSIGNED", 4294967295, "4294967295", 230); + func_mysqli_fetch_all_oo($link, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230); func_mysqli_fetch_all_oo($link, $engine, "INTEGER UNSIGNED", NULL, NULL, 240); - func_mysqli_fetch_all_oo($link, $engine, "BIGINT", -9223372036854775808, "-9223372036854775808", 250); + func_mysqli_fetch_all_oo($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 250); func_mysqli_fetch_all_oo($link, $engine, "BIGINT", NULL, NULL, 260); - func_mysqli_fetch_all_oo($link, $engine, "BIGINT UNSIGNED", 18446744073709551615, "18446744073709551615", 270); + func_mysqli_fetch_all_oo($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "18446744073709551615", 270); func_mysqli_fetch_all_oo($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280); - func_mysqli_fetch_all_oo($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); + func_mysqli_fetch_all_oo($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); func_mysqli_fetch_all_oo($link, $engine, "FLOAT", NULL, NULL, 300); - func_mysqli_fetch_all_oo($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); + func_mysqli_fetch_all_oo($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); func_mysqli_fetch_all_oo($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320); - func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330); + func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330); func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340); - func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2) UNSIGNED", 99999999.99, "99999999.99", 350); + func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350); func_mysqli_fetch_all_oo($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360); - func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", -99999999.99, "-99999999.99", 370); + func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370); func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380); - func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", 99999999.99, "99999999.99", 390); + func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390); func_mysqli_fetch_all_oo($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400); // don't care about date() strict TZ warnings... @@ -241,10 +244,10 @@ if (!function_exists('mysqli_fetch_all')) func_mysqli_fetch_all_oo($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560); func_mysqli_fetch_all_oo($link, $engine, "CHAR(1)", NULL, NULL, 570); - $string65k = func_mysqli_fetch_array_oo_make_string(65535); + $string65k = func_mysqli_fetch_array_oo_make_string(65400); func_mysqli_fetch_all_oo($link, $engine, "VARCHAR(1)", "a", "a", 580); func_mysqli_fetch_all_oo($link, $engine, "VARCHAR(255)", $string255, $string255, 590); - func_mysqli_fetch_all_oo($link, $engine, "VARCHAR(65635)", $string65k, $string65k, 600); + func_mysqli_fetch_all_oo($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600); func_mysqli_fetch_all_oo($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610); func_mysqli_fetch_all_oo($link, $engine, "VARCHAR(1)", NULL, NULL, 620); diff --git a/ext/mysqli/tests/mysqli_fetch_array.phpt b/ext/mysqli/tests/mysqli_fetch_array.phpt index cff314166..aa19ff6eb 100644 --- a/ext/mysqli/tests/mysqli_fetch_array.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array.phpt @@ -77,26 +77,28 @@ require_once('skipifconnectfailure.inc'); } if (!mysqli_query($link, $sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) { - print $sql; - // don't bail, engine might not support the datatype - return false; - } - - if (is_null($php_value) && !mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; + // don't bail, engine might not support the datatype + return false; } - if (!is_null($php_value)) { - if (is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); - return false; - } else if (!is_int($sql_value) && !mysqli_query($link, sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $sql_value))) { + if (is_null($php_value)) { + if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { printf("[%04d] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); return false; } + } else { + if (is_string($sql_value)) { + if (!mysqli_query($link, $sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) { + printf("[%04ds] [%d] %s - %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link), $sql); + return false; + } + } else { + if (!mysqli_query($link, $sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { + printf("[%04di] [%d] %s\n", $offset + 1, mysqli_errno($link), mysqli_error($link)); + return false; + } + } } - if (!$res = mysqli_query($link, "SELECT id, label FROM test")) { printf("[%04d] [%d] %s\n", $offset + 2, mysqli_errno($link), mysqli_error($link)); return false; @@ -107,8 +109,6 @@ require_once('skipifconnectfailure.inc'); return false; } - - if ($regexp_comparison) { if (!preg_match($regexp_comparison, (string)$row['label']) || !preg_match($regexp_comparison, (string)$row[1])) { printf("[%04d] Expecting %s/%s [reg exp = %s], got %s/%s resp. %s/%s. [%d] %s\n", $offset + 4, @@ -179,31 +179,31 @@ require_once('skipifconnectfailure.inc'); func_mysqli_fetch_array($link, $engine, "INTEGER", -2147483648, "-2147483648", 200); func_mysqli_fetch_array($link, $engine, "INTEGER", 2147483647, "2147483647", 210); func_mysqli_fetch_array($link, $engine, "INTEGER", NULL, NULL, 220); - func_mysqli_fetch_array($link, $engine, "INTEGER UNSIGNED", 4294967295, "4294967295", 230); + func_mysqli_fetch_array($link, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230); func_mysqli_fetch_array($link, $engine, "INTEGER UNSIGNED", NULL, NULL, 240); if ($IS_MYSQLND || ((mysqli_get_server_version($link) >= 51000) && (mysqli_get_client_version($link) >= 51000))) { - func_mysqli_fetch_array($link, $engine, "BIGINT", -9223372036854775808, "-9223372036854775808", 250); + func_mysqli_fetch_array($link, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 250); func_mysqli_fetch_array($link, $engine, "BIGINT", NULL, NULL, 260); - func_mysqli_fetch_array($link, $engine, "BIGINT UNSIGNED", 18446744073709551615, "18446744073709551615", 260); + func_mysqli_fetch_array($link, $engine, "BIGINT UNSIGNED", "18446744073709551615", "18446744073709551615", 260); func_mysqli_fetch_array($link, $engine, "BIGINT UNSIGNED", NULL, NULL, 280); } - func_mysqli_fetch_array($link, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); + func_mysqli_fetch_array($link, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); func_mysqli_fetch_array($link, $engine, "FLOAT", NULL, NULL, 300); - func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); + func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); func_mysqli_fetch_array($link, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320); - func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330); + func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330); func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2)", NULL, NULL, 340); - func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2) UNSIGNED", 99999999.99, "99999999.99", 350); + func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350); func_mysqli_fetch_array($link, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360); - func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", -99999999.99, "-99999999.99", 370); + func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370); func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", NULL, NULL, 380); - func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", 99999999.99, "99999999.99", 390); + func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390); func_mysqli_fetch_array($link, $engine, "DECIMAL(10,2)", NULL, NULL, 400); // don't care about date() strict TZ warnings... @@ -233,10 +233,10 @@ require_once('skipifconnectfailure.inc'); func_mysqli_fetch_array($link, $engine, "CHAR(1) NOT NULL", "a", "a", 560); func_mysqli_fetch_array($link, $engine, "CHAR(1)", NULL, NULL, 570); - $string65k = func_mysqli_fetch_array_make_string(65535); + $string65k = func_mysqli_fetch_array_make_string(65400); func_mysqli_fetch_array($link, $engine, "VARCHAR(1)", "a", "a", 580); func_mysqli_fetch_array($link, $engine, "VARCHAR(255)", $string255, $string255, 590); - func_mysqli_fetch_array($link, $engine, "VARCHAR(65635)", $string65k, $string65k, 600); + func_mysqli_fetch_array($link, $engine, "VARCHAR(65400)", $string65k, $string65k, 600); func_mysqli_fetch_array($link, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610); func_mysqli_fetch_array($link, $engine, "VARCHAR(1)", NULL, NULL, 620); diff --git a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt index 78c21308f..21d78ae6f 100644 --- a/ext/mysqli/tests/mysqli_fetch_array_oo.phpt +++ b/ext/mysqli/tests/mysqli_fetch_array_oo.phpt @@ -76,24 +76,27 @@ require_once('skipifconnectfailure.inc'); } if (!$mysqli->query($sql = sprintf("CREATE TABLE test(id INT NOT NULL, label %s, PRIMARY KEY(id)) ENGINE = %s", $sql_type, $engine))) { - print $sql; - // don't bail, engine might not support the datatype - return false; - } - - if (is_null($php_value) && !$mysqli->query($sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { - printf("[%04d] [%d] %s\n", $offset + 1, $mysqli->errno, $mysqli->error); - return false; + // don't bail, engine might not support the datatype + return false; } - if (!is_null($php_value)) { - if (is_int($sql_value) && !$mysqli->query(sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { - printf("[%04d] [%d] %s\n", $offset + 1, $mysqli->errno, $mysqli->error); - return false; - } else if (!is_int($sql_value) && !$mysqli->query(sprintf("INSERT INTO test(id, label) VALUES (1, '%s')", $sql_value))) { + if (is_null($php_value)) { + if (!$mysqli->query($sql = sprintf("INSERT INTO test(id, label) VALUES (1, NULL)"))) { printf("[%04d] [%d] %s\n", $offset + 1, $mysqli->errno, $mysqli->error); return false; } + } else { + if (is_string($sql_value)) { + if (!$mysqli->query($sql = "INSERT INTO test(id, label) VALUES (1, '" . $sql_value . "')")) { + printf("[%04ds] [%d] %s - %s\n", $offset + 1, $mysqli->errno, $mysqli->error, $sql); + return false; + } + } else { + if (!$mysqli->query($sql = sprintf("INSERT INTO test(id, label) VALUES (1, '%d')", $sql_value))) { + printf("[%04di] [%d] %s\n", $offset + 1, $mysqli->errno, $mysqli->error); + return false; + } + } } if (!$res = $mysqli->query("SELECT id, label FROM test")) { @@ -163,30 +166,30 @@ require_once('skipifconnectfailure.inc'); func_mysqli_fetch_array($mysqli, $engine, "INTEGER", -2147483648, "-2147483648", 200); func_mysqli_fetch_array($mysqli, $engine, "INTEGER", 2147483647, "2147483647", 210); func_mysqli_fetch_array($mysqli, $engine, "INTEGER", NULL, NULL, 220); - func_mysqli_fetch_array($mysqli, $engine, "INTEGER UNSIGNED", 4294967295, "4294967295", 230); + func_mysqli_fetch_array($mysqli, $engine, "INTEGER UNSIGNED", "4294967295", "4294967295", 230); func_mysqli_fetch_array($mysqli, $engine, "INTEGER UNSIGNED", NULL, NULL, 240); if ($IS_MYSQLND || ((mysqli_get_server_version($link) >= 51000) && (mysqli_get_client_version($link) >= 51000))) { - func_mysqli_fetch_array($mysqli, $engine, "BIGINT", -9223372036854775808, "-9223372036854775808", 250); + func_mysqli_fetch_array($mysqli, $engine, "BIGINT", "-9223372036854775808", "-9223372036854775808", 250); func_mysqli_fetch_array($mysqli, $engine, "BIGINT", NULL, NULL, 260); - func_mysqli_fetch_array($mysqli, $engine, "BIGINT UNSIGNED", 18446744073709551615, "18446744073709551615", 270); + func_mysqli_fetch_array($mysqli, $engine, "BIGINT UNSIGNED", "18446744073709551615", "18446744073709551615", 270); func_mysqli_fetch_array($mysqli, $engine, "BIGINT UNSIGNED", NULL, NULL, 280); } - func_mysqli_fetch_array($mysqli, $engine, "FLOAT", -9223372036854775808 - 1.1, "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); + func_mysqli_fetch_array($mysqli, $engine, "FLOAT", (string)(-9223372036854775808 - 1.1), "-9.22337e+18", 290, "/-9\.22337e\+?[0]?18/iu"); func_mysqli_fetch_array($mysqli, $engine, "FLOAT", NULL, NULL, 300); - func_mysqli_fetch_array($mysqli, $engine, "FLOAT UNSIGNED", 18446744073709551615 + 1.1, "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); + func_mysqli_fetch_array($mysqli, $engine, "FLOAT UNSIGNED", (string)(18446744073709551615 + 1.1), "1.84467e+?19", 310, "/1\.84467e\+?[0]?19/iu"); func_mysqli_fetch_array($mysqli, $engine, "FLOAT UNSIGNED ", NULL, NULL, 320); - func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2)", -99999999.99, "-99999999.99", 330); + func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2)", "-99999999.99", "-99999999.99", 330); func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2)", NULL, NULL, 340); - func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2) UNSIGNED", 99999999.99, "99999999.99", 350); + func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2) UNSIGNED", "99999999.99", "99999999.99", 350); func_mysqli_fetch_array($mysqli, $engine, "DOUBLE(10,2) UNSIGNED", NULL, NULL, 360); - func_mysqli_fetch_array($mysqli, $engine, "DECIMAL(10,2)", -99999999.99, "-99999999.99", 370); + func_mysqli_fetch_array($mysqli, $engine, "DECIMAL(10,2)", "-99999999.99", "-99999999.99", 370); func_mysqli_fetch_array($mysqli, $engine, "DECIMAL(10,2)", NULL, NULL, 380); - func_mysqli_fetch_array($mysqli, $engine, "DECIMAL(10,2)", 99999999.99, "99999999.99", 390); + func_mysqli_fetch_array($mysqli, $engine, "DECIMAL(10,2)", "99999999.99", "99999999.99", 390); func_mysqli_fetch_array($mysqli, $engine, "DECIMAL(10,2)", NULL, NULL, 400); // don't care about date() strict TZ warnings... @@ -214,10 +217,10 @@ require_once('skipifconnectfailure.inc'); func_mysqli_fetch_array($mysqli, $engine, "CHAR(1) NOT NULL", "a", "a", 560); func_mysqli_fetch_array($mysqli, $engine, "CHAR(1)", NULL, NULL, 570); - $string65k = func_mysqli_fetch_array_make_string(65535); + $string65k = func_mysqli_fetch_array_make_string(65400); func_mysqli_fetch_array($mysqli, $engine, "VARCHAR(1)", "a", "a", 580); func_mysqli_fetch_array($mysqli, $engine, "VARCHAR(255)", $string255, $string255, 590); - func_mysqli_fetch_array($mysqli, $engine, "VARCHAR(65635)", $string65k, $string65k, 600); + func_mysqli_fetch_array($mysqli, $engine, "VARCHAR(65400)", $string65k, $string65k, 600); func_mysqli_fetch_array($mysqli, $engine, "VARCHAR(1) NOT NULL", "a", "a", 610); func_mysqli_fetch_array($mysqli, $engine, "VARCHAR(1)", NULL, NULL, 620); diff --git a/ext/mysqli/tests/mysqli_fetch_field_types.phpt b/ext/mysqli/tests/mysqli_fetch_field_types.phpt index 5d7e5ebc8..98332f4a1 100644 --- a/ext/mysqli/tests/mysqli_fetch_field_types.phpt +++ b/ext/mysqli/tests/mysqli_fetch_field_types.phpt @@ -17,16 +17,20 @@ require_once('skipifconnectfailure.inc'); return false; } - $sql = sprintf("CREATE TABLE test(id %s)", $sql_type); - if (!mysqli_query($link, $sql)) { - printf("[002] %s, [%d] %s\n", $sql_type, + $create = sprintf("CREATE TABLE test(id %s)", $sql_type); + if (!mysqli_query($link, $create)) { + printf("[002] '%s' - '%s', [%d] %s\n", $sql_type, $create, mysqli_errno($link), mysqli_error($link)); return false; } - $sql = sprintf("INSERT INTO test(id) VALUES ('%s')", $php_value); + if (is_string($php_value)) + $sql = sprintf("INSERT INTO test(id) VALUES ('%s')", $php_value); + else + $sql = sprintf("INSERT INTO test(id) VALUES (%s)", $php_value); + if (!mysqli_query($link, $sql)) { - printf("[003] %s, [%d] %s\n", $sql_type, + printf("[003] '%s' - '%s' - '%s', [%d] %s\n", $sql_type, $create, $sql, mysqli_errno($link), mysqli_error($link)); return false; } @@ -85,7 +89,7 @@ require_once('skipifconnectfailure.inc'); MYSQLI_TYPE_VAR_STRING => array("VARCHAR(32768)", 'varchar'), MYSQLI_TYPE_STRING => 'MYSQLI_TYPE_STRING - TODO add testing', MYSQLI_TYPE_STRING => array('CHAR(1)', 'a'), - MYSQLI_TYPE_STRING => array("SET('I', 'smash', 'the')", 'Will be converted to string although it is a SET...'), + MYSQLI_TYPE_STRING => array("SET('I', 'smash', 'the')", 'smash'), MYSQLI_TYPE_NULL => 'MYSQLI_TYPE_NULL - TODO add testing', MYSQLI_TYPE_NEWDATE => 'MYSQLI_TYPE_NEWDATE - TODO add testing', MYSQLI_TYPE_INTERVAL => 'MYSQLI_TYPE_INTERVAL - TODO add testing', diff --git a/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt b/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt index 4b0bab240..bbfe503b2 100644 --- a/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_cache_stats_off.phpt @@ -15,8 +15,14 @@ if (!function_exists('mysqli_get_cache_stats')) { --FILE-- <?php $before = mysqli_get_cache_stats(); - if (!is_array($before) || empty($before)) { - printf("[001] Expecting non-empty array, got %s.\n", gettype($before)); + /* + NOTE: the function belongs to the mysqnd zval cache. The + mysqlnd zval cache was part of PHP from PHP 5.3.0(-dev) to + PHP 5.3.0RC3 or something. And it was turned off by default. + The function never returned anything meaningful in any released version of PHP. + */ + if (!is_array($before)) { + printf("[001] Expecting array, got %s.\n", gettype($before)); var_dump($before); } @@ -33,25 +39,11 @@ if (!function_exists('mysqli_get_cache_stats')) { ; $after = mysqli_get_cache_stats(); - /* references has to be maintained - it is used for memory management */ - $ignore = array('references' => true); - foreach ($before as $k => $v) { - if (isset($ignore[$k])) - continue; - - if ($before[$k] != $after[$k]) - printf("[004] Statistics have changed - %s: %s => %s\n", $ - $k, $before[$k], $after[$k]); - } - - $ignore = array("size" => true, "free_items" => true, "references" => true); - foreach ($after as $k => $v) { - if ($v != 0 && !isset($ignore[$k])) { - printf("[005] Field %s should not have any other value but 0, got %s.\n", - $k, $v); - } + if ($before !== $after) { + printf("[002] Statistics have changed\n"); + var_dump($before); + var_dump($after); } - mysqli_close($link); print "done!"; @@ -61,4 +53,4 @@ if (!function_exists('mysqli_get_cache_stats')) { require_once("clean_table.inc"); ?> --EXPECTF-- -done!
\ No newline at end of file +done! diff --git a/ext/mysqli/tests/mysqli_get_client_stats.phpt b/ext/mysqli/tests/mysqli_get_client_stats.phpt index 74c0cc800..7377f161d 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats.phpt @@ -887,7 +887,7 @@ if (!mysqli_query($link, "DROP SERVER IF EXISTS myself")) mysqli_close($link); ?> --EXPECTF-- -array(152) { +array(158) { [%u|b%"bytes_sent"]=> %unicode|string%(1) "0" [%u|b%"bytes_received"]=> @@ -1020,32 +1020,44 @@ array(152) { %unicode|string%(1) "0" [%u|b%"mem_emalloc_count"]=> %unicode|string%(1) "0" - [%u|b%"mem_emalloc_ammount"]=> + [%u|b%"mem_emalloc_amount"]=> %unicode|string%(1) "0" [%u|b%"mem_ecalloc_count"]=> %unicode|string%(1) "0" - [%u|b%"mem_ecalloc_ammount"]=> + [%u|b%"mem_ecalloc_amount"]=> %unicode|string%(1) "0" [%u|b%"mem_erealloc_count"]=> %unicode|string%(1) "0" - [%u|b%"mem_erealloc_ammount"]=> + [%u|b%"mem_erealloc_amount"]=> %unicode|string%(1) "0" [%u|b%"mem_efree_count"]=> %unicode|string%(1) "0" + [%u|b%"mem_efree_amount"]=> + %unicode|string%(1) "0" [%u|b%"mem_malloc_count"]=> %unicode|string%(1) "0" - [%u|b%"mem_malloc_ammount"]=> + [%u|b%"mem_malloc_amount"]=> %unicode|string%(1) "0" [%u|b%"mem_calloc_count"]=> %unicode|string%(%d) "%d" - [%u|b%"mem_calloc_ammount"]=> + [%u|b%"mem_calloc_amount"]=> %unicode|string%(%d) "%d" [%u|b%"mem_realloc_count"]=> %unicode|string%(1) "0" - [%u|b%"mem_realloc_ammount"]=> + [%u|b%"mem_realloc_amount"]=> %unicode|string%(1) "0" [%u|b%"mem_free_count"]=> %unicode|string%(1) "0" + [%u|b%"mem_free_amount"]=> + %unicode|string%(1) "0" + [%u|b%"mem_estrndup_count"]=> + %unicode|string%(1) "0" + [%u|b%"mem_strndup_count"]=> + %unicode|string%(1) "0" + [%u|b%"mem_estndup_count"]=> + %unicode|string%(1) "0" + [%u|b%"mem_strdup_count"]=> + %unicode|string%(1) "0" [%u|b%"proto_text_fetched_null"]=> %unicode|string%(1) "0" [%u|b%"proto_text_fetched_bit"]=> diff --git a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt index e2dff9bef..884f426c7 100644 --- a/ext/mysqli/tests/mysqli_get_client_stats_off.phpt +++ b/ext/mysqli/tests/mysqli_get_client_stats_off.phpt @@ -15,8 +15,16 @@ mysqlnd.collect_memory_statistics=0 --FILE-- <?php $before = mysqli_get_client_stats(); - if (!is_array($before) || empty($before)) { - printf("[001] Expecting non-empty array, got %s.\n", gettype($before)); + + /* + NOTE: the function belongs to the mysqnd zval cache. The + mysqlnd zval cache was part of PHP from PHP 5.3.0(-dev) to + PHP 5.3.0RC3 or something. And it was turned off by default. + The function never returned anything meaningful in any released version of PHP. + + */ + if (!is_array($before)) { + printf("[001] Expecting array, got %s.\n", gettype($before)); var_dump($before); } @@ -31,12 +39,6 @@ mysqlnd.collect_memory_statistics=0 var_dump($after); } - foreach ($after as $k => $v) - if ($v != 0) { - printf("[003] Field %s should not have any other value but 0, got %s.\n", - $k, $v); - } - mysqli_close($link); print "done!"; ?> diff --git a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt index 725636e14..35f35a5dc 100644 --- a/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt +++ b/ext/mysqli/tests/mysqli_insert_packet_overflow.phpt @@ -38,8 +38,15 @@ memory_limit=256M $max_len = pow(2, 24); if ($org_max_allowed_packet < $max_len) { - if (!mysqli_query($link, "SET GLOBAL max_allowed_packet = " . ($max_len + 100))) - printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (!mysqli_query($link, "SET GLOBAL max_allowed_packet = " . ($max_len + 100))) { + if (1227 == mysqli_errno($link)) { + /* [1227] Access denied; you need the SUPER privilege for this operation */ + print "done!"; + exit(0); + } else { + printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + } + } } mysqli_close($link); if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) @@ -94,7 +101,8 @@ memory_limit=256M } if (!mysqli_query($link, "SET GLOBAL max_allowed_packet = " . $org_max_allowed_packet)) - printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + if (1227 != mysqli_errno($link)) + printf("[017] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); mysqli_close($link); diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt index 637fd1629..fcbf4e652 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_long.phpt @@ -3,8 +3,19 @@ mysqlnd.net_read_timeout > default_socket_timeout --SKIPIF-- <?php require_once('skipif.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); -require_once('connect.inc'); + +if (!$IS_MYSQLND) { + die("skip: test applies only to mysqlnd"); +} + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error())); +} +if (mysqli_get_server_version($link) <= 50011) { + die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link))); +} ?> --INI-- default_socket_timeout=1 diff --git a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt index f5a13c5f6..eb4c431e7 100644 --- a/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt +++ b/ext/mysqli/tests/mysqli_mysqlnd_read_timeout_zero.phpt @@ -3,8 +3,19 @@ mysqlnd.net_read_timeout = 0 --SKIPIF-- <?php require_once('skipif.inc'); +require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); -require_once('connect.inc'); + +if (!$IS_MYSQLND) { + die("skip: test applies only to mysqlnd"); +} + +if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error())); +} +if (mysqli_get_server_version($link) <= 50011) { + die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link))); +} ?> --INI-- default_socket_timeout=10 diff --git a/ext/mysqli/tests/mysqli_options.phpt b/ext/mysqli/tests/mysqli_options.phpt index 1da140b39..de23adefa 100644 --- a/ext/mysqli/tests/mysqli_options.phpt +++ b/ext/mysqli/tests/mysqli_options.phpt @@ -41,8 +41,6 @@ already through other measures. $valid_options[] = constant('MYSQLI_OPT_NET_READ_BUFFER_SIZE'); if ($IS_MYSQLND && defined('MYSQLI_OPT_INT_AND_FLOAT_NATIVE')) $valid_options[] = constant('MYSQLI_OPT_INT_AND_FLOAT_NATIVE'); - if (defined('MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE')) - $valid_options[] = constant('MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE'); $tmp = NULL; $link = NULL; @@ -55,6 +53,10 @@ already through other measures. $link = mysqli_init(); + /* set it twice, checking if memory for the previous one is correctly freed */ + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "utf8"); + mysqli_options($link, MYSQLI_SET_CHARSET_NAME, "latin1"); + if (!is_null($tmp = @mysqli_options($link, MYSQLI_OPT_CONNECT_TIMEOUT))) printf("[003] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); @@ -81,10 +83,6 @@ already through other measures. !($tmp = mysqli_options($link, constant('MYSQLI_OPT_INT_AND_YEARS_AS_INT'), true))) printf("[006] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp); - if (defined('MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE') && - !($tmp = mysqli_options($link, constant('MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE'), true))) - printf("[006] Expecting boolean/true got %s/%s\n", gettype($tmp), $tmp); - if ($IS_MYSQLND) { /* Don't do this with libmysql. You may hit options not exported to PHP and cause false positives */ for ($flag = -10000; $flag < 10000; $flag++) { diff --git a/ext/mysqli/tests/mysqli_poll.phpt b/ext/mysqli/tests/mysqli_poll.phpt index c691835f3..dd4f9b971 100644 --- a/ext/mysqli/tests/mysqli_poll.phpt +++ b/ext/mysqli/tests/mysqli_poll.phpt @@ -55,15 +55,9 @@ if (!$IS_MYSQLND) function poll_async($offset, $link, $links, $errors, $reject, $exp_ready, $use_oo_syntax) { - if ($use_oo_syntax) { - if ($exp_ready !== ($tmp = $link->poll($links, $errors, $reject, 0, 1000))) - printf("[%03d + 1] There should be %d links ready to read from, %d ready\n", - $exp_ready, $tmp); - } else { - if ($exp_ready !== ($tmp = mysqli_poll($links, $errors, $reject, 0, 1000))) - printf("[%03d + 1] There should be %d links ready to read from, %d ready\n", - $exp_ready, $tmp); - } + if ($exp_ready !== ($tmp = mysqli_poll($links, $errors, $reject, 0, 1000))) + printf("[%03d + 1] There should be %d links ready to read from, %d ready\n", + $exp_ready, $tmp); foreach ($links as $mysqli) { if ($use_oo_syntax) { diff --git a/ext/mysqli/tests/mysqli_poll_kill.phpt b/ext/mysqli/tests/mysqli_poll_kill.phpt index 73382b730..800521aa7 100644 --- a/ext/mysqli/tests/mysqli_poll_kill.phpt +++ b/ext/mysqli/tests/mysqli_poll_kill.phpt @@ -183,15 +183,16 @@ array(1) { %unicode|string%(1) "1" } -Warning: mysqli_reap_async_query(): GREET %s +Warning: mysqli_reap_async_query(): Premature end of data (mysqlnd_wireprotocol.c:%d) in %s on line %d -Warning: mysqli_reap_async_query(): MySQL server has gone away in %s on line %d -[014] 2014/%s +Warning: mysqli_reap_async_query(): RSET_HEADER %s -Warning: Error while sending QUERY packet. PID=%d in %s on line %d +Warning: mysqli_reap_async_query(): Error reading result set's header in %s on line %d + +Warning: Error while sending QUERY packet. %s -Warning: mysqli_reap_async_query(): MySQL server has gone away in %s on line %d +Warning: mysqli_reap_async_query(): %s Warning: mysqli_reap_async_query(): Error reading result set's header in %s on line %d -[018] Error: 2006/%s -done! +[018] Error: %d/%s +done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_real_connect.phpt b/ext/mysqli/tests/mysqli_real_connect.phpt index 5e474d6d2..2c371328b 100644 --- a/ext/mysqli/tests/mysqli_real_connect.phpt +++ b/ext/mysqli/tests/mysqli_real_connect.phpt @@ -136,6 +136,7 @@ require_once('skipifconnectfailure.inc'); } mysqli_close($link); + @var_dump($link); if ($IS_MYSQLND) { ini_set('mysqli.default_host', 'p:' . $host); @@ -164,8 +165,6 @@ require_once('skipifconnectfailure.inc'); @mysqli_close($link); } - @var_dump($link); - if (NULL !== ($tmp = mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket))) printf("[026] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); @@ -187,7 +186,7 @@ object(mysqli)#%d (%d) { [%u|b%"connect_errno"]=> int(%d) [%u|b%"connect_error"]=> - %unicode|string%(%d) "%s + NULL [%u|b%"errno"]=> %s [%u|b%"error"]=> @@ -215,4 +214,4 @@ object(mysqli)#%d (%d) { } Warning: mysqli_real_connect(): Couldn't fetch mysqli in %s on line %d -done!
\ No newline at end of file +done! diff --git a/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt b/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt index c2cf980e2..b177c1fd5 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_big5.phpt @@ -20,35 +20,62 @@ mysqli_close($link); ?> --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 - [%d] %s\n", $host, $user, $db, +$port, $socket, mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { + printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } + + if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY +KEY(id)) ENGINE=' . $engine . " DEFAULT CHARSET=big5")) { + printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } var_dump(mysqli_set_charset($link, "big5")); - if ('���H�U���e\\\\���H�U���e' !== ($tmp = mysqli_real_escape_string($link, '���H�U���e\\���H�U���e'))) + if ('���H�U���e\\\\���H�U���e' !== ($tmp = mysqli_real_escape_string($link, +'���H�U���e\\���H�U���e'))) printf("[004] Expecting \\\\, got %s\n", $tmp); - if ('���H�U���e\"���H�U���e' !== ($tmp = mysqli_real_escape_string($link, '���H�U���e"���H�U���e'))) + if ('���H�U���e\"���H�U���e' !== ($tmp = mysqli_real_escape_string($link, +'���H�U���e"���H�U���e'))) printf("[005] Expecting \", got %s\n", $tmp); - if ("���H�U���e\'���H�U���e" !== ($tmp = mysqli_real_escape_string($link, "���H�U���e'���H�U���e"))) + if ("���H�U���e\'���H�U���e" !== ($tmp = mysqli_real_escape_string($link, +"���H�U���e'���H�U���e"))) printf("[006] Expecting ', got %s\n", $tmp); - if ("���H�U���e\\n���H�U���e" !== ($tmp = mysqli_real_escape_string($link, "���H�U���e\n���H�U���e"))) + if ("���H�U���e\\n���H�U���e" !== ($tmp = mysqli_real_escape_string($link, +"���H�U���e\n���H�U���e"))) printf("[007] Expecting \\n, got %s\n", $tmp); - if ("���H�U���e\\r���H�U���e" !== ($tmp = mysqli_real_escape_string($link, "���H�U���e\r���H�U���e"))) + if ("���H�U���e\\r���H�U���e" !== ($tmp = mysqli_real_escape_string($link, +"���H�U���e\r���H�U���e"))) printf("[008] Expecting \\r, got %s\n", $tmp); - if ("���H�U���e\\0���H�U���e" !== ($tmp = mysqli_real_escape_string($link, "���H�U���e" . chr(0) . "���H�U���e"))) + if ("���H�U���e\\0���H�U���e" !== ($tmp = mysqli_real_escape_string($link, "���H�U���e" +. chr(0) . "���H�U���e"))) printf("[009] Expecting %s, got %s\n", "���H�U���e\\0���H�U���e", $tmp); - var_dump(mysqli_query($link, "INSERT INTO test(id, label) VALUES (100, '��')")); + var_dump(mysqli_query($link, "INSERT INTO test(id, label) VALUES (100, +'��')")); mysqli_close($link); print "done!"; ?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> --EXPECTF-- bool(true) bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt index 09f8099c6..cf4afb6f6 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_eucjpms.phpt @@ -20,8 +20,25 @@ mysqli_close($link); ?> --FILE-- <?php - require_once("connect.inc"); - require_once('table.inc'); +require_once("connect.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 - [%d] %s\n", $host, $user, $db, +$port, $socket, mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { + printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } + + if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY +KEY(id)) ENGINE=' . $engine . " DEFAULT CHARSET=eucjpms")) { + printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } var_dump(mysqli_set_charset($link, "eucjpms")); @@ -48,6 +65,10 @@ mysqli_close($link); mysqli_close($link); print "done!"; ?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> --EXPECTF-- bool(true) bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt index 6384d9fca..7ac7497b8 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_euckr.phpt @@ -21,7 +21,23 @@ mysqli_close($link); --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 - [%d] %s\n", $host, $user, $db, +$port, $socket, mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { + printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } + + if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY +KEY(id)) ENGINE=' . $engine . " DEFAULT CHARSET=euckr")) { + printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } var_dump(mysqli_set_charset($link, "euckr")); @@ -48,6 +64,10 @@ mysqli_close($link); mysqli_close($link); print "done!"; ?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> --EXPECTF-- bool(true) bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt index 0994b49fb..b93d8154f 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gb2312.phpt @@ -22,7 +22,23 @@ mysqli_close($link); <?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 - [%d] %s\n", $host, $user, $db, +$port, $socket, mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { + printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } + + if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY +KEY(id)) ENGINE=' . $engine . " DEFAULT CHARSET=gb2312")) { + printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } var_dump(mysqli_set_charset($link, "gb2312")); @@ -49,6 +65,10 @@ mysqli_close($link); mysqli_close($link); print "done!"; ?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> --EXPECTF-- bool(true) bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt index 7965abf9d..2fd1121a7 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_gbk.phpt @@ -24,7 +24,23 @@ mysqli_close($link); <?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 - [%d] %s\n", $host, $user, $db, +$port, $socket, mysqli_connect_errno(), mysqli_connect_error()); + } + + if (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { + printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } + + if (!mysqli_query($link, 'CREATE TABLE test(id INT, label CHAR(1), PRIMARY +KEY(id)) ENGINE=' . $engine . " DEFAULT CHARSET=gbk")) { + printf("Failed to create test table: [%d] %s\n", mysqli_errno($link), +mysqli_error($link)); + } var_dump(mysqli_set_charset($link, "gbk")); @@ -51,6 +67,10 @@ mysqli_close($link); mysqli_close($link); print "done!"; ?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> --EXPECTF-- bool(true) bool(true) diff --git a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt index 79309923c..72d171f9e 100644 --- a/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt +++ b/ext/mysqli/tests/mysqli_real_escape_string_unicode.phpt @@ -79,6 +79,10 @@ require_once('skipifconnectfailure.inc'); print "done!"; ?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> --EXPECTF-- Warning: mysqli_real_escape_string(): Couldn't fetch mysqli in %s on line %d done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_report.phpt b/ext/mysqli/tests/mysqli_report.phpt index 11ddef88b..1d9cf794a 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-456789-20-456789-%s'@'%s' (using password: YES) 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_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 e7ba6bb7e..2ded3fd9d 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-456789-20-456789-%s'@'%s' (using password: YES) 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_kill(): processid should have positive value in %s on line %d diff --git a/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt b/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt deleted file mode 100644 index 7e0593cb5..000000000 --- a/ext/mysqli/tests/mysqli_set_opt_numeric_and_datetime_as_unicode.phpt +++ /dev/null @@ -1,150 +0,0 @@ ---TEST-- -mysqli_set_opt() - MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE ---SKIPIF-- -<?php -require_once('skipif.inc'); -require_once('skipifemb.inc'); -require_once('skipifconnectfailure.inc'); -if (version_compare(PHP_VERSION, '5.9.9', '<') == 1) { - die('skip Needs PHP 6 and Unicode'); -} - -if (!stristr(mysqli_get_client_info(), "mysqlnd")) - die("skip works only with mysqlnd"); -?> ---FILE-- -<?php - require_once("table.inc"); - - if (true !== ($tmp = mysqli_set_opt($link, MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, 1))) - printf("[001] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); - - if (!mysqli_query($link, 'ALTER TABLE test ADD col_date DATE, - ADD col_time TIME, - ADD col_timestamp TIMESTAMP, - ADD col_datetime DATETIME')) - printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!mysqli_query($link, 'UPDATE test SET col_date = NOW(), - col_time = NOW(), - col_timestamp = NOW(), - col_datetime = NOW()')) - printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!$res = mysqli_query($link, 'SELECT * FROM test')) - printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!$row = mysqli_fetch_assoc($res)) - printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!is_unicode($row['col_time']) || '' == $row['col_time']) - printf("[006] Expecting unicode/any, got %s/%s\n", gettype($row['col_time']), $row['col_time']); - - if (!is_unicode($row['col_timestamp']) || '' == $row['col_timestamp']) - printf("[007] Expecting unicode/any, got %s/%s\n", gettype($row['col_timestamp']), $row['col_timestamp']); - - if (!is_unicode($row['col_datetime']) || '' == $row['col_datetime']) - printf("[008] Expecting unicode/any, got %s/%s\n", gettype($row['col_datetime']), $row['col_datetime']); - - if (!is_unicode($row['col_date']) || '' == $row['col_date']) - printf("[009] Expecting unicode/any, got %s/%s\n", gettype($row['col_date']), $row['col_date']); - - mysqli_free_result($res); - - if (true !== ($tmp = mysqli_set_opt($link, MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, 0))) - printf("[010] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); - - if (!$res = mysqli_query($link, 'SELECT * FROM test')) - printf("[011] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!$row = mysqli_fetch_assoc($res)) - printf("[012] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (is_unicode($row['col_time']) || '' == $row['col_time']) - printf("[013] Expecting (binary) string/any, got %s/%s\n", gettype($row['col_time']), $row['col_time']); - - if (is_unicode($row['col_timestamp']) || '' == $row['col_timestamp']) - printf("[014] Expecting (binary) string/any, got %s/%s\n", gettype($row['col_timestamp']), $row['col_timestamp']); - - if (is_unicode($row['col_datetime']) || '' == $row['col_datetime']) - printf("[015] Expecting (binary) string/any, got %s/%s\n", gettype($row['col_datetime']), $row['col_datetime']); - - if (is_unicode($row['col_date']) || '' == $row['col_date']) - printf("[016] Expecting (binary) string/any, got %s/%s\n", gettype($row['col_date']), $row['col_date']); - - mysqli_free_result($res); - - if (true !== ($tmp = mysqli_set_opt($link, MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, 1))) - printf("[017] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); - - if (!$res = mysqli_query($link, 'SELECT * FROM test')) - printf("[018] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!$row = mysqli_fetch_assoc($res)) - printf("[019] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - if (!is_unicode($row['col_time']) || '' == $row['col_time']) - printf("[020] Expecting unicode/any, got %s/%s\n", gettype($row['col_time']), $row['col_time']); - - mysqli_free_result($res); - - if (!$stmt = mysqli_stmt_init($link)) - printf("[021] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - $col_date = $col_time = $col_datetime = $col_timestamp = null; - if (!mysqli_stmt_prepare($stmt, 'SELECT col_date, col_time, col_datetime, col_timestamp FROM test') || - !mysqli_stmt_execute($stmt) || - !mysqli_stmt_bind_result($stmt, $col_date, $col_time, $col_datetime, $col_timestamp) || - !mysqli_stmt_fetch($stmt)) - printf("[022] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); - - if (!is_unicode($col_date) || '' == $col_date) - printf("[023] Expecting unicode/any, got %s/%s\n", gettype($col_date), $col_date); - - if (!is_unicode($col_time) || '' == $col_time) - printf("[024] Expecting unicode/any, got %s/%s\n", gettype($col_time), $col_time); - - if (!is_unicode($col_datetime) || '' == $col_datetime) - printf("[025] Expecting unicode/any, got %s/%s\n", gettype($col_datetime), $col_datetime); - - if (!is_unicode($col_timestamp) || '' == $col_timestamp) - printf("[026] Expecting unicode/any, got %s/%s\n", gettype($col_timestamp), $col_timestamp); - - mysqli_stmt_close($stmt); - - if (true !== ($tmp = mysqli_set_opt($link, MYSQLI_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, 0))) - printf("[027] Expecting boolean/true, got %s/%s\n", gettype($tmp), $tmp); - - if (!$stmt = mysqli_stmt_init($link)) - printf("[028] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); - - $col_date = $col_time = $col_datetime = $col_timestamp = null; - if (!mysqli_stmt_prepare($stmt, 'SELECT col_date, col_time, col_datetime, col_timestamp FROM test') || - !mysqli_stmt_execute($stmt) || - !mysqli_stmt_bind_result($stmt, $col_date, $col_time, $col_datetime, $col_timestamp) || - !mysqli_stmt_fetch($stmt)) - printf("[029] [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); - - if (is_unicode($col_date) || '' == $col_date) - printf("[030] Expecting (binary) string/any, got %s/%s\n", gettype($col_date), $col_date); - - if (is_unicode($col_time) || '' == $col_time) - printf("[031] Expecting (binary) string/any, got %s/%s\n", gettype($col_time), $col_time); - - if (is_unicode($col_datetime) || '' == $col_datetime) - printf("[032] Expecting (binary) string/any, got %s/%s\n", gettype($col_datetime), $col_datetime); - - if (is_unicode($col_timestamp) || '' == $col_timestamp) - printf("[033] Expecting (binary) string/any, got %s/%s\n", gettype($col_timestamp), $col_timestamp); - - mysqli_stmt_close($stmt); - - mysqli_close($link); - print "done!"; -?> ---CLEAN-- -<?php - require_once("clean_table.inc"); -?> ---EXPECTF-- -done!
\ No newline at end of file diff --git a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt index 4765d6487..b8dd11a69 100644 --- a/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt +++ b/ext/mysqli/tests/mysqli_stmt_affected_rows.phpt @@ -99,7 +99,7 @@ require_once('skipifconnectfailure.inc'); if (!($res = mysqli_query($link, "SELECT count(id) AS num FROM test")) || !($tmp = mysqli_fetch_assoc($res))) - printf("[017] [%d] %s\n", mysqli_errnor($link), mysqli_error($link)); + printf("[017] [%d] %s\n", mysqli_error($link), mysqli_error($link)); $num = (int)$tmp['num']; mysqli_free_result($res); diff --git a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt index 5ff6e5e45..82e0121a3 100644 --- a/ext/mysqli/tests/mysqli_stmt_attr_set.phpt +++ b/ext/mysqli/tests/mysqli_stmt_attr_set.phpt @@ -45,18 +45,15 @@ require_once('skipifconnectfailure.inc'); printf("[005] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); $stmt->prepare("SELECT * FROM test"); - - mt_srand(microtime(true)); - /* mysqlnd detects invalid attributes, libmysql does not AFAIK */ - $invalid_ret = ($IS_MYSQLND) ? false : true; + mt_srand(microtime(true)); for ($i = -100; $i < 1000; $i++) { if (in_array($i, $valid_attr)) continue; $invalid_attr = $i; - if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { - printf("[006a] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp); + if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { + printf("[006a] Expecting boolean/false for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp); } } @@ -64,8 +61,8 @@ require_once('skipifconnectfailure.inc'); do { $invalid_attr = mt_rand(-1 * (min(4294967296, PHP_INT_MAX) + 1), min(4294967296, PHP_INT_MAX)); } while (in_array($invalid_attr, $valid_attr)); - if ($invalid_ret !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { - printf("[006b] Expecting boolean/%s for attribute %d, got %s/%s\n", $invalid_ret, $invalid_attr, gettype($tmp), $tmp); + if (false !== ($tmp = @mysqli_stmt_attr_set($stmt, $invalid_attr, 0))) { + printf("[006b] Expecting boolean/false for attribute %d, got %s/%s\n", $invalid_attr, gettype($tmp), $tmp); } } $stmt->close(); diff --git a/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt b/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt new file mode 100644 index 000000000..29a5ee3fb --- /dev/null +++ b/ext/mysqli/tests/mysqli_stmt_bind_param_many_columns.phpt @@ -0,0 +1,103 @@ +--TEST-- +mysqli_stmt_bind_param() - Binding with very high number of columns +--SKIPIF-- +<?php +require_once('skipif.inc'); +require_once('skipifemb.inc'); +require_once('skipifconnectfailure.inc'); +?> +--INI-- +memory_limit=256M +--FILE-- +<?php + /* + The way we test the INSERT and data types overlaps with + the mysqli_stmt_bind_result test in large parts. There is only + one difference. This test uses mysqli_query()/mysqli_fetch_assoc() to + fetch the inserted values. This way we test + mysqli_query()/mysqli_fetch_assoc() for all possible data types + in this file and we test mysqli_stmt_bind_result() in the other + test -- therefore the "duplicate" makes some sense to me. + */ + require_once("connect.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); + exit(1); + } + + $cols = 2500; + + list($old_max_allowed_packet) = $link->query("SELECT @@max_allowed_packet")->fetch_row(); + if (!$link->query("SET GLOBAL max_allowed_packet=(2<<29)")) { + if (1227 == mysqli_errno($link)) { + /* [1227] Access denied; you need the SUPER privilege for this operation */ + $cols = 10; + } else { + $cols = 10; + printf("[002] Failed to set max_allowed_packet the test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + } + } + mysqli_close($link); + + + if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) { + printf("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 (!mysqli_query($link, 'DROP TABLE IF EXISTS test')) { + printf("Failed to drop old test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + exit(1); + } + + $str = array(); + for ($i = 1; $i <= $cols; $i++) { + $str[] ="a$i BLOB"; + } + $link->query("CREATE TABLE test(" . implode(" , ", $str) . ") ENGINE=MyISAM"); + if (mysqli_errno($link)) { + printf("Failed to create the test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + die(""); + } + $stmt = $link->prepare("INSERT INTO test VALUES(".str_repeat("?, ", $cols-1) . "?)"); + var_dump($stmt->id); + $s = str_repeat("a", 2 << 12); + $eval_str="\$stmt->bind_param(\"".str_repeat("s",$cols)."\", "; + for ($i = 1; $i < $cols; $i++) { + $eval_str.="\$s,"; + } + $eval_str.="\$s"; + $eval_str.=");"; + eval($eval_str); + printf("executing\n"); + if (!$stmt->execute()) { + printf("failed"); + printf("Failed to execute: [%d] %s\n", mysqli_stmt_errno($stmt), mysqli_stmt_error($stmt)); + } else { + var_dump(true); + } + + mysqli_stmt_close($stmt); + + + if (!$link->query("SET GLOBAL max_allowed_packet=$old_max_allowed_packet")) { + if (1227 != mysqli_errno($link)) + printf("Failed to set max_allowed_packet the test table: [%d] %s\n", mysqli_errno($link), mysqli_error($link)); + } + + mysqli_close($link); + + print "done!"; +?> +--CLEAN-- +<?php + require_once("clean_table.inc"); +?> +--EXPECTF-- +int(1) +executing +bool(true) +done! diff --git a/ext/mysqli/tests/mysqli_stmt_execute.phpt b/ext/mysqli/tests/mysqli_stmt_execute.phpt index 61763864e..85ae80c51 100644 --- a/ext/mysqli/tests/mysqli_stmt_execute.phpt +++ b/ext/mysqli/tests/mysqli_stmt_execute.phpt @@ -5,6 +5,12 @@ mysqli_stmt_execute() 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 MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error())); +} +if (mysqli_get_server_version($link) <= 40100) { + die(sprintf('skip Needs MySQL 4.1+, found version %d.', mysqli_get_server_version($link))); +} ?> --FILE-- <?php diff --git a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt index b8ca14eaf..2b0e150de 100644 --- a/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt +++ b/ext/mysqli/tests/mysqli_stmt_get_warnings.phpt @@ -5,6 +5,22 @@ mysqli_stmt_get_warnings() - TODO require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); + +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 (!mysqli_query($link, "DROP TABLE IF EXISTS test") || + !mysqli_query($link, "CREATE TABLE test(id SMALLINT)")) + die(sprintf("skip [%d] %s\n", $link->errno, $link->error)); + +if (!@mysqli_query("INSERT INTO test(id) VALUES (100001)")) + die("skip Strict sql mode seems to be active. We won't get a warning to check for."); + +mysqli_query($link, "DROP TABLE IF EXISTS test"); ?> --FILE-- <?php diff --git a/ext/mysqli/tests/reflection_tools.inc b/ext/mysqli/tests/reflection_tools.inc index a96634b3c..c8338bfa2 100644 --- a/ext/mysqli/tests/reflection_tools.inc +++ b/ext/mysqli/tests/reflection_tools.inc @@ -94,7 +94,7 @@ foreach ($params as $k => $param) $tmp[$param->getName()] = $param; - ksort($tmp, SORT_STRING); +// ksort($tmp, SORT_STRING); foreach ($tmp as $param) inspectParameter($method, $param); } diff --git a/ext/mysqlnd/config9.m4 b/ext/mysqlnd/config9.m4 index f93177663..4a23e101a 100644 --- a/ext/mysqlnd/config9.m4 +++ b/ext/mysqlnd/config9.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config9.m4 292495 2009-12-22 19:30:09Z johannes $ +dnl $Id: config9.m4 298023 2010-04-15 11:01:30Z andrey $ dnl config.m4 for mysqlnd driver @@ -36,6 +36,7 @@ if test "$PHP_MYSQLND_ENABLED" = "yes"; then MYSQLND_LIBS="$MYSQLND_LIBS -lz" fi fi + AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable SSL support]) fi if test "$PHP_MYSQLND_ENABLED" = "yes" || test "$PHP_MYSQLI" != "no"; then diff --git a/ext/mysqlnd/mysqlnd.c b/ext/mysqlnd/mysqlnd.c index 31fb47ae8..d0f2c1c20 100644 --- a/ext/mysqlnd/mysqlnd.c +++ b/ext/mysqlnd/mysqlnd.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd.c 300635 2010-06-21 15:32:26Z andrey $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -30,9 +30,6 @@ /* for php_get_current_user() */ #include "ext/standard/basic_functions.h" -/* the server doesn't support 4byte utf8, but let's make it forward compatible */ -#define MYSQLND_MAX_ALLOWED_USER_LEN 256 /* 64 char * 4byte */ -#define MYSQLND_MAX_ALLOWED_DB_LEN 256 /* 64 char * 4byte */ /* TODO : - Don't bind so tightly the metadata with the result set. This means @@ -57,15 +54,18 @@ extern MYSQLND_CHARSET *mysqlnd_charsets; -PHPAPI const char * const mysqlnd_old_passwd = "mysqlnd cannot connect to MySQL 4.1+ using old authentication"; +PHPAPI const char * const mysqlnd_old_passwd = "mysqlnd cannot connect to MySQL 4.1+ using the old insecure authentication. " +"Please use an administration tool to reset your password with the command SET PASSWORD = PASSWORD('your_existing_password'). This will " +"store a new, and more secure, hash value in mysql.user. If this user is used in other scripts executed by PHP 5.2 or earlier you might need to remove the old-passwords " +"flag from your my.cnf file"; + PHPAPI const char * const mysqlnd_server_gone = "MySQL server has gone away"; PHPAPI const char * const mysqlnd_out_of_sync = "Commands out of sync; you can't run this command now"; +PHPAPI const char * const mysqlnd_out_of_memory = "Out of memory"; PHPAPI MYSQLND_STATS *mysqlnd_global_stats = NULL; static zend_bool mysqlnd_library_initted = FALSE; -static enum_func_status mysqlnd_send_close(MYSQLND * conn TSRMLS_DC); - static struct st_mysqlnd_conn_methods *mysqlnd_conn_methods; /* {{{ mysqlnd_library_end */ @@ -82,7 +82,7 @@ PHPAPI void mysqlnd_library_end(TSRMLS_D) /* {{{ mysqlnd_conn::free_options */ static void -MYSQLND_METHOD(mysqlnd_conn, free_options)(MYSQLND *conn TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, free_options)(MYSQLND * conn TSRMLS_DC) { zend_bool pers = conn->persistent; @@ -107,32 +107,13 @@ MYSQLND_METHOD(mysqlnd_conn, free_options)(MYSQLND *conn TSRMLS_DC) mnd_pefree(conn->options.cfg_section, pers); conn->options.cfg_section = NULL; } - if (conn->options.ssl_key) { - mnd_pefree(conn->options.ssl_key, pers); - conn->options.ssl_key = NULL; - } - if (conn->options.ssl_cert) { - mnd_pefree(conn->options.ssl_cert, pers); - conn->options.ssl_cert = NULL; - } - if (conn->options.ssl_ca) { - mnd_pefree(conn->options.ssl_ca, pers); - conn->options.ssl_ca = NULL; - } - if (conn->options.ssl_capath) { - mnd_pefree(conn->options.ssl_capath, pers); - conn->options.ssl_capath = NULL; - } - if (conn->options.ssl_cipher) { - mnd_pefree(conn->options.ssl_cipher, pers); - conn->options.ssl_cipher = NULL; - } } +/* }}} */ /* {{{ mysqlnd_conn::free_contents */ static void -MYSQLND_METHOD(mysqlnd_conn, free_contents)(MYSQLND *conn TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, free_contents)(MYSQLND * conn TSRMLS_DC) { zend_bool pers = conn->persistent; @@ -140,12 +121,13 @@ MYSQLND_METHOD(mysqlnd_conn, free_contents)(MYSQLND *conn TSRMLS_DC) mysqlnd_local_infile_default(conn); if (conn->current_result) { - conn->current_result->m.free_result_contents(conn->current_result TSRMLS_CC); - mnd_efree(conn->current_result); + conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC); conn->current_result = NULL; } - conn->net->m.free_contents(conn->net TSRMLS_CC); + if (conn->net) { + conn->net->m.free_contents(conn->net TSRMLS_CC); + } DBG_INF("Freeing memory of members"); @@ -208,7 +190,7 @@ MYSQLND_METHOD(mysqlnd_conn, free_contents)(MYSQLND *conn TSRMLS_DC) /* {{{ mysqlnd_conn::dtor */ static void -MYSQLND_METHOD_PRIVATE(mysqlnd_conn, dtor)(MYSQLND *conn TSRMLS_DC) +MYSQLND_METHOD_PRIVATE(mysqlnd_conn, dtor)(MYSQLND * conn TSRMLS_DC) { DBG_ENTER("mysqlnd_conn::dtor"); DBG_INF_FMT("conn=%llu", conn->thread_id); @@ -241,22 +223,26 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn, dtor)(MYSQLND *conn TSRMLS_DC) /* {{{ mysqlnd_conn::simple_command_handle_response */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND *conn, enum mysqlnd_packet_type ok_packet, - zend_bool silent, enum php_mysqlnd_server_command command, - zend_bool ignore_upsert_status TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND * conn, enum mysqlnd_packet_type ok_packet, + zend_bool silent, enum php_mysqlnd_server_command command, + zend_bool ignore_upsert_status TSRMLS_DC) { - enum_func_status ret; + enum_func_status ret = FAIL; DBG_ENTER("mysqlnd_conn::simple_command_handle_response"); - DBG_INF_FMT("silent=%d packet=%d command=%s", silent, ok_packet, mysqlnd_command_to_text[command]); + DBG_INF_FMT("silent=%u packet=%u command=%s", silent, ok_packet, mysqlnd_command_to_text[command]); switch (ok_packet) { case PROT_OK_PACKET:{ MYSQLND_PACKET_OK * ok_response = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); + if (!ok_response) { + SET_OOM_ERROR(conn->error_info); + break; + } if (FAIL == (ret = PACKET_READ(ok_response, conn))) { if (!silent) { DBG_ERR_FMT("Error while reading %s's OK packet", mysqlnd_command_to_text[command]); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading %s's OK packet. PID=%d", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading %s's OK packet. PID=%u", mysqlnd_command_to_text[command], getpid()); } } else { @@ -294,25 +280,27 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND *conn, enum } case PROT_EOF_PACKET:{ MYSQLND_PACKET_EOF * ok_response = conn->protocol->m.get_eof_packet(conn->protocol, FALSE TSRMLS_CC); + if (!ok_response) { + SET_OOM_ERROR(conn->error_info); + break; + } if (FAIL == (ret = PACKET_READ(ok_response, conn))) { SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet"); if (!silent) { DBG_ERR_FMT("Error while reading %s's EOF packet", mysqlnd_command_to_text[command]); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading %s's EOF packet. PID=%d", - mysqlnd_command_to_text[command], getpid()); + mysqlnd_command_to_text[command], getpid()); } } else if (0xFF == ok_response->field_count) { /* The server signalled error. Set the error */ SET_CLIENT_ERROR(conn->error_info, ok_response->error_no, ok_response->sqlstate, ok_response->error); SET_ERROR_AFF_ROWS(conn); } else if (0xFE != ok_response->field_count) { - SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, - "Malformed packet"); + SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet"); if (!silent) { DBG_ERR_FMT("EOF packet expected, field count wasn't 0xFE but 0x%2X", ok_response->field_count); - php_error_docref(NULL TSRMLS_CC, E_WARNING, - "EOF packet expected, field count wasn't 0xFE but 0x%2X", + php_error_docref(NULL TSRMLS_CC, E_WARNING, "EOF packet expected, field count wasn't 0xFE but 0x%2X", ok_response->field_count); } } else { @@ -322,11 +310,8 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND *conn, enum break; } default: - ret = FAIL; - SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, - "Malformed packet"); - php_error_docref(NULL TSRMLS_CC, E_ERROR, "Wrong response packet %d passed to the function", - ok_packet); + SET_CLIENT_ERROR(conn->error_info, CR_MALFORMED_PACKET, UNKNOWN_SQLSTATE, "Malformed packet"); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Wrong response packet %u passed to the function", ok_packet); break; } DBG_INF(ret == PASS ? "PASS":"FAIL"); @@ -337,7 +322,7 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response)(MYSQLND *conn, enum /* {{{ mysqlnd_conn::simple_command */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command, +MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND * conn, enum php_mysqlnd_server_command command, const char * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC) { @@ -345,7 +330,7 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_ser MYSQLND_PACKET_COMMAND * cmd_packet; DBG_ENTER("mysqlnd_conn::simple_command"); - DBG_INF_FMT("command=%s ok_packet=%d silent=%d", mysqlnd_command_to_text[command], ok_packet, silent); + DBG_INF_FMT("command=%s ok_packet=%u silent=%u", mysqlnd_command_to_text[command], ok_packet, silent); switch (CONN_GET_STATE(conn)) { case CONN_READY: @@ -355,9 +340,8 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_ser DBG_ERR("Server is gone"); DBG_RETURN(FAIL); default: - SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, - mysqlnd_out_of_sync); - DBG_ERR("Command out of sync"); + SET_CLIENT_ERROR(conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); + DBG_ERR_FMT("Command out of sync. State=%u", CONN_GET_STATE(conn)); DBG_RETURN(FAIL); } @@ -369,6 +353,11 @@ MYSQLND_METHOD(mysqlnd_conn, simple_command)(MYSQLND *conn, enum php_mysqlnd_ser SET_EMPTY_ERROR(conn->error_info); cmd_packet = conn->protocol->m.get_command_packet(conn->protocol, FALSE TSRMLS_CC); + if (!cmd_packet) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); + } + cmd_packet->command = command; if (arg && arg_len) { cmd_packet->argument = arg; @@ -411,7 +400,7 @@ MYSQLND_METHOD(mysqlnd_conn, set_server_option)(MYSQLND * const conn, enum_mysql /* {{{ _mysqlnd_restart_psession */ -PHPAPI void _mysqlnd_restart_psession(MYSQLND *conn TSRMLS_DC) +PHPAPI void _mysqlnd_restart_psession(MYSQLND * conn TSRMLS_DC) { DBG_ENTER("_mysqlnd_restart_psession"); conn->m->restart_psession(conn TSRMLS_CC); @@ -421,7 +410,7 @@ PHPAPI void _mysqlnd_restart_psession(MYSQLND *conn TSRMLS_DC) /* {{{ _mysqlnd_end_psession */ -PHPAPI void _mysqlnd_end_psession(MYSQLND *conn TSRMLS_DC) +PHPAPI void _mysqlnd_end_psession(MYSQLND * conn TSRMLS_DC) { DBG_ENTER("_mysqlnd_end_psession"); conn->m->end_psession(conn TSRMLS_CC); @@ -455,9 +444,126 @@ MYSQLND_METHOD(mysqlnd_conn, end_psession)(MYSQLND * conn TSRMLS_DC) /* }}} */ +#define MYSQLND_ASSEBLED_PACKET_MAX_SIZE 3UL*1024UL*1024UL*1024UL +/* {{{ mysqlnd_connect_run_authentication */ +static enum_func_status +mysqlnd_connect_run_authentication( + MYSQLND * conn, + const char * const user, + const char * const passwd, + const char * const db, + size_t db_len, + const MYSQLND_PACKET_GREET * const greet_packet, + const MYSQLND_OPTIONS * const options, + unsigned long mysql_flags + TSRMLS_DC) +{ + const MYSQLND_CHARSET * charset = NULL; + enum_func_status ret = FAIL; + MYSQLND_PACKET_AUTH * auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE TSRMLS_CC); + MYSQLND_PACKET_OK * ok_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); + + DBG_ENTER("mysqlnd_connect_run_authentication"); + + if (!auth_packet || !ok_packet) { + SET_OOM_ERROR(conn->error_info); + goto err; + } + +#ifdef MYSQLND_SSL_SUPPORTED + if ((greet_packet->server_capabilities & CLIENT_SSL) && (mysql_flags & CLIENT_SSL)) { + auth_packet->send_half_packet = TRUE; + } +#endif + auth_packet->user = user; + auth_packet->password = passwd; + + if (options->charset_name && (charset = mysqlnd_find_charset_name(options->charset_name))) { + auth_packet->charset_no = charset->nr; + } else { +#if PHP_MAJOR_VERSION >= 6 + auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */ +#else + auth_packet->charset_no = greet_packet->charset_no; +#endif + } + auth_packet->db = db; + auth_packet->db_len = db_len; + auth_packet->max_packet_size= MYSQLND_ASSEBLED_PACKET_MAX_SIZE; + auth_packet->client_flags= mysql_flags; + + conn->scramble = auth_packet->server_scramble_buf = mnd_pemalloc(SCRAMBLE_LENGTH, conn->persistent); + if (!conn->scramble) { + SET_OOM_ERROR(conn->error_info); + goto err; + } + memcpy(auth_packet->server_scramble_buf, greet_packet->scramble_buf, SCRAMBLE_LENGTH); + + if (!PACKET_WRITE(auth_packet, conn)) { + CONN_SET_STATE(conn, CONN_QUIT_SENT); + SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); + goto err; + } + +#ifdef MYSQLND_SSL_SUPPORTED + if (auth_packet->send_half_packet) { + zend_bool verify = mysql_flags & CLIENT_SSL_VERIFY_SERVER_CERT? TRUE:FALSE; + DBG_INF("Switching to SSL"); + + conn->net->m.set_client_option(conn->net, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, (const char *) &verify TSRMLS_CC); + + if (FAIL == conn->net->m.enable_ssl(conn->net TSRMLS_CC)) { + goto err; + } + + auth_packet->send_half_packet = FALSE; + if (!PACKET_WRITE(auth_packet, conn)) { + CONN_SET_STATE(conn, CONN_QUIT_SENT); + SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); + goto err; + } + } +#endif + + + if (FAIL == PACKET_READ(ok_packet, conn) || ok_packet->field_count >= 0xFE) { + if (ok_packet->field_count == 0xFE) { + /* old authentication with new server !*/ + DBG_ERR(mysqlnd_old_passwd); + SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); + } else if (ok_packet->field_count == 0xFF) { + if (ok_packet->sqlstate[0]) { + strlcpy(conn->error_info.sqlstate, ok_packet->sqlstate, sizeof(conn->error_info.sqlstate)); + DBG_ERR_FMT("ERROR:%u [SQLSTATE:%s] %s", ok_packet->error_no, ok_packet->sqlstate, ok_packet->error); + } + conn->error_info.error_no = ok_packet->error_no; + strlcpy(conn->error_info.error, ok_packet->error, sizeof(conn->error_info.error)); + } + goto err; + } + + SET_NEW_MESSAGE(conn->last_message, conn->last_message_len, + ok_packet->message, ok_packet->message_len, + conn->persistent); + conn->charset = mysqlnd_find_charset_nr(auth_packet->charset_no); + ret = PASS; +err: + PACKET_FREE(auth_packet); + PACKET_FREE(ok_packet); + DBG_RETURN(ret); +} +/* }}} */ + + +#define MYSQLND_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_TRANSACTIONS | \ + CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION | \ + CLIENT_MULTI_RESULTS) + + + /* {{{ mysqlnd_conn::connect */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND *conn, +MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND * conn, const char *host, const char *user, const char *passwd, unsigned int passwd_len, const char *db, unsigned int db_len, @@ -466,32 +572,27 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND *conn, unsigned int mysql_flags TSRMLS_DC) { - char *transport = NULL, *errstr = NULL; - int transport_len, errcode = 0, host_len; - zend_bool self_alloced = FALSE; + char *errstr = NULL; + int errcode = 0, host_len; zend_bool unix_socket = FALSE; - const MYSQLND_CHARSET * charset; zend_bool reconnect = FALSE; zend_bool saved_compression = FALSE; MYSQLND_PACKET_GREET * greet_packet = NULL; - MYSQLND_PACKET_AUTH * auth_packet = NULL; - MYSQLND_PACKET_OK * ok_packet = NULL; DBG_ENTER("mysqlnd_conn::connect"); - DBG_INF_FMT("host=%s user=%s db=%s port=%d flags=%d persistent=%d state=%d", + DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u persistent=%u state=%u", host?host:"", user?user:"", db?db:"", port, mysql_flags, conn? conn->persistent:0, conn? CONN_GET_STATE(conn):-1); if (conn && CONN_GET_STATE(conn) > CONN_ALLOCED && CONN_GET_STATE(conn) ) { - DBG_INF_FMT("state=%d", CONN_GET_STATE(conn)); DBG_INF("Connecting on a connected handle."); if (CONN_GET_STATE(conn) < CONN_QUIT_SENT) { MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_CLOSE_IMPLICIT); reconnect = TRUE; - mysqlnd_send_close(conn TSRMLS_CC); + conn->m->send_close(conn TSRMLS_CC); } conn->m->free_contents(conn TSRMLS_CC); @@ -514,50 +615,63 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND *conn, if (!host || !host[0]) { host = "localhost"; } - if (!user || !user[0]) { - user = php_get_current_user(); + if (!user) { + DBG_INF_FMT("no user given, using empty string"); + user = ""; } if (!passwd) { + DBG_INF_FMT("no password given, using empty string"); passwd = ""; passwd_len = 0; } if (!db) { + DBG_INF_FMT("no db given, using empty string"); db = ""; db_len = 0; } - if (!port && !socket) { - port = 3306; - } + host_len = strlen(host); + { + char * transport = NULL; + int transport_len; #ifndef PHP_WIN32 - if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) { - if (!socket) { - socket = "/tmp/mysql.sock"; - } - transport_len = spprintf(&transport, 0, "unix://%s", socket); - unix_socket = TRUE; - } else + if (host_len == sizeof("localhost") - 1 && !strncasecmp(host, "localhost", host_len)) { + DBG_INF_FMT("socket=%s", socket? socket:"n/a"); + if (!socket) { + socket = "/tmp/mysql.sock"; + } + transport_len = spprintf(&transport, 0, "unix://%s", socket); + unix_socket = TRUE; + } else #endif - { - transport_len = spprintf(&transport, 0, "tcp://%s:%d", host, port); + { + if (!port) { + port = 3306; + } + transport_len = spprintf(&transport, 0, "tcp://%s:%u", host, port); + } + if (!transport) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ + } + DBG_INF_FMT("transport=%s", transport); + conn->scheme = mnd_pestrndup(transport, transport_len, conn->persistent); + conn->scheme_len = transport_len; + efree(transport); /* allocated by spprintf */ + transport = NULL; + if (!conn->scheme) { + goto err; /* OOM */ + } } - DBG_INF_FMT("transport=%s", transport); - greet_packet = conn->protocol->m.get_greet_packet(conn->protocol, FALSE TSRMLS_CC); - auth_packet = conn->protocol->m.get_auth_packet(conn->protocol, FALSE TSRMLS_CC); - ok_packet = conn->protocol->m.get_ok_packet(conn->protocol, FALSE TSRMLS_CC); - - if (conn->persistent) { - conn->scheme = pestrndup(transport, transport_len, 1); - mnd_efree(transport); - } else { - conn->scheme = transport; + if (!greet_packet) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ } - conn->scheme_len = transport_len; - DBG_INF(conn->scheme); - if (FAIL == conn->net->m.connect(conn->net, conn->scheme, transport_len, conn->persistent, &errstr, &errcode TSRMLS_CC)) { - goto err; + + if (FAIL == conn->net->m.connect(conn->net, conn->scheme, conn->scheme_len, conn->persistent, &errstr, &errcode TSRMLS_CC)) { + goto err; } DBG_INF_FMT("stream=%p", conn->net->stream); @@ -567,7 +681,7 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND *conn, php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error while reading greeting packet. PID=%d", getpid()); goto err; } else if (greet_packet->error_no) { - DBG_ERR_FMT("errorno=%d error=%s", greet_packet->error_no, greet_packet->error); + DBG_ERR_FMT("errorno=%u error=%s", greet_packet->error_no, greet_packet->error); SET_CLIENT_ERROR(conn->error_info, greet_packet->error_no, greet_packet->sqlstate, greet_packet->error); goto err; } else if (greet_packet->pre41) { @@ -581,64 +695,46 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND *conn, conn->thread_id = greet_packet->thread_id; conn->protocol_version = greet_packet->protocol_version; - conn->server_version = pestrdup(greet_packet->server_version, conn->persistent); + conn->server_version = mnd_pestrdup(greet_packet->server_version, conn->persistent); conn->greet_charset = mysqlnd_find_charset_nr(greet_packet->charset_no); /* we allow load data local infile by default */ - mysql_flags |= CLIENT_LOCAL_FILES | CLIENT_PS_MULTI_RESULTS; + mysql_flags |= CLIENT_LOCAL_FILES | CLIENT_PS_MULTI_RESULTS; + mysql_flags |= MYSQLND_CAPABILITIES; + + if (db) { + mysql_flags |= CLIENT_CONNECT_WITH_DB; + } + + if (PG(open_basedir) && strlen(PG(open_basedir))) { + mysql_flags ^= CLIENT_LOCAL_FILES; + } + #ifndef MYSQLND_COMPRESSION_ENABLED if (mysql_flags & CLIENT_COMPRESS) { mysql_flags &= ~CLIENT_COMPRESS; } #endif - - auth_packet->user = user; - auth_packet->password = passwd; - - if (conn->options.charset_name && - (charset = mysqlnd_find_charset_name(conn->options.charset_name))) - { - auth_packet->charset_no = charset->nr; - } else { -#if PHP_MAJOR_VERSION >= 6 - auth_packet->charset_no = 200;/* utf8 - swedish collation, check mysqlnd_charset.c */ +#ifndef MYSQLND_SSL_SUPPORTED + if (mysql_flags & CLIENT_SSL) { + mysql_flags &= ~CLIENT_SSL; + } #else - auth_packet->charset_no = greet_packet->charset_no; -#endif + if (conn->net->options.ssl_key || conn->net->options.ssl_cert || + conn->net->options.ssl_ca || conn->net->options.ssl_capath || conn->net->options.ssl_cipher) + { + mysql_flags |= CLIENT_SSL; } - auth_packet->db = db; - auth_packet->db_len = db_len; - auth_packet->max_packet_size= 3UL*1024UL*1024UL*1024UL; - auth_packet->client_flags= mysql_flags; +#endif - conn->scramble = auth_packet->server_scramble_buf = mnd_pemalloc(SCRAMBLE_LENGTH, conn->persistent); - memcpy(auth_packet->server_scramble_buf, greet_packet->scramble_buf, SCRAMBLE_LENGTH); - if (!PACKET_WRITE(auth_packet, conn)) { - CONN_SET_STATE(conn, CONN_QUIT_SENT); - SET_CLIENT_ERROR(conn->error_info, CR_SERVER_GONE_ERROR, UNKNOWN_SQLSTATE, mysqlnd_server_gone); + if (FAIL == mysqlnd_connect_run_authentication(conn, user, passwd, db, db_len, greet_packet, &conn->options, mysql_flags TSRMLS_CC)) { goto err; } - if (FAIL == PACKET_READ(ok_packet, conn) || ok_packet->field_count >= 0xFE) { - if (ok_packet->field_count == 0xFE) { - /* old authentication with new server !*/ - DBG_ERR(mysqlnd_old_passwd); - SET_CLIENT_ERROR(conn->error_info, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, mysqlnd_old_passwd); - } else if (ok_packet->field_count == 0xFF) { - if (ok_packet->sqlstate[0]) { - if (!self_alloced) { - strlcpy(conn->error_info.sqlstate, ok_packet->sqlstate, sizeof(conn->error_info.sqlstate)); - } - DBG_ERR_FMT("ERROR:%d [SQLSTATE:%s] %s", ok_packet->error_no, ok_packet->sqlstate, ok_packet->error); - } - if (!self_alloced) { - conn->error_info.error_no = ok_packet->error_no; - strlcpy(conn->error_info.error, ok_packet->error, sizeof(conn->error_info.error)); - } - } - } else { + { CONN_SET_STATE(conn, CONN_READY); - if (!self_alloced && saved_compression) { + + if (saved_compression) { conn->net->compressed = TRUE; } /* @@ -648,108 +744,113 @@ MYSQLND_METHOD(mysqlnd_conn, connect)(MYSQLND *conn, */ conn->net->compressed = mysql_flags & CLIENT_COMPRESS? TRUE:FALSE; - conn->user = pestrdup(user, conn->persistent); + conn->user = mnd_pestrdup(user, conn->persistent); conn->user_len = strlen(conn->user); - conn->passwd = pestrndup(passwd, passwd_len, conn->persistent); + conn->passwd = mnd_pestrndup(passwd, passwd_len, conn->persistent); conn->passwd_len = passwd_len; conn->port = port; - conn->connect_or_select_db = pestrndup(db, db_len, conn->persistent); + conn->connect_or_select_db = mnd_pestrndup(db, db_len, conn->persistent); conn->connect_or_select_db_len = db_len; - if (!unix_socket) { - char *p; + if (!conn->user || !conn->passwd || !conn->connect_or_select_db) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ + } - conn->host = pestrdup(host, conn->persistent); + if (!unix_socket) { + conn->host = mnd_pestrdup(host, conn->persistent); + if (!conn->host) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ + } conn->host_len = strlen(conn->host); - spprintf(&p, 0, "%s via TCP/IP", conn->host); - if (conn->persistent) { - conn->host_info = pestrdup(p, 1); - mnd_efree(p); - } else { - conn->host_info = p; + { + char *p; + spprintf(&p, 0, "%s via TCP/IP", conn->host); + if (!p) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ + } + conn->host_info = mnd_pestrdup(p, conn->persistent); + efree(p); /* allocated by spprintf */ + if (!conn->host_info) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ + } } } else { - conn->unix_socket = pestrdup(socket, conn->persistent); + conn->unix_socket = mnd_pestrdup(socket, conn->persistent); + conn->host_info = mnd_pestrdup("Localhost via UNIX socket", conn->persistent); + if (!conn->unix_socket || !conn->host_info) { + SET_OOM_ERROR(conn->error_info); + goto err; /* OOM */ + } conn->unix_socket_len = strlen(conn->unix_socket); - conn->host_info = pestrdup("Localhost via UNIX socket", conn->persistent); } - conn->client_flag = auth_packet->client_flags; - conn->max_packet_size = auth_packet->max_packet_size; + conn->client_flag = mysql_flags; + conn->max_packet_size = MYSQLND_ASSEBLED_PACKET_MAX_SIZE; /* todo: check if charset is available */ - conn->charset = mysqlnd_find_charset_nr(auth_packet->charset_no); conn->server_capabilities = greet_packet->server_capabilities; conn->upsert_status.warning_count = 0; conn->upsert_status.server_status = greet_packet->server_status; conn->upsert_status.affected_rows = 0; - SET_NEW_MESSAGE(conn->last_message, conn->last_message_len, - ok_packet->message, ok_packet->message_len, - conn->persistent); SET_EMPTY_ERROR(conn->error_info); mysqlnd_local_infile_default(conn); - { - unsigned int buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/ - conn->m->set_client_option(conn, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *)&buf_size TSRMLS_CC); - } - MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, STAT_CONNECT_SUCCESS, 1, STAT_OPENED_CONNECTIONS, 1); - if (reconnect) { - MYSQLND_INC_GLOBAL_STATISTIC(STAT_RECONNECT); - } - if (conn->persistent) { - MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, STAT_PCONNECT_SUCCESS, 1, STAT_OPENED_PERSISTENT_CONNECTIONS, 1); - } - - DBG_INF_FMT("connection_id=%llu", conn->thread_id); #if PHP_MAJOR_VERSION >= 6 { unsigned int as_unicode = 1; - conn->m->set_client_option(conn, MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, - (char *)&as_unicode TSRMLS_CC); + conn->m->set_client_option(conn, MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE, (char *)&as_unicode TSRMLS_CC); DBG_INF("unicode set"); } #endif - if (conn->options.init_commands) { - int current_command = 0; + unsigned int current_command = 0; for (; current_command < conn->options.num_commands; ++current_command) { const char * const command = conn->options.init_commands[current_command]; - MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_EXECUTED_COUNT); - if (PASS != conn->m->query(conn, command, strlen(command) TSRMLS_CC)) { - MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_FAILED_COUNT); - goto err; - } - if (conn->last_query_type == QUERY_SELECT) { - MYSQLND_RES * result = conn->m->use_result(conn TSRMLS_CC); - result->m.free_result(result, TRUE TSRMLS_CC); + if (command) { + MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_EXECUTED_COUNT); + if (PASS != conn->m->query(conn, command, strlen(command) TSRMLS_CC)) { + MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_INIT_COMMAND_FAILED_COUNT); + goto err; + } + if (conn->last_query_type == QUERY_SELECT) { + MYSQLND_RES * result = conn->m->use_result(conn TSRMLS_CC); + if (result) { + result->m.free_result(result, TRUE TSRMLS_CC); + } + } } } } + + MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, STAT_CONNECT_SUCCESS, 1, STAT_OPENED_CONNECTIONS, 1); + if (reconnect) { + MYSQLND_INC_GLOBAL_STATISTIC(STAT_RECONNECT); + } + if (conn->persistent) { + MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, STAT_PCONNECT_SUCCESS, 1, STAT_OPENED_PERSISTENT_CONNECTIONS, 1); + } + + DBG_INF_FMT("connection_id=%llu", conn->thread_id); + PACKET_FREE(greet_packet); - PACKET_FREE(auth_packet); - PACKET_FREE(ok_packet); DBG_RETURN(PASS); } err: PACKET_FREE(greet_packet); - PACKET_FREE(auth_packet); - PACKET_FREE(ok_packet); if (errstr) { - DBG_ERR_FMT("[%d] %.64s (trying to connect via %s)", errcode, errstr, conn->scheme); + DBG_ERR_FMT("[%u] %.64s (trying to connect via %s)", errcode, errstr, conn->scheme); SET_CLIENT_ERROR(conn->error_info, errcode? errcode:CR_CONNECTION_ERROR, UNKNOWN_SQLSTATE, errstr); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "[%d] %.64s (trying to connect via %s)", errcode, errstr, conn->scheme); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "[%u] %.64s (trying to connect via %s)", errcode, errstr, conn->scheme); /* no mnd_ since we don't allocate it */ efree(errstr); } - if (conn->scheme) { - /* no mnd_ since we don't allocate it */ - pefree(conn->scheme, conn->persistent); - conn->scheme = NULL; - } MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_CONNECT_FAILURE); @@ -768,15 +869,18 @@ PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn, unsigned int mysql_flags TSRMLS_DC) { - enum_func_status ret; + enum_func_status ret = FAIL; zend_bool self_alloced = FALSE; DBG_ENTER("mysqlnd_connect"); - DBG_INF_FMT("host=%s user=%s db=%s port=%d flags=%d", host?host:"", user?user:"", db?db:"", port, mysql_flags); + DBG_INF_FMT("host=%s user=%s db=%s port=%u flags=%u", host?host:"", user?user:"", db?db:"", port, mysql_flags); if (!conn) { - conn = mysqlnd_init(FALSE); self_alloced = TRUE; + if (!(conn = mysqlnd_init(FALSE))) { + /* OOM */ + DBG_RETURN(NULL); + } } ret = conn->m->connect(conn, host, user, passwd, passwd_len, db, db_len, port, socket, mysql_flags TSRMLS_CC); @@ -805,7 +909,7 @@ PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn, Still the result from the query is PASS */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, query)(MYSQLND * conn, const char * query, unsigned int query_len TSRMLS_DC) { enum_func_status ret; DBG_ENTER("mysqlnd_conn::query"); @@ -833,7 +937,7 @@ MYSQLND_METHOD(mysqlnd_conn, query)(MYSQLND *conn, const char *query, unsigned i /* {{{ mysqlnd_conn::send_query */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, send_query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, send_query)(MYSQLND * conn, const char * query, unsigned int query_len TSRMLS_DC) { enum_func_status ret; DBG_ENTER("mysqlnd_conn::send_query"); @@ -858,7 +962,7 @@ MYSQLND_METHOD(mysqlnd_conn, reap_query)(MYSQLND * conn TSRMLS_DC) if (state <= CONN_READY || state == CONN_QUIT_SENT) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Connection not opened, clear or has been closed"); - DBG_ERR_FMT("Connection not opened, clear or has been closed. State=%d", state); + DBG_ERR_FMT("Connection not opened, clear or has been closed. State=%u", state); DBG_RETURN(FAIL); } DBG_RETURN(conn->m->query_read_result_set_header(conn, NULL TSRMLS_CC)); @@ -1055,10 +1159,10 @@ _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQLND ***dont_poll, long s /* {{{ mysqlnd_conn::list_fields */ MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND *conn, const char *table, const char *achtung_wild TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND * conn, const char *table, const char *achtung_wild TSRMLS_DC) { /* db + \0 + wild + \0 (for wild) */ - char buff[MYSQLND_MAX_ALLOWED_DB_LEN * 4 * 2 + 1 + 1], *p; + char buff[MYSQLND_MAX_ALLOWED_DB_LEN * 2 + 1 + 1], *p; size_t table_len, wild_len; MYSQLND_RES *result = NULL; DBG_ENTER("mysqlnd_conn::list_fields"); @@ -1066,14 +1170,16 @@ MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND *conn, const char *table, cons p = buff; if (table && (table_len = strlen(table))) { - memcpy(p, table, MIN(table_len, MYSQLND_MAX_ALLOWED_DB_LEN * 4)); - p += table_len; + size_t to_copy = MIN(table_len, MYSQLND_MAX_ALLOWED_DB_LEN); + memcpy(p, table, to_copy); + p += to_copy; *p++ = '\0'; } if (achtung_wild && (wild_len = strlen(achtung_wild))) { - memcpy(p, achtung_wild, MIN(wild_len, MYSQLND_MAX_ALLOWED_DB_LEN * 4)); - p += wild_len; + size_t to_copy = MIN(wild_len, MYSQLND_MAX_ALLOWED_DB_LEN); + memcpy(p, achtung_wild, to_copy); + p += to_copy; *p++ = '\0'; } @@ -1082,12 +1188,15 @@ MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND *conn, const char *table, cons FALSE, TRUE TSRMLS_CC)) { DBG_RETURN(NULL); } + /* Prepare for the worst case. MyISAM goes to 2500 BIT columns, double it for safety. */ - result = mysqlnd_result_init(5000 TSRMLS_CC); - + result = conn->m->result_init(5000, conn->persistent TSRMLS_CC); + if (!result) { + DBG_RETURN(NULL); + } if (FAIL == result->m.read_result_metadata(result, conn TSRMLS_CC)) { DBG_ERR("Error ocurred while reading metadata"); @@ -1098,6 +1207,12 @@ MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND *conn, const char *table, cons result->type = MYSQLND_RES_NORMAL; result->m.fetch_row = result->m.fetch_row_normal_unbuffered; result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); + if (!result->unbuf) { + /* OOM */ + SET_OOM_ERROR(conn->error_info); + result->m.free_result(result, TRUE TSRMLS_CC); + DBG_RETURN(NULL); + } result->unbuf->eof_reached = TRUE; DBG_RETURN(result); @@ -1107,14 +1222,14 @@ MYSQLND_METHOD(mysqlnd_conn, list_fields)(MYSQLND *conn, const char *table, cons /* {{{ mysqlnd_conn::list_method */ MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_conn, list_method)(MYSQLND *conn, const char *query, const char *achtung_wild, char *par1 TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, list_method)(MYSQLND * conn, const char * query, const char *achtung_wild, char *par1 TSRMLS_DC) { char *show_query = NULL; size_t show_query_len; MYSQLND_RES *result = NULL; DBG_ENTER("mysqlnd_conn::list_method"); - DBG_INF_FMT("conn=%llu query=%s wild=%d", conn->thread_id, query, achtung_wild); + DBG_INF_FMT("conn=%llu query=%s wild=%u", conn->thread_id, query, achtung_wild); if (par1) { if (achtung_wild) { @@ -1134,7 +1249,7 @@ MYSQLND_METHOD(mysqlnd_conn, list_method)(MYSQLND *conn, const char *query, cons result = conn->m->store_result(conn TSRMLS_CC); } if (show_query != query) { - mnd_efree(show_query); + efree(show_query); /* allocated by spprintf */ } DBG_RETURN(result); } @@ -1177,6 +1292,18 @@ PHPAPI ulong mysqlnd_old_escape_string(char *newstr, const char *escapestr, size } /* }}} */ +/* {{{ mysqlnd_conn::ssl_set */ +void +MYSQLND_METHOD(mysqlnd_conn, ssl_set)(MYSQLND * const conn, const char * key, const char * const cert, const char * const ca, const char * const capath, const char * const cipher TSRMLS_DC) +{ + conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_KEY, key TSRMLS_CC); + conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CERT, cert TSRMLS_CC); + conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CA, ca TSRMLS_CC); + conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CAPATH, capath TSRMLS_CC); + conn->net->m.set_client_option(conn->net, MYSQLND_OPT_SSL_CIPHER, cipher TSRMLS_CC); +} +/* }}} */ + /* {{{ mysqlnd_conn::escape_string */ static ulong @@ -1220,10 +1347,15 @@ MYSQLND_METHOD(mysqlnd_conn, select_db)(MYSQLND * const conn, const char * const SET_ERROR_AFF_ROWS(conn); if (ret == PASS) { if (conn->connect_or_select_db) { - pefree(conn->connect_or_select_db, conn->persistent); + mnd_pefree(conn->connect_or_select_db, conn->persistent); } - conn->connect_or_select_db = pestrndup(db, db_len, conn->persistent); + conn->connect_or_select_db = mnd_pestrndup(db, db_len, conn->persistent); conn->connect_or_select_db_len = db_len; + if (!conn->connect_or_select_db) { + /* OOM */ + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + } } DBG_RETURN(ret); } @@ -1246,7 +1378,7 @@ MYSQLND_METHOD(mysqlnd_conn, ping)(MYSQLND * const conn TSRMLS_DC) */ SET_ERROR_AFF_ROWS(conn); - DBG_INF_FMT("ret=%d", ret); + DBG_INF_FMT("ret=%u", ret); DBG_RETURN(ret); } /* }}} */ @@ -1254,7 +1386,7 @@ MYSQLND_METHOD(mysqlnd_conn, ping)(MYSQLND * const conn TSRMLS_DC) /* {{{ mysqlnd_conn::stat */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, stat)(MYSQLND *conn, char **message, unsigned int * message_len TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, stat)(MYSQLND * conn, char **message, unsigned int * message_len TSRMLS_DC) { enum_func_status ret; MYSQLND_PACKET_STATS * stats_header; @@ -1267,13 +1399,17 @@ MYSQLND_METHOD(mysqlnd_conn, stat)(MYSQLND *conn, char **message, unsigned int * DBG_RETURN(FAIL); } stats_header = conn->protocol->m.get_stats_packet(conn->protocol, FALSE TSRMLS_CC); + if (!stats_header) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); + } + if (FAIL == (ret = PACKET_READ(stats_header, conn))) { DBG_RETURN(FAIL); } - *message = stats_header->message; + /* will be freed by Zend, thus don't use the mnd_ allocator */ + *message = estrndup(stats_header->message, stats_header->message_len); *message_len = stats_header->message_len; - /* Ownership transfer */ - stats_header->message = NULL; PACKET_FREE(stats_header); DBG_INF(*message); @@ -1284,7 +1420,7 @@ MYSQLND_METHOD(mysqlnd_conn, stat)(MYSQLND *conn, char **message, unsigned int * /* {{{ mysqlnd_conn::kill */ static enum_func_status -MYSQLND_METHOD(mysqlnd_conn, kill)(MYSQLND *conn, unsigned int pid TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, kill)(MYSQLND * conn, unsigned int pid TSRMLS_DC) { enum_func_status ret; char buff[4]; @@ -1316,7 +1452,7 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_conn, set_charset)(MYSQLND * const conn, const char * const csname TSRMLS_DC) { enum_func_status ret = PASS; - char *query; + char * query; size_t query_len; const MYSQLND_CHARSET * const charset = mysqlnd_find_charset_name(csname); @@ -1338,7 +1474,7 @@ MYSQLND_METHOD(mysqlnd_conn, set_charset)(MYSQLND * const conn, const char * con } else { conn->charset = charset; } - mnd_efree(query); + efree(query); /* allocated by spprintf */ DBG_INF(ret == PASS? "PASS":"FAIL"); DBG_RETURN(ret); @@ -1378,7 +1514,7 @@ MYSQLND_METHOD(mysqlnd_conn, shutdown)(MYSQLND * const conn, uint8_t level TSRML /* {{{ mysqlnd_send_close */ static enum_func_status -mysqlnd_send_close(MYSQLND * conn TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_conn, send_close)(MYSQLND * const conn TSRMLS_DC) { enum_func_status ret = PASS; @@ -1458,7 +1594,7 @@ MYSQLND_METHOD(mysqlnd_conn, close)(MYSQLND * conn, enum_connection_close_type c Close now, free_reference will try, if we are last, but that's not a problem. */ - ret = mysqlnd_send_close(conn TSRMLS_CC); + ret = conn->m->send_close(conn TSRMLS_CC); ret = conn->m->free_reference(conn TSRMLS_CC); @@ -1492,7 +1628,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_conn, free_reference)(MYSQLND * const conn TSRMLS This will free the object too, of course because references has reached zero. */ - ret = mysqlnd_send_close(conn TSRMLS_CC); + ret = conn->m->send_close(conn TSRMLS_CC); conn->m->dtor(conn TSRMLS_CC); } DBG_RETURN(ret); @@ -1515,7 +1651,7 @@ static void MYSQLND_METHOD_PRIVATE(mysqlnd_conn, set_state)(MYSQLND * const conn, enum mysqlnd_connection_state new_state TSRMLS_DC) { DBG_ENTER("mysqlnd_conn::set_state"); - DBG_INF_FMT("New state=%d", new_state); + DBG_INF_FMT("New state=%u", new_state); conn->state = new_state; DBG_VOID_RETURN; } @@ -1686,11 +1822,11 @@ MYSQLND_METHOD(mysqlnd_conn, next_result)(MYSQLND * const conn TSRMLS_DC) So there are no more results and we should just return FALSE, error_no has been set */ if (!conn->error_info.error_no) { - DBG_ERR_FMT("Serious error. %s::%d", __FILE__, __LINE__); + DBG_ERR_FMT("Serious error. %s::%u", __FILE__, __LINE__); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Serious error. PID=%d", getpid()); CONN_SET_STATE(conn, CONN_QUIT_SENT); } else { - DBG_INF_FMT("Error from the server : (%d) %s", conn->error_info.error_no, conn->error_info.error); + DBG_INF_FMT("Error from the server : (%u) %s", conn->error_info.error_no, conn->error_info.error); } } @@ -1761,18 +1897,21 @@ MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, /* 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 - stack overrungs. + buffer overflows. */ size_t user_len; - enum_func_status ret; + 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]; + 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=%d", + 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 = ""; } @@ -1784,7 +1923,7 @@ MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, } /* 1. user ASCIIZ */ - user_len = MIN(strlen(user), MYSQLND_MAX_ALLOWED_DB_LEN); + user_len = MIN(strlen(user), MYSQLND_MAX_ALLOWED_USER_LEN); memcpy(p, user, user_len); p += user_len; *p++ = '\0'; @@ -1800,12 +1939,22 @@ MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, /* 3. db ASCIIZ */ if (db[0]) { - size_t db_len = strlen(db); - memcpy(p, db, MIN(db_len, MYSQLND_MAX_ALLOWED_DB_LEN)); + 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)) { @@ -1813,9 +1962,12 @@ MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, } 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; - PACKET_FREE(chg_user_resp); if (conn->error_info.error_no) { ret = FAIL; @@ -1824,29 +1976,44 @@ MYSQLND_METHOD(mysqlnd_conn, change_user)(MYSQLND * const conn, 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) - { + 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); - PACKET_READ(redundant_error_packet, conn); - PACKET_FREE(redundant_error_packet); - DBG_INF_FMT("Server is %d, buggy, sends two ERR messages", mysqlnd_get_server_version(conn)); + 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) { - mnd_pefree(conn->user, conn->persistent); - conn->user = pestrndup(user, user_len, conn->persistent); - mnd_pefree(conn->passwd, conn->persistent); - conn->passwd = pestrdup(passwd, conn->persistent); + if (conn->user) { + mnd_pefree(conn->user, conn->persistent); + } + conn->user = mnd_pestrndup(user, user_len, conn->persistent); + + if (conn->passwd) { + mnd_pefree(conn->passwd, conn->persistent); + } + conn->passwd = mnd_pestrdup(passwd, conn->persistent); + if (conn->last_message) { mnd_pefree(conn->last_message, conn->persistent); conn->last_message = NULL; } - conn->charset = conn->greet_charset; 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); } - - SET_ERROR_AFF_ROWS(conn); +end: + PACKET_FREE(chg_user_resp); /* Here we should close all statements. Unbuffered queries should not be a @@ -1865,8 +2032,9 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, const char * const value TSRMLS_DC) { + enum_func_status ret = PASS; DBG_ENTER("mysqlnd_conn::set_client_option"); - DBG_INF_FMT("conn=%llu option=%d", conn->thread_id, option); + DBG_INF_FMT("conn=%llu option=%u", conn->thread_id, option); switch (option) { #ifdef WHEN_SUPPORTED_BY_MYSQLI case MYSQL_OPT_COMPRESS: @@ -1875,10 +2043,16 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, case MYSQL_OPT_READ_TIMEOUT: case MYSQL_OPT_WRITE_TIMEOUT: #endif + case MYSQLND_OPT_SSL_KEY: + case MYSQLND_OPT_SSL_CERT: + case MYSQLND_OPT_SSL_CA: + case MYSQLND_OPT_SSL_CAPATH: + case MYSQLND_OPT_SSL_CIPHER: + case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: case MYSQL_OPT_CONNECT_TIMEOUT: case MYSQLND_OPT_NET_CMD_BUFFER_SIZE: case MYSQLND_OPT_NET_READ_BUFFER_SIZE: - conn->net->m.set_client_option(conn->net, option, value TSRMLS_CC); + ret = conn->net->m.set_client_option(conn->net, option, value TSRMLS_CC); break; #if PHP_MAJOR_VERSION >= 6 case MYSQLND_OPT_NUMERIC_AND_DATETIME_AS_UNICODE: @@ -1900,28 +2074,48 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, } break; case MYSQL_INIT_COMMAND: + { + char ** new_init_commands; + char * new_command; DBG_INF("MYSQL_INIT_COMMAND"); DBG_INF_FMT("command=%s", value); /* when num_commands is 0, then realloc will be effectively a malloc call, internally */ - conn->options.init_commands = mnd_perealloc(conn->options.init_commands, sizeof(char *) * (conn->options.num_commands + 1), - conn->persistent); - conn->options.init_commands[conn->options.num_commands] = pestrdup(value, conn->persistent); + /* Don't assign to conn->options.init_commands because in case of OOM we will lose the pointer and leak */ + new_init_commands = mnd_perealloc(conn->options.init_commands, sizeof(char *) * (conn->options.num_commands + 1), conn->persistent); + if (!new_init_commands) { + goto oom; + } + conn->options.init_commands = new_init_commands; + new_command = mnd_pestrdup(value, conn->persistent); + if (!new_command) { + goto oom; + } + conn->options.init_commands[conn->options.num_commands] = new_command; ++conn->options.num_commands; break; + } case MYSQL_READ_DEFAULT_FILE: case MYSQL_READ_DEFAULT_GROUP: #ifdef WHEN_SUPPORTED_BY_MYSQLI case MYSQL_SET_CLIENT_IP: case MYSQL_REPORT_DATA_TRUNCATION: - case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: #endif /* currently not supported. Todo!! */ break; case MYSQL_SET_CHARSET_NAME: + { + char * new_charset_name = mnd_pestrdup(value, conn->persistent); DBG_INF("MYSQL_SET_CHARSET_NAME"); - conn->options.charset_name = pestrdup(value, conn->persistent); + if (!new_charset_name) { + goto oom; + } + if (conn->options.charset_name) { + mnd_pefree(conn->options.charset_name, conn->persistent); + } + conn->options.charset_name = new_charset_name; DBG_INF_FMT("charset=%s", conn->options.charset_name); break; + } #ifdef WHEN_SUPPORTED_BY_MYSQLI case MYSQL_SET_CHARSET_DIR: case MYSQL_OPT_RECONNECT: @@ -1944,9 +2138,12 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, /* not sure, todo ? */ #endif default: - DBG_RETURN(FAIL); + ret = FAIL; } - DBG_RETURN(PASS); + DBG_RETURN(ret); +oom: + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); } /* }}} */ @@ -1955,7 +2152,7 @@ MYSQLND_METHOD(mysqlnd_conn, set_client_option)(MYSQLND * const conn, static MYSQLND_RES * MYSQLND_METHOD(mysqlnd_conn, use_result)(MYSQLND * const conn TSRMLS_DC) { - MYSQLND_RES *result; + MYSQLND_RES * result; DBG_ENTER("mysqlnd_conn::use_result"); DBG_INF_FMT("conn=%llu", conn->thread_id); @@ -1974,11 +2171,14 @@ MYSQLND_METHOD(mysqlnd_conn, use_result)(MYSQLND * const conn TSRMLS_DC) MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_UNBUFFERED_SETS); - result = conn->current_result; - conn->current_result = NULL; - result->conn = conn->m->get_reference(conn TSRMLS_CC); + conn->current_result->conn = conn->m->get_reference(conn TSRMLS_CC); + result = conn->current_result->m.use_result(conn->current_result, FALSE TSRMLS_CC); - result = result->m.use_result(result, FALSE TSRMLS_CC); + if (!result) { + conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC); + } + conn->current_result = NULL; + DBG_RETURN(result); } /* }}} */ @@ -2007,10 +2207,11 @@ MYSQLND_METHOD(mysqlnd_conn, store_result)(MYSQLND * const conn TSRMLS_DC) MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_BUFFERED_SETS); - result = conn->current_result; + result = conn->current_result->m.store_result(conn->current_result, conn, FALSE TSRMLS_CC); + if (!result) { + conn->current_result->m.free_result(conn->current_result, TRUE TSRMLS_CC); + } conn->current_result = NULL; - - result = result->m.store_result(result, conn, FALSE TSRMLS_CC); DBG_RETURN(result); } /* }}} */ @@ -2031,7 +2232,7 @@ MYSQLND_METHOD(mysqlnd_conn, get_connection_stats)(const MYSQLND * const conn, MYSQLND_STMT * _mysqlnd_stmt_init(MYSQLND * const conn TSRMLS_DC); -static void MYSQLND_METHOD(mysqlnd_conn, init)(MYSQLND * conn TSRMLS_DC); +static enum_func_status MYSQLND_METHOD(mysqlnd_conn, init)(MYSQLND * conn TSRMLS_DC); static MYSQLND_CLASS_METHODS_START(mysqlnd_conn) @@ -2099,22 +2300,26 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_conn) MYSQLND_METHOD(mysqlnd_conn, simple_command), MYSQLND_METHOD(mysqlnd_conn, simple_command_handle_response), MYSQLND_METHOD(mysqlnd_conn, restart_psession), - MYSQLND_METHOD(mysqlnd_conn, end_psession) + MYSQLND_METHOD(mysqlnd_conn, end_psession), + MYSQLND_METHOD(mysqlnd_conn, send_close), + + MYSQLND_METHOD(mysqlnd_conn, ssl_set), + mysqlnd_result_init MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_conn::init */ -static void +static enum_func_status MYSQLND_METHOD(mysqlnd_conn, init)(MYSQLND * conn TSRMLS_DC) { DBG_ENTER("mysqlnd_conn::init"); - conn->net = mysqlnd_net_init(conn->persistent TSRMLS_CC); - conn->protocol = mysqlnd_protocol_init(conn->persistent TSRMLS_CC); mysqlnd_stats_init(&conn->stats, STAT_LAST); - SET_ERROR_AFF_ROWS(conn); - DBG_VOID_RETURN; + conn->net = mysqlnd_net_init(conn->persistent TSRMLS_CC); + conn->protocol = mysqlnd_protocol_init(conn->persistent TSRMLS_CC); + + DBG_RETURN(conn->net && conn->protocol? PASS:FAIL); } /* }}} */ @@ -2126,14 +2331,20 @@ PHPAPI MYSQLND * _mysqlnd_init(zend_bool persistent TSRMLS_DC) MYSQLND *ret = mnd_pecalloc(1, alloc_size, persistent); DBG_ENTER("mysqlnd_init"); - DBG_INF_FMT("persistent=%d", persistent); + DBG_INF_FMT("persistent=%u", persistent); + if (!ret) { + DBG_RETURN(NULL); + } ret->persistent = persistent; ret->m = mysqlnd_conn_methods; CONN_SET_STATE(ret, CONN_ALLOCED); ret->m->get_reference(ret TSRMLS_CC); - ret->m->init(ret TSRMLS_CC); + if (PASS != ret->m->init(ret TSRMLS_CC)) { + ret->m->dtor(ret TSRMLS_CC); + ret = NULL; + } DBG_RETURN(ret); } diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h index 1b51c4f14..2db4c6dc4 100644 --- a/ext/mysqlnd/mysqlnd.h +++ b/ext/mysqlnd/mysqlnd.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -17,12 +17,12 @@ | Ulf Wendel <uwendel@mysql.com> | +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd.h 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd.h 300533 2010-06-17 16:56:48Z pajoye $ */ #ifndef MYSQLND_H #define MYSQLND_H -#define MYSQLND_VERSION "mysqlnd 5.0.7-dev - 091210 - $Revision: 294543 $" +#define MYSQLND_VERSION "mysqlnd 5.0.7-dev - 091210 - $Revision: 300533 $" #define MYSQLND_VERSION_ID 50007 /* This forces inlining of some accessor functions */ @@ -137,60 +137,6 @@ PHPAPI enum_func_status _mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQ #define mysqlnd_free_result(r,e_or_i) ((MYSQLND_RES*)r)->m.free_result(((MYSQLND_RES*)(r)), (e_or_i) TSRMLS_CC) #define mysqlnd_data_seek(result, row) (result)->m.seek_data((result), (row) TSRMLS_CC) -/*****************************************************************************************************/ -#if defined(MYSQLND_USE_OPTIMISATIONS) && MYSQLND_USE_OPTIMISATIONS == 1 - -/* Errors */ -#define mysqlnd_errno(conn) (conn)->error_info.error_no -#define mysqlnd_error(conn) (conn)->error_info.error -#define mysqlnd_sqlstate(conn) ((conn)->error_info.sqlstate[0] ? conn->error_info.sqlstate:MYSQLND_SQLSTATE_NULL) - -/* Charset */ -#define mysqlnd_character_set_name(conn) (conn)->charset->name - -/* Simple metadata */ -#define mysqlnd_field_count(conn) (conn)->field_count -#define mysqlnd_insert_id(conn) (conn)->upsert_status.last_insert_id -#define mysqlnd_affected_rows(conn) (conn)->upsert_status.affected_rows -#define mysqlnd_warning_count(conn) (conn)->upsert_status.warning_count -#define mysqlnd_info(conn) (conn)->last_message -#define mysqlnd_get_server_info(conn) (conn)->server_version -#define mysqlnd_get_host_info(conn) (conn)->host_info -#define mysqlnd_get_proto_info(conn) (conn)->protocol_version -#define mysqlnd_thread_id(conn) (conn)->thread_id - -#define mysqlnd_num_rows(result) ((result)->stored_data? (result)->stored_data->row_count:0) -#define mysqlnd_num_fields(result) (result)->field_count - -#define mysqlnd_fetch_lengths(result) ((result)->m.fetch_lengths? (result)->m.fetch_lengths((result) TSRMLS_CC) : NULL) - -#define mysqlnd_field_seek(result, ofs) (result)->m.seek_field((result), (ofs)) -#define mysqlnd_field_tell(result) ((result)->meta? (result)->meta->current_field:0) -#define mysqlnd_fetch_field(result) (result)->m.fetch_field((result) TSRMLS_CC) -#define mysqlnd_fetch_field_direct(result,fnr) (result)->m.fetch_field_direct((result), (fnr) TSRMLS_CC) -#define mysqlnd_fetch_fields(result) (result)->m.fetch_fields((result) TSRMLS_CC) - -/* mysqlnd metadata */ -#define mysqlnd_get_client_info() MYSQLND_VERSION -#define mysqlnd_get_client_version() MYSQLND_VERSION_ID - -/* PS */ -#define mysqlnd_stmt_insert_id(stmt) (stmt)->upsert_status.last_insert_id -#define mysqlnd_stmt_affected_rows(stmt) (stmt)->upsert_status.affected_rows -#define mysqlnd_stmt_num_rows(stmt) (stmt)->result? mysqlnd_num_rows((stmt)->result):0 -#define mysqlnd_stmt_param_count(stmt) (stmt)->param_count -#define mysqlnd_stmt_field_count(stmt) (stmt)->field_count -#define mysqlnd_stmt_warning_count(stmt) (stmt)->upsert_status.warning_count -#define mysqlnd_stmt_errno(stmt) (stmt)->error_info.error_no -#define mysqlnd_stmt_error(stmt) (stmt)->error_info.error -#define mysqlnd_stmt_sqlstate(stmt) ((stmt)->error_info.sqlstate[0] ? (stmt)->error_info.sqlstate:MYSQLND_SQLSTATE_NULL) - - - -/*****************************************************************************************************/ -#else /* Using plain functions */ -/*****************************************************************************************************/ - /* Errors */ #define mysqlnd_errno(conn) (conn)->m->get_error_no((conn) TSRMLS_CC) #define mysqlnd_error(conn) (conn)->m->get_error_str((conn) TSRMLS_CC) @@ -226,6 +172,8 @@ PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS PHPAPI const char * mysqlnd_get_client_info(); PHPAPI unsigned int mysqlnd_get_client_version(); +#define mysqlnd_ssl_set(conn, key, cert, ca, capath, cipher) (conn)->m->ssl_set((conn), (key), (cert), (ca), (capath), (cipher) TSRMLS_CC) + /* PS */ #define mysqlnd_stmt_insert_id(stmt) (stmt)->m->get_last_insert_id((stmt) TSRMLS_CC) #define mysqlnd_stmt_affected_rows(stmt) (stmt)->m->get_affected_rows((stmt) TSRMLS_CC) @@ -233,15 +181,16 @@ PHPAPI unsigned int mysqlnd_get_client_version(); #define mysqlnd_stmt_param_count(stmt) (stmt)->m->get_param_count((stmt) TSRMLS_CC) #define mysqlnd_stmt_field_count(stmt) (stmt)->m->get_field_count((stmt) TSRMLS_CC) #define mysqlnd_stmt_warning_count(stmt) (stmt)->m->get_warning_count((stmt) TSRMLS_CC) +#define mysqlnd_stmt_server_status(stmt) (stmt)->m->get_server_status((stmt) TSRMLS_CC) #define mysqlnd_stmt_errno(stmt) (stmt)->m->get_error_no((stmt) TSRMLS_CC) #define mysqlnd_stmt_error(stmt) (stmt)->m->get_error_str((stmt) TSRMLS_CC) #define mysqlnd_stmt_sqlstate(stmt) (stmt)->m->get_sqlstate((stmt) TSRMLS_CC) -#endif /* MYSQLND_USE_OPTIMISATIONS */ -/*****************************************************************************************************/ PHPAPI void mysqlnd_efree_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind TSRMLS_DC); PHPAPI void mysqlnd_efree_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind TSRMLS_DC); +PHPAPI void mysqlnd_free_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind TSRMLS_DC); +PHPAPI void mysqlnd_free_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind TSRMLS_DC); PHPAPI const char * mysqlnd_field_type_name(enum mysqlnd_field_types field_type); @@ -288,16 +237,18 @@ PHPAPI ulong mysqlnd_old_escape_string(char *newstr, const char *escapestr, size #define mysqlnd_stmt_data_seek(stmt, row) (stmt)->m->seek_data((stmt), (row) TSRMLS_CC) #define mysqlnd_stmt_prepare(stmt, q, qlen) (stmt)->m->prepare((stmt), (q), (qlen) TSRMLS_CC) #define mysqlnd_stmt_execute(stmt) (stmt)->m->execute((stmt) TSRMLS_CC) -#define mysqlnd_stmt_send_long_data(s,p,d,l) (s)->m->send_long_data((s), (p), (d), (l) TSRMLS_CC) -#define mysqlnd_stmt_bind_param(stmt,bind) (stmt)->m->bind_parameters((stmt), (bind) TSRMLS_CC) -#define mysqlnd_stmt_bind_one_param(s,n,z,t) (s)->m->bind_one_parameter((s), (n), (z), (t) TSRMLS_CC) -#define mysqlnd_stmt_refresh_bind_param(s) (s)->m->refresh_bind_param((s) TSRMLS_CC) -#define mysqlnd_stmt_set_param_bind_dtor(s,d) (s)->m->set_param_bind_dtor((s), (d) TSRMLS_CC) -#define mysqlnd_stmt_bind_result(stmt,bind) (stmt)->m->bind_result((stmt), (bind) TSRMLS_CC) -#define mysqlnd_stmt_bind_one_result(s,no) (s)->m->bind_one_result((s), (no) TSRMLS_CC) -#define mysqlnd_stmt_set_result_bind_dtor(s,d) (s)->m->set_result_bind_dtor((s), (d) TSRMLS_CC) -#define mysqlnd_stmt_param_metadata(stmt) (stmt)->m->get_parameter_metadata((stmt)) -#define mysqlnd_stmt_result_metadata(stmt) (stmt)->m->get_result_metadata((stmt) TSRMLS_CC) +#define mysqlnd_stmt_send_long_data(stmt,p,d,l) (stmt)->m->send_long_data((stmt), (p), (d), (l) TSRMLS_CC) +#define mysqlnd_stmt_alloc_param_bind(stmt) (stmt)->m->alloc_parameter_bind((stmt) TSRMLS_CC) +#define mysqlnd_stmt_free_param_bind(stmt,bind) (stmt)->m->free_parameter_bind((stmt), (bind) TSRMLS_CC) +#define mysqlnd_stmt_bind_param(stmt,bind) (stmt)->m->bind_parameters((stmt), (bind) TSRMLS_CC) +#define mysqlnd_stmt_bind_one_param(stmt,n,z,t) (stmt)->m->bind_one_parameter((stmt), (n), (z), (t) TSRMLS_CC) +#define mysqlnd_stmt_refresh_bind_param(s) (s)->m->refresh_bind_param((s) TSRMLS_CC) +#define mysqlnd_stmt_alloc_result_bind(stmt) (stmt)->m->alloc_result_bind((stmt) TSRMLS_CC) +#define mysqlnd_stmt_free_result_bind(stmt,bind) (stmt)->m->free_result_bind((stmt), (bind) TSRMLS_CC) +#define mysqlnd_stmt_bind_result(stmt,bind) (stmt)->m->bind_result((stmt), (bind) TSRMLS_CC) +#define mysqlnd_stmt_bind_one_result(s,no) (s)->m->bind_one_result((s), (no) TSRMLS_CC) +#define mysqlnd_stmt_param_metadata(stmt) (stmt)->m->get_parameter_metadata((stmt)) +#define mysqlnd_stmt_result_metadata(stmt) (stmt)->m->get_result_metadata((stmt) TSRMLS_CC) #define mysqlnd_stmt_free_result(stmt) (stmt)->m->free_result((stmt) TSRMLS_CC) #define mysqlnd_stmt_close(stmt, implicit) (stmt)->m->dtor((stmt), (implicit) TSRMLS_CC) @@ -326,9 +277,16 @@ ZEND_BEGIN_MODULE_GLOBALS(mysqlnd) long net_read_buffer_size; long log_mask; long net_read_timeout; + long mempool_default_size; + long debug_emalloc_fail_threshold; + long debug_ecalloc_fail_threshold; + long debug_erealloc_fail_threshold; + long debug_malloc_fail_threshold; + long debug_calloc_fail_threshold; + long debug_realloc_fail_threshold; ZEND_END_MODULE_GLOBALS(mysqlnd) -ZEND_EXTERN_MODULE_GLOBALS(mysqlnd); +PHPAPI ZEND_DECLARE_MODULE_GLOBALS(mysqlnd); #ifdef ZTS #define MYSQLND_G(v) TSRMG(mysqlnd_globals_id, zend_mysqlnd_globals *, v) diff --git a/ext/mysqlnd/mysqlnd_alloc.c b/ext/mysqlnd/mysqlnd_alloc.c deleted file mode 100644 index e54f80c69..000000000 --- a/ext/mysqlnd/mysqlnd_alloc.c +++ /dev/null @@ -1,285 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 6 | - +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | - +----------------------------------------------------------------------+ - | This 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: Georg Richter <georg@mysql.com> | - | Andrey Hristov <andrey@mysql.com> | - | Ulf Wendel <uwendel@mysql.com> | - +----------------------------------------------------------------------+ - -*/ - -/* $Id: mysqlnd_alloc.c 272370 2008-12-31 11:15:49Z sebastian $ */ -#include "php.h" -#include "mysqlnd.h" -#include "mysqlnd_priv.h" -#include "mysqlnd_palloc.h" - - -#define MYSQLND_SILENT -#define MYSQLND_DONT_DUMP_STATS - -#define MYSQLND_ZVALS_MAX_CACHE 5000 - - -#if A0 -/* Caching zval allocator */ -zval * mysqlnd_alloc_get_zval(MYSQLND_ZVAL_CACHE * const cache); -void mysqlnd_alloc_zval_ptr_dtor(zval **zv, MYSQLND_ZVAL_CACHE * const cache); -MYSQLND_ZVAL_CACHE* mysqlnd_alloc_init_cache(); -MYSQLND_ZVAL_CACHE* mysqlnd_alloc_get_cache_reference(MYSQLND_ZVAL_CACHE *cache); -void mysqlnd_alloc_free_cache_reference(MYSQLND_ZVAL_CACHE **cache); -#endif - - -/* - The cache line is a big contiguous array of zval pointers. - Because the CPU cache will cache starting from an address, and not - before it, then we have to organize our structure according to this. - Thus, if 'last_added' is valid pointer (not NULL) then last_added is - increased. When zval is cached, if there is room, last_added is decreased - and then the zval pointer will be assigned to it. This means that some - positions may become hot points and stay in the cache. - Imagine we have 5 pointers in a line - 1. last_added = list_item->ptr_line + cache->max_items; - 2. get_zval -> *last_added = NULL. Use MAKE_STD_ZVAL - 3. get_zval -> *last_added = NULL. Use MAKE_STD_ZVAL - 4. get_zval -> *last_added = NULL. Use MAKE_STD_ZVAL - 0x0 - 0x0 - 0x0 - 0x0 - 0x0 - --- - empty_position, always 0x0 <-- last_added - - 5. free_zval -> if (free_items++ != max_items) {// we can add more - *(--last_added) = zval_ptr; - } - (memory addresses increase downwards) - 0x0 - 0x0 - 0x0 - 0x0 - 0xA <-- last_added - --- - 0x0 - - 6. free_zval -> if (free_items++ != max_items) {// we can add more - *(--last_added) = zval_ptr; - } - 0x0 - 0x0 - 0x0 - 0xB <-- last_added - 0xA - --- - 0x0 - - 7. free_zval -> if (free_items++ != max_items) {// we can add more - *(--last_added) = zval_ptr; - } - 0x0 - 0x0 - 0xC <-- last_added - 0xB - 0xA - --- - 0x0 - - 8. get_zval -> *last_added != NULL. -> p = *last_added; *last_added++ = NULL; - 0x0 - 0x0 - 0x0 - 0xB <-- last_added - 0xA - --- - 0x0 - - 9. get_zval -> *last_added != NULL. -> p = *last_added; *last_added++ = NULL; - 0x0 - 0x0 - 0x0 - 0x0 - 0xA <-- last_added - --- - 0x0 - -10. get_zval -> *last_added != NULL. -> p = *last_added; *last_added++ = NULL; - 0x0 - 0x0 - 0x0 - 0x0 - 0x0 - --- - 0x0 <-- last_added - -*/ - - -zval * mysqlnd_alloc_get_zval(MYSQLND_ZVAL_CACHE * const cache) -{ - zval *ret = NULL; - -#ifndef MYSQLND_SILENT - php_printf("[mysqlnd_alloc_get_zval %p] *last_added=%p free_items=%d ", cache, cache? cache->free_list->last_added:NULL, cache->free_items); -#endif - - if (cache) { - if ((ret = *cache->free_list->last_added)) { - *cache->free_list->last_added++ = NULL; - - --cache->free_items; - ++cache->get_hits; - } else { - ++cache->get_misses; - } - } - if (!ret) { - ALLOC_ZVAL(ret); - } - INIT_PZVAL(ret); - -#ifndef MYSQLND_SILENT - php_printf("ret=%p\n", ret); -#endif - return ret; -} - -static -void mysqlnd_alloc_cache_prealloc(MYSQLND_ZVAL_CACHE * const cache, unsigned int count) -{ - zval *data; - cache->free_items = count; - while (count--) { - MAKE_STD_ZVAL(data); - ZVAL_NULL(data); -#ifndef MYSQLND_SILENT - php_printf("[mysqlnd_alloc_prealloc %p] items=%d data=%p\n", cache, cache->free_items, data); -#endif - - *(--cache->free_list->last_added) = data; - } -} - -void mysqlnd_alloc_zval_ptr_dtor(zval **zv, MYSQLND_ZVAL_CACHE * const cache) -{ - if (!cache || Z_REFCOUNT_PP(zv) > 1 || cache->max_items == cache->free_items) { -#ifndef MYSQLND_SILENT - php_printf("[mysqlnd_alloc_zval_ptr_dtor %p]1 last_added-1=%p *zv=%p\n", cache->free_list->last_added, *zv); -#endif - /* We can't cache zval's with refcount > 1 */ - zval_ptr_dtor(zv); - if (cache) { - if (cache->max_items == cache->free_items) { - ++cache->put_full_misses; - } else { - ++cache->put_refcount_misses; - } - } - } else { - /* refcount is 1 and there is place. Go, cache it! */ - ++cache->free_items; - zval_dtor(*zv); - ZVAL_NULL(*zv); - *(--cache->free_list->last_added) = *zv; - ++cache->put_hits; - } -#ifndef MYSQLND_SILENT - php_printf("[mysqlnd_alloc_zval_ptr_dtor %p] free_items=%d\n", cache, cache->free_items); -#endif -} - - -MYSQLND_ZVAL_CACHE* mysqlnd_alloc_init_cache(void) -{ - MYSQLND_ZVAL_CACHE *ret = ecalloc(1, sizeof(MYSQLND_ZVAL_CACHE)); - -#ifndef MYSQLND_SILENT - php_printf("[mysqlnd_alloc_init_cache %p]\n", ret); -#endif - - ret->max_items = MYSQLND_ZVALS_MAX_CACHE; - ret->free_items = 0; - ret->references = 1; - - /* Let's have always one, so we don't need to do a check in get_zval */ - ret->free_list = ecalloc(1, sizeof(struct st_mysqlnd_zval_list)); - - /* One more for empty position of last_added */ - ret->free_list->ptr_line = ecalloc(ret->max_items + 1, sizeof(zval *)); - ret->free_list->last_added = ret->free_list->ptr_line + ret->max_items; - - mysqlnd_alloc_cache_prealloc(ret, (ret->max_items / 100) * 100); - - return ret; -} - - -MYSQLND_ZVAL_CACHE* mysqlnd_alloc_get_cache_reference(MYSQLND_ZVAL_CACHE *cache) -{ - if (cache) { - cache->references++; - } - return cache; -} - - -static -void mysqlnd_alloc_free_cache(MYSQLND_ZVAL_CACHE *cache) -{ -#ifndef MYSQLND_SILENT - uint i = 0; - php_printf("[mysqlnd_alloc_free_cache %p]\n", cache); -#endif - - while (*cache->free_list->last_added) { -#ifndef MYSQLND_SILENT - php_printf("\t[free_item %d %p]\n", i++, *cache->free_list->last_added); -#endif - zval_ptr_dtor(cache->free_list->last_added); - cache->free_list->last_added++; - } -#ifndef MYSQLND_DONT_DUMP_STATS - php_printf("CACHE STATS:\n\tGET\n\t\tHITS:%lu\n\t\tMISSES=%lu\n\t\tHIT RATIO=%1.3f\n\t" - "PUT\n\t\tHITS:%lu\n\t\tFULL_MISS=%lu\n\t\tREFC_MISS=%lu\n\t\tHIT RATIO=%1.3f\n\n", - cache->get_hits, cache->get_misses, (1.0*cache->get_hits/(cache->get_hits + cache->get_misses)), - cache->put_hits, cache->put_full_misses, cache->put_refcount_misses, - (1.0 * cache->put_hits / (cache->put_hits + cache->put_full_misses + cache->put_refcount_misses))); -#endif - efree(cache->free_list->ptr_line); - efree(cache->free_list); - efree(cache); -} - - - -void mysqlnd_alloc_free_cache_reference(MYSQLND_ZVAL_CACHE **cache) -{ -#ifndef MYSQLND_SILENT - php_printf("[mysqlnd_alloc_free_cache_reference %p] refs=%d\n", *cache, (*cache)->references); -#endif - if (*cache && --(*cache)->references == 0) { - mysqlnd_alloc_free_cache(*cache); - } - *cache = NULL; -} - -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - * vim600: noet sw=4 ts=4 fdm=marker - * vim<600: noet sw=4 ts=4 - */ diff --git a/ext/mysqlnd/mysqlnd_block_alloc.c b/ext/mysqlnd/mysqlnd_block_alloc.c index 8c7f7d951..1288e7690 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.c +++ b/ext/mysqlnd/mysqlnd_block_alloc.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_block_alloc.c 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_block_alloc.c 298917 2010-05-03 17:07:18Z andrey $ */ #include "php.h" #include "mysqlnd.h" @@ -29,23 +29,7 @@ /* {{{ mysqlnd_mempool_free_chunk */ static void -mysqlnd_mempool_free_contents(MYSQLND_MEMORY_POOL * pool TSRMLS_DC) -{ - unsigned int i; - DBG_ENTER("mysqlnd_mempool_dtor"); - for (i = 0; i < pool->free_chunk_list_elements; i++) { - MYSQLND_MEMORY_POOL_CHUNK * chunk = pool->free_chunk_list[i]; - chunk->free_chunk(chunk, FALSE TSRMLS_CC); - } - - DBG_VOID_RETURN; -} -/* }}} */ - - -/* {{{ mysqlnd_mempool_free_chunk */ -static void -mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, zend_bool cache_it TSRMLS_DC) +mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk TSRMLS_DC) { MYSQLND_MEMORY_POOL * pool = chunk->pool; DBG_ENTER("mysqlnd_mempool_free_chunk"); @@ -62,20 +46,14 @@ mysqlnd_mempool_free_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, zend_bool cache_it } else { mnd_free(chunk->ptr); } - if (cache_it && pool->free_chunk_list_elements < MYSQLND_MEMORY_POOL_CHUNK_LIST_SIZE) { - chunk->ptr = NULL; - pool->free_chunk_list[pool->free_chunk_list_elements++] = chunk; - } else { - /* We did not cache it -> free it */ - mnd_free(chunk); - } + mnd_free(chunk); DBG_VOID_RETURN; } /* }}} */ /* {{{ mysqlnd_mempool_resize_chunk */ -static void +static enum_func_status mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size TSRMLS_DC) { DBG_ENTER("mysqlnd_mempool_resize_chunk"); @@ -90,6 +68,9 @@ mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int siz if ((chunk->size + pool->free_size) < size) { zend_uchar *new_ptr; new_ptr = mnd_malloc(size); + if (!new_ptr) { + DBG_RETURN(FAIL); + } memcpy(new_ptr, chunk->ptr, chunk->size); chunk->ptr = new_ptr; pool->free_size += chunk->size; @@ -107,17 +88,25 @@ mysqlnd_mempool_resize_chunk(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int siz } else { zend_uchar *new_ptr; new_ptr = mnd_malloc(size); + if (!new_ptr) { + DBG_RETURN(FAIL); + } memcpy(new_ptr, chunk->ptr, chunk->size); chunk->ptr = new_ptr; chunk->size = size; - chunk->pool = NULL; /* now we have no pool memory */ - pool->refcount--; + chunk->pool = NULL; /* now we have non-pool memory */ + pool->refcount--; } } } else { - chunk->ptr = mnd_realloc(chunk->ptr, size); + zend_uchar *new_ptr = mnd_realloc(chunk->ptr, size); + if (!new_ptr) { + DBG_RETURN(FAIL); + } + chunk->ptr = new_ptr; + } - DBG_VOID_RETURN; + DBG_RETURN(PASS); } /* }}} */ @@ -129,30 +118,31 @@ MYSQLND_MEMORY_POOL_CHUNK * mysqlnd_mempool_get_chunk(MYSQLND_MEMORY_POOL * pool MYSQLND_MEMORY_POOL_CHUNK *chunk = NULL; DBG_ENTER("mysqlnd_mempool_get_chunk"); - if (pool->free_chunk_list_elements) { - chunk = pool->free_chunk_list[--pool->free_chunk_list_elements]; - } else { - chunk = mnd_malloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK)); - } - - chunk->free_chunk = mysqlnd_mempool_free_chunk; - chunk->resize_chunk = mysqlnd_mempool_resize_chunk; - chunk->size = size; - /* - Should not go over MYSQLND_MAX_PACKET_SIZE, since we - expect non-arena memory in mysqlnd_wireprotocol.c . We - realloc the non-arena memory. - */ - chunk->pool = pool; - if (size > pool->free_size) { - chunk->ptr = mnd_malloc(size); - chunk->from_pool = FALSE; - } else { - chunk->from_pool = TRUE; - ++pool->refcount; - chunk->ptr = pool->arena + (pool->arena_size - pool->free_size); - /* Last step, update free_size */ - pool->free_size -= size; + chunk = mnd_malloc(sizeof(MYSQLND_MEMORY_POOL_CHUNK)); + if (chunk) { + chunk->free_chunk = mysqlnd_mempool_free_chunk; + chunk->resize_chunk = mysqlnd_mempool_resize_chunk; + chunk->size = size; + /* + Should not go over MYSQLND_MAX_PACKET_SIZE, since we + expect non-arena memory in mysqlnd_wireprotocol.c . We + realloc the non-arena memory. + */ + chunk->pool = pool; + if (size > pool->free_size) { + chunk->from_pool = FALSE; + chunk->ptr = mnd_malloc(size); + if (!chunk->ptr) { + chunk->free_chunk(chunk TSRMLS_CC); + chunk = NULL; + } + } else { + chunk->from_pool = TRUE; + ++pool->refcount; + chunk->ptr = pool->arena + (pool->arena_size - pool->free_size); + /* Last step, update free_size */ + pool->free_size -= size; + } } DBG_RETURN(chunk); } @@ -166,13 +156,17 @@ mysqlnd_mempool_create(size_t arena_size TSRMLS_DC) /* We calloc, because we free(). We don't mnd_calloc() for a reason. */ MYSQLND_MEMORY_POOL * ret = mnd_calloc(1, sizeof(MYSQLND_MEMORY_POOL)); DBG_ENTER("mysqlnd_mempool_create"); - - ret->free_size = ret->arena_size = arena_size; - ret->refcount = 0; - /* OOM ? */ - ret->arena = mnd_malloc(ret->arena_size); - ret->get_chunk = mysqlnd_mempool_get_chunk; - + if (ret) { + ret->get_chunk = mysqlnd_mempool_get_chunk; + ret->free_size = ret->arena_size = arena_size ? arena_size : 0; + ret->refcount = 0; + /* OOM ? */ + ret->arena = mnd_malloc(ret->arena_size); + if (!ret->arena) { + mysqlnd_mempool_destroy(ret TSRMLS_CC); + ret = NULL; + } + } DBG_RETURN(ret); } /* }}} */ @@ -184,7 +178,6 @@ mysqlnd_mempool_destroy(MYSQLND_MEMORY_POOL * pool TSRMLS_DC) { DBG_ENTER("mysqlnd_mempool_destroy"); /* mnd_free will reference LOCK_access and might crash, depending on the caller...*/ - mysqlnd_mempool_free_contents(pool TSRMLS_CC); mnd_free(pool->arena); mnd_free(pool); DBG_VOID_RETURN; diff --git a/ext/mysqlnd/mysqlnd_block_alloc.h b/ext/mysqlnd/mysqlnd_block_alloc.h index 0607d4209..1b7ccfe80 100644 --- a/ext/mysqlnd/mysqlnd_block_alloc.h +++ b/ext/mysqlnd/mysqlnd_block_alloc.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_block_alloc.h 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_block_alloc.h 298217 2010-04-20 13:50:34Z 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 7ec9bfbc2..d8a2c5ac0 100644 --- a/ext/mysqlnd/mysqlnd_charset.c +++ b/ext/mysqlnd/mysqlnd_charset.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -663,7 +663,7 @@ PHPAPI const MYSQLND_CHARSET * mysqlnd_find_charset_name(const char * const name /* {{{ mysqlnd_cset_escape_quotes */ PHPAPI ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const cset, char *newstr, - const char *escapestr, size_t escapestr_len TSRMLS_DC) + const char * escapestr, size_t escapestr_len TSRMLS_DC) { const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; @@ -717,7 +717,7 @@ PHPAPI ulong mysqlnd_cset_escape_quotes(const MYSQLND_CHARSET * const cset, char /* {{{ mysqlnd_cset_escape_slashes */ PHPAPI ulong mysqlnd_cset_escape_slashes(const MYSQLND_CHARSET * const cset, char *newstr, - const char *escapestr, size_t escapestr_len TSRMLS_DC) + const char * escapestr, size_t escapestr_len TSRMLS_DC) { const char *newstr_s = newstr; const char *newstr_e = newstr + 2 * escapestr_len; diff --git a/ext/mysqlnd/mysqlnd_charset.h b/ext/mysqlnd/mysqlnd_charset.h index 46cf03f1e..c5f0d7cb1 100644 --- a/ext/mysqlnd/mysqlnd_charset.h +++ b/ext/mysqlnd/mysqlnd_charset.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2010 The PHP Group | + | Copyright (c) 2006-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 | diff --git a/ext/mysqlnd/mysqlnd_debug.c b/ext/mysqlnd/mysqlnd_debug.c index 2c2764faf..575efacac 100644 --- a/ext/mysqlnd/mysqlnd_debug.c +++ b/ext/mysqlnd/mysqlnd_debug.c @@ -1,8 +1,8 @@ -;/* +/* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_debug.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_debug.c 300635 2010-06-21 15:32:26Z andrey $ */ #include "php.h" #include "mysqlnd.h" @@ -28,7 +28,6 @@ #include "mysqlnd_statistics.h" #include "zend_builtin_functions.h" - static const char * const mysqlnd_debug_default_trace_file = "/tmp/mysqlnd.trace"; #ifdef ZTS @@ -59,6 +58,8 @@ static const char mysqlnd_malloc_name[] = "_mysqlnd_malloc"; static const char mysqlnd_calloc_name[] = "_mysqlnd_calloc"; static const char mysqlnd_realloc_name[] = "_mysqlnd_realloc"; static const char mysqlnd_free_name[] = "_mysqlnd_free"; +static const char mysqlnd_pestrndup_name[] = "_mysqlnd_pestrndup"; +static const char mysqlnd_pestrdup_name[] = "_mysqlnd_pestrdup"; const char * mysqlnd_debug_std_no_trace_funcs[] = { @@ -74,6 +75,7 @@ const char * mysqlnd_debug_std_no_trace_funcs[] = mysqlnd_calloc_name, mysqlnd_realloc_name, mysqlnd_free_name, + mysqlnd_pestrndup_name, mysqlnd_read_header_name, mysqlnd_read_body_name, NULL /* must be always last */ @@ -113,10 +115,8 @@ MYSQLND_METHOD(mysqlnd_debug, log)(MYSQLND_DEBUG * self, line_buffer[6], level_buffer[7]; MYSQLND_ZTS(self); - if (!self->stream) { - if (FAIL == self->m->open(self, FALSE)) { - return FAIL; - } + if (!self->stream && FAIL == self->m->open(self, FALSE)) { + return FAIL; } if (level == -1) { @@ -185,10 +185,10 @@ MYSQLND_METHOD(mysqlnd_debug, log)(MYSQLND_DEBUG * self, pipe_buffer, type? type:"", message); ret = php_stream_write(self->stream, message_line, message_line_len)? PASS:FAIL; - efree(message_line); + efree(message_line); /* allocated by spprintf */ if (flags & MYSQLND_DEBUG_FLUSH) { self->m->close(self); - self->m->open(self, TRUE); + self->m->open(self, TRUE); } return ret; } @@ -213,10 +213,8 @@ MYSQLND_METHOD(mysqlnd_debug, log_va)(MYSQLND_DEBUG *self, line_buffer[6], level_buffer[7]; MYSQLND_ZTS(self); - if (!self->stream) { - if (FAIL == self->m->open(self, FALSE)) { - return FAIL; - } + if (!self->stream && FAIL == self->m->open(self, FALSE)) { + return FAIL; } if (level == -1) { @@ -291,11 +289,11 @@ MYSQLND_METHOD(mysqlnd_debug, log_va)(MYSQLND_DEBUG *self, efree(buffer); ret = php_stream_write(self->stream, message_line, message_line_len)? PASS:FAIL; - efree(message_line); + efree(message_line); /* allocated by spprintf */ if (flags & MYSQLND_DEBUG_FLUSH) { self->m->close(self); - self->m->open(self, TRUE); + self->m->open(self, TRUE); } return ret; } @@ -312,7 +310,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self, if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) { return FALSE; } - if (zend_stack_count(&self->call_stack) >= self->nest_level_limit) { + if ((uint) zend_stack_count(&self->call_stack) >= self->nest_level_limit) { return FALSE; } @@ -321,7 +319,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self, while (*p) { if (*p == func_name) { zend_stack_push(&self->call_stack, "", sizeof("")); - return FALSE; + return FALSE; } p++; } @@ -343,14 +341,13 @@ MYSQLND_METHOD(mysqlnd_debug, func_enter)(MYSQLND_DEBUG * self, /* {{{ mysqlnd_res_meta::func_leave */ static enum_func_status -MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int line, - const char * const file) +MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int line, const char * const file) { char *func_name; if ((self->flags & MYSQLND_DEBUG_DUMP_TRACE) == 0 || self->file_name == NULL) { return PASS; } - if (zend_stack_count(&self->call_stack) >= self->nest_level_limit) { + if ((uint) zend_stack_count(&self->call_stack) >= self->nest_level_limit) { return PASS; } @@ -359,7 +356,7 @@ MYSQLND_METHOD(mysqlnd_debug, func_leave)(MYSQLND_DEBUG * self, unsigned int lin if (func_name[0] == '\0') { ; /* don't log that function */ } else if (!zend_hash_num_elements(&self->not_filtered_functions) || - 1 == zend_hash_exists(&self->not_filtered_functions, func_name, strlen(func_name) + 1)) + 1 == zend_hash_exists(&self->not_filtered_functions, func_name, strlen(func_name) + 1)) { self->m->log_va(self, line, file, zend_stack_count(&self->call_stack) - 1, NULL, "<%s", func_name); } @@ -493,7 +490,7 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const } else { #if 0 php_error_docref(NULL TSRMLS_CC, E_WARNING, - "Expected list of functions for '%c' found none", mode[i]); + "Expected list of functions for '%c' found none", mode[i]); #endif } state = PARSER_WAIT_COLON; @@ -582,7 +579,7 @@ MYSQLND_METHOD(mysqlnd_debug, set_mode)(MYSQLND_DEBUG * self, const char * const state = PARSER_WAIT_COLON; } else if (state == PARSER_WAIT_COLON) { #if 0 - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Colon expected, '%c' found", mode[i]); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Colon expected, '%c' found", mode[i]); #endif } break; @@ -653,24 +650,40 @@ PHPAPI void _mysqlnd_debug(const char * mode TSRMLS_DC) #define __zend_filename "/unknown/unknown" #define __zend_lineno 0 #endif - + +#define REAL_SIZE(s) (collect_memory_statistics? (s) + sizeof(size_t) : (s)) +#define REAL_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) - sizeof(size_t)) : (p)) +#define FAKE_PTR(p) (collect_memory_statistics && (p)? (((char *)(p)) + sizeof(size_t)) : (p)) /* {{{ _mysqlnd_emalloc */ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = &MYSQLND_G(debug_emalloc_fail_threshold); DBG_ENTER(mysqlnd_emalloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - DBG_INF_FMT("before: %lu", zend_memory_usage(FALSE TSRMLS_CC)); - ret = emalloc(size); - DBG_INF_FMT("after : %lu", zend_memory_usage(FALSE TSRMLS_CC)); - DBG_INF_FMT("size=%lu ptr=%p", size, ret); - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EMALLOC_COUNT, 1, STAT_MEM_EMALLOC_AMMOUNT, size); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = emalloc(REAL_SIZE(size)); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif + + DBG_INF_FMT("size=%lu ptr=%p", size, ret); + + if (ret && collect_memory_statistics) { + *(size_t *) ret = size; + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EMALLOC_COUNT, 1, STAT_MEM_EMALLOC_AMOUNT, size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -679,26 +692,33 @@ void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D) void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = persistent? &MYSQLND_G(debug_malloc_fail_threshold):&MYSQLND_G(debug_emalloc_fail_threshold); DBG_ENTER(mysqlnd_pemalloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - if (persistent == FALSE) { - DBG_INF_FMT("before: %lu", zend_memory_usage(persistent TSRMLS_CC)); - } - ret = pemalloc(size, persistent); - DBG_INF_FMT("size=%lu ptr=%p persistent=%d", size, ret, persistent); - - if (persistent == FALSE) { - DBG_INF_FMT("after : %lu", zend_memory_usage(persistent TSRMLS_CC)); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = pemalloc(REAL_SIZE(size), persistent); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; } +#endif + + DBG_INF_FMT("size=%lu ptr=%p persistent=%u", size, ret, persistent); - if (MYSQLND_G(collect_memory_statistics)) { + if (ret && collect_memory_statistics) { enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_MALLOC_COUNT:STAT_MEM_EMALLOC_COUNT; - enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_MALLOC_AMMOUNT:STAT_MEM_EMALLOC_AMMOUNT; + enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_MALLOC_AMOUNT:STAT_MEM_EMALLOC_AMOUNT; + *(size_t *) ret = size; MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -707,18 +727,31 @@ void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = &MYSQLND_G(debug_ecalloc_fail_threshold); DBG_ENTER(mysqlnd_ecalloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); DBG_INF_FMT("before: %lu", zend_memory_usage(FALSE TSRMLS_CC)); - ret = ecalloc(nmemb, size); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = ecalloc(nmemb, REAL_SIZE(size)); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif DBG_INF_FMT("after : %lu", zend_memory_usage(FALSE TSRMLS_CC)); - DBG_INF_FMT("size=%lu ptr=%p", size, ret); - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_ECALLOC_COUNT, 1, STAT_MEM_ECALLOC_AMMOUNT, size); + DBG_INF_FMT("size=%lu ptr=%p", size, ret); + if (ret && collect_memory_statistics) { + *(size_t *) ret = size; + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_ECALLOC_COUNT, 1, STAT_MEM_ECALLOC_AMOUNT, size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -727,26 +760,33 @@ void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = persistent? &MYSQLND_G(debug_calloc_fail_threshold):&MYSQLND_G(debug_ecalloc_fail_threshold); DBG_ENTER(mysqlnd_pecalloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - if (persistent == FALSE) { - DBG_INF_FMT("before: %lu", zend_memory_usage(persistent TSRMLS_CC)); - } - ret = pecalloc(nmemb, size, persistent); - DBG_INF_FMT("size=%lu ptr=%p", size, ret); - - if (persistent == FALSE) { - DBG_INF_FMT("after : %lu", zend_memory_usage(persistent TSRMLS_CC)); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = pecalloc(nmemb, REAL_SIZE(size), persistent); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; } +#endif + + DBG_INF_FMT("size=%lu ptr=%p", size, ret); - if (MYSQLND_G(collect_memory_statistics)) { + if (ret && collect_memory_statistics) { enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_CALLOC_COUNT:STAT_MEM_ECALLOC_COUNT; - enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_CALLOC_AMMOUNT:STAT_MEM_ECALLOC_AMMOUNT; + enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_CALLOC_AMOUNT:STAT_MEM_ECALLOC_AMOUNT; + *(size_t *) ret = size; MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -755,19 +795,31 @@ void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent M void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; + long * threshold = &MYSQLND_G(debug_erealloc_fail_threshold); DBG_ENTER(mysqlnd_erealloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - DBG_INF_FMT("ptr=%p new_size=%lu", ptr, new_size); - DBG_INF_FMT("before: %lu", zend_memory_usage(FALSE TSRMLS_CC)); + DBG_INF_FMT("ptr=%p old_size=%lu, new_size=%lu", ptr, old_size, new_size); - ret = erealloc(ptr, new_size); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = erealloc(REAL_PTR(ptr), REAL_SIZE(new_size)); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif - DBG_INF_FMT("after : %lu", zend_memory_usage(FALSE TSRMLS_CC)); - DBG_INF_FMT("new_ptr=%p", ret); - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EREALLOC_COUNT, 1, STAT_MEM_EREALLOC_AMMOUNT, new_size); + DBG_INF_FMT("new_ptr=%p", (char*)ret); + if (ret && collect_memory_statistics) { + *(size_t *) ret = new_size; + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EREALLOC_COUNT, 1, STAT_MEM_EREALLOC_AMOUNT, new_size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -776,27 +828,34 @@ void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + size_t old_size = collect_memory_statistics && ptr? *(size_t *) (((char*)ptr) - sizeof(size_t)) : 0; + long * threshold = persistent? &MYSQLND_G(debug_realloc_fail_threshold):&MYSQLND_G(debug_erealloc_fail_threshold); DBG_ENTER(mysqlnd_perealloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - DBG_INF_FMT("ptr=%p new_size=%lu persist=%d", ptr, new_size, persistent); - if (persistent == FALSE) { - DBG_INF_FMT("before: %lu", zend_memory_usage(persistent TSRMLS_CC)); - } + DBG_INF_FMT("ptr=%p old_size=%lu new_size=%lu persistent=%u", ptr, old_size, new_size, persistent); - ret = perealloc(ptr, new_size, persistent); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = perealloc(REAL_PTR(ptr), REAL_SIZE(new_size), persistent); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif - DBG_INF_FMT("new_ptr=%p", ret); + DBG_INF_FMT("new_ptr=%p", (char*)ret); - if (persistent == FALSE) { - DBG_INF_FMT("after : %lu", zend_memory_usage(persistent TSRMLS_CC)); - } - MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_REALLOC_COUNT:STAT_MEM_EREALLOC_COUNT); - if (MYSQLND_G(collect_memory_statistics)) { + if (ret && collect_memory_statistics) { enum mysqlnd_collected_stats s1 = persistent? STAT_MEM_REALLOC_COUNT:STAT_MEM_EREALLOC_COUNT; - enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_REALLOC_AMMOUNT:STAT_MEM_EREALLOC_AMMOUNT; + enum mysqlnd_collected_stats s2 = persistent? STAT_MEM_REALLOC_AMOUNT:STAT_MEM_EREALLOC_AMOUNT; + *(size_t *) ret = new_size; MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(s1, 1, s2, new_size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -804,15 +863,23 @@ void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQL /* {{{ _mysqlnd_efree */ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) { + size_t free_amount = 0; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); DBG_ENTER(mysqlnd_efree_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); DBG_INF_FMT("ptr=%p", ptr); - DBG_INF_FMT("before: %lu", zend_memory_usage(FALSE TSRMLS_CC)); - MYSQLND_INC_GLOBAL_STATISTIC(STAT_MEM_EFREE_COUNT); - efree(ptr); + if (ptr) { + if (collect_memory_statistics) { + free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); + DBG_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); + } + efree(REAL_PTR(ptr)); + } - DBG_INF_FMT("after : %lu", zend_memory_usage(FALSE TSRMLS_CC)); + if (collect_memory_statistics) { + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_EFREE_COUNT, 1, STAT_MEM_EFREE_AMOUNT, free_amount); + } DBG_VOID_RETURN; } /* }}} */ @@ -821,20 +888,23 @@ void _mysqlnd_efree(void *ptr MYSQLND_MEM_D) /* {{{ _mysqlnd_pefree */ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) { + size_t free_amount = 0; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); DBG_ENTER(mysqlnd_pefree_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - DBG_INF_FMT("ptr=%p persistent=%d", ptr, persistent); - if (persistent == FALSE) { - DBG_INF_FMT("before: %lu", zend_memory_usage(persistent TSRMLS_CC)); - } - - pefree(ptr, persistent); + DBG_INF_FMT("ptr=%p persistent=%u", ptr, persistent); - if (persistent == FALSE) { - DBG_INF_FMT("after : %lu", zend_memory_usage(persistent TSRMLS_CC)); + if (ptr) { + if (collect_memory_statistics) { + free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); + DBG_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); + } + pefree(REAL_PTR(ptr), persistent); } - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_FREE_COUNT:STAT_MEM_EFREE_COUNT); + + if (collect_memory_statistics) { + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(persistent? STAT_MEM_FREE_COUNT:STAT_MEM_EFREE_COUNT, 1, + persistent? STAT_MEM_FREE_AMOUNT:STAT_MEM_EFREE_AMOUNT, free_amount); } DBG_VOID_RETURN; } @@ -844,16 +914,29 @@ void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D) void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = &MYSQLND_G(debug_malloc_fail_threshold); DBG_ENTER(mysqlnd_malloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - ret = malloc(size); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = malloc(REAL_SIZE(size)); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif - DBG_INF_FMT("size=%lu ptr=%p", size, ret); - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_MALLOC_COUNT, 1, STAT_MEM_MALLOC_AMMOUNT, size); + DBG_INF_FMT("size=%lu ptr=%p", size, ret); + if (ret && collect_memory_statistics) { + *(size_t *) ret = size; + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_MALLOC_COUNT, 1, STAT_MEM_MALLOC_AMOUNT, size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -862,16 +945,29 @@ void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D) void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = &MYSQLND_G(debug_calloc_fail_threshold); DBG_ENTER(mysqlnd_calloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); - ret = calloc(nmemb, size); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = calloc(nmemb, REAL_SIZE(size)); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif - DBG_INF_FMT("size=%lu ptr=%p", size, ret); - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_CALLOC_COUNT, 1, STAT_MEM_CALLOC_AMMOUNT, size); + DBG_INF_FMT("size=%lu ptr=%p", size, ret); + if (ret && collect_memory_statistics) { + *(size_t *) ret = size; + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_CALLOC_COUNT, 1, STAT_MEM_CALLOC_AMOUNT, size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -880,19 +976,32 @@ void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) { void *ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + long * threshold = &MYSQLND_G(debug_realloc_fail_threshold); DBG_ENTER(mysqlnd_realloc_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); DBG_INF_FMT("ptr=%p new_size=%lu ", new_size, ptr); DBG_INF_FMT("before: %lu", zend_memory_usage(TRUE TSRMLS_CC)); - ret = realloc(ptr, new_size); +#ifdef PHP_DEBUG + /* -1 is also "true" */ + if (*threshold) { +#endif + ret = realloc(REAL_PTR(ptr), REAL_SIZE(new_size)); +#ifdef PHP_DEBUG + --*threshold; + } else if (*threshold == 0) { + ret = NULL; + } +#endif - DBG_INF_FMT("new_ptr=%p", ret); + DBG_INF_FMT("new_ptr=%p", (char*)ret); - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_REALLOC_COUNT, 1, STAT_MEM_REALLOC_AMMOUNT, new_size); + if (ret && collect_memory_statistics) { + *(size_t *) ret = new_size; + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_REALLOC_COUNT, 1, STAT_MEM_REALLOC_AMOUNT, new_size); } - DBG_RETURN(ret); + DBG_RETURN(FAKE_PTR(ret)); } /* }}} */ @@ -900,19 +1009,241 @@ void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D) /* {{{ _mysqlnd_free */ void _mysqlnd_free(void *ptr MYSQLND_MEM_D) { + size_t free_amount = 0; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); DBG_ENTER(mysqlnd_free_name); DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); DBG_INF_FMT("ptr=%p", ptr); - free(ptr); + if (ptr) { + if (collect_memory_statistics) { + free_amount = *(size_t *)(((char*)ptr) - sizeof(size_t)); + DBG_INF_FMT("ptr=%p size=%u", ((char*)ptr) - sizeof(size_t), (unsigned int) free_amount); + } + free(REAL_PTR(ptr)); + } - if (MYSQLND_G(collect_memory_statistics)) { - MYSQLND_INC_GLOBAL_STATISTIC(STAT_MEM_FREE_COUNT); + if (collect_memory_statistics) { + MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(STAT_MEM_FREE_COUNT, 1, STAT_MEM_FREE_AMOUNT, free_amount); } DBG_VOID_RETURN; } /* }}} */ +#define SMART_STR_START_SIZE 2048 +#define SMART_STR_PREALLOC 512 +#include "ext/standard/php_smart_str.h" + + +/* {{{ _mysqlnd_pestrndup */ +char * _mysqlnd_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +{ + char * ret; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + DBG_ENTER(mysqlnd_pestrndup_name); + DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); + DBG_INF_FMT("ptr=%p", ptr); + + ret = pemalloc(REAL_SIZE(length) + 1, persistent); + { + size_t l = length; + char * p = (char *) ptr; + char * dest = (char *) FAKE_PTR(ret); + while (*p && l--) { + *dest++ = *p++; + } + *dest = '\0'; + } + + if (collect_memory_statistics) { + *(size_t *) ret = length; + MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_STRNDUP_COUNT : STAT_MEM_ESTRNDUP_COUNT); + } + + DBG_RETURN(FAKE_PTR(ret)); +} +/* }}} */ + + +/* {{{ _mysqlnd_pestrdup */ +char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) +{ + char * ret; + smart_str tmp_str = {0, 0, 0}; + const char * p = ptr; + zend_bool collect_memory_statistics = MYSQLND_G(collect_memory_statistics); + DBG_ENTER(mysqlnd_pestrdup_name); + DBG_INF_FMT("file=%-15s line=%4d", strrchr(__zend_filename, PHP_DIR_SEPARATOR) + 1, __zend_lineno); + DBG_INF_FMT("ptr=%p", ptr); + do { + smart_str_appendc(&tmp_str, *p); + } while (*p++); + + ret = pemalloc(tmp_str.len + sizeof(size_t), persistent); + memcpy(FAKE_PTR(ret), tmp_str.c, tmp_str.len); + + if (ret && collect_memory_statistics) { + *(size_t *) ret = tmp_str.len; + MYSQLND_INC_GLOBAL_STATISTIC(persistent? STAT_MEM_STRDUP_COUNT : STAT_MEM_ESTRDUP_COUNT); + } + smart_str_free(&tmp_str); + + DBG_RETURN(FAKE_PTR(ret)); +} +/* }}} */ + +#if MYSQLND_DEBUG_MEMORY + +/* {{{ mysqlnd_zend_mm_emalloc */ +static void * mysqlnd_zend_mm_emalloc(size_t size MYSQLND_MEM_D) +{ + return emalloc(size); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_pemalloc */ +static void * mysqlnd_zend_mm_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D) +{ + return pemalloc(size, persistent); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_ecalloc */ +static void * mysqlnd_zend_mm_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) +{ + return ecalloc(nmemb, size); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_pecalloc */ +static void * mysqlnd_zend_mm_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D) +{ + return pecalloc(nmemb, size, persistent); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_erealloc */ +static void * mysqlnd_zend_mm_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D) +{ + return erealloc(ptr, new_size); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_perealloc */ +static void * mysqlnd_zend_mm_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D) +{ + return perealloc(ptr, new_size, persistent); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_efree */ +static void mysqlnd_zend_mm_efree(void * ptr MYSQLND_MEM_D) +{ + efree(ptr); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_pefree */ +static void mysqlnd_zend_mm_pefree(void * ptr, zend_bool persistent MYSQLND_MEM_D) +{ + pefree(ptr, persistent); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_malloc */ +static void * mysqlnd_zend_mm_malloc(size_t size MYSQLND_MEM_D) +{ + return malloc(size); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_calloc */ +static void * mysqlnd_zend_mm_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D) +{ + return calloc(nmemb, size); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_realloc */ +static void * mysqlnd_zend_mm_realloc(void * ptr, size_t new_size MYSQLND_MEM_D) +{ + return realloc(ptr, new_size); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_free */ +static void mysqlnd_zend_mm_free(void * ptr MYSQLND_MEM_D) +{ + free(ptr); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_pestrndup */ +static char * mysqlnd_zend_mm_pestrndup(const char * const ptr, size_t length, zend_bool persistent MYSQLND_MEM_D) +{ + return pestrndup(ptr, length, persistent); +} +/* }}} */ + + +/* {{{ mysqlnd_zend_mm_pestrdup */ +static char * mysqlnd_zend_mm_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D) +{ + return pestrdup(ptr, persistent); +} +/* }}} */ + +#endif + + +#define MYSQLND_DEBUG_MEMORY 1 + +PHPAPI struct st_mysqlnd_allocator_methods mysqlnd_allocator = +{ +#if MYSQLND_DEBUG_MEMORY + _mysqlnd_emalloc, + _mysqlnd_pemalloc, + _mysqlnd_ecalloc, + _mysqlnd_pecalloc, + _mysqlnd_erealloc, + _mysqlnd_perealloc, + _mysqlnd_efree, + _mysqlnd_pefree, + _mysqlnd_malloc, + _mysqlnd_calloc, + _mysqlnd_realloc, + _mysqlnd_free, + _mysqlnd_pestrndup, + _mysqlnd_pestrdup +#else + mysqlnd_zend_mm_emalloc, + mysqlnd_zend_mm_pemalloc, + mysqlnd_zend_mm_ecalloc, + mysqlnd_zend_mm_pecalloc, + mysqlnd_zend_mm_erealloc, + mysqlnd_zend_mm_perealloc, + mysqlnd_zend_mm_efree, + mysqlnd_zend_mm_pefree, + mysqlnd_zend_mm_malloc, + mysqlnd_zend_mm_calloc, + mysqlnd_zend_mm_realloc, + mysqlnd_zend_mm_free, + mysqlnd_zend_mm_pestrndup, + mysqlnd_zend_mm_pestrdup +#endif +}; @@ -963,11 +1294,11 @@ void _mysqlnd_free(void *ptr MYSQLND_MEM_D) zval copy; \ int use_copy; \ zend_make_printable_zval(*tmp, ©, &use_copy); \ - TRACE_APPEND_STRL(Z_STRVAL(copy), Z_STRLEN(copy)); \ - zval_dtor(©); \ + TRACE_APPEND_STRL(Z_STRVAL(copy), Z_STRLEN(copy)); \ + zval_dtor(©); \ } else { \ - TRACE_APPEND_STRL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); \ - } \ + TRACE_APPEND_STRL(Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); \ + } \ } /* }}} */ diff --git a/ext/mysqlnd/mysqlnd_debug.h b/ext/mysqlnd/mysqlnd_debug.h index be46cf0cb..f79a8969b 100644 --- a/ext/mysqlnd/mysqlnd_debug.h +++ b/ext/mysqlnd/mysqlnd_debug.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,15 +18,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_debug.h 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_debug.h 299755 2010-05-25 21:54:21Z andrey $ */ #ifndef MYSQLND_DEBUG_H #define MYSQLND_DEBUG_H #include "zend_stack.h" -#define MYSQLND_DEBUG_MEMORY 1 - struct st_mysqlnd_debug_methods { enum_func_status (*open)(MYSQLND_DEBUG *self, zend_bool reopen); @@ -42,6 +40,7 @@ struct st_mysqlnd_debug_methods enum_func_status (*free_handle)(MYSQLND_DEBUG *self); }; + struct st_mysqlnd_debug { php_stream *stream; @@ -62,22 +61,6 @@ PHPAPI extern const char * mysqlnd_debug_std_no_trace_funcs[]; PHPAPI MYSQLND_DEBUG * mysqlnd_debug_init(const char * skip_functions[] TSRMLS_DC); -#define MYSQLND_MEM_D TSRMLS_DC ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC - - -PHPAPI void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D); -PHPAPI void _mysqlnd_efree(void *ptr MYSQLND_MEM_D); -PHPAPI void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); -PHPAPI void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D); -PHPAPI void _mysqlnd_free(void *ptr MYSQLND_MEM_D); - PHPAPI char * mysqlnd_get_backtrace(uint max_levels, size_t * length TSRMLS_DC); #if defined(__GNUC__) @@ -127,37 +110,60 @@ static inline void DBG_ENTER(const char * const func_name) {} #endif -#if MYSQLND_DEBUG_MEMORY +#define MYSQLND_MEM_D TSRMLS_DC ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC +#define MYSQLND_MEM_C TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC -#define mnd_emalloc(size) _mysqlnd_emalloc((size) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_pemalloc(size, pers) _mysqlnd_pemalloc((size), (pers) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_ecalloc(nmemb, size) _mysqlnd_ecalloc((nmemb), (size) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_pecalloc(nmemb, size, p) _mysqlnd_pecalloc((nmemb), (size), (p) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_erealloc(ptr, new_size) _mysqlnd_erealloc((ptr), (new_size) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_perealloc(ptr, new_size, p) _mysqlnd_perealloc((ptr), (new_size), (p) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_efree(ptr) _mysqlnd_efree((ptr) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_pefree(ptr, pers) _mysqlnd_pefree((ptr), (pers) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_malloc(size) _mysqlnd_malloc((size) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_calloc(nmemb, size) _mysqlnd_calloc((nmemb), (size) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_realloc(ptr, new_size) _mysqlnd_realloc((ptr), (new_size) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) -#define mnd_free(ptr) _mysqlnd_free((ptr) TSRMLS_CC ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) +struct st_mysqlnd_allocator_methods +{ + void * (*m_emalloc)(size_t size MYSQLND_MEM_D); + void * (*m_pemalloc)(size_t size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_ecalloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D); + void * (*m_pecalloc)(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); + void * (*m_erealloc)(void *ptr, size_t new_size MYSQLND_MEM_D); + void * (*m_perealloc)(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D); + void (*m_efree)(void *ptr MYSQLND_MEM_D); + void (*m_pefree)(void *ptr, zend_bool persistent MYSQLND_MEM_D); + void * (*m_malloc)(size_t size MYSQLND_MEM_D); + void * (*m_calloc)(unsigned int nmemb, size_t size MYSQLND_MEM_D); + void * (*m_realloc)(void *ptr, size_t new_size MYSQLND_MEM_D); + void (*m_free)(void *ptr MYSQLND_MEM_D); + char * (*m_pestrndup)(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D); + char * (*m_pestrdup)(const char * const ptr, zend_bool persistent MYSQLND_MEM_D); +}; -#else +PHPAPI extern struct st_mysqlnd_allocator_methods mysqlnd_allocator; -#define mnd_emalloc(size) emalloc((size)) -#define mnd_pemalloc(size, pers) pemalloc((size), (pers)) -#define mnd_ecalloc(nmemb, size) ecalloc((nmemb), (size)) -#define mnd_pecalloc(nmemb, size, p) pecalloc((nmemb), (size), (p)) -#define mnd_erealloc(ptr, new_size) erealloc((ptr), (new_size)) -#define mnd_perealloc(ptr, new_size, p) perealloc((ptr), (new_size), (p)) -#define mnd_efree(ptr) efree((ptr)) -#define mnd_pefree(ptr, pers) pefree((ptr), (pers)) -#define mnd_malloc(size) malloc((size)) -#define mnd_calloc(nmemb, size) calloc((nmemb), (size)) -#define mnd_realloc(ptr, new_size) realloc((ptr), (new_size)) -#define mnd_free(ptr) free((ptr)) -#endif +PHPAPI void * _mysqlnd_emalloc(size_t size MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_pemalloc(size_t size, zend_bool persistent MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_ecalloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_pecalloc(unsigned int nmemb, size_t size, zend_bool persistent MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_erealloc(void *ptr, size_t new_size MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_perealloc(void *ptr, size_t new_size, zend_bool persistent MYSQLND_MEM_D); +PHPAPI void _mysqlnd_efree(void *ptr MYSQLND_MEM_D); +PHPAPI void _mysqlnd_pefree(void *ptr, zend_bool persistent MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_malloc(size_t size MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_calloc(unsigned int nmemb, size_t size MYSQLND_MEM_D); +PHPAPI void * _mysqlnd_realloc(void *ptr, size_t new_size MYSQLND_MEM_D); +PHPAPI void _mysqlnd_free(void *ptr MYSQLND_MEM_D); +PHPAPI char * _mysqlnd_pestrndup(const char * const ptr, size_t size, zend_bool persistent MYSQLND_MEM_D); +PHPAPI char * _mysqlnd_pestrdup(const char * const ptr, zend_bool persistent MYSQLND_MEM_D); + + +#define mnd_emalloc(size) mysqlnd_allocator.m_emalloc((size) MYSQLND_MEM_C) +#define mnd_pemalloc(size, pers) mysqlnd_allocator.m_pemalloc((size), (pers) MYSQLND_MEM_C) +#define mnd_ecalloc(nmemb, size) mysqlnd_allocator.m_ecalloc((nmemb), (size) MYSQLND_MEM_C) +#define mnd_pecalloc(nmemb, size, p) mysqlnd_allocator.m_pecalloc((nmemb), (size), (p) MYSQLND_MEM_C) +#define mnd_erealloc(ptr, new_size) mysqlnd_allocator.m_erealloc((ptr), (new_size) MYSQLND_MEM_C) +#define mnd_perealloc(ptr, new_size, p) mysqlnd_allocator.m_perealloc((ptr), (new_size), (p) MYSQLND_MEM_C) +#define mnd_efree(ptr) mysqlnd_allocator.m_efree((ptr) MYSQLND_MEM_C) +#define mnd_pefree(ptr, pers) mysqlnd_allocator.m_pefree((ptr), (pers) MYSQLND_MEM_C) +#define mnd_malloc(size) mysqlnd_allocator.m_malloc((size) MYSQLND_MEM_C) +#define mnd_calloc(nmemb, size) mysqlnd_allocator.m_calloc((nmemb), (size) MYSQLND_MEM_C) +#define mnd_realloc(ptr, new_size) mysqlnd_allocator.m_realloc((ptr), (new_size) MYSQLND_MEM_C) +#define mnd_free(ptr) mysqlnd_allocator.m_free((ptr) MYSQLND_MEM_C) +#define mnd_pestrndup(ptr, size, pers) mysqlnd_allocator.m_pestrndup((ptr), (size), (pers) MYSQLND_MEM_C) +#define mnd_pestrdup(ptr, pers) mysqlnd_allocator.m_pestrdup((ptr), (pers) MYSQLND_MEM_C) #endif /* MYSQLND_DEBUG_H */ diff --git a/ext/mysqlnd/mysqlnd_enum_n_def.h b/ext/mysqlnd/mysqlnd_enum_n_def.h index 281319c73..dbc938b12 100644 --- a/ext/mysqlnd/mysqlnd_enum_n_def.h +++ b/ext/mysqlnd/mysqlnd_enum_n_def.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_enum_n_def.h 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_enum_n_def.h 298650 2010-04-27 11:02:51Z andrey $ */ #ifndef MYSQLND_ENUM_N_DEF_H #define MYSQLND_ENUM_N_DEF_H @@ -39,6 +39,8 @@ #define MYSQLND_SQLSTATE_LENGTH 5 #define MYSQLND_SQLSTATE_NULL "00000" +#define MYSQLND_MAX_ALLOWED_USER_LEN 256 /* 64 char * 4byte . MySQL supports now only 16 char, but let it be forward compatible */ +#define MYSQLND_MAX_ALLOWED_DB_LEN 1024 /* 256 char * 4byte. MySQL supports now only 64 char in the tables, but on the FS could be different. Forward compatible. */ #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE 4096 #define MYSQLND_NET_CMD_BUFFER_MIN_SIZE_STR "4096" @@ -90,6 +92,8 @@ #define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */ #define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */ +#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30) + typedef enum mysqlnd_extension { MYSQLND_MYSQL = 0, @@ -156,6 +160,12 @@ typedef enum mysqlnd_option #endif MYSQLND_OPT_NET_CMD_BUFFER_SIZE = 202, MYSQLND_OPT_NET_READ_BUFFER_SIZE = 203, + MYSQLND_OPT_SSL_KEY = 204, + MYSQLND_OPT_SSL_CERT = 205, + MYSQLND_OPT_SSL_CA = 206, + MYSQLND_OPT_SSL_CAPATH = 207, + MYSQLND_OPT_SSL_CIPHER = 208, + MYSQLND_OPT_SSL_PASSPHRASE = 209 } enum_mysqlnd_option; @@ -259,11 +269,11 @@ typedef enum mysqlnd_server_option /* - /-----> CONN_CLOSE <---------------\ - | ^ \ - | | \ + /-----> CONN_CLOSE <---------------\ + | ^ \ + | | \ CONN_READY -> CONN_QUERY_SENT -> CONN_FETCHING_DATA - ^ | + ^ | \-------------------------------------/ */ typedef enum mysqlnd_connection_state @@ -388,19 +398,25 @@ typedef enum mysqlnd_collected_stats STAT_STMT_CLOSE_EXPLICIT, STAT_STMT_CLOSE_IMPLICIT, STAT_MEM_EMALLOC_COUNT, - STAT_MEM_EMALLOC_AMMOUNT, + STAT_MEM_EMALLOC_AMOUNT, STAT_MEM_ECALLOC_COUNT, - STAT_MEM_ECALLOC_AMMOUNT, + STAT_MEM_ECALLOC_AMOUNT, STAT_MEM_EREALLOC_COUNT, - STAT_MEM_EREALLOC_AMMOUNT, + STAT_MEM_EREALLOC_AMOUNT, STAT_MEM_EFREE_COUNT, + STAT_MEM_EFREE_AMOUNT, STAT_MEM_MALLOC_COUNT, - STAT_MEM_MALLOC_AMMOUNT, + STAT_MEM_MALLOC_AMOUNT, STAT_MEM_CALLOC_COUNT, - STAT_MEM_CALLOC_AMMOUNT, + STAT_MEM_CALLOC_AMOUNT, STAT_MEM_REALLOC_COUNT, - STAT_MEM_REALLOC_AMMOUNT, + STAT_MEM_REALLOC_AMOUNT, STAT_MEM_FREE_COUNT, + STAT_MEM_FREE_AMOUNT, + STAT_MEM_ESTRNDUP_COUNT, + STAT_MEM_STRNDUP_COUNT, + STAT_MEM_ESTRDUP_COUNT, + STAT_MEM_STRDUP_COUNT, STAT_TEXT_TYPE_FETCHED_NULL, STAT_TEXT_TYPE_FETCHED_BIT, STAT_TEXT_TYPE_FETCHED_INT8, @@ -534,15 +550,15 @@ enum php_mysqlnd_server_command #define MYSQLND_DEFAULT_PREFETCH_ROWS (ulong) 1 -#define MYSQLND_REFRESH_GRANT 1 /* Refresh grant tables */ -#define MYSQLND_REFRESH_LOG 2 /* Start on new log file */ -#define MYSQLND_REFRESH_TABLES 4 /* close all tables */ -#define MYSQLND_REFRESH_HOSTS 8 /* Flush host cache */ -#define MYSQLND_REFRESH_STATUS 16 /* Flush status variables */ -#define MYSQLND_REFRESH_THREADS 32 /* Flush thread cache */ -#define MYSQLND_REFRESH_SLAVE 64 /* Reset master info and restart slave */ -#define MYSQLND_REFRESH_MASTER 128 /* Remove all bin logs in the index */ -#define MYSQLND_REFRESH_BACKUP_LOG 0x200000L +#define MYSQLND_REFRESH_GRANT 1 /* Refresh grant tables */ +#define MYSQLND_REFRESH_LOG 2 /* Start on new log file */ +#define MYSQLND_REFRESH_TABLES 4 /* close all tables */ +#define MYSQLND_REFRESH_HOSTS 8 /* Flush host cache */ +#define MYSQLND_REFRESH_STATUS 16 /* Flush status variables */ +#define MYSQLND_REFRESH_THREADS 32 /* Flush thread cache */ +#define MYSQLND_REFRESH_SLAVE 64 /* Reset master info and restart slave */ +#define MYSQLND_REFRESH_MASTER 128 /* Remove all bin logs in the index */ +#define MYSQLND_REFRESH_BACKUP_LOG 0x200000L #endif /* MYSQLND_ENUM_N_DEF_H */ diff --git a/ext/mysqlnd/mysqlnd_libmysql_compat.h b/ext/mysqlnd/mysqlnd_libmysql_compat.h index 78f48c97b..12c61b0d6 100644 --- a/ext/mysqlnd/mysqlnd_libmysql_compat.h +++ b/ext/mysqlnd/mysqlnd_libmysql_compat.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -79,6 +79,7 @@ #define mysql_set_server_option(r,o) mysqlnd_set_server_option((r), (o)) #define mysql_set_character_set(r,a) mysqlnd_set_character_set((r), (a)) #define mysql_sqlstate(r) mysqlnd_sqlstate((r)) +#define mysql_ssl_set(c,key,cert,ca,capath,cipher) mysqlnd_ssl_set((c), (key), (cert), (ca), (capath), (cipher)) #define mysql_stmt_affected_rows(s) mysqlnd_stmt_affected_rows((s)) #define mysql_stmt_field_count(s) mysqlnd_stmt_field_count((s)) #define mysql_stmt_param_count(s) mysqlnd_stmt_param_count((s)) @@ -121,14 +122,14 @@ #define mysql_warning_count(r) mysqlnd_warning_count((r)) #define mysql_eof(r) (((r)->unbuf && (r)->unbuf->eof_reached) || (r)->stored_data) -#define REFRESH_GRANT MYSQLND_REFRESH_GRANT -#define REFRESH_LOG MYSQLND_REFRESH_LOG -#define REFRESH_TABLES MYSQLND_REFRESH_TABLES -#define REFRESH_HOSTS MYSQLND_REFRESH_HOSTS -#define REFRESH_STATUS MYSQLND_REFRESH_STATUS -#define REFRESH_THREADS MYSQLND_REFRESH_THREADS -#define REFRESH_SLAVE MYSQLND_REFRESH_SLAVE -#define REFRESH_MASTER MYSQLND_REFRESH_MASTER -#define REFRESH_BACKUP_LOG MYSQLND_REFRESH_BACKUP_LOG +#define REFRESH_GRANT MYSQLND_REFRESH_GRANT +#define REFRESH_LOG MYSQLND_REFRESH_LOG +#define REFRESH_TABLES MYSQLND_REFRESH_TABLES +#define REFRESH_HOSTS MYSQLND_REFRESH_HOSTS +#define REFRESH_STATUS MYSQLND_REFRESH_STATUS +#define REFRESH_THREADS MYSQLND_REFRESH_THREADS +#define REFRESH_SLAVE MYSQLND_REFRESH_SLAVE +#define REFRESH_MASTER MYSQLND_REFRESH_MASTER +#define REFRESH_BACKUP_LOG MYSQLND_REFRESH_BACKUP_LOG #endif /* MYSQLND_LIBMYSQL_COMPAT_H */ diff --git a/ext/mysqlnd/mysqlnd_loaddata.c b/ext/mysqlnd/mysqlnd_loaddata.c index 77670ec1f..1885cbc6d 100644 --- a/ext/mysqlnd/mysqlnd_loaddata.c +++ b/ext/mysqlnd/mysqlnd_loaddata.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -37,7 +37,7 @@ if (c) {\ #define FREE_CALLBACK_ARGS(a, b, c)\ if (a) {\ - for (i=b; i < c; i++) {\ + for (i = b; i < c; i++) {\ zval_ptr_dtor(a[i]);\ mnd_efree(a[i]);\ }\ @@ -48,12 +48,17 @@ if (a) {\ static int mysqlnd_local_infile_init(void **ptr, char *filename, void **userdata TSRMLS_DC) { - MYSQLND_INFILE_INFO *info; - php_stream_context *context = NULL; + MYSQLND_INFILE_INFO *info; + php_stream_context *context = NULL; DBG_ENTER("mysqlnd_local_infile_init"); - *ptr = info = ((MYSQLND_INFILE_INFO *)mnd_ecalloc(1, sizeof(MYSQLND_INFILE_INFO))); + info = ((MYSQLND_INFILE_INFO *)mnd_ecalloc(1, sizeof(MYSQLND_INFILE_INFO))); + if (!info) { + DBG_RETURN(1); + } + + *ptr = info; /* check open_basedir */ if (PG(open_basedir)) { @@ -85,7 +90,7 @@ int mysqlnd_local_infile_read(void *ptr, char *buf, unsigned int buf_len TSRMLS_ MYSQLND_INFILE_INFO *info = (MYSQLND_INFILE_INFO *)ptr; int count; - DBG_ENTER("mysqlnd_local_infile_read"); + DBG_ENTER("mysqlnd_local_infile_read"); count = (int)php_stream_read(info->fd, buf, buf_len); @@ -171,7 +176,7 @@ mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_w char *buf; char empty_packet[MYSQLND_HEADER_SIZE]; enum_func_status result = FAIL; - unsigned int buflen = 4096; + unsigned int buflen = 4096; void *info = NULL; int bufsize; size_t ret; @@ -199,16 +204,14 @@ mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_w /* error occured */ strcpy(conn->error_info.sqlstate, UNKNOWN_SQLSTATE); conn->error_info.error_no = - infile.local_infile_error(info, conn->error_info.error, - sizeof(conn->error_info.error) TSRMLS_CC); + infile.local_infile_error(info, conn->error_info.error, sizeof(conn->error_info.error) TSRMLS_CC); /* write empty packet to server */ ret = conn->net->m.send(conn, empty_packet, 0 TSRMLS_CC); goto infile_error; } /* read data */ - while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, - buflen - MYSQLND_HEADER_SIZE TSRMLS_CC)) > 0) { + while ((bufsize = infile.local_infile_read (info, buf + MYSQLND_HEADER_SIZE, buflen - MYSQLND_HEADER_SIZE TSRMLS_CC)) > 0) { if ((ret = conn->net->m.send(conn, buf, bufsize TSRMLS_CC)) < 0) { DBG_ERR_FMT("Error during read : %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); SET_CLIENT_ERROR(conn->error_info, CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); @@ -227,8 +230,8 @@ mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_w *is_warning = TRUE; DBG_ERR_FMT("Bufsize < 0, warning, %d %s %s", CR_SERVER_LOST, UNKNOWN_SQLSTATE, lost_conn); strcpy(conn->error_info.sqlstate, UNKNOWN_SQLSTATE); - conn->error_info.error_no = infile.local_infile_error(info, conn->error_info.error, - sizeof(conn->error_info.error) TSRMLS_CC); + conn->error_info.error_no = + infile.local_infile_error(info, conn->error_info.error, sizeof(conn->error_info.error) TSRMLS_CC); goto infile_error; } diff --git a/ext/mysqlnd/mysqlnd_net.c b/ext/mysqlnd/mysqlnd_net.c index 8f4c46e9d..207fa53f0 100644 --- a/ext/mysqlnd/mysqlnd_net.c +++ b/ext/mysqlnd/mysqlnd_net.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -102,7 +102,11 @@ MYSQLND_METHOD(mysqlnd_net, network_write)(MYSQLND * const conn, const zend_ucha static enum_func_status MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const scheme, size_t scheme_len, zend_bool persistent, char **errstr, int * errcode TSRMLS_DC) { +#if PHP_API_VERSION < 20100412 unsigned int streams_options = ENFORCE_SAFE_MODE; +#else + unsigned int streams_options = 0; +#endif unsigned int streams_flags = STREAM_XPORT_CLIENT | STREAM_XPORT_CONNECT; char * hashed_details = NULL; int hashed_details_len = 0; @@ -121,14 +125,14 @@ MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const schem tv.tv_usec = 0; } + DBG_INF_FMT("calling php_stream_xport_create"); net->stream = php_stream_xport_create(scheme, scheme_len, streams_options, streams_flags, hashed_details, (net->options.timeout_connect) ? &tv : NULL, NULL /*ctx*/, errstr, errcode); - if (*errstr || !net->stream) { if (hashed_details) { - efree(hashed_details); + efree(hashed_details); /* allocated by spprintf */ } *errcode = CR_CONNECTION_ERROR; DBG_RETURN(FAIL); @@ -142,8 +146,7 @@ MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const schem */ zend_rsrc_list_entry *le; - if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_len + 1, - (void*) &le) == SUCCESS) { + if (zend_hash_find(&EG(persistent_list), hashed_details, hashed_details_len + 1, (void*) &le) == SUCCESS) { /* in_free will let streams code skip destructing - big HACK, but STREAMS suck big time regarding persistent streams. @@ -159,13 +162,21 @@ MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const schem #endif efree(hashed_details); } + /* + Streams are not meant for C extensions! Thus we need a hack. Every connected stream will + be registered as resource (in EG(regular_list). So far, so good. However, it won't be + unregistered till the script ends. So, we need to take care of that. + */ + net->stream->in_free = 1; + zend_hash_index_del(&EG(regular_list), net->stream->rsrc_id); + net->stream->in_free = 0; if (!net->options.timeout_read) { /* should always happen because read_timeout cannot be set via API */ net->options.timeout_read = (unsigned int) MYSQLND_G(net_read_timeout); } - if (net->options.timeout_read) - { + if (net->options.timeout_read) { + DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->options.timeout_read); tv.tv_sec = net->options.timeout_read; tv.tv_usec = 0; php_stream_set_option(net->stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv); @@ -188,13 +199,18 @@ MYSQLND_METHOD(mysqlnd_net, connect)(MYSQLND_NET * net, const char * const schem /* We assume that MYSQLND_HEADER_SIZE is 4 bytes !! */ -#define STORE_HEADER_SIZE(safe_storage, buffer) int4store((safe_storage), (*(uint32_t *)(buffer))) +#define COPY_HEADER(T,A) do { \ + *(((char *)(T))) = *(((char *)(A)));\ + *(((char *)(T))+1) = *(((char *)(A))+1);\ + *(((char *)(T))+2) = *(((char *)(A))+2);\ + *(((char *)(T))+3) = *(((char *)(A))+3); } while (0) +#define STORE_HEADER_SIZE(safe_storage, buffer) COPY_HEADER((safe_storage), (buffer)) #define RESTORE_HEADER_SIZE(buffer, safe_storage) STORE_HEADER_SIZE((safe_storage), (buffer)) /* {{{ mysqlnd_net::send */ /* IMPORTANT : It's expected that buf has place in the beginning for MYSQLND_HEADER_SIZE !!!! - This is done for performance reasons in the caller of this function. + This is done for performance reasons in the caller of this function. Otherwise we will have to do send two TCP packets, or do new alloc and memcpy. Neither are quick, thus the clients of this function are obligated to do what they are asked for. @@ -216,14 +232,14 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t size_t to_be_sent; DBG_ENTER("mysqlnd_net::send"); - DBG_INF_FMT("conn=%llu count=%lu compression=%d", conn->thread_id, count, net->compressed); + DBG_INF_FMT("conn=%llu count=%lu compression=%u", conn->thread_id, count, net->compressed); net->stream->chunk_size = MYSQLND_MAX_PACKET_SIZE; if (net->compressed == TRUE) { size_t comp_buf_size = MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE + MYSQLND_HEADER_SIZE + MIN(left, MYSQLND_MAX_PACKET_SIZE); - DBG_INF_FMT("compress_buf_size=%d", comp_buf_size); - compress_buf = emalloc(comp_buf_size); + DBG_INF_FMT("compress_buf_size="MYSQLND_SZ_T_SPEC, comp_buf_size); + compress_buf = mnd_emalloc(comp_buf_size); } do { @@ -238,7 +254,9 @@ 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, uncompressed_payload, to_be_sent + MYSQLND_HEADER_SIZE TSRMLS_CC)) { + 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); payload_size = tmp_complen; } else { @@ -250,14 +268,15 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t int3store(compress_buf, payload_size); int1store(compress_buf + 3, net->packet_no); - DBG_INF_FMT("writing %d bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE); + DBG_INF_FMT("writing "MYSQLND_SZ_T_SPEC" bytes to the network", payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE); ret = conn->net->m.network_write(conn, compress_buf, payload_size + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE TSRMLS_CC); net->compressed_envelope_packet_no++; #if WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY if (res == Z_OK) { size_t decompressed_size = left + MYSQLND_HEADER_SIZE; - zend_uchar * decompressed_data = malloc(decompressed_size); - int error = net->m.decode(decompressed_data, decompressed_size, compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, payload_size); + zend_uchar * decompressed_data = mnd_malloc(decompressed_size); + int error = net->m.decode(decompressed_data, decompressed_size, + compress_buf + MYSQLND_HEADER_SIZE + COMPRESSED_HEADER_SIZE, payload_size); if (error == Z_OK) { int i; DBG_INF("success decompressing"); @@ -271,7 +290,7 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t } else { DBG_INF("error decompressing"); } - free(decompressed_data); + mnd_free(decompressed_data); } #endif /* WHEN_WE_NEED_TO_CHECK_WHETHER_COMPRESSION_WORKS_CORRECTLY */ } else @@ -299,7 +318,7 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t */ } while (ret && (left > 0 || to_be_sent == MYSQLND_MAX_PACKET_SIZE)); - DBG_INF_FMT("packet_size=%d packet_no=%d", left, net->packet_no); + DBG_INF_FMT("packet_size="MYSQLND_SZ_T_SPEC" packet_no=%u", left, net->packet_no); /* Even for zero size payload we have to send a packet */ if (!ret) { DBG_ERR_FMT("Can't %u send bytes", count); @@ -314,7 +333,7 @@ MYSQLND_METHOD(mysqlnd_net, send)(MYSQLND * const conn, char * const buf, size_t net->stream->chunk_size = old_chunk_size; if (compress_buf) { - efree(compress_buf); + mnd_efree(compress_buf); } DBG_RETURN(ret); } @@ -407,7 +426,7 @@ mysqlnd_read_compressed_packet_from_stream_and_fill_read_buffer(MYSQLND * conn, /* we need to decompress the data */ if (decompressed_size) { - compressed_data = emalloc(net_payload_size); + compressed_data = mnd_emalloc(net_payload_size); if (FAIL == conn->net->m.network_read(conn, compressed_data, net_payload_size TSRMLS_CC)) { ret = FAIL; goto end; @@ -427,7 +446,7 @@ mysqlnd_read_compressed_packet_from_stream_and_fill_read_buffer(MYSQLND * conn, } end: if (compressed_data) { - efree(compressed_data); + mnd_efree(compressed_data); } DBG_RETURN(ret); } @@ -440,16 +459,21 @@ static enum_func_status MYSQLND_METHOD(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) { +#ifdef MYSQLND_COMPRESSION_ENABLED int error; uLongf tmp_complen = uncompressed_data_len; DBG_ENTER("mysqlnd_net::decode"); error = uncompress(uncompressed_data, &tmp_complen, compressed_data, compressed_data_len); - DBG_INF_FMT("compressed data: decomp_len=%d compressed_size=%d", tmp_complen, compressed_data_len); + DBG_INF_FMT("compressed data: decomp_len=%lu compressed_size="MYSQLND_SZ_T_SPEC, tmp_complen, compressed_data_len); if (error != Z_OK) { DBG_INF_FMT("decompression NOT successful. error=%d Z_OK=%d Z_BUF_ERROR=%d Z_MEM_ERROR=%d", error, Z_OK, Z_BUF_ERROR, Z_MEM_ERROR); } DBG_RETURN(error == Z_OK? PASS:FAIL); +#else + DBG_ENTER("mysqlnd_net::decode"); + DBG_RETURN(FAIL); +#endif } /* }}} */ @@ -459,6 +483,7 @@ static enum_func_status 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; DBG_ENTER("mysqlnd_net::encode"); @@ -467,15 +492,19 @@ MYSQLND_METHOD(mysqlnd_net, encode)(zend_uchar * compress_buffer, size_t compres 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 { - DBG_INF_FMT("compression successful. compressed size=%d", 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"); + DBG_RETURN(FAIL); +#endif } /* }}} */ /* {{{ mysqlnd_net::receive */ -static size_t +static enum_func_status MYSQLND_METHOD(mysqlnd_net, receive)(MYSQLND * conn, zend_uchar * buffer, size_t count TSRMLS_DC) { size_t to_read = count; @@ -510,16 +539,16 @@ MYSQLND_METHOD(mysqlnd_net, receive)(MYSQLND * conn, zend_uchar * buffer, size_t net_payload_size = uint3korr(net_header); packet_no = uint1korr(net_header + 3); if (net->compressed_envelope_packet_no != packet_no) { - DBG_ERR_FMT("Transport level: packets out of order. Expected %d received %d. Packet size=%d", + DBG_ERR_FMT("Transport level: packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC, net->compressed_envelope_packet_no, packet_no, net_payload_size); - php_error(E_WARNING, "Packets out of order. Expected %d received %d. Packet size="MYSQLND_SZ_T_SPEC, + php_error(E_WARNING, "Packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC, net->compressed_envelope_packet_no, packet_no, net_payload_size); DBG_RETURN(FAIL); } net->compressed_envelope_packet_no++; #ifdef MYSQLND_DUMP_HEADER_N_BODY - DBG_INF_FMT("HEADER: hwd_packet_no=%d size=%3d", packet_no, net_payload_size); + DBG_INF_FMT("HEADER: hwd_packet_no=%u size=%3u", packet_no, (unsigned long) net_payload_size); #endif /* Now let's read from the wire, decompress it and fill the read buffer */ mysqlnd_read_compressed_packet_from_stream_and_fill_read_buffer(conn, net_payload_size TSRMLS_CC); @@ -545,7 +574,7 @@ static enum_func_status MYSQLND_METHOD(mysqlnd_net, set_client_option)(MYSQLND_NET * const net, enum mysqlnd_option option, const char * const value TSRMLS_DC) { DBG_ENTER("mysqlnd_net::set_client_option"); - DBG_INF_FMT("option=%d", option); + DBG_INF_FMT("option=%u", option); switch (option) { case MYSQLND_OPT_NET_CMD_BUFFER_SIZE: DBG_INF("MYSQLND_OPT_NET_CMD_BUFFER_SIZE"); @@ -569,6 +598,63 @@ MYSQLND_METHOD(mysqlnd_net, set_client_option)(MYSQLND_NET * const net, enum mys DBG_INF("MYSQL_OPT_CONNECT_TIMEOUT"); net->options.timeout_connect = *(unsigned int*) value; break; + case MYSQLND_OPT_SSL_KEY: + { + zend_bool pers = net->persistent; + if (net->options.ssl_key) { + mnd_pefree(net->options.ssl_key, pers); + } + net->options.ssl_key = value? mnd_pestrdup(value, pers) : NULL; + break; + } + case MYSQLND_OPT_SSL_CERT: + { + zend_bool pers = net->persistent; + if (net->options.ssl_cert) { + mnd_pefree(net->options.ssl_cert, pers); + } + net->options.ssl_cert = value? mnd_pestrdup(value, pers) : NULL; + break; + } + case MYSQLND_OPT_SSL_CA: + { + zend_bool pers = net->persistent; + if (net->options.ssl_ca) { + mnd_pefree(net->options.ssl_ca, pers); + } + net->options.ssl_ca = value? mnd_pestrdup(value, pers) : NULL; + break; + } + case MYSQLND_OPT_SSL_CAPATH: + { + zend_bool pers = net->persistent; + if (net->options.ssl_capath) { + mnd_pefree(net->options.ssl_capath, pers); + } + net->options.ssl_capath = value? mnd_pestrdup(value, pers) : NULL; + break; + } + case MYSQLND_OPT_SSL_CIPHER: + { + zend_bool pers = net->persistent; + if (net->options.ssl_cipher) { + mnd_pefree(net->options.ssl_cipher, pers); + } + net->options.ssl_cipher = value? mnd_pestrdup(value, pers) : NULL; + break; + } + case MYSQLND_OPT_SSL_PASSPHRASE: + { + zend_bool pers = net->persistent; + if (net->options.ssl_passphrase) { + mnd_pefree(net->options.ssl_passphrase, pers); + } + net->options.ssl_passphrase = value? mnd_pestrdup(value, pers) : NULL; + break; + } + case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: + net->options.ssl_verify_peer = value? ((*(zend_bool *)value)? TRUE:FALSE): FALSE; + break; #ifdef WHEN_SUPPORTED_BY_MYSQLI case MYSQL_OPT_READ_TIMEOUT: DBG_INF("MYSQL_OPT_READ_TIMEOUT"); @@ -639,12 +725,113 @@ MYSQLND_METHOD(mysqlnd_net, consume_uneaten_data)(MYSQLND_NET * const net, enum } /* }}} */ +/* + in libmyusql, if cert and !key then key=cert +*/ +/* {{{ mysqlnd_net::enable_ssl */ +static enum_func_status +MYSQLND_METHOD(mysqlnd_net, enable_ssl)(MYSQLND_NET * const net TSRMLS_DC) +{ +#ifdef MYSQLND_SSL_SUPPORTED + php_stream_context *context = php_stream_context_alloc(); + DBG_ENTER("mysqlnd_net::enable_ssl"); + if (!context) { + DBG_RETURN(FAIL); + } + + if (net->options.ssl_key) { + zval key_zval; + ZVAL_STRING(&key_zval, net->options.ssl_key, 0); + DBG_INF("key"); + php_stream_context_set_option(context, "ssl", "local_pk", &key_zval); + } + if (net->options.ssl_verify_peer) { + zval verify_peer_zval; + ZVAL_TRUE(&verify_peer_zval); + DBG_INF("verify peer"); + php_stream_context_set_option(context, "ssl", "verify_peer", &verify_peer_zval); + } + if (net->options.ssl_cert) { + zval cert_zval; + ZVAL_STRING(&cert_zval, net->options.ssl_cert, 0); + DBG_INF_FMT("local_cert=%s", net->options.ssl_cert); + php_stream_context_set_option(context, "ssl", "local_cert", &cert_zval); + if (!net->options.ssl_key) { + php_stream_context_set_option(context, "ssl", "local_pk", &cert_zval); + } + } + if (net->options.ssl_ca) { + zval cafile_zval; + ZVAL_STRING(&cafile_zval, net->options.ssl_ca, 0); + DBG_INF_FMT("cafile=%s", net->options.ssl_ca); + php_stream_context_set_option(context, "ssl", "cafile", &cafile_zval); + } + if (net->options.ssl_capath) { + zval capath_zval; + ZVAL_STRING(&capath_zval, net->options.ssl_capath, 0); + DBG_INF_FMT("capath=%s", net->options.ssl_capath); + php_stream_context_set_option(context, "ssl", "cafile", &capath_zval); + } + if (net->options.ssl_passphrase) { + zval passphrase_zval; + ZVAL_STRING(&passphrase_zval, net->options.ssl_passphrase, 0); + php_stream_context_set_option(context, "ssl", "passphrase", &passphrase_zval); + } + if (net->options.ssl_cipher) { + zval cipher_zval; + ZVAL_STRING(&cipher_zval, net->options.ssl_cipher, 0); + DBG_INF_FMT("ciphers=%s", net->options.ssl_cipher); + php_stream_context_set_option(context, "ssl", "ciphers", &cipher_zval); + } + php_stream_context_set(net->stream, context); + if (php_stream_xport_crypto_setup(net->stream, STREAM_CRYPTO_METHOD_TLS_CLIENT, NULL TSRMLS_CC) < 0 || + php_stream_xport_crypto_enable(net->stream, 1 TSRMLS_CC) < 0) + { + DBG_ERR("Cannot connect to MySQL by using SSL"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot connect to MySQL by using SSL"); + DBG_RETURN(FAIL); + } + /* + get rid of the context. we are persistent and if this is a real pconn used by mysql/mysqli, + then the context would not survive cleaning of EG(regular_list), where it is registered, as a + resource. What happens is that after this destruction any use of the network will mean usage + of the context, which means usage of already freed memory, bad. Actually we don't need this + context anymore after we have enabled SSL on the connection. Thus it is very simple, we remove it. + */ + php_stream_context_set(net->stream, NULL); + + if (net->options.timeout_read) { + struct timeval tv; + DBG_INF_FMT("setting %u as PHP_STREAM_OPTION_READ_TIMEOUT", net->options.timeout_read); + tv.tv_sec = net->options.timeout_read; + tv.tv_usec = 0; + php_stream_set_option(net->stream, PHP_STREAM_OPTION_READ_TIMEOUT, 0, &tv); + } + + DBG_RETURN(PASS); +#else + DBG_ENTER("mysqlnd_net::enable_ssl"); + DBG_RETURN(PASS); +#endif +} +/* }}} */ + + +/* {{{ mysqlnd_net::disable_ssl */ +static enum_func_status +MYSQLND_METHOD(mysqlnd_net, disable_ssl)(MYSQLND_NET * const net TSRMLS_DC) +{ + DBG_ENTER("mysqlnd_net::disable_ssl"); + DBG_RETURN(PASS); +} +/* }}} */ /* {{{ mysqlnd_net::set_client_option */ static void MYSQLND_METHOD(mysqlnd_net, free_contents)(MYSQLND_NET * net TSRMLS_DC) { + zend_bool pers = net->persistent; DBG_ENTER("mysqlnd_net::free_contents"); #ifdef MYSQLND_COMPRESSION_ENABLED @@ -652,10 +839,47 @@ MYSQLND_METHOD(mysqlnd_net, free_contents)(MYSQLND_NET * net TSRMLS_DC) net->uncompressed_data->free_buffer(&net->uncompressed_data TSRMLS_CC); } #endif + if (net->options.ssl_key) { + mnd_pefree(net->options.ssl_key, pers); + net->options.ssl_key = NULL; + } + if (net->options.ssl_cert) { + mnd_pefree(net->options.ssl_cert, pers); + net->options.ssl_cert = NULL; + } + if (net->options.ssl_ca) { + mnd_pefree(net->options.ssl_ca, pers); + net->options.ssl_ca = NULL; + } + if (net->options.ssl_capath) { + mnd_pefree(net->options.ssl_capath, pers); + net->options.ssl_capath = NULL; + } + if (net->options.ssl_cipher) { + mnd_pefree(net->options.ssl_cipher, pers); + net->options.ssl_cipher = NULL; + } + DBG_VOID_RETURN; } /* }}} */ +static +MYSQLND_CLASS_METHODS_START(mysqlnd_net) + MYSQLND_METHOD(mysqlnd_net, connect), + MYSQLND_METHOD(mysqlnd_net, send), + MYSQLND_METHOD(mysqlnd_net, receive), + MYSQLND_METHOD(mysqlnd_net, set_client_option), + MYSQLND_METHOD(mysqlnd_net, network_read), + MYSQLND_METHOD(mysqlnd_net, network_write), + MYSQLND_METHOD(mysqlnd_net, decode), + MYSQLND_METHOD(mysqlnd_net, encode), + MYSQLND_METHOD(mysqlnd_net, consume_uneaten_data), + MYSQLND_METHOD(mysqlnd_net, free_contents), + MYSQLND_METHOD(mysqlnd_net, enable_ssl), + MYSQLND_METHOD(mysqlnd_net, disable_ssl) +MYSQLND_CLASS_METHODS_END; + /* {{{ mysqlnd_net_init */ PHPAPI MYSQLND_NET * @@ -665,23 +889,15 @@ mysqlnd_net_init(zend_bool persistent TSRMLS_DC) MYSQLND_NET * net = mnd_pecalloc(1, alloc_size, persistent); DBG_ENTER("mysqlnd_net_init"); - DBG_INF_FMT("persistent=%d", persistent); - net->persistent = persistent; - - net->m.connect = MYSQLND_METHOD(mysqlnd_net, connect); - net->m.send = MYSQLND_METHOD(mysqlnd_net, send); - net->m.receive = MYSQLND_METHOD(mysqlnd_net, receive); - net->m.set_client_option = MYSQLND_METHOD(mysqlnd_net, set_client_option); - net->m.network_read = MYSQLND_METHOD(mysqlnd_net, network_read); - net->m.network_write = MYSQLND_METHOD(mysqlnd_net, network_write); - net->m.decode = MYSQLND_METHOD(mysqlnd_net, decode); - net->m.encode = MYSQLND_METHOD(mysqlnd_net, encode); - net->m.consume_uneaten_data = MYSQLND_METHOD(mysqlnd_net, consume_uneaten_data); - net->m.free_contents = MYSQLND_METHOD(mysqlnd_net, free_contents); + DBG_INF_FMT("persistent=%u", persistent); + if (net) { + net->persistent = persistent; + net->m = mysqlnd_mysqlnd_net_methods; - { - unsigned int buf_size = MYSQLND_G(net_read_buffer_size); /* this is long, cast to unsigned int*/ - net->m.set_client_option(net, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size TSRMLS_CC); + { + unsigned int buf_size = MYSQLND_G(net_cmd_buffer_size); /* this is long, cast to unsigned int*/ + net->m.set_client_option(net, MYSQLND_OPT_NET_CMD_BUFFER_SIZE, (char *) &buf_size TSRMLS_CC); + } } DBG_RETURN(net); } @@ -703,13 +919,12 @@ mysqlnd_net_free(MYSQLND_NET * const net TSRMLS_DC) mnd_pefree(net->cmd_buffer.buffer, pers); net->cmd_buffer.buffer = NULL; } - if (net->stream) { DBG_INF_FMT("Freeing stream. abstract=%p", net->stream->abstract); if (pers) { 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); + php_stream_free(net->stream, PHP_STREAM_FREE_CLOSE); } net->stream = NULL; } @@ -733,6 +948,14 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_net_data(const MYSQLND_NET * net, unsi /* }}} */ +/* {{{ mysqlnd_net_get_methods */ +PHPAPI struct st_mysqlnd_net_methods * +mysqlnd_net_get_methods() +{ + return &mysqlnd_mysqlnd_net_methods; +} +/* }}} */ + /* * Local variables: diff --git a/ext/mysqlnd/mysqlnd_net.h b/ext/mysqlnd/mysqlnd_net.h index 8f75a8eb2..d52fca5e7 100644 --- a/ext/mysqlnd/mysqlnd_net.h +++ b/ext/mysqlnd/mysqlnd_net.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -26,6 +26,8 @@ PHPAPI MYSQLND_NET * mysqlnd_net_init(zend_bool persistent TSRMLS_DC); PHPAPI void mysqlnd_net_free(MYSQLND_NET * const net TSRMLS_DC); +PHPAPI struct st_mysqlnd_net_methods * mysqlnd_net_get_methods(); + #endif /* MYSQLND_NET_H */ /* diff --git a/ext/mysqlnd/mysqlnd_portability.h b/ext/mysqlnd/mysqlnd_portability.h index ed0a5c8b1..532c71959 100644 --- a/ext/mysqlnd/mysqlnd_portability.h +++ b/ext/mysqlnd/mysqlnd_portability.h @@ -38,6 +38,12 @@ This file is public domain and comes with NO WARRANTY of any kind */ # include <ext/mysqlnd/php_mysqlnd_config.h> #endif /* _WIN32... */ +#if __STDC_VERSION__ < 199901L && !defined(atoll) + /* "inline" is a keyword */ + #define atoll atol +#endif + + #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif diff --git a/ext/mysqlnd/mysqlnd_priv.h b/ext/mysqlnd/mysqlnd_priv.h index c9f40cda6..e55522208 100644 --- a/ext/mysqlnd/mysqlnd_priv.h +++ b/ext/mysqlnd/mysqlnd_priv.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_priv.h 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_priv.h 298781 2010-04-29 15:49:51Z andrey $ */ #ifndef MYSQLND_PRIV_H #define MYSQLND_PRIV_H @@ -42,8 +42,8 @@ #endif #define MYSQLND_CLASS_METHOD_TABLE_NAME(class) mysqlnd_##class##_methods -#define MYSQLND_CLASS_METHODS_START(class) struct st_##class##_methods MYSQLND_CLASS_METHOD_TABLE_NAME(class) = { -#define MYSQLND_CLASS_METHODS_END } +#define MYSQLND_CLASS_METHODS_START(class) struct st_##class##_methods MYSQLND_CLASS_METHOD_TABLE_NAME(class) = { +#define MYSQLND_CLASS_METHODS_END } #if PHP_MAJOR_VERSION < 6 #define mysqlnd_array_init(arg, field_count) \ @@ -93,10 +93,10 @@ #define SET_NEW_MESSAGE(buf, buf_len, message, len, persistent) \ {\ if ((buf)) { \ - pefree((buf), (persistent)); \ + mnd_pefree((buf), (persistent)); \ } \ if ((message)) { \ - (buf) = pestrndup((message), (len), (persistent)); \ + (buf) = mnd_pestrndup((message), (len), (persistent)); \ } else { \ buf = NULL; \ } \ @@ -106,7 +106,7 @@ #define SET_EMPTY_MESSAGE(buf, buf_len, persistent) \ {\ if ((buf)) { \ - pefree((buf), (persistent)); \ + mnd_pefree((buf), (persistent)); \ (buf) = NULL; \ } \ (buf_len) = 0; \ @@ -127,6 +127,9 @@ strlcpy(error_info.error, (c), sizeof(error_info.error)); \ } +#define SET_OOM_ERROR(error_info) SET_CLIENT_ERROR(error_info, CR_OUT_OF_MEMORY, UNKNOWN_SQLSTATE, mysqlnd_out_of_memory) + + #define SET_STMT_ERROR(stmt, a, b, c) SET_CLIENT_ERROR(stmt->error_info, a, b, c) @@ -134,8 +137,8 @@ #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 +#define CONN_GET_STATE(c) ((c)->state) +#define CONN_SET_STATE(c, s) ((c)->state = s) #endif @@ -157,6 +160,7 @@ extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST + PHPAPI extern const char * const mysqlnd_old_passwd; PHPAPI extern const char * const mysqlnd_out_of_sync; PHPAPI extern const char * const mysqlnd_server_gone; +PHPAPI extern const char * const mysqlnd_out_of_memory; enum_func_status mysqlnd_handle_local_infile(MYSQLND *conn, const char *filename, zend_bool *is_warning TSRMLS_DC); diff --git a/ext/mysqlnd/mysqlnd_ps.c b/ext/mysqlnd/mysqlnd_ps.c index 06ec510f5..fa8be3ec2 100644 --- a/ext/mysqlnd/mysqlnd_ps.c +++ b/ext/mysqlnd/mysqlnd_ps.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_ps.c 300735 2010-06-24 19:52:13Z andrey $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -39,11 +39,7 @@ const char * const mysqlnd_stmt_not_prepared = "Statement not prepared"; static struct st_mysqlnd_stmt_methods *mysqlnd_stmt_methods; /* Exported by mysqlnd_ps_codec.c */ -zend_uchar* mysqlnd_stmt_execute_generate_request(MYSQLND_STMT *stmt, size_t *request_len, - zend_bool *free_buffer TSRMLS_DC); - - -MYSQLND_RES * _mysqlnd_stmt_use_result(MYSQLND_STMT *stmt TSRMLS_DC); +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, unsigned int flags, @@ -57,20 +53,25 @@ static void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt TSRMLS_D static void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC); static void mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC); -static enum_func_status mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const stmt TSRMLS_DC); /* {{{ mysqlnd_stmt::store_result */ static MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret; - MYSQLND *conn = stmt->conn; - MYSQLND_RES *result; + MYSQLND * conn; + MYSQLND_RES * result; zend_bool to_cache = FALSE; DBG_ENTER("mysqlnd_stmt::store_result"); + if (!stmt || !stmt->conn || !stmt->result) { + DBG_RETURN(NULL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); + conn = stmt->conn; + /* be compliant with libmysql - NULL will turn */ if (!stmt->field_count) { DBG_RETURN(NULL); @@ -78,7 +79,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const stmt TSRMLS_DC) if (stmt->cursor_exists) { /* Silently convert buffered to unbuffered, for now */ - DBG_RETURN(stmt->m->use_result(stmt TSRMLS_CC)); + DBG_RETURN(s->m->use_result(s TSRMLS_CC)); } /* Nothing to store for UPSERT/LOAD DATA*/ @@ -90,7 +91,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const stmt TSRMLS_DC) DBG_RETURN(NULL); } - stmt->default_rset_handler = stmt->m->store_result; + stmt->default_rset_handler = s->m->store_result; SET_EMPTY_ERROR(stmt->error_info); SET_EMPTY_ERROR(stmt->conn->error_info); @@ -101,7 +102,7 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const stmt TSRMLS_DC) result->m.fetch_row = mysqlnd_fetch_stmt_row_buffered; result->m.fetch_lengths = NULL;/* makes no sense */ - result->result_set_memory_pool = mysqlnd_mempool_create(16000 TSRMLS_CC); + result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); ret = result->m.store_result_fetch_data(conn, result, result->meta, TRUE, to_cache TSRMLS_CC); @@ -125,14 +126,20 @@ MYSQLND_METHOD(mysqlnd_stmt, store_result)(MYSQLND_STMT * const stmt TSRMLS_DC) /* {{{ mysqlnd_stmt::get_result */ static MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const s TSRMLS_DC) { - MYSQLND *conn = stmt->conn; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + MYSQLND * conn; MYSQLND_RES *result; DBG_ENTER("mysqlnd_stmt::get_result"); + if (!stmt || !stmt->conn || !stmt->result) { + DBG_RETURN(NULL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); + conn = stmt->conn; + /* be compliant with libmysql - NULL will turn */ if (!stmt->field_count) { DBG_RETURN(NULL); @@ -140,7 +147,7 @@ MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const stmt TSRMLS_DC) if (stmt->cursor_exists) { /* Silently convert buffered to unbuffered, for now */ - DBG_RETURN(stmt->m->use_result(stmt TSRMLS_CC)); + DBG_RETURN(s->m->use_result(s TSRMLS_CC)); } /* Nothing to store for UPSERT/LOAD DATA*/ @@ -154,31 +161,47 @@ MYSQLND_METHOD(mysqlnd_stmt, get_result)(MYSQLND_STMT * const stmt TSRMLS_DC) SET_EMPTY_ERROR(stmt->conn->error_info); MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_BUFFERED_SETS); - result = mysqlnd_result_init(stmt->result->field_count TSRMLS_CC); + do { + result = conn->m->result_init(stmt->result->field_count, stmt->persistent TSRMLS_CC); + if (!result) { + SET_OOM_ERROR(stmt->conn->error_info); + break; + } - result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE TSRMLS_CC); + result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE TSRMLS_CC); + if (!result->meta) { + SET_OOM_ERROR(stmt->conn->error_info); + break; + } - if ((result = result->m.store_result(result, conn, TRUE TSRMLS_CC))) { - stmt->upsert_status.affected_rows = result->stored_data->row_count; - stmt->state = MYSQLND_STMT_PREPARED; - result->type = MYSQLND_RES_PS_BUF; - } else { - stmt->error_info = conn->error_info; - stmt->state = MYSQLND_STMT_PREPARED; - } + if ((result = result->m.store_result(result, conn, TRUE TSRMLS_CC))) { + stmt->upsert_status.affected_rows = result->stored_data->row_count; + stmt->state = MYSQLND_STMT_PREPARED; + result->type = MYSQLND_RES_PS_BUF; + } else { + stmt->error_info = conn->error_info; + stmt->state = MYSQLND_STMT_PREPARED; + break; + } + DBG_RETURN(result); + } while (0); - DBG_RETURN(result); + if (result) { + result->m.free_result(result, TRUE TSRMLS_CC); + } + DBG_RETURN(NULL); } /* }}} */ /* {{{ mysqlnd_stmt::more_results */ static zend_bool -MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::more_results"); /* (conn->state == CONN_NEXT_RESULT_PENDING) too */ - DBG_RETURN((stmt->conn && (stmt->conn->upsert_status.server_status & + DBG_RETURN((stmt && stmt->conn && (stmt->conn->upsert_status.server_status & SERVER_MORE_RESULTS_EXISTS))? TRUE: FALSE); @@ -188,50 +211,61 @@ MYSQLND_METHOD(mysqlnd_stmt, more_results)(const MYSQLND_STMT * stmt TSRMLS_DC) /* {{{ mysqlnd_stmt::next_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, next_result)(MYSQLND_STMT * stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, next_result)(MYSQLND_STMT * s TSRMLS_DC) { - MYSQLND *conn = stmt->conn; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + MYSQLND * conn; DBG_ENTER("mysqlnd_stmt::next_result"); + if (!stmt || !stmt->conn || !stmt->result) { + DBG_RETURN(FAIL); + } + conn = stmt->conn; DBG_INF_FMT("stmt=%lu", stmt->stmt_id); - if (!conn || - CONN_GET_STATE(conn) != CONN_NEXT_RESULT_PENDING || - !(conn->upsert_status.server_status & SERVER_MORE_RESULTS_EXISTS) || - !stmt->result) - { + if (CONN_GET_STATE(conn) != CONN_NEXT_RESULT_PENDING || !(conn->upsert_status.server_status & SERVER_MORE_RESULTS_EXISTS)) { DBG_RETURN(FAIL); } /* Free space for next result */ - mysqlnd_internal_free_stmt_content(stmt TSRMLS_CC); + mysqlnd_internal_free_stmt_content(s TSRMLS_CC); - DBG_RETURN(mysqlnd_stmt_execute_parse_response(stmt TSRMLS_CC)); + DBG_RETURN(s->m->parse_execute_response(s TSRMLS_CC)); } /* }}} */ /* {{{ mysqlnd_stmt_skip_metadata */ static enum_func_status -mysqlnd_stmt_skip_metadata(MYSQLND_STMT *stmt TSRMLS_DC) +mysqlnd_stmt_skip_metadata(MYSQLND_STMT * s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; /* Follows parameter metadata, we have just to skip it, as libmysql does */ unsigned int i = 0; - enum_func_status ret = PASS; + enum_func_status ret = FAIL; MYSQLND_PACKET_RES_FIELD * field_packet; DBG_ENTER("mysqlnd_stmt_skip_metadata"); + if (!stmt || !stmt->conn || !stmt->conn->protocol) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); field_packet = stmt->conn->protocol->m.get_result_field_packet(stmt->conn->protocol, FALSE TSRMLS_CC); - field_packet->skip_parsing = TRUE; - for (;i < stmt->param_count; i++) { - if (FAIL == PACKET_READ(field_packet, stmt->conn)) { - ret = FAIL; - break; + if (!field_packet) { + SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(stmt->conn->error_info); + } else { + ret = PASS; + field_packet->skip_parsing = TRUE; + for (;i < stmt->param_count; i++) { + if (FAIL == PACKET_READ(field_packet, stmt->conn)) { + ret = FAIL; + break; + } } + PACKET_FREE(field_packet); } - PACKET_FREE(field_packet); DBG_RETURN(ret); } @@ -240,26 +274,34 @@ mysqlnd_stmt_skip_metadata(MYSQLND_STMT *stmt TSRMLS_DC) /* {{{ mysqlnd_stmt_read_prepare_response */ static enum_func_status -mysqlnd_stmt_read_prepare_response(MYSQLND_STMT *stmt TSRMLS_DC) +mysqlnd_stmt_read_prepare_response(MYSQLND_STMT * s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; MYSQLND_PACKET_PREPARE_RESPONSE * prepare_resp; - enum_func_status ret = PASS; + enum_func_status ret = FAIL; DBG_ENTER("mysqlnd_stmt_read_prepare_response"); + if (!stmt || !stmt->conn || !stmt->conn->protocol) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); prepare_resp = stmt->conn->protocol->m.get_prepare_response_packet(stmt->conn->protocol, FALSE TSRMLS_CC); + if (!prepare_resp) { + SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(stmt->conn->error_info); + goto done; + } + if (FAIL == PACKET_READ(prepare_resp, stmt->conn)) { - ret = FAIL; goto done; } if (0xFF == prepare_resp->error_code) { stmt->error_info = stmt->conn->error_info = prepare_resp->error_info; - ret = FAIL; goto done; } - + ret = PASS; stmt->stmt_id = prepare_resp->stmt_id; stmt->warning_count = stmt->conn->upsert_status.warning_count = prepare_resp->warning_count; stmt->field_count = stmt->conn->field_count = prepare_resp->field_count; @@ -274,28 +316,37 @@ done: /* {{{ mysqlnd_stmt_prepare_read_eof */ static enum_func_status -mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT *stmt TSRMLS_DC) +mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT * s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; MYSQLND_PACKET_EOF * fields_eof; - enum_func_status ret; + enum_func_status ret = FAIL; DBG_ENTER("mysqlnd_stmt_prepare_read_eof"); + if (!stmt || !stmt->conn || !stmt->conn->protocol) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); fields_eof = stmt->conn->protocol->m.get_eof_packet(stmt->conn->protocol, FALSE TSRMLS_CC); - if (FAIL == (ret = PACKET_READ(fields_eof, stmt->conn))) { - if (stmt->result) { - stmt->result->m.free_result_contents(stmt->result TSRMLS_CC); - mnd_efree(stmt->result); - memset(stmt, 0, sizeof(MYSQLND_STMT)); - stmt->state = MYSQLND_STMT_INITTED; - } + if (!fields_eof) { + SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(stmt->conn->error_info); } else { - stmt->upsert_status.server_status = fields_eof->server_status; - stmt->upsert_status.warning_count = fields_eof->warning_count; - stmt->state = MYSQLND_STMT_PREPARED; + if (FAIL == (ret = PACKET_READ(fields_eof, stmt->conn))) { + if (stmt->result) { + stmt->result->m.free_result_contents(stmt->result TSRMLS_CC); + mnd_efree(stmt->result); + memset(stmt, 0, sizeof(MYSQLND_STMT_DATA)); + stmt->state = MYSQLND_STMT_INITTED; + } + } else { + stmt->upsert_status.server_status = fields_eof->server_status; + stmt->upsert_status.warning_count = fields_eof->warning_count; + stmt->state = MYSQLND_STMT_PREPARED; + } + PACKET_FREE(fields_eof); } - PACKET_FREE(fields_eof); DBG_RETURN(ret); } @@ -304,11 +355,16 @@ mysqlnd_stmt_prepare_read_eof(MYSQLND_STMT *stmt TSRMLS_DC) /* {{{ mysqlnd_stmt::prepare */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const stmt, const char * const query, unsigned int query_len TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const s, const char * const query, unsigned int query_len TSRMLS_DC) { - MYSQLND_STMT *stmt_to_prepare = stmt; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + MYSQLND_STMT * s_to_prepare = s; + MYSQLND_STMT_DATA * stmt_to_prepare = stmt; DBG_ENTER("mysqlnd_stmt::prepare"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); SET_ERROR_AFF_ROWS(stmt); @@ -321,29 +377,33 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const stmt, const char * co /* See if we have to clean the wire */ if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { /* Do implicit use_result and then flush the result */ - stmt->default_rset_handler = stmt->m->use_result; - stmt->default_rset_handler(stmt TSRMLS_CC); + stmt->default_rset_handler = s->m->use_result; + stmt->default_rset_handler(s TSRMLS_CC); } /* No 'else' here please :) */ - if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE) { + if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE && stmt->result) { stmt->result->m.skip_result(stmt->result TSRMLS_CC); } /* Create a new test statement, which we will prepare, but if anything fails, we will scrap it. */ - stmt_to_prepare = mysqlnd_stmt_init(stmt->conn); + s_to_prepare = stmt->conn->m->stmt_init(stmt->conn TSRMLS_CC); + if (!s_to_prepare) { + goto fail; + } + stmt_to_prepare = s_to_prepare->data; } - if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query, - query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) || - FAIL == mysqlnd_stmt_read_prepare_response(stmt_to_prepare TSRMLS_CC)) { + if (FAIL == stmt_to_prepare->conn->m->simple_command(stmt_to_prepare->conn, COM_STMT_PREPARE, query, query_len, PROT_LAST, FALSE, TRUE TSRMLS_CC) || + FAIL == mysqlnd_stmt_read_prepare_response(s_to_prepare TSRMLS_CC)) + { goto fail; } if (stmt_to_prepare->param_count) { - if (FAIL == mysqlnd_stmt_skip_metadata(stmt_to_prepare TSRMLS_CC) || - FAIL == mysqlnd_stmt_prepare_read_eof(stmt_to_prepare TSRMLS_CC)) + if (FAIL == mysqlnd_stmt_skip_metadata(s_to_prepare TSRMLS_CC) || + FAIL == mysqlnd_stmt_prepare_read_eof(s_to_prepare TSRMLS_CC)) { goto fail; } @@ -355,7 +415,11 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const stmt, const char * co no metadata at prepare. */ if (stmt_to_prepare->field_count) { - MYSQLND_RES *result = mysqlnd_result_init(stmt_to_prepare->field_count TSRMLS_CC); + MYSQLND_RES * result = stmt->conn->m->result_init(stmt_to_prepare->field_count, stmt_to_prepare->persistent TSRMLS_CC); + if (!result) { + SET_OOM_ERROR(stmt->conn->error_info); + goto fail; + } /* Allocate the result now as it is needed for the reading of metadata */ stmt_to_prepare->result = result; @@ -364,27 +428,28 @@ MYSQLND_METHOD(mysqlnd_stmt, prepare)(MYSQLND_STMT * const stmt, const char * co result->type = MYSQLND_RES_PS_BUF; if (FAIL == result->m.read_result_metadata(result, stmt_to_prepare->conn TSRMLS_CC) || - FAIL == mysqlnd_stmt_prepare_read_eof(stmt_to_prepare TSRMLS_CC)) { + FAIL == mysqlnd_stmt_prepare_read_eof(s_to_prepare TSRMLS_CC)) + { goto fail; } } if (stmt_to_prepare != stmt) { /* Free old buffers, binding and resources on server */ - stmt->m->net_close(stmt, TRUE TSRMLS_CC); + s->m->net_close(s, TRUE TSRMLS_CC); - memcpy(stmt, stmt_to_prepare, sizeof(MYSQLND_STMT)); + memcpy(stmt, stmt_to_prepare, sizeof(MYSQLND_STMT_DATA)); /* Now we will have a clean new statement object */ - mnd_efree(stmt_to_prepare); + mnd_pefree(stmt_to_prepare, stmt_to_prepare->persistent); } stmt->state = MYSQLND_STMT_PREPARED; DBG_INF("PASS"); DBG_RETURN(PASS); fail: - if (stmt_to_prepare != stmt) { - stmt_to_prepare->m->dtor(stmt_to_prepare, TRUE TSRMLS_CC); + if (stmt_to_prepare != stmt && s_to_prepare) { + s_to_prepare->m->dtor(s_to_prepare, TRUE TSRMLS_CC); } stmt->state = MYSQLND_STMT_INITTED; @@ -396,16 +461,20 @@ fail: /* {{{ mysqlnd_stmt_execute_parse_response */ static enum_func_status -mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const stmt TSRMLS_DC) +mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret; - MYSQLND *conn = stmt->conn; + MYSQLND * conn; DBG_ENTER("mysqlnd_stmt_execute_parse_response"); - + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } + conn = stmt->conn; CONN_SET_STATE(conn, CONN_QUERY_SENT); - ret = mysqlnd_query_read_result_set_header(stmt->conn, stmt TSRMLS_CC); + ret = mysqlnd_query_read_result_set_header(stmt->conn, s TSRMLS_CC); if (ret == FAIL) { stmt->error_info = conn->error_info; stmt->upsert_status.affected_rows = conn->upsert_status.affected_rows; @@ -443,7 +512,7 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const stmt TSRMLS_DC) use_result() or store_result() and we should be able to scrap the data on the line, if he just decides to close the statement. */ - DBG_INF_FMT("server_status=%d cursor=%d", stmt->upsert_status.server_status, + DBG_INF_FMT("server_status=%u cursor=%u", stmt->upsert_status.server_status, stmt->upsert_status.server_status & SERVER_STATUS_CURSOR_EXISTS); if (stmt->upsert_status.server_status & SERVER_STATUS_CURSOR_EXISTS) { @@ -451,7 +520,7 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const stmt TSRMLS_DC) stmt->cursor_exists = TRUE; CONN_SET_STATE(conn, CONN_READY); /* Only cursor read */ - stmt->default_rset_handler = stmt->m->use_result; + stmt->default_rset_handler = s->m->use_result; DBG_INF("use_result"); } else if (stmt->flags & CURSOR_TYPE_READ_ONLY) { DBG_INF("asked for cursor but got none"); @@ -466,12 +535,12 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const stmt TSRMLS_DC) precached on client and server's resources are freed. */ /* preferred is buffered read */ - stmt->default_rset_handler = stmt->m->store_result; + stmt->default_rset_handler = s->m->store_result; DBG_INF("store_result"); } else { DBG_INF("no cursor"); /* preferred is unbuffered read */ - stmt->default_rset_handler = stmt->m->use_result; + stmt->default_rset_handler = s->m->use_result; DBG_INF("use_result"); } } @@ -485,15 +554,20 @@ mysqlnd_stmt_execute_parse_response(MYSQLND_STMT * const stmt TSRMLS_DC) /* {{{ mysqlnd_stmt::execute */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret; - MYSQLND *conn = stmt->conn; - zend_uchar *request; + MYSQLND * conn; + zend_uchar *request = NULL; size_t request_len; zend_bool free_request; DBG_ENTER("mysqlnd_stmt::execute"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } + conn = stmt->conn; DBG_INF_FMT("stmt=%lu", stmt->stmt_id); SET_ERROR_AFF_ROWS(stmt); @@ -538,8 +612,8 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC) if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { DBG_INF("fetching result set header"); /* Do implicit use_result and then flush the result */ - stmt->default_rset_handler = stmt->m->use_result; - stmt->default_rset_handler(stmt TSRMLS_CC); + stmt->default_rset_handler = s->m->use_result; + stmt->default_rset_handler(s TSRMLS_CC); } if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE) { @@ -583,23 +657,25 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC) } if (not_bound) { char * msg; - spprintf(&msg, 0, "No data supplied for %d parameter%s in prepared statement", + spprintf(&msg, 0, "No data supplied for %u parameter%s in prepared statement", not_bound, not_bound>1 ?"s":""); SET_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, UNKNOWN_SQLSTATE, msg); if (msg) { - efree(msg); + efree(msg); /* allocated by spprintf */ } DBG_INF("FAIL"); DBG_RETURN(FAIL); } } - request = mysqlnd_stmt_execute_generate_request(stmt, &request_len, &free_request TSRMLS_CC); - - /* support for buffer types should be added here ! */ - - ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len, - PROT_LAST /* we will handle the response packet*/, - FALSE, FALSE TSRMLS_CC); + ret = s->m->generate_execute_request(s, &request, &request_len, &free_request TSRMLS_CC); + if (ret == PASS) { + /* support for buffer types should be added here ! */ + ret = stmt->conn->m->simple_command(stmt->conn, COM_STMT_EXECUTE, (char *)request, request_len, + PROT_LAST /* we will handle the response packet*/, + FALSE, FALSE TSRMLS_CC); + } else { + SET_STMT_ERROR(stmt, CR_UNKNOWN_ERROR, UNKNOWN_SQLSTATE, "Couldn't generate the request. Possibly OOM."); + } if (free_request) { mnd_efree(request); @@ -612,7 +688,7 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC) } stmt->execute_count++; - ret = mysqlnd_stmt_execute_parse_response(stmt TSRMLS_CC); + ret = s->m->parse_execute_response(s TSRMLS_CC); if (ret == PASS && conn->last_query_type == QUERY_UPSERT && stmt->upsert_status.affected_rows) { MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn->stats, STAT_ROWS_AFFECTED_PS, stmt->upsert_status.affected_rows); @@ -626,11 +702,13 @@ MYSQLND_METHOD(mysqlnd_stmt, execute)(MYSQLND_STMT * const stmt TSRMLS_DC) enum_func_status mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { - MYSQLND_STMT *stmt = (MYSQLND_STMT *) param; + 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"); + *fetched_anything = FALSE; DBG_INF_FMT("stmt=%lu", stmt->stmt_id); /* If we haven't read everything */ @@ -645,15 +723,18 @@ mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int f if (NULL == current_row[0]) { uint64_t row_num = (set->data_cursor - set->data) / field_count; + enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], + current_row, + meta->field_count, + meta->fields, + result->stored_data->persistent, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC); + if (PASS != rc) { + DBG_RETURN(FAIL); + } set->initialized_rows++; - result->m.row_decoder(set->row_buffers[row_num], - current_row, - meta->field_count, - meta->fields, - result->stored_data->persistent, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); if (stmt->update_max_length) { for (i = 0; i < result->field_count; i++) { /* @@ -680,7 +761,7 @@ mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int f #endif /* copy the type */ if (stmt->result_bind[i].bound == TRUE) { - DBG_INF_FMT("i=%d type=%d", i, Z_TYPE_P(current_row[i])); + DBG_INF_FMT("i=%u type=%u", i, Z_TYPE_P(current_row[i])); if (Z_TYPE_P(current_row[i]) != IS_NULL) { /* Copy the value. @@ -708,7 +789,6 @@ mysqlnd_fetch_stmt_row_buffered(MYSQLND_RES *result, void *param, unsigned int f DBG_INF("row fetched"); } else { set->data_cursor = NULL; - *fetched_anything = FALSE; DBG_INF("no more data"); } DBG_INF("PASS"); @@ -722,14 +802,16 @@ static enum_func_status mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { enum_func_status ret; - MYSQLND_STMT *stmt = (MYSQLND_STMT *) param; - MYSQLND_PACKET_ROW *row_packet = result->row_packet; + MYSQLND_STMT * s = (MYSQLND_STMT *) param; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + MYSQLND_PACKET_ROW * row_packet; DBG_ENTER("mysqlnd_stmt_fetch_row_unbuffered"); + *fetched_anything = FALSE; + if (result->unbuf->eof_reached) { /* No more rows obviously */ - *fetched_anything = FALSE; DBG_INF("eof reached"); DBG_RETURN(PASS); } @@ -739,6 +821,10 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int DBG_ERR("command out of sync"); DBG_RETURN(FAIL); } + if (!(row_packet = result->row_packet)) { + DBG_RETURN(FAIL); + } + /* Let the row packet fill our buffer and skip additional malloc + memcpy */ row_packet->skip_extraction = stmt && stmt->result_bind? FALSE:TRUE; @@ -748,8 +834,6 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int */ if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { unsigned int i, field_count = result->field_count; - result->unbuf->row_count++; - *fetched_anything = TRUE; if (!row_packet->skip_extraction) { result->m.unbuffered_free_last_data(result TSRMLS_CC); @@ -760,14 +844,17 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int row_packet->fields = NULL; row_packet->row_buffer = NULL; - result->m.row_decoder(result->unbuf->last_row_buffer, - result->unbuf->last_row_data, - row_packet->field_count, - row_packet->fields_metadata, - FALSE, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); + if (PASS != result->m.row_decoder(result->unbuf->last_row_buffer, + result->unbuf->last_row_data, + row_packet->field_count, + row_packet->fields_metadata, + FALSE, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC)) + { + DBG_RETURN(FAIL); + } for (i = 0; i < field_count; i++) { if (stmt->result_bind[i].bound == TRUE) { @@ -805,11 +892,13 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int the bound variables. Thus we need to do part of what it does or Zend will report leaks. */ - row_packet->row_buffer->free_chunk(row_packet->row_buffer, TRUE TSRMLS_CC); + row_packet->row_buffer->free_chunk(row_packet->row_buffer TSRMLS_CC); row_packet->row_buffer = NULL; } + + result->unbuf->row_count++; + *fetched_anything = TRUE; } else if (ret == FAIL) { - *fetched_anything = FALSE; if (row_packet->error_info.error_no) { stmt->conn->error_info = row_packet->error_info; stmt->error_info = row_packet->error_info; @@ -817,7 +906,6 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int CONN_SET_STATE(result->conn, CONN_READY); result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ } else if (row_packet->eof) { - *fetched_anything = FALSE; DBG_INF("EOF"); /* Mark the connection as usable again */ result->unbuf->eof_reached = TRUE; @@ -834,7 +922,7 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int } } - DBG_INF_FMT("ret=%s fetched_anything=%d", ret == PASS? "PASS":"FAIL", *fetched_anything); + DBG_INF_FMT("ret=%s fetched_anything=%u", ret == PASS? "PASS":"FAIL", *fetched_anything); DBG_RETURN(ret); } /* }}} */ @@ -842,14 +930,20 @@ mysqlnd_stmt_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int /* {{{ mysqlnd_stmt::use_result */ static MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT *stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, use_result)(MYSQLND_STMT * s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; MYSQLND_RES *result; - MYSQLND *conn = stmt->conn; + MYSQLND * conn; DBG_ENTER("mysqlnd_stmt::use_result"); + if (!stmt || !stmt->conn || !stmt->result) { + DBG_RETURN(NULL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); + conn = stmt->conn; + if (!stmt->field_count || (!stmt->cursor_exists && CONN_GET_STATE(conn) != CONN_FETCHING_DATA) || (stmt->cursor_exists && CONN_GET_STATE(conn) != CONN_READY) || @@ -885,13 +979,14 @@ enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { enum_func_status ret; - MYSQLND_STMT *stmt = (MYSQLND_STMT *) param; + MYSQLND_STMT * s = (MYSQLND_STMT *) param; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; zend_uchar buf[STMT_ID_LENGTH /* statement id */ + 4 /* number of rows to fetch */]; - MYSQLND_PACKET_ROW *row_packet = result->row_packet; + MYSQLND_PACKET_ROW * row_packet; DBG_ENTER("mysqlnd_fetch_stmt_row_cursor"); - if (!stmt) { + if (!stmt || !stmt->conn || !result || !result->conn || !result->unbuf) { DBG_ERR("no statement"); DBG_RETURN(FAIL); } @@ -905,6 +1000,9 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla DBG_ERR("command out of sync"); DBG_RETURN(FAIL); } + if (!(row_packet = result->row_packet)) { + DBG_RETURN(FAIL); + } SET_EMPTY_ERROR(stmt->error_info); SET_EMPTY_ERROR(stmt->conn->error_info); @@ -923,10 +1021,8 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { unsigned int i, field_count = result->field_count; - result->unbuf->row_count++; - *fetched_anything = TRUE; - DBG_INF_FMT("skip_extraction=%d", row_packet->skip_extraction); + DBG_INF_FMT("skip_extraction=%u", row_packet->skip_extraction); if (!row_packet->skip_extraction) { result->m.unbuffered_free_last_data(result TSRMLS_CC); @@ -936,14 +1032,17 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla row_packet->fields = NULL; row_packet->row_buffer = NULL; - result->m.row_decoder(result->unbuf->last_row_buffer, - result->unbuf->last_row_data, - row_packet->field_count, - row_packet->fields_metadata, - FALSE, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); + if (PASS != result->m.row_decoder(result->unbuf->last_row_buffer, + result->unbuf->last_row_data, + row_packet->field_count, + row_packet->fields_metadata, + FALSE, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC)) + { + DBG_RETURN(FAIL); + } /* If no result bind, do nothing. We consumed the data */ for (i = 0; i < field_count; i++) { @@ -956,7 +1055,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla #ifndef WE_DONT_COPY_IN_BUFFERED_AND_UNBUFFERED_BECAUSEOF_IS_REF zval_dtor(stmt->result_bind[i].zv); #endif - DBG_INF_FMT("i=%d bound_var=%p type=%d refc=%u", i, stmt->result_bind[i].zv, + DBG_INF_FMT("i=%u bound_var=%p type=%u refc=%u", i, stmt->result_bind[i].zv, Z_TYPE_P(data), Z_REFCOUNT_P(stmt->result_bind[i].zv)); if (IS_NULL != (Z_TYPE_P(stmt->result_bind[i].zv) = Z_TYPE_P(data))) { if ((Z_TYPE_P(data) == IS_STRING @@ -982,16 +1081,19 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla the bound variables. Thus we need to do part of what it does or Zend will report leaks. */ - row_packet->row_buffer->free_chunk(row_packet->row_buffer, TRUE TSRMLS_CC); + row_packet->row_buffer->free_chunk(row_packet->row_buffer TSRMLS_CC); row_packet->row_buffer = NULL; } /* We asked for one row, the next one should be EOF, eat it */ ret = PACKET_READ(row_packet, result->conn); if (row_packet->row_buffer) { - row_packet->row_buffer->free_chunk(row_packet->row_buffer, TRUE TSRMLS_CC); + row_packet->row_buffer->free_chunk(row_packet->row_buffer TSRMLS_CC); row_packet->row_buffer = NULL; } MYSQLND_INC_CONN_STATISTIC(stmt->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_PS_CURSOR); + + result->unbuf->row_count++; + *fetched_anything = TRUE; } else { *fetched_anything = FALSE; @@ -1012,7 +1114,7 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla stmt->conn->upsert_status.server_status = row_packet->server_status; - DBG_INF_FMT("ret=%s fetched=%d server_status=%d warnings=%d eof=%d", + DBG_INF_FMT("ret=%s fetched=%u server_status=%u warnings=%u eof=%u", ret == PASS? "PASS":"FAIL", *fetched_anything, row_packet->server_status, row_packet->warning_count, result->unbuf->eof_reached); @@ -1023,10 +1125,14 @@ mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES *result, void *param, unsigned int fla /* {{{ mysqlnd_stmt::fetch */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const s, zend_bool * const fetched_anything TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret; DBG_ENTER("mysqlnd_stmt::fetch"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); if (!stmt->result || @@ -1038,14 +1144,14 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const stmt, zend_bool * const } else if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { /* Execute only once. We have to free the previous contents of user's bound vars */ - stmt->default_rset_handler(stmt TSRMLS_CC); + stmt->default_rset_handler(s TSRMLS_CC); } stmt->state = MYSQLND_STMT_USER_FETCHING; SET_EMPTY_ERROR(stmt->error_info); SET_EMPTY_ERROR(stmt->conn->error_info); - DBG_INF_FMT("result_bind=%p separated_once=%d", stmt->result_bind, stmt->result_zvals_separated_once); + DBG_INF_FMT("result_bind=%p separated_once=%u", stmt->result_bind, stmt->result_zvals_separated_once); /* The user might have not bound any variables for result. Do the binding once she does it. @@ -1065,7 +1171,7 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const stmt, zend_bool * const stmt->result_zvals_separated_once = TRUE; } - ret = stmt->result->m.fetch_row(stmt->result, (void*)stmt, 0, fetched_anything TSRMLS_CC); + ret = stmt->result->m.fetch_row(stmt->result, (void*)s, 0, fetched_anything TSRMLS_CC); DBG_RETURN(ret); } /* }}} */ @@ -1073,12 +1179,16 @@ MYSQLND_METHOD(mysqlnd_stmt, fetch)(MYSQLND_STMT * const stmt, zend_bool * const /* {{{ mysqlnd_stmt::reset */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret = PASS; zend_uchar cmd_buf[STMT_ID_LENGTH /* statement id */]; DBG_ENTER("mysqlnd_stmt::reset"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); SET_EMPTY_ERROR(stmt->error_info); @@ -1102,16 +1212,18 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const stmt TSRMLS_DC) We have to call the appropriate use_result() or store_result() and clean. */ - if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { - DBG_INF("fetching result set header"); - stmt->default_rset_handler(stmt TSRMLS_CC); - stmt->state = MYSQLND_STMT_USER_FETCHING; - } + do { + if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { + DBG_INF("fetching result set header"); + stmt->default_rset_handler(s TSRMLS_CC); + stmt->state = MYSQLND_STMT_USER_FETCHING; + } - if (stmt->result) { - DBG_INF("skipping result"); - stmt->result->m.skip_result(stmt->result TSRMLS_CC); - } + if (stmt->result) { + DBG_INF("skipping result"); + stmt->result->m.skip_result(stmt->result TSRMLS_CC); + } + } while (mysqlnd_stmt_more_results(s) && mysqlnd_stmt_next_result(s) == PASS); /* Don't free now, let the result be usable. When the stmt will again be @@ -1138,16 +1250,22 @@ MYSQLND_METHOD(mysqlnd_stmt, reset)(MYSQLND_STMT * const stmt TSRMLS_DC) /* {{{ mysqlnd_stmt::send_long_data */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const stmt, unsigned int param_no, +MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const s, unsigned int param_no, const char * const data, unsigned long length TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret = FAIL; - MYSQLND * conn = stmt->conn; + MYSQLND * conn; zend_uchar *cmd_buf; enum php_mysqlnd_server_command cmd = COM_STMT_SEND_LONG_DATA; DBG_ENTER("mysqlnd_stmt::send_long_data"); - DBG_INF_FMT("stmt=%lu param_no=%d data_len=%lu", stmt->stmt_id, param_no, length); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } + DBG_INF_FMT("stmt=%lu param_no=%u data_len=%lu", stmt->stmt_id, param_no, length); + + conn = stmt->conn; SET_EMPTY_ERROR(stmt->error_info); SET_EMPTY_ERROR(stmt->conn->error_info); @@ -1186,19 +1304,25 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const stmt, unsigned if (CONN_GET_STATE(conn) == CONN_READY) { size_t packet_len; - stmt->param_bind[param_no].flags |= MYSQLND_PARAM_BIND_BLOB_USED; cmd_buf = mnd_emalloc(packet_len = STMT_ID_LENGTH + 2 + length); - - int4store(cmd_buf, stmt->stmt_id); - int2store(cmd_buf + STMT_ID_LENGTH, param_no); - memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length); - - /* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/ - ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len, - PROT_LAST , FALSE, TRUE TSRMLS_CC); - mnd_efree(cmd_buf); - if (FAIL == ret) { - stmt->error_info = conn->error_info; + if (cmd_buf) { + stmt->param_bind[param_no].flags |= MYSQLND_PARAM_BIND_BLOB_USED; + + int4store(cmd_buf, stmt->stmt_id); + int2store(cmd_buf + STMT_ID_LENGTH, param_no); + memcpy(cmd_buf + STMT_ID_LENGTH + 2, data, length); + + /* COM_STMT_SEND_LONG_DATA doesn't send an OK packet*/ + ret = conn->m->simple_command(conn, cmd, (char *)cmd_buf, packet_len, + PROT_LAST , FALSE, TRUE TSRMLS_CC); + mnd_efree(cmd_buf); + if (FAIL == ret) { + stmt->error_info = conn->error_info; + } + } else { + ret = FAIL; + SET_OOM_ERROR(stmt->error_info); + SET_OOM_ERROR(conn->error_info); } /* Cover protocol error: COM_STMT_SEND_LONG_DATA was designed to be quick and not @@ -1240,16 +1364,20 @@ MYSQLND_METHOD(mysqlnd_stmt, send_long_data)(MYSQLND_STMT * const stmt, unsigned /* {{{ mysqlnd_stmt::bind_parameters */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const s, MYSQLND_PARAM_BIND * const param_bind TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::bind_param"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count); if (stmt->state < MYSQLND_STMT_PREPARED) { SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); DBG_ERR("not prepared"); - if (param_bind && stmt->param_bind_dtor) { - stmt->param_bind_dtor(param_bind TSRMLS_CC); + if (param_bind) { + s->m->free_parameter_bind(s, param_bind TSRMLS_CC); } DBG_RETURN(FAIL); } @@ -1261,8 +1389,7 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND unsigned int i = 0; if (!param_bind) { - SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, - "Re-binding (still) not supported"); + SET_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, "Re-binding (still) not supported"); DBG_ERR("Re-binding (still) not supported"); DBG_RETURN(FAIL); } else if (stmt->param_bind) { @@ -1281,15 +1408,15 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND zval_ptr_dtor(&stmt->param_bind[i].zv); } } - if (stmt->param_bind != param_bind && stmt->param_bind_dtor) { - stmt->param_bind_dtor(stmt->param_bind TSRMLS_CC); + if (stmt->param_bind != param_bind) { + s->m->free_parameter_bind(s, stmt->param_bind TSRMLS_CC); } } stmt->param_bind = param_bind; for (i = 0; i < stmt->param_count; i++) { /* The client will use stmt_send_long_data */ - DBG_INF_FMT("%d is of type %d", i, stmt->param_bind[i].type); + DBG_INF_FMT("%u is of type %u", i, stmt->param_bind[i].type); /* Prevent from freeing */ /* Don't update is_ref, or we will leak during conversion */ Z_ADDREF_P(stmt->param_bind[i].zv); @@ -1308,11 +1435,15 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND /* {{{ mysqlnd_stmt::bind_one_parameter */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const stmt, unsigned int param_no, +MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const s, unsigned int param_no, zval * const zv, zend_uchar type TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::bind_one_parameter"); - DBG_INF_FMT("stmt=%lu param_no=%d param_count=%u type=%d", + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } + DBG_INF_FMT("stmt=%lu param_no=%u param_count=%u type=%u", stmt->stmt_id, param_no, stmt->param_count, type); if (stmt->state < MYSQLND_STMT_PREPARED) { @@ -1332,6 +1463,9 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const stmt, unsi if (stmt->param_count) { if (!stmt->param_bind) { stmt->param_bind = mnd_ecalloc(stmt->param_count, sizeof(MYSQLND_PARAM_BIND)); + if (!stmt->param_bind) { + DBG_RETURN(FAIL); + } } /* Prevent from freeing */ @@ -1359,9 +1493,13 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter)(MYSQLND_STMT * const stmt, unsi /* {{{ mysqlnd_stmt::refresh_bind_param */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, refresh_bind_param)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, refresh_bind_param)(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::refresh_bind_param"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu param_count=%u", stmt->stmt_id, stmt->param_count); if (stmt->state < MYSQLND_STMT_PREPARED) { @@ -1382,32 +1520,22 @@ MYSQLND_METHOD(mysqlnd_stmt, refresh_bind_param)(MYSQLND_STMT * const stmt TSRML /* }}} */ -/* {{{ mysqlnd_stmt::set_bind_param_dtor */ -static void -MYSQLND_METHOD(mysqlnd_stmt, set_param_bind_dtor)(MYSQLND_STMT * const stmt, - void (*param_bind_dtor)(MYSQLND_PARAM_BIND * dtor TSRMLS_DC) TSRMLS_DC) -{ - DBG_ENTER("mysqlnd_stmt::set_bind_param_dtor"); - DBG_INF_FMT("stmt=%p", param_bind_dtor); - stmt->param_bind_dtor = param_bind_dtor; - DBG_VOID_RETURN; -} -/* }}} */ - - /* {{{ mysqlnd_stmt::bind_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const stmt, +MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const s, MYSQLND_RESULT_BIND * const result_bind TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::bind_result"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu field_count=%u", stmt->stmt_id, stmt->field_count); - if (stmt->state < MYSQLND_STMT_PREPARED) { SET_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, UNKNOWN_SQLSTATE, mysqlnd_stmt_not_prepared); - if (result_bind && stmt->result_bind_dtor) { - stmt->result_bind_dtor(result_bind TSRMLS_CC); + if (result_bind) { + s->m->free_result_bind(s, result_bind TSRMLS_CC); } DBG_ERR("not prepared"); DBG_RETURN(FAIL); @@ -1424,7 +1552,7 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const stmt, DBG_RETURN(FAIL); } - mysqlnd_stmt_separate_result_bind(stmt TSRMLS_CC); + mysqlnd_stmt_separate_result_bind(s TSRMLS_CC); stmt->result_zvals_separated_once = FALSE; stmt->result_bind = result_bind; for (i = 0; i < stmt->field_count; i++) { @@ -1438,8 +1566,8 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const stmt, */ stmt->result_bind[i].bound = TRUE; } - } else if (result_bind && stmt->result_bind_dtor) { - stmt->result_bind_dtor(result_bind TSRMLS_CC); + } else if (result_bind) { + s->m->free_result_bind(s, result_bind TSRMLS_CC); } DBG_INF("PASS"); DBG_RETURN(PASS); @@ -1449,9 +1577,13 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_result)(MYSQLND_STMT * const stmt, /* {{{ mysqlnd_stmt::bind_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const s, unsigned int param_no TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::bind_result"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu field_count=%u", stmt->stmt_id, stmt->field_count); if (stmt->state < MYSQLND_STMT_PREPARED) { @@ -1470,19 +1602,22 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const stmt, unsigne SET_EMPTY_ERROR(stmt->conn->error_info); if (stmt->field_count) { - mysqlnd_stmt_separate_one_result_bind(stmt, param_no TSRMLS_CC); + mysqlnd_stmt_separate_one_result_bind(s, param_no TSRMLS_CC); /* Guaranteed is that stmt->result_bind is NULL */ if (!stmt->result_bind) { stmt->result_bind = mnd_ecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND)); } else { stmt->result_bind = mnd_erealloc(stmt->result_bind, stmt->field_count * sizeof(MYSQLND_RESULT_BIND)); } + if (!stmt->result_bind) { + DBG_RETURN(FAIL); + } ALLOC_INIT_ZVAL(stmt->result_bind[param_no].zv); /* Don't update is_ref !!! it's not our job Otherwise either 009.phpt or mysqli_stmt_bind_result.phpt will fail. - */ + */ stmt->result_bind[param_no].bound = TRUE; } DBG_INF("PASS"); @@ -1491,117 +1626,124 @@ MYSQLND_METHOD(mysqlnd_stmt, bind_one_result)(MYSQLND_STMT * const stmt, unsigne /* }}} */ -/* {{{ mysqlnd_stmt::set_bind_result_dtor */ -static void -MYSQLND_METHOD(mysqlnd_stmt, set_result_bind_dtor)(MYSQLND_STMT * const stmt, - void (*result_bind_dtor)(MYSQLND_RESULT_BIND * dtor TSRMLS_DC) TSRMLS_DC) -{ - DBG_ENTER("mysqlnd_stmt::set_bind_param_dtor"); - DBG_INF_FMT("stmt=%p", result_bind_dtor); - stmt->result_bind_dtor = result_bind_dtor; - DBG_VOID_RETURN; -} -/* }}} */ - - /* {{{ mysqlnd_stmt::insert_id */ static uint64_t -MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, insert_id)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->upsert_status.last_insert_id; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->upsert_status.last_insert_id : 0; } /* }}} */ /* {{{ mysqlnd_stmt::affected_rows */ static uint64_t -MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, affected_rows)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->upsert_status.affected_rows; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->upsert_status.affected_rows : 0; } /* }}} */ /* {{{ mysqlnd_stmt::num_rows */ static uint64_t -MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, num_rows)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->result? mysqlnd_num_rows(stmt->result):0; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt && stmt->result? mysqlnd_num_rows(stmt->result):0; } /* }}} */ /* {{{ mysqlnd_stmt::warning_count */ static unsigned int -MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, warning_count)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->upsert_status.warning_count; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->upsert_status.warning_count : 0; +} +/* }}} */ + + +/* {{{ mysqlnd_stmt::server_status */ +static unsigned int +MYSQLND_METHOD(mysqlnd_stmt, server_status)(const MYSQLND_STMT * const s TSRMLS_DC) +{ + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->upsert_status.server_status : 0; } /* }}} */ /* {{{ mysqlnd_stmt::field_count */ static unsigned int -MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, field_count)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->field_count; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->field_count : 0; } /* }}} */ /* {{{ mysqlnd_stmt::param_count */ static unsigned int -MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, param_count)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->param_count; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->param_count : 0; } /* }}} */ /* {{{ mysqlnd_stmt::errno */ static unsigned int -MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, errno)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->error_info.error_no; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->error_info.error_no : 0; } /* }}} */ /* {{{ mysqlnd_stmt::error */ static const char * -MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, error)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->error_info.error; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt? stmt->error_info.error : 0; } /* }}} */ /* {{{ mysqlnd_stmt::sqlstate */ static const char * -MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, sqlstate)(const MYSQLND_STMT * const s TSRMLS_DC) { - return stmt->error_info.sqlstate[0] ? stmt->error_info.sqlstate:MYSQLND_SQLSTATE_NULL; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt && stmt->error_info.sqlstate[0] ? stmt->error_info.sqlstate:MYSQLND_SQLSTATE_NULL; } /* }}} */ /* {{{ mysqlnd_stmt::data_seek */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const stmt, uint64_t row TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, data_seek)(const MYSQLND_STMT * const s, uint64_t row TSRMLS_DC) { - return stmt->result? stmt->result->m.seek_data(stmt->result, row TSRMLS_CC) : FAIL; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + return stmt && stmt->result? stmt->result->m.seek_data(stmt->result, row TSRMLS_CC) : FAIL; } /* }}} */ /* {{{ mysqlnd_stmt::param_metadata */ static MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const s TSRMLS_DC) { - if (!stmt->param_count) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + if (!stmt || !stmt->param_count) { return NULL; } - return NULL; } /* }}} */ @@ -1609,11 +1751,15 @@ MYSQLND_METHOD(mysqlnd_stmt, param_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC /* {{{ mysqlnd_stmt::result_metadata */ static MYSQLND_RES * -MYSQLND_METHOD(mysqlnd_stmt, result_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, result_metadata)(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; MYSQLND_RES *result; DBG_ENTER("mysqlnd_stmt::result_metadata"); + if (!stmt) { + DBG_RETURN(NULL); + } DBG_INF_FMT("stmt=%u field_count=%u", stmt->stmt_id, stmt->field_count); if (!stmt->field_count || !stmt->conn || !stmt->result || !stmt->result->meta) { @@ -1634,27 +1780,48 @@ MYSQLND_METHOD(mysqlnd_stmt, result_metadata)(MYSQLND_STMT * const stmt TSRMLS_D In the meantime we don't need a zval cache reference for this fake result set, so we don't get one. */ - result = mysqlnd_result_init(stmt->field_count TSRMLS_CC); - result->type = MYSQLND_RES_NORMAL; - result->m.fetch_row = result->m.fetch_row_normal_unbuffered; - result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); - result->unbuf->eof_reached = TRUE; - result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE TSRMLS_CC); - - DBG_INF_FMT("result=%p", result); - DBG_RETURN(result); + do { + result = stmt->conn->m->result_init(stmt->field_count, stmt->persistent TSRMLS_CC); + if (!result) { + break; + } + result->type = MYSQLND_RES_NORMAL; + result->m.fetch_row = result->m.fetch_row_normal_unbuffered; + result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); + if (!result->unbuf) { + break; + } + result->unbuf->eof_reached = TRUE; + result->meta = stmt->result->meta->m->clone_metadata(stmt->result->meta, FALSE TSRMLS_CC); + if (!result->meta) { + break; + } + + DBG_INF_FMT("result=%p", result); + DBG_RETURN(result); + } while (0); + + SET_OOM_ERROR(stmt->conn->error_info); + if (result) { + result->m.free_result(result, TRUE TSRMLS_CC); + } + DBG_RETURN(NULL); } /* }}} */ /* {{{ mysqlnd_stmt::attr_set */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const stmt, +MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const s, enum mysqlnd_stmt_attr attr_type, const void * const value TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; unsigned long val = *(unsigned long *) value; DBG_ENTER("mysqlnd_stmt::attr_set"); + if (!stmt) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu attr_type=%u value=%lu", stmt->stmt_id, attr_type, val); switch (attr_type) { @@ -1697,11 +1864,15 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_set)(MYSQLND_STMT * const stmt, /* {{{ mysqlnd_stmt::attr_get */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const stmt, +MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const s, enum mysqlnd_stmt_attr attr_type, void * const value TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::attr_set"); + if (!stmt) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu attr_type=%u", stmt->stmt_id, attr_type); switch (attr_type) { @@ -1725,9 +1896,13 @@ MYSQLND_METHOD(mysqlnd_stmt, attr_get)(const MYSQLND_STMT * const stmt, /* free_result() doesn't actually free stmt->result but only the buffers */ /* {{{ mysqlnd_stmt::free_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const stmt TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt::free_result"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); if (!stmt->result) { @@ -1742,8 +1917,8 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const stmt TSRMLS_DC) if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { DBG_INF("fetching result set header"); /* Do implicit use_result and then flush the result */ - stmt->default_rset_handler = stmt->m->use_result; - stmt->default_rset_handler(stmt TSRMLS_CC); + stmt->default_rset_handler = s->m->use_result; + stmt->default_rset_handler(s TSRMLS_CC); } if (stmt->state > MYSQLND_STMT_WAITING_USE_OR_STORE) { @@ -1754,7 +1929,7 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const stmt TSRMLS_DC) Separate the bound variables, which point to the result set, then destroy the set. */ - mysqlnd_stmt_separate_result_bind(stmt TSRMLS_CC); + mysqlnd_stmt_separate_result_bind(s TSRMLS_CC); /* Now we can destroy the result set */ stmt->result->m.free_result_buffers(stmt->result TSRMLS_CC); @@ -1774,11 +1949,16 @@ MYSQLND_METHOD(mysqlnd_stmt, free_result)(MYSQLND_STMT * const stmt TSRMLS_DC) /* {{{ mysqlnd_stmt_separate_result_bind */ -void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt TSRMLS_DC) +static void +mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; unsigned int i; DBG_ENTER("mysqlnd_stmt_separate_result_bind"); + if (!stmt) { + DBG_VOID_RETURN; + } DBG_INF_FMT("stmt=%lu result_bind=%p field_count=%u", stmt->stmt_id, stmt->result_bind, stmt->field_count); @@ -1794,7 +1974,7 @@ void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt TSRMLS_DC) for (i = 0; i < stmt->field_count; i++) { /* Let's try with no cache */ if (stmt->result_bind[i].bound == TRUE) { - DBG_INF_FMT("%d has refcount=%u", i, Z_REFCOUNT_P(stmt->result_bind[i].zv)); + DBG_INF_FMT("%u has refcount=%u", i, Z_REFCOUNT_P(stmt->result_bind[i].zv)); /* We have to separate the actual zval value of the bound variable from our allocated zvals or we will face double-free @@ -1817,9 +1997,7 @@ void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt TSRMLS_DC) } } } - if (stmt->result_bind_dtor) { - stmt->result_bind_dtor(stmt->result_bind TSRMLS_CC); - } + s->m->free_result_bind(s, stmt->result_bind TSRMLS_CC); stmt->result_bind = NULL; DBG_VOID_RETURN; @@ -1828,10 +2006,15 @@ void mysqlnd_stmt_separate_result_bind(MYSQLND_STMT * const stmt TSRMLS_DC) /* {{{ mysqlnd_stmt_separate_one_result_bind */ -void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC) +static void +mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const s, unsigned int param_no TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_stmt_separate_one_result_bind"); - DBG_INF_FMT("stmt=%lu result_bind=%p field_count=%u param_no=%d", + if (!stmt) { + DBG_VOID_RETURN; + } + DBG_INF_FMT("stmt=%lu result_bind=%p field_count=%u param_no=%u", stmt->stmt_id, stmt->result_bind, stmt->field_count, param_no); if (!stmt->result_bind) { @@ -1845,7 +2028,7 @@ void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned i */ /* Let's try with no cache */ if (stmt->result_bind[param_no].bound == TRUE) { - DBG_INF_FMT("%d has refcount=%u", param_no, Z_REFCOUNT_P(stmt->result_bind[param_no].zv)); + DBG_INF_FMT("%u has refcount=%u", param_no, Z_REFCOUNT_P(stmt->result_bind[param_no].zv)); /* We have to separate the actual zval value of the bound variable from our allocated zvals or we will face double-free @@ -1874,10 +2057,14 @@ void mysqlnd_stmt_separate_one_result_bind(MYSQLND_STMT * const stmt, unsigned i /* {{{ mysqlnd_internal_free_stmt_content */ -static -void mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC) +static void +mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; DBG_ENTER("mysqlnd_internal_free_stmt_content"); + if (!stmt) { + DBG_VOID_RETURN; + } DBG_INF_FMT("stmt=%lu param_bind=%p param_count=%u", stmt->stmt_id, stmt->param_bind, stmt->param_count); @@ -1898,9 +2085,7 @@ void mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC) zval_ptr_dtor(&stmt->param_bind[i].zv); } } - if (stmt->param_bind_dtor) { - stmt->param_bind_dtor(stmt->param_bind TSRMLS_CC); - } + s->m->free_parameter_bind(s, stmt->param_bind TSRMLS_CC); stmt->param_bind = NULL; } @@ -1908,7 +2093,7 @@ void mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC) First separate the bound variables, which point to the result set, then destroy the set. */ - mysqlnd_stmt_separate_result_bind(stmt TSRMLS_CC); + mysqlnd_stmt_separate_result_bind(s TSRMLS_CC); /* Not every statement has a result set attached */ if (stmt->result) { stmt->result->m.free_result_internal(stmt->result TSRMLS_CC); @@ -1922,15 +2107,21 @@ void mysqlnd_internal_free_stmt_content(MYSQLND_STMT * const stmt TSRMLS_DC) /* {{{ mysqlnd_stmt::net_close */ static enum_func_status -MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const stmt, zend_bool implicit TSRMLS_DC) +MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const s, zend_bool implicit TSRMLS_DC) { - MYSQLND * conn = stmt->conn; + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + MYSQLND * conn; zend_uchar cmd_buf[STMT_ID_LENGTH /* statement id */]; enum_mysqlnd_collected_stats stat = STAT_LAST; DBG_ENTER("mysqlnd_stmt::net_close"); + if (!stmt || !stmt->conn) { + DBG_RETURN(FAIL); + } DBG_INF_FMT("stmt=%lu", stmt->stmt_id); + conn = stmt->conn; + SET_EMPTY_ERROR(stmt->error_info); SET_EMPTY_ERROR(stmt->conn->error_info); @@ -1940,10 +2131,10 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const stmt, zend_ clean. */ do { - DBG_INF_FMT("stmt->state=%d", stmt->state); + DBG_INF_FMT("stmt->state=%u", stmt->state); if (stmt->state == MYSQLND_STMT_WAITING_USE_OR_STORE) { DBG_INF("fetching result set header"); - stmt->default_rset_handler(stmt TSRMLS_CC); + stmt->default_rset_handler(s TSRMLS_CC); stmt->state = MYSQLND_STMT_USER_FETCHING; } @@ -1952,7 +2143,7 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const stmt, zend_ DBG_INF("skipping result"); stmt->result->m.skip_result(stmt->result TSRMLS_CC); } - } while (mysqlnd_stmt_more_results(stmt) && mysqlnd_stmt_next_result(stmt) == PASS); + } while (mysqlnd_stmt_more_results(s) && mysqlnd_stmt_next_result(s) == PASS); /* After this point we are allowed to free the result set, as we have cleaned the line @@ -1985,11 +2176,11 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const stmt, zend_ } if (stmt->execute_cmd_buffer.buffer) { - mnd_efree(stmt->execute_cmd_buffer.buffer); + mnd_pefree(stmt->execute_cmd_buffer.buffer, stmt->persistent); stmt->execute_cmd_buffer.buffer = NULL; } - mysqlnd_internal_free_stmt_content(stmt TSRMLS_CC); + mysqlnd_internal_free_stmt_content(s TSRMLS_CC); if (stmt->conn) { stmt->conn->m->free_reference(stmt->conn TSRMLS_CC); @@ -2002,18 +2193,24 @@ MYSQLND_METHOD_PRIVATE(mysqlnd_stmt, net_close)(MYSQLND_STMT * const stmt, zend_ /* {{{ mysqlnd_stmt::dtor */ static enum_func_status -MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const stmt, zend_bool implicit TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const s, zend_bool implicit TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; enum_func_status ret; + zend_bool persistent = s->persistent; DBG_ENTER("mysqlnd_stmt::dtor"); - DBG_INF_FMT("stmt=%p", stmt); + if (stmt) { - MYSQLND_INC_GLOBAL_STATISTIC(implicit == TRUE? STAT_STMT_CLOSE_IMPLICIT: - STAT_STMT_CLOSE_EXPLICIT); + DBG_INF_FMT("stmt=%p", stmt); - ret = stmt->m->net_close(stmt, implicit TSRMLS_CC); - mnd_efree(stmt); + MYSQLND_INC_GLOBAL_STATISTIC(implicit == TRUE? STAT_STMT_CLOSE_IMPLICIT: + STAT_STMT_CLOSE_EXPLICIT); + + ret = s->m->net_close(s, implicit TSRMLS_CC); + mnd_pefree(stmt, persistent); + } + mnd_pefree(s, persistent); DBG_INF(ret == PASS? "PASS":"FAIL"); DBG_RETURN(ret); @@ -2021,6 +2218,59 @@ MYSQLND_METHOD(mysqlnd_stmt, dtor)(MYSQLND_STMT * const stmt, zend_bool implicit /* }}} */ +/* {{{ mysqlnd_stmt::alloc_param_bind */ +static MYSQLND_PARAM_BIND * +MYSQLND_METHOD(mysqlnd_stmt, alloc_param_bind)(MYSQLND_STMT * const s TSRMLS_DC) +{ + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + DBG_ENTER("mysqlnd_stmt::alloc_param_bind"); + if (!stmt) { + DBG_RETURN(NULL); + } + DBG_RETURN(mnd_pecalloc(stmt->param_count, sizeof(MYSQLND_PARAM_BIND), stmt->persistent)); +} +/* }}} */ + + +/* {{{ mysqlnd_stmt::alloc_result_bind */ +static MYSQLND_RESULT_BIND * +MYSQLND_METHOD(mysqlnd_stmt, alloc_result_bind)(MYSQLND_STMT * const s TSRMLS_DC) +{ + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + DBG_ENTER("mysqlnd_stmt::alloc_result_bind"); + if (!stmt) { + DBG_RETURN(NULL); + } + DBG_RETURN(mnd_pecalloc(stmt->field_count, sizeof(MYSQLND_RESULT_BIND), stmt->persistent)); +} +/* }}} */ + + +/* {{{ param_bind::free_parameter_bind */ +PHPAPI void +MYSQLND_METHOD(mysqlnd_stmt, free_parameter_bind)(MYSQLND_STMT * const s, MYSQLND_PARAM_BIND * param_bind TSRMLS_DC) +{ + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + if (stmt) { + mnd_pefree(param_bind, stmt->persistent); + } +} +/* }}} */ + + +/* {{{ mysqlnd_stmt::free_result_bind */ +PHPAPI void +MYSQLND_METHOD(mysqlnd_stmt, free_result_bind)(MYSQLND_STMT * const s, MYSQLND_RESULT_BIND * result_bind TSRMLS_DC) +{ + MYSQLND_STMT_DATA * stmt = s? s->data:NULL; + if (stmt) { + mnd_pefree(result_bind, stmt->persistent); + } +} +/* }}} */ + + + MYSQLND_CLASS_METHODS_START(mysqlnd_stmt) MYSQLND_METHOD(mysqlnd_stmt, prepare), MYSQLND_METHOD(mysqlnd_stmt, execute), @@ -2040,10 +2290,8 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_stmt) MYSQLND_METHOD(mysqlnd_stmt, bind_parameters), MYSQLND_METHOD(mysqlnd_stmt, bind_one_parameter), MYSQLND_METHOD(mysqlnd_stmt, refresh_bind_param), - MYSQLND_METHOD(mysqlnd_stmt, set_param_bind_dtor), MYSQLND_METHOD(mysqlnd_stmt, bind_result), MYSQLND_METHOD(mysqlnd_stmt, bind_one_result), - MYSQLND_METHOD(mysqlnd_stmt, set_result_bind_dtor), MYSQLND_METHOD(mysqlnd_stmt, send_long_data), MYSQLND_METHOD(mysqlnd_stmt, param_metadata), MYSQLND_METHOD(mysqlnd_stmt, result_metadata), @@ -2061,7 +2309,16 @@ MYSQLND_CLASS_METHODS_START(mysqlnd_stmt) MYSQLND_METHOD(mysqlnd_stmt, sqlstate), MYSQLND_METHOD(mysqlnd_stmt, attr_get), - MYSQLND_METHOD(mysqlnd_stmt, attr_set), + MYSQLND_METHOD(mysqlnd_stmt, attr_set), + + + MYSQLND_METHOD(mysqlnd_stmt, alloc_param_bind), + MYSQLND_METHOD(mysqlnd_stmt, alloc_result_bind), + MYSQLND_METHOD(mysqlnd_stmt, free_parameter_bind), + MYSQLND_METHOD(mysqlnd_stmt, free_result_bind), + MYSQLND_METHOD(mysqlnd_stmt, server_status), + mysqlnd_stmt_execute_generate_request, + mysqlnd_stmt_execute_parse_response MYSQLND_CLASS_METHODS_END; @@ -2069,28 +2326,47 @@ MYSQLND_CLASS_METHODS_END; MYSQLND_STMT * _mysqlnd_stmt_init(MYSQLND * const conn TSRMLS_DC) { size_t alloc_size = sizeof(MYSQLND_STMT) + mysqlnd_plugin_count() * sizeof(void *); - MYSQLND_STMT *stmt = mnd_ecalloc(1, alloc_size); + MYSQLND_STMT * ret = mnd_pecalloc(1, alloc_size, conn->persistent); + MYSQLND_STMT_DATA * stmt = NULL; DBG_ENTER("_mysqlnd_stmt_init"); - DBG_INF_FMT("stmt=%p", stmt); - - stmt->m = mysqlnd_stmt_methods; - stmt->state = MYSQLND_STMT_INITTED; - stmt->execute_cmd_buffer.length = 4096; - stmt->execute_cmd_buffer.buffer = mnd_emalloc(stmt->execute_cmd_buffer.length); + do { + if (!ret) { + break; + } + ret->m = mysqlnd_stmt_methods; + ret->persistent = conn->persistent; - stmt->prefetch_rows = MYSQLND_DEFAULT_PREFETCH_ROWS; - /* - Mark that we reference the connection, thus it won't be - be destructed till there is open statements. The last statement - or normal query result will close it then. - */ - stmt->conn = conn->m->get_reference(conn TSRMLS_CC); + stmt = ret->data = mnd_pecalloc(1, sizeof(MYSQLND_STMT_DATA), conn->persistent); + DBG_INF_FMT("stmt=%p", stmt); + if (!stmt) { + break; + } + stmt->persistent = conn->persistent; + stmt->state = MYSQLND_STMT_INITTED; + stmt->execute_cmd_buffer.length = 4096; + stmt->execute_cmd_buffer.buffer = mnd_pemalloc(stmt->execute_cmd_buffer.length, stmt->persistent); + if (!stmt->execute_cmd_buffer.buffer) { + break; + } - stmt->m->set_param_bind_dtor(stmt, mysqlnd_efree_param_bind_dtor TSRMLS_CC); - stmt->m->set_result_bind_dtor(stmt, mysqlnd_efree_result_bind_dtor TSRMLS_CC); + stmt->prefetch_rows = MYSQLND_DEFAULT_PREFETCH_ROWS; + /* + Mark that we reference the connection, thus it won't be + be destructed till there is open statements. The last statement + or normal query result will close it then. + */ + stmt->conn = conn->m->get_reference(conn TSRMLS_CC); - DBG_RETURN(stmt); + DBG_RETURN(ret); + } while (0); + + SET_OOM_ERROR(conn->error_info); + if (ret) { + ret->m->dtor(ret, TRUE TSRMLS_CC); + ret = NULL; + } + DBG_RETURN(NULL); } /* }}} */ @@ -2108,23 +2384,6 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_stmt_data(const MYSQLND_STMT * stmt, u /* }}} */ -/* {{{ mysqlnd_efree_param_bind_dtor */ -PHPAPI void -mysqlnd_efree_param_bind_dtor(MYSQLND_PARAM_BIND * param_bind TSRMLS_DC) -{ - mnd_efree(param_bind); -} -/* }}} */ - - -/* {{{ mysqlnd_efree_result_bind_dtor */ -PHPAPI void -mysqlnd_efree_result_bind_dtor(MYSQLND_RESULT_BIND * result_bind TSRMLS_DC) -{ - mnd_efree(result_bind); -} -/* }}} */ - /* {{{ _mysqlnd_init_ps_subsystem */ void _mysqlnd_init_ps_subsystem() { @@ -2133,6 +2392,7 @@ void _mysqlnd_init_ps_subsystem() } /* }}} */ + /* {{{ mysqlnd_conn_get_methods */ PHPAPI struct st_mysqlnd_stmt_methods * mysqlnd_stmt_get_methods() { @@ -2140,6 +2400,7 @@ PHPAPI struct st_mysqlnd_stmt_methods * mysqlnd_stmt_get_methods() } /* }}} */ + /* {{{ mysqlnd_conn_set_methods */ PHPAPI void mysqlnd_stmt_set_methods(struct st_mysqlnd_stmt_methods *methods) { diff --git a/ext/mysqlnd/mysqlnd_ps_codec.c b/ext/mysqlnd/mysqlnd_ps_codec.c index 650584c0f..9256763a9 100644 --- a/ext/mysqlnd/mysqlnd_ps_codec.c +++ b/ext/mysqlnd/mysqlnd_ps_codec.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_ps_codec.c 289030 2009-09-30 23:34:56Z andrey $ */ +/* $Id: mysqlnd_ps_codec.c 300735 2010-06-24 19:52:13Z andrey $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -61,7 +61,7 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field, size_t tmp_len = 0; zend_bool is_bit = field->type == MYSQL_TYPE_BIT; DBG_ENTER("ps_fetch_from_1_to_8_bytes"); - DBG_INF_FMT("zv=%p byte_count=%d", zv, byte_count); + DBG_INF_FMT("zv=%p byte_count=%u", zv, byte_count); if (field->flags & UNSIGNED_FLAG) { uint64_t uval = 0; @@ -106,10 +106,10 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field, } #if SIZEOF_LONG==4 - if ((L64(2147483647) < (int64_t) lval) || (L64(-2147483648) > (int64_t) lval)) { + if ((L64(2147483647) < (int64_t) lval) || (L64(-2147483648) > (int64_t) lval)) { DBG_INF("stringify"); tmp_len = sprintf((char *)&tmp, MYSQLND_LL_SPEC, lval); - } else + } else #endif /* SIZEOF */ { ZVAL_LONG(zv, lval); @@ -126,7 +126,7 @@ void ps_fetch_from_1_to_8_bytes(zval *zv, const MYSQLND_FIELD * const field, { DBG_INF("stringify"); ZVAL_STRINGL(zv, tmp, tmp_len, 1); - } + } } (*row)+= byte_count; DBG_VOID_RETURN; @@ -199,7 +199,7 @@ void ps_fetch_float(zval *zv, const MYSQLND_FIELD * const field, DBG_ENTER("ps_fetch_float"); float4get(value, *row); ZVAL_DOUBLE(zv, value); - (*row)+= 4; + (*row)+= 4; DBG_INF_FMT("value=%f", value); DBG_VOID_RETURN; } @@ -256,24 +256,23 @@ void ps_fetch_time(zval *zv, const MYSQLND_FIELD * const field, } else { memset(&t, 0, sizeof(t)); t.time_type = MYSQLND_TIMESTAMP_TIME; - } + } /* QQ : How to make this unicode without copying two times the buffer - Unicode equivalent of spprintf? */ - length = spprintf(&to, 0, "%s%02u:%02u:%02u", - (t.neg ? "-" : ""), t.hour, t.minute, t.second); + length = spprintf(&to, 0, "%s%02u:%02u:%02u", (t.neg ? "-" : ""), t.hour, t.minute, t.second); DBG_INF_FMT("%s", to); #if PHP_MAJOR_VERSION >= 6 if (!as_unicode) { #endif ZVAL_STRINGL(zv, to, length, 1); - mnd_efree(to); + efree(to); /* allocated by spprintf */ #if PHP_MAJOR_VERSION >= 6 } else { - ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); + ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); } #endif DBG_VOID_RETURN; @@ -321,10 +320,10 @@ void ps_fetch_date(zval *zv, const MYSQLND_FIELD * const field, if (!as_unicode) { #endif ZVAL_STRINGL(zv, to, length, 1); - mnd_efree(to); + efree(to); /* allocated by spprintf */ #if PHP_MAJOR_VERSION >= 6 } else { - ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); + ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); } #endif DBG_VOID_RETURN; @@ -358,7 +357,7 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field, t.minute = (unsigned int) to[5]; t.second = (unsigned int) to[6]; } else { - t.hour = t.minute = t.second= 0; + t.hour = t.minute = t.second= 0; } t.second_part = (length > 7) ? (unsigned long) sint4korr(to+7) : 0; @@ -380,10 +379,10 @@ void ps_fetch_datetime(zval *zv, const MYSQLND_FIELD * const field, if (!as_unicode) { #endif ZVAL_STRINGL(zv, to, length, 1); - mnd_efree(to); + efree(to); /* allocated by spprintf */ #if PHP_MAJOR_VERSION >= 6 } else { - ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); + ZVAL_UTF8_STRINGL(zv, to, length, ZSTR_AUTOFREE); } #endif DBG_VOID_RETURN; @@ -406,7 +405,7 @@ void ps_fetch_string(zval *zv, const MYSQLND_FIELD * const field, DBG_INF_FMT("len = %lu", length); #if PHP_MAJOR_VERSION < 6 DBG_INF("copying from the row buffer"); - ZVAL_STRINGL(zv, (char *)*row, length, 1); + ZVAL_STRINGL(zv, (char *)*row, length, 1); #else if (field->charsetnr == MYSQLND_BINARY_CHARSET_NR) { DBG_INF("Binary charset"); @@ -440,92 +439,92 @@ void _mysqlnd_init_ps_fetch_subsystem() { memset(mysqlnd_ps_fetch_functions, 0, sizeof(mysqlnd_ps_fetch_functions)); mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].func = ps_fetch_null; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].pack_len = 0; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].php_type = IS_NULL; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].pack_len = 0; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].php_type = IS_NULL; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NULL].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY].func = ps_fetch_int8; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY].pack_len = 1; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY].php_type = IS_LONG; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_SHORT].func = ps_fetch_int16; mysqlnd_ps_fetch_functions[MYSQL_TYPE_SHORT].pack_len = 2; mysqlnd_ps_fetch_functions[MYSQL_TYPE_SHORT].php_type = IS_LONG; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_SHORT].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_SHORT].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_YEAR].func = ps_fetch_int16; mysqlnd_ps_fetch_functions[MYSQL_TYPE_YEAR].pack_len = 2; mysqlnd_ps_fetch_functions[MYSQL_TYPE_YEAR].php_type = IS_LONG; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_YEAR].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_YEAR].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_INT24].func = ps_fetch_int32; mysqlnd_ps_fetch_functions[MYSQL_TYPE_INT24].pack_len = 4; mysqlnd_ps_fetch_functions[MYSQL_TYPE_INT24].php_type = IS_LONG; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_INT24].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_INT24].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG].func = ps_fetch_int32; mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG].pack_len = 4; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG].php_type = IS_LONG; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG].php_type = IS_LONG; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONGLONG].func = ps_fetch_int64; mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONGLONG].pack_len= 8; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONGLONG].php_type = IS_LONG; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONGLONG].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONGLONG].php_type= IS_LONG; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONGLONG].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_FLOAT].func = ps_fetch_float; mysqlnd_ps_fetch_functions[MYSQL_TYPE_FLOAT].pack_len = 4; mysqlnd_ps_fetch_functions[MYSQL_TYPE_FLOAT].php_type = IS_DOUBLE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_FLOAT].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_FLOAT].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].func = ps_fetch_double; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].pack_len = 8; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].php_type = IS_DOUBLE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].php_type = IS_DOUBLE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_DOUBLE].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].func = ps_fetch_time; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].pack_len = MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].php_type = IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIME].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].func = ps_fetch_date; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].pack_len = MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].php_type = IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATE].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].func = ps_fetch_date; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].pack_len = MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].php_type = IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDATE].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].func = ps_fetch_datetime; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].pack_len= MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].php_type= IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_DATETIME].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].func = ps_fetch_datetime; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].pack_len= MYSQLND_PS_SKIP_RESULT_W_LEN; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].php_type= IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_TIMESTAMP].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].pack_len= MYSQLND_PS_SKIP_RESULT_STR; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].is_possibly_blob = TRUE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_TINY_BLOB].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].pack_len = MYSQLND_PS_SKIP_RESULT_STR; mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].is_possibly_blob = TRUE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_BLOB].can_ret_as_str_in_uni = TRUE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].func = ps_fetch_string; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].pack_len= MYSQLND_PS_SKIP_RESULT_STR; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].php_type= IS_STRING; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].func = ps_fetch_string; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].pack_len = MYSQLND_PS_SKIP_RESULT_STR; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].is_possibly_blob = TRUE; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_MEDIUM_BLOB].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG_BLOB].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_LONG_BLOB].pack_len = MYSQLND_PS_SKIP_RESULT_STR; @@ -545,23 +544,23 @@ void _mysqlnd_init_ps_fetch_subsystem() mysqlnd_ps_fetch_functions[MYSQL_TYPE_VARCHAR].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_VARCHAR].pack_len = MYSQLND_PS_SKIP_RESULT_STR; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_VARCHAR].php_type = IS_STRING; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_VARCHAR].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_VARCHAR].is_possibly_blob = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_STRING].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_STRING].pack_len = MYSQLND_PS_SKIP_RESULT_STR; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_STRING].php_type = IS_STRING; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_STRING].php_type = IS_STRING; mysqlnd_ps_fetch_functions[MYSQL_TYPE_STRING].is_possibly_blob = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DECIMAL].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DECIMAL].pack_len = MYSQLND_PS_SKIP_RESULT_STR; mysqlnd_ps_fetch_functions[MYSQL_TYPE_DECIMAL].php_type = IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_DECIMAL].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_DECIMAL].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].pack_len = MYSQLND_PS_SKIP_RESULT_STR; mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].php_type = IS_STRING; - mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].can_ret_as_str_in_uni = TRUE; + mysqlnd_ps_fetch_functions[MYSQL_TYPE_NEWDECIMAL].can_ret_as_str_in_uni = TRUE; mysqlnd_ps_fetch_functions[MYSQL_TYPE_ENUM].func = ps_fetch_string; mysqlnd_ps_fetch_functions[MYSQL_TYPE_ENUM].pack_len = MYSQLND_PS_SKIP_RESULT_STR; @@ -579,29 +578,38 @@ void _mysqlnd_init_ps_fetch_subsystem() /* {{{ mysqlnd_stmt_copy_it */ -static void +static enum_func_status mysqlnd_stmt_copy_it(zval *** copies, zval *original, unsigned int param_count, unsigned int current TSRMLS_DC) { if (!*copies) { - *copies = mnd_ecalloc(param_count, sizeof(zval *)); + *copies = mnd_ecalloc(param_count, sizeof(zval *)); + } + if (*copies) { + MAKE_STD_ZVAL((*copies)[current]); + *(*copies)[current] = *original; + Z_SET_REFCOUNT_P((*copies)[current], 1); + zval_copy_ctor((*copies)[current]); + return PASS; } - MAKE_STD_ZVAL((*copies)[current]); - *(*copies)[current] = *original; - Z_SET_REFCOUNT_P((*copies)[current], 1); - zval_copy_ctor((*copies)[current]); + return FAIL; } /* }}} */ /* {{{ mysqlnd_stmt_execute_store_params */ -static void -mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uchar **p, +static enum_func_status +mysqlnd_stmt_execute_store_params(MYSQLND_STMT * s, zend_uchar **buf, zend_uchar **p, size_t *buf_len, unsigned int null_byte_offset TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s->data; unsigned int i = 0; + zend_uchar * provided_buffer = *buf; size_t left = (*buf_len - (*p - *buf)); size_t data_size = 0; zval **copies = NULL;/* if there are different types */ + enum_func_status ret = FAIL; + + DBG_ENTER("mysqlnd_stmt_execute_store_params"); /* 1. Store type information */ if (stmt->send_types_to_server) { @@ -612,6 +620,10 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch zend_uchar *tmp_buf; *buf_len = offset + stmt->param_count * 2 + 20; tmp_buf = mnd_emalloc(*buf_len); + if (!tmp_buf) { + SET_OOM_ERROR(stmt->error_info); + goto end; + } memcpy(tmp_buf, *buf, offset); *buf = tmp_buf; @@ -636,14 +648,16 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch unsigned int j; zval *the_var = stmt->param_bind[i].zv; - if (!the_var || (stmt->param_bind[i].type != MYSQL_TYPE_LONG_BLOB && - Z_TYPE_P(the_var) == IS_NULL)) { + if (!the_var || (stmt->param_bind[i].type != MYSQL_TYPE_LONG_BLOB && Z_TYPE_P(the_var) == IS_NULL)) { continue; } for (j = i + 1; j < stmt->param_count; j++) { if (stmt->param_bind[j].zv == the_var) { /* Double binding of the same zval, make a copy */ - mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC); + if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { + SET_OOM_ERROR(stmt->error_info); + goto end; + } break; } } @@ -653,7 +667,10 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch data_size += 8; if (Z_TYPE_P(the_var) != IS_DOUBLE) { if (!copies || !copies[i]) { - mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC); + if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { + SET_OOM_ERROR(stmt->error_info); + goto end; + } } } break; @@ -668,7 +685,10 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch #endif if (Z_TYPE_P(the_var) != IS_LONG) { if (!copies || !copies[i]) { - mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC); + if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { + SET_OOM_ERROR(stmt->error_info); + goto end; + } } } break; @@ -691,7 +711,10 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch #endif { if (!copies || !copies[i]) { - mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC); + if (PASS != mysqlnd_stmt_copy_it(&copies, the_var, stmt->param_count, i TSRMLS_CC)) { + SET_OOM_ERROR(stmt->error_info); + goto end; + } } the_var = copies[i]; #if PHP_MAJOR_VERSION >= 6 @@ -714,10 +737,22 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch zend_uchar *tmp_buf; *buf_len = offset + data_size + 10; /* Allocate + 10 for safety */ tmp_buf = mnd_emalloc(*buf_len); + if (!tmp_buf) { + SET_OOM_ERROR(stmt->error_info); + goto end; + } memcpy(tmp_buf, *buf, offset); + /* + When too many columns the buffer provided to the function might not be sufficient. + In this case new buffer has been allocated above. When we allocate a buffer and then + allocate a bigger one here, we should free the first one. + */ + if (*buf != provided_buffer) { + mnd_efree(*buf); + } *buf = tmp_buf; /* Update our pos pointer */ - *p = *buf + offset; + *p = *buf + offset; } /* 2.3 Store the actual data */ @@ -771,27 +806,36 @@ mysqlnd_stmt_execute_store_params(MYSQLND_STMT *stmt, zend_uchar **buf, zend_uch } } } + ret = PASS; +end: if (copies) { for (i = 0; i < stmt->param_count; i++) { if (copies[i]) { zval_ptr_dtor(&copies[i]); } } - mnd_efree(copies); + mnd_efree(copies); } + + DBG_INF_FMT("ret=%s", ret == PASS? "PASS":"FAIL"); + DBG_RETURN(ret); } /* }}} */ /* {{{ mysqlnd_stmt_execute_generate_request */ -zend_uchar* mysqlnd_stmt_execute_generate_request(MYSQLND_STMT *stmt, size_t *request_len, - zend_bool *free_buffer TSRMLS_DC) +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) { + MYSQLND_STMT_DATA * stmt = s->data; zend_uchar *p = stmt->execute_cmd_buffer.buffer, *cmd_buffer = stmt->execute_cmd_buffer.buffer; size_t cmd_buffer_length = stmt->execute_cmd_buffer.length; unsigned int null_byte_offset, null_count= (stmt->param_count + 7) / 8; + enum_func_status ret; + + DBG_ENTER("mysqlnd_stmt_execute_generate_request"); int4store(p, stmt->stmt_id); p += 4; @@ -815,11 +859,13 @@ zend_uchar* mysqlnd_stmt_execute_generate_request(MYSQLND_STMT *stmt, size_t *re int1store(p, stmt->send_types_to_server); p++; - mysqlnd_stmt_execute_store_params(stmt, &cmd_buffer, &p, &cmd_buffer_length, null_byte_offset TSRMLS_CC); + ret = mysqlnd_stmt_execute_store_params(s, &cmd_buffer, &p, &cmd_buffer_length, null_byte_offset TSRMLS_CC); *free_buffer = (cmd_buffer != stmt->execute_cmd_buffer.buffer); *request_len = (p - cmd_buffer); - return cmd_buffer; + *request = cmd_buffer; + DBG_INF_FMT("ret=%s", ret == PASS? "PASS":"FAIL"); + DBG_RETURN(ret); } /* }}} */ diff --git a/ext/mysqlnd/mysqlnd_result.c b/ext/mysqlnd/mysqlnd_result.c index 2e1d01263..645c81905 100644 --- a/ext/mysqlnd/mysqlnd_result.c +++ b/ext/mysqlnd/mysqlnd_result.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_result.c 301234 2010-07-13 13:02:00Z andrey $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_wireprotocol.h" @@ -35,31 +35,36 @@ /* {{{ mysqlnd_res::initialize_result_set_rest */ -static void +static enum_func_status MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest)(MYSQLND_RES * const result TSRMLS_DC) { unsigned int i; - zval **data_cursor = result->stored_data->data; - zval **data_begin = result->stored_data->data; - unsigned int field_count = result->meta->field_count; - unsigned int row_count = result->stored_data->row_count; + zval **data_cursor = result->stored_data? result->stored_data->data:NULL; + zval **data_begin = result->stored_data? result->stored_data->data:NULL; + unsigned int field_count = result->meta? result->meta->field_count : 0; + unsigned int row_count = result->stored_data? result->stored_data->row_count:0; + enum_func_status ret = PASS; DBG_ENTER("mysqlnd_res::initialize_result_set_rest"); if (!data_cursor || row_count == result->stored_data->initialized_rows) { - DBG_VOID_RETURN; + DBG_RETURN(ret); } while ((data_cursor - data_begin) < (row_count * field_count)) { if (NULL == data_cursor[0]) { + enum_func_status rc = result->m.row_decoder( + result->stored_data->row_buffers[(data_cursor - data_begin) / field_count], + data_cursor, + result->meta->field_count, + result->meta->fields, + result->stored_data->persistent, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC); + if (rc != PASS) { + ret = FAIL; + break; + } result->stored_data->initialized_rows++; - result->m.row_decoder( - result->stored_data->row_buffers[(data_cursor - data_begin) / field_count], - data_cursor, - result->meta->field_count, - result->meta->fields, - result->stored_data->persistent, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); for (i = 0; i < result->field_count; i++) { /* NULL fields are 0 length, 0 is not more than 0 @@ -76,7 +81,7 @@ MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest)(MYSQLND_RES * const resu } data_cursor += field_count; } - DBG_VOID_RETURN; + DBG_RETURN(ret); } /* }}} */ @@ -87,42 +92,39 @@ void mysqlnd_palloc_zval_ptr_dtor(zval **zv, enum_mysqlnd_res_type type, zend_bo { DBG_ENTER("mysqlnd_palloc_zval_ptr_dtor"); *copy_ctor_called = FALSE; - { + + /* + This zval is not from the cache block. + Thus the refcount is -1 than of a zval from the cache, + because the zvals from the cache are owned by it. + */ + if (type == MYSQLND_RES_PS_BUF || type == MYSQLND_RES_PS_UNBUF) { + ; /* do nothing, zval_ptr_dtor will do the job*/ + } else if (Z_REFCOUNT_PP(zv) > 1) { /* - This zval is not from the cache block. - Thus the refcount is -1 than of a zval from the cache, - because the zvals from the cache are owned by it. + Not a prepared statement, then we have to + call copy_ctor and then zval_ptr_dtor() + + In Unicode mode the destruction of the zvals should not call + zval_copy_ctor() because then we will leak. + I suppose we can use UG(unicode) in mysqlnd.c when freeing a result set + to check if we need to call copy_ctor(). + + If the type is IS_UNICODE, which can happen with PHP6, then we don't + need to copy_ctor, as the data doesn't point to our internal buffers. + If it's string (in PHP5 always) and in PHP6 if data is binary, then + it still points to internal buffers and has to be copied. */ - if (type == MYSQLND_RES_PS_BUF || type == MYSQLND_RES_PS_UNBUF) { - ; /* do nothing, zval_ptr_dtor will do the job*/ - } else if (Z_REFCOUNT_PP(zv) > 1) { - /* - Not a prepared statement, then we have to - call copy_ctor and then zval_ptr_dtor() - - In Unicode mode the destruction of the zvals should not call - zval_copy_ctor() because then we will leak. - I suppose we can use UG(unicode) in mysqlnd.c when freeing a result set - to check if we need to call copy_ctor(). - - If the type is IS_UNICODE, which can happen with PHP6, then we don't - need to copy_ctor, as the data doesn't point to our internal buffers. - If it's string (in PHP5 always) and in PHP6 if data is binary, then - it still points to internal buffers and has to be copied. - */ - if (Z_TYPE_PP(zv) == IS_STRING) { - zval_copy_ctor(*zv); - } - *copy_ctor_called = TRUE; - } else { - if (Z_TYPE_PP(zv) == IS_STRING) { - ZVAL_NULL(*zv); - } + if (Z_TYPE_PP(zv) == IS_STRING) { + zval_copy_ctor(*zv); + } + *copy_ctor_called = TRUE; + } else { + if (Z_TYPE_PP(zv) == IS_STRING) { + ZVAL_NULL(*zv); } - zval_ptr_dtor(zv); - DBG_VOID_RETURN; } - + zval_ptr_dtor(zv); DBG_VOID_RETURN; } /* }}} */ @@ -169,7 +171,7 @@ MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data)(MYSQLND_RES * result TSRM if (unbuf->last_row_buffer) { DBG_INF("Freeing last row buffer"); /* Nothing points to this buffer now, free it */ - unbuf->last_row_buffer->free_chunk(unbuf->last_row_buffer, TRUE TSRMLS_CC); + unbuf->last_row_buffer->free_chunk(unbuf->last_row_buffer TSRMLS_CC); unbuf->last_row_buffer = NULL; } @@ -180,7 +182,7 @@ MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data)(MYSQLND_RES * result TSRM /* {{{ mysqlnd_res::free_buffered_data */ static void -MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES *result TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES * result TSRMLS_DC) { MYSQLND_RES_BUFFERED *set = result->stored_data; unsigned int field_count = result->field_count; @@ -189,34 +191,37 @@ MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES *result TSRMLS_DC) DBG_ENTER("mysqlnd_res::free_buffered_data"); DBG_INF_FMT("Freeing "MYSQLND_LLU_SPEC" row(s)", set->row_count); - DBG_INF_FMT("before: real_usage=%lu usage=%lu", zend_memory_usage(TRUE TSRMLS_CC), zend_memory_usage(FALSE TSRMLS_CC)); - for (row = set->row_count - 1; row >= 0; row--) { - zval **current_row = set->data + row * field_count; - MYSQLND_MEMORY_POOL_CHUNK *current_buffer = set->row_buffers[row]; - int col; + DBG_INF("Freeing data & row_buffer"); + if (set->data) { + + DBG_INF_FMT("before: real_usage=%lu usage=%lu", zend_memory_usage(TRUE TSRMLS_CC), zend_memory_usage(FALSE TSRMLS_CC)); + for (row = set->row_count - 1; row >= 0; row--) { + zval **current_row = set->data + row * field_count; + MYSQLND_MEMORY_POOL_CHUNK *current_buffer = set->row_buffers[row]; + int col; - for (col = field_count - 1; col >= 0; --col) { - zend_bool copy_ctor_called; - if (current_row[0] == NULL) { - break;/* row that was never initialized */ - } + for (col = field_count - 1; col >= 0; --col) { + zend_bool copy_ctor_called; + if (current_row == NULL || current_row[0] == NULL) { + break;/* row that was never initialized */ + } mysqlnd_palloc_zval_ptr_dtor(&(current_row[col]), result->type, ©_ctor_called TSRMLS_CC); #if MYSQLND_DEBUG_MEMORY - DBG_INF_FMT("Copy_ctor_called=%d", copy_ctor_called); + DBG_INF_FMT("Copy_ctor_called=%u", copy_ctor_called); #endif - MYSQLND_INC_GLOBAL_STATISTIC(copy_ctor_called? STAT_COPY_ON_WRITE_PERFORMED: + MYSQLND_INC_GLOBAL_STATISTIC(copy_ctor_called? STAT_COPY_ON_WRITE_PERFORMED: STAT_COPY_ON_WRITE_SAVED); - } + } #if MYSQLND_DEBUG_MEMORY - DBG_INF("Freeing current_row & current_buffer"); + DBG_INF("Freeing current_row & current_buffer"); #endif - current_buffer->free_chunk(current_buffer, TRUE TSRMLS_CC); - } - DBG_INF("Freeing data & row_buffer"); - if (set->data) { + current_buffer->free_chunk(current_buffer TSRMLS_CC); + } + mnd_pefree(set->data, set->persistent); set->data = NULL; } + if (set->row_buffers) { mnd_pefree(set->row_buffers, set->persistent); set->row_buffers = NULL; @@ -235,7 +240,7 @@ MYSQLND_METHOD(mysqlnd_res, free_buffered_data)(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_res::free_result_buffers */ static void -MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES *result TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES * result TSRMLS_DC) { DBG_ENTER("mysqlnd_res::free_result_buffers"); DBG_INF_FMT("%s", result->unbuf? "unbuffered":(result->stored_data? "buffered":"unknown")); @@ -263,7 +268,7 @@ MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES *result TSRMLS_DC) if (result->result_set_memory_pool) { DBG_INF("Freeing memory pool"); mysqlnd_mempool_destroy(result->result_set_memory_pool TSRMLS_CC); - result->result_set_memory_pool = NULL; + result->result_set_memory_pool = NULL; } DBG_VOID_RETURN; @@ -273,14 +278,14 @@ MYSQLND_METHOD(mysqlnd_res, free_result_buffers)(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_internal_free_result_contents */ static -void mysqlnd_internal_free_result_contents(MYSQLND_RES *result TSRMLS_DC) +void mysqlnd_internal_free_result_contents(MYSQLND_RES * result TSRMLS_DC) { DBG_ENTER("mysqlnd_internal_free_result_contents"); result->m.free_result_buffers(result TSRMLS_CC); if (result->meta) { - result->meta->m->free_metadata(result->meta, FALSE TSRMLS_CC); + result->meta->m->free_metadata(result->meta TSRMLS_CC); result->meta = NULL; } @@ -291,7 +296,7 @@ void mysqlnd_internal_free_result_contents(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_internal_free_result */ static -void mysqlnd_internal_free_result(MYSQLND_RES *result TSRMLS_DC) +void mysqlnd_internal_free_result(MYSQLND_RES * result TSRMLS_DC) { DBG_ENTER("mysqlnd_internal_free_result"); result->m.free_result_contents(result TSRMLS_CC); @@ -301,7 +306,7 @@ void mysqlnd_internal_free_result(MYSQLND_RES *result TSRMLS_DC) result->conn = NULL; } - mnd_efree(result); + mnd_pefree(result, result->persistent); DBG_VOID_RETURN; } @@ -310,7 +315,7 @@ void mysqlnd_internal_free_result(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_res::read_result_metadata */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES *result, MYSQLND *conn TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES * result, MYSQLND *conn TSRMLS_DC) { DBG_ENTER("mysqlnd_res::read_result_metadata"); @@ -321,11 +326,15 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES *result, MYSQLND * infrastructure! */ if (result->meta) { - result->meta->m->free_metadata(result->meta, FALSE TSRMLS_CC); + result->meta->m->free_metadata(result->meta TSRMLS_CC); result->meta = NULL; } - result->meta = mysqlnd_result_meta_init(result->field_count TSRMLS_CC); + result->meta = result->m.result_meta_init(result->field_count, result->persistent TSRMLS_CC); + if (!result->meta) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); + } /* 1. Read all fields metadata */ @@ -339,9 +348,9 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES *result, MYSQLND * /* 2. Follows an EOF packet, which the client of mysqlnd_read_result_metadata() - should consume. + should consume. 3. If there is a result set, it follows. The last packet will have 'eof' set - If PS, then no result set follows. + If PS, then no result set follows. */ DBG_RETURN(PASS); @@ -351,18 +360,27 @@ MYSQLND_METHOD(mysqlnd_res, read_result_metadata)(MYSQLND_RES *result, MYSQLND * /* {{{ mysqlnd_query_read_result_set_header */ enum_func_status -mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC) +mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT * s TSRMLS_DC) { + MYSQLND_STMT_DATA * stmt = s ? s->data:NULL; enum_func_status ret; - MYSQLND_PACKET_RSET_HEADER * rset_header; + MYSQLND_PACKET_RSET_HEADER * rset_header = NULL; + MYSQLND_PACKET_EOF * fields_eof = NULL; DBG_ENTER("mysqlnd_query_read_result_set_header"); - DBG_INF_FMT("stmt=%d", stmt? stmt->stmt_id:0); + DBG_INF_FMT("stmt=%lu", stmt? stmt->stmt_id:0); ret = FAIL; - rset_header = conn->protocol->m.get_rset_header_packet(conn->protocol, FALSE TSRMLS_CC); do { + rset_header = conn->protocol->m.get_rset_header_packet(conn->protocol, FALSE TSRMLS_CC); + if (!rset_header) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + break; + } + SET_ERROR_AFF_ROWS(conn); + if (FAIL == (ret = PACKET_READ(rset_header, conn))) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Error reading result set's header"); break; @@ -385,6 +403,7 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC */ conn->error_info = rset_header->error_info; ret = FAIL; + DBG_ERR_FMT("error=%s", rset_header->error_info.error); /* Return back from CONN_QUERY_SENT */ CONN_SET_STATE(conn, CONN_READY); break; @@ -422,9 +441,8 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC ret = PASS; MYSQLND_INC_CONN_STATISTIC(conn->stats, STAT_NON_RSET_QUERY); break; - default:{ /* Result set */ - MYSQLND_PACKET_EOF * fields_eof; - MYSQLND_RES *result; + default: do { /* Result set */ + MYSQLND_RES * result; enum_mysqlnd_collected_stats stat = STAT_LAST; DBG_INF("Result set pending"); @@ -440,7 +458,7 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC /* PS has already allocated it */ conn->field_count = rset_header->field_count; if (!stmt) { - result = conn->current_result = mysqlnd_result_init(rset_header->field_count TSRMLS_CC); + result = conn->current_result = conn->m->result_init(rset_header->field_count, conn->persistent TSRMLS_CC); } else { if (!stmt->result) { DBG_INF("This is 'SHOW'/'EXPLAIN'-like query."); @@ -449,7 +467,7 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC prepared statements can't send result set metadata for these queries on prepare stage. Read it now. */ - result = stmt->result = mysqlnd_result_init(rset_header->field_count TSRMLS_CC); + result = stmt->result = conn->m->result_init(rset_header->field_count, stmt->persistent TSRMLS_CC); } else { /* Update result set metadata if it for some reason changed between @@ -462,14 +480,19 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC Note, that now (4.1.3) we always send metadata in reply to COM_STMT_EXECUTE (even if it is not necessary), so either this or previous branch always works. - */ + */ } result = stmt->result; } - + if (!result) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + break; + } + if (FAIL == (ret = result->m.read_result_metadata(result, conn TSRMLS_CC))) { /* For PS, we leave them in Prepared state */ - if (!stmt) { + if (!stmt && conn->current_result) { mnd_efree(conn->current_result); conn->current_result = NULL; } @@ -479,6 +502,11 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC /* Check for SERVER_STATUS_MORE_RESULTS if needed */ fields_eof = conn->protocol->m.get_eof_packet(conn->protocol, FALSE TSRMLS_CC); + if (!fields_eof) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + break; + } if (FAIL == (ret = PACKET_READ(fields_eof, conn))) { DBG_ERR("Error ocurred while reading the EOF packet"); result->m.free_result_contents(result TSRMLS_CC); @@ -519,11 +547,9 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC } MYSQLND_INC_CONN_STATISTIC(conn->stats, stat); } - - PACKET_FREE(fields_eof); - - break; - } + } while (0); + PACKET_FREE(fields_eof); + break; /* switch break */ } } while (0); PACKET_FREE(rset_header); @@ -541,8 +567,8 @@ mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC of PHP, to be called as separate function. But let's have it for completeness. */ -static -unsigned long * mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) +static unsigned long * +mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS_DC) { unsigned int i; zval **previous_row; @@ -572,13 +598,14 @@ unsigned long * mysqlnd_fetch_lengths_buffered(MYSQLND_RES * const result TSRMLS /* {{{ mysqlnd_fetch_lengths_unbuffered */ -static -unsigned long * mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) +static unsigned long * +mysqlnd_fetch_lengths_unbuffered(MYSQLND_RES * const result TSRMLS_DC) { return result->lengths; } /* }}} */ + #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) @@ -588,16 +615,17 @@ PHPAPI unsigned long * _mysqlnd_fetch_lengths(MYSQLND_RES * const result TSRMLS_ /* }}} */ #endif + /* {{{ mysqlnd_fetch_row_unbuffered_c */ static MYSQLND_ROW_C -mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES *result TSRMLS_DC) +mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES * result TSRMLS_DC) { - enum_func_status ret; - MYSQLND_ROW_C retrow = NULL; - unsigned int i, - field_count = result->field_count; + enum_func_status ret; + MYSQLND_ROW_C retrow = NULL; + unsigned int i, + field_count = result->field_count; MYSQLND_PACKET_ROW *row_packet = result->row_packet; - unsigned long *lengths = result->lengths; + unsigned long *lengths = result->lengths; DBG_ENTER("mysqlnd_fetch_row_unbuffered_c"); @@ -610,6 +638,10 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES *result TSRMLS_DC) UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); DBG_RETURN(retrow); } + if (!row_packet) { + /* Not fully initialized object that is being cleaned up */ + DBG_RETURN(retrow); + } /* Let the row packet fill our buffer and skip additional mnd_malloc + memcpy */ row_packet->skip_extraction = FALSE; @@ -633,43 +665,49 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES *result TSRMLS_DC) MYSQLND_FIELD *field = result->meta->fields; struct mysqlnd_field_hash_key *zend_hash_key = result->meta->zend_hash_keys; - result->m.row_decoder(result->unbuf->last_row_buffer, - result->unbuf->last_row_data, - row_packet->field_count, - row_packet->fields_metadata, - FALSE, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); + enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, + result->unbuf->last_row_data, + row_packet->field_count, + row_packet->fields_metadata, + FALSE, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC); + if (PASS != rc) { + DBG_RETURN(retrow); + } retrow = mnd_malloc(result->field_count * sizeof(char *)); + if (retrow) { + for (i = 0; i < field_count; i++, field++, zend_hash_key++) { + zval *data = result->unbuf->last_row_data[i]; + unsigned int len; + + if (Z_TYPE_P(data) != IS_NULL) { + convert_to_string(data); + retrow[i] = Z_STRVAL_P(data); + len = Z_STRLEN_P(data); + } else { + retrow[i] = NULL; + len = 0; + } - for (i = 0; i < field_count; i++, field++, zend_hash_key++) { - zval *data = result->unbuf->last_row_data[i]; - int len; - - if (Z_TYPE_P(data) != IS_NULL) { - convert_to_string(data); - retrow[i] = Z_STRVAL_P(data); - len = Z_STRLEN_P(data); - } else { - retrow[i] = NULL; - len = 0; - } - - if (lengths) { - lengths[i] = len; - } + if (lengths) { + lengths[i] = len; + } - if (field->max_length < len) { - field->max_length = len; + if (field->max_length < len) { + field->max_length = len; + } } + } else { + SET_OOM_ERROR(result->conn->error_info); } } } else if (ret == FAIL) { if (row_packet->error_info.error_no) { result->conn->error_info = row_packet->error_info; - DBG_ERR_FMT("errorno=%d error=%s", row_packet->error_info.error_no, row_packet->error_info.error); + DBG_ERR_FMT("errorno=%u error=%s", row_packet->error_info.error_no, row_packet->error_info.error); } CONN_SET_STATE(result->conn, CONN_READY); result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ @@ -698,23 +736,26 @@ mysqlnd_fetch_row_unbuffered_c(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_fetch_row_unbuffered */ static enum_func_status -mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) +mysqlnd_fetch_row_unbuffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { - enum_func_status ret; - zval *row = (zval *) param; + enum_func_status ret; + zval *row = (zval *) param; MYSQLND_PACKET_ROW *row_packet = result->row_packet; DBG_ENTER("mysqlnd_fetch_row_unbuffered"); - DBG_INF_FMT("flags=%d", flags); + DBG_INF_FMT("flags=%u", flags); + *fetched_anything = FALSE; if (result->unbuf->eof_reached) { /* No more rows obviously */ - *fetched_anything = FALSE; DBG_RETURN(PASS); } if (CONN_GET_STATE(result->conn) != CONN_FETCHING_DATA) { - SET_CLIENT_ERROR(result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, - UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); + SET_CLIENT_ERROR(result->conn->error_info, CR_COMMANDS_OUT_OF_SYNC, UNKNOWN_SQLSTATE, mysqlnd_out_of_sync); + DBG_RETURN(FAIL); + } + if (!row_packet) { + /* Not fully initialized object that is being cleaned up */ DBG_RETURN(FAIL); } /* Let the row packet fill our buffer and skip additional mnd_malloc + memcpy */ @@ -725,9 +766,6 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flag result->m.unbuffered_free_last_data() before it. The function returns always true. */ if (PASS == (ret = PACKET_READ(row_packet, result->conn)) && !row_packet->eof) { - result->unbuf->row_count++; - *fetched_anything = TRUE; - result->m.unbuffered_free_last_data(result TSRMLS_CC); result->unbuf->last_row_data = row_packet->fields; @@ -735,7 +773,6 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flag row_packet->fields = NULL; row_packet->row_buffer = NULL; - MYSQLND_INC_CONN_STATISTIC(result->conn->stats, STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_UNBUF); if (!row_packet->skip_extraction) { @@ -745,18 +782,20 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flag unsigned int i, field_count = result->field_count; unsigned long *lengths = result->lengths; - result->m.row_decoder(result->unbuf->last_row_buffer, - result->unbuf->last_row_data, - field_count, - row_packet->fields_metadata, - FALSE, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); - + enum_func_status rc = result->m.row_decoder(result->unbuf->last_row_buffer, + result->unbuf->last_row_data, + field_count, + row_packet->fields_metadata, + FALSE, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC); + if (PASS != rc) { + DBG_RETURN(FAIL); + } for (i = 0; i < field_count; i++, field++, zend_hash_key++) { zval *data = result->unbuf->last_row_data[i]; - int len = (Z_TYPE_P(data) == IS_NULL)? 0:Z_STRLEN_P(data); + unsigned int len = (Z_TYPE_P(data) == IS_NULL)? 0:Z_STRLEN_P(data); if (lengths) { lengths[i] = len; @@ -800,12 +839,13 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flag } } } + *fetched_anything = TRUE; + result->unbuf->row_count++; } else if (ret == FAIL) { if (row_packet->error_info.error_no) { result->conn->error_info = row_packet->error_info; - DBG_ERR_FMT("errorno=%d error=%s", row_packet->error_info.error_no, row_packet->error_info.error); + DBG_ERR_FMT("errorno=%u error=%s", row_packet->error_info.error_no, row_packet->error_info.error); } - *fetched_anything = FALSE; CONN_SET_STATE(result->conn, CONN_READY); result->unbuf->eof_reached = TRUE; /* so next time we won't get an error */ } else if (row_packet->eof) { @@ -824,10 +864,9 @@ mysqlnd_fetch_row_unbuffered(MYSQLND_RES *result, void *param, unsigned int flag CONN_SET_STATE(result->conn, CONN_READY); } result->m.unbuffered_free_last_data(result TSRMLS_CC); - *fetched_anything = FALSE; } - DBG_INF_FMT("ret=%s fetched=%d", ret == PASS? "PASS":"FAIL", *fetched_anything); + DBG_INF_FMT("ret=%s fetched=%u", ret == PASS? "PASS":"FAIL", *fetched_anything); DBG_RETURN(PASS); } /* }}} */ @@ -838,26 +877,34 @@ static MYSQLND_RES * MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps TSRMLS_DC) { DBG_ENTER("mysqlnd_res::use_result"); - DBG_INF_FMT("ps=%d", ps); + DBG_INF_FMT("ps=%u", ps); SET_EMPTY_ERROR(result->conn->error_info); + if (ps == FALSE) { result->type = MYSQLND_RES_NORMAL; result->m.fetch_row = result->m.fetch_row_normal_unbuffered; result->m.fetch_lengths = mysqlnd_fetch_lengths_unbuffered; - result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); result->m.row_decoder = php_mysqlnd_rowp_read_text_protocol; + result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); + if (!result->lengths) { + goto oom; + } } else { result->type = MYSQLND_RES_PS_UNBUF; + result->m.fetch_row = NULL; /* result->m.fetch_row() will be set in mysqlnd_ps.c */ result->m.fetch_lengths = NULL; /* makes no sense */ - result->lengths = NULL; result->m.row_decoder = php_mysqlnd_rowp_read_binary_protocol; + result->lengths = NULL; } - result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); - result->result_set_memory_pool = mysqlnd_mempool_create(16000 TSRMLS_CC); + result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); + result->unbuf = mnd_ecalloc(1, sizeof(MYSQLND_RES_UNBUFFERED)); + if (!result->result_set_memory_pool || !result->unbuf) { + goto oom; + } /* Will be freed in the mysqlnd_internal_free_result_contents() called @@ -866,6 +913,9 @@ MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps */ /* FALSE = non-persistent */ result->row_packet = result->conn->protocol->m.get_row_packet(result->conn->protocol, FALSE TSRMLS_CC); + if (!result->row_packet) { + goto oom; + } result->row_packet->result_set_memory_pool = result->result_set_memory_pool; result->row_packet->field_count = result->field_count; result->row_packet->binary_protocol = ps; @@ -874,13 +924,16 @@ MYSQLND_METHOD(mysqlnd_res, use_result)(MYSQLND_RES * const result, zend_bool ps result->row_packet->bit_fields_total_len = result->meta->bit_fields_total_len; DBG_RETURN(result); +oom: + SET_OOM_ERROR(result->conn->error_info); + DBG_RETURN(NULL); } /* }}} */ /* {{{ mysqlnd_fetch_row_buffered_c */ static MYSQLND_ROW_C -mysqlnd_fetch_row_buffered_c(MYSQLND_RES *result TSRMLS_DC) +mysqlnd_fetch_row_buffered_c(MYSQLND_RES * result TSRMLS_DC) { MYSQLND_ROW_C ret = NULL; MYSQLND_RES_BUFFERED *set = result->stored_data; @@ -898,15 +951,18 @@ mysqlnd_fetch_row_buffered_c(MYSQLND_RES *result TSRMLS_DC) if (NULL == current_row[0]) { uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; + enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], + current_row, + result->meta->field_count, + result->meta->fields, + FALSE, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC); + if (rc != PASS) { + DBG_RETURN(ret); + } set->initialized_rows++; - result->m.row_decoder(set->row_buffers[row_num], - current_row, - result->meta->field_count, - result->meta->fields, - FALSE, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); for (i = 0; i < result->field_count; i++) { /* NULL fields are 0 length, 0 is not more than 0 @@ -922,20 +978,23 @@ mysqlnd_fetch_row_buffered_c(MYSQLND_RES *result TSRMLS_DC) } } - ret = mnd_malloc(result->field_count * sizeof(char *)); + set->data_cursor += result->meta->field_count; + MYSQLND_INC_GLOBAL_STATISTIC(STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF); - for (i = 0; i < result->field_count; i++, field++, zend_hash_key++) { - zval *data = current_row[i]; + ret = mnd_malloc(result->field_count * sizeof(char *)); + if (ret) { + for (i = 0; i < result->field_count; i++, field++, zend_hash_key++) { + zval *data = current_row[i]; - if (Z_TYPE_P(data) != IS_NULL) { - convert_to_string(data); - ret[i] = Z_STRVAL_P(data); - } else { - ret[i] = NULL; + if (Z_TYPE_P(data) != IS_NULL) { + convert_to_string(data); + ret[i] = Z_STRVAL_P(data); + } else { + ret[i] = NULL; + } } } - set->data_cursor += result->meta->field_count; - MYSQLND_INC_GLOBAL_STATISTIC(STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF); + /* there is no conn handle in this function thus we can't set OOM in error_info */ } else { set->data_cursor = NULL; DBG_INF("EOF reached"); @@ -947,11 +1006,12 @@ mysqlnd_fetch_row_buffered_c(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_fetch_row_buffered */ static enum_func_status -mysqlnd_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) +mysqlnd_fetch_row_buffered(MYSQLND_RES * result, void *param, unsigned int flags, zend_bool *fetched_anything TSRMLS_DC) { unsigned int i; zval *row = (zval *) param; MYSQLND_RES_BUFFERED *set = result->stored_data; + enum_func_status ret = FAIL; DBG_ENTER("mysqlnd_fetch_row_buffered"); DBG_INF_FMT("flags=%u row=%p", flags, row); @@ -966,15 +1026,18 @@ mysqlnd_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, if (NULL == current_row[0]) { uint64_t row_num = (set->data_cursor - set->data) / result->meta->field_count; + enum_func_status rc = result->m.row_decoder(set->row_buffers[row_num], + current_row, + result->meta->field_count, + result->meta->fields, + result->stored_data->persistent, + result->conn->options.numeric_and_datetime_as_unicode, + result->conn->options.int_and_float_native, + result->conn->stats TSRMLS_CC); + if (rc != PASS) { + DBG_RETURN(FAIL); + } set->initialized_rows++; - result->m.row_decoder(set->row_buffers[row_num], - current_row, - result->meta->field_count, - result->meta->fields, - result->stored_data->persistent, - result->conn->options.numeric_and_datetime_as_unicode, - result->conn->options.int_and_float_native, - result->conn->stats TSRMLS_CC); for (i = 0; i < result->field_count; i++) { /* NULL fields are 0 length, 0 is not more than 0 @@ -1030,13 +1093,15 @@ mysqlnd_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, set->data_cursor += result->meta->field_count; *fetched_anything = TRUE; MYSQLND_INC_GLOBAL_STATISTIC(STAT_ROWS_FETCHED_FROM_CLIENT_NORMAL_BUF); + ret = PASS; } else { set->data_cursor = NULL; *fetched_anything = FALSE; + ret = PASS; DBG_INF("EOF reached"); } - DBG_INF_FMT("ret=PASS fetched=%d", *fetched_anything); - DBG_RETURN(PASS); + DBG_INF_FMT("ret=PASS fetched=%u", *fetched_anything); + DBG_RETURN(ret); } /* }}} */ @@ -1045,23 +1110,33 @@ mysqlnd_fetch_row_buffered(MYSQLND_RES *result, void *param, unsigned int flags, /* {{{ mysqlnd_res::store_result_fetch_data */ enum_func_status -MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQLND_RES *result, +MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQLND_RES * result, MYSQLND_RES_METADATA *meta, zend_bool binary_protocol, zend_bool to_cache TSRMLS_DC) { enum_func_status ret; - MYSQLND_PACKET_ROW *row_packet; + MYSQLND_PACKET_ROW *row_packet = NULL; unsigned int next_extend = STORE_RESULT_PREALLOCATED_SET_IF_NOT_EMPTY, free_rows = 1; MYSQLND_RES_BUFFERED *set; DBG_ENTER("mysqlnd_res::store_result_fetch_data"); - DBG_INF_FMT("conn=%llu binary_proto=%d to_cache=%d", + DBG_INF_FMT("conn=%llu binary_proto=%u to_cache=%u", conn->thread_id, binary_protocol, to_cache); result->stored_data = set = mnd_pecalloc(1, sizeof(MYSQLND_RES_BUFFERED), to_cache); + if (!set) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + goto end; + } if (free_rows) { set->row_buffers = mnd_pemalloc(free_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *), to_cache); + if (!set->row_buffers) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + goto end; + } } set->persistent = to_cache; set->references = 1; @@ -1071,6 +1146,11 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQL /* non-persistent */ row_packet = conn->protocol->m.get_row_packet(conn->protocol, FALSE TSRMLS_CC); + if (!row_packet) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + goto end; + } row_packet->result_set_memory_pool = result->result_set_memory_pool; row_packet->field_count = meta->field_count; row_packet->binary_protocol = binary_protocol; @@ -1083,10 +1163,17 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQL while (FAIL != (ret = PACKET_READ(row_packet, conn)) && !row_packet->eof) { if (!free_rows) { uint64_t total_allocated_rows = free_rows = next_extend = next_extend * 11 / 10; /* extend with 10% */ + MYSQLND_MEMORY_POOL_CHUNK ** new_row_buffers; total_allocated_rows += set->row_count; - set->row_buffers = mnd_perealloc(set->row_buffers, - total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *), - set->persistent); + new_row_buffers = mnd_perealloc(set->row_buffers, + total_allocated_rows * sizeof(MYSQLND_MEMORY_POOL_CHUNK *), + set->persistent); + if (!new_row_buffers) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + goto end; + } + set->row_buffers = new_row_buffers; } free_rows--; set->row_buffers[set->row_count] = row_packet->row_buffer; @@ -1108,6 +1195,11 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQL if (set->row_count) { /* if pecalloc is used valgrind barks gcc version 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036] (SUSE Linux) */ set->data = mnd_pemalloc(set->row_count * meta->field_count * sizeof(zval *), to_cache); + if (!set->data) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + goto end; + } memset(set->data, 0, set->row_count * meta->field_count * sizeof(zval *)); } @@ -1138,15 +1230,16 @@ MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data)(MYSQLND * const conn, MYSQL set->error_info = row_packet->error_info; } else { /* Position at the first row */ - set->data_cursor = set->data; + set->data_cursor = set->data; /* libmysql's documentation says it should be so for SELECT statements */ conn->upsert_status.affected_rows = set->row_count; } - PACKET_FREE(row_packet); - DBG_INF_FMT("ret=%s row_count=%u warnings=%u server_status=%u", ret == PASS? "PASS":"FAIL", set->row_count, conn->upsert_status.warning_count, conn->upsert_status.server_status); +end: + PACKET_FREE(row_packet); + DBG_RETURN(ret); } /* }}} */ @@ -1162,7 +1255,7 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, zend_bool to_cache = FALSE; DBG_ENTER("mysqlnd_res::store_result"); - DBG_INF_FMT("conn=%d ps_protocol=%d", conn->thread_id, ps_protocol); + DBG_INF_FMT("conn=%u ps_protocol=%u", conn->thread_id, ps_protocol); /* We need the conn because we are doing lazy zval initialization in buffered_fetch_row */ result->conn = conn->m->get_reference(conn TSRMLS_CC); @@ -1170,20 +1263,26 @@ MYSQLND_METHOD(mysqlnd_res, store_result)(MYSQLND_RES * result, result->m.fetch_row = result->m.fetch_row_normal_buffered; result->m.fetch_lengths = mysqlnd_fetch_lengths_buffered; - CONN_SET_STATE(conn, CONN_FETCHING_DATA); - - result->result_set_memory_pool = mysqlnd_mempool_create(16000 TSRMLS_CC); + result->result_set_memory_pool = mysqlnd_mempool_create(MYSQLND_G(mempool_default_size) TSRMLS_CC); result->lengths = mnd_ecalloc(result->field_count, sizeof(unsigned long)); + if (!result->result_set_memory_pool || !result->lengths) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(NULL); + } + + CONN_SET_STATE(conn, CONN_FETCHING_DATA); ret = result->m.store_result_fetch_data(conn, result, result->meta, ps_protocol, to_cache TSRMLS_CC); - if (PASS == ret) { - /* libmysql's documentation says it should be so for SELECT statements */ - conn->upsert_status.affected_rows = result->stored_data->row_count; - } else { - conn->error_info = result->stored_data->error_info; - result->m.free_result_internal(result TSRMLS_CC); - result = NULL; + if (FAIL == ret) { + if (result->stored_data) { + conn->error_info = result->stored_data->error_info; + } else { + SET_OOM_ERROR(conn->error_info); + } + DBG_RETURN(NULL); } + /* libmysql's documentation says it should be so for SELECT statements */ + conn->upsert_status.affected_rows = result->stored_data->row_count; DBG_RETURN(result); } @@ -1224,10 +1323,10 @@ MYSQLND_METHOD(mysqlnd_res, skip_result)(MYSQLND_RES * const result TSRMLS_DC) /* {{{ mysqlnd_res::free_result */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES *result, zend_bool implicit TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES * result, zend_bool implicit TSRMLS_DC) { DBG_ENTER("mysqlnd_res::free_result"); - DBG_INF_FMT("implicit=%d", implicit); + DBG_INF_FMT("implicit=%u", implicit); result->m.skip_result(result TSRMLS_CC); MYSQLND_INC_CONN_STATISTIC(result->conn? result->conn->stats : NULL, @@ -1242,7 +1341,7 @@ MYSQLND_METHOD(mysqlnd_res, free_result)(MYSQLND_RES *result, zend_bool implicit /* {{{ mysqlnd_res::data_seek */ static enum_func_status -MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES *result, uint64_t row TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, data_seek)(MYSQLND_RES * result, uint64_t row TSRMLS_DC) { DBG_ENTER("mysqlnd_res::data_seek"); DBG_INF_FMT("row=%lu", row); @@ -1287,24 +1386,28 @@ static const MYSQLND_FIELD * MYSQLND_METHOD(mysqlnd_res, fetch_field)(MYSQLND_RES * const result TSRMLS_DC) { DBG_ENTER("mysqlnd_res::fetch_field"); - if (result->meta) { - /* - We optimize the result set, so we don't convert all the data from raw buffer format to - zval arrays during store. In the case someone doesn't read all the lines this will - save time. However, when a metadata call is done, we need to calculate max_length. - We don't have control whether max_length will be used, unfortunately. Otherwise we - could have been able to skip that step. - Well, if the mysqli API switches from returning stdClass to class like mysqli_field_metadata, - then we can have max_length as dynamic property, which will be calculated during runtime and - not during mysqli_fetch_field() time. - */ - if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { - DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request"); - /* we have to initialize the rest to get the updated max length */ - result->m.initialize_result_set_rest(result TSRMLS_CC); + do { + if (result->meta) { + /* + We optimize the result set, so we don't convert all the data from raw buffer format to + zval arrays during store. In the case someone doesn't read all the lines this will + save time. However, when a metadata call is done, we need to calculate max_length. + We don't have control whether max_length will be used, unfortunately. Otherwise we + could have been able to skip that step. + Well, if the mysqli API switches from returning stdClass to class like mysqli_field_metadata, + then we can have max_length as dynamic property, which will be calculated during runtime and + not during mysqli_fetch_field() time. + */ + if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { + DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request"); + /* we have to initialize the rest to get the updated max length */ + if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { + break; + } + } + DBG_RETURN(result->meta->m->fetch_field(result->meta TSRMLS_CC)); } - DBG_RETURN(result->meta->m->fetch_field(result->meta TSRMLS_CC)); - } + } while (0); DBG_RETURN(NULL); } /* }}} */ @@ -1315,24 +1418,28 @@ static const MYSQLND_FIELD * MYSQLND_METHOD(mysqlnd_res, fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC) { DBG_ENTER("mysqlnd_res::fetch_field_direct"); - if (result->meta) { - /* - We optimize the result set, so we don't convert all the data from raw buffer format to - zval arrays during store. In the case someone doesn't read all the lines this will - save time. However, when a metadata call is done, we need to calculate max_length. - We don't have control whether max_length will be used, unfortunately. Otherwise we - could have been able to skip that step. - Well, if the mysqli API switches from returning stdClass to class like mysqli_field_metadata, - then we can have max_length as dynamic property, which will be calculated during runtime and - not during mysqli_fetch_field_direct() time. - */ - if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { - DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request"); - /* we have to initialized the rest to get the updated max length */ - result->m.initialize_result_set_rest(result TSRMLS_CC); + do { + if (result->meta) { + /* + We optimize the result set, so we don't convert all the data from raw buffer format to + zval arrays during store. In the case someone doesn't read all the lines this will + save time. However, when a metadata call is done, we need to calculate max_length. + We don't have control whether max_length will be used, unfortunately. Otherwise we + could have been able to skip that step. + Well, if the mysqli API switches from returning stdClass to class like mysqli_field_metadata, + then we can have max_length as dynamic property, which will be calculated during runtime and + not during mysqli_fetch_field_direct() time. + */ + if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { + DBG_INF_FMT("We have decode the whole result set to be able to satisfy this meta request"); + /* we have to initialized the rest to get the updated max length */ + if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { + break; + } + } + DBG_RETURN(result->meta->m->fetch_field_direct(result->meta, fieldnr TSRMLS_CC)); } - DBG_RETURN(result->meta->m->fetch_field_direct(result->meta, fieldnr TSRMLS_CC)); - } + } while (0); DBG_RETURN(NULL); } @@ -1344,13 +1451,17 @@ static const MYSQLND_FIELD * MYSQLND_METHOD(mysqlnd_res, fetch_fields)(MYSQLND_RES * const result TSRMLS_DC) { DBG_ENTER("mysqlnd_res::fetch_fields"); - if (result->meta) { - if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { - /* we have to initialize the rest to get the updated max length */ - result->m.initialize_result_set_rest(result TSRMLS_CC); + do { + if (result->meta) { + if (result->stored_data && (result->stored_data->initialized_rows < result->stored_data->row_count)) { + /* we have to initialize the rest to get the updated max length */ + if (PASS != result->m.initialize_result_set_rest(result TSRMLS_CC)) { + break; + } + } + DBG_RETURN(result->meta->m->fetch_fields(result->meta TSRMLS_CC)); } - DBG_RETURN(result->meta->m->fetch_fields(result->meta TSRMLS_CC)); - } + } while (0); DBG_RETURN(NULL); } /* }}} */ @@ -1382,14 +1493,14 @@ MYSQLND_METHOD(mysqlnd_res, field_tell)(const MYSQLND_RES * const result TSRMLS_ /* {{{ mysqlnd_res::fetch_into */ static void -MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES *result, unsigned int flags, +MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES * result, unsigned int flags, zval *return_value, enum_mysqlnd_extension extension TSRMLS_DC ZEND_FILE_LINE_DC) { zend_bool fetched_anything; DBG_ENTER("mysqlnd_res::fetch_into"); - DBG_INF_FMT("flags=%u mysqlnd_extension=%d", flags, extension); + DBG_INF_FMT("flags=%u mysqlnd_extension=%u", flags, extension); if (!result->m.fetch_row) { RETVAL_NULL(); @@ -1426,7 +1537,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_into)(MYSQLND_RES *result, unsigned int flags, /* {{{ mysqlnd_res::fetch_row_c */ static MYSQLND_ROW_C -MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES *result TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES * result TSRMLS_DC) { MYSQLND_ROW_C ret = NULL; DBG_ENTER("mysqlnd_res::fetch_row_c"); @@ -1447,7 +1558,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_row_c)(MYSQLND_RES *result TSRMLS_DC) /* {{{ mysqlnd_res::fetch_all */ static void -MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES *result, unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC) +MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES * result, unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC) { zval *row; ulong i = 0; @@ -1457,16 +1568,21 @@ MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES *result, unsigned int flags, DBG_INF_FMT("flags=%u", flags); /* mysqlnd_res::fetch_all works with buffered resultsets only */ - if (!set || - !set->row_count || !set->data_cursor || - set->data_cursor >= set->data + set->row_count) - { + if (result->unbuf || (!result->unbuf && !set)) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "fetch_all can be used only with buffered sets"); + if (result->conn) { + SET_CLIENT_ERROR(result->conn->error_info, CR_NOT_IMPLEMENTED, UNKNOWN_SQLSTATE, "fetch_all can be used only with buffered sets"); + } RETVAL_NULL(); DBG_VOID_RETURN; - } + } mysqlnd_array_init(return_value, (unsigned int) set->row_count); + if (!set->row_count || !set->data_cursor || set->data_cursor >= set->data + set->row_count) { + DBG_VOID_RETURN; + } + while (set->data_cursor && (set->data_cursor - set->data) < (set->row_count * result->meta->field_count)) { @@ -1482,7 +1598,7 @@ MYSQLND_METHOD(mysqlnd_res, fetch_all)(MYSQLND_RES *result, unsigned int flags, /* {{{ mysqlnd_res::fetch_field_data */ static void -MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES *result, unsigned int offset, zval *return_value TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES * result, unsigned int offset, zval *return_value TSRMLS_DC) { zval row; zval **entry; @@ -1524,48 +1640,60 @@ MYSQLND_METHOD(mysqlnd_res, fetch_field_data)(MYSQLND_RES *result, unsigned int /* }}} */ +static +MYSQLND_CLASS_METHODS_START(mysqlnd_res) + NULL, /* fetch_row */ + mysqlnd_fetch_row_buffered, + mysqlnd_fetch_row_unbuffered, + MYSQLND_METHOD(mysqlnd_res, use_result), + MYSQLND_METHOD(mysqlnd_res, store_result), + MYSQLND_METHOD(mysqlnd_res, fetch_into), + MYSQLND_METHOD(mysqlnd_res, fetch_row_c), + MYSQLND_METHOD(mysqlnd_res, fetch_all), + MYSQLND_METHOD(mysqlnd_res, fetch_field_data), + MYSQLND_METHOD(mysqlnd_res, num_rows), + MYSQLND_METHOD(mysqlnd_res, num_fields), + MYSQLND_METHOD(mysqlnd_res, skip_result), + MYSQLND_METHOD(mysqlnd_res, data_seek), + MYSQLND_METHOD(mysqlnd_res, field_seek), + MYSQLND_METHOD(mysqlnd_res, field_tell), + MYSQLND_METHOD(mysqlnd_res, fetch_field), + MYSQLND_METHOD(mysqlnd_res, fetch_field_direct), + MYSQLND_METHOD(mysqlnd_res, fetch_fields), + MYSQLND_METHOD(mysqlnd_res, read_result_metadata), + NULL, /* fetch_lengths */ + MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data), + MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest), + MYSQLND_METHOD(mysqlnd_res, free_result_buffers), + MYSQLND_METHOD(mysqlnd_res, free_result), + + mysqlnd_internal_free_result, /* free_result_internal */ + mysqlnd_internal_free_result_contents, /* free_result_contents */ + MYSQLND_METHOD(mysqlnd_res, free_buffered_data), + MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data), + + NULL /* row_decoder */, + mysqlnd_result_meta_init +MYSQLND_CLASS_METHODS_END; + + /* {{{ mysqlnd_result_init */ PHPAPI MYSQLND_RES * -mysqlnd_result_init(unsigned int field_count TSRMLS_DC) +mysqlnd_result_init(unsigned int field_count, zend_bool persistent TSRMLS_DC) { size_t alloc_size = sizeof(MYSQLND_RES) + mysqlnd_plugin_count() * sizeof(void *); - MYSQLND_RES *ret = mnd_ecalloc(1, alloc_size); + MYSQLND_RES *ret = mnd_pecalloc(1, alloc_size, persistent); DBG_ENTER("mysqlnd_result_init"); DBG_INF_FMT("field_count=%u", field_count); + + if (!ret) { + DBG_RETURN(NULL); + } + ret->persistent = persistent; ret->field_count = field_count; - - ret->m.use_result = MYSQLND_METHOD(mysqlnd_res, use_result); - ret->m.store_result = MYSQLND_METHOD(mysqlnd_res, store_result); - ret->m.free_result = MYSQLND_METHOD(mysqlnd_res, free_result); - ret->m.seek_data = MYSQLND_METHOD(mysqlnd_res, data_seek); - ret->m.num_rows = MYSQLND_METHOD(mysqlnd_res, num_rows); - ret->m.num_fields = MYSQLND_METHOD(mysqlnd_res, num_fields); - ret->m.fetch_into = MYSQLND_METHOD(mysqlnd_res, fetch_into); - ret->m.fetch_row_c = MYSQLND_METHOD(mysqlnd_res, fetch_row_c); - ret->m.fetch_all = MYSQLND_METHOD(mysqlnd_res, fetch_all); - ret->m.fetch_field_data = MYSQLND_METHOD(mysqlnd_res, fetch_field_data); - ret->m.seek_field = MYSQLND_METHOD(mysqlnd_res, field_seek); - ret->m.field_tell = MYSQLND_METHOD(mysqlnd_res, field_tell); - ret->m.fetch_field = MYSQLND_METHOD(mysqlnd_res, fetch_field); - ret->m.fetch_field_direct = MYSQLND_METHOD(mysqlnd_res, fetch_field_direct); - ret->m.fetch_fields = MYSQLND_METHOD(mysqlnd_res, fetch_fields); - - ret->m.skip_result = MYSQLND_METHOD(mysqlnd_res, skip_result); - ret->m.free_result_buffers = MYSQLND_METHOD(mysqlnd_res, free_result_buffers); - ret->m.free_result_internal = mysqlnd_internal_free_result; - ret->m.free_result_contents = mysqlnd_internal_free_result_contents; - ret->m.free_buffered_data = MYSQLND_METHOD(mysqlnd_res, free_buffered_data); - ret->m.unbuffered_free_last_data = MYSQLND_METHOD(mysqlnd_res, unbuffered_free_last_data); - - ret->m.read_result_metadata = MYSQLND_METHOD(mysqlnd_res, read_result_metadata); - ret->m.store_result_fetch_data = MYSQLND_METHOD(mysqlnd_res, store_result_fetch_data); - ret->m.initialize_result_set_rest = MYSQLND_METHOD(mysqlnd_res, initialize_result_set_rest); - - ret->m.fetch_row_normal_buffered = mysqlnd_fetch_row_buffered; - ret->m.fetch_row_normal_unbuffered = mysqlnd_fetch_row_unbuffered; - ret->m.row_decoder = NULL; + ret->m = mysqlnd_mysqlnd_res_methods; DBG_RETURN(ret); } @@ -1584,6 +1712,15 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_result_data(const MYSQLND_RES * result } /* }}} */ + +/* {{{ mysqlnd_result_get_methods */ +PHPAPI struct st_mysqlnd_res_methods * +mysqlnd_result_get_methods() +{ + return &mysqlnd_mysqlnd_res_methods; +} +/* }}} */ + /* * Local variables: * tab-width: 4 diff --git a/ext/mysqlnd/mysqlnd_result.h b/ext/mysqlnd/mysqlnd_result.h index 0ed188df9..7c4ab99d3 100644 --- a/ext/mysqlnd/mysqlnd_result.h +++ b/ext/mysqlnd/mysqlnd_result.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,14 +18,15 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result.h 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_result.h 299348 2010-05-13 15:29:08Z andrey $ */ #ifndef MYSQLND_RESULT_H #define MYSQLND_RESULT_H -PHPAPI MYSQLND_RES * mysqlnd_result_init(unsigned int field_count TSRMLS_DC); +PHPAPI MYSQLND_RES * mysqlnd_result_init(unsigned int field_count, zend_bool persistent TSRMLS_DC); +PHPAPI struct st_mysqlnd_res_methods * mysqlnd_result_get_methods(); -enum_func_status mysqlnd_query_read_result_set_header(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC); +enum_func_status mysqlnd_query_read_result_set_header(MYSQLND * conn, MYSQLND_STMT * stmt TSRMLS_DC); #endif /* MYSQLND_RESULT_H */ diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c index 108b83938..a3897bcbb 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.c +++ b/ext/mysqlnd/mysqlnd_result_meta.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_result_meta.c 300635 2010-06-21 15:32:26Z andrey $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -29,8 +29,8 @@ /* {{{ php_mysqlnd_free_field_metadata */ -static -void php_mysqlnd_free_field_metadata(MYSQLND_FIELD *meta, zend_bool persistent TSRMLS_DC) +static void +php_mysqlnd_free_field_metadata(MYSQLND_FIELD *meta, zend_bool persistent TSRMLS_DC) { if (meta) { if (meta->root) { @@ -51,10 +51,10 @@ void php_mysqlnd_free_field_metadata(MYSQLND_FIELD *meta, zend_bool persistent T The following code is stolen from ZE - HANDLE_NUMERIC() macro from zend_hash.c and modified for the needs of mysqlnd. */ -static -zend_bool mysqlnd_is_key_numeric(char *key, size_t length, long *idx) +static zend_bool +mysqlnd_is_key_numeric(char *key, size_t length, long *idx) { - register char *tmp=key; + register char * tmp = key; if (*tmp=='-') { tmp++; @@ -94,10 +94,10 @@ zend_bool mysqlnd_is_key_numeric(char *key, size_t length, long *idx) #if PHP_MAJOR_VERSION >= 6 /* {{{ mysqlnd_unicode_is_key_numeric */ -static -zend_bool mysqlnd_unicode_is_key_numeric(UChar *key, size_t length, long *idx) +static zend_bool +mysqlnd_unicode_is_key_numeric(UChar *key, size_t length, long *idx) { - register UChar *tmp=key; + register UChar * tmp=key; if (*tmp==0x2D /*'-'*/) { tmp++; @@ -150,12 +150,17 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met DBG_ENTER("mysqlnd_res_meta::read_metadata"); field_packet = conn->protocol->m.get_result_field_packet(conn->protocol, FALSE TSRMLS_CC); + if (!field_packet) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); + } + field_packet->persistent_alloc = meta->persistent; for (;i < meta->field_count; i++) { long idx; if (meta->fields[i].root) { /* We re-read metadata for PS */ - mnd_efree(meta->fields[i].root); + mnd_pefree(meta->fields[i].root, meta->persistent); meta->fields[i].root = NULL; } @@ -177,10 +182,10 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met } if (mysqlnd_ps_fetch_functions[meta->fields[i].type].func == NULL) { - DBG_ERR_FMT("Unknown type %d sent by the server. Please send a report to the developers", + DBG_ERR_FMT("Unknown type %u sent by the server. Please send a report to the developers", meta->fields[i].type); php_error_docref(NULL TSRMLS_CC, E_WARNING, - "Unknown type %d sent by the server. " + "Unknown type %u sent by the server. " "Please send a report to the developers", meta->fields[i].type); PACKET_FREE(field_packet); @@ -260,21 +265,20 @@ MYSQLND_METHOD(mysqlnd_res_meta, read_metadata)(MYSQLND_RES_METADATA * const met /* {{{ mysqlnd_res_meta::free */ static void -MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA *meta, zend_bool persistent TSRMLS_DC) +MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA * meta TSRMLS_DC) { int i; MYSQLND_FIELD *fields; - DBG_ENTER("mysqlnd_res_meta::free"); - DBG_INF_FMT("persistent=%d", persistent); + DBG_INF_FMT("persistent=%u", meta->persistent); if ((fields = meta->fields)) { DBG_INF("Freeing fields metadata"); i = meta->field_count; while (i--) { - php_mysqlnd_free_field_metadata(fields++, persistent TSRMLS_CC); + php_mysqlnd_free_field_metadata(fields++, meta->persistent TSRMLS_CC); } - mnd_pefree(meta->fields, persistent); + mnd_pefree(meta->fields, meta->persistent); meta->fields = NULL; } @@ -284,16 +288,16 @@ MYSQLND_METHOD(mysqlnd_res_meta, free)(MYSQLND_RES_METADATA *meta, zend_bool per if (UG(unicode)) { for (i = 0; i < meta->field_count; i++) { if (meta->zend_hash_keys[i].ustr.v) { - mnd_pefree(meta->zend_hash_keys[i].ustr.v, persistent); + mnd_pefree(meta->zend_hash_keys[i].ustr.v, meta->persistent); } } } #endif - mnd_pefree(meta->zend_hash_keys, persistent); + mnd_pefree(meta->zend_hash_keys, meta->persistent); meta->zend_hash_keys = NULL; } DBG_INF("Freeing metadata structure"); - mnd_pefree(meta, persistent); + mnd_pefree(meta, meta->persistent); DBG_VOID_RETURN; } @@ -306,17 +310,31 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co { unsigned int i; /* +1 is to have empty marker at the end */ - MYSQLND_RES_METADATA *new_meta = mnd_pemalloc(sizeof(MYSQLND_RES_METADATA), persistent); - MYSQLND_FIELD *new_fields = mnd_pecalloc(meta->field_count + 1, sizeof(MYSQLND_FIELD), persistent); - MYSQLND_FIELD *orig_fields = meta->fields; + MYSQLND_RES_METADATA * new_meta = NULL; + MYSQLND_FIELD * new_fields; + MYSQLND_FIELD * orig_fields = meta->fields; size_t len = meta->field_count * sizeof(struct mysqlnd_field_hash_key); DBG_ENTER("mysqlnd_res_meta::clone_metadata"); - DBG_INF_FMT("persistent=%d", persistent); + DBG_INF_FMT("persistent=%u", persistent); + + new_meta = mnd_pecalloc(1, sizeof(MYSQLND_RES_METADATA), persistent); + if (!new_meta) { + goto oom; + } + new_meta->persistent = persistent; + new_meta->m = meta->m; + + new_fields = mnd_pecalloc(meta->field_count + 1, sizeof(MYSQLND_FIELD), persistent); + if (!new_fields) { + goto oom; + } new_meta->zend_hash_keys = mnd_pemalloc(len, persistent); + if (!new_meta->zend_hash_keys) { + goto oom; + } memcpy(new_meta->zend_hash_keys, meta->zend_hash_keys, len); - new_meta->m = meta->m; /* This will copy also the strings and the root, which we will have @@ -326,6 +344,9 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co for (i = 0; i < meta->field_count; i++) { /* First copy the root, then field by field adjust the pointers */ new_fields[i].root = mnd_pemalloc(orig_fields[i].root_len, persistent); + if (!new_fields[i].root) { + goto oom; + } memcpy(new_fields[i].root, orig_fields[i].root, new_fields[i].root_len); if (orig_fields[i].name && orig_fields[i].name != mysqlnd_empty_string) { @@ -353,6 +374,9 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co /* def is not on the root, if allocated at all */ if (orig_fields[i].def) { new_fields[i].def = mnd_pemalloc(orig_fields[i].def_length + 1, persistent); + if (!new_fields[i].def) { + goto oom; + } /* copy the trailing \0 too */ memcpy(new_fields[i].def, orig_fields[i].def, orig_fields[i].def_length + 1); } @@ -360,6 +384,9 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co if (new_meta->zend_hash_keys[i].ustr.u) { new_meta->zend_hash_keys[i].ustr.u = eustrndup(new_meta->zend_hash_keys[i].ustr.u, new_meta->zend_hash_keys[i].ulen); + if (!new_meta->zend_hash_keys[i].ustr.u) { + goto oom; + } } #endif } @@ -369,6 +396,12 @@ MYSQLND_METHOD(mysqlnd_res_meta, clone_metadata)(const MYSQLND_RES_METADATA * co new_meta->fields = new_fields; DBG_RETURN(new_meta); +oom: + if (new_meta) { + new_meta->m->free_metadata(new_meta TSRMLS_CC); + new_meta = NULL; + } + DBG_RETURN(NULL); } /* }}} */ @@ -394,7 +427,7 @@ static const MYSQLND_FIELD * MYSQLND_METHOD(mysqlnd_res_meta, fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC) { DBG_ENTER("mysqlnd_res_meta::fetch_field_direct"); - DBG_INF_FMT("fieldnr=%d", fieldnr); + DBG_INF_FMT("fieldnr=%u", fieldnr); DBG_INF_FMT("name=%s max_length=%u", meta->fields[meta->current_field].name? meta->fields[meta->current_field].name:"", meta->fields[meta->current_field].max_length); @@ -422,6 +455,7 @@ MYSQLND_METHOD(mysqlnd_res_meta, field_tell)(const MYSQLND_RES_METADATA * const /* }}} */ +static MYSQLND_CLASS_METHODS_START(mysqlnd_res_meta) MYSQLND_METHOD(mysqlnd_res_meta, fetch_field), MYSQLND_METHOD(mysqlnd_res_meta, fetch_field_direct), @@ -435,23 +469,60 @@ MYSQLND_CLASS_METHODS_END; /* {{{ mysqlnd_result_meta_init */ PHPAPI MYSQLND_RES_METADATA * -mysqlnd_result_meta_init(unsigned int field_count TSRMLS_DC) +mysqlnd_result_meta_init(unsigned int field_count, zend_bool persistent TSRMLS_DC) { - MYSQLND_RES_METADATA *ret; + size_t alloc_size = sizeof(MYSQLND_RES_METADATA) + mysqlnd_plugin_count() * sizeof(void *); + MYSQLND_RES_METADATA *ret = mnd_pecalloc(1, alloc_size, persistent); DBG_ENTER("mysqlnd_result_meta_init"); + DBG_INF_FMT("persistent=%u", persistent); + + do { + if (!ret) { + break; + } + ret->m = & mysqlnd_mysqlnd_res_meta_methods; + + ret->persistent = persistent; + ret->field_count = field_count; + /* +1 is to have empty marker at the end */ + ret->fields = mnd_pecalloc(field_count + 1, sizeof(MYSQLND_FIELD), ret->persistent); + ret->zend_hash_keys = mnd_pecalloc(field_count, sizeof(struct mysqlnd_field_hash_key), ret->persistent); + if (!ret->fields || !ret->zend_hash_keys) { + break; + } + DBG_INF_FMT("meta=%p", ret); + DBG_RETURN(ret); + } while (0); + if (ret) { + ret->m->free_metadata(ret TSRMLS_CC); + } + DBG_RETURN(NULL); +} +/* }}} */ - /* +1 is to have empty marker at the end */ - ret = mnd_ecalloc(1, sizeof(MYSQLND_RES_METADATA)); - ret->field_count = field_count; - ret->fields = mnd_ecalloc(field_count + 1, sizeof(MYSQLND_FIELD)); - ret->zend_hash_keys = mnd_ecalloc(field_count, sizeof(struct mysqlnd_field_hash_key)); - - ret->m = & mysqlnd_mysqlnd_res_meta_methods; - DBG_INF_FMT("meta=%p", ret); - DBG_RETURN(ret); + +/* {{{ mysqlnd_res_meta_get_methods */ +PHPAPI struct st_mysqlnd_res_meta_methods * +mysqlnd_result_metadata_get_methods() +{ + return &mysqlnd_mysqlnd_res_meta_methods; } +/* }}} */ +/* {{{ _mysqlnd_plugin_get_plugin_result_metadata_data */ +PHPAPI void ** +_mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plugin_id TSRMLS_DC) +{ + DBG_ENTER("_mysqlnd_plugin_get_plugin_result_metadata_data"); + DBG_INF_FMT("plugin_id=%u", plugin_id); + if (!meta || plugin_id >= mysqlnd_plugin_count()) { + return NULL; + } + DBG_RETURN((void *)((char *)meta + sizeof(MYSQLND_RES_METADATA) + plugin_id * sizeof(void *))); +} +/* }}} */ + /* * Local variables: * tab-width: 4 diff --git a/ext/mysqlnd/mysqlnd_result_meta.h b/ext/mysqlnd/mysqlnd_result_meta.h index 6a3d9164f..90554da21 100644 --- a/ext/mysqlnd/mysqlnd_result_meta.h +++ b/ext/mysqlnd/mysqlnd_result_meta.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,15 +18,14 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_result_meta.h 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_result_meta.h 299389 2010-05-14 16:42:17Z andrey $ */ #ifndef MYSQLND_RESULT_META_H #define MYSQLND_RESULT_META_H - -PHPAPI MYSQLND_RES_METADATA * mysqlnd_result_meta_init(unsigned int field_count TSRMLS_DC); - - +PHPAPI MYSQLND_RES_METADATA * mysqlnd_result_meta_init(unsigned int field_count, zend_bool persistent TSRMLS_DC); +PHPAPI struct st_mysqlnd_res_meta_methods * mysqlnd_result_metadata_get_methods(); +PHPAPI void ** _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plugin_id TSRMLS_DC); #endif /* MYSQLND_RESULT_META_H */ diff --git a/ext/mysqlnd/mysqlnd_statistics.c b/ext/mysqlnd/mysqlnd_statistics.c index 1fa8d1472..6557e234c 100644 --- a/ext/mysqlnd/mysqlnd_statistics.c +++ b/ext/mysqlnd/mysqlnd_statistics.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.c 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_statistics.c 298217 2010-04-20 13:50:34Z felipe $ */ #include "php.h" #include "mysqlnd.h" #include "mysqlnd_priv.h" @@ -99,19 +99,25 @@ const MYSQLND_STRING mysqlnd_stats_values_names[STAT_LAST] = { STR_W_LEN("explicit_stmt_close") }, { STR_W_LEN("implicit_stmt_close") }, { STR_W_LEN("mem_emalloc_count") }, - { STR_W_LEN("mem_emalloc_ammount") }, + { STR_W_LEN("mem_emalloc_amount") }, { STR_W_LEN("mem_ecalloc_count") }, - { STR_W_LEN("mem_ecalloc_ammount") }, + { STR_W_LEN("mem_ecalloc_amount") }, { STR_W_LEN("mem_erealloc_count") }, - { STR_W_LEN("mem_erealloc_ammount") }, + { STR_W_LEN("mem_erealloc_amount") }, { STR_W_LEN("mem_efree_count") }, + { STR_W_LEN("mem_efree_amount") }, { STR_W_LEN("mem_malloc_count") }, - { STR_W_LEN("mem_malloc_ammount") }, + { STR_W_LEN("mem_malloc_amount") }, { STR_W_LEN("mem_calloc_count") }, - { STR_W_LEN("mem_calloc_ammount") }, + { STR_W_LEN("mem_calloc_amount") }, { STR_W_LEN("mem_realloc_count") }, - { STR_W_LEN("mem_realloc_ammount") }, + { STR_W_LEN("mem_realloc_amount") }, { STR_W_LEN("mem_free_count") }, + { STR_W_LEN("mem_free_amount") }, + { STR_W_LEN("mem_estrndup_count") }, + { STR_W_LEN("mem_strndup_count") }, + { STR_W_LEN("mem_estndup_count") }, + { STR_W_LEN("mem_strdup_count") }, { STR_W_LEN("proto_text_fetched_null") }, { STR_W_LEN("proto_text_fetched_bit") }, { STR_W_LEN("proto_text_fetched_tinyint") }, @@ -219,7 +225,8 @@ mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING /* {{{ _mysqlnd_get_client_stats */ -PHPAPI void _mysqlnd_get_client_stats(zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC) +PHPAPI void +_mysqlnd_get_client_stats(zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC) { MYSQLND_STATS stats, *stats_ptr = mysqlnd_global_stats; DBG_ENTER("_mysqlnd_get_client_stats"); diff --git a/ext/mysqlnd/mysqlnd_statistics.h b/ext/mysqlnd/mysqlnd_statistics.h index a3281b44f..3fffe5fb1 100644 --- a/ext/mysqlnd/mysqlnd_statistics.h +++ b/ext/mysqlnd/mysqlnd_statistics.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_statistics.h 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_statistics.h 298318 2010-04-22 13:03:44Z andrey $ */ #ifndef MYSQLND_STATISTICS_H #define MYSQLND_STATISTICS_H @@ -42,27 +42,34 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[]; #define MYSQLND_STATS_UNLOCK(stats) #endif +#ifndef MYSQLND_CORE_STATISTICS_TRIGGERS_DISABLED +#define MYSQLND_STAT_CALL_TRIGGER(s_array, statistic, val) \ + if ((s_array)->triggers[(statistic)] && (s_array)->in_trigger == FALSE) { \ + (s_array)->in_trigger = TRUE; \ + MYSQLND_STATS_UNLOCK((s_array)); \ + \ + (s_array)->triggers[(statistic)]((s_array), (statistic), (val) TSRMLS_CC); \ + \ + MYSQLND_STATS_LOCK((s_array)); \ + (s_array)->in_trigger = FALSE; \ + } +#else +#define MYSQLND_STAT_CALL_TRIGGER(s_array, statistic, val) +#endif /* MYSQLND_CORE_STATISTICS_TRIGGERS_DISABLED */ + #define MYSQLND_UPDATE_VALUE_AND_CALL_TRIGGER(stats, statistic, value) \ { \ - MYSQLND_STATS_LOCK(stats); \ + MYSQLND_STATS_LOCK(stats); \ (stats)->values[(statistic)] += (value); \ - if ((stats)->triggers[(statistic)] && (stats)->in_trigger == FALSE) { \ - (stats)->in_trigger = TRUE; \ - MYSQLND_STATS_UNLOCK(stats); \ - \ - (stats)->triggers[(statistic)]((stats), (statistic), (value) TSRMLS_CC); \ - \ - MYSQLND_STATS_LOCK(stats); \ - (stats)->in_trigger = FALSE; \ - } \ + MYSQLND_STAT_CALL_TRIGGER((stats), (statistic), (value)); \ MYSQLND_STATS_UNLOCK(_p_s); \ - } \ + } #define MYSQLND_DEC_STATISTIC(enabler, stats, statistic) \ { \ enum_mysqlnd_collected_stats _s = (statistic);\ MYSQLND_STATS * _p_s = (MYSQLND_STATS *) (stats); \ - if ((enabler) && _p_s && _s != _p_s->count) { \ + if ((enabler) && _p_s && _s != _p_s->count) { \ MYSQLND_UPDATE_VALUE_AND_CALL_TRIGGER(_p_s, _s, -1); \ }\ } @@ -71,7 +78,7 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[]; { \ enum_mysqlnd_collected_stats _s = (statistic);\ MYSQLND_STATS * _p_s = (MYSQLND_STATS *) (stats); \ - if ((enabler) && _p_s && _s != _p_s->count) { \ + if ((enabler) && _p_s && _s != _p_s->count) { \ MYSQLND_UPDATE_VALUE_AND_CALL_TRIGGER(_p_s, _s, 1); \ }\ } @@ -80,7 +87,7 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[]; { \ enum_mysqlnd_collected_stats _s = (statistic);\ MYSQLND_STATS * _p_s = (MYSQLND_STATS *) (stats); \ - if ((enabler) && _p_s && _s != _p_s->count) { \ + if ((enabler) && _p_s && _s != _p_s->count) { \ uint64_t v = (uint64_t) (value); \ MYSQLND_UPDATE_VALUE_AND_CALL_TRIGGER(_p_s, _s, v); \ }\ @@ -89,7 +96,7 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[]; #define MYSQLND_INC_STATISTIC_W_VALUE2(enabler, stats, statistic1, value1, statistic2, value2) \ { \ MYSQLND_STATS * _p_s = (MYSQLND_STATS *) (stats); \ - if ((enabler) && _p_s) { \ + if ((enabler) && _p_s) { \ uint64_t v1 = (uint64_t) (value1); \ uint64_t v2 = (uint64_t) (value2); \ enum_mysqlnd_collected_stats _s1 = (statistic1);\ @@ -102,7 +109,7 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[]; #define MYSQLND_INC_STATISTIC_W_VALUE3(enabler, stats, statistic1, value1, statistic2, value2, statistic3, value3) \ { \ MYSQLND_STATS * _p_s = (MYSQLND_STATS *) (stats); \ - if ((enabler) && _p_s) { \ + if ((enabler) && _p_s) { \ uint64_t v1 = (uint64_t) (value1); \ uint64_t v2 = (uint64_t) (value2); \ uint64_t v3 = (uint64_t) (value3); \ @@ -116,31 +123,45 @@ extern const MYSQLND_STRING mysqlnd_stats_values_names[]; } + +#ifndef MYSQLND_CORE_STATISTICS_DISABLED + #define MYSQLND_INC_GLOBAL_STATISTIC(statistic) \ - MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)) + MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)) #define MYSQLND_DEC_CONN_STATISTIC(conn_stats, statistic) \ - MYSQLND_DEC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)) + MYSQLND_DEC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)) #define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2, value2) \ - MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2)) + MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2)) #define MYSQLND_INC_CONN_STATISTIC(conn_stats, statistic) \ - MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)); \ - MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), (conn_stats), (statistic)); + MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic)); \ + MYSQLND_INC_STATISTIC(MYSQLND_G(collect_statistics), (conn_stats), (statistic)); #define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value) \ - MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic), (value)); \ - MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), (conn_stats), (statistic), (value)); + MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic), (value)); \ + MYSQLND_INC_STATISTIC_W_VALUE(MYSQLND_G(collect_statistics), (conn_stats), (statistic), (value)); #define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1, statistic2, value2) \ - MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2)); \ - MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2)); + MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2)); \ + MYSQLND_INC_STATISTIC_W_VALUE2(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2)); #define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1, statistic2, value2, statistic3, value3) \ - MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2), (statistic3), (value3)); \ - MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2), (statistic3), (value3)); + MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), mysqlnd_global_stats, (statistic1), (value1), (statistic2), (value2), (statistic3), (value3)); \ + MYSQLND_INC_STATISTIC_W_VALUE3(MYSQLND_G(collect_statistics), (conn_stats), (statistic1), (value1), (statistic2), (value2), (statistic3), (value3)); +#else + +#define MYSQLND_INC_GLOBAL_STATISTIC(statistic) +#define MYSQLND_DEC_CONN_STATISTIC(conn_stats, statistic) +#define MYSQLND_INC_GLOBAL_STATISTIC_W_VALUE2(statistic1, value1, statistic2, value2) +#define MYSQLND_INC_CONN_STATISTIC(conn_stats, statistic) +#define MYSQLND_INC_CONN_STATISTIC_W_VALUE(conn_stats, statistic, value) +#define MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn_stats, statistic1, value1, statistic2, value2) +#define MYSQLND_INC_CONN_STATISTIC_W_VALUE3(conn_stats, statistic1, value1, statistic2, value2, statistic3, value3) + +#endif /* MYSQLND_CORE_STATISTICS_DISABLED */ PHPAPI void mysqlnd_fill_stats_hash(const MYSQLND_STATS * const stats, const MYSQLND_STRING * names, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC); @@ -150,10 +171,8 @@ PHPAPI void mysqlnd_stats_end(MYSQLND_STATS * stats); PHPAPI mysqlnd_stat_trigger mysqlnd_stats_set_trigger(MYSQLND_STATS * const stats, enum_mysqlnd_collected_stats stat, mysqlnd_stat_trigger trigger TSRMLS_DC); PHPAPI mysqlnd_stat_trigger mysqlnd_stats_reset_triggers(MYSQLND_STATS * const stats TSRMLS_DC); - #endif /* MYSQLND_STATISTICS_H */ - /* * Local variables: * tab-width: 4 diff --git a/ext/mysqlnd/mysqlnd_structs.h b/ext/mysqlnd/mysqlnd_structs.h index 99f40169d..f229d9509 100644 --- a/ext/mysqlnd/mysqlnd_structs.h +++ b/ext/mysqlnd/mysqlnd_structs.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,11 +18,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_structs.h 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysqlnd_structs.h 300735 2010-06-24 19:52:13Z andrey $ */ #ifndef MYSQLND_STRUCTS_H #define MYSQLND_STRUCTS_H +#define MYSQLND_TYPEDEFED_METHODS + typedef struct st_mysqlnd_memory_pool MYSQLND_MEMORY_POOL; typedef struct st_mysqlnd_memory_pool_chunk MYSQLND_MEMORY_POOL_CHUNK; typedef struct st_mysqlnd_memory_pool_chunk_llist MYSQLND_MEMORY_POOL_CHUNK_LLIST; @@ -37,20 +39,17 @@ struct st_mysqlnd_memory_pool unsigned int arena_size; unsigned int free_size; - MYSQLND_MEMORY_POOL_CHUNK* free_chunk_list[MYSQLND_MEMORY_POOL_CHUNK_LIST_SIZE]; - unsigned int free_chunk_list_elements; - MYSQLND_MEMORY_POOL_CHUNK* (*get_chunk)(MYSQLND_MEMORY_POOL * pool, unsigned int size TSRMLS_DC); }; struct st_mysqlnd_memory_pool_chunk { uint64_t app; - MYSQLND_MEMORY_POOL *pool; + MYSQLND_MEMORY_POOL *pool; zend_uchar *ptr; unsigned int size; - void (*resize_chunk)(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size TSRMLS_DC); - void (*free_chunk)(MYSQLND_MEMORY_POOL_CHUNK * chunk, zend_bool cache_it TSRMLS_DC); + enum_func_status (*resize_chunk)(MYSQLND_MEMORY_POOL_CHUNK * chunk, unsigned int size TSRMLS_DC); + void (*free_chunk)(MYSQLND_MEMORY_POOL_CHUNK * chunk TSRMLS_DC); zend_bool from_pool; }; @@ -64,12 +63,12 @@ typedef struct st_mysqlnd_cmd_buffer typedef struct st_mysqlnd_field { - char *name; /* Name of column */ - char *org_name; /* Original column name, if an alias */ - char *table; /* Table of column if column was a field */ - char *org_table; /* Org table name, if table was an alias */ - char *db; /* Database for table */ - char *catalog; /* Catalog for table */ + const char *name; /* Name of column */ + const char *org_name; /* Original column name, if an alias */ + const char *table; /* Table of column if column was a field */ + const char *org_table; /* Org table name, if table was an alias */ + const char *db; /* Database for table */ + const char *catalog; /* Catalog for table */ char *def; /* Default value (set by mysql_list_fields) */ unsigned long length; /* Width of column (create length) */ unsigned long max_length; /* Max width for selected set */ @@ -89,7 +88,6 @@ typedef struct st_mysqlnd_field } MYSQLND_FIELD; - typedef struct st_mysqlnd_upsert_result { unsigned int warning_count; @@ -109,24 +107,24 @@ typedef struct st_mysqlnd_error_info typedef struct st_mysqlnd_infile_info { - php_stream *fd; - int error_no; - char error_msg[MYSQLND_ERRMSG_SIZE + 1]; - const char *filename; + php_stream *fd; + int error_no; + char error_msg[MYSQLND_ERRMSG_SIZE + 1]; + const char *filename; } MYSQLND_INFILE_INFO; /* character set information */ typedef struct st_mysqlnd_charset { - unsigned int nr; - const char *name; - const char *collation; - unsigned int char_minlen; - unsigned int char_maxlen; - const char *comment; - unsigned int (*mb_charlen)(unsigned int c); - unsigned int (*mb_valid)(const char *start, const char *end); + unsigned int nr; + const char *name; + const char *collation; + unsigned int char_minlen; + unsigned int char_maxlen; + const char *comment; + unsigned int (*mb_charlen)(unsigned int c); + unsigned int (*mb_valid)(const char *start, const char *end); } MYSQLND_CHARSET; @@ -146,20 +144,24 @@ typedef struct st_mysqlnd_options ulong flags; /* init commands - we need to send them to server directly after connect */ - unsigned int num_commands; - char **init_commands; + unsigned int num_commands; + char **init_commands; /* configuration file information */ char *cfg_file; char *cfg_section; - /* SSL information */ - char *ssl_key; - char *ssl_cert; - char *ssl_ca; - char *ssl_capath; - char *ssl_cipher; - zend_bool use_ssl; + /* + We need to keep these because otherwise st_mysqlnd_conn will be changed. + The ABI will be broken and the methods structure will be somewhere else + in the memory which can crash external code. Feel free to reuse these. + */ + char * unused1; + char * unused2; + char * unused3; + char * unused4; + char * unused5; + zend_bool unused6; char *charset_name; /* maximum allowed packet size for communication */ @@ -179,6 +181,15 @@ typedef struct st_mysqlnd_net_options unsigned int timeout_write; unsigned int net_read_buffer_size; + + /* SSL information */ + char *ssl_key; + char *ssl_cert; + char *ssl_ca; + char *ssl_capath; + char *ssl_cipher; + char *ssl_passphrase; + zend_bool ssl_verify_peer; } MYSQLND_NET_OPTIONS; @@ -187,6 +198,7 @@ typedef struct st_mysqlnd_net MYSQLND_NET; typedef struct st_mysqlnd_protocol MYSQLND_PROTOCOL; typedef struct st_mysqlnd_res MYSQLND_RES; typedef char** MYSQLND_ROW_C; /* return data as array of strings */ +typedef struct st_mysqlnd_stmt_data MYSQLND_STMT_DATA; typedef struct st_mysqlnd_stmt MYSQLND_STMT; typedef unsigned int MYSQLND_FIELD_OFFSET; @@ -215,7 +227,7 @@ typedef void (*mysqlnd_stat_trigger)(MYSQLND_STATS * stats, enum_mysqlnd_collect struct st_mysqlnd_stats { uint64_t *values; - mysqlnd_stat_trigger *triggers; + mysqlnd_stat_trigger *triggers; size_t count; zend_bool in_trigger; #ifdef ZTS @@ -236,18 +248,41 @@ typedef struct st_mysqlnd_read_buffer { } MYSQLND_READ_BUFFER; + +typedef enum_func_status (*func_mysqlnd_net__connect)(MYSQLND_NET * net, const char * const scheme, size_t scheme_len, zend_bool persistent, char **errstr, int * errcode TSRMLS_DC); +typedef size_t (*func_mysqlnd_net__send)(MYSQLND * const conn, char * const buf, size_t count TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_net__receive)(MYSQLND * conn, zend_uchar * buffer, size_t count TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_net__set_client_option)(MYSQLND_NET * const net, enum_mysqlnd_option option, const char * const value TSRMLS_DC); +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 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); +typedef enum_func_status (*func_mysqlnd_net__disable_ssl)(MYSQLND_NET * const net TSRMLS_DC); + + struct st_mysqlnd_net_methods { - enum_func_status (*connect)(MYSQLND_NET * net, const char * const scheme, size_t scheme_len, zend_bool persistent, char **errstr, int * errcode TSRMLS_DC); - size_t (*send)(MYSQLND * const conn, char * const buf, size_t count TSRMLS_DC); - size_t (*receive)(MYSQLND * conn, zend_uchar * buffer, size_t count TSRMLS_DC); - enum_func_status (*set_client_option)(MYSQLND_NET * const net, enum_mysqlnd_option option, const char * const value TSRMLS_DC); - enum_func_status (*network_read)(MYSQLND * conn, zend_uchar * buffer, size_t count TSRMLS_DC); - size_t (*network_write)(MYSQLND * const conn, const zend_uchar * const buf, size_t count TSRMLS_DC); - enum_func_status (*decode)(zend_uchar * uncompressed_data, size_t uncompressed_data_len, const zend_uchar * const compressed_data, size_t compressed_data_len TSRMLS_DC); - enum_func_status (*encode)(zend_uchar * compress_buffer, size_t compress_buffer_len, const zend_uchar * const uncompressed_data, size_t uncompressed_data_len TSRMLS_DC); - size_t (*consume_uneaten_data)(MYSQLND_NET * const net, enum php_mysqlnd_server_command cmd TSRMLS_DC); - void (*free_contents)(MYSQLND_NET * net TSRMLS_DC); + func_mysqlnd_net__connect connect; + func_mysqlnd_net__send send; + func_mysqlnd_net__receive receive; + func_mysqlnd_net__set_client_option set_client_option; + func_mysqlnd_net__network_read network_read; + func_mysqlnd_net__network_write network_write; + func_mysqlnd_net__decode decode; + func_mysqlnd_net__encode encode; + func_mysqlnd_net__consume_uneaten_data consume_uneaten_data; + func_mysqlnd_net__free_contents free_contents; + func_mysqlnd_net__enable_ssl enable_ssl; + func_mysqlnd_net__disable_ssl disable_ssl; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; @@ -264,188 +299,383 @@ struct st_mysqlnd_packet_stats; struct st_mysqlnd_packet_prepare_response; struct st_mysqlnd_packet_chg_user_resp; +typedef struct st_mysqlnd_packet_greet * (*func_mysqlnd_protocol__get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_auth * (*func_mysqlnd_protocol__get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_ok * (*func_mysqlnd_protocol__get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_command * (*func_mysqlnd_protocol__get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_eof * (*func_mysqlnd_protocol__get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_rset_header * (*func_mysqlnd_protocol__get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_res_field * (*func_mysqlnd_protocol__get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_row * (*func_mysqlnd_protocol__get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_stats * (*func_mysqlnd_protocol__get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_prepare_response *(*func_mysqlnd_protocol__get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); +typedef struct st_mysqlnd_packet_chg_user_resp*(*func_mysqlnd_protocol__get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); + struct st_mysqlnd_protocol_methods { - struct st_mysqlnd_packet_greet * (*get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_auth * (*get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_ok * (*get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_command * (*get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_eof * (*get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_rset_header * (*get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_res_field * (*get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_row * (*get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_stats * (*get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_prepare_response *(*get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); - struct st_mysqlnd_packet_chg_user_resp*(*get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC); + func_mysqlnd_protocol__get_greet_packet get_greet_packet; + func_mysqlnd_protocol__get_auth_packet get_auth_packet; + func_mysqlnd_protocol__get_ok_packet get_ok_packet; + func_mysqlnd_protocol__get_command_packet get_command_packet; + func_mysqlnd_protocol__get_eof_packet get_eof_packet; + func_mysqlnd_protocol__get_rset_header_packet get_rset_header_packet; + func_mysqlnd_protocol__get_result_field_packet get_result_field_packet; + func_mysqlnd_protocol__get_row_packet get_row_packet; + func_mysqlnd_protocol__get_stats_packet get_stats_packet; + func_mysqlnd_protocol__get_prepare_response_packet get_prepare_response_packet; + func_mysqlnd_protocol__get_change_user_response_packet get_change_user_response_packet; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; + +typedef enum_func_status (*func_mysqlnd_conn__init)(MYSQLND * conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__connect)(MYSQLND *conn, const char *host, const char * user, const char * passwd, unsigned int passwd_len, const char * db, unsigned int db_len, unsigned int port, const char * socket, unsigned int mysql_flags TSRMLS_DC); +typedef ulong (*func_mysqlnd_conn__escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__set_charset)(MYSQLND * const conn, const char * const charset TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__send_query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__reap_query)(MYSQLND *conn TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_conn__use_result)(MYSQLND * const conn TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_conn__store_result)(MYSQLND * const conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__next_result)(MYSQLND * const conn TSRMLS_DC); +typedef zend_bool (*func_mysqlnd_conn__more_results)(const MYSQLND * const conn TSRMLS_DC); + +typedef MYSQLND_STMT * (*func_mysqlnd_conn__stmt_init)(MYSQLND * const conn TSRMLS_DC); + +typedef enum_func_status (*func_mysqlnd_conn__shutdown_server)(MYSQLND * const conn, uint8_t level TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__refresh_server)(MYSQLND * const conn, uint8_t options TSRMLS_DC); + +typedef enum_func_status (*func_mysqlnd_conn__ping)(MYSQLND * const conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__kill_connection)(MYSQLND *conn, unsigned int pid TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__select_db)(MYSQLND * const conn, const char * const db, unsigned int db_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__server_dump_debug_information)(MYSQLND * const conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__change_user)(MYSQLND * const conn, const char * user, const char * passwd, const char * db, zend_bool silent TSRMLS_DC); + +typedef unsigned int (*func_mysqlnd_conn__get_error_no)(const MYSQLND * const conn TSRMLS_DC); +typedef const char * (*func_mysqlnd_conn__get_error_str)(const MYSQLND * const conn TSRMLS_DC); +typedef const char * (*func_mysqlnd_conn__get_sqlstate)(const MYSQLND * const conn TSRMLS_DC); +typedef uint64_t (*func_mysqlnd_conn__get_thread_id)(const MYSQLND * const conn TSRMLS_DC); +typedef void (*func_mysqlnd_conn__get_statistics)(const MYSQLND * const conn, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC); + +typedef unsigned long (*func_mysqlnd_conn__get_server_version)(const MYSQLND * const conn TSRMLS_DC); +typedef const char * (*func_mysqlnd_conn__get_server_information)(const MYSQLND * const conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__get_server_statistics)(MYSQLND *conn, char **message, unsigned int * message_len TSRMLS_DC); +typedef const char * (*func_mysqlnd_conn__get_host_information)(const MYSQLND * const conn TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_conn__get_protocol_information)(const MYSQLND * const conn TSRMLS_DC); +typedef const char * (*func_mysqlnd_conn__get_last_message)(const MYSQLND * const conn TSRMLS_DC); +typedef const char * (*func_mysqlnd_conn__charset_name)(const MYSQLND * const conn TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_conn__list_fields)(MYSQLND *conn, const char *table, const char *achtung_wild TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_conn__list_method)(MYSQLND *conn, const char *query, const char *achtung_wild, char *par1 TSRMLS_DC); + +typedef uint64_t (*func_mysqlnd_conn__get_last_insert_id)(const MYSQLND * const conn TSRMLS_DC); +typedef uint64_t (*func_mysqlnd_conn__get_affected_rows)(const MYSQLND * const conn TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_conn__get_warning_count)(const MYSQLND * const conn TSRMLS_DC); + +typedef unsigned int (*func_mysqlnd_conn__get_field_count)(const MYSQLND * const conn TSRMLS_DC); + +typedef enum_func_status (*func_mysqlnd_conn__set_server_option)(MYSQLND * const conn, enum_mysqlnd_server_option option TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__set_client_option)(MYSQLND * const conn, enum_mysqlnd_option option, const char * const value TSRMLS_DC); +typedef void (*func_mysqlnd_conn__free_contents)(MYSQLND *conn TSRMLS_DC); /* private */ +typedef void (*func_mysqlnd_conn__free_options)(MYSQLND * conn TSRMLS_DC); /* private */ +typedef enum_func_status (*func_mysqlnd_conn__close)(MYSQLND *conn, enum_connection_close_type close_type TSRMLS_DC); +typedef void (*func_mysqlnd_conn__dtor)(MYSQLND *conn TSRMLS_DC); /* private */ + +typedef enum_func_status (*func_mysqlnd_conn__query_read_result_set_header)(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC); + +typedef MYSQLND * (*func_mysqlnd_conn__get_reference)(MYSQLND * const conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__free_reference)(MYSQLND * const conn TSRMLS_DC); +typedef enum mysqlnd_connection_state (*func_mysqlnd_conn__get_state)(MYSQLND * const conn TSRMLS_DC); +typedef void (*func_mysqlnd_conn__set_state)(MYSQLND * const conn, enum mysqlnd_connection_state new_state TSRMLS_DC); + +typedef enum_func_status (*func_mysqlnd_conn__simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command, const char * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__simple_command_handle_response)(MYSQLND *conn, enum mysqlnd_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status TSRMLS_DC); + +typedef enum_func_status (*func_mysqlnd_conn__restart_psession)(MYSQLND *conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__end_psession)(MYSQLND *conn TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_conn__send_close)(MYSQLND * conn TSRMLS_DC); + +typedef void (*func_mysqlnd_conn__ssl_set)(MYSQLND * const conn, const char * key, const char * const cert, const char * const ca, const char * const capath, const char * const cipher TSRMLS_DC); + +typedef MYSQLND_RES * (*func_mysqlnd_conn__result_init)(unsigned int field_count, zend_bool persistent TSRMLS_DC); + struct st_mysqlnd_conn_methods { - void (*init)(MYSQLND * conn TSRMLS_DC); - enum_func_status (*connect)(MYSQLND *conn, const char *host, const char * user, const char * passwd, unsigned int passwd_len, const char * db, unsigned int db_len, unsigned int port, const char * socket, unsigned int mysql_flags TSRMLS_DC); - ulong (*escape_string)(const MYSQLND * const conn, char *newstr, const char *escapestr, size_t escapestr_len TSRMLS_DC); - enum_func_status (*set_charset)(MYSQLND * const conn, const char * const charset TSRMLS_DC); - enum_func_status (*query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); - enum_func_status (*send_query)(MYSQLND *conn, const char *query, unsigned int query_len TSRMLS_DC); - enum_func_status (*reap_query)(MYSQLND *conn TSRMLS_DC); - MYSQLND_RES * (*use_result)(MYSQLND * const conn TSRMLS_DC); - MYSQLND_RES * (*store_result)(MYSQLND * const conn TSRMLS_DC); - enum_func_status (*next_result)(MYSQLND * const conn TSRMLS_DC); - zend_bool (*more_results)(const MYSQLND * const conn TSRMLS_DC); - - MYSQLND_STMT * (*stmt_init)(MYSQLND * const conn TSRMLS_DC); - - enum_func_status (*shutdown_server)(MYSQLND * const conn, uint8_t level TSRMLS_DC); - enum_func_status (*refresh_server)(MYSQLND * const conn, uint8_t options TSRMLS_DC); - - enum_func_status (*ping)(MYSQLND * const conn TSRMLS_DC); - enum_func_status (*kill_connection)(MYSQLND *conn, unsigned int pid TSRMLS_DC); - enum_func_status (*select_db)(MYSQLND * const conn, const char * const db, unsigned int db_len TSRMLS_DC); - enum_func_status (*server_dump_debug_information)(MYSQLND * const conn TSRMLS_DC); - enum_func_status (*change_user)(MYSQLND * const conn, const char * user, const char * passwd, const char * db, zend_bool silent TSRMLS_DC); - - unsigned int (*get_error_no)(const MYSQLND * const conn TSRMLS_DC); - const char * (*get_error_str)(const MYSQLND * const conn TSRMLS_DC); - const char * (*get_sqlstate)(const MYSQLND * const conn TSRMLS_DC); - uint64_t (*get_thread_id)(const MYSQLND * const conn TSRMLS_DC); - void (*get_statistics)(const MYSQLND * const conn, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC); - - unsigned long (*get_server_version)(const MYSQLND * const conn TSRMLS_DC); - const char * (*get_server_information)(const MYSQLND * const conn TSRMLS_DC); - enum_func_status (*get_server_statistics)(MYSQLND *conn, char **message, unsigned int * message_len TSRMLS_DC); - const char * (*get_host_information)(const MYSQLND * const conn TSRMLS_DC); - unsigned int (*get_protocol_information)(const MYSQLND * const conn TSRMLS_DC); - const char * (*get_last_message)(const MYSQLND * const conn TSRMLS_DC); - const char * (*charset_name)(const MYSQLND * const conn TSRMLS_DC); - MYSQLND_RES * (*list_fields)(MYSQLND *conn, const char *table, const char *achtung_wild TSRMLS_DC); - MYSQLND_RES * (*list_method)(MYSQLND *conn, const char *query, const char *achtung_wild, char *par1 TSRMLS_DC); - - uint64_t (*get_last_insert_id)(const MYSQLND * const conn TSRMLS_DC); - uint64_t (*get_affected_rows)(const MYSQLND * const conn TSRMLS_DC); - unsigned int (*get_warning_count)(const MYSQLND * const conn TSRMLS_DC); - - unsigned int (*get_field_count)(const MYSQLND * const conn TSRMLS_DC); - - enum_func_status (*set_server_option)(MYSQLND * const conn, enum_mysqlnd_server_option option TSRMLS_DC); - enum_func_status (*set_client_option)(MYSQLND * const conn, enum_mysqlnd_option option, const char * const value TSRMLS_DC); - void (*free_contents)(MYSQLND *conn TSRMLS_DC); /* private */ - void (*free_options)(MYSQLND * conn TSRMLS_DC); /* private */ - enum_func_status (*close)(MYSQLND *conn, enum_connection_close_type close_type TSRMLS_DC); - void (*dtor)(MYSQLND *conn TSRMLS_DC); /* private */ - - enum_func_status (*query_read_result_set_header)(MYSQLND *conn, MYSQLND_STMT *stmt TSRMLS_DC); - - MYSQLND * (*get_reference)(MYSQLND * const conn TSRMLS_DC); - enum_func_status (*free_reference)(MYSQLND * const conn TSRMLS_DC); - enum mysqlnd_connection_state (*get_state)(MYSQLND * const conn TSRMLS_DC); - void (*set_state)(MYSQLND * const conn, enum mysqlnd_connection_state new_state TSRMLS_DC); - - enum_func_status (*simple_command)(MYSQLND *conn, enum php_mysqlnd_server_command command, const char * const arg, size_t arg_len, enum mysqlnd_packet_type ok_packet, zend_bool silent, zend_bool ignore_upsert_status TSRMLS_DC); - enum_func_status (*simple_command_handle_response)(MYSQLND *conn, enum mysqlnd_packet_type ok_packet, zend_bool silent, enum php_mysqlnd_server_command command, zend_bool ignore_upsert_status TSRMLS_DC); - - enum_func_status (*restart_psession)(MYSQLND *conn TSRMLS_DC); - enum_func_status (*end_psession)(MYSQLND *conn TSRMLS_DC); + func_mysqlnd_conn__init init; + func_mysqlnd_conn__connect connect; + func_mysqlnd_conn__escape_string escape_string; + func_mysqlnd_conn__set_charset set_charset; + func_mysqlnd_conn__query query; + func_mysqlnd_conn__send_query send_query; + func_mysqlnd_conn__reap_query reap_query; + func_mysqlnd_conn__use_result use_result; + func_mysqlnd_conn__store_result store_result; + func_mysqlnd_conn__next_result next_result; + func_mysqlnd_conn__more_results more_results; + + func_mysqlnd_conn__stmt_init stmt_init; + + func_mysqlnd_conn__shutdown_server shutdown_server; + func_mysqlnd_conn__refresh_server refresh_server; + + func_mysqlnd_conn__ping ping; + func_mysqlnd_conn__kill_connection kill_connection; + func_mysqlnd_conn__select_db select_db; + func_mysqlnd_conn__server_dump_debug_information server_dump_debug_information; + func_mysqlnd_conn__change_user change_user; + + func_mysqlnd_conn__get_error_no get_error_no; + func_mysqlnd_conn__get_error_str get_error_str; + func_mysqlnd_conn__get_sqlstate get_sqlstate; + func_mysqlnd_conn__get_thread_id get_thread_id; + func_mysqlnd_conn__get_statistics get_statistics; + + func_mysqlnd_conn__get_server_version get_server_version; + func_mysqlnd_conn__get_server_information get_server_information; + func_mysqlnd_conn__get_server_statistics get_server_statistics; + func_mysqlnd_conn__get_host_information get_host_information; + func_mysqlnd_conn__get_protocol_information get_protocol_information; + func_mysqlnd_conn__get_last_message get_last_message; + func_mysqlnd_conn__charset_name charset_name; + func_mysqlnd_conn__list_fields list_fields; + func_mysqlnd_conn__list_method list_method; + + func_mysqlnd_conn__get_last_insert_id get_last_insert_id; + func_mysqlnd_conn__get_affected_rows get_affected_rows; + func_mysqlnd_conn__get_warning_count get_warning_count; + + func_mysqlnd_conn__get_field_count get_field_count; + + func_mysqlnd_conn__set_server_option set_server_option; + func_mysqlnd_conn__set_client_option set_client_option; + func_mysqlnd_conn__free_contents free_contents; + func_mysqlnd_conn__free_options free_options; + func_mysqlnd_conn__close close; + func_mysqlnd_conn__dtor dtor; + + func_mysqlnd_conn__query_read_result_set_header query_read_result_set_header; + + func_mysqlnd_conn__get_reference get_reference; + func_mysqlnd_conn__free_reference free_reference; + func_mysqlnd_conn__get_state get_state; + func_mysqlnd_conn__set_state set_state; + + func_mysqlnd_conn__simple_command simple_command; + func_mysqlnd_conn__simple_command_handle_response simple_command_handle_response; + + func_mysqlnd_conn__restart_psession restart_psession; + func_mysqlnd_conn__end_psession end_psession; + func_mysqlnd_conn__send_close send_close; + + func_mysqlnd_conn__ssl_set ssl_set; + + func_mysqlnd_conn__result_init result_init; }; + + +typedef mysqlnd_fetch_row_func fetch_row; +typedef mysqlnd_fetch_row_func fetch_row_normal_buffered; /* private */ +typedef mysqlnd_fetch_row_func fetch_row_normal_unbuffered; /* private */ + +typedef MYSQLND_RES * (*func_mysqlnd_res__use_result)(MYSQLND_RES * const result, zend_bool ps_protocol TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_res__store_result)(MYSQLND_RES * result, MYSQLND * const conn, zend_bool ps TSRMLS_DC); +typedef void (*func_mysqlnd_res__fetch_into)(MYSQLND_RES *result, unsigned int flags, zval *return_value, enum_mysqlnd_extension ext TSRMLS_DC ZEND_FILE_LINE_DC); +typedef MYSQLND_ROW_C (*func_mysqlnd_res__fetch_row_c)(MYSQLND_RES *result TSRMLS_DC); +typedef void (*func_mysqlnd_res__fetch_all)(MYSQLND_RES *result, unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC); +typedef void (*func_mysqlnd_res__fetch_field_data)(MYSQLND_RES *result, unsigned int offset, zval *return_value TSRMLS_DC); +typedef uint64_t (*func_mysqlnd_res__num_rows)(const MYSQLND_RES * const result TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_res__num_fields)(const MYSQLND_RES * const result TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_res__skip_result)(MYSQLND_RES * const result TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_res__seek_data)(MYSQLND_RES * result, uint64_t row TSRMLS_DC); +typedef MYSQLND_FIELD_OFFSET (*func_mysqlnd_res__seek_field)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offset TSRMLS_DC); +typedef MYSQLND_FIELD_OFFSET (*func_mysqlnd_res__field_tell)(const MYSQLND_RES * const result TSRMLS_DC); +typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_field)(MYSQLND_RES * const result TSRMLS_DC); +typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC); +typedef const MYSQLND_FIELD *(*func_mysqlnd_res__fetch_fields)(MYSQLND_RES * const result TSRMLS_DC); + +typedef enum_func_status (*func_mysqlnd_res__read_result_metadata)(MYSQLND_RES *result, MYSQLND * conn TSRMLS_DC); +typedef unsigned long * (*func_mysqlnd_res__fetch_lengths)(MYSQLND_RES * const result TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_res__store_result_fetch_data)(MYSQLND * const conn, MYSQLND_RES *result, MYSQLND_RES_METADATA *meta, zend_bool binary_protocol, zend_bool to_cache TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_res__initialize_result_set_rest)(MYSQLND_RES * const result TSRMLS_DC); + +typedef void (*func_mysqlnd_res__free_result_buffers)(MYSQLND_RES * result TSRMLS_DC); /* private */ +typedef enum_func_status (*func_mysqlnd_res__free_result)(MYSQLND_RES * result, zend_bool implicit TSRMLS_DC); +typedef void (*func_mysqlnd_res__free_result_internal)(MYSQLND_RES *result TSRMLS_DC); +typedef void (*func_mysqlnd_res__free_result_contents)(MYSQLND_RES *result TSRMLS_DC); +typedef void (*func_mysqlnd_res__free_buffered_data)(MYSQLND_RES *result TSRMLS_DC); +typedef void (*func_mysqlnd_res__unbuffered_free_last_data)(MYSQLND_RES *result TSRMLS_DC); + + /* for decoding - binary or text protocol */ +typedef enum_func_status (*func_mysqlnd_res__row_decoder)(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, + unsigned int field_count, MYSQLND_FIELD *fields_metadata, + zend_bool persistent, + zend_bool as_unicode, zend_bool as_int_or_float, + MYSQLND_STATS * stats TSRMLS_DC); + +typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res__result_meta_init)(unsigned int field_count, zend_bool persistent TSRMLS_DC); + struct st_mysqlnd_res_methods { mysqlnd_fetch_row_func fetch_row; mysqlnd_fetch_row_func fetch_row_normal_buffered; /* private */ mysqlnd_fetch_row_func fetch_row_normal_unbuffered; /* private */ - MYSQLND_RES * (*use_result)(MYSQLND_RES * const result, zend_bool ps_protocol TSRMLS_DC); - MYSQLND_RES * (*store_result)(MYSQLND_RES * result, MYSQLND * const conn, zend_bool ps TSRMLS_DC); - void (*fetch_into)(MYSQLND_RES *result, unsigned int flags, zval *return_value, enum_mysqlnd_extension ext TSRMLS_DC ZEND_FILE_LINE_DC); - MYSQLND_ROW_C (*fetch_row_c)(MYSQLND_RES *result TSRMLS_DC); - void (*fetch_all)(MYSQLND_RES *result, unsigned int flags, zval *return_value TSRMLS_DC ZEND_FILE_LINE_DC); - void (*fetch_field_data)(MYSQLND_RES *result, unsigned int offset, zval *return_value TSRMLS_DC); - uint64_t (*num_rows)(const MYSQLND_RES * const result TSRMLS_DC); - unsigned int (*num_fields)(const MYSQLND_RES * const result TSRMLS_DC); - enum_func_status (*skip_result)(MYSQLND_RES * const result TSRMLS_DC); - enum_func_status (*seek_data)(MYSQLND_RES * result, uint64_t row TSRMLS_DC); - MYSQLND_FIELD_OFFSET (*seek_field)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET field_offset TSRMLS_DC); - MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES * const result TSRMLS_DC); - const MYSQLND_FIELD *(*fetch_field)(MYSQLND_RES * const result TSRMLS_DC); - const MYSQLND_FIELD *(*fetch_field_direct)(MYSQLND_RES * const result, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC); - const MYSQLND_FIELD *(*fetch_fields)(MYSQLND_RES * const result TSRMLS_DC); - - enum_func_status (*read_result_metadata)(MYSQLND_RES *result, MYSQLND * conn TSRMLS_DC); - unsigned long * (*fetch_lengths)(MYSQLND_RES * const result TSRMLS_DC); - enum_func_status (*store_result_fetch_data)(MYSQLND * const conn, MYSQLND_RES *result, MYSQLND_RES_METADATA *meta, zend_bool binary_protocol, zend_bool to_cache TSRMLS_DC); - void (*initialize_result_set_rest)(MYSQLND_RES * const result TSRMLS_DC); - - void (*free_result_buffers)(MYSQLND_RES * result TSRMLS_DC); /* private */ - enum_func_status (*free_result)(MYSQLND_RES * result, zend_bool implicit TSRMLS_DC); - void (*free_result_internal)(MYSQLND_RES *result TSRMLS_DC); - void (*free_result_contents)(MYSQLND_RES *result TSRMLS_DC); - void (*free_buffered_data)(MYSQLND_RES *result TSRMLS_DC); - void (*unbuffered_free_last_data)(MYSQLND_RES *result TSRMLS_DC); + func_mysqlnd_res__use_result use_result; + func_mysqlnd_res__store_result store_result; + func_mysqlnd_res__fetch_into fetch_into; + func_mysqlnd_res__fetch_row_c fetch_row_c; + func_mysqlnd_res__fetch_all fetch_all; + func_mysqlnd_res__fetch_field_data fetch_field_data; + func_mysqlnd_res__num_rows num_rows; + func_mysqlnd_res__num_fields num_fields; + func_mysqlnd_res__skip_result skip_result; + func_mysqlnd_res__seek_data seek_data; + func_mysqlnd_res__seek_field seek_field; + func_mysqlnd_res__field_tell field_tell; + func_mysqlnd_res__fetch_field fetch_field; + func_mysqlnd_res__fetch_field_direct fetch_field_direct; + func_mysqlnd_res__fetch_fields fetch_fields; + func_mysqlnd_res__read_result_metadata read_result_metadata; + func_mysqlnd_res__fetch_lengths fetch_lengths; + func_mysqlnd_res__store_result_fetch_data store_result_fetch_data; + func_mysqlnd_res__initialize_result_set_rest initialize_result_set_rest; + func_mysqlnd_res__free_result_buffers free_result_buffers; + func_mysqlnd_res__free_result free_result; + func_mysqlnd_res__free_result_internal free_result_internal; + func_mysqlnd_res__free_result_contents free_result_contents; + func_mysqlnd_res__free_buffered_data free_buffered_data; + func_mysqlnd_res__unbuffered_free_last_data unbuffered_free_last_data; /* for decoding - binary or text protocol */ - void (*row_decoder)(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, - unsigned int field_count, MYSQLND_FIELD *fields_metadata, - zend_bool persistent, - zend_bool as_unicode, zend_bool as_int_or_float, - MYSQLND_STATS * stats TSRMLS_DC); + func_mysqlnd_res__row_decoder row_decoder; + + func_mysqlnd_res__result_meta_init result_meta_init; + + void * unused1; + void * unused2; + void * unused3; + void * unused4; + void * unused5; }; +typedef const MYSQLND_FIELD * (*func_mysqlnd_res_meta__fetch_field)(MYSQLND_RES_METADATA * const meta TSRMLS_DC); +typedef const MYSQLND_FIELD * (*func_mysqlnd_res_meta__fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC); +typedef const MYSQLND_FIELD * (*func_mysqlnd_res_meta__fetch_fields)(MYSQLND_RES_METADATA * const meta TSRMLS_DC); +typedef MYSQLND_FIELD_OFFSET (*func_mysqlnd_res_meta__field_tell)(const MYSQLND_RES_METADATA * const meta TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_res_meta__read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND * conn TSRMLS_DC); +typedef MYSQLND_RES_METADATA * (*func_mysqlnd_res_meta__clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent TSRMLS_DC); +typedef void (*func_mysqlnd_res_meta__free_metadata)(MYSQLND_RES_METADATA * meta TSRMLS_DC); + struct st_mysqlnd_res_meta_methods { - const MYSQLND_FIELD * (*fetch_field)(MYSQLND_RES_METADATA * const meta TSRMLS_DC); - const MYSQLND_FIELD * (*fetch_field_direct)(const MYSQLND_RES_METADATA * const meta, MYSQLND_FIELD_OFFSET fieldnr TSRMLS_DC); - const MYSQLND_FIELD * (*fetch_fields)(MYSQLND_RES_METADATA * const meta TSRMLS_DC); - MYSQLND_FIELD_OFFSET (*field_tell)(const MYSQLND_RES_METADATA * const meta TSRMLS_DC); - enum_func_status (*read_metadata)(MYSQLND_RES_METADATA * const meta, MYSQLND *conn TSRMLS_DC); - MYSQLND_RES_METADATA * (*clone_metadata)(const MYSQLND_RES_METADATA * const meta, zend_bool persistent TSRMLS_DC); - void (*free_metadata)(MYSQLND_RES_METADATA *meta, zend_bool persistent TSRMLS_DC); + func_mysqlnd_res_meta__fetch_field fetch_field; + func_mysqlnd_res_meta__fetch_field_direct fetch_field_direct; + func_mysqlnd_res_meta__fetch_fields fetch_fields; + func_mysqlnd_res_meta__field_tell field_tell; + func_mysqlnd_res_meta__read_metadata read_metadata; + func_mysqlnd_res_meta__clone_metadata clone_metadata; + func_mysqlnd_res_meta__free_metadata free_metadata; }; +typedef enum_func_status (*func_mysqlnd_stmt__prepare)(MYSQLND_STMT * const stmt, const char * const query, unsigned int query_len TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__execute)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_stmt__use_result)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_stmt__store_result)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_stmt__get_result)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef zend_bool (*func_mysqlnd_stmt__more_results)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__next_result)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__free_result)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__seek_data)(const MYSQLND_STMT * const stmt, uint64_t row TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__reset)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__net_close)(MYSQLND_STMT * const stmt, zend_bool implicit TSRMLS_DC); /* private */ +typedef enum_func_status (*func_mysqlnd_stmt__dtor)(MYSQLND_STMT * const stmt, zend_bool implicit TSRMLS_DC); /* use this for mysqlnd_stmt_close */ +typedef enum_func_status (*func_mysqlnd_stmt__fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__bind_one_parameter)(MYSQLND_STMT * const stmt, unsigned int param_no, zval * const zv, zend_uchar type TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__refresh_bind_param)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__bind_result)(MYSQLND_STMT * const stmt, MYSQLND_RESULT_BIND * const result_bind TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__bind_one_result)(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__send_long_data)(MYSQLND_STMT * const stmt, unsigned int param_num, const char * const data, unsigned long length TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_stmt__get_parameter_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef MYSQLND_RES * (*func_mysqlnd_stmt__get_result_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef uint64_t (*func_mysqlnd_stmt__get_last_insert_id)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef uint64_t (*func_mysqlnd_stmt__get_affected_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef uint64_t (*func_mysqlnd_stmt__get_num_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_stmt__get_param_count)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_stmt__get_field_count)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_stmt__get_warning_count)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_stmt__get_error_no)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef const char * (*func_mysqlnd_stmt__get_error_str)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef const char * (*func_mysqlnd_stmt__get_sqlstate)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__get_attribute)(const MYSQLND_STMT * const stmt, enum mysqlnd_stmt_attr attr_type, void * const value TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__set_attribute)(MYSQLND_STMT * const stmt, enum mysqlnd_stmt_attr attr_type, const void * const value TSRMLS_DC); +typedef MYSQLND_PARAM_BIND *(*func_mysqlnd_stmt__alloc_param_bind)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef MYSQLND_RESULT_BIND*(*func_mysqlnd_stmt__alloc_result_bind)(MYSQLND_STMT * const stmt TSRMLS_DC); +typedef void (*func_mysqlnd_stmt__free_parameter_bind)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * TSRMLS_DC); +typedef void (*func_mysqlnd_stmt__free_result_bind)(MYSQLND_STMT * const stmt, MYSQLND_RESULT_BIND * TSRMLS_DC); +typedef unsigned int (*func_mysqlnd_stmt__server_status)(const MYSQLND_STMT * const stmt TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__generate_execute_request)(MYSQLND_STMT * const s, zend_uchar ** request, size_t *request_len, zend_bool * free_buffer TSRMLS_DC); +typedef enum_func_status (*func_mysqlnd_stmt__parse_execute_response)(MYSQLND_STMT * const s TSRMLS_DC); + struct st_mysqlnd_stmt_methods { - enum_func_status (*prepare)(MYSQLND_STMT * const stmt, const char * const query, unsigned int query_len TSRMLS_DC); - enum_func_status (*execute)(MYSQLND_STMT * const stmt TSRMLS_DC); - MYSQLND_RES * (*use_result)(MYSQLND_STMT * const stmt TSRMLS_DC); - MYSQLND_RES * (*store_result)(MYSQLND_STMT * const stmt TSRMLS_DC); - MYSQLND_RES * (*get_result)(MYSQLND_STMT * const stmt TSRMLS_DC); - zend_bool (*more_results)(const MYSQLND_STMT * const stmt TSRMLS_DC); - enum_func_status (*next_result)(MYSQLND_STMT * const stmt TSRMLS_DC); - enum_func_status (*free_result)(MYSQLND_STMT * const stmt TSRMLS_DC); - enum_func_status (*seek_data)(const MYSQLND_STMT * const stmt, uint64_t row TSRMLS_DC); - enum_func_status (*reset)(MYSQLND_STMT * const stmt TSRMLS_DC); - enum_func_status (*net_close)(MYSQLND_STMT * const stmt, zend_bool implicit TSRMLS_DC); /* private */ - enum_func_status (*dtor)(MYSQLND_STMT * const stmt, zend_bool implicit TSRMLS_DC); /* use this for mysqlnd_stmt_close */ - - enum_func_status (*fetch)(MYSQLND_STMT * const stmt, zend_bool * const fetched_anything TSRMLS_DC); - - enum_func_status (*bind_parameters)(MYSQLND_STMT * const stmt, MYSQLND_PARAM_BIND * const param_bind TSRMLS_DC); - enum_func_status (*bind_one_parameter)(MYSQLND_STMT * const stmt, unsigned int param_no, zval * const zv, zend_uchar type TSRMLS_DC); - enum_func_status (*refresh_bind_param)(MYSQLND_STMT * const stmt TSRMLS_DC); - void (*set_param_bind_dtor)(MYSQLND_STMT * const stmt, void (*param_bind_dtor)(MYSQLND_PARAM_BIND * TSRMLS_DC) TSRMLS_DC); - enum_func_status (*bind_result)(MYSQLND_STMT * const stmt, MYSQLND_RESULT_BIND * const result_bind TSRMLS_DC); - enum_func_status (*bind_one_result)(MYSQLND_STMT * const stmt, unsigned int param_no TSRMLS_DC); - void (*set_result_bind_dtor)(MYSQLND_STMT * const stmt, void (*result_bind_dtor)(MYSQLND_RESULT_BIND * TSRMLS_DC) TSRMLS_DC); - enum_func_status (*send_long_data)(MYSQLND_STMT * const stmt, unsigned int param_num, const char * const data, unsigned long length TSRMLS_DC); - MYSQLND_RES * (*get_parameter_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC); - MYSQLND_RES * (*get_result_metadata)(MYSQLND_STMT * const stmt TSRMLS_DC); - - uint64_t (*get_last_insert_id)(const MYSQLND_STMT * const stmt TSRMLS_DC); - uint64_t (*get_affected_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC); - uint64_t (*get_num_rows)(const MYSQLND_STMT * const stmt TSRMLS_DC); - - unsigned int (*get_param_count)(const MYSQLND_STMT * const stmt TSRMLS_DC); - unsigned int (*get_field_count)(const MYSQLND_STMT * const stmt TSRMLS_DC); - unsigned int (*get_warning_count)(const MYSQLND_STMT * const stmt TSRMLS_DC); - - unsigned int (*get_error_no)(const MYSQLND_STMT * const stmt TSRMLS_DC); - const char * (*get_error_str)(const MYSQLND_STMT * const stmt TSRMLS_DC); - const char * (*get_sqlstate)(const MYSQLND_STMT * const stmt TSRMLS_DC); - - enum_func_status (*get_attribute)(const MYSQLND_STMT * const stmt, enum mysqlnd_stmt_attr attr_type, void * const value TSRMLS_DC); - enum_func_status (*set_attribute)(MYSQLND_STMT * const stmt, enum mysqlnd_stmt_attr attr_type, const void * const value TSRMLS_DC); + func_mysqlnd_stmt__prepare prepare; + func_mysqlnd_stmt__execute execute; + func_mysqlnd_stmt__use_result use_result; + func_mysqlnd_stmt__store_result store_result; + func_mysqlnd_stmt__get_result get_result; + func_mysqlnd_stmt__more_results more_results; + func_mysqlnd_stmt__next_result next_result; + func_mysqlnd_stmt__free_result free_result; + func_mysqlnd_stmt__seek_data seek_data; + func_mysqlnd_stmt__reset reset; + func_mysqlnd_stmt__net_close net_close; + func_mysqlnd_stmt__dtor dtor; + func_mysqlnd_stmt__fetch fetch; + + func_mysqlnd_stmt__bind_parameters bind_parameters; + func_mysqlnd_stmt__bind_one_parameter bind_one_parameter; + func_mysqlnd_stmt__refresh_bind_param refresh_bind_param; + func_mysqlnd_stmt__bind_result bind_result; + func_mysqlnd_stmt__bind_one_result bind_one_result; + func_mysqlnd_stmt__send_long_data send_long_data; + func_mysqlnd_stmt__get_parameter_metadata get_parameter_metadata; + func_mysqlnd_stmt__get_result_metadata get_result_metadata; + + func_mysqlnd_stmt__get_last_insert_id get_last_insert_id; + func_mysqlnd_stmt__get_affected_rows get_affected_rows; + func_mysqlnd_stmt__get_num_rows get_num_rows; + + func_mysqlnd_stmt__get_param_count get_param_count; + func_mysqlnd_stmt__get_field_count get_field_count; + func_mysqlnd_stmt__get_warning_count get_warning_count; + + func_mysqlnd_stmt__get_error_no get_error_no; + func_mysqlnd_stmt__get_error_str get_error_str; + func_mysqlnd_stmt__get_sqlstate get_sqlstate; + + func_mysqlnd_stmt__get_attribute get_attribute; + func_mysqlnd_stmt__set_attribute set_attribute; + + func_mysqlnd_stmt__alloc_param_bind alloc_parameter_bind; + func_mysqlnd_stmt__alloc_result_bind alloc_result_bind; + + func_mysqlnd_stmt__free_parameter_bind free_parameter_bind; + func_mysqlnd_stmt__free_result_bind free_result_bind; + + func_mysqlnd_stmt__server_status get_server_status; + + func_mysqlnd_stmt__generate_execute_request generate_execute_request; + func_mysqlnd_stmt__parse_execute_response parse_execute_response; }; @@ -467,7 +697,7 @@ struct st_mysqlnd_net /* cmd buffer */ MYSQLND_CMD_BUFFER cmd_buffer; - MYSQLND_NET_OPTIONS options; + MYSQLND_NET_OPTIONS options; zend_bool persistent; }; @@ -503,7 +733,7 @@ struct st_mysqlnd_connection unsigned char *scramble; const MYSQLND_CHARSET *charset; const MYSQLND_CHARSET *greet_charset; - char *connect_or_select_db; + char *connect_or_select_db; unsigned int connect_or_select_db_len; MYSQLND_INFILE infile; unsigned int protocol_version; @@ -574,6 +804,7 @@ struct st_mysqlnd_result_metadata /* We need this to make fast allocs in rowp_read */ unsigned int bit_fields_count; size_t bit_fields_total_len; /* trailing \0 not counted */ + zend_bool persistent; struct st_mysqlnd_res_meta_methods *m; }; @@ -628,7 +859,8 @@ struct st_mysqlnd_res struct st_mysqlnd_packet_row * row_packet; - MYSQLND_MEMORY_POOL * result_set_memory_pool; + MYSQLND_MEMORY_POOL * result_set_memory_pool; + zend_bool persistent; }; @@ -646,7 +878,7 @@ struct st_mysqlnd_result_bind }; -struct st_mysqlnd_stmt +struct st_mysqlnd_stmt_data { MYSQLND *conn; unsigned long stmt_id; @@ -660,6 +892,7 @@ struct st_mysqlnd_stmt MYSQLND_PARAM_BIND *param_bind; MYSQLND_RESULT_BIND *result_bind; zend_bool result_zvals_separated_once; + zend_bool persistent; MYSQLND_UPSERT_STATUS upsert_status; @@ -673,11 +906,14 @@ struct st_mysqlnd_stmt MYSQLND_CMD_BUFFER execute_cmd_buffer; unsigned int execute_count;/* count how many times the stmt was executed */ +}; - void (*param_bind_dtor)(MYSQLND_PARAM_BIND * TSRMLS_DC); - void (*result_bind_dtor)(MYSQLND_RESULT_BIND * TSRMLS_DC); +struct st_mysqlnd_stmt +{ + MYSQLND_STMT_DATA * data; struct st_mysqlnd_stmt_methods *m; + zend_bool persistent; }; #endif /* MYSQLND_STRUCTS_H */ diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 571037788..ba31984d8 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -61,9 +61,16 @@ } +#define BAIL_IF_NO_MORE_DATA \ + if ((size_t)(p - begin) > packet->header.size) { \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Premature end of data (mysqlnd_wireprotocol.c:%u)", __LINE__); \ + goto premature_end; \ + } \ + + static const char *unknown_sqlstate= "HY000"; -char * const mysqlnd_empty_string = ""; +const char * const mysqlnd_empty_string = ""; /* Used in mysqlnd_debug.c */ const char mysqlnd_read_header_name[] = "mysqlnd_read_header"; @@ -120,7 +127,8 @@ static enum_mysqlnd_collected_stats packet_type_to_statistic_packet_count[PROT_L /* {{{ php_mysqlnd_net_field_length Get next field's length */ -unsigned long php_mysqlnd_net_field_length(zend_uchar **packet) +unsigned long +php_mysqlnd_net_field_length(zend_uchar **packet) { register zend_uchar *p= (zend_uchar *)*packet; @@ -149,7 +157,8 @@ unsigned long php_mysqlnd_net_field_length(zend_uchar **packet) /* {{{ php_mysqlnd_net_field_length_ll Get next field's length */ -uint64_t php_mysqlnd_net_field_length_ll(zend_uchar **packet) +uint64_t +php_mysqlnd_net_field_length_ll(zend_uchar **packet) { register zend_uchar *p= (zend_uchar *)*packet; @@ -177,7 +186,8 @@ uint64_t php_mysqlnd_net_field_length_ll(zend_uchar **packet) /* {{{ php_mysqlnd_net_store_length */ -zend_uchar *php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length) +zend_uchar * +php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length) { if (length < (uint64_t) L64(251)) { *packet = (zend_uchar) length; @@ -213,21 +223,31 @@ php_mysqlnd_read_error_from_line(zend_uchar *buf, size_t buf_len, DBG_ENTER("php_mysqlnd_read_error_from_line"); + *error_no = CR_UNKNOWN_ERROR; + memcpy(sqlstate, unknown_sqlstate, MYSQLND_SQLSTATE_LENGTH); + if (buf_len > 2) { *error_no = uint2korr(p); p+= 2; - /* sqlstate is following */ + /* + sqlstate is following. No need to check for buf_left_len as we checked > 2 above, + if it was >=2 then we would need a check + */ if (*p == '#') { - memcpy(sqlstate, ++p, MYSQLND_SQLSTATE_LENGTH); - p+= MYSQLND_SQLSTATE_LENGTH; + ++p; + if ((buf_len - (p - buf)) >= MYSQLND_SQLSTATE_LENGTH) { + memcpy(sqlstate, p, MYSQLND_SQLSTATE_LENGTH); + p+= MYSQLND_SQLSTATE_LENGTH; + } else { + goto end; + } + } + if ((buf_len - (p - buf)) > 0) { + error_msg_len = MIN((buf_len - (p - buf)), error_buf_len - 1); + memcpy(error, p, error_msg_len); } - error_msg_len = buf_len - (p - buf); - error_msg_len = MIN(error_msg_len, error_buf_len - 1); - memcpy(error, p, error_msg_len); - } else { - *error_no = CR_UNKNOWN_ERROR; - memcpy(sqlstate, unknown_sqlstate, MYSQLND_SQLSTATE_LENGTH); } +end: sqlstate[MYSQLND_SQLSTATE_LENGTH] = '\0'; error[error_msg_len]= '\0'; @@ -244,7 +264,7 @@ mysqlnd_read_header(MYSQLND * conn, MYSQLND_PACKET_HEADER * header TSRMLS_DC) zend_uchar buffer[MYSQLND_HEADER_SIZE]; DBG_ENTER("mysqlnd_read_header_name"); - DBG_INF_FMT("compressed=%d conn_id=%u", net->compressed, conn->thread_id); + DBG_INF_FMT("compressed=%u conn_id=%u", net->compressed, conn->thread_id); if (FAIL == net->m.receive(conn, buffer, MYSQLND_HEADER_SIZE TSRMLS_CC)) { DBG_RETURN(FAIL); } @@ -253,7 +273,7 @@ mysqlnd_read_header(MYSQLND * conn, MYSQLND_PACKET_HEADER * header TSRMLS_DC) header->packet_no = uint1korr(buffer + 3); #ifdef MYSQLND_DUMP_HEADER_N_BODY - DBG_INF_FMT("HEADER: prot_packet_no=%d size=%3d", header->packet_no, header->size); + DBG_INF_FMT("HEADER: prot_packet_no=%u size=%3u", header->packet_no, header->size); #endif MYSQLND_INC_CONN_STATISTIC_W_VALUE2(conn->stats, STAT_PROTOCOL_OVERHEAD_IN, MYSQLND_HEADER_SIZE, @@ -269,10 +289,10 @@ mysqlnd_read_header(MYSQLND * conn, MYSQLND_PACKET_HEADER * header TSRMLS_DC) DBG_RETURN(PASS); } - DBG_ERR_FMT("Logical link: packets out of order. Expected %d received %d. Packet size=%d", + DBG_ERR_FMT("Logical link: packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC, net->packet_no, header->packet_no, header->size); - php_error(E_WARNING, "Packets out of order. Expected %d received %d. Packet size="MYSQLND_SZ_T_SPEC, + php_error(E_WARNING, "Packets out of order. Expected %u received %u. Packet size="MYSQLND_SZ_T_SPEC, net->packet_no, header->packet_no, header->size); DBG_RETURN(FAIL); } @@ -291,9 +311,11 @@ php_mysqlnd_greet_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_ENTER("php_mysqlnd_greet_read"); PACKET_READ_HEADER_AND_BODY(packet, conn, buf, sizeof(buf), "greeting", PROT_GREET_PACKET); + BAIL_IF_NO_MORE_DATA; packet->protocol_version = uint1korr(p); p++; + BAIL_IF_NO_MORE_DATA; if (ERROR_MARKER == packet->protocol_version) { php_mysqlnd_read_error_from_line(p, packet->header.size - 1, @@ -313,29 +335,37 @@ php_mysqlnd_greet_read(void *_packet, MYSQLND *conn TSRMLS_DC) packet->server_version = estrdup((char *)p); p+= strlen(packet->server_version) + 1; /* eat the '\0' */ + BAIL_IF_NO_MORE_DATA; packet->thread_id = uint4korr(p); p+=4; + BAIL_IF_NO_MORE_DATA; memcpy(packet->scramble_buf, p, SCRAMBLE_LENGTH_323); p+= 8; + BAIL_IF_NO_MORE_DATA; /* pad1 */ p++; + BAIL_IF_NO_MORE_DATA; packet->server_capabilities = uint2korr(p); p+= 2; + BAIL_IF_NO_MORE_DATA; packet->charset_no = uint1korr(p); p++; + BAIL_IF_NO_MORE_DATA; packet->server_status = uint2korr(p); p+= 2; + BAIL_IF_NO_MORE_DATA; /* pad2 */ p+= 13; + BAIL_IF_NO_MORE_DATA; - if (p - buf < packet->header.size) { + if ((size_t) (p - buf) < packet->header.size) { /* scramble_buf is split into two parts */ memcpy(packet->scramble_buf + SCRAMBLE_LENGTH_323, p, SCRAMBLE_LENGTH - SCRAMBLE_LENGTH_323); @@ -343,19 +373,18 @@ php_mysqlnd_greet_read(void *_packet, MYSQLND *conn TSRMLS_DC) packet->pre41 = TRUE; } - DBG_INF_FMT("proto=%d server=%s thread_id=%ld", + DBG_INF_FMT("proto=%u server=%s thread_id=%u", packet->protocol_version, packet->server_version, packet->thread_id); - DBG_INF_FMT("server_capabilities=%d charset_no=%d server_status=%d", + DBG_INF_FMT("server_capabilities=%u charset_no=%u server_status=%i", packet->server_capabilities, packet->charset_no, packet->server_status); - if (p - begin > packet->header.size) { - DBG_ERR_FMT("GREET packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", - p - begin - packet->header.size); - } - DBG_RETURN(PASS); +premature_end: + DBG_ERR_FMT("GREET packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", + p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ @@ -366,24 +395,19 @@ void php_mysqlnd_greet_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { MYSQLND_PACKET_GREET *p= (MYSQLND_PACKET_GREET *) _packet; if (p->server_version) { - mnd_efree(p->server_version); + efree(p->server_version); p->server_version = NULL; } if (!alloca) { - mnd_efree(p); + mnd_pefree(p, p->header.persistent); } } /* }}} */ -#define MYSQLND_CAPABILITIES (CLIENT_LONG_PASSWORD | CLIENT_LONG_FLAG | CLIENT_TRANSACTIONS | \ - CLIENT_PROTOCOL_41 | CLIENT_SECURE_CONNECTION | \ - CLIENT_MULTI_RESULTS) - - /* {{{ php_mysqlnd_crypt */ -static -void php_mysqlnd_crypt(zend_uchar *buffer, const zend_uchar *s1, const zend_uchar *s2, size_t len) +static void +php_mysqlnd_crypt(zend_uchar *buffer, const zend_uchar *s1, const zend_uchar *s2, size_t len) { const zend_uchar *s1_end = s1 + len; while (s1 < s1_end) { @@ -394,8 +418,7 @@ void php_mysqlnd_crypt(zend_uchar *buffer, const zend_uchar *s1, const zend_ucha /* {{{ php_mysqlnd_scramble */ -void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, - const zend_uchar * const password) +void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const scramble, const zend_uchar * const password) { PHP_SHA1_CTX context; zend_uchar sha1[SHA1_MAX_LENGTH]; @@ -424,27 +447,19 @@ void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * const sc /* }}} */ +#define AUTH_WRITE_BUFFER_LEN (MYSQLND_HEADER_SIZE + MYSQLND_MAX_ALLOWED_USER_LEN + SHA1_MAX_LENGTH + MYSQLND_MAX_ALLOWED_DB_LEN + 1 + 128) + /* {{{ php_mysqlnd_auth_write */ static -size_t php_mysqlnd_auth_write(void *_packet, MYSQLND *conn TSRMLS_DC) +size_t php_mysqlnd_auth_write(void *_packet, MYSQLND * conn TSRMLS_DC) { - char buffer[1024]; + char buffer[AUTH_WRITE_BUFFER_LEN]; register char *p= buffer + MYSQLND_HEADER_SIZE; /* start after the header */ int len; register MYSQLND_PACKET_AUTH *packet= (MYSQLND_PACKET_AUTH *) _packet; DBG_ENTER("php_mysqlnd_auth_write"); - packet->client_flags |= MYSQLND_CAPABILITIES; - - if (packet->db) { - packet->client_flags |= CLIENT_CONNECT_WITH_DB; - } - - if (PG(open_basedir) && strlen(PG(open_basedir))) { - packet->client_flags ^= CLIENT_LOCAL_FILES; - } - int4store(p, packet->client_flags); p+= 4; @@ -457,31 +472,34 @@ size_t php_mysqlnd_auth_write(void *_packet, MYSQLND *conn TSRMLS_DC) memset(p, 0, 23); /* filler */ p+= 23; - len= strlen(packet->user); - memcpy(p, packet->user, len); - p+= len; - *p++ = '\0'; - - /* copy scrambled pass*/ - if (packet->password && packet->password[0]) { - /* In 4.1 we use CLIENT_SECURE_CONNECTION and thus the len of the buf should be passed */ - int1store(p, 20); - p++; - php_mysqlnd_scramble((zend_uchar*)p, packet->server_scramble_buf, (zend_uchar*)packet->password); - p+= 20; - } else { - /* Zero length */ - int1store(p, 0); - p++; - } + if (!packet->send_half_packet) { + len = MIN(strlen(packet->user), MYSQLND_MAX_ALLOWED_USER_LEN); + memcpy(p, packet->user, len); + p+= len; + *p++ = '\0'; + + /* copy scrambled pass*/ + if (packet->password && packet->password[0]) { + /* In 4.1 we use CLIENT_SECURE_CONNECTION and thus the len of the buf should be passed */ + int1store(p, SHA1_MAX_LENGTH); + p++; + php_mysqlnd_scramble((zend_uchar*)p, packet->server_scramble_buf, (zend_uchar*)packet->password); + p+= SHA1_MAX_LENGTH; + } else { + /* Zero length */ + int1store(p, 0); + p++; + } - if (packet->db) { - memcpy(p, packet->db, packet->db_len); - p+= packet->db_len; - *p++= '\0'; + if (packet->db) { + size_t real_db_len = MIN(MYSQLND_MAX_ALLOWED_DB_LEN, packet->db_len); + memcpy(p, packet->db, real_db_len); + p+= real_db_len; + *p++= '\0'; + } + /* Handle CLIENT_CONNECT_WITH_DB */ + /* no \0 for no DB */ } - /* Handle CLIENT_CONNECT_WITH_DB */ - /* no \0 for no DB */ DBG_RETURN(conn->net->m.send(conn, buffer, p - buffer - MYSQLND_HEADER_SIZE TSRMLS_CC)); } @@ -493,7 +511,8 @@ static void php_mysqlnd_auth_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { if (!alloca) { - mnd_pefree((MYSQLND_PACKET_AUTH *) _packet, ((MYSQLND_PACKET_AUTH *)_packet)->header.persistent); + MYSQLND_PACKET_AUTH * p = (MYSQLND_PACKET_AUTH *) _packet; + mnd_pefree(p, p->header.persistent); } } /* }}} */ @@ -516,10 +535,12 @@ php_mysqlnd_ok_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_ENTER("php_mysqlnd_ok_read"); PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "OK", PROT_OK_PACKET); + BAIL_IF_NO_MORE_DATA; /* Should be always 0x0 or ERROR_MARKER for error */ packet->field_count = uint1korr(p); p++; + BAIL_IF_NO_MORE_DATA; if (ERROR_MARKER == packet->field_count) { php_mysqlnd_read_error_from_line(p, packet->header.size - 1, @@ -530,40 +551,47 @@ php_mysqlnd_ok_read(void *_packet, MYSQLND *conn TSRMLS_DC) } /* Everything was fine! */ packet->affected_rows = php_mysqlnd_net_field_length_ll(&p); + BAIL_IF_NO_MORE_DATA; + packet->last_insert_id = php_mysqlnd_net_field_length_ll(&p); + BAIL_IF_NO_MORE_DATA; packet->server_status = uint2korr(p); p+= 2; + BAIL_IF_NO_MORE_DATA; packet->warning_count = uint2korr(p); p+= 2; + BAIL_IF_NO_MORE_DATA; /* There is a message */ - if (packet->header.size > p - buf && (i = php_mysqlnd_net_field_length(&p))) { - packet->message = estrndup((char *)p, MIN(i, buf_len - (p - begin))); - packet->message_len = i; + if (packet->header.size > (size_t) (p - buf) && (i = php_mysqlnd_net_field_length(&p))) { + packet->message_len = MIN(i, buf_len - (p - begin)); + packet->message = mnd_pestrndup((char *)p, packet->message_len, FALSE); } else { packet->message = NULL; + packet->message_len = 0; } - DBG_INF_FMT("OK packet: aff_rows=%lld last_ins_id=%ld server_status=%d warnings=%d", + DBG_INF_FMT("OK packet: aff_rows=%lld last_ins_id=%ld server_status=%u warnings=%u", packet->affected_rows, packet->last_insert_id, packet->server_status, packet->warning_count); - if (p - begin > packet->header.size) { - DBG_ERR_FMT("OK packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "OK packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", - p - begin - packet->header.size); - } + BAIL_IF_NO_MORE_DATA; DBG_RETURN(PASS); +premature_end: + DBG_ERR_FMT("OK packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "OK packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", + p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ /* {{{ php_mysqlnd_ok_free_mem */ -static -void php_mysqlnd_ok_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) +static void +php_mysqlnd_ok_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { MYSQLND_PACKET_OK *p= (MYSQLND_PACKET_OK *) _packet; if (p->message) { @@ -596,10 +624,12 @@ php_mysqlnd_eof_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_ENTER("php_mysqlnd_eof_read"); PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "EOF", PROT_EOF_PACKET); + BAIL_IF_NO_MORE_DATA; /* Should be always EODATA_MARKER */ packet->field_count = uint1korr(p); p++; + BAIL_IF_NO_MORE_DATA; if (ERROR_MARKER == packet->field_count) { php_mysqlnd_read_error_from_line(p, packet->header.size - 1, @@ -617,23 +647,27 @@ php_mysqlnd_eof_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (packet->header.size > 1) { packet->warning_count = uint2korr(p); p+= 2; + BAIL_IF_NO_MORE_DATA; + packet->server_status = uint2korr(p); p+= 2; + BAIL_IF_NO_MORE_DATA; } else { packet->warning_count = 0; packet->server_status = 0; } - if (p - begin > packet->header.size) { - DBG_ERR_FMT("EOF packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "EOF packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", - p - begin - packet->header.size); - } + BAIL_IF_NO_MORE_DATA; - DBG_INF_FMT("EOF packet: fields=%d status=%d warnings=%d", + DBG_INF_FMT("EOF packet: fields=%u status=%u warnings=%u", packet->field_count, packet->server_status, packet->warning_count); DBG_RETURN(PASS); +premature_end: + DBG_ERR_FMT("EOF packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "EOF packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", + p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ @@ -656,7 +690,7 @@ size_t php_mysqlnd_cmd_write(void *_packet, MYSQLND *conn TSRMLS_DC) MYSQLND_PACKET_COMMAND *packet= (MYSQLND_PACKET_COMMAND *) _packet; MYSQLND_NET *net = conn->net; unsigned int error_reporting = EG(error_reporting); - size_t written; + size_t written = 0; DBG_ENTER("php_mysqlnd_cmd_write"); /* @@ -685,6 +719,9 @@ size_t php_mysqlnd_cmd_write(void *_packet, MYSQLND *conn TSRMLS_DC) size_t tmp_len = packet->arg_len + 1 + MYSQLND_HEADER_SIZE, ret; zend_uchar *tmp, *p; tmp = (tmp_len > net->cmd_buffer.length)? mnd_emalloc(tmp_len):net->cmd_buffer.buffer; + if (!tmp) { + goto end; + } p = tmp + MYSQLND_HEADER_SIZE; /* skip the header */ int1store(p, packet->command); @@ -699,6 +736,7 @@ size_t php_mysqlnd_cmd_write(void *_packet, MYSQLND *conn TSRMLS_DC) } written = ret; } +end: if (error_reporting) { /* restore error reporting */ EG(error_reporting) = error_reporting; @@ -713,7 +751,8 @@ static void php_mysqlnd_cmd_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { if (!alloca) { - mnd_pefree(_packet, ((MYSQLND_PACKET_COMMAND *)_packet)->header.persistent); + MYSQLND_PACKET_COMMAND * p = (MYSQLND_PACKET_COMMAND *) _packet; + mnd_pefree(p, p->header.persistent); } } /* }}} */ @@ -723,6 +762,7 @@ void php_mysqlnd_cmd_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) static enum_func_status php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC) { + enum_func_status ret = PASS; size_t buf_len = conn->net->cmd_buffer.length; zend_uchar *buf = (zend_uchar *) conn->net->cmd_buffer.buffer; zend_uchar *p = buf; @@ -733,6 +773,7 @@ php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_ENTER("php_mysqlnd_rset_header_read"); PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "resultset header", PROT_RSET_HEADER_PACKET); + BAIL_IF_NO_MORE_DATA; /* Don't increment. First byte is ERROR_MARKER on error, but otherwise is starting byte @@ -741,6 +782,7 @@ php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (ERROR_MARKER == *p) { /* Error */ p++; + BAIL_IF_NO_MORE_DATA; php_mysqlnd_read_error_from_line(p, packet->header.size - 1, packet->error_info.error, sizeof(packet->error_info.error), &packet->error_info.error_no, packet->error_info.sqlstate @@ -748,36 +790,58 @@ php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_RETURN(PASS); } - packet->field_count= php_mysqlnd_net_field_length(&p); + packet->field_count = php_mysqlnd_net_field_length(&p); + BAIL_IF_NO_MORE_DATA; + switch (packet->field_count) { case MYSQLND_NULL_LENGTH: DBG_INF("LOAD LOCAL"); /* First byte in the packet is the field count. Thus, the name is size - 1. And we add 1 for a trailing \0. + Because we have BAIL_IF_NO_MORE_DATA before the switch, we are guaranteed + that packet->header.size is > 0. Which means that len can't underflow, that + would lead to 0 byte allocation but 2^32 or 2^64 bytes copied. */ len = packet->header.size - 1; packet->info_or_local_file = mnd_emalloc(len + 1); - memcpy(packet->info_or_local_file, p, len); - packet->info_or_local_file[len] = '\0'; - packet->info_or_local_file_len = len; + if (packet->info_or_local_file) { + memcpy(packet->info_or_local_file, p, len); + packet->info_or_local_file[len] = '\0'; + packet->info_or_local_file_len = len; + } else { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + } break; case 0x00: DBG_INF("UPSERT"); packet->affected_rows = php_mysqlnd_net_field_length_ll(&p); - packet->last_insert_id= php_mysqlnd_net_field_length_ll(&p); + BAIL_IF_NO_MORE_DATA; + + packet->last_insert_id = php_mysqlnd_net_field_length_ll(&p); + BAIL_IF_NO_MORE_DATA; + packet->server_status = uint2korr(p); p+=2; + BAIL_IF_NO_MORE_DATA; + packet->warning_count = uint2korr(p); p+=2; + BAIL_IF_NO_MORE_DATA; /* Check for additional textual data */ - if (packet->header.size > (p - buf) && (len = php_mysqlnd_net_field_length(&p))) { + if (packet->header.size > (size_t) (p - buf) && (len = php_mysqlnd_net_field_length(&p))) { packet->info_or_local_file = mnd_emalloc(len + 1); - memcpy(packet->info_or_local_file, p, len); - packet->info_or_local_file[len] = '\0'; - packet->info_or_local_file_len = len; + if (packet->info_or_local_file) { + memcpy(packet->info_or_local_file, p, len); + packet->info_or_local_file[len] = '\0'; + packet->info_or_local_file_len = len; + } else { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + } } - DBG_INF_FMT("affected_rows=%llu last_insert_id=%llu server_status=%d warning_count=%d", + DBG_INF_FMT("affected_rows=%llu last_insert_id=%llu server_status=%u warning_count=%u", packet->affected_rows, packet->last_insert_id, packet->server_status, packet->warning_count); break; @@ -786,13 +850,14 @@ php_mysqlnd_rset_header_read(void *_packet, MYSQLND *conn TSRMLS_DC) /* Result set */ break; } - if (p - begin > packet->header.size) { - DBG_ERR_FMT("RSET_HEADER packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "GREET packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", - p - begin - packet->header.size); - } + BAIL_IF_NO_MORE_DATA; - DBG_RETURN(PASS); + DBG_RETURN(ret); +premature_end: + DBG_ERR_FMT("RSET_HEADER packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "RSET_HEADER packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", + p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ @@ -853,14 +918,17 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (packet->skip_parsing) { DBG_RETURN(PASS); } + + BAIL_IF_NO_MORE_DATA; if (ERROR_MARKER == *p) { /* Error */ p++; + BAIL_IF_NO_MORE_DATA; php_mysqlnd_read_error_from_line(p, packet->header.size - 1, packet->error_info.error, sizeof(packet->error_info.error), &packet->error_info.error_no, packet->error_info.sqlstate TSRMLS_CC); - DBG_ERR_FMT("Server error : (%d) %s", packet->error_info.error_no, packet->error_info.error); + DBG_ERR_FMT("Server error : (%u) %s", packet->error_info.error_no, packet->error_info.error); DBG_RETURN(PASS); } else if (EODATA_MARKER == *p && packet->header.size < 8) { /* Premature EOF. That should be COM_FIELD_LIST */ @@ -873,42 +941,51 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) for (i = 0; i < field_count; i += 2) { len = php_mysqlnd_net_field_length(&p); + BAIL_IF_NO_MORE_DATA; switch ((len)) { case 0: - *(char **)(((char*)meta) + rset_field_offsets[i]) = mysqlnd_empty_string; + *(const char **)(((char*)meta) + rset_field_offsets[i]) = mysqlnd_empty_string; *(unsigned int *)(((char*)meta) + rset_field_offsets[i+1]) = 0; break; case MYSQLND_NULL_LENGTH: goto faulty_or_fake; default: - *(char **)(((char *)meta) + rset_field_offsets[i]) = (char *)p; + *(const char **)(((char *)meta) + rset_field_offsets[i]) = (const char *)p; *(unsigned int *)(((char*)meta) + rset_field_offsets[i+1]) = len; p += len; total_len += len + 1; break; } + BAIL_IF_NO_MORE_DATA; } /* 1 byte filler */ p++; + BAIL_IF_NO_MORE_DATA; meta->charsetnr = uint2korr(p); p += 2; + BAIL_IF_NO_MORE_DATA; meta->length = uint4korr(p); p += 4; + BAIL_IF_NO_MORE_DATA; meta->type = uint1korr(p); p += 1; + BAIL_IF_NO_MORE_DATA; meta->flags = uint2korr(p); p += 2; + BAIL_IF_NO_MORE_DATA; meta->decimals = uint2korr(p); p += 1; + BAIL_IF_NO_MORE_DATA; /* 2 byte filler */ p +=2; + BAIL_IF_NO_MORE_DATA; /* Should we set NUM_FLAG (libmysql does it) ? */ if ( @@ -925,25 +1002,30 @@ php_mysqlnd_rset_field_read(void *_packet, MYSQLND *conn TSRMLS_DC) NULL_LENGTH (0xFB) comes from COM_FIELD_LIST when the default value is NULL. Otherwise the string is length encoded. */ - if (packet->header.size > (p - buf) && + if (packet->header.size > (size_t) (p - buf) && (len = php_mysqlnd_net_field_length(&p)) && len != MYSQLND_NULL_LENGTH) { - DBG_INF_FMT("Def found, length %lu", len); - meta->def = mnd_emalloc(len + 1); + BAIL_IF_NO_MORE_DATA; + DBG_INF_FMT("Def found, length %lu, persistent=%u", len, packet->persistent_alloc); + meta->def = mnd_pemalloc(len + 1, packet->persistent_alloc); + if (!meta->def) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); + } memcpy(meta->def, p, len); meta->def[len] = '\0'; meta->def_length = len; p += len; } - if (p - begin > packet->header.size) { - DBG_ERR_FMT("RSET field packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Result set field packet "MYSQLND_SZ_T_SPEC" bytes " - "shorter than expected", p - begin - packet->header.size); + DBG_INF_FMT("allocing root. persistent=%u", packet->persistent_alloc); + root_ptr = meta->root = mnd_pemalloc(total_len, packet->persistent_alloc); + if (!root_ptr) { + SET_OOM_ERROR(conn->error_info); + DBG_RETURN(FAIL); } - root_ptr = meta->root = mnd_emalloc(total_len); meta->root_len = total_len; /* Now do allocs */ if (meta->catalog && meta->catalog != mysqlnd_empty_string) { @@ -998,6 +1080,11 @@ faulty_or_fake: php_error_docref(NULL TSRMLS_CC, E_WARNING, "Protocol error. Server sent NULL_LENGTH." " The server is faulty"); DBG_RETURN(FAIL); +premature_end: + DBG_ERR_FMT("RSET field packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Result set field packet "MYSQLND_SZ_T_SPEC" bytes " + "shorter than expected", p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ @@ -1007,7 +1094,6 @@ static void php_mysqlnd_rset_field_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { MYSQLND_PACKET_RES_FIELD *p= (MYSQLND_PACKET_RES_FIELD *) _packet; - /* p->metadata was passed to us as temporal buffer */ if (!alloca) { mnd_pefree(p, p->header.persistent); @@ -1018,7 +1104,7 @@ void php_mysqlnd_rset_field_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) /* {{{ php_mysqlnd_read_row_ex */ static enum_func_status -php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL * result_set_memory_pool, +php_mysqlnd_read_row_ex(MYSQLND * conn, MYSQLND_MEMORY_POOL * result_set_memory_pool, MYSQLND_MEMORY_POOL_CHUNK **buffer, uint64_t *data_size, zend_bool persistent_alloc, unsigned int prealloc_more_bytes TSRMLS_DC) @@ -1054,6 +1140,10 @@ php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL * result_set_memory_p to be able to implement read-only variables. Thus, we add + 1. */ *buffer = result_set_memory_pool->get_chunk(result_set_memory_pool, *data_size + 1 TSRMLS_CC); + if (!*buffer) { + ret = FAIL; + break; + } p = (*buffer)->ptr; } else if (!first_iteration) { /* Empty packet after MYSQLND_MAX_PACKET_SIZE packet. That's ok, break */ @@ -1067,12 +1157,16 @@ php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL * result_set_memory_p We need a trailing \0 for the last string, in case of text-mode, to be able to implement read-only variables. */ - (*buffer)->resize_chunk((*buffer), *data_size + 1 TSRMLS_CC); + if (FAIL == (*buffer)->resize_chunk((*buffer), *data_size + 1 TSRMLS_CC)) { + SET_OOM_ERROR(conn->error_info); + ret = FAIL; + break; + } /* The position could have changed, recalculate */ p = (*buffer)->ptr + (*data_size - header.size); } - if ((ret = conn->net->m.receive(conn, p, header.size TSRMLS_CC))) { + if (PASS != (ret = conn->net->m.receive(conn, p, header.size TSRMLS_CC))) { DBG_ERR("Empty row packet body"); php_error(E_WARNING, "Empty row packet body"); break; @@ -1083,7 +1177,7 @@ php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL * result_set_memory_p } } if (ret == FAIL && *buffer) { - (*buffer)->free_chunk((*buffer), TRUE TSRMLS_CC); + (*buffer)->free_chunk((*buffer) TSRMLS_CC); *buffer = NULL; } *data_size -= prealloc_more_bytes; @@ -1093,13 +1187,14 @@ php_mysqlnd_read_row_ex(MYSQLND *conn, MYSQLND_MEMORY_POOL * result_set_memory_p /* {{{ php_mysqlnd_rowp_read_binary_protocol */ -void php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, - unsigned int field_count, MYSQLND_FIELD *fields_metadata, - zend_bool persistent, - zend_bool as_unicode, zend_bool as_int_or_float, - MYSQLND_STATS * stats TSRMLS_DC) +enum_func_status +php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, + unsigned int field_count, MYSQLND_FIELD *fields_metadata, + zend_bool persistent, + zend_bool as_unicode, zend_bool as_int_or_float, + MYSQLND_STATS * stats TSRMLS_DC) { - int i; + unsigned int i; zend_uchar *p = row_buffer->ptr; zend_uchar *null_ptr, bit; zval **current_field, **end_field, **start_field; @@ -1107,19 +1202,24 @@ void php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffe DBG_ENTER("php_mysqlnd_rowp_read_binary_protocol"); end_field = (current_field = start_field = fields) + field_count; - + if (!current_field) { + DBG_RETURN(FAIL); + } /* skip the first byte, not EODATA_MARKER -> 0x0, status */ p++; null_ptr= p; - p += (field_count + 9)/8; /* skip null bits */ - bit = 4; /* first 2 bits are reserved */ + p += (field_count + 9)/8; /* skip null bits */ + bit = 4; /* first 2 bits are reserved */ for (i = 0; current_field < end_field; current_field++, i++) { DBG_INF("Directly creating zval"); MAKE_STD_ZVAL(*current_field); + if (!*current_field) { + DBG_RETURN(FAIL); + } - DBG_INF_FMT("Into zval=%p decoding column %d [%s.%s.%s] type=%d field->flags&unsigned=%d flags=%u is_bit=%d as_unicode=%d", + DBG_INF_FMT("Into zval=%p decoding column %u [%s.%s.%s] type=%u field->flags&unsigned=%u flags=%u is_bit=%u as_unicode=%u", *current_field, i, fields_metadata[i].db, fields_metadata[i].table, fields_metadata[i].name, fields_metadata[i].type, fields_metadata[i].flags & UNSIGNED_FLAG, fields_metadata[i].flags, fields_metadata[i].type == MYSQL_TYPE_BIT, as_unicode); @@ -1129,8 +1229,7 @@ void php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffe MYSQLND_INC_CONN_STATISTIC(stats, STAT_BINARY_TYPE_FETCHED_NULL); } else { enum_mysqlnd_field_types type = fields_metadata[i].type; - mysqlnd_ps_fetch_functions[type].func(*current_field, &fields_metadata[i], - 0, &p, as_unicode TSRMLS_CC); + mysqlnd_ps_fetch_functions[type].func(*current_field, &fields_metadata[i], 0, &p, as_unicode TSRMLS_CC); if (MYSQLND_G(collect_statistics)) { enum_mysqlnd_collected_stats statistic; @@ -1173,19 +1272,20 @@ void php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffe } } - DBG_VOID_RETURN; + DBG_RETURN(PASS); } /* }}} */ /* {{{ php_mysqlnd_rowp_read_text_protocol */ -void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, - unsigned int field_count, MYSQLND_FIELD *fields_metadata, - zend_bool persistent, - zend_bool as_unicode, zend_bool as_int_or_float, - MYSQLND_STATS * stats TSRMLS_DC) +enum_func_status +php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, + unsigned int field_count, MYSQLND_FIELD *fields_metadata, + zend_bool persistent, + zend_bool as_unicode, zend_bool as_int_or_float, + MYSQLND_STATS * stats TSRMLS_DC) { - int i; + unsigned int i; zend_bool last_field_was_string = FALSE; zval **current_field, **end_field, **start_field; zend_uchar *p = row_buffer->ptr; @@ -1195,6 +1295,10 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, DBG_ENTER("php_mysqlnd_rowp_read_text_protocol"); end_field = (current_field = start_field = fields) + field_count; + if (!current_field) { + DBG_RETURN(FAIL); + } + for (i = 0; current_field < end_field; current_field++, i++) { /* Don't reverse the order. It is significant!*/ zend_uchar *this_field_len_pos = p; @@ -1203,6 +1307,9 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, DBG_INF("Directly creating zval"); MAKE_STD_ZVAL(*current_field); + if (!*current_field) { + DBG_RETURN(FAIL); + } if (current_field > start_field && last_field_was_string) { /* @@ -1265,14 +1372,11 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, } #ifdef MYSQLND_STRING_TO_INT_CONVERSION - if (as_int_or_float && perm_bind.php_type == IS_LONG && - perm_bind.pack_len <= SIZEOF_LONG) - { + if (as_int_or_float && perm_bind.php_type == IS_LONG) { zend_uchar save = *(p + len); /* We have to make it ASCIIZ temporarily */ *(p + len) = '\0'; - if (perm_bind.pack_len < SIZEOF_LONG) - { + if (perm_bind.pack_len < SIZEOF_LONG) { /* direct conversion */ int64_t v = #ifndef PHP_WIN32 @@ -1296,6 +1400,8 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, if ((uns == TRUE && v > L64(2147483647)) || (uns == FALSE && (( L64(2147483647) < (int64_t) v) || (L64(-2147483648) > (int64_t) v)))) +#else +#error Need fix for this architecture #endif /* SIZEOF */ { ZVAL_STRINGL(*current_field, (char *)p, len, 0); @@ -1323,8 +1429,7 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, Definitely not nice, _hackish_ :(, but works. */ zend_uchar *start = bit_area; - ps_fetch_from_1_to_8_bytes(*current_field, &(fields_metadata[i]), - 0, &p, as_unicode, len TSRMLS_CC); + ps_fetch_from_1_to_8_bytes(*current_field, &(fields_metadata[i]), 0, &p, as_unicode, len TSRMLS_CC); /* We have advanced in ps_fetch_from_1_to_8_bytes. We should go back because later in this function there will be an advancement. @@ -1373,8 +1478,8 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, because then we will leak. XXX: Keep in mind that up there there is an open `else` in - #ifdef MYSQLND_STRING_TO_INT_CONVERSION - which will make with this `if` an `else if`. + #ifdef MYSQLND_STRING_TO_INT_CONVERSION + which will make with this `if` an `else if`. */ if ((perm_bind.is_possibly_blob == TRUE && fields_metadata[i].charsetnr == MYSQLND_BINARY_CHARSET_NR) || @@ -1395,7 +1500,7 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, row_buffer->ptr[data_size] = '\0'; } - DBG_VOID_RETURN; + DBG_RETURN(PASS); } /* }}} */ @@ -1420,8 +1525,7 @@ php_mysqlnd_rowp_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (!packet->binary_protocol && packet->bit_fields_count) { /* For every field we need terminating \0 */ - post_alloc_for_bit_fields = - packet->bit_fields_total_len + packet->bit_fields_count; + post_alloc_for_bit_fields = packet->bit_fields_total_len + packet->bit_fields_count; } ret = php_mysqlnd_read_row_ex(conn, packet->result_set_memory_pool, &packet->row_buffer, &data_size, @@ -1460,8 +1564,7 @@ php_mysqlnd_rowp_read(void *_packet, MYSQLND *conn TSRMLS_DC) p += 2; packet->server_status = uint2korr(p); /* Seems we have 3 bytes reserved for future use */ - DBG_INF_FMT("server_status=%d warning_count=%d", - packet->server_status, packet->warning_count); + DBG_INF_FMT("server_status=%u warning_count=%u", packet->server_status, packet->warning_count); } } else { MYSQLND_INC_CONN_STATISTIC(conn->stats, @@ -1502,24 +1605,24 @@ end: /* {{{ php_mysqlnd_rowp_free_mem */ -static -void php_mysqlnd_rowp_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) +static void +php_mysqlnd_rowp_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { MYSQLND_PACKET_ROW *p; DBG_ENTER("php_mysqlnd_rowp_free_mem"); p = (MYSQLND_PACKET_ROW *) _packet; if (p->row_buffer) { - p->row_buffer->free_chunk(p->row_buffer, TRUE TSRMLS_CC); + p->row_buffer->free_chunk(p->row_buffer TSRMLS_CC); p->row_buffer = NULL; } - DBG_INF_FMT("alloca=%d persistent=%d", (int)alloca, (int)p->header.persistent); + DBG_INF_FMT("alloca=%u persistent=%u", (int)alloca, (int)p->header.persistent); /* Don't free packet->fields : - normal queries -> store_result() | fetch_row_unbuffered() will transfer - the ownership and NULL it. + the ownership and NULL it. - PS will pass in it the bound variables, we have to use them! and of course - not free the array. As it is passed to us, we should not clean it ourselves. + not free the array. As it is passed to us, we should not clean it ourselves. */ if (!alloca) { mnd_pefree(p, p->header.persistent); @@ -1586,10 +1689,12 @@ php_mysqlnd_prepare_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_ENTER("php_mysqlnd_prepare_read"); PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "prepare", PROT_PREPARE_RESP_PACKET); + BAIL_IF_NO_MORE_DATA; data_size = packet->header.size; packet->error_code = uint1korr(p); p++; + BAIL_IF_NO_MORE_DATA; if (ERROR_MARKER == packet->error_code) { php_mysqlnd_read_error_from_line(p, data_size - 1, @@ -1604,45 +1709,50 @@ php_mysqlnd_prepare_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (data_size != PREPARE_RESPONSE_SIZE_41 && data_size != PREPARE_RESPONSE_SIZE_50 && !(data_size > PREPARE_RESPONSE_SIZE_50)) { - DBG_ERR_FMT("Wrong COM_STMT_PREPARE response size. Received %d", data_size); - php_error(E_WARNING, "Wrong COM_STMT_PREPARE response size. Received %d", data_size); + DBG_ERR_FMT("Wrong COM_STMT_PREPARE response size. Received %u", data_size); + php_error(E_WARNING, "Wrong COM_STMT_PREPARE response size. Received %u", data_size); DBG_RETURN(FAIL); } packet->stmt_id = uint4korr(p); p += 4; + BAIL_IF_NO_MORE_DATA; /* Number of columns in result set */ packet->field_count = uint2korr(p); p += 2; + BAIL_IF_NO_MORE_DATA; packet->param_count = uint2korr(p); p += 2; + BAIL_IF_NO_MORE_DATA; if (data_size > 9) { /* 0x0 filler sent by the server for 5.0+ clients */ p++; + BAIL_IF_NO_MORE_DATA; packet->warning_count = uint2korr(p); } - DBG_INF_FMT("Prepare packet read: stmt_id=%d fields=%d params=%d", + DBG_INF_FMT("Prepare packet read: stmt_id=%u fields=%u params=%u", packet->stmt_id, packet->field_count, packet->param_count); - if (p - begin > packet->header.size) { - DBG_ERR_FMT("PREPARE packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "PREPARE packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", - p - begin - packet->header.size); - } + BAIL_IF_NO_MORE_DATA; DBG_RETURN(PASS); +premature_end: + DBG_ERR_FMT("PREPARE packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "PREPARE packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", + p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ /* {{{ php_mysqlnd_prepare_free_mem */ -static -void php_mysqlnd_prepare_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) +static void +php_mysqlnd_prepare_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { MYSQLND_PACKET_PREPARE_RESPONSE *p= (MYSQLND_PACKET_PREPARE_RESPONSE *) _packet; if (!alloca) { @@ -1666,6 +1776,7 @@ php_mysqlnd_chg_user_read(void *_packet, MYSQLND *conn TSRMLS_DC) DBG_ENTER("php_mysqlnd_chg_user_read"); PACKET_READ_HEADER_AND_BODY(packet, conn, buf, buf_len, "change user response", PROT_CHG_USER_RESP_PACKET); + BAIL_IF_NO_MORE_DATA; /* Don't increment. First byte is ERROR_MARKER on error, but otherwise is starting byte @@ -1678,6 +1789,7 @@ php_mysqlnd_chg_user_read(void *_packet, MYSQLND *conn TSRMLS_DC) if (packet->header.size == 1 && buf[0] == EODATA_MARKER && packet->server_capabilities & CLIENT_SECURE_CONNECTION) { /* We don't handle 3.23 authentication */ + packet->server_asked_323_auth = TRUE; DBG_RETURN(FAIL); } @@ -1689,20 +1801,21 @@ php_mysqlnd_chg_user_read(void *_packet, MYSQLND *conn TSRMLS_DC) packet->error_info.sqlstate TSRMLS_CC); } - if (p - begin > packet->header.size) { - DBG_ERR_FMT("CHANGE_USER packet %d bytes shorter than expected", p - begin - packet->header.size); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "CHANGE_USER packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", - p - begin - packet->header.size); - } + BAIL_IF_NO_MORE_DATA; DBG_RETURN(PASS); +premature_end: + DBG_ERR_FMT("CHANGE_USER packet %d bytes shorter than expected", p - begin - packet->header.size); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "CHANGE_USER packet "MYSQLND_SZ_T_SPEC" bytes shorter than expected", + p - begin - packet->header.size); + DBG_RETURN(FAIL); } /* }}} */ /* {{{ php_mysqlnd_chg_user_free_mem */ -static -void php_mysqlnd_chg_user_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) +static void +php_mysqlnd_chg_user_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) { if (!alloca) { mnd_pefree(_packet, ((MYSQLND_PACKET_CHG_USER_RESPONSE *)_packet)->header.persistent); @@ -1711,8 +1824,7 @@ void php_mysqlnd_chg_user_free_mem(void *_packet, zend_bool alloca TSRMLS_DC) /* }}} */ -/* {{{ packet_methods - */ +/* {{{ packet_methods */ static mysqlnd_packet_methods packet_methods[PROT_LAST] = { @@ -1786,15 +1898,16 @@ mysqlnd_packet_methods packet_methods[PROT_LAST] = /* }}} */ - /* {{{ mysqlnd_protocol::get_greet_packet */ static struct st_mysqlnd_packet_greet * MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_greet * packet = pecalloc(1, packet_methods[PROT_GREET_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_greet * packet = mnd_pecalloc(1, packet_methods[PROT_GREET_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_greet_packet"); - packet->header.m = &packet_methods[PROT_GREET_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_GREET_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1804,10 +1917,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet)(MYSQLND_PROTOCOL * const prot static struct st_mysqlnd_packet_auth * MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_auth * packet = pecalloc(1, packet_methods[PROT_AUTH_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_auth * packet = mnd_pecalloc(1, packet_methods[PROT_AUTH_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_auth_packet"); - packet->header.m = &packet_methods[PROT_AUTH_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_AUTH_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1817,10 +1932,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet)(MYSQLND_PROTOCOL * const proto static struct st_mysqlnd_packet_ok * MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_ok * packet = pecalloc(1, packet_methods[PROT_OK_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_ok * packet = mnd_pecalloc(1, packet_methods[PROT_OK_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_ok_packet"); - packet->header.m = &packet_methods[PROT_OK_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_OK_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1830,10 +1947,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet)(MYSQLND_PROTOCOL * const protoco static struct st_mysqlnd_packet_eof * MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_eof * packet = pecalloc(1, packet_methods[PROT_EOF_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_eof * packet = mnd_pecalloc(1, packet_methods[PROT_EOF_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_eof_packet"); - packet->header.m = &packet_methods[PROT_EOF_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_EOF_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1843,10 +1962,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet)(MYSQLND_PROTOCOL * const protoc static struct st_mysqlnd_packet_command * MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_command * packet = pecalloc(1, packet_methods[PROT_CMD_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_command * packet = mnd_pecalloc(1, packet_methods[PROT_CMD_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_command_packet"); - packet->header.m = &packet_methods[PROT_CMD_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_CMD_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1856,10 +1977,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_command_packet)(MYSQLND_PROTOCOL * const pr static struct st_mysqlnd_packet_rset_header * MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_rset_header * packet = pecalloc(1, packet_methods[PROT_RSET_HEADER_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_rset_header * packet = mnd_pecalloc(1, packet_methods[PROT_RSET_HEADER_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_rset_header_packet"); - packet->header.m = &packet_methods[PROT_RSET_HEADER_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_RSET_HEADER_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1869,10 +1992,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet)(MYSQLND_PROTOCOL * cons static struct st_mysqlnd_packet_res_field * MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_res_field * packet = pecalloc(1, packet_methods[PROT_RSET_FLD_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_res_field * packet = mnd_pecalloc(1, packet_methods[PROT_RSET_FLD_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_result_field_packet"); - packet->header.m = &packet_methods[PROT_RSET_FLD_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_RSET_FLD_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1882,10 +2007,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet)(MYSQLND_PROTOCOL * con static struct st_mysqlnd_packet_row * MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_row * packet = pecalloc(1, packet_methods[PROT_ROW_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_row * packet = mnd_pecalloc(1, packet_methods[PROT_ROW_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_row_packet"); - packet->header.m = &packet_methods[PROT_ROW_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_ROW_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1895,10 +2022,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_row_packet)(MYSQLND_PROTOCOL * const protoc static struct st_mysqlnd_packet_stats * MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_stats * packet = pecalloc(1, packet_methods[PROT_STATS_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_stats * packet = mnd_pecalloc(1, packet_methods[PROT_STATS_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_stats_packet"); - packet->header.m = &packet_methods[PROT_STATS_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_STATS_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1908,10 +2037,12 @@ MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet)(MYSQLND_PROTOCOL * const prot static struct st_mysqlnd_packet_prepare_response * MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_prepare_response * packet = pecalloc(1, packet_methods[PROT_PREPARE_RESP_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_prepare_response * packet = mnd_pecalloc(1, packet_methods[PROT_PREPARE_RESP_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_prepare_response_packet"); - packet->header.m = &packet_methods[PROT_PREPARE_RESP_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_PREPARE_RESP_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ @@ -1921,15 +2052,33 @@ MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet)(MYSQLND_PROTOCOL * static struct st_mysqlnd_packet_chg_user_resp* MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOCOL * const protocol, zend_bool persistent TSRMLS_DC) { - struct st_mysqlnd_packet_chg_user_resp * packet = pecalloc(1, packet_methods[PROT_CHG_USER_RESP_PACKET].struct_size, persistent); + struct st_mysqlnd_packet_chg_user_resp * packet = mnd_pecalloc(1, packet_methods[PROT_CHG_USER_RESP_PACKET].struct_size, persistent); DBG_ENTER("mysqlnd_protocol::get_change_user_response_packet"); - packet->header.m = &packet_methods[PROT_CHG_USER_RESP_PACKET]; - packet->header.persistent = persistent; + if (packet) { + packet->header.m = &packet_methods[PROT_CHG_USER_RESP_PACKET]; + packet->header.persistent = persistent; + } DBG_RETURN(packet); } /* }}} */ +static +MYSQLND_CLASS_METHODS_START(mysqlnd_protocol) + MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_command_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_row_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet), + MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet) +MYSQLND_CLASS_METHODS_END; + + /* {{{ mysqlnd_protocol_init */ PHPAPI MYSQLND_PROTOCOL * mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC) @@ -1938,20 +2087,11 @@ mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC) MYSQLND_PROTOCOL *ret = mnd_pecalloc(1, alloc_size, persistent); DBG_ENTER("mysqlnd_protocol_init"); - DBG_INF_FMT("persistent=%d", persistent); - ret->persistent = persistent; - - ret->m.get_greet_packet = MYSQLND_METHOD(mysqlnd_protocol, get_greet_packet); - ret->m.get_auth_packet = MYSQLND_METHOD(mysqlnd_protocol, get_auth_packet); - ret->m.get_ok_packet = MYSQLND_METHOD(mysqlnd_protocol, get_ok_packet); - ret->m.get_command_packet = MYSQLND_METHOD(mysqlnd_protocol, get_command_packet); - ret->m.get_eof_packet = MYSQLND_METHOD(mysqlnd_protocol, get_eof_packet); - ret->m.get_rset_header_packet = MYSQLND_METHOD(mysqlnd_protocol, get_rset_header_packet); - ret->m.get_result_field_packet = MYSQLND_METHOD(mysqlnd_protocol, get_result_field_packet); - ret->m.get_row_packet = MYSQLND_METHOD(mysqlnd_protocol, get_row_packet); - ret->m.get_stats_packet = MYSQLND_METHOD(mysqlnd_protocol, get_stats_packet); - ret->m.get_prepare_response_packet = MYSQLND_METHOD(mysqlnd_protocol, get_prepare_response_packet); - ret->m.get_change_user_response_packet = MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet); + DBG_INF_FMT("persistent=%u", persistent); + if (ret) { + ret->persistent = persistent; + ret->m = mysqlnd_mysqlnd_protocol_methods; + } DBG_RETURN(ret); } @@ -1975,7 +2115,8 @@ mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol TSRMLS_DC) /* {{{ _mysqlnd_plugin_get_plugin_protocol_data */ -PHPAPI void ** _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id TSRMLS_DC) +PHPAPI void ** +_mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * protocol, unsigned int plugin_id TSRMLS_DC) { DBG_ENTER("_mysqlnd_plugin_get_plugin_protocol_data"); DBG_INF_FMT("plugin_id=%u", plugin_id); @@ -1987,6 +2128,15 @@ PHPAPI void ** _mysqlnd_plugin_get_plugin_protocol_data(const MYSQLND_PROTOCOL * /* }}} */ +/* {{{ mysqlnd_protocol_get_methods */ +PHPAPI struct st_mysqlnd_protocol_methods * +mysqlnd_protocol_get_methods() +{ + return &mysqlnd_mysqlnd_protocol_methods; +} +/* }}} */ + + /* * Local variables: * tab-width: 4 diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 29116e050..8d862fc8e 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysqlnd_wireprotocol.h 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: mysqlnd_wireprotocol.h 299998 2010-05-31 17:57:03Z andrey $ */ #ifndef MYSQLND_WIREPROTOCOL_H #define MYSQLND_WIREPROTOCOL_H @@ -41,7 +41,9 @@ PHPAPI extern const char mysqlnd_read_body_name[]; #define PACKET_FREE(packet) \ do { \ DBG_INF_FMT("PACKET_FREE(%p)", packet); \ - ((packet)->header.m->free_mem((packet), FALSE TSRMLS_CC)); \ + if ((packet)) { \ + ((packet)->header.m->free_mem((packet), FALSE TSRMLS_CC)); \ + } \ } while (0); PHPAPI extern const char * const mysqlnd_command_to_text[COM_END]; @@ -99,6 +101,7 @@ typedef struct st_mysqlnd_packet_auth { /* +1 for \0 because of scramble() */ unsigned char *server_scramble_buf; size_t db_len; + zend_bool send_half_packet; } MYSQLND_PACKET_AUTH; /* OK packet */ @@ -174,6 +177,7 @@ typedef struct st_mysqlnd_packet_res_field { /* For table definitions, empty for result sets */ zend_bool skip_parsing; zend_bool stupid_list_fields_eof; + zend_bool persistent_alloc; MYSQLND_ERROR_INFO error_info; } MYSQLND_PACKET_RES_FIELD; @@ -241,6 +245,7 @@ typedef struct st_mysqlnd_packet_chg_user_resp { uint16_t server_capabilities; /* If error packet, we use these */ MYSQLND_ERROR_INFO error_info; + zend_bool server_asked_323_auth; } MYSQLND_PACKET_CHG_USER_RESPONSE; @@ -249,17 +254,17 @@ PHPAPI void php_mysqlnd_scramble(zend_uchar * const buffer, const zend_uchar * c unsigned long php_mysqlnd_net_field_length(zend_uchar **packet); zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, uint64_t length); -PHPAPI extern char * const mysqlnd_empty_string; +PHPAPI const extern char * const mysqlnd_empty_string; -void php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, +enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, unsigned int field_count, MYSQLND_FIELD *fields_metadata, zend_bool persistent, zend_bool as_unicode, zend_bool as_int_or_float, MYSQLND_STATS * stats TSRMLS_DC); -void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, +enum_func_status php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval ** fields, unsigned int field_count, MYSQLND_FIELD *fields_metadata, zend_bool persistent, zend_bool as_unicode, zend_bool as_int_or_float, @@ -267,8 +272,8 @@ void php_mysqlnd_rowp_read_text_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, PHPAPI MYSQLND_PROTOCOL * mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC); -PHPAPI void mysqlnd_protocol_free(MYSQLND_PROTOCOL * net TSRMLS_DC); - +PHPAPI void mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol TSRMLS_DC); +PHPAPI struct st_mysqlnd_protocol_methods * mysqlnd_protocol_get_methods(); #endif /* MYSQLND_WIREPROTOCOL_H */ diff --git a/ext/mysqlnd/php_mysqlnd.c b/ext/mysqlnd/php_mysqlnd.c index 8362a00d3..6bfbe2e4f 100644 --- a/ext/mysqlnd/php_mysqlnd.c +++ b/ext/mysqlnd/php_mysqlnd.c @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 2006-2009 The PHP Group | + | Copyright (c) 2006-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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_mysqlnd.c 293779 2010-01-20 17:09:28Z johannes $ */ +/* $Id: php_mysqlnd.c 300352 2010-06-10 12:24:03Z andrey $ */ #include "php.h" #include "php_ini.h" #include "mysqlnd.h" @@ -49,8 +49,8 @@ PHPAPI void mysqlnd_minfo_print_hash(zval *values) zstr string_key; uint string_key_len; ulong num_key; - int s_len; - char *s = NULL; + int s_len; + char *s = NULL; TSRMLS_FETCH(); zend_hash_get_current_key_ex(Z_ARRVAL_P(values), &string_key, &string_key_len, &num_key, 0, &pos_values); @@ -108,6 +108,12 @@ PHP_MINFO_FUNCTION(mysqlnd) #else "not supported"); #endif + php_info_print_table_row(2, "SSL", +#ifdef MYSQLND_SSL_SUPPORTED + "supported"); +#else + "not supported"); +#endif snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_cmd_buffer_size)); php_info_print_table_row(2, "Command buffer size", buf); snprintf(buf, sizeof(buf), "%ld", MYSQLND_G(net_read_buffer_size)); @@ -130,7 +136,7 @@ PHP_MINFO_FUNCTION(mysqlnd) /* }}} */ -ZEND_DECLARE_MODULE_GLOBALS(mysqlnd); +PHPAPI ZEND_DECLARE_MODULE_GLOBALS(mysqlnd); /* {{{ PHP_GINIT_FUNCTION @@ -145,6 +151,13 @@ static PHP_GINIT_FUNCTION(mysqlnd) mysqlnd_globals->net_read_buffer_size = 32768; mysqlnd_globals->net_read_timeout = 31536000; mysqlnd_globals->log_mask = 0; + mysqlnd_globals->mempool_default_size = 16000; + mysqlnd_globals->debug_emalloc_fail_threshold = -1; + mysqlnd_globals->debug_ecalloc_fail_threshold = -1; + mysqlnd_globals->debug_erealloc_fail_threshold = -1; + mysqlnd_globals->debug_malloc_fail_threshold = -1; + mysqlnd_globals->debug_calloc_fail_threshold = -1; + mysqlnd_globals->debug_realloc_fail_threshold = -1; } /* }}} */ @@ -170,6 +183,17 @@ PHP_INI_BEGIN() STD_PHP_INI_ENTRY("mysqlnd.net_read_buffer_size", "32768",PHP_INI_ALL, OnUpdateLong, net_read_buffer_size, zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY("mysqlnd.net_read_timeout", "31536000", PHP_INI_SYSTEM, OnUpdateLong, net_read_timeout, zend_mysqlnd_globals, mysqlnd_globals) STD_PHP_INI_ENTRY("mysqlnd.log_mask", "0", PHP_INI_ALL, OnUpdateLong, log_mask, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.mempool_default_size","16000", PHP_INI_ALL, OnUpdateLong, mempool_default_size, zend_mysqlnd_globals, mysqlnd_globals) + +#ifdef PHP_DEBUG + STD_PHP_INI_ENTRY("mysqlnd.debug_emalloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_emalloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_ecalloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_ecalloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_erealloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_erealloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + + STD_PHP_INI_ENTRY("mysqlnd.debug_malloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_malloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_calloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_calloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) + STD_PHP_INI_ENTRY("mysqlnd.debug_realloc_fail_threshold","-1", PHP_INI_SYSTEM, OnUpdateLong, debug_realloc_fail_threshold, zend_mysqlnd_globals, mysqlnd_globals) +#endif PHP_INI_END() /* }}} */ diff --git a/ext/mysqlnd/php_mysqlnd.h b/ext/mysqlnd/php_mysqlnd.h index 11232af0b..765f71c9f 100644 --- a/ext/mysqlnd/php_mysqlnd.h +++ b/ext/mysqlnd/php_mysqlnd.h @@ -1,8 +1,8 @@ /* +----------------------------------------------------------------------+ - | PHP Version 6 | + | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2010 The PHP Group | + | Copyright (c) 2006-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 | @@ -17,7 +17,7 @@ | Ulf Wendel <uw@php.net> | +----------------------------------------------------------------------+ - $Id: php_mysqlnd.h 293036 2010-01-03 09:23:27Z sebastian $ + $Id: php_mysqlnd.h 298217 2010-04-20 13:50:34Z felipe $ */ #ifndef PHP_MYSQLND_H @@ -27,3 +27,12 @@ extern zend_module_entry mysqlnd_module_entry; #endif /* PHP_MYSQLND_H */ + +/* + * Local variables: + * tab-width: 4 + * c-basic-offset: 4 + * End: + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 + */ diff --git a/ext/oci8/config.m4 b/ext/oci8/config.m4 index c81ecd638..5b7010f35 100644 --- a/ext/oci8/config.m4 +++ b/ext/oci8/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 277079 2009-03-12 23:52:37Z sixd $ +dnl $Id: config.m4 300753 2010-06-25 21:18:09Z sixd $ dnl if test -z "$SED"; then @@ -37,7 +37,7 @@ AC_DEFUN([AC_OCI8_CHECK_LIB_DIR],[ OCI8_LIB_DIR=$PHP_OCI8_OH_LIBDIR else dnl This isn't an ORACLE_HOME. Try heuristic examination of the dir to help the user - if test -f "$OCI8_DIR/libociei.so"; then + if test -f "$OCI8_DIR/libociei.$SHLIB_SUFFIX_NAME"; then AC_MSG_ERROR([Expected an ORACLE_HOME top level directory but ${OCI8_DIR} appears to be an Instant Client directory. Try --with-oci8=instantclient,${OCI8_DIR}]) else AC_MSG_ERROR([Oracle library directory not found in ${OCI8_DIR}]) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 589b5fd67..841c824a6 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -26,7 +26,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8.c 294447 2010-02-03 20:08:42Z pajoye $ */ +/* $Id: oci8.c 300752 2010-06-25 21:09:13Z sixd $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1293,26 +1293,33 @@ 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: 294447 $"); + php_info_print_table_row(2, "Revision", "$Revision: 300752 $"); snprintf(buf, sizeof(buf), "%ld", OCI_G(num_persistent)); php_info_print_table_row(2, "Active Persistent Connections", buf); snprintf(buf, sizeof(buf), "%ld", OCI_G(num_links)); php_info_print_table_row(2, "Active Connections", buf); -#if !defined(PHP_WIN32) && !defined(HAVE_OCI_INSTANT_CLIENT) -#ifdef PHP_OCI8_ORACLE_VERSION - php_info_print_table_row(2, "Oracle Version", PHP_OCI8_ORACLE_VERSION); +#if defined(OCI_MAJOR_VERSION) && defined(OCI_MINOR_VERSION) + snprintf(buf, sizeof(buf), "%d.%d", OCI_MAJOR_VERSION, OCI_MINOR_VERSION); +#elif defined(PHP_OCI8_ORACLE_VERSION) + snprintf(buf, sizeof(buf), "%s", PHP_OCI8_ORACLE_VERSION); +#else + snprintf(buf, sizeof(buf), "Unknown"); #endif -#ifdef PHP_OCI8_DEF_DIR +#if defined(HAVE_OCI_INSTANT_CLIENT) + php_info_print_table_row(2, "Oracle Instant Client Version", buf); +#else + php_info_print_table_row(2, "Oracle Version", buf); +#endif + +#if !defined(PHP_WIN32) && !defined(HAVE_OCI_INSTANT_CLIENT) +#if defined(PHP_OCI8_DEF_DIR) php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DEF_DIR); #endif -#ifdef PHP_OCI8_DEF_SHARED_LIBADD +#if defined(PHP_OCI8_DEF_SHARED_LIBADD) php_info_print_table_row(2, "Libraries Used", PHP_OCI8_DEF_SHARED_LIBADD); #endif -#elif defined(HAVE_OCI_INSTANT_CLIENT) && defined(OCI_MAJOR_VERSION) && defined(OCI_MINOR_VERSION) - snprintf(buf, sizeof(buf), "%d.%d", OCI_MAJOR_VERSION, OCI_MINOR_VERSION); - php_info_print_table_row(2, "Oracle Instant Client Version", buf); #endif php_info_print_table_row(2, "Temporary Lob support", "enabled"); @@ -1549,6 +1556,7 @@ void php_oci_connection_descriptors_free(php_oci_connection *connection TSRMLS_D /* {{{ php_oci_error() * * Fetch & print out error message if we get an error + * Returns an Oracle error number */ sb4 php_oci_error(OCIError *err_p, sword status TSRMLS_DC) { @@ -1637,21 +1645,22 @@ sb4 php_oci_fetch_errmsg(OCIError *error_handle, text **error_buf TSRMLS_DC) */ int php_oci_fetch_sqltext_offset(php_oci_statement *statement, text **sqltext, ub2 *error_offset TSRMLS_DC) { + sword errstatus; + *sqltext = NULL; *error_offset = 0; + PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (dvoid *) sqltext, (ub4 *)0, OCI_ATTR_STATEMENT, statement->err)); - PHP_OCI_CALL_RETURN(statement->errcode, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (dvoid *) sqltext, (ub4 *)0, OCI_ATTR_STATEMENT, statement->err)); - - if (statement->errcode != OCI_SUCCESS) { - statement->errcode = php_oci_error(statement->err, statement->errcode TSRMLS_CC); + if (errstatus != OCI_SUCCESS) { + statement->errcode = php_oci_error(statement->err, errstatus TSRMLS_CC); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } - PHP_OCI_CALL_RETURN(statement->errcode, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)error_offset, (ub4 *)0, OCI_ATTR_PARSE_ERROR_OFFSET, statement->err)); + PHP_OCI_CALL_RETURN(errstatus, OCIAttrGet, ((dvoid *)statement->stmt, OCI_HTYPE_STMT, (ub2 *)error_offset, (ub4 *)0, OCI_ATTR_PARSE_ERROR_OFFSET, statement->err)); - if (statement->errcode != OCI_SUCCESS) { - statement->errcode = php_oci_error(statement->err, statement->errcode TSRMLS_CC); + if (errstatus != OCI_SUCCESS) { + statement->errcode = php_oci_error(statement->err, errstatus TSRMLS_CC); PHP_OCI_HANDLE_ERROR(statement->connection, statement->errcode); return 1; } diff --git a/ext/oci8/oci8_interface.c b/ext/oci8/oci8_interface.c index 1c20b84a8..a104046f7 100644 --- a/ext/oci8/oci8_interface.c +++ b/ext/oci8/oci8_interface.c @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_interface.c 294441 2010-02-03 19:37:35Z pajoye $ */ +/* $Id: oci8_interface.c 293180 2010-01-06 18:58:16Z sixd $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/oci8/oci8_lob.c b/ext/oci8/oci8_lob.c index 6388e85b7..315f59980 100644 --- a/ext/oci8/oci8_lob.c +++ b/ext/oci8/oci8_lob.c @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_lob.c 294441 2010-02-03 19:37:35Z pajoye $ */ +/* $Id: oci8_lob.c 293180 2010-01-06 18:58:16Z sixd $ */ diff --git a/ext/oci8/oci8_statement.c b/ext/oci8/oci8_statement.c index bdba6dcce..c4de77760 100644 --- a/ext/oci8/oci8_statement.c +++ b/ext/oci8/oci8_statement.c @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci8_statement.c 294441 2010-02-03 19:37:35Z pajoye $ */ +/* $Id: oci8_statement.c 298755 2010-04-29 05:07:16Z sixd $ */ #ifdef HAVE_CONFIG_H @@ -336,9 +336,9 @@ php_oci_out_column *php_oci_statement_get_column(php_oci_statement *statement, l sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **bufpp, ub4 **alenpp, ub1 *piecep, dvoid **indpp, ub2 **rcpp) { php_oci_out_column *outcol = (php_oci_out_column *)ctx; + TSRMLS_FETCH(); if (!outcol) { - TSRMLS_FETCH(); php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid context pointer value"); return OCI_ERROR; @@ -347,7 +347,6 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf switch(outcol->data_type) { case SQLT_RSET: { php_oci_statement *nested_stmt; - TSRMLS_FETCH(); nested_stmt = php_oci_statement_create(outcol->statement->connection, NULL, 0 TSRMLS_CC); if (!nested_stmt) { @@ -372,7 +371,6 @@ sb4 php_oci_define_callback(dvoid *ctx, OCIDefine *define, ub4 iter, dvoid **buf case SQLT_BFILE: { php_oci_descriptor *descr; int dtype; - TSRMLS_FETCH(); if (outcol->data_type == SQLT_BFILE) { dtype = OCI_DTYPE_FILE; @@ -811,8 +809,16 @@ void php_oci_statement_free(php_oci_statement *statement TSRMLS_DC) int php_oci_bind_pre_exec(void *data, void *result TSRMLS_DC) { php_oci_bind *bind = (php_oci_bind *) data; + *(int *)result = 0; + if (Z_TYPE_P(bind->zval) == IS_ARRAY) { + /* These checks are currently valid for oci_bind_by_name, not + * oci_bind_array_by_name. Also bind->type and + * bind->indicator are not used for oci_bind_array_by_name. + */ + return 0; + } switch (bind->type) { case SQLT_NTY: case SQLT_BFILEE: @@ -852,9 +858,8 @@ int php_oci_bind_pre_exec(void *data, void *result TSRMLS_DC) } break; } - - /* reset all bind stuff to a normal state..-. */ + /* reset all bind stuff to a normal state..-. */ bind->indicator = 0; return 0; @@ -875,7 +880,15 @@ int php_oci_bind_post_exec(void *data TSRMLS_DC) } zval_dtor(val); ZVAL_NULL(val); - } else if (Z_TYPE_P(bind->zval) == IS_STRING && Z_STRLEN_P(bind->zval) > 0) { + } else if (Z_TYPE_P(bind->zval) == IS_STRING + && Z_STRLEN_P(bind->zval) > 0 + && Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] != '\0') { + /* The post- PHP 5.3 feature for "interned" strings disallows + * their reallocation but (i) any IN binds either interned or + * not should already be null terminated and (ii) for OUT + * binds, php_oci_bind_out_callback() should have allocated a + * new string that can be realloced. + */ Z_STRVAL_P(bind->zval) = erealloc(Z_STRVAL_P(bind->zval), Z_STRLEN_P(bind->zval)+1); Z_STRVAL_P(bind->zval)[ Z_STRLEN_P(bind->zval) ] = '\0'; } else if (Z_TYPE_P(bind->zval) == IS_ARRAY) { @@ -1452,6 +1465,9 @@ int php_oci_bind_array_by_name(php_oci_statement *statement, char *name, int nam bindp->bind = NULL; bindp->zval = var; bindp->array.type = type; + bindp->indicator = 0; /* not used for array binds */ + bindp->type = 0; /* not used for array binds */ + zval_add_ref(&var); PHP_OCI_CALL_RETURN(statement->errcode, diff --git a/ext/oci8/package.xml b/ext/oci8/package.xml index 92faa15a9..8e0f36d81 100644 --- a/ext/oci8/package.xml +++ b/ext/oci8/package.xml @@ -6,7 +6,7 @@ http://pear.php.net/dtd/package-2.0.xsd"> <name>oci8</name> <channel>pecl.php.net</channel> <summary>Extension for Oracle Database</summary> - <description>This extension allows you to access Oracle databases using the Oracle Call Interface (OCI8). It can be built with PHP 4.3.9 to 5.x. It can be linked with Oracle 9.2, 10.2, 11.1, or 11.2 client libraries. + <description>This extension allows you to access Oracle databases. It can be built with PHP 4.3.9 to 5.x. It can be linked with Oracle 9.2, 10.2, 11.1, or 11.2 client libraries. </description> <lead> <name>Christopher Jones</name> @@ -33,12 +33,12 @@ http://pear.php.net/dtd/package-2.0.xsd"> <active>no</active> </lead> - <date>2010-??-??</date> + <date>2010-06-25</date> <time>15:00:00</time> <version> - <release>1.4.1</release> - <api>1.4.1</api> + <release>1.4.2</release> + <api>1.4.2</api> </version> <stability> <release>stable</release> @@ -46,8 +46,10 @@ http://pear.php.net/dtd/package-2.0.xsd"> </stability> <license uri="http://www.php.net/license">PHP</license> <notes> -Fixed bug #49560 (Using LOBs causes slow PHP shutdown) -Fixed bug #47281 ($php_errormsg is limited in size of characters) + Fixed bug #51691 (Unnecessary realloc causes crashes in PHP trunk tests with interned strings) + Fixed bug #51291 (oci_error doesn't report last error when called two times) + Fixed bug #51577 (Uninitialized memory reference with oci_bind_array_by_name) + Fixed bug #52186 (phpinfo() shows 10.1 or 11.1 when installed with ORACLE_HOME 10.2 or 11.2) </notes> <contents> <dir name="/"> @@ -77,20 +79,27 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="b47243_1.phpt" role="test" /> <file name="b47243_2.phpt" role="test" /> <file name="b47243_3.phpt" role="test" /> + <file name="bind_char_1_11gR1.phpt" role="test" /> <file name="bind_char_1.phpt" role="test" /> + <file name="bind_char_2_11gR1.phpt" role="test" /> <file name="bind_char_2.phpt" role="test" /> + <file name="bind_char_3_11gR1.phpt" role="test" /> <file name="bind_char_3.phpt" role="test" /> + <file name="bind_char_4_11gR1.phpt" role="test" /> <file name="bind_char_4.phpt" role="test" /> <file name="bind_empty.phpt" role="test" /> - <file name="bind_error.phpt" role="test" /> <file name="bind_long.phpt" role="test" /> <file name="bind_long_raw.phpt" role="test" /> <file name="bind_raw.phpt" role="test" /> + <file name="bind_rowid.phpt" role="test" /> <file name="bug26133.phpt" role="test" /> + <file name="bug27303_1_11gR1.phpt" role="test" /> + <file name="bug27303_1.phpt" role="test" /> + <file name="bug27303_2_11gR1.phpt" role="test" /> <file name="bug27303_2.phpt" role="test" /> <file name="bug27303_3.phpt" role="test" /> + <file name="bug27303_4_11gR1.phpt" role="test" /> <file name="bug27303_4.phpt" role="test" /> - <file name="bug27303.phpt" role="test" /> <file name="bug32325.phpt" role="test" /> <file name="bug35973.phpt" role="test" /> <file name="bug36010.phpt" role="test" /> @@ -119,7 +128,8 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="bug46994.phpt" role="test" /> <file name="bug47189.phpt" role="test" /> <file name="bug47281.phpt" role="test" /> - <file name="bug6109.phpt" role="test" /> + <file name="bug51253.phpt" role="test" /> + <file name="bug51291.phpt" role="test" /> <file name="close.phpt" role="test" /> <file name="coll_001.phpt" role="test" /> <file name="coll_002_func.phpt" role="test" /> @@ -153,8 +163,9 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="coll_017.phpt" role="test" /> <file name="coll_018.phpt" role="test" /> <file name="coll_019.phpt" role="test" /> + <file name="commit_001.phpt" role="test" /> + <file name="commit_002.phpt" role="test" /> <file name="commit_old.phpt" role="test" /> - <file name="commit.phpt" role="test" /> <file name="conn_attr_1.phpt" role="test" /> <file name="conn_attr_2.phpt" role="test" /> <file name="conn_attr_3.phpt" role="test" /> @@ -219,7 +230,9 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="edition_2.phpt" role="test" /> <file name="error1.phpt" role="test" /> <file name="error2.phpt" role="test" /> + <file name="error_bind.phpt" role="test" /> <file name="error_old.phpt" role="test" /> + <file name="error_parse.phpt" role="test" /> <file name="error.phpt" role="test" /> <file name="exec_fetch.phpt" role="test" /> <file name="execute_mode.phpt" role="test" /> @@ -300,7 +313,6 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="oci_execute_segfault.phpt" role="test" /> <file name="old_oci_close1.phpt" role="test" /> <file name="old_oci_close.phpt" role="test" /> - <file name="parse_error.phpt" role="test" /> <file name="password_2.phpt" role="test" /> <file name="password_new.phpt" role="test" /> <file name="password_old.phpt" role="test" /> @@ -310,6 +322,7 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="pecl_bug10194.phpt" role="test" /> <file name="pecl_bug16035.phpt" role="test" /> <file name="pecl_bug16842.phpt" role="test" /> + <file name="pecl_bug6109.phpt" role="test" /> <file name="pecl_bug8816.phpt" role="test" /> <file name="persistent.phpt" role="test" /> <file name="prefetch_old.phpt" role="test" /> @@ -321,7 +334,6 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <file name="refcur_prefetch_3.phpt" role="test" /> <file name="reflection1.phpt" role="test" /> <file name="reflection2.phpt" role="test" /> - <file name="rowid_bind.phpt" role="test" /> <file name="select_null.phpt" role="test" /> <file name="serverversion.phpt" role="test" /> <file name="skipif.inc" role="test" /> @@ -369,6 +381,22 @@ Fixed bug #47281 ($php_errormsg is limited in size of characters) <release> <version> + <release>1.4.1</release> + <api>1.4.1</api> + </version> + <stability> + <release>stable</release> + <api>stable</api> + </stability> + <license uri="http://www.php.net/license">PHP</license> + <notes> + Fixed bug #49560 (Using LOBs causes slow PHP shutdown) + Fixed bug #47281 ($php_errormsg is limited in size of characters) + </notes> +</release> + +<release> + <version> <release>1.4.0</release> <api>1.4.0</api> </version> diff --git a/ext/oci8/php_oci8.h b/ext/oci8/php_oci8.h index dfc667260..d4b90ffe1 100644 --- a/ext/oci8/php_oci8.h +++ b/ext/oci8/php_oci8.h @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_oci8.h 294445 2010-02-03 20:00:49Z pajoye $ */ +/* $Id: php_oci8.h 300753 2010-06-25 21:18:09Z sixd $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_H @@ -46,7 +46,7 @@ */ #undef PHP_OCI8_VERSION #endif -#define PHP_OCI8_VERSION "1.4.1" +#define PHP_OCI8_VERSION "1.4.2" 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 eb594392c..c7de93299 100644 --- a/ext/oci8/php_oci8_int.h +++ b/ext/oci8/php_oci8_int.h @@ -25,7 +25,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_oci8_int.h 294441 2010-02-03 19:37:35Z pajoye $ */ +/* $Id: php_oci8_int.h 293180 2010-01-06 18:58:16Z sixd $ */ #if HAVE_OCI8 # ifndef PHP_OCI8_INT_H diff --git a/ext/oci8/tests/bind_char_1.phpt b/ext/oci8/tests/bind_char_1.phpt index 36574dbfb..71cccbfc5 100644 --- a/ext/oci8/tests/bind_char_1.phpt +++ b/ext/oci8/tests/bind_char_1.phpt @@ -5,14 +5,17 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- <?php +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff on the undefined cases with a 32bit 11.2.0.1 DB + require(dirname(__FILE__).'/connect.inc'); // Initialization @@ -219,7 +222,9 @@ Test 1.2: Type: AFC. Length: default :: Test 1.3: Type: AFC: Length: 0 Querying: - Oci_execute error ORA-1460 Exiting Query + :1: + :abc : + :: Test 1.4: Type: AFC: Length: strlen Querying: :1: @@ -227,7 +232,9 @@ Test 1.4: Type: AFC: Length: strlen :: Test 1.5: Type: AFC. Length: strlen-1 Querying: - Oci_execute error ORA-1460 Exiting Query + :1: + :abc : + :: Test 1.6: Type: AFC. Length: strlen+1 Querying: :1: @@ -263,7 +270,9 @@ Test 3.2: Type: AFC. Length: default :abc: Test 3.3: Type: AFC: Length: 0 Querying: - Oci_execute error ORA-1460 Exiting Query + :2: + :: + :abc: Test 3.4: Type: AFC: Length: strlen Querying: :2: @@ -271,7 +280,9 @@ Test 3.4: Type: AFC: Length: strlen :abc: Test 3.5: Type: AFC. Length: strlen-1 Querying: - Oci_execute error ORA-1460 Exiting Query + :2: + :: + :abc: Test 3.6: Type: AFC. Length: strlen+1 Querying: :2: diff --git a/ext/oci8/tests/bind_char_1_11gR1.phpt b/ext/oci8/tests/bind_char_1_11gR1.phpt new file mode 100644 index 000000000..60b7142ff --- /dev/null +++ b/ext/oci8/tests/bind_char_1_11gR1.phpt @@ -0,0 +1,297 @@ +--TEST-- +SELECT oci_bind_by_name with SQLT_AFC aka CHAR +--SKIPIF-- +<?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"); +} +?> +--FILE-- +<?php + +// Output is for 32 bit client to 64bit 11.1.0.6 + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + "drop table bind_char_tab", + "create table bind_char_tab (id number, c1 char(10), c2 varchar2(10))", + "insert into bind_char_tab values (1, 'abc', NULL)", + "insert into bind_char_tab values (2, NULL, 'abc')", + "insert into bind_char_tab values (3, NULL, 'abc ')" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + @oci_execute($s); +} + +// Run Test + +echo "*** Non-null Data Tests against CHAR***\n"; + +$bv1 = 'abc'; + +echo "Test 1.1: Type: default. Length: default\n"; +$s = oci_parse($c, "select * from bind_char_tab where c1 = :bv"); +$r = oci_bind_by_name($s, ":bv", $bv1); +if ($r) + do_e_q($s); + +echo "Test 1.2: Type: AFC. Length: default\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, -1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.3: Type: AFC: Length: 0\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, 0, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.4: Type: AFC: Length: strlen\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1), SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.5: Type: AFC. Length: strlen-1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.6: Type: AFC. Length: strlen+1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "\n\n*** NULL data tests against CHAR ***\n"; + +$bv1 = null; + +echo "Test 2.1: Type: default. Length: default\n"; +$s = oci_parse($c, "select * from bind_char_tab where c1 = :bv"); +$r = oci_bind_by_name($s, ":bv", $bv1); +if ($r) + do_e_q($s); + +echo "Test 2.2: Type: AFC. Length: default\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, -1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 2.3: Type: AFC: Length: 0\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, 0, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 2.4: Type: AFC: Length: strlen\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1), SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 2.5: Type: AFC. Length: strlen-1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 2.6: Type: AFC. Length: strlen+1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e_q($s); + + +echo "\n\n*** Non-null Data Tests against VARCHAR2***\n"; + +$bv1 = 'abc'; + +echo "Test 3.1: Type: default. Length: default\n"; +$s = oci_parse($c, "select * from bind_char_tab where c2 = :bv"); +$r = oci_bind_by_name($s, ":bv", $bv1); +if ($r) + do_e_q($s); + +echo "Test 3.2: Type: AFC. Length: default\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, -1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 3.3: Type: AFC: Length: 0\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, 0, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 3.4: Type: AFC: Length: strlen\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1), SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 3.5: Type: AFC. Length: strlen-1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 3.6: Type: AFC. Length: strlen+1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e_q($s); + + +echo "\n\n*** NULL data tests against VARCHAR2 ***\n"; + +$bv1 = null; + +echo "Test 4.1: Type: default. Length: default\n"; +$s = oci_parse($c, "select * from bind_char_tab where c2 = :bv"); +$r = oci_bind_by_name($s, ":bv", $bv1); +if ($r) + do_e_q($s); + +echo "Test 4.2: Type: AFC. Length: default\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, -1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 4.3: Type: AFC: Length: 0\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, 0, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 4.4: Type: AFC: Length: strlen\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1), SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 4.5: Type: AFC. Length: strlen-1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 4.6: Type: AFC. Length: strlen+1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e_q($s); + + + +function do_e_q($s) +{ + echo " Querying:\n"; + + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + echo " Oci_execute error ORA-".$m['code']." Exiting Query\n"; + return; + } + while ($row = oci_fetch_array($s, OCI_ASSOC+OCI_RETURN_NULLS)) { + foreach ($row as $item) { + echo " :" . $item . ":\n"; + } + } +} + +// Cleanup +$stmtarray = array( + "drop table bind_char_tab" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +echo "Done\n"; + +?> +--EXPECT-- +*** Non-null Data Tests against CHAR*** +Test 1.1: Type: default. Length: default + Querying: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :abc : + :: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :abc : + :: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :abc : + :: + + +*** NULL data tests against CHAR *** +Test 2.1: Type: default. Length: default + Querying: +Test 2.2: Type: AFC. Length: default + Querying: +Test 2.3: Type: AFC: Length: 0 + Querying: +Test 2.4: Type: AFC: Length: strlen + Querying: +Test 2.5: Type: AFC. Length: strlen-1 + Querying: +Test 2.6: Type: AFC. Length: strlen+1 + Querying: + + +*** Non-null Data Tests against VARCHAR2*** +Test 3.1: Type: default. Length: default + Querying: + :2: + :: + :abc: +Test 3.2: Type: AFC. Length: default + Querying: + :2: + :: + :abc: +Test 3.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.4: Type: AFC: Length: strlen + Querying: + :2: + :: + :abc: +Test 3.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 3.6: Type: AFC. Length: strlen+1 + Querying: + :2: + :: + :abc: + + +*** NULL data tests against VARCHAR2 *** +Test 4.1: Type: default. Length: default + Querying: +Test 4.2: Type: AFC. Length: default + Querying: +Test 4.3: Type: AFC: Length: 0 + Querying: +Test 4.4: Type: AFC: Length: strlen + Querying: +Test 4.5: Type: AFC. Length: strlen-1 + Querying: +Test 4.6: Type: AFC. Length: strlen+1 + Querying: +Done diff --git a/ext/oci8/tests/bind_char_2.phpt b/ext/oci8/tests/bind_char_2.phpt index f0f41663f..6c7dbafcc 100644 --- a/ext/oci8/tests/bind_char_2.phpt +++ b/ext/oci8/tests/bind_char_2.phpt @@ -5,14 +5,17 @@ SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- <?php +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff on the undefined cases with a 32bit 11.2.0.1 DB + require(dirname(__FILE__).'/connect.inc'); // Initialization @@ -115,7 +118,8 @@ Test 1.4: Type: AFC: Length: strlen :2008-04-20: Test 1.5: Type: AFC. Length: strlen-1 Querying: - Oci_execute error ORA-1460 Exiting Query + :1: + :2008-04-20: Test 1.6: Type: AFC. Length: strlen+1 Querying: :1: diff --git a/ext/oci8/tests/bind_char_2_11gR1.phpt b/ext/oci8/tests/bind_char_2_11gR1.phpt new file mode 100644 index 000000000..68a872fc4 --- /dev/null +++ b/ext/oci8/tests/bind_char_2_11gR1.phpt @@ -0,0 +1,123 @@ +--TEST-- +SELECT oci_bind_by_name with SQLT_AFC aka CHAR and dates +--SKIPIF-- +<?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"); +} +?> +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + "alter session set nls_date_format='YYYY-MM-DD'", + "drop table bind_char_tab", + "create table bind_char_tab (id number, c1 date)", + "insert into bind_char_tab values (1, '2008-04-20')", +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + @oci_execute($s); +} + +// Run Test + +$bv1 = '2008-04-20'; + +echo "Test 1.1: Type: default. Length: default\n"; +$s = oci_parse($c, "select * from bind_char_tab where c1 = :bv"); +$r = oci_bind_by_name($s, ":bv", $bv1); +if ($r) + do_e_q($s); + +echo "Test 1.2: Type: AFC. Length: default\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, -1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.3: Type: AFC: Length: 0\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, 0, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.4: Type: AFC: Length: strlen\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1), SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.5: Type: AFC. Length: strlen-1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e_q($s); + +echo "Test 1.6: Type: AFC. Length: strlen+1\n"; +$r = oci_bind_by_name($s, ":bv", $bv1, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e_q($s); + + +function do_e_q($s) +{ + echo " Querying:\n"; + + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + echo " Oci_execute error ORA-".$m['code']." Exiting Query\n"; + return; + } + while ($row = oci_fetch_array($s, OCI_ASSOC+OCI_RETURN_NULLS)) { + foreach ($row as $item) { + echo " :" . $item . ":\n"; + } + } +} + +// Cleanup +$stmtarray = array( + "drop table bind_char_tab" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +echo "Done\n"; + +?> +--EXPECT-- +Test 1.1: Type: default. Length: default + Querying: + :1: + :2008-04-20: +Test 1.2: Type: AFC. Length: default + Querying: + :1: + :2008-04-20: +Test 1.3: Type: AFC: Length: 0 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.4: Type: AFC: Length: strlen + Querying: + :1: + :2008-04-20: +Test 1.5: Type: AFC. Length: strlen-1 + Querying: + Oci_execute error ORA-1460 Exiting Query +Test 1.6: Type: AFC. Length: strlen+1 + Querying: + :1: + :2008-04-20: +Done diff --git a/ext/oci8/tests/bind_char_3.phpt b/ext/oci8/tests/bind_char_3.phpt index 6d1b31150..8d4e95f6b 100644 --- a/ext/oci8/tests/bind_char_3.phpt +++ b/ext/oci8/tests/bind_char_3.phpt @@ -5,14 +5,17 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 11gR2 databases"); } ?> --FILE-- <?php +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff on the undefined cases with a 32bit 11.2.0.1 DB + require(dirname(__FILE__).'/connect.inc'); // Initialization @@ -254,9 +257,8 @@ echo "Done\n"; --EXPECTF-- Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default Executing: - Oci_execute error ORA-6502 string(3) "abc" -NULL +string(3) "abc" Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default Executing: string(3) "abc" @@ -268,20 +270,19 @@ string(3) "abc" Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC Executing: string(3) "abc" -string(10) "abc " +string(30) "abc " Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC Executing: string(3) "abc" -string(3) "abc" +string(9) "abc " Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC Executing: - Oci_execute error ORA-6502 -string(3) "abc" string(3) "abc" +string(6) "abc " Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC Executing: string(3) "abc" -string(4) "abc " +string(12) "abc " Tests with '' diff --git a/ext/oci8/tests/bind_char_3_11gR1.phpt b/ext/oci8/tests/bind_char_3_11gR1.phpt new file mode 100644 index 000000000..aaa537119 --- /dev/null +++ b/ext/oci8/tests/bind_char_3_11gR1.phpt @@ -0,0 +1,344 @@ +--TEST-- +PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to CHAR parameter +--SKIPIF-- +<?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"); +} +?> +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + "create or replace function bind_char_3_fn(p1 char) return char as begin return p1; end;", +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + @oci_execute($s); +} + +// Run Test + +echo "Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default\n"; + +$s = oci_parse($c, "begin :bv2 := bind_char_3_fn(:bv1); end;"); +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + +echo "Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1), SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "\n\nTests with ''\n\n"; + +echo "Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n"; + +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, 0, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, 1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "\n\nTests with NULL\n"; + +echo "Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +function do_e($s) +{ + echo " Executing:\n"; + + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + echo " Oci_execute error ORA-".$m['code']."\n"; + return; + } +} + +// Cleanup + +//require(dirname(__FILE__).'/drop_table.inc'); + +$stmtarray = array( + "drop function bind_char_3_fn" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +echo "Done\n"; + +?> +--EXPECTF-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(3) "abc" +string(10) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +string(3) "abc" +string(3) "abc" +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +string(3) "abc" +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +string(3) "abc" +string(4) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +string(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done diff --git a/ext/oci8/tests/bind_char_4.phpt b/ext/oci8/tests/bind_char_4.phpt index 7377604b0..40221b266 100644 --- a/ext/oci8/tests/bind_char_4.phpt +++ b/ext/oci8/tests/bind_char_4.phpt @@ -5,14 +5,17 @@ PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- <?php +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff on the undefined cases with a 32bit 11.2.0.1 DB + // Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR require(dirname(__FILE__).'/connect.inc'); @@ -256,9 +259,8 @@ echo "Done\n"; --EXPECTF-- Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default Executing: - Oci_execute error ORA-6502 string(3) "abc" -NULL +string(3) "abc" Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default Executing: string(3) "abc" @@ -270,20 +272,19 @@ string(3) "abc" Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC Executing: string(3) "abc" -string(10) "abc " +string(30) "abc " Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC Executing: string(3) "abc" -string(3) "abc" +string(9) "abc " Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC Executing: - Oci_execute error ORA-6502 -string(3) "abc" string(3) "abc" +string(6) "abc " Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC Executing: string(3) "abc" -string(4) "abc " +string(12) "abc " Tests with '' diff --git a/ext/oci8/tests/bind_char_4_11gR1.phpt b/ext/oci8/tests/bind_char_4_11gR1.phpt new file mode 100644 index 000000000..c4f7968e1 --- /dev/null +++ b/ext/oci8/tests/bind_char_4_11gR1.phpt @@ -0,0 +1,346 @@ +--TEST-- +PL/SQL oci_bind_by_name with SQLT_AFC aka CHAR to VARCHAR2 parameter +--SKIPIF-- +<?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"); +} +?> +--FILE-- +<?php + +// Same test as bind_char_3 but the PL/SQL function uses VARCHAR2 instead of CHAR + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + "create or replace function bind_char_3_fn(p1 varchar2) return varchar2 as begin return p1; end;", +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + @oci_execute($s); +} + +// Run Test + +echo "Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default\n"; + +$s = oci_parse($c, "begin :bv2 := bind_char_3_fn(:bv1); end;"); +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + +echo "Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1), SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)-1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC\n"; + +$bv1 = 'abc'; +$r = oci_bind_by_name($s, ':bv1', $bv1, strlen($bv1), SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, strlen($bv1)+1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "\n\nTests with ''\n\n"; + +echo "Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n"; + +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, 0, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC\n"; + +$bv1 = ''; +$r = oci_bind_by_name($s, ':bv1', $bv1, 1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "\n\nTests with NULL\n"; + +echo "Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 10, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +echo "Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 0, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + + +echo "Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC\n"; + +$bv1 = null; +$r = oci_bind_by_name($s, ':bv1', $bv1, -1, SQLT_AFC) && oci_bind_by_name($s, ':bv2', $bv2, 1, SQLT_AFC); +if ($r) + do_e($s); +var_dump($bv1, $bv2); + + +function do_e($s) +{ + echo " Executing:\n"; + + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + echo " Oci_execute error ORA-".$m['code']."\n"; + return; + } +} + +// Cleanup + +//require(dirname(__FILE__).'/drop_table.inc'); + +$stmtarray = array( + "drop function bind_char_3_fn" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +echo "Done\n"; + +?> +--EXPECTF-- +Test 1.1 In Length: default. In Type: default. Out Length: default. Out Type: default + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +NULL +Test 1.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(3) "abc" +string(3) "abc" +Test 1.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(3) "abc" +string(10) "abc " +Test 1.5 In Length: strlen. In Type: AFC. Out Length: strlen(input). Out Type: AFC + Executing: +string(3) "abc" +string(3) "abc" +Test 1.6 In Length: strlen. In Type: AFC. Out Length: strlen(input)-1. Out Type: AFC + Executing: + Oci_execute error ORA-6502 +string(3) "abc" +string(3) "abc" +Test 1.7 In Length: strlen. In Type: AFC. Out Length: strlen(input)+1. Out Type: AFC + Executing: +string(3) "abc" +string(4) "abc " + + +Tests with '' + +Test 2.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +string(0) "" +NULL +Test 2.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.6 In Length: 0. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +string(0) "" +NULL +Test 2.7 In Length: 1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +string(0) "" +NULL + + +Tests with NULL +Test 3.1 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.2 In Length: default. In Type: default. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.3 In Length: -1. In Type: AFC. Out Length: 10. Out Type: default + Executing: +NULL +NULL +Test 3.4 In Length: -1. In Type: AFC. Out Length: 10. Out Type: AFC + Executing: +NULL +NULL +Test 3.5 In Length: -1. In Type: AFC. Out Length: 0. Out Type: AFC + Executing: +NULL +NULL +Test 3.6 In Length: -1. In Type: AFC. Out Length: 1. Out Type: AFC + Executing: +NULL +NULL +Done diff --git a/ext/oci8/tests/bind_empty.phpt b/ext/oci8/tests/bind_empty.phpt index ba50f8617..4c6c07e3c 100644 --- a/ext/oci8/tests/bind_empty.phpt +++ b/ext/oci8/tests/bind_empty.phpt @@ -7,11 +7,11 @@ binding empty values require dirname(__FILE__).'/connect.inc'; -$drop = "DROP table bind_test"; +$drop = "DROP table bind_empty_tab"; $statement = oci_parse($c, $drop); @oci_execute($statement); -$create = "CREATE table bind_test(name VARCHAR(10))"; +$create = "CREATE table bind_empty_tab(name VARCHAR(10))"; $statement = oci_parse($c, $create); oci_execute($statement); @@ -19,7 +19,7 @@ oci_execute($statement); echo "Test 1\n"; $name = null; -$stmt = oci_parse($c, "UPDATE bind_test SET name=:name"); +$stmt = oci_parse($c, "UPDATE bind_empty_tab SET name=:name"); oci_bind_by_name($stmt, ":name", $name); var_dump(oci_execute($stmt)); @@ -27,26 +27,26 @@ var_dump(oci_execute($stmt)); echo "Test 2\n"; $name = ""; -$stmt = oci_parse($c, "UPDATE bind_test SET name=:name"); +$stmt = oci_parse($c, "UPDATE bind_empty_tab SET name=:name"); oci_bind_by_name($stmt, ":name", $name); var_dump(oci_execute($stmt)); echo "Test 3\n"; -$stmt = oci_parse($c, "INSERT INTO bind_test (NAME) VALUES ('abc')"); +$stmt = oci_parse($c, "INSERT INTO bind_empty_tab (NAME) VALUES ('abc')"); $res = oci_execute($stmt); -$stmt = oci_parse($c, "INSERT INTO bind_test (NAME) VALUES ('def')"); +$stmt = oci_parse($c, "INSERT INTO bind_empty_tab (NAME) VALUES ('def')"); $res = oci_execute($stmt); $name = null; -$stmt = oci_parse($c, "UPDATE bind_test SET name=:name WHERE NAME = 'abc'"); +$stmt = oci_parse($c, "UPDATE bind_empty_tab SET name=:name WHERE NAME = 'abc'"); oci_bind_by_name($stmt, ":name", $name); var_dump(oci_execute($stmt)); -$stid = oci_parse($c, "select * from bind_test order by 1"); +$stid = oci_parse($c, "select * from bind_empty_tab order by 1"); oci_execute($stid); oci_fetch_all($stid, $res); var_dump($res); @@ -54,26 +54,43 @@ var_dump($res); echo "Test 4\n"; $name = ""; -$stmt = oci_parse($c, "UPDATE bind_test SET name=:name WHERE NAME = 'def'"); +$stmt = oci_parse($c, "UPDATE bind_empty_tab SET name=:name WHERE NAME = 'def'"); oci_bind_by_name($stmt, ":name", $name); var_dump(oci_execute($stmt)); -$stid = oci_parse($c, "select * from bind_test order by 1"); +$stid = oci_parse($c, "select * from bind_empty_tab order by 1"); oci_execute($stid); oci_fetch_all($stid, $res); var_dump($res); +echo "Test 5\n"; + +$av = $bv = 'old'; +$s = oci_parse($c, "begin :bv := null; end; "); +oci_bind_by_name($s, ":bv", $bv); +oci_execute($s); +var_dump($av); +var_dump($bv); + +echo "Test 6\n"; + +$av = $bv = null; +$s = oci_parse($c, "begin :bv := null; end; "); +oci_bind_by_name($s, ":bv", $bv); +oci_execute($s); +var_dump($av); +var_dump($bv); // Clean up -$drop = "DROP table bind_test"; +$drop = "DROP table bind_empty_tab"; $statement = oci_parse($c, $drop); @oci_execute($statement); -echo "Done\n"; - ?> +===DONE=== +<?php exit(0); ?> --EXPECTF-- Test 1 bool(true) @@ -101,4 +118,10 @@ array(1) { NULL } } -Done +Test 5 +string(3) "old" +NULL +Test 6 +NULL +NULL +===DONE=== diff --git a/ext/oci8/tests/bind_long.phpt b/ext/oci8/tests/bind_long.phpt index 065a5f143..ba6bd4d04 100644 --- a/ext/oci8/tests/bind_long.phpt +++ b/ext/oci8/tests/bind_long.phpt @@ -5,7 +5,10 @@ bind LONG field --FILE-- <?php -require dirname(__FILE__)."/connect.inc"; +require(dirname(__FILE__)."/connect.inc"); + +$stmt = oci_parse($c, "drop table phptestlng"); +@oci_execute($stmt); $stmt = oci_parse($c, "create table phptestlng( id number(10), filetxt long)"); oci_execute($stmt); diff --git a/ext/oci8/tests/rowid_bind.phpt b/ext/oci8/tests/bind_rowid.phpt index f15d8f8bb..f15d8f8bb 100644 --- a/ext/oci8/tests/rowid_bind.phpt +++ b/ext/oci8/tests/bind_rowid.phpt diff --git a/ext/oci8/tests/bug27303_1.phpt b/ext/oci8/tests/bug27303_1.phpt new file mode 100644 index 000000000..82c2d6f50 --- /dev/null +++ b/ext/oci8/tests/bug27303_1.phpt @@ -0,0 +1,261 @@ +--TEST-- +Bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- +<?php +if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +require(dirname(__FILE__)."/connect.inc"); +$sv = oci_server_version($c); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); +if ($sv !== 1) { + die ("skip expected output only valid when using Oracle 19gR2 or 11gR2 databases"); +} +?> +--FILE-- +<?php + +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff with a 32bit 11.2.0.1 DB + +require dirname(__FILE__).'/connect.inc'; + +$create_st = array(); +$create_st[] = "drop sequence myseq"; +$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); +} + +define('MYLIMIT', 200); + +$stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; + +$stid = OCIParse($c, $stmt); +if (!$stid) { echo "Parse error"; die; } + +$r = OCIBindByName($stid, ':MYBV', $mybv); +if (!$r) { echo "Bind error"; die; } + +for ($i = 1; $i < MYLIMIT; $i++) { + $r = OCIExecute($stid, OCI_DEFAULT); + if (!$r) { echo "Execute error"; die; } + var_dump($mybv); +} + +OCICommit($c); + +$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); +} + +echo "Done\n"; +?> +--EXPECT-- +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "4" +string(1) "5" +string(1) "6" +string(1) "7" +string(1) "8" +string(1) "9" +string(2) "10" +string(2) "11" +string(2) "12" +string(2) "13" +string(2) "14" +string(2) "15" +string(2) "16" +string(2) "17" +string(2) "18" +string(2) "19" +string(2) "20" +string(2) "21" +string(2) "22" +string(2) "23" +string(2) "24" +string(2) "25" +string(2) "26" +string(2) "27" +string(2) "28" +string(2) "29" +string(2) "30" +string(2) "31" +string(2) "32" +string(2) "33" +string(2) "34" +string(2) "35" +string(2) "36" +string(2) "37" +string(2) "38" +string(2) "39" +string(2) "40" +string(2) "41" +string(2) "42" +string(2) "43" +string(2) "44" +string(2) "45" +string(2) "46" +string(2) "47" +string(2) "48" +string(2) "49" +string(2) "50" +string(2) "51" +string(2) "52" +string(2) "53" +string(2) "54" +string(2) "55" +string(2) "56" +string(2) "57" +string(2) "58" +string(2) "59" +string(2) "60" +string(2) "61" +string(2) "62" +string(2) "63" +string(2) "64" +string(2) "65" +string(2) "66" +string(2) "67" +string(2) "68" +string(2) "69" +string(2) "70" +string(2) "71" +string(2) "72" +string(2) "73" +string(2) "74" +string(2) "75" +string(2) "76" +string(2) "77" +string(2) "78" +string(2) "79" +string(2) "80" +string(2) "81" +string(2) "82" +string(2) "83" +string(2) "84" +string(2) "85" +string(2) "86" +string(2) "87" +string(2) "88" +string(2) "89" +string(2) "90" +string(2) "91" +string(2) "92" +string(2) "93" +string(2) "94" +string(2) "95" +string(2) "96" +string(2) "97" +string(2) "98" +string(2) "99" +string(3) "100" +string(3) "101" +string(3) "102" +string(3) "103" +string(3) "104" +string(3) "105" +string(3) "106" +string(3) "107" +string(3) "108" +string(3) "109" +string(3) "110" +string(3) "111" +string(3) "112" +string(3) "113" +string(3) "114" +string(3) "115" +string(3) "116" +string(3) "117" +string(3) "118" +string(3) "119" +string(3) "120" +string(3) "121" +string(3) "122" +string(3) "123" +string(3) "124" +string(3) "125" +string(3) "126" +string(3) "127" +string(3) "128" +string(3) "129" +string(3) "130" +string(3) "131" +string(3) "132" +string(3) "133" +string(3) "134" +string(3) "135" +string(3) "136" +string(3) "137" +string(3) "138" +string(3) "139" +string(3) "140" +string(3) "141" +string(3) "142" +string(3) "143" +string(3) "144" +string(3) "145" +string(3) "146" +string(3) "147" +string(3) "148" +string(3) "149" +string(3) "150" +string(3) "151" +string(3) "152" +string(3) "153" +string(3) "154" +string(3) "155" +string(3) "156" +string(3) "157" +string(3) "158" +string(3) "159" +string(3) "160" +string(3) "161" +string(3) "162" +string(3) "163" +string(3) "164" +string(3) "165" +string(3) "166" +string(3) "167" +string(3) "168" +string(3) "169" +string(3) "170" +string(3) "171" +string(3) "172" +string(3) "173" +string(3) "174" +string(3) "175" +string(3) "176" +string(3) "177" +string(3) "178" +string(3) "179" +string(3) "180" +string(3) "181" +string(3) "182" +string(3) "183" +string(3) "184" +string(3) "185" +string(3) "186" +string(3) "187" +string(3) "188" +string(3) "189" +string(3) "190" +string(3) "191" +string(3) "192" +string(3) "193" +string(3) "194" +string(3) "195" +string(3) "196" +string(3) "197" +string(3) "198" +string(3) "199" +Done
\ No newline at end of file diff --git a/ext/oci8/tests/bug27303.phpt b/ext/oci8/tests/bug27303_1_11gR1.phpt index 4dce84463..fe5c17c3e 100644 --- a/ext/oci8/tests/bug27303.phpt +++ b/ext/oci8/tests/bug27303_1_11gR1.phpt @@ -5,9 +5,9 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 11\.1\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 11gR1 database"); } ?> --FILE-- @@ -27,15 +27,13 @@ foreach ($create_st as $statement) { } define('MYLIMIT', 200); -define('INITMYBV', 11); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; $stid = OCIParse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -//$mybv = INITMYBV; // Uncomment this for the 2nd test only -$r = OCIBindByName($stid, ':MYBV', $mybv /*, 5 */); // Uncomment this for the 3rd test only +$r = OCIBindByName($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { diff --git a/ext/oci8/tests/bug27303_2.phpt b/ext/oci8/tests/bug27303_2.phpt index 63200ed52..44b9ce6c6 100644 --- a/ext/oci8/tests/bug27303_2.phpt +++ b/ext/oci8/tests/bug27303_2.phpt @@ -5,14 +5,17 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 database"); } ?> --FILE-- <?php +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff with a 32bit 11.2.0.1 DB + require dirname(__FILE__).'/connect.inc'; $create_st = array(); @@ -34,8 +37,8 @@ $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) $stid = OCIParse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$mybv = INITMYBV; // Uncomment this for the 2nd test only -$r = OCIBindByName($stid, ':MYBV', $mybv /*, 5 */); // Uncomment this for the 3rd test only +$mybv = INITMYBV; +$r = OCIBindByName($stid, ':MYBV', $mybv); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { @@ -157,104 +160,104 @@ string(2) "96" string(2) "97" string(2) "98" string(2) "99" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "10" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "11" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "12" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "13" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "14" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "15" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "16" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "17" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "18" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -string(2) "19" -Done +string(3) "100" +string(3) "101" +string(3) "102" +string(3) "103" +string(3) "104" +string(3) "105" +string(3) "106" +string(3) "107" +string(3) "108" +string(3) "109" +string(3) "110" +string(3) "111" +string(3) "112" +string(3) "113" +string(3) "114" +string(3) "115" +string(3) "116" +string(3) "117" +string(3) "118" +string(3) "119" +string(3) "120" +string(3) "121" +string(3) "122" +string(3) "123" +string(3) "124" +string(3) "125" +string(3) "126" +string(3) "127" +string(3) "128" +string(3) "129" +string(3) "130" +string(3) "131" +string(3) "132" +string(3) "133" +string(3) "134" +string(3) "135" +string(3) "136" +string(3) "137" +string(3) "138" +string(3) "139" +string(3) "140" +string(3) "141" +string(3) "142" +string(3) "143" +string(3) "144" +string(3) "145" +string(3) "146" +string(3) "147" +string(3) "148" +string(3) "149" +string(3) "150" +string(3) "151" +string(3) "152" +string(3) "153" +string(3) "154" +string(3) "155" +string(3) "156" +string(3) "157" +string(3) "158" +string(3) "159" +string(3) "160" +string(3) "161" +string(3) "162" +string(3) "163" +string(3) "164" +string(3) "165" +string(3) "166" +string(3) "167" +string(3) "168" +string(3) "169" +string(3) "170" +string(3) "171" +string(3) "172" +string(3) "173" +string(3) "174" +string(3) "175" +string(3) "176" +string(3) "177" +string(3) "178" +string(3) "179" +string(3) "180" +string(3) "181" +string(3) "182" +string(3) "183" +string(3) "184" +string(3) "185" +string(3) "186" +string(3) "187" +string(3) "188" +string(3) "189" +string(3) "190" +string(3) "191" +string(3) "192" +string(3) "193" +string(3) "194" +string(3) "195" +string(3) "196" +string(3) "197" +string(3) "198" +string(3) "199" +Done
\ No newline at end of file diff --git a/ext/oci8/tests/bug27303_2_11gR1.phpt b/ext/oci8/tests/bug27303_2_11gR1.phpt new file mode 100644 index 000000000..e1daef053 --- /dev/null +++ b/ext/oci8/tests/bug27303_2_11gR1.phpt @@ -0,0 +1,260 @@ +--TEST-- +Bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- +<?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"); +} +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$create_st = array(); +$create_st[] = "drop sequence myseq"; +$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); +} + +define('MYLIMIT', 200); +define('INITMYBV', 11); + +$stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; + +$stid = OCIParse($c, $stmt); +if (!$stid) { echo "Parse error"; die; } + +$mybv = INITMYBV; +$r = OCIBindByName($stid, ':MYBV', $mybv); +if (!$r) { echo "Bind error"; die; } + +for ($i = 1; $i < MYLIMIT; $i++) { + $r = OCIExecute($stid, OCI_DEFAULT); + if (!$r) { echo "Execute error"; die; } + var_dump($mybv); +} + +OCICommit($c); + +$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); +} + +echo "Done\n"; +?> +--EXPECT-- +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "4" +string(1) "5" +string(1) "6" +string(1) "7" +string(1) "8" +string(1) "9" +string(2) "10" +string(2) "11" +string(2) "12" +string(2) "13" +string(2) "14" +string(2) "15" +string(2) "16" +string(2) "17" +string(2) "18" +string(2) "19" +string(2) "20" +string(2) "21" +string(2) "22" +string(2) "23" +string(2) "24" +string(2) "25" +string(2) "26" +string(2) "27" +string(2) "28" +string(2) "29" +string(2) "30" +string(2) "31" +string(2) "32" +string(2) "33" +string(2) "34" +string(2) "35" +string(2) "36" +string(2) "37" +string(2) "38" +string(2) "39" +string(2) "40" +string(2) "41" +string(2) "42" +string(2) "43" +string(2) "44" +string(2) "45" +string(2) "46" +string(2) "47" +string(2) "48" +string(2) "49" +string(2) "50" +string(2) "51" +string(2) "52" +string(2) "53" +string(2) "54" +string(2) "55" +string(2) "56" +string(2) "57" +string(2) "58" +string(2) "59" +string(2) "60" +string(2) "61" +string(2) "62" +string(2) "63" +string(2) "64" +string(2) "65" +string(2) "66" +string(2) "67" +string(2) "68" +string(2) "69" +string(2) "70" +string(2) "71" +string(2) "72" +string(2) "73" +string(2) "74" +string(2) "75" +string(2) "76" +string(2) "77" +string(2) "78" +string(2) "79" +string(2) "80" +string(2) "81" +string(2) "82" +string(2) "83" +string(2) "84" +string(2) "85" +string(2) "86" +string(2) "87" +string(2) "88" +string(2) "89" +string(2) "90" +string(2) "91" +string(2) "92" +string(2) "93" +string(2) "94" +string(2) "95" +string(2) "96" +string(2) "97" +string(2) "98" +string(2) "99" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "10" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "11" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "12" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "13" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "14" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "15" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "16" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "17" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "18" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +string(2) "19" +Done diff --git a/ext/oci8/tests/bug27303_3.phpt b/ext/oci8/tests/bug27303_3.phpt index f290010f1..639538847 100644 --- a/ext/oci8/tests/bug27303_3.phpt +++ b/ext/oci8/tests/bug27303_3.phpt @@ -26,8 +26,8 @@ $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) $stid = OCIParse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -$mybv = INITMYBV; // Uncomment this for the 2nd test only -$r = OCIBindByName($stid, ':MYBV', $mybv, 5, SQLT_INT); // Uncomment this for the 3rd test only +$mybv = INITMYBV; +$r = OCIBindByName($stid, ':MYBV', $mybv, 5, SQLT_INT); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { diff --git a/ext/oci8/tests/bug27303_4.phpt b/ext/oci8/tests/bug27303_4.phpt index 031f0d1e1..3c35c65b7 100644 --- a/ext/oci8/tests/bug27303_4.phpt +++ b/ext/oci8/tests/bug27303_4.phpt @@ -5,14 +5,17 @@ Bug #27303 (OCIBindByName binds numeric PHP values as characters) if (!extension_loaded('oci8')) die ("skip no oci8 extension"); require(dirname(__FILE__)."/connect.inc"); $sv = oci_server_version($c); -$sv = preg_match('/Release 1[12]\./', $sv, $matches); +$sv = preg_match('/Release 1[01]\.2\./', $sv, $matches); if ($sv !== 1) { - die ("skip expected output only valid when using Oracle 11g+ database"); + die ("skip expected output only valid when using Oracle 10gR2 or 11gR2 databases"); } ?> --FILE-- <?php +// Note: expected output is valid for 32bit clients to 32bit 10gR2 XE or 11.2.0.1 64bit DBs. +// It will diff with a 32bit 11.2.0.1 DB + require dirname(__FILE__).'/connect.inc'; $create_st = array(); @@ -27,15 +30,13 @@ foreach ($create_st as $statement) { } define('MYLIMIT', 200); -define('INITMYBV', 11); $stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; $stid = OCIParse($c, $stmt); if (!$stid) { echo "Parse error"; die; } -//$mybv = INITMYBV; // Uncomment this for the 2nd test only -$r = OCIBindByName($stid, ':MYBV', $mybv, 0 ); // Uncomment this for the 3rd test only +$r = OCIBindByName($stid, ':MYBV', $mybv, 0 ); if (!$r) { echo "Bind error"; die; } for ($i = 1; $i < MYLIMIT; $i++) { @@ -67,194 +68,194 @@ string(1) "6" string(1) "7" string(1) "8" string(1) "9" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "2" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "3" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "4" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "5" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "6" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "7" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "8" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "9" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" -string(1) "1" +string(2) "10" +string(2) "11" +string(2) "12" +string(2) "13" +string(2) "14" +string(2) "15" +string(2) "16" +string(2) "17" +string(2) "18" +string(2) "19" +string(2) "20" +string(2) "21" +string(2) "22" +string(2) "23" +string(2) "24" +string(2) "25" +string(2) "26" +string(2) "27" +string(2) "28" +string(2) "29" +string(2) "30" +string(2) "31" +string(2) "32" +string(2) "33" +string(2) "34" +string(2) "35" +string(2) "36" +string(2) "37" +string(2) "38" +string(2) "39" +string(2) "40" +string(2) "41" +string(2) "42" +string(2) "43" +string(2) "44" +string(2) "45" +string(2) "46" +string(2) "47" +string(2) "48" +string(2) "49" +string(2) "50" +string(2) "51" +string(2) "52" +string(2) "53" +string(2) "54" +string(2) "55" +string(2) "56" +string(2) "57" +string(2) "58" +string(2) "59" +string(2) "60" +string(2) "61" +string(2) "62" +string(2) "63" +string(2) "64" +string(2) "65" +string(2) "66" +string(2) "67" +string(2) "68" +string(2) "69" +string(2) "70" +string(2) "71" +string(2) "72" +string(2) "73" +string(2) "74" +string(2) "75" +string(2) "76" +string(2) "77" +string(2) "78" +string(2) "79" +string(2) "80" +string(2) "81" +string(2) "82" +string(2) "83" +string(2) "84" +string(2) "85" +string(2) "86" +string(2) "87" +string(2) "88" +string(2) "89" +string(2) "90" +string(2) "91" +string(2) "92" +string(2) "93" +string(2) "94" +string(2) "95" +string(2) "96" +string(2) "97" +string(2) "98" +string(2) "99" +string(3) "100" +string(3) "101" +string(3) "102" +string(3) "103" +string(3) "104" +string(3) "105" +string(3) "106" +string(3) "107" +string(3) "108" +string(3) "109" +string(3) "110" +string(3) "111" +string(3) "112" +string(3) "113" +string(3) "114" +string(3) "115" +string(3) "116" +string(3) "117" +string(3) "118" +string(3) "119" +string(3) "120" +string(3) "121" +string(3) "122" +string(3) "123" +string(3) "124" +string(3) "125" +string(3) "126" +string(3) "127" +string(3) "128" +string(3) "129" +string(3) "130" +string(3) "131" +string(3) "132" +string(3) "133" +string(3) "134" +string(3) "135" +string(3) "136" +string(3) "137" +string(3) "138" +string(3) "139" +string(3) "140" +string(3) "141" +string(3) "142" +string(3) "143" +string(3) "144" +string(3) "145" +string(3) "146" +string(3) "147" +string(3) "148" +string(3) "149" +string(3) "150" +string(3) "151" +string(3) "152" +string(3) "153" +string(3) "154" +string(3) "155" +string(3) "156" +string(3) "157" +string(3) "158" +string(3) "159" +string(3) "160" +string(3) "161" +string(3) "162" +string(3) "163" +string(3) "164" +string(3) "165" +string(3) "166" +string(3) "167" +string(3) "168" +string(3) "169" +string(3) "170" +string(3) "171" +string(3) "172" +string(3) "173" +string(3) "174" +string(3) "175" +string(3) "176" +string(3) "177" +string(3) "178" +string(3) "179" +string(3) "180" +string(3) "181" +string(3) "182" +string(3) "183" +string(3) "184" +string(3) "185" +string(3) "186" +string(3) "187" +string(3) "188" +string(3) "189" +string(3) "190" +string(3) "191" +string(3) "192" +string(3) "193" +string(3) "194" +string(3) "195" +string(3) "196" +string(3) "197" +string(3) "198" +string(3) "199" Done diff --git a/ext/oci8/tests/bug27303_4_11gR1.phpt b/ext/oci8/tests/bug27303_4_11gR1.phpt new file mode 100644 index 000000000..0c88360be --- /dev/null +++ b/ext/oci8/tests/bug27303_4_11gR1.phpt @@ -0,0 +1,258 @@ +--TEST-- +Bug #27303 (OCIBindByName binds numeric PHP values as characters) +--SKIPIF-- +<?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"); +} +?> +--FILE-- +<?php + +require dirname(__FILE__).'/connect.inc'; + +$create_st = array(); +$create_st[] = "drop sequence myseq"; +$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); +} + +define('MYLIMIT', 200); + +$stmt = "insert into mytab (mydata, seqcol) values ('Some data', myseq.nextval) returning seqcol into :mybv"; + +$stid = OCIParse($c, $stmt); +if (!$stid) { echo "Parse error"; die; } + +$r = OCIBindByName($stid, ':MYBV', $mybv, 0 ); +if (!$r) { echo "Bind error"; die; } + +for ($i = 1; $i < MYLIMIT; $i++) { + $r = OCIExecute($stid, OCI_DEFAULT); + if (!$r) { echo "Execute error"; die; } + var_dump($mybv); +} + +OCICommit($c); + +$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); +} + +echo "Done\n"; +?> +--EXPECT-- +string(1) "1" +string(1) "2" +string(1) "3" +string(1) "4" +string(1) "5" +string(1) "6" +string(1) "7" +string(1) "8" +string(1) "9" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "2" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "3" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "4" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "5" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "6" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "7" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "8" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "9" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +string(1) "1" +Done diff --git a/ext/oci8/tests/bug44113.phpt b/ext/oci8/tests/bug44113.phpt index d6c297863..eee21c3ae 100644 --- a/ext/oci8/tests/bug44113.phpt +++ b/ext/oci8/tests/bug44113.phpt @@ -1,7 +1,11 @@ --TEST-- Bug #44113 (New collection creation can fail with OCI-22303) --SKIPIF-- -<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> +<?php +if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +require(dirname(__FILE__).'/details.inc'); +if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +?> --FILE-- <?php diff --git a/ext/oci8/tests/bug51253.phpt b/ext/oci8/tests/bug51253.phpt new file mode 100644 index 000000000..fea3333cc --- /dev/null +++ b/ext/oci8/tests/bug51253.phpt @@ -0,0 +1,165 @@ +--TEST-- +Bug #51253 (oci_bind_array_by_name() array references) +--SKIPIF-- +<?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?> +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +$drop = "DROP table bind_test"; +$statement = oci_parse($c, $drop); +@oci_execute($statement); + +$create = "CREATE table bind_test(name VARCHAR(20))"; +$statement = oci_parse($c, $create); +oci_execute($statement); + +$create_pkg = " +CREATE OR REPLACE PACKAGE ARRAYBINDPKG1 AS + TYPE ARRTYPE IS TABLE OF VARCHAR(20) INDEX BY BINARY_INTEGER; + PROCEDURE iobind(c1 IN OUT ARRTYPE); +END ARRAYBINDPKG1;"; +$statement = oci_parse($c, $create_pkg); +oci_execute($statement); + +$create_pkg_body = " +CREATE OR REPLACE PACKAGE BODY ARRAYBINDPKG1 AS + CURSOR CUR IS SELECT name FROM bind_test; + PROCEDURE iobind(c1 IN OUT ARRTYPE) IS + BEGIN + FOR i IN 1..5 LOOP + INSERT INTO bind_test VALUES (c1(i)); + END LOOP; + IF NOT CUR%ISOPEN THEN + OPEN CUR; + END IF; + FOR i IN REVERSE 1..5 LOOP + FETCH CUR INTO c1(i); + IF CUR%NOTFOUND THEN + CLOSE CUR; + EXIT; + END IF; + END LOOP; + END iobind; +END ARRAYBINDPKG1;"; +$statement = oci_parse($c, $create_pkg_body); +oci_execute($statement); + +echo "Test 1\n"; +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array1 = array("one", "two", "three", "four", "five"); +$array2 = $array1; +oci_bind_array_by_name($statement, ":c1", $array2, 5, -1, SQLT_CHR); +oci_execute($statement); + +var_dump($array1); +var_dump($array2); + + +echo "Test 2\n"; +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array1 = array("one", "two", "three", "four", "five"); +$array2 = &$array1; +oci_bind_array_by_name($statement, ":c1", $array2, 5, -1, SQLT_CHR); +oci_execute($statement); + +var_dump($array1); +var_dump($array2); + + +echo "Test 3\n"; +$statement = oci_parse($c, "BEGIN ARRAYBINDPKG1.iobind(:c1); END;"); +$array1 = array("one", "two", "three", "four", "five"); +$array2 = &$array1; +oci_bind_array_by_name($statement, ":c1", $array1, 5, -1, SQLT_CHR); +oci_execute($statement); + +var_dump($array1); +var_dump($array2); + +// Cleanup +$statement = oci_parse($c, "DROP PACKAGE ARRAYBINDPKG1"); +@oci_execute($statement); +$statement = oci_parse($c, "DROP TABLE BIND_TEST"); +@oci_execute($statement); + +echo "Done\n"; +?> +--EXPECT-- +Test 1 +array(5) { + [0]=> + string(4) "five" + [1]=> + string(4) "four" + [2]=> + string(5) "three" + [3]=> + string(3) "two" + [4]=> + string(3) "one" +} +array(5) { + [0]=> + string(4) "five" + [1]=> + string(4) "four" + [2]=> + string(5) "three" + [3]=> + string(3) "two" + [4]=> + string(3) "one" +} +Test 2 +array(5) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" + [2]=> + string(5) "three" + [3]=> + string(4) "four" + [4]=> + string(4) "five" +} +array(5) { + [0]=> + string(3) "one" + [1]=> + string(3) "two" + [2]=> + string(5) "three" + [3]=> + string(4) "four" + [4]=> + string(4) "five" +} +Test 3 +array(5) { + [0]=> + string(4) "five" + [1]=> + string(4) "four" + [2]=> + string(5) "three" + [3]=> + string(3) "two" + [4]=> + string(3) "one" +} +array(5) { + [0]=> + string(4) "five" + [1]=> + string(4) "four" + [2]=> + string(5) "three" + [3]=> + string(3) "two" + [4]=> + string(3) "one" +} +Done diff --git a/ext/oci8/tests/bug51291.phpt b/ext/oci8/tests/bug51291.phpt new file mode 100644 index 000000000..75851d63b --- /dev/null +++ b/ext/oci8/tests/bug51291.phpt @@ -0,0 +1,434 @@ +--TEST-- +Bug #51291 (oci_error() doesn't report last error when called two times) +--SKIPIF-- +<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +echo "Test 1 - Parse\n"; + +$s = @oci_parse($c, "select ' from dual"); +if (!$s) { + var_dump(oci_error($c)); + echo "2nd call\n"; + var_dump(oci_error($c)); +} + +echo "\nTest 2 - Parse\n"; + +$s = @oci_parse($c, "select ' from dual"); +if (!$s) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + echo "2nd call\n"; + var_dump(oci_error(), oci_error($c), oci_error($s)); +} + +echo "\nTest 3 - Execute\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error($s)); + echo "2nd call\n"; + var_dump(oci_error($s)); +} + +echo "\nTest 4 - Execute - consecutive oci_error calls of different kinds\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + echo "2nd call\n"; + var_dump(oci_error(), oci_error($c), oci_error($s)); +} + + +echo "\nTest 5 - Execute - after oci_rollback\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + $r = oci_rollback($c); + echo "Rollback status is "; + if (is_null($r)) echo "null"; + else if ($r === false) echo "false"; + else if ($r === true) echo "true"; + else echo $r; + echo "\n"; + echo "2nd call after oci_rollback\n"; + var_dump(oci_error(), oci_error($c), oci_error($s)); +} + + +echo "\nTest 6 - Execute - after successful 2nd query with new handle\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + $s2 = oci_parse($c, 'select 1 from dual'); + $r = oci_execute($s2, OCI_DEFAULT); + echo "Execute status is "; + if (is_null($r)) echo "null"; + else if ($r === false) echo "false"; + else if ($r === true) echo "true"; + else echo $r; + echo "\n"; + echo "2nd call after successful execute\n"; + var_dump(oci_error(), oci_error($c), oci_error($s), oci_error($s2)); +} + + +echo "\nTest 7 - Execute - after successful 2nd query with same handle\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + $s = oci_parse($c, 'select 1 from dual'); + $r = oci_execute($s, OCI_DEFAULT); + echo "Execute status is "; + if (is_null($r)) echo "null"; + else if ($r === false) echo "false"; + else if ($r === true) echo "true"; + else echo $r; + echo "\n"; + echo "2nd call after successful execute\n"; + var_dump(oci_error(), oci_error($c), oci_error($s)); +} + + +echo "\nTest 8 - Execute - after unsuccessful 2nd query with new handle\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + $s2 = oci_parse($c, 'select reallynothere from dual'); + $r = oci_execute($s2, OCI_DEFAULT); + echo "Execute status is "; + if (is_null($r)) echo "null"; + else if ($r === false) echo "false"; + else if ($r === true) echo "true"; + else echo $r; + echo "\n"; + echo "2nd call after unsuccessful execute\n"; + var_dump(oci_error(), oci_error($c), oci_error($s), oci_error($s2)); +} + +echo "\nTest 9 - Execute - after unsuccessful 2nd query with same handle\n"; + +$s = @oci_parse($c, 'select doesnotexist from dual'); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + $s = oci_parse($c, 'select reallynothere from dual'); + $r = oci_execute($s, OCI_DEFAULT); + echo "Execute status is "; + if (is_null($r)) echo "null"; + else if ($r === false) echo "false"; + else if ($r === true) echo "true"; + else echo $r; + echo "\n"; + echo "2nd call after unsuccessful execute\n"; + var_dump(oci_error(), oci_error($c), oci_error($s)); +} + +echo "\nTest 10 - Execute - after successful 2nd query with same statement\n"; + +$s = oci_parse($c, "declare e exception; begin if :bv = 1 then raise e; end if; end;"); +$bv = 1; +oci_bind_by_name($s, ":bv", $bv); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + var_dump(oci_error(), oci_error($c), oci_error($s)); + $bv = 0; + $r = oci_execute($s, OCI_DEFAULT); + echo "Execute status is "; + if (is_null($r)) echo "null"; + else if ($r === false) echo "false"; + else if ($r === true) echo "true"; + else echo $r; + echo "\n"; + echo "2nd call after successful execute\n"; + var_dump(oci_error(), oci_error($c), oci_error($s)); +} + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +Test 1 - Parse +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +2nd call +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} + +Test 2 - Parse + +Warning: oci_error() expects parameter 1 to be resource, boolean given in %sbug51291.php on line %d +bool(false) +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +NULL +2nd call + +Warning: oci_error() expects parameter 1 to be resource, boolean given in %sbug51291.php on line %d +bool(false) +array(4) { + ["code"]=> + int(1756) + ["message"]=> + string(48) "ORA-01756: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(0) "" +} +NULL + +Test 3 - Execute +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +2nd call +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} + +Test 4 - Execute - consecutive oci_error calls of different kinds +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +2nd call +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} + +Test 5 - Execute - after oci_rollback +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +Rollback status is true +2nd call after oci_rollback +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} + +Test 6 - Execute - after successful 2nd query with new handle +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +Execute status is true +2nd call after successful execute +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +bool(false) + +Test 7 - Execute - after successful 2nd query with same handle +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +Execute status is true +2nd call after successful execute +bool(false) +bool(false) +bool(false) + +Test 8 - Execute - after unsuccessful 2nd query with new handle +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} + +Warning: oci_execute(): ORA-00904: "REALLYNOTHERE": %s in %sbug51291.php on line %d +Execute status is false +2nd call after unsuccessful execute +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(46) "ORA-00904: "REALLYNOTHERE": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(30) "select reallynothere from dual" +} + +Test 9 - Execute - after unsuccessful 2nd query with same handle +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(45) "ORA-00904: "DOESNOTEXIST": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(29) "select doesnotexist from dual" +} + +Warning: oci_execute(): ORA-00904: "REALLYNOTHERE": %s in %sbug51291.php on line %d +Execute status is false +2nd call after unsuccessful execute +bool(false) +bool(false) +array(4) { + ["code"]=> + int(904) + ["message"]=> + string(46) "ORA-00904: "REALLYNOTHERE": %s" + ["offset"]=> + int(7) + ["sqltext"]=> + string(30) "select reallynothere from dual" +} + +Test 10 - Execute - after successful 2nd query with same statement +bool(false) +bool(false) +array(4) { + ["code"]=> + int(6510) + ["message"]=> + string(72) "ORA-06510: PL/SQL: %s +ORA-06512: %s" + ["offset"]=> + int(0) + ["sqltext"]=> + string(64) "declare e exception; begin if :bv = 1 then raise e; end if; end;" +} +Execute status is true +2nd call after successful execute +bool(false) +bool(false) +bool(false) +===DONE=== diff --git a/ext/oci8/tests/commit.phpt b/ext/oci8/tests/commit_001.phpt index 836d2cd1d..836d2cd1d 100644 --- a/ext/oci8/tests/commit.phpt +++ b/ext/oci8/tests/commit_001.phpt diff --git a/ext/oci8/tests/commit_002.phpt b/ext/oci8/tests/commit_002.phpt new file mode 100644 index 000000000..1819fe116 --- /dev/null +++ b/ext/oci8/tests/commit_002.phpt @@ -0,0 +1,90 @@ +--TEST-- +Test oci_commit failure +--SKIPIF-- +<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> +--FILE-- +<?php + +require(dirname(__FILE__).'/connect.inc'); + +// Initialization + +$stmtarray = array( + "drop table commit_002_tab", + "create table commit_002_tab + ( x int constraint commit_002_tab_check_x check ( x > 0 ) deferrable initially immediate, + y int constraint commit_002_tab_check_y check ( y > 0 ) deferrable initially deferred)" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + $r = @oci_execute($s); + if (!$r) { + $m = oci_error($s); + if (!in_array($m['code'], array( // ignore expected errors + 942 // table or view does not exist + , 2289 // sequence does not exist + , 4080 // trigger does not exist + , 38802 // edition does not exist + ))) { + echo $stmt . PHP_EOL . $m['message'] . PHP_EOL; + } + } +} + +// Run Test + +echo "First Insert\n"; +$s = oci_parse($c, "insert into commit_002_tab values (-1, 1)"); +$r = @oci_execute($s, OCI_DEFAULT); +if (!$r) { + $m = oci_error($s); + echo 'Could not execute: '. $m['message'] . "\n"; +} +$r = oci_commit($c); +if (!$r) { + $m = oci_error($c); + echo 'Could not commit: '. $m['message'] . "\n"; +} + + +echo "Second Insert\n"; +$s = oci_parse($c, "insert into commit_002_tab values (1, -1)"); +$r = @oci_execute($s, OCI_NO_AUTO_COMMIT); +if (!$r) { + $m = oci_error($s); + echo 'Could not execute: '. $m['message'] . "\n"; +} +$r = oci_commit($c); +if (!$r) { + $m = oci_error($c); + echo 'Could not commit: '. $m['message'] . "\n"; +} + + +// Clean up + +$stmtarray = array( + "drop table commit_002_tab" +); + +foreach ($stmtarray as $stmt) { + $s = oci_parse($c, $stmt); + oci_execute($s); +} + +oci_close($c); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +First Insert +Could not execute: ORA-02290: %s (%s.COMMIT_002_TAB_CHECK_X) %s +Second Insert + +Warning: oci_commit(): ORA-02091: %s +ORA-02290: %s (%s.COMMIT_002_TAB_CHECK_Y) %s in %scommit_002.php on line %d +Could not commit: ORA-02091: %s +ORA-02290: %s (%s.COMMIT_002_TAB_CHECK_Y) %s +===DONE=== diff --git a/ext/oci8/tests/conn_attr_4.phpt b/ext/oci8/tests/conn_attr_4.phpt index 2ef2673fd..9f55f5326 100644 --- a/ext/oci8/tests/conn_attr_4.phpt +++ b/ext/oci8/tests/conn_attr_4.phpt @@ -5,6 +5,7 @@ Set and get of connection attributes with errors. require(dirname(__FILE__)."/connect.inc"); 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'); $sv = oci_server_version($c); $sv = preg_match('/Release 1[012]\./', $sv, $matches); diff --git a/ext/oci8/tests/details.inc b/ext/oci8/tests/details.inc index 75a136ce3..922b8c4f4 100644 --- a/ext/oci8/tests/details.inc +++ b/ext/oci8/tests/details.inc @@ -12,6 +12,9 @@ * 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. */ if (file_exists(dirname(__FILE__)."/details_local.inc")) { @@ -33,12 +36,19 @@ if (file_exists(dirname(__FILE__)."/details_local.inc")) { } else { $oracle_on_localhost = FALSE; } + $stress_test = getenv('PHP_OCI8_STRESS_TEST'); + if (false !== $stress_test && 0 == strcasecmp($stress_test,'TRUE')) { + $stress_test = TRUE; + } else { + $stress_test = FALSE; + } } else { $user = "system"; $password = "oracle"; $dbase = "localhost/XE"; $oracle_on_localhost = TRUE; $test_drcp = FALSE; + $stress_test = FALSE; } /* diff --git a/ext/oci8/tests/bind_error.phpt b/ext/oci8/tests/error_bind.phpt index ad66ad59f..ad66ad59f 100644 --- a/ext/oci8/tests/bind_error.phpt +++ b/ext/oci8/tests/error_bind.phpt diff --git a/ext/oci8/tests/parse_error.phpt b/ext/oci8/tests/error_parse.phpt index 8100e3170..8100e3170 100644 --- a/ext/oci8/tests/parse_error.phpt +++ b/ext/oci8/tests/error_parse.phpt diff --git a/ext/oci8/tests/extauth_01.phpt b/ext/oci8/tests/extauth_01.phpt index 30250ec24..993198c4d 100644 --- a/ext/oci8/tests/extauth_01.phpt +++ b/ext/oci8/tests/extauth_01.phpt @@ -4,6 +4,8 @@ Test External Authentication errors with oci_connect <?php 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'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_02.phpt b/ext/oci8/tests/extauth_02.phpt index d648eef08..d3bee0bfc 100644 --- a/ext/oci8/tests/extauth_02.phpt +++ b/ext/oci8/tests/extauth_02.phpt @@ -4,6 +4,8 @@ Test External Authentication errors with oci_new_connect <?php 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'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/extauth_03.phpt b/ext/oci8/tests/extauth_03.phpt index 021492f76..e159c50f9 100644 --- a/ext/oci8/tests/extauth_03.phpt +++ b/ext/oci8/tests/extauth_03.phpt @@ -4,6 +4,8 @@ Test External Authentication errors with oci_pconnect <?php 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'); ?> --INI-- oci8.privileged_connect=1 diff --git a/ext/oci8/tests/fetch_object_2.phpt b/ext/oci8/tests/fetch_object_2.phpt index 342503d91..b078ebb1d 100644 --- a/ext/oci8/tests/fetch_object_2.phpt +++ b/ext/oci8/tests/fetch_object_2.phpt @@ -87,7 +87,7 @@ object(stdClass)#%d (3) { [%u|b%"COL2"]=> object(OCI-Lob)#%d (1) { [%u|b%"descriptor"]=> - resource(15) of type (oci8 descriptor) + resource(%d) of type (oci8 descriptor) } [%u|b%"COL3"]=> %unicode|string%(11) "1 more text" @@ -98,7 +98,7 @@ object(stdClass)#%d (3) { [%u|b%"COL2"]=> object(OCI-Lob)#%d (1) { [%u|b%"descriptor"]=> - resource(16) of type (oci8 descriptor) + resource(%d) of type (oci8 descriptor) } [%u|b%"COL3"]=> NULL @@ -109,7 +109,7 @@ object(stdClass)#%d (3) { [%u|b%"COL2"]=> object(OCI-Lob)#%d (1) { [%u|b%"descriptor"]=> - resource(17) of type (oci8 descriptor) + resource(%d) of type (oci8 descriptor) } [%u|b%"COL3"]=> %unicode|string%(11) "3 more text" diff --git a/ext/oci8/tests/lob_043.phpt b/ext/oci8/tests/lob_043.phpt index 5ae2d45eb..0280ef6de 100644 --- a/ext/oci8/tests/lob_043.phpt +++ b/ext/oci8/tests/lob_043.phpt @@ -1,7 +1,10 @@ --TEST-- Bug #49560 (LOB resource destructor and refcount test) --SKIPIF-- -<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); ?> +<?php if (!extension_loaded('oci8')) die ("skip no oci8 extension"); +require(dirname(__FILE__).'/details.inc'); +if ($stress_test !== true) die ('skip Slow test not run when $stress_test is FALSE'); +?> --FILE-- <?php diff --git a/ext/oci8/tests/bug6109.phpt b/ext/oci8/tests/pecl_bug6109.phpt index 029c5dddb..d0762fa88 100644 --- a/ext/oci8/tests/bug6109.phpt +++ b/ext/oci8/tests/pecl_bug6109.phpt @@ -11,10 +11,6 @@ require(dirname(__FILE__).'/connect.inc'); echo "Test 1\n"; -echo "Once Oracle has popped the message from its stack, the message is\n"; -echo "no longer available.\n"; - - $s = oci_parse($c, 'delete from table_does_not_exist'); $r = @oci_execute($s); @@ -36,11 +32,9 @@ echo "Done\n"; ?> --EXPECTF-- Test 1 -Once Oracle has popped the message from its stack, the message is -no longer available. 0 -> ORA-00942: %s -1 -> -2 -> -3 -> -4 -> +1 -> ORA-00942: %s +2 -> ORA-00942: %s +3 -> ORA-00942: %s +4 -> ORA-00942: %s Done diff --git a/ext/oci8/tests/refcur_prefetch_1.phpt b/ext/oci8/tests/refcur_prefetch_1.phpt index c603fdd5b..904e4da1f 100644 --- a/ext/oci8/tests/refcur_prefetch_1.phpt +++ b/ext/oci8/tests/refcur_prefetch_1.phpt @@ -175,7 +175,7 @@ array(2) { } Warning: oci_execute(): ORA-01002: %s -ORA-06512: at "SYSTEM.REFCURPKG", line %d +ORA-06512: at "%s.REFCURPKG", line %d ORA-06512: at line %d in %s on line %d Fetch Row from PL/SQL NULL @@ -218,7 +218,7 @@ array(2) { } Warning: oci_execute(): ORA-01002: %s -ORA-06512: at "SYSTEM.REFCURPKG", line %d +ORA-06512: at "%s.REFCURPKG", line %d ORA-06512: at line %d in %s on line %d Fetch Row from PL/SQL NULL diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 631b10ec5..921454094 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_odbc.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_odbc.c 296467 2010-03-20 18:19:16Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -2864,7 +2864,7 @@ PHP_FUNCTION(odbc_autocommit) ZEND_FETCH_RESOURCE2(conn, odbc_connection *, &pv_conn, -1, "ODBC-Link", le_conn, le_pconn); - if (pv_onoff) { + if (ZEND_NUM_ARGS() > 1) { rc = SQLSetConnectOption(conn->hdbc, SQL_AUTOCOMMIT, (pv_onoff) ? SQL_AUTOCOMMIT_ON : SQL_AUTOCOMMIT_OFF); if (rc != SQL_SUCCESS && rc != SQL_SUCCESS_WITH_INFO) { odbc_sql_error(conn, SQL_NULL_HSTMT, "Set autocommit"); diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 8df0d9d69..af968c83f 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: openssl.c 294508 2010-02-04 09:23:22Z pajoye $ */ +/* $Id: openssl.c 300764 2010-06-26 16:03:39Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -99,6 +99,7 @@ PHP_FUNCTION(openssl_get_cipher_methods); PHP_FUNCTION(openssl_digest); PHP_FUNCTION(openssl_encrypt); PHP_FUNCTION(openssl_decrypt); +PHP_FUNCTION(openssl_cipher_iv_length); PHP_FUNCTION(openssl_dh_compute_key); PHP_FUNCTION(openssl_random_pseudo_bytes); @@ -347,6 +348,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_encrypt, 0, 0, 3) ZEND_ARG_INFO(0, method) ZEND_ARG_INFO(0, password) ZEND_ARG_INFO(0, raw_output) + ZEND_ARG_INFO(0, iv) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_decrypt, 0, 0, 3) @@ -354,6 +356,11 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_openssl_decrypt, 0, 0, 3) ZEND_ARG_INFO(0, method) ZEND_ARG_INFO(0, password) ZEND_ARG_INFO(0, raw_input) + ZEND_ARG_INFO(0, iv) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_openssl_cipher_iv_length, 0) + ZEND_ARG_INFO(0, method) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO(arginfo_openssl_dh_compute_key, 0) @@ -379,9 +386,9 @@ const zend_function_entry openssl_functions[] = { PHP_FE(openssl_pkey_get_public, arginfo_openssl_pkey_get_public) PHP_FE(openssl_pkey_get_details, arginfo_openssl_pkey_get_details) - PHP_FALIAS(openssl_free_key, openssl_pkey_free, NULL) - PHP_FALIAS(openssl_get_privatekey, openssl_pkey_get_private, NULL) - PHP_FALIAS(openssl_get_publickey, openssl_pkey_get_public, NULL) + PHP_FALIAS(openssl_free_key, openssl_pkey_free, arginfo_openssl_pkey_free) + PHP_FALIAS(openssl_get_privatekey, openssl_pkey_get_private, arginfo_openssl_pkey_get_private) + PHP_FALIAS(openssl_get_publickey, openssl_pkey_get_public, arginfo_openssl_pkey_get_public) /* x.509 cert funcs */ PHP_FE(openssl_x509_read, arginfo_openssl_x509_read) @@ -408,6 +415,7 @@ const zend_function_entry openssl_functions[] = { PHP_FE(openssl_digest, arginfo_openssl_digest) PHP_FE(openssl_encrypt, arginfo_openssl_encrypt) PHP_FE(openssl_decrypt, arginfo_openssl_decrypt) + PHP_FE(openssl_cipher_iv_length, arginfo_openssl_cipher_iv_length) PHP_FE(openssl_sign, arginfo_openssl_sign) PHP_FE(openssl_verify, arginfo_openssl_verify) PHP_FE(openssl_seal, arginfo_openssl_seal) @@ -4435,7 +4443,9 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ if (!cipherlist) { cipherlist = "DEFAULT"; } - SSL_CTX_set_cipher_list(ctx, cipherlist); + if (SSL_CTX_set_cipher_list(ctx, cipherlist) != 1) { + return NULL; + } GET_VER_OPT_STRING("local_cert", certfile); if (certfile) { @@ -4443,6 +4453,7 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ EVP_PKEY *key = NULL; SSL *tmpssl; char resolved_path_buff[MAXPATHLEN]; + const char * private_key = NULL; if (VCWD_REALPATH(certfile, resolved_path_buff)) { /* a certificate to use for authentication */ @@ -4450,10 +4461,21 @@ SSL *php_SSL_new_from_context(SSL_CTX *ctx, php_stream *stream TSRMLS_DC) /* {{{ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set local cert chain file `%s'; Check that your cafile/capath settings include details of your certificate and its issuer", certfile); return NULL; } - - if (SSL_CTX_use_PrivateKey_file(ctx, resolved_path_buff, SSL_FILETYPE_PEM) != 1) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff); - return NULL; + GET_VER_OPT_STRING("local_pk", private_key); + + if (private_key) { + char resolved_path_buff_pk[MAXPATHLEN]; + if (VCWD_REALPATH(private_key, resolved_path_buff_pk)) { + if (SSL_CTX_use_PrivateKey_file(ctx, resolved_path_buff_pk, SSL_FILETYPE_PEM) != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff_pk); + return NULL; + } + } + } else { + if (SSL_CTX_use_PrivateKey_file(ctx, resolved_path_buff, SSL_FILETYPE_PEM) != 1) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to set private key file `%s'", resolved_path_buff); + return NULL; + } } tmpssl = SSL_new(ctx); @@ -4576,19 +4598,54 @@ PHP_FUNCTION(openssl_digest) } /* }}} */ -/* {{{ proto string openssl_encrypt(string data, string method, string password [, bool raw_output=false]) +static zend_bool php_openssl_validate_iv(char **piv, int *piv_len, int iv_required_len TSRMLS_DC) +{ + char *iv_new; + + /* Best case scenario, user behaved */ + if (*piv_len == iv_required_len) { + return 0; + } + + iv_new = ecalloc(1, iv_required_len + 1); + + if (*piv_len <= 0) { + /* BC behavior */ + *piv_len = iv_required_len; + *piv = iv_new; + return 1; + } + + if (*piv_len < iv_required_len) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "IV passed is only %d bytes long, cipher expects an IV of precisely %d bytes, padding with \\0", *piv_len, iv_required_len); + memcpy(iv_new, *piv, *piv_len); + *piv_len = iv_required_len; + *piv = iv_new; + return 1; + } + + php_error_docref(NULL TSRMLS_CC, E_WARNING, "IV passed is %d bytes long which is longer than the %d expected by selected cipher, truncating", *piv_len, iv_required_len); + memcpy(iv_new, *piv, iv_required_len); + *piv_len = iv_required_len; + *piv = iv_new; + return 1; + +} + +/* {{{ proto string openssl_encrypt(string data, string method, string password [, bool raw_output=false [, string $iv='']]) Encrypts given data with given method and key, returns raw or base64 encoded string */ PHP_FUNCTION(openssl_encrypt) { zend_bool raw_output = 0; - char *data, *method, *password; - int data_len, method_len, password_len; + char *data, *method, *password, *iv = ""; + int data_len, method_len, password_len, iv_len = 0; const EVP_CIPHER *cipher_type; EVP_CIPHER_CTX cipher_ctx; - int i, outlen, keylen, ivlen; - unsigned char *outbuf, *key, *iv; + int i, outlen, keylen; + unsigned char *outbuf, *key; + zend_bool free_iv; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|b", &data, &data_len, &method, &method_len, &password, &password_len, &raw_output) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|bs", &data, &data_len, &method, &method_len, &password, &password_len, &raw_output, &iv, &iv_len) == FAILURE) { return; } cipher_type = EVP_get_cipherbyname(method); @@ -4606,14 +4663,15 @@ PHP_FUNCTION(openssl_encrypt) key = (unsigned char*)password; } - ivlen = EVP_CIPHER_iv_length(cipher_type); - iv = emalloc(ivlen); - memset(iv, 0, ivlen); + if (iv_len <= 0) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Using an empty Initialization Vector (iv) is potentially insecure and not recommended"); + } + free_iv = php_openssl_validate_iv(&iv, &iv_len, EVP_CIPHER_iv_length(cipher_type) TSRMLS_CC); outlen = data_len + EVP_CIPHER_block_size(cipher_type); outbuf = emalloc(outlen + 1); - EVP_EncryptInit(&cipher_ctx, cipher_type, key, iv); + EVP_EncryptInit(&cipher_ctx, cipher_type, key, (unsigned char *)iv); EVP_EncryptUpdate(&cipher_ctx, outbuf, &i, (unsigned char *)data, data_len); outlen = i; if (EVP_EncryptFinal(&cipher_ctx, (unsigned char *)outbuf + i, &i)) { @@ -4636,25 +4694,28 @@ PHP_FUNCTION(openssl_encrypt) if (key != (unsigned char*)password) { efree(key); } - efree(iv); + if (free_iv) { + efree(iv); + } } /* }}} */ -/* {{{ proto string openssl_decrypt(string data, string method, string password [, bool raw_input=false]) +/* {{{ proto string openssl_decrypt(string data, string method, string password [, bool raw_input=false [, string $iv = '']]) Takes raw or base64 encoded string and dectupt it using given method and key */ PHP_FUNCTION(openssl_decrypt) { zend_bool raw_input = 0; - char *data, *method, *password; - int data_len, method_len, password_len; + char *data, *method, *password, *iv = ""; + int data_len, method_len, password_len, iv_len = 0; const EVP_CIPHER *cipher_type; EVP_CIPHER_CTX cipher_ctx; - int i, outlen, keylen, ivlen; - unsigned char *outbuf, *key, *iv; + int i, outlen, keylen; + unsigned char *outbuf, *key; int base64_str_len; char *base64_str = NULL; + zend_bool free_iv; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|b", &data, &data_len, &method, &method_len, &password, &password_len, &raw_input) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|bs", &data, &data_len, &method, &method_len, &password, &password_len, &raw_input, &iv, &iv_len) == FAILURE) { return; } @@ -4684,14 +4745,12 @@ PHP_FUNCTION(openssl_decrypt) key = (unsigned char*)password; } - ivlen = EVP_CIPHER_iv_length(cipher_type); - iv = emalloc(ivlen); - memset(iv, 0, ivlen); + free_iv = php_openssl_validate_iv(&iv, &iv_len, EVP_CIPHER_iv_length(cipher_type) TSRMLS_CC); outlen = data_len + EVP_CIPHER_block_size(cipher_type); outbuf = emalloc(outlen + 1); - EVP_DecryptInit(&cipher_ctx, cipher_type, key, iv); + EVP_DecryptInit(&cipher_ctx, cipher_type, key, (unsigned char *)iv); EVP_DecryptUpdate(&cipher_ctx, outbuf, &i, (unsigned char *)data, data_len); outlen = i; if (EVP_DecryptFinal(&cipher_ctx, (unsigned char *)outbuf + i, &i)) { @@ -4705,13 +4764,42 @@ PHP_FUNCTION(openssl_decrypt) if (key != (unsigned char*)password) { efree(key); } - efree(iv); + if (free_iv) { + efree(iv); + } if (base64_str) { efree(base64_str); } } /* }}} */ +/* {{{ proto int openssl_cipher_iv_length(string $method) */ +PHP_FUNCTION(openssl_cipher_iv_length) +{ + char *method; + int method_len; + const EVP_CIPHER *cipher_type; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &method, &method_len) == FAILURE) { + return; + } + + if (!method_len) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown cipher algorithm"); + RETURN_FALSE; + } + + cipher_type = EVP_get_cipherbyname(method); + if (!cipher_type) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unknown cipher algorithm"); + RETURN_FALSE; + } + + RETURN_LONG(EVP_CIPHER_iv_length(cipher_type)); +} +/* }}} */ + + /* {{{ proto string openssl_dh_compute_key(string pub_key, resource dh_key) Computes shared sicret for public value of remote DH key and local DH key */ PHP_FUNCTION(openssl_dh_compute_key) @@ -4771,27 +4859,23 @@ PHP_FUNCTION(openssl_random_pseudo_bytes) ZVAL_BOOL(zstrong_result_returned, 0); } - buffer = emalloc(buffer_length); - - if (!buffer) { - RETURN_FALSE; - } + buffer = emalloc(buffer_length + 1); #ifdef WINDOWS RAND_screen(); #endif if ((strong_result = RAND_pseudo_bytes(buffer, buffer_length)) < 0) { - RETVAL_FALSE; - } else { - RETVAL_STRINGL((char *)buffer, buffer_length, 1); + efree(buffer); + RETURN_FALSE; + } - if (zstrong_result_returned) { - ZVAL_BOOL(zstrong_result_returned, strong_result); - } + buffer[buffer_length] = 0; + RETVAL_STRINGL((char *)buffer, buffer_length, 0); + if (zstrong_result_returned) { + ZVAL_BOOL(zstrong_result_returned, strong_result); } - efree(buffer); } /* }}} */ diff --git a/ext/openssl/tests/011.phpt b/ext/openssl/tests/011.phpt index 927360900..fdcc5e296 100644 --- a/ext/openssl/tests/011.phpt +++ b/ext/openssl/tests/011.phpt @@ -8,11 +8,16 @@ $data = "openssl_encrypt() and openssl_decrypt() tests"; $method = "AES-128-CBC"; $password = "openssl"; -$encrypted = openssl_encrypt($data, $method, $password); -$output = openssl_decrypt($encrypted, $method, $password); +$ivlen = openssl_cipher_iv_length($method); +$iv = ''; +srand(time() + ((microtime(true) * 1000000) % 1000000)); +while(strlen($iv) < $ivlen) $iv .= chr(rand(0,255)); + +$encrypted = openssl_encrypt($data, $method, $password, false, $iv); +$output = openssl_decrypt($encrypted, $method, $password, false, $iv); var_dump($output); -$encrypted = openssl_encrypt($data, $method, $password, true); -$output = openssl_decrypt($encrypted, $method, $password, true); +$encrypted = openssl_encrypt($data, $method, $password, true, $iv); +$output = openssl_decrypt($encrypted, $method, $password, true, $iv); var_dump($output); ?> --EXPECT-- diff --git a/ext/openssl/tests/bug48182.phpt b/ext/openssl/tests/bug48182.phpt index 7471c4c5d..146c4c922 100644 --- a/ext/openssl/tests/bug48182.phpt +++ b/ext/openssl/tests/bug48182.phpt @@ -51,7 +51,7 @@ function ssl_async_client($port) { $socket = stream_socket_client($host, $errno, $errstr, 10, $flags); stream_set_blocking($socket, 0); - while ($data) { + while ($socket && $data) { $wrote = fwrite($socket, $data, strlen($data)); $data = substr($data, $wrote); } diff --git a/ext/openssl/tests/openssl_decrypt_error.phpt b/ext/openssl/tests/openssl_decrypt_error.phpt index ea9cce2f0..233fa0c5b 100644 --- a/ext/openssl/tests/openssl_decrypt_error.phpt +++ b/ext/openssl/tests/openssl_decrypt_error.phpt @@ -8,8 +8,11 @@ $data = "openssl_decrypt() tests"; $method = "AES-128-CBC"; $password = "openssl"; $wrong = "wrong"; +$iv = str_repeat("\0", openssl_cipher_iv_length($method)); $encrypted = openssl_encrypt($data, $method, $password); +var_dump($encrypted); /* Not passing $iv should be the same as all-NULL iv, but with a warning */ +var_dump(openssl_encrypt($data, $method, $password, false, $iv)); var_dump(openssl_decrypt($encrypted, $method, $wrong)); var_dump(openssl_decrypt($encrypted, $wrong, $password)); var_dump(openssl_decrypt($wrong, $method, $password)); @@ -21,6 +24,10 @@ var_dump(openssl_decrypt($encrypted, array(), $password)); var_dump(openssl_decrypt($encrypted, $method, array())); ?> --EXPECTF-- + +Warning: openssl_encrypt(): Using an empty Initialization Vector (iv) is potentially insecure and not recommended in %s on line %d +string(44) "yof6cPPH4mLee6TOc0YQSrh4dvywMqxGUyjp0lV6+aM=" +string(44) "yof6cPPH4mLee6TOc0YQSrh4dvywMqxGUyjp0lV6+aM=" bool(false) Warning: openssl_decrypt(): Unknown cipher algorithm in %s on line %d diff --git a/ext/openssl/xp_ssl.c b/ext/openssl/xp_ssl.c index 212c003a7..74a54d80b 100644 --- a/ext/openssl/xp_ssl.c +++ b/ext/openssl/xp_ssl.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xp_ssl.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: xp_ssl.c 300617 2010-06-20 16:33:16Z pajoye $ */ #include "php.h" #include "ext/standard/file.h" @@ -312,8 +312,12 @@ static inline int php_openssl_setup_crypto(php_stream *stream, SSL_METHOD *method; if (sslsock->ssl_handle) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL/TLS already set-up for this stream"); - return -1; + if (sslsock->s.is_blocked) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "SSL/TLS already set-up for this stream"); + return -1; + } else { + return 0; + } } /* need to do slightly different things, based on client/server method, @@ -435,7 +439,8 @@ static inline int php_openssl_enable_crypto(php_stream *stream, } if (n <= 0) { - retry = handle_ssl_error(stream, n, 1 TSRMLS_CC); + retry = handle_ssl_error(stream, n, sslsock->is_client || sslsock->s.is_blocked TSRMLS_CC); + } else { break; } @@ -586,6 +591,8 @@ static inline int php_openssl_tcp_sockop_accept(php_stream *stream, php_openssl_ case STREAM_CRYPTO_METHOD_TLS_CLIENT: sock->method = STREAM_CRYPTO_METHOD_TLS_SERVER; break; + default: + break; } clisockdata->method = sock->method; diff --git a/ext/pcre/pcrelib/AUTHORS b/ext/pcre/pcrelib/AUTHORS index 44ff433d8..88db849d4 100644 --- a/ext/pcre/pcrelib/AUTHORS +++ b/ext/pcre/pcrelib/AUTHORS @@ -8,7 +8,7 @@ Email domain: cam.ac.uk University of Cambridge Computing Service, Cambridge, England. -Copyright (c) 1997-2009 University of Cambridge +Copyright (c) 1997-2010 University of Cambridge All rights reserved @@ -17,7 +17,7 @@ THE C++ WRAPPER LIBRARY Written by: Google Inc. -Copyright (c) 2007-2008 Google Inc +Copyright (c) 2007-2010 Google Inc All rights reserved #### diff --git a/ext/pcre/pcrelib/ChangeLog b/ext/pcre/pcrelib/ChangeLog index 40600b861..9e833ee14 100644 --- a/ext/pcre/pcrelib/ChangeLog +++ b/ext/pcre/pcrelib/ChangeLog @@ -1,6 +1,199 @@ ChangeLog for PCRE ------------------ +Version 8.02 19-Mar-2010 +------------------------ + +1. The Unicode data tables have been updated to Unicode 5.2.0. + +2. Added the option --libs-cpp to pcre-config, but only when C++ support is + configured. + +3. Updated the licensing terms in the pcregexp.pas file, as agreed with the + original author of that file, following a query about its status. + +4. On systems that do not have stdint.h (e.g. Solaris), check for and include + inttypes.h instead. This fixes a bug that was introduced by change 8.01/8. + +5. A pattern such as (?&t)*+(?(DEFINE)(?<t>.)) which has a possessive + quantifier applied to a forward-referencing subroutine call, could compile + incorrect code or give the error "internal error: previously-checked + referenced subpattern not found". + +6. Both MS Visual Studio and Symbian OS have problems with initializing + variables to point to external functions. For these systems, therefore, + pcre_malloc etc. are now initialized to local functions that call the + relevant global functions. + +7. There were two entries missing in the vectors called coptable and poptable + in pcre_dfa_exec.c. This could lead to memory accesses outsize the vectors. + I've fixed the data, and added a kludgy way of testing at compile time that + the lengths are correct (equal to the number of opcodes). + +8. Following on from 7, I added a similar kludge to check the length of the + eint vector in pcreposix.c. + +9. Error texts for pcre_compile() are held as one long string to avoid too + much relocation at load time. To find a text, the string is searched, + counting zeros. There was no check for running off the end of the string, + which could happen if a new error number was added without updating the + string. + +10. \K gave a compile-time error if it appeared in a lookbehind assersion. + +11. \K was not working if it appeared in an atomic group or in a group that + was called as a "subroutine", or in an assertion. Perl 5.11 documents that + \K is "not well defined" if used in an assertion. PCRE now accepts it if + the assertion is positive, but not if it is negative. + +12. Change 11 fortuitously reduced the size of the stack frame used in the + "match()" function of pcre_exec.c by one pointer. Forthcoming + implementation of support for (*MARK) will need an extra pointer on the + stack; I have reserved it now, so that the stack frame size does not + decrease. + +13. A pattern such as (?P<L1>(?P<L2>0)|(?P>L2)(?P>L1)) in which the only other + item in branch that calls a recursion is a subroutine call - as in the + second branch in the above example - was incorrectly given the compile- + time error "recursive call could loop indefinitely" because pcre_compile() + was not correctly checking the subroutine for matching a non-empty string. + +14. The checks for overrunning compiling workspace could trigger after an + overrun had occurred. This is a "should never occur" error, but it can be + triggered by pathological patterns such as hundreds of nested parentheses. + The checks now trigger 100 bytes before the end of the workspace. + +15. Fix typo in configure.ac: "srtoq" should be "strtoq". + + +Version 8.01 19-Jan-2010 +------------------------ + +1. If a pattern contained a conditional subpattern with only one branch (in + particular, this includes all (*DEFINE) patterns), a call to pcre_study() + computed the wrong minimum data length (which is of course zero for such + subpatterns). This could cause incorrect "no match" results. + +2. For patterns such as (?i)a(?-i)b|c where an option setting at the start of + the pattern is reset in the first branch, pcre_compile() failed with + "internal error: code overflow at offset...". This happened only when + the reset was to the original external option setting. (An optimization + abstracts leading options settings into an external setting, which was the + cause of this.) + +3. A pattern such as ^(?!a(*SKIP)b) where a negative assertion contained one + of the verbs SKIP, PRUNE, or COMMIT, did not work correctly. When the + assertion pattern did not match (meaning that the assertion was true), it + was incorrectly treated as false if the SKIP had been reached during the + matching. This also applied to assertions used as conditions. + +4. If an item that is not supported by pcre_dfa_exec() was encountered in an + assertion subpattern, including such a pattern used as a condition, + unpredictable results occurred, instead of the error return + PCRE_ERROR_DFA_UITEM. + +5. The C++ GlobalReplace function was not working like Perl for the special + situation when an empty string is matched. It now does the fancy magic + stuff that is necessary. + +6. In pcre_internal.h, obsolete includes to setjmp.h and stdarg.h have been + removed. (These were left over from very, very early versions of PCRE.) + +7. Some cosmetic changes to the code to make life easier when compiling it + as part of something else: + + (a) Change DEBUG to PCRE_DEBUG. + + (b) In pcre_compile(), rename the member of the "branch_chain" structure + called "current" as "current_branch", to prevent a collision with the + Linux macro when compiled as a kernel module. + + (c) In pcre_study(), rename the function set_bit() as set_table_bit(), to + prevent a collision with the Linux macro when compiled as a kernel + module. + +8. In pcre_compile() there are some checks for integer overflows that used to + cast potentially large values to (double). This has been changed to that + when building, a check for int64_t is made, and if it is found, it is used + instead, thus avoiding the use of floating point arithmetic. (There is no + other use of FP in PCRE.) If int64_t is not found, the fallback is to + double. + +9. Added two casts to avoid signed/unsigned warnings from VS Studio Express + 2005 (difference between two addresses compared to an unsigned value). + +10. Change the standard AC_CHECK_LIB test for libbz2 in configure.ac to a + custom one, because of the following reported problem in Windows: + + - libbz2 uses the Pascal calling convention (WINAPI) for the functions + under Win32. + - The standard autoconf AC_CHECK_LIB fails to include "bzlib.h", + therefore missing the function definition. + - The compiler thus generates a "C" signature for the test function. + - The linker fails to find the "C" function. + - PCRE fails to configure if asked to do so against libbz2. + +11. When running libtoolize from libtool-2.2.6b as part of autogen.sh, these + messages were output: + + Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and + rerunning libtoolize, to keep the correct libtool macros in-tree. + Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. + + I have done both of these things. + +12. Although pcre_dfa_exec() does not use nearly as much stack as pcre_exec() + most of the time, it *can* run out if it is given a pattern that contains a + runaway infinite recursion. I updated the discussion in the pcrestack man + page. + +13. Now that we have gone to the x.xx style of version numbers, the minor + version may start with zero. Using 08 or 09 is a bad idea because users + might check the value of PCRE_MINOR in their code, and 08 or 09 may be + interpreted as invalid octal numbers. I've updated the previous comment in + configure.ac, and also added a check that gives an error if 08 or 09 are + used. + +14. Change 8.00/11 was not quite complete: code had been accidentally omitted, + causing partial matching to fail when the end of the subject matched \W + in a UTF-8 pattern where \W was quantified with a minimum of 3. + +15. There were some discrepancies between the declarations in pcre_internal.h + of _pcre_is_newline(), _pcre_was_newline(), and _pcre_valid_utf8() and + their definitions. The declarations used "const uschar *" and the + definitions used USPTR. Even though USPTR is normally defined as "const + unsigned char *" (and uschar is typedeffed as "unsigned char"), it was + reported that: "This difference in casting confuses some C++ compilers, for + example, SunCC recognizes above declarations as different functions and + generates broken code for hbpcre." I have changed the declarations to use + USPTR. + +16. GNU libtool is named differently on some systems. The autogen.sh script now + tries several variants such as glibtoolize (MacOSX) and libtoolize1x + (FreeBSD). + +17. Applied Craig's patch that fixes an HP aCC compile error in pcre 8.00 + (strtoXX undefined when compiling pcrecpp.cc). The patch contains this + comment: "Figure out how to create a longlong from a string: strtoll and + equivalent. It's not enough to call AC_CHECK_FUNCS: hpux has a strtoll, for + instance, but it only takes 2 args instead of 3!" + +18. A subtle bug concerned with back references has been fixed by a change of + specification, with a corresponding code fix. A pattern such as + ^(xa|=?\1a)+$ which contains a back reference inside the group to which it + refers, was giving matches when it shouldn't. For example, xa=xaaa would + match that pattern. Interestingly, Perl (at least up to 5.11.3) has the + same bug. Such groups have to be quantified to be useful, or contained + inside another quantified group. (If there's no repetition, the reference + can never match.) The problem arises because, having left the group and + moved on to the rest of the pattern, a later failure that backtracks into + the group uses the captured value from the final iteration of the group + rather than the correct earlier one. I have fixed this in PCRE by forcing + any group that contains a reference to itself to be an atomic group; that + is, there cannot be any backtracking into it once it has completed. This is + similar to recursive and subroutine calls. + + Version 8.00 19-Oct-09 ---------------------- diff --git a/ext/pcre/pcrelib/LICENCE b/ext/pcre/pcrelib/LICENCE index 73f8cde3d..0dd22571a 100644 --- a/ext/pcre/pcrelib/LICENCE +++ b/ext/pcre/pcrelib/LICENCE @@ -22,7 +22,7 @@ Email domain: cam.ac.uk University of Cambridge Computing Service, Cambridge, England. -Copyright (c) 1997-2009 University of Cambridge +Copyright (c) 1997-2010 University of Cambridge All rights reserved. @@ -31,7 +31,7 @@ THE C++ WRAPPER FUNCTIONS Contributed by: Google Inc. -Copyright (c) 2007-2008, Google Inc. +Copyright (c) 2007-2010, Google Inc. All rights reserved. diff --git a/ext/pcre/pcrelib/NEWS b/ext/pcre/pcrelib/NEWS index 71cba379e..835d03d22 100644 --- a/ext/pcre/pcrelib/NEWS +++ b/ext/pcre/pcrelib/NEWS @@ -1,6 +1,19 @@ News about PCRE releases ------------------------ +Release 8.02 19-Mar-2010 +------------------------ + +Another bug-fix release. + + +Release 8.01 19-Jan-2010 +------------------------ + +This is a bug-fix release. Several bugs in the code itself and some bugs and +infelicities in the build system have been fixed. + + Release 8.00 19-Oct-09 ---------------------- diff --git a/ext/pcre/pcrelib/NON-UNIX-USE b/ext/pcre/pcrelib/NON-UNIX-USE index aca81bd56..69668cbb4 100644 --- a/ext/pcre/pcrelib/NON-UNIX-USE +++ b/ext/pcre/pcrelib/NON-UNIX-USE @@ -127,12 +127,16 @@ The following are generic comments about building the PCRE C library "by hand". your system has static and shared libraries, you may have to do this once for each type. - (8) Similarly, compile pcreposix.c (remembering -DHAVE_CONFIG_H if necessary) - and link the result (on its own) as the pcreposix library. + (8) Similarly, if you want to build the POSIX wrapper functions, ensure that + you have the pcreposix.h file and then compile pcreposix.c (remembering + -DHAVE_CONFIG_H if necessary). Link the result (on its own) as the + pcreposix library. (9) Compile the test program pcretest.c (again, don't forget -DHAVE_CONFIG_H). - This needs the functions in the pcre and pcreposix libraries when linking. - It also needs the pcre_printint.src source file, which it #includes. + This needs the functions in the PCRE library when linking. It also needs + the pcreposix wrapper functions unless you compile it with -DNOPOSIX. The + pcretest.c program also needs the pcre_printint.src source file, which it + #includes. (10) Run pcretest on the testinput files in the testdata directory, and check that the output matches the corresponding testoutput files. Note that the @@ -273,8 +277,7 @@ gcc and MinGW's gcc). So, a user can: The test files that are supplied with PCRE are in Unix format, with LF characters as line terminators. It may be necessary to change the line -terminators in order to get some of the tests to work. We hope to improve -things in this area in future. +terminators in order to get some of the tests to work. BUILDING PCRE ON WINDOWS WITH CMAKE @@ -494,5 +497,5 @@ build.log file in the root of the package also. ========================= -Last Updated: 05 October 2009 +Last Updated: 19 January 2010 **** diff --git a/ext/pcre/pcrelib/README b/ext/pcre/pcrelib/README index c6156e25c..2f3e92694 100644 --- a/ext/pcre/pcrelib/README +++ b/ext/pcre/pcrelib/README @@ -311,10 +311,10 @@ The "configure" script builds the following files for the basic C library: . RunTest is a script for running tests on the basic C library . RunGrepTest is a script for running tests on the pcregrep command -Versions of config.h and pcre.h are distributed in the PCRE tarballs under -the names config.h.generic and pcre.h.generic. These are provided for the -benefit of those who have to built PCRE without the benefit of "configure". If -you use "configure", the .generic versions are not used. +Versions of config.h and pcre.h are distributed in the PCRE tarballs under the +names config.h.generic and pcre.h.generic. These are provided for those who +have to built PCRE without using "configure" or CMake. If you use "configure" +or CMake, the .generic versions are not used. If a C++ compiler is found, the following files are also built: @@ -796,4 +796,4 @@ The distribution should contain the following files: Philip Hazel Email local part: ph10 Email domain: cam.ac.uk -Last updated: 19 October 2009 +Last updated: 19 January 2010 diff --git a/ext/pcre/pcrelib/config.h b/ext/pcre/pcrelib/config.h index 949a0a209..34d16a468 100644 --- a/ext/pcre/pcrelib/config.h +++ b/ext/pcre/pcrelib/config.h @@ -144,10 +144,13 @@ them both to 0; an emulation function will be used. */ #define HAVE_STRING_H 1 #endif -/* Define to 1 if you have the `strtoll' function. */ +/* Define to 1 if you have `strtoimax'. */ +/* #undef HAVE_STRTOIMAX */ + +/* Define to 1 if you have `strtoll'. */ /* #undef HAVE_STRTOLL */ -/* Define to 1 if you have the `strtoq' function. */ +/* Define to 1 if you have `strtoq'. */ #ifndef HAVE_STRTOQ #define HAVE_STRTOQ 1 #endif @@ -183,7 +186,7 @@ them both to 0; an emulation function will be used. */ #define HAVE_ZLIB_H 1 #endif -/* Define to 1 if you have the `_strtoi64' function. */ +/* Define to 1 if you have `_strtoi64'. */ /* #undef HAVE__STRTOI64 */ /* The value of LINK_SIZE determines the number of bytes used to store links @@ -268,13 +271,13 @@ them both to 0; an emulation function will be used. */ #define PACKAGE_NAME "PCRE" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "PCRE 8.00" +#define PACKAGE_STRING "PCRE 8.02" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "pcre" /* Define to the version of this package. */ -#define PACKAGE_VERSION "8.00" +#define PACKAGE_VERSION "8.02" /* If you are compiling for a system other than a Unix-like system or @@ -330,11 +333,15 @@ them both to 0; an emulation function will be used. */ /* Version number of package */ #ifndef VERSION -#define VERSION "8.00" +#define VERSION "8.02" #endif /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ +/* Define to the type of a signed integer type of width exactly 64 bits if + such a type exists and the standard includes do not define it. */ +/* #undef int64_t */ + /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef size_t */ diff --git a/ext/pcre/pcrelib/doc/pcre.txt b/ext/pcre/pcrelib/doc/pcre.txt index 2ccc7bb4b..aedf85373 100644 --- a/ext/pcre/pcrelib/doc/pcre.txt +++ b/ext/pcre/pcrelib/doc/pcre.txt @@ -29,7 +29,7 @@ INTRODUCTION 5.10, including support for UTF-8 encoded strings and Unicode general category properties. However, UTF-8 and Unicode support has to be explicitly enabled; it is not the default. The Unicode tables corre- - spond to Unicode release 5.1. + spond to Unicode release 5.2.0. In addition to the Perl-compatible matching function, PCRE contains an alternative function that matches the same compiled patterns in a dif- @@ -263,8 +263,8 @@ AUTHOR REVISION - Last updated: 28 September 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 01 March 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -3246,7 +3246,7 @@ BACKSLASH \n linefeed (hex 0A) \r carriage return (hex 0D) \t tab (hex 09) - \ddd character with octal code ddd, or backreference + \ddd character with octal code ddd, or back reference \xhh character with hex code hh \x{hhh..} character with hex code hhh.. @@ -3488,24 +3488,29 @@ BACKSLASH Those that are not part of an identified script are lumped together as "Common". The current list of scripts is: - Arabic, Armenian, Balinese, Bengali, Bopomofo, Braille, Buginese, - Buhid, Canadian_Aboriginal, Cherokee, Common, Coptic, Cuneiform, - Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian, Glagolitic, - Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hira- - gana, Inherited, Kannada, Katakana, Kharoshthi, Khmer, Lao, Latin, - Limbu, Linear_B, Malayalam, Mongolian, Myanmar, New_Tai_Lue, Nko, - Ogham, Old_Italic, Old_Persian, Oriya, Osmanya, Phags_Pa, Phoenician, - Runic, Shavian, Sinhala, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, - Tai_Le, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Yi. - - Each character has exactly one general category property, specified by + Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille, + Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common, + Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp- + tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek, + Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe- + rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian, + Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao, + Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, + Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, + Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya, + Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian, + Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, + Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, + Ugaritic, Vai, Yi. + + Each character has exactly one general category property, specified by a two-letter abbreviation. For compatibility with Perl, negation can be - specified by including a circumflex between the opening brace and the + specified by including a circumflex between the opening brace and the property name. For example, \p{^Lu} is the same as \P{Lu}. If only one letter is specified with \p or \P, it includes all the gen- - eral category properties that start with that letter. In this case, in - the absence of negation, the curly brackets in the escape sequence are + eral category properties that start with that letter. In this case, in + the absence of negation, the curly brackets in the escape sequence are optional; these two examples have the same effect: \p{L} @@ -3557,69 +3562,73 @@ BACKSLASH Zp Paragraph separator Zs Space separator - The special property L& is also supported: it matches a character that - has the Lu, Ll, or Lt property, in other words, a letter that is not + The special property L& is also supported: it matches a character that + has the Lu, Ll, or Lt property, in other words, a letter that is not classified as a modifier or "other". - The Cs (Surrogate) property applies only to characters in the range - U+D800 to U+DFFF. Such characters are not valid in UTF-8 strings (see + The Cs (Surrogate) property applies only to characters in the range + U+D800 to U+DFFF. Such characters are not valid in UTF-8 strings (see RFC 3629) and so cannot be tested by PCRE, unless UTF-8 validity check- - ing has been turned off (see the discussion of PCRE_NO_UTF8_CHECK in + ing has been turned off (see the discussion of PCRE_NO_UTF8_CHECK in the pcreapi page). Perl does not support the Cs property. - The long synonyms for property names that Perl supports (such as - \p{Letter}) are not supported by PCRE, nor is it permitted to prefix + The long synonyms for property names that Perl supports (such as + \p{Letter}) are not supported by PCRE, nor is it permitted to prefix any of these properties with "Is". No character that is in the Unicode table has the Cn (unassigned) prop- erty. Instead, this property is assumed for any code point that is not in the Unicode table. - Specifying caseless matching does not affect these escape sequences. + Specifying caseless matching does not affect these escape sequences. For example, \p{Lu} always matches only upper case letters. - The \X escape matches any number of Unicode characters that form an + The \X escape matches any number of Unicode characters that form an extended Unicode sequence. \X is equivalent to (?>\PM\pM*) - That is, it matches a character without the "mark" property, followed - by zero or more characters with the "mark" property, and treats the - sequence as an atomic group (see below). Characters with the "mark" - property are typically accents that affect the preceding character. - None of them have codepoints less than 256, so in non-UTF-8 mode \X + That is, it matches a character without the "mark" property, followed + by zero or more characters with the "mark" property, and treats the + sequence as an atomic group (see below). Characters with the "mark" + property are typically accents that affect the preceding character. + None of them have codepoints less than 256, so in non-UTF-8 mode \X matches any one character. - Matching characters by Unicode property is not fast, because PCRE has - to search a structure that contains data for over fifteen thousand + Matching characters by Unicode property is not fast, because PCRE has + to search a structure that contains data for over fifteen thousand characters. That is why the traditional escape sequences such as \d and \w do not use Unicode properties in PCRE. Resetting the match start The escape sequence \K, which is a Perl 5.10 feature, causes any previ- - ously matched characters not to be included in the final matched + ously matched characters not to be included in the final matched sequence. For example, the pattern: foo\Kbar - matches "foobar", but reports that it has matched "bar". This feature - is similar to a lookbehind assertion (described below). However, in - this case, the part of the subject before the real match does not have - to be of fixed length, as lookbehind assertions do. The use of \K does - not interfere with the setting of captured substrings. For example, + matches "foobar", but reports that it has matched "bar". This feature + is similar to a lookbehind assertion (described below). However, in + this case, the part of the subject before the real match does not have + to be of fixed length, as lookbehind assertions do. The use of \K does + not interfere with the setting of captured substrings. For example, when the pattern (foo)\Kbar matches "foobar", the first substring is still set to "foo". + Perl documents that the use of \K within assertions is "not well + defined". In PCRE, \K is acted upon when it occurs inside positive + assertions, but is ignored in negative assertions. + Simple assertions - The final use of backslash is for certain simple assertions. An asser- - tion specifies a condition that has to be met at a particular point in - a match, without consuming any characters from the subject string. The - use of subpatterns for more complicated assertions is described below. + The final use of backslash is for certain simple assertions. An asser- + tion specifies a condition that has to be met at a particular point in + a match, without consuming any characters from the subject string. The + use of subpatterns for more complicated assertions is described below. The backslashed assertions are: \b matches at a word boundary @@ -3630,44 +3639,44 @@ BACKSLASH \z matches only at the end of the subject \G matches at the first matching position in the subject - These assertions may not appear in character classes (but note that \b + These assertions may not appear in character classes (but note that \b has a different meaning, namely the backspace character, inside a char- acter class). - A word boundary is a position in the subject string where the current - character and the previous character do not both match \w or \W (i.e. - one matches \w and the other matches \W), or the start or end of the + A word boundary is a position in the subject string where the current + character and the previous character do not both match \w or \W (i.e. + one matches \w and the other matches \W), or the start or end of the string if the first or last character matches \w, respectively. Neither - PCRE nor Perl has a separte "start of word" or "end of word" metase- - quence. However, whatever follows \b normally determines which it is. + PCRE nor Perl has a separte "start of word" or "end of word" metase- + quence. However, whatever follows \b normally determines which it is. For example, the fragment \ba matches "a" at the start of a word. - The \A, \Z, and \z assertions differ from the traditional circumflex + The \A, \Z, and \z assertions differ from the traditional circumflex and dollar (described in the next section) in that they only ever match - at the very start and end of the subject string, whatever options are - set. Thus, they are independent of multiline mode. These three asser- + at the very start and end of the subject string, whatever options are + set. Thus, they are independent of multiline mode. These three asser- tions are not affected by the PCRE_NOTBOL or PCRE_NOTEOL options, which - affect only the behaviour of the circumflex and dollar metacharacters. - However, if the startoffset argument of pcre_exec() is non-zero, indi- + affect only the behaviour of the circumflex and dollar metacharacters. + However, if the startoffset argument of pcre_exec() is non-zero, indi- cating that matching is to start at a point other than the beginning of - the subject, \A can never match. The difference between \Z and \z is + the subject, \A can never match. The difference between \Z and \z is that \Z matches before a newline at the end of the string as well as at the very end, whereas \z matches only at the end. - The \G assertion is true only when the current matching position is at - the start point of the match, as specified by the startoffset argument - of pcre_exec(). It differs from \A when the value of startoffset is - non-zero. By calling pcre_exec() multiple times with appropriate argu- + The \G assertion is true only when the current matching position is at + the start point of the match, as specified by the startoffset argument + of pcre_exec(). It differs from \A when the value of startoffset is + non-zero. By calling pcre_exec() multiple times with appropriate argu- ments, you can mimic Perl's /g option, and it is in this kind of imple- mentation where \G can be useful. - Note, however, that PCRE's interpretation of \G, as the start of the + Note, however, that PCRE's interpretation of \G, as the start of the current match, is subtly different from Perl's, which defines it as the - end of the previous match. In Perl, these can be different when the - previously matched string was empty. Because PCRE does just one match + end of the previous match. In Perl, these can be different when the + previously matched string was empty. Because PCRE does just one match at a time, it cannot reproduce this behaviour. - If all the alternatives of a pattern begin with \G, the expression is + If all the alternatives of a pattern begin with \G, the expression is anchored to the starting match position, and the "anchored" flag is set in the compiled regular expression. @@ -3675,90 +3684,90 @@ BACKSLASH CIRCUMFLEX AND DOLLAR Outside a character class, in the default matching mode, the circumflex - character is an assertion that is true only if the current matching - point is at the start of the subject string. If the startoffset argu- - ment of pcre_exec() is non-zero, circumflex can never match if the - PCRE_MULTILINE option is unset. Inside a character class, circumflex + character is an assertion that is true only if the current matching + point is at the start of the subject string. If the startoffset argu- + ment of pcre_exec() is non-zero, circumflex can never match if the + PCRE_MULTILINE option is unset. Inside a character class, circumflex has an entirely different meaning (see below). - Circumflex need not be the first character of the pattern if a number - of alternatives are involved, but it should be the first thing in each - alternative in which it appears if the pattern is ever to match that - branch. If all possible alternatives start with a circumflex, that is, - if the pattern is constrained to match only at the start of the sub- - ject, it is said to be an "anchored" pattern. (There are also other + Circumflex need not be the first character of the pattern if a number + of alternatives are involved, but it should be the first thing in each + alternative in which it appears if the pattern is ever to match that + branch. If all possible alternatives start with a circumflex, that is, + if the pattern is constrained to match only at the start of the sub- + ject, it is said to be an "anchored" pattern. (There are also other constructs that can cause a pattern to be anchored.) - A dollar character is an assertion that is true only if the current - matching point is at the end of the subject string, or immediately + A dollar character is an assertion that is true only if the current + matching point is at the end of the subject string, or immediately before a newline at the end of the string (by default). Dollar need not - be the last character of the pattern if a number of alternatives are - involved, but it should be the last item in any branch in which it + be the last character of the pattern if a number of alternatives are + involved, but it should be the last item in any branch in which it appears. Dollar has no special meaning in a character class. - The meaning of dollar can be changed so that it matches only at the - very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at + The meaning of dollar can be changed so that it matches only at the + very end of the string, by setting the PCRE_DOLLAR_ENDONLY option at compile time. This does not affect the \Z assertion. The meanings of the circumflex and dollar characters are changed if the - PCRE_MULTILINE option is set. When this is the case, a circumflex - matches immediately after internal newlines as well as at the start of - the subject string. It does not match after a newline that ends the - string. A dollar matches before any newlines in the string, as well as - at the very end, when PCRE_MULTILINE is set. When newline is specified - as the two-character sequence CRLF, isolated CR and LF characters do + PCRE_MULTILINE option is set. When this is the case, a circumflex + matches immediately after internal newlines as well as at the start of + the subject string. It does not match after a newline that ends the + string. A dollar matches before any newlines in the string, as well as + at the very end, when PCRE_MULTILINE is set. When newline is specified + as the two-character sequence CRLF, isolated CR and LF characters do not indicate newlines. - For example, the pattern /^abc$/ matches the subject string "def\nabc" - (where \n represents a newline) in multiline mode, but not otherwise. - Consequently, patterns that are anchored in single line mode because - all branches start with ^ are not anchored in multiline mode, and a - match for circumflex is possible when the startoffset argument of - pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if + For example, the pattern /^abc$/ matches the subject string "def\nabc" + (where \n represents a newline) in multiline mode, but not otherwise. + Consequently, patterns that are anchored in single line mode because + all branches start with ^ are not anchored in multiline mode, and a + match for circumflex is possible when the startoffset argument of + pcre_exec() is non-zero. The PCRE_DOLLAR_ENDONLY option is ignored if PCRE_MULTILINE is set. - Note that the sequences \A, \Z, and \z can be used to match the start - and end of the subject in both modes, and if all branches of a pattern - start with \A it is always anchored, whether or not PCRE_MULTILINE is + Note that the sequences \A, \Z, and \z can be used to match the start + and end of the subject in both modes, and if all branches of a pattern + start with \A it is always anchored, whether or not PCRE_MULTILINE is set. FULL STOP (PERIOD, DOT) Outside a character class, a dot in the pattern matches any one charac- - ter in the subject string except (by default) a character that signi- - fies the end of a line. In UTF-8 mode, the matched character may be + ter in the subject string except (by default) a character that signi- + fies the end of a line. In UTF-8 mode, the matched character may be more than one byte long. - When a line ending is defined as a single character, dot never matches - that character; when the two-character sequence CRLF is used, dot does - not match CR if it is immediately followed by LF, but otherwise it - matches all characters (including isolated CRs and LFs). When any Uni- - code line endings are being recognized, dot does not match CR or LF or + When a line ending is defined as a single character, dot never matches + that character; when the two-character sequence CRLF is used, dot does + not match CR if it is immediately followed by LF, but otherwise it + matches all characters (including isolated CRs and LFs). When any Uni- + code line endings are being recognized, dot does not match CR or LF or any of the other line ending characters. - The behaviour of dot with regard to newlines can be changed. If the - PCRE_DOTALL option is set, a dot matches any one character, without + The behaviour of dot with regard to newlines can be changed. If the + PCRE_DOTALL option is set, a dot matches any one character, without exception. If the two-character sequence CRLF is present in the subject string, it takes two dots to match it. - The handling of dot is entirely independent of the handling of circum- - flex and dollar, the only relationship being that they both involve + The handling of dot is entirely independent of the handling of circum- + flex and dollar, the only relationship being that they both involve newlines. Dot has no special meaning in a character class. MATCHING A SINGLE BYTE Outside a character class, the escape sequence \C matches any one byte, - both in and out of UTF-8 mode. Unlike a dot, it always matches any - line-ending characters. The feature is provided in Perl in order to - match individual bytes in UTF-8 mode. Because it breaks up UTF-8 char- - acters into individual bytes, what remains in the string may be a mal- - formed UTF-8 string. For this reason, the \C escape sequence is best + both in and out of UTF-8 mode. Unlike a dot, it always matches any + line-ending characters. The feature is provided in Perl in order to + match individual bytes in UTF-8 mode. Because it breaks up UTF-8 char- + acters into individual bytes, what remains in the string may be a mal- + formed UTF-8 string. For this reason, the \C escape sequence is best avoided. - PCRE does not allow \C to appear in lookbehind assertions (described - below), because in UTF-8 mode this would make it impossible to calcu- + PCRE does not allow \C to appear in lookbehind assertions (described + below), because in UTF-8 mode this would make it impossible to calcu- late the length of the lookbehind. @@ -3768,97 +3777,97 @@ SQUARE BRACKETS AND CHARACTER CLASSES closing square bracket. A closing square bracket on its own is not spe- cial by default. However, if the PCRE_JAVASCRIPT_COMPAT option is set, a lone closing square bracket causes a compile-time error. If a closing - square bracket is required as a member of the class, it should be the - first data character in the class (after an initial circumflex, if + square bracket is required as a member of the class, it should be the + first data character in the class (after an initial circumflex, if present) or escaped with a backslash. - A character class matches a single character in the subject. In UTF-8 + A character class matches a single character in the subject. In UTF-8 mode, the character may be more than one byte long. A matched character must be in the set of characters defined by the class, unless the first - character in the class definition is a circumflex, in which case the - subject character must not be in the set defined by the class. If a - circumflex is actually required as a member of the class, ensure it is + character in the class definition is a circumflex, in which case the + subject character must not be in the set defined by the class. If a + circumflex is actually required as a member of the class, ensure it is not the first character, or escape it with a backslash. - For example, the character class [aeiou] matches any lower case vowel, - while [^aeiou] matches any character that is not a lower case vowel. + For example, the character class [aeiou] matches any lower case vowel, + while [^aeiou] matches any character that is not a lower case vowel. Note that a circumflex is just a convenient notation for specifying the - characters that are in the class by enumerating those that are not. A - class that starts with a circumflex is not an assertion; it still con- - sumes a character from the subject string, and therefore it fails if + characters that are in the class by enumerating those that are not. A + class that starts with a circumflex is not an assertion; it still con- + sumes a character from the subject string, and therefore it fails if the current pointer is at the end of the string. - In UTF-8 mode, characters with values greater than 255 can be included - in a class as a literal string of bytes, or by using the \x{ escaping + In UTF-8 mode, characters with values greater than 255 can be included + in a class as a literal string of bytes, or by using the \x{ escaping mechanism. - When caseless matching is set, any letters in a class represent both - their upper case and lower case versions, so for example, a caseless - [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not - match "A", whereas a caseful version would. In UTF-8 mode, PCRE always - understands the concept of case for characters whose values are less - than 128, so caseless matching is always possible. For characters with - higher values, the concept of case is supported if PCRE is compiled - with Unicode property support, but not otherwise. If you want to use - caseless matching in UTF8-mode for characters 128 and above, you must - ensure that PCRE is compiled with Unicode property support as well as + When caseless matching is set, any letters in a class represent both + their upper case and lower case versions, so for example, a caseless + [aeiou] matches "A" as well as "a", and a caseless [^aeiou] does not + match "A", whereas a caseful version would. In UTF-8 mode, PCRE always + understands the concept of case for characters whose values are less + than 128, so caseless matching is always possible. For characters with + higher values, the concept of case is supported if PCRE is compiled + with Unicode property support, but not otherwise. If you want to use + caseless matching in UTF8-mode for characters 128 and above, you must + ensure that PCRE is compiled with Unicode property support as well as with UTF-8 support. - Characters that might indicate line breaks are never treated in any - special way when matching character classes, whatever line-ending - sequence is in use, and whatever setting of the PCRE_DOTALL and + Characters that might indicate line breaks are never treated in any + special way when matching character classes, whatever line-ending + sequence is in use, and whatever setting of the PCRE_DOTALL and PCRE_MULTILINE options is used. A class such as [^a] always matches one of these characters. - The minus (hyphen) character can be used to specify a range of charac- - ters in a character class. For example, [d-m] matches any letter - between d and m, inclusive. If a minus character is required in a - class, it must be escaped with a backslash or appear in a position - where it cannot be interpreted as indicating a range, typically as the + The minus (hyphen) character can be used to specify a range of charac- + ters in a character class. For example, [d-m] matches any letter + between d and m, inclusive. If a minus character is required in a + class, it must be escaped with a backslash or appear in a position + where it cannot be interpreted as indicating a range, typically as the first or last character in the class. It is not possible to have the literal character "]" as the end charac- - ter of a range. A pattern such as [W-]46] is interpreted as a class of - two characters ("W" and "-") followed by a literal string "46]", so it - would match "W46]" or "-46]". However, if the "]" is escaped with a - backslash it is interpreted as the end of range, so [W-\]46] is inter- - preted as a class containing a range followed by two other characters. - The octal or hexadecimal representation of "]" can also be used to end + ter of a range. A pattern such as [W-]46] is interpreted as a class of + two characters ("W" and "-") followed by a literal string "46]", so it + would match "W46]" or "-46]". However, if the "]" is escaped with a + backslash it is interpreted as the end of range, so [W-\]46] is inter- + preted as a class containing a range followed by two other characters. + The octal or hexadecimal representation of "]" can also be used to end a range. - Ranges operate in the collating sequence of character values. They can - also be used for characters specified numerically, for example - [\000-\037]. In UTF-8 mode, ranges can include characters whose values + Ranges operate in the collating sequence of character values. They can + also be used for characters specified numerically, for example + [\000-\037]. In UTF-8 mode, ranges can include characters whose values are greater than 255, for example [\x{100}-\x{2ff}]. If a range that includes letters is used when caseless matching is set, it matches the letters in either case. For example, [W-c] is equivalent - to [][\\^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if - character tables for a French locale are in use, [\xc8-\xcb] matches - accented E characters in both cases. In UTF-8 mode, PCRE supports the - concept of case for characters with values greater than 128 only when + to [][\\^_`wxyzabc], matched caselessly, and in non-UTF-8 mode, if + character tables for a French locale are in use, [\xc8-\xcb] matches + accented E characters in both cases. In UTF-8 mode, PCRE supports the + concept of case for characters with values greater than 128 only when it is compiled with Unicode property support. - The character types \d, \D, \p, \P, \s, \S, \w, and \W may also appear - in a character class, and add the characters that they match to the + The character types \d, \D, \p, \P, \s, \S, \w, and \W may also appear + in a character class, and add the characters that they match to the class. For example, [\dABCDEF] matches any hexadecimal digit. A circum- - flex can conveniently be used with the upper case character types to - specify a more restricted set of characters than the matching lower - case type. For example, the class [^\W_] matches any letter or digit, + flex can conveniently be used with the upper case character types to + specify a more restricted set of characters than the matching lower + case type. For example, the class [^\W_] matches any letter or digit, but not underscore. - The only metacharacters that are recognized in character classes are - backslash, hyphen (only where it can be interpreted as specifying a - range), circumflex (only at the start), opening square bracket (only - when it can be interpreted as introducing a POSIX class name - see the - next section), and the terminating closing square bracket. However, + The only metacharacters that are recognized in character classes are + backslash, hyphen (only where it can be interpreted as specifying a + range), circumflex (only at the start), opening square bracket (only + when it can be interpreted as introducing a POSIX class name - see the + next section), and the terminating closing square bracket. However, escaping other non-alphanumeric characters does no harm. POSIX CHARACTER CLASSES Perl supports the POSIX notation for character classes. This uses names - enclosed by [: and :] within the enclosing square brackets. PCRE also + enclosed by [: and :] within the enclosing square brackets. PCRE also supports this notation. For example, [01[:alpha:]%] @@ -3881,18 +3890,18 @@ POSIX CHARACTER CLASSES word "word" characters (same as \w) xdigit hexadecimal digits - The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), - and space (32). Notice that this list includes the VT character (code + The "space" characters are HT (9), LF (10), VT (11), FF (12), CR (13), + and space (32). Notice that this list includes the VT character (code 11). This makes "space" different to \s, which does not include VT (for Perl compatibility). - The name "word" is a Perl extension, and "blank" is a GNU extension - from Perl 5.8. Another Perl extension is negation, which is indicated + The name "word" is a Perl extension, and "blank" is a GNU extension + from Perl 5.8. Another Perl extension is negation, which is indicated by a ^ character after the colon. For example, [12[:^digit:]] - matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the + matches "1", "2", or any non-digit. PCRE (and Perl) also recognize the POSIX syntax [.ch.] and [=ch=] where "ch" is a "collating element", but these are not supported, and an error is given if they are encountered. @@ -3902,24 +3911,24 @@ POSIX CHARACTER CLASSES VERTICAL BAR - Vertical bar characters are used to separate alternative patterns. For + Vertical bar characters are used to separate alternative patterns. For example, the pattern gilbert|sullivan - matches either "gilbert" or "sullivan". Any number of alternatives may - appear, and an empty alternative is permitted (matching the empty + matches either "gilbert" or "sullivan". Any number of alternatives may + appear, and an empty alternative is permitted (matching the empty string). The matching process tries each alternative in turn, from left - to right, and the first one that succeeds is used. If the alternatives - are within a subpattern (defined below), "succeeds" means matching the + to right, and the first one that succeeds is used. If the alternatives + are within a subpattern (defined below), "succeeds" means matching the rest of the main pattern as well as the alternative in the subpattern. INTERNAL OPTION SETTING - The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and - PCRE_EXTENDED options (which are Perl-compatible) can be changed from - within the pattern by a sequence of Perl option letters enclosed + The settings of the PCRE_CASELESS, PCRE_MULTILINE, PCRE_DOTALL, and + PCRE_EXTENDED options (which are Perl-compatible) can be changed from + within the pattern by a sequence of Perl option letters enclosed between "(?" and ")". The option letters are i for PCRE_CASELESS @@ -3929,46 +3938,46 @@ INTERNAL OPTION SETTING For example, (?im) sets caseless, multiline matching. It is also possi- ble to unset these options by preceding the letter with a hyphen, and a - combined setting and unsetting such as (?im-sx), which sets PCRE_CASE- - LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, - is also permitted. If a letter appears both before and after the + combined setting and unsetting such as (?im-sx), which sets PCRE_CASE- + LESS and PCRE_MULTILINE while unsetting PCRE_DOTALL and PCRE_EXTENDED, + is also permitted. If a letter appears both before and after the hyphen, the option is unset. - The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA - can be changed in the same way as the Perl-compatible options by using + The PCRE-specific options PCRE_DUPNAMES, PCRE_UNGREEDY, and PCRE_EXTRA + can be changed in the same way as the Perl-compatible options by using the characters J, U and X respectively. - When one of these option changes occurs at top level (that is, not - inside subpattern parentheses), the change applies to the remainder of + When one of these option changes occurs at top level (that is, not + inside subpattern parentheses), the change applies to the remainder of the pattern that follows. If the change is placed right at the start of a pattern, PCRE extracts it into the global options (and it will there- fore show up in data extracted by the pcre_fullinfo() function). - An option change within a subpattern (see below for a description of + An option change within a subpattern (see below for a description of subpatterns) affects only that part of the current pattern that follows it, so (a(?i)b)c matches abc and aBc and no other strings (assuming PCRE_CASELESS is not - used). By this means, options can be made to have different settings - in different parts of the pattern. Any changes made in one alternative - do carry on into subsequent branches within the same subpattern. For + used). By this means, options can be made to have different settings + in different parts of the pattern. Any changes made in one alternative + do carry on into subsequent branches within the same subpattern. For example, (a(?i)b|c) - matches "ab", "aB", "c", and "C", even though when matching "C" the - first branch is abandoned before the option setting. This is because - the effects of option settings happen at compile time. There would be + matches "ab", "aB", "c", and "C", even though when matching "C" the + first branch is abandoned before the option setting. This is because + the effects of option settings happen at compile time. There would be some very weird behaviour otherwise. - Note: There are other PCRE-specific options that can be set by the - application when the compile or match functions are called. In some + Note: There are other PCRE-specific options that can be set by the + application when the compile or match functions are called. In some cases the pattern can contain special leading sequences such as (*CRLF) - to override what the application has set or what has been defaulted. - Details are given in the section entitled "Newline sequences" above. - There is also the (*UTF8) leading sequence that can be used to set + to override what the application has set or what has been defaulted. + Details are given in the section entitled "Newline sequences" above. + There is also the (*UTF8) leading sequence that can be used to set UTF-8 mode; this is equivalent to setting the PCRE_UTF8 option. @@ -3981,18 +3990,18 @@ SUBPATTERNS cat(aract|erpillar|) - matches one of the words "cat", "cataract", or "caterpillar". Without - the parentheses, it would match "cataract", "erpillar" or an empty + matches one of the words "cat", "cataract", or "caterpillar". Without + the parentheses, it would match "cataract", "erpillar" or an empty string. - 2. It sets up the subpattern as a capturing subpattern. This means - that, when the whole pattern matches, that portion of the subject + 2. It sets up the subpattern as a capturing subpattern. This means + that, when the whole pattern matches, that portion of the subject string that matched the subpattern is passed back to the caller via the - ovector argument of pcre_exec(). Opening parentheses are counted from - left to right (starting from 1) to obtain numbers for the capturing + ovector argument of pcre_exec(). Opening parentheses are counted from + left to right (starting from 1) to obtain numbers for the capturing subpatterns. - For example, if the string "the red king" is matched against the pat- + For example, if the string "the red king" is matched against the pat- tern the ((red|white) (king|queen)) @@ -4000,12 +4009,12 @@ SUBPATTERNS the captured substrings are "red king", "red", and "king", and are num- bered 1, 2, and 3, respectively. - The fact that plain parentheses fulfil two functions is not always - helpful. There are often times when a grouping subpattern is required - without a capturing requirement. If an opening parenthesis is followed - by a question mark and a colon, the subpattern does not do any captur- - ing, and is not counted when computing the number of any subsequent - capturing subpatterns. For example, if the string "the white queen" is + The fact that plain parentheses fulfil two functions is not always + helpful. There are often times when a grouping subpattern is required + without a capturing requirement. If an opening parenthesis is followed + by a question mark and a colon, the subpattern does not do any captur- + ing, and is not counted when computing the number of any subsequent + capturing subpatterns. For example, if the string "the white queen" is matched against the pattern the ((?:red|white) (king|queen)) @@ -4013,96 +4022,96 @@ SUBPATTERNS the captured substrings are "white queen" and "queen", and are numbered 1 and 2. The maximum number of capturing subpatterns is 65535. - As a convenient shorthand, if any option settings are required at the - start of a non-capturing subpattern, the option letters may appear + As a convenient shorthand, if any option settings are required at the + start of a non-capturing subpattern, the option letters may appear between the "?" and the ":". Thus the two patterns (?i:saturday|sunday) (?:(?i)saturday|sunday) match exactly the same set of strings. Because alternative branches are - tried from left to right, and options are not reset until the end of - the subpattern is reached, an option setting in one branch does affect - subsequent branches, so the above patterns match "SUNDAY" as well as + tried from left to right, and options are not reset until the end of + the subpattern is reached, an option setting in one branch does affect + subsequent branches, so the above patterns match "SUNDAY" as well as "Saturday". DUPLICATE SUBPATTERN NUMBERS Perl 5.10 introduced a feature whereby each alternative in a subpattern - uses the same numbers for its capturing parentheses. Such a subpattern - starts with (?| and is itself a non-capturing subpattern. For example, + uses the same numbers for its capturing parentheses. Such a subpattern + starts with (?| and is itself a non-capturing subpattern. For example, consider this pattern: (?|(Sat)ur|(Sun))day - Because the two alternatives are inside a (?| group, both sets of cap- - turing parentheses are numbered one. Thus, when the pattern matches, - you can look at captured substring number one, whichever alternative - matched. This construct is useful when you want to capture part, but + Because the two alternatives are inside a (?| group, both sets of cap- + turing parentheses are numbered one. Thus, when the pattern matches, + you can look at captured substring number one, whichever alternative + matched. This construct is useful when you want to capture part, but not all, of one of a number of alternatives. Inside a (?| group, paren- - theses are numbered as usual, but the number is reset at the start of - each branch. The numbers of any capturing buffers that follow the sub- - pattern start after the highest number used in any branch. The follow- - ing example is taken from the Perl documentation. The numbers under- + theses are numbered as usual, but the number is reset at the start of + each branch. The numbers of any capturing buffers that follow the sub- + pattern start after the highest number used in any branch. The follow- + ing example is taken from the Perl documentation. The numbers under- neath show in which buffer the captured content will be stored. # before ---------------branch-reset----------- after / ( a ) (?| x ( y ) z | (p (q) r) | (t) u (v) ) ( z ) /x # 1 2 2 3 2 3 4 - A backreference to a numbered subpattern uses the most recent value - that is set for that number by any subpattern. The following pattern + A back reference to a numbered subpattern uses the most recent value + that is set for that number by any subpattern. The following pattern matches "abcabc" or "defdef": /(?|(abc)|(def))\1/ - In contrast, a recursive or "subroutine" call to a numbered subpattern - always refers to the first one in the pattern with the given number. + In contrast, a recursive or "subroutine" call to a numbered subpattern + always refers to the first one in the pattern with the given number. The following pattern matches "abcabc" or "defabc": /(?|(abc)|(def))(?1)/ - If a condition test for a subpattern's having matched refers to a non- - unique number, the test is true if any of the subpatterns of that num- + If a condition test for a subpattern's having matched refers to a non- + unique number, the test is true if any of the subpatterns of that num- ber have matched. - An alternative approach to using this "branch reset" feature is to use + An alternative approach to using this "branch reset" feature is to use duplicate named subpatterns, as described in the next section. NAMED SUBPATTERNS - Identifying capturing parentheses by number is simple, but it can be - very hard to keep track of the numbers in complicated regular expres- - sions. Furthermore, if an expression is modified, the numbers may - change. To help with this difficulty, PCRE supports the naming of sub- + Identifying capturing parentheses by number is simple, but it can be + very hard to keep track of the numbers in complicated regular expres- + sions. Furthermore, if an expression is modified, the numbers may + change. To help with this difficulty, PCRE supports the naming of sub- patterns. This feature was not added to Perl until release 5.10. Python - had the feature earlier, and PCRE introduced it at release 4.0, using - the Python syntax. PCRE now supports both the Perl and the Python syn- - tax. Perl allows identically numbered subpatterns to have different + had the feature earlier, and PCRE introduced it at release 4.0, using + the Python syntax. PCRE now supports both the Perl and the Python syn- + tax. Perl allows identically numbered subpatterns to have different names, but PCRE does not. - In PCRE, a subpattern can be named in one of three ways: (?<name>...) - or (?'name'...) as in Perl, or (?P<name>...) as in Python. References - to capturing parentheses from other parts of the pattern, such as back- - references, recursion, and conditions, can be made by name as well as + In PCRE, a subpattern can be named in one of three ways: (?<name>...) + or (?'name'...) as in Perl, or (?P<name>...) as in Python. References + to capturing parentheses from other parts of the pattern, such as back + references, recursion, and conditions, can be made by name as well as by number. - Names consist of up to 32 alphanumeric characters and underscores. - Named capturing parentheses are still allocated numbers as well as - names, exactly as if the names were not present. The PCRE API provides + Names consist of up to 32 alphanumeric characters and underscores. + Named capturing parentheses are still allocated numbers as well as + names, exactly as if the names were not present. The PCRE API provides function calls for extracting the name-to-number translation table from a compiled pattern. There is also a convenience function for extracting a captured substring by name. - By default, a name must be unique within a pattern, but it is possible + By default, a name must be unique within a pattern, but it is possible to relax this constraint by setting the PCRE_DUPNAMES option at compile - time. (Duplicate names are also always permitted for subpatterns with - the same number, set up as described in the previous section.) Dupli- - cate names can be useful for patterns where only one instance of the - named parentheses can match. Suppose you want to match the name of a - weekday, either as a 3-letter abbreviation or as the full name, and in + time. (Duplicate names are also always permitted for subpatterns with + the same number, set up as described in the previous section.) Dupli- + cate names can be useful for patterns where only one instance of the + named parentheses can match. Suppose you want to match the name of a + weekday, either as a 3-letter abbreviation or as the full name, and in both cases you want to extract the abbreviation. This pattern (ignoring the line breaks) does the job: @@ -4112,38 +4121,38 @@ NAMED SUBPATTERNS (?<DN>Thu)(?:rsday)?| (?<DN>Sat)(?:urday)? - There are five capturing substrings, but only one is ever set after a + There are five capturing substrings, but only one is ever set after a match. (An alternative way of solving this problem is to use a "branch reset" subpattern, as described in the previous section.) - The convenience function for extracting the data by name returns the - substring for the first (and in this example, the only) subpattern of - that name that matched. This saves searching to find which numbered + The convenience function for extracting the data by name returns the + substring for the first (and in this example, the only) subpattern of + that name that matched. This saves searching to find which numbered subpattern it was. - If you make a backreference to a non-unique named subpattern from else- - where in the pattern, the one that corresponds to the first occurrence - of the name is used. In the absence of duplicate numbers (see the pre- - vious section) this is the one with the lowest number. If you use a - named reference in a condition test (see the section about conditions - below), either to check whether a subpattern has matched, or to check - for recursion, all subpatterns with the same name are tested. If the - condition is true for any one of them, the overall condition is true. + If you make a back reference to a non-unique named subpattern from + elsewhere in the pattern, the one that corresponds to the first occur- + rence of the name is used. In the absence of duplicate numbers (see the + previous section) this is the one with the lowest number. If you use a + named reference in a condition test (see the section about conditions + below), either to check whether a subpattern has matched, or to check + for recursion, all subpatterns with the same name are tested. If the + condition is true for any one of them, the overall condition is true. This is the same behaviour as testing by number. For further details of the interfaces for handling named subpatterns, see the pcreapi documen- tation. Warning: You cannot use different names to distinguish between two sub- - patterns with the same number because PCRE uses only the numbers when + patterns with the same number because PCRE uses only the numbers when matching. For this reason, an error is given at compile time if differ- - ent names are given to subpatterns with the same number. However, you - can give the same name to subpatterns with the same number, even when + ent names are given to subpatterns with the same number. However, you + can give the same name to subpatterns with the same number, even when PCRE_DUPNAMES is not set. REPETITION - Repetition is specified by quantifiers, which can follow any of the + Repetition is specified by quantifiers, which can follow any of the following items: a literal data character @@ -4157,17 +4166,17 @@ REPETITION a parenthesized subpattern (unless it is an assertion) a recursive or "subroutine" call to a subpattern - The general repetition quantifier specifies a minimum and maximum num- - ber of permitted matches, by giving the two numbers in curly brackets - (braces), separated by a comma. The numbers must be less than 65536, + The general repetition quantifier specifies a minimum and maximum num- + ber of permitted matches, by giving the two numbers in curly brackets + (braces), separated by a comma. The numbers must be less than 65536, and the first must be less than or equal to the second. For example: z{2,4} - matches "zz", "zzz", or "zzzz". A closing brace on its own is not a - special character. If the second number is omitted, but the comma is - present, there is no upper limit; if the second number and the comma - are both omitted, the quantifier specifies an exact number of required + matches "zz", "zzz", or "zzzz". A closing brace on its own is not a + special character. If the second number is omitted, but the comma is + present, there is no upper limit; if the second number and the comma + are both omitted, the quantifier specifies an exact number of required matches. Thus [aeiou]{3,} @@ -4176,49 +4185,49 @@ REPETITION \d{8} - matches exactly 8 digits. An opening curly bracket that appears in a - position where a quantifier is not allowed, or one that does not match - the syntax of a quantifier, is taken as a literal character. For exam- + matches exactly 8 digits. An opening curly bracket that appears in a + position where a quantifier is not allowed, or one that does not match + the syntax of a quantifier, is taken as a literal character. For exam- ple, {,6} is not a quantifier, but a literal string of four characters. - In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to + In UTF-8 mode, quantifiers apply to UTF-8 characters rather than to individual bytes. Thus, for example, \x{100}{2} matches two UTF-8 char- acters, each of which is represented by a two-byte sequence. Similarly, when Unicode property support is available, \X{3} matches three Unicode - extended sequences, each of which may be several bytes long (and they + extended sequences, each of which may be several bytes long (and they may be of different lengths). The quantifier {0} is permitted, causing the expression to behave as if the previous item and the quantifier were not present. This may be use- - ful for subpatterns that are referenced as subroutines from elsewhere + ful for subpatterns that are referenced as subroutines from elsewhere in the pattern. Items other than subpatterns that have a {0} quantifier are omitted from the compiled pattern. - For convenience, the three most common quantifiers have single-charac- + For convenience, the three most common quantifiers have single-charac- ter abbreviations: * is equivalent to {0,} + is equivalent to {1,} ? is equivalent to {0,1} - It is possible to construct infinite loops by following a subpattern + It is possible to construct infinite loops by following a subpattern that can match no characters with a quantifier that has no upper limit, for example: (a?)* Earlier versions of Perl and PCRE used to give an error at compile time - for such patterns. However, because there are cases where this can be - useful, such patterns are now accepted, but if any repetition of the - subpattern does in fact match no characters, the loop is forcibly bro- + for such patterns. However, because there are cases where this can be + useful, such patterns are now accepted, but if any repetition of the + subpattern does in fact match no characters, the loop is forcibly bro- ken. - By default, the quantifiers are "greedy", that is, they match as much - as possible (up to the maximum number of permitted times), without - causing the rest of the pattern to fail. The classic example of where + By default, the quantifiers are "greedy", that is, they match as much + as possible (up to the maximum number of permitted times), without + causing the rest of the pattern to fail. The classic example of where this gives problems is in trying to match comments in C programs. These - appear between /* and */ and within the comment, individual * and / - characters may appear. An attempt to match C comments by applying the + appear between /* and */ and within the comment, individual * and / + characters may appear. An attempt to match C comments by applying the pattern /\*.*\*/ @@ -4227,19 +4236,19 @@ REPETITION /* first comment */ not comment /* second comment */ - fails, because it matches the entire string owing to the greediness of + fails, because it matches the entire string owing to the greediness of the .* item. - However, if a quantifier is followed by a question mark, it ceases to + However, if a quantifier is followed by a question mark, it ceases to be greedy, and instead matches the minimum number of times possible, so the pattern /\*.*?\*/ - does the right thing with the C comments. The meaning of the various - quantifiers is not otherwise changed, just the preferred number of - matches. Do not confuse this use of question mark with its use as a - quantifier in its own right. Because it has two uses, it can sometimes + does the right thing with the C comments. The meaning of the various + quantifiers is not otherwise changed, just the preferred number of + matches. Do not confuse this use of question mark with its use as a + quantifier in its own right. Because it has two uses, it can sometimes appear doubled, as in \d??\d @@ -4247,36 +4256,36 @@ REPETITION which matches one digit by preference, but can match two if that is the only way the rest of the pattern matches. - If the PCRE_UNGREEDY option is set (an option that is not available in - Perl), the quantifiers are not greedy by default, but individual ones - can be made greedy by following them with a question mark. In other + If the PCRE_UNGREEDY option is set (an option that is not available in + Perl), the quantifiers are not greedy by default, but individual ones + can be made greedy by following them with a question mark. In other words, it inverts the default behaviour. - When a parenthesized subpattern is quantified with a minimum repeat - count that is greater than 1 or with a limited maximum, more memory is - required for the compiled pattern, in proportion to the size of the + When a parenthesized subpattern is quantified with a minimum repeat + count that is greater than 1 or with a limited maximum, more memory is + required for the compiled pattern, in proportion to the size of the minimum or maximum. If a pattern starts with .* or .{0,} and the PCRE_DOTALL option (equiv- - alent to Perl's /s) is set, thus allowing the dot to match newlines, - the pattern is implicitly anchored, because whatever follows will be - tried against every character position in the subject string, so there - is no point in retrying the overall match at any position after the - first. PCRE normally treats such a pattern as though it were preceded + alent to Perl's /s) is set, thus allowing the dot to match newlines, + the pattern is implicitly anchored, because whatever follows will be + tried against every character position in the subject string, so there + is no point in retrying the overall match at any position after the + first. PCRE normally treats such a pattern as though it were preceded by \A. - In cases where it is known that the subject string contains no new- - lines, it is worth setting PCRE_DOTALL in order to obtain this opti- + In cases where it is known that the subject string contains no new- + lines, it is worth setting PCRE_DOTALL in order to obtain this opti- mization, or alternatively using ^ to indicate anchoring explicitly. - However, there is one situation where the optimization cannot be used. - When .* is inside capturing parentheses that are the subject of a - backreference elsewhere in the pattern, a match at the start may fail - where a later one succeeds. Consider, for example: + However, there is one situation where the optimization cannot be used. + When .* is inside capturing parentheses that are the subject of a back + reference elsewhere in the pattern, a match at the start may fail where + a later one succeeds. Consider, for example: (.*)abc\1 - If the subject is "xyz123abc123" the match point is the fourth charac- + If the subject is "xyz123abc123" the match point is the fourth charac- ter. For this reason, such a pattern is not implicitly anchored. When a capturing subpattern is repeated, the value captured is the sub- @@ -4285,8 +4294,8 @@ REPETITION (tweedle[dume]{3}\s*)+ has matched "tweedledum tweedledee" the value of the captured substring - is "tweedledee". However, if there are nested capturing subpatterns, - the corresponding captured values may have been set in previous itera- + is "tweedledee". However, if there are nested capturing subpatterns, + the corresponding captured values may have been set in previous itera- tions. For example, after /(a|(b))+/ @@ -4296,53 +4305,53 @@ REPETITION ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS - With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy") - repetition, failure of what follows normally causes the repeated item - to be re-evaluated to see if a different number of repeats allows the - rest of the pattern to match. Sometimes it is useful to prevent this, - either to change the nature of the match, or to cause it fail earlier - than it otherwise might, when the author of the pattern knows there is + With both maximizing ("greedy") and minimizing ("ungreedy" or "lazy") + repetition, failure of what follows normally causes the repeated item + to be re-evaluated to see if a different number of repeats allows the + rest of the pattern to match. Sometimes it is useful to prevent this, + either to change the nature of the match, or to cause it fail earlier + than it otherwise might, when the author of the pattern knows there is no point in carrying on. - Consider, for example, the pattern \d+foo when applied to the subject + Consider, for example, the pattern \d+foo when applied to the subject line 123456bar After matching all 6 digits and then failing to match "foo", the normal - action of the matcher is to try again with only 5 digits matching the - \d+ item, and then with 4, and so on, before ultimately failing. - "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides - the means for specifying that once a subpattern has matched, it is not + action of the matcher is to try again with only 5 digits matching the + \d+ item, and then with 4, and so on, before ultimately failing. + "Atomic grouping" (a term taken from Jeffrey Friedl's book) provides + the means for specifying that once a subpattern has matched, it is not to be re-evaluated in this way. - If we use atomic grouping for the previous example, the matcher gives - up immediately on failing to match "foo" the first time. The notation + If we use atomic grouping for the previous example, the matcher gives + up immediately on failing to match "foo" the first time. The notation is a kind of special parenthesis, starting with (?> as in this example: (?>\d+)foo - This kind of parenthesis "locks up" the part of the pattern it con- - tains once it has matched, and a failure further into the pattern is - prevented from backtracking into it. Backtracking past it to previous + This kind of parenthesis "locks up" the part of the pattern it con- + tains once it has matched, and a failure further into the pattern is + prevented from backtracking into it. Backtracking past it to previous items, however, works as normal. - An alternative description is that a subpattern of this type matches - the string of characters that an identical standalone pattern would + An alternative description is that a subpattern of this type matches + the string of characters that an identical standalone pattern would match, if anchored at the current point in the subject string. Atomic grouping subpatterns are not capturing subpatterns. Simple cases such as the above example can be thought of as a maximizing repeat that - must swallow everything it can. So, while both \d+ and \d+? are pre- - pared to adjust the number of digits they match in order to make the + must swallow everything it can. So, while both \d+ and \d+? are pre- + pared to adjust the number of digits they match in order to make the rest of the pattern match, (?>\d+) can only match an entire sequence of digits. - Atomic groups in general can of course contain arbitrarily complicated - subpatterns, and can be nested. However, when the subpattern for an + Atomic groups in general can of course contain arbitrarily complicated + subpatterns, and can be nested. However, when the subpattern for an atomic group is just a single repeated item, as in the example above, a - simpler notation, called a "possessive quantifier" can be used. This - consists of an additional + character following a quantifier. Using + simpler notation, called a "possessive quantifier" can be used. This + consists of an additional + character following a quantifier. Using this notation, the previous example can be rewritten as \d++foo @@ -4352,45 +4361,45 @@ ATOMIC GROUPING AND POSSESSIVE QUANTIFIERS (abc|xyz){2,3}+ - Possessive quantifiers are always greedy; the setting of the + Possessive quantifiers are always greedy; the setting of the PCRE_UNGREEDY option is ignored. They are a convenient notation for the - simpler forms of atomic group. However, there is no difference in the - meaning of a possessive quantifier and the equivalent atomic group, - though there may be a performance difference; possessive quantifiers + simpler forms of atomic group. However, there is no difference in the + meaning of a possessive quantifier and the equivalent atomic group, + though there may be a performance difference; possessive quantifiers should be slightly faster. - The possessive quantifier syntax is an extension to the Perl 5.8 syn- - tax. Jeffrey Friedl originated the idea (and the name) in the first + The possessive quantifier syntax is an extension to the Perl 5.8 syn- + tax. Jeffrey Friedl originated the idea (and the name) in the first edition of his book. Mike McCloskey liked it, so implemented it when he - built Sun's Java package, and PCRE copied it from there. It ultimately + built Sun's Java package, and PCRE copied it from there. It ultimately found its way into Perl at release 5.10. PCRE has an optimization that automatically "possessifies" certain sim- - ple pattern constructs. For example, the sequence A+B is treated as - A++B because there is no point in backtracking into a sequence of A's + ple pattern constructs. For example, the sequence A+B is treated as + A++B because there is no point in backtracking into a sequence of A's when B must follow. - When a pattern contains an unlimited repeat inside a subpattern that - can itself be repeated an unlimited number of times, the use of an - atomic group is the only way to avoid some failing matches taking a + When a pattern contains an unlimited repeat inside a subpattern that + can itself be repeated an unlimited number of times, the use of an + atomic group is the only way to avoid some failing matches taking a very long time indeed. The pattern (\D+|<\d+>)*[!?] - matches an unlimited number of substrings that either consist of non- - digits, or digits enclosed in <>, followed by either ! or ?. When it + matches an unlimited number of substrings that either consist of non- + digits, or digits enclosed in <>, followed by either ! or ?. When it matches, it runs quickly. However, if it is applied to aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa - it takes a long time before reporting failure. This is because the - string can be divided between the internal \D+ repeat and the external - * repeat in a large number of ways, and all have to be tried. (The - example uses [!?] rather than a single character at the end, because - both PCRE and Perl have an optimization that allows for fast failure - when a single character is used. They remember the last single charac- - ter that is required for a match, and fail early if it is not present - in the string.) If the pattern is changed so that it uses an atomic + it takes a long time before reporting failure. This is because the + string can be divided between the internal \D+ repeat and the external + * repeat in a large number of ways, and all have to be tried. (The + example uses [!?] rather than a single character at the end, because + both PCRE and Perl have an optimization that allows for fast failure + when a single character is used. They remember the last single charac- + ter that is required for a match, and fail early if it is not present + in the string.) If the pattern is changed so that it uses an atomic group, like this: ((?>\D+)|<\d+>)*[!?] @@ -4402,37 +4411,37 @@ BACK REFERENCES Outside a character class, a backslash followed by a digit greater than 0 (and possibly further digits) is a back reference to a capturing sub- - pattern earlier (that is, to its left) in the pattern, provided there + pattern earlier (that is, to its left) in the pattern, provided there have been that many previous capturing left parentheses. However, if the decimal number following the backslash is less than 10, - it is always taken as a back reference, and causes an error only if - there are not that many capturing left parentheses in the entire pat- - tern. In other words, the parentheses that are referenced need not be - to the left of the reference for numbers less than 10. A "forward back - reference" of this type can make sense when a repetition is involved - and the subpattern to the right has participated in an earlier itera- + it is always taken as a back reference, and causes an error only if + there are not that many capturing left parentheses in the entire pat- + tern. In other words, the parentheses that are referenced need not be + to the left of the reference for numbers less than 10. A "forward back + reference" of this type can make sense when a repetition is involved + and the subpattern to the right has participated in an earlier itera- tion. - It is not possible to have a numerical "forward back reference" to a - subpattern whose number is 10 or more using this syntax because a - sequence such as \50 is interpreted as a character defined in octal. + It is not possible to have a numerical "forward back reference" to a + subpattern whose number is 10 or more using this syntax because a + sequence such as \50 is interpreted as a character defined in octal. See the subsection entitled "Non-printing characters" above for further - details of the handling of digits following a backslash. There is no - such problem when named parentheses are used. A back reference to any + details of the handling of digits following a backslash. There is no + such problem when named parentheses are used. A back reference to any subpattern is possible using named parentheses (see below). - Another way of avoiding the ambiguity inherent in the use of digits + Another way of avoiding the ambiguity inherent in the use of digits following a backslash is to use the \g escape sequence, which is a fea- - ture introduced in Perl 5.10. This escape must be followed by an - unsigned number or a negative number, optionally enclosed in braces. + ture introduced in Perl 5.10. This escape must be followed by an + unsigned number or a negative number, optionally enclosed in braces. These examples are all identical: (ring), \1 (ring), \g1 (ring), \g{1} - An unsigned number specifies an absolute reference without the ambigu- + An unsigned number specifies an absolute reference without the ambigu- ity that is present in the older syntax. It is also useful when literal digits follow the reference. A negative number is a relative reference. Consider this example: @@ -4440,33 +4449,33 @@ BACK REFERENCES (abc(def)ghi)\g{-1} The sequence \g{-1} is a reference to the most recently started captur- - ing subpattern before \g, that is, is it equivalent to \2. Similarly, + ing subpattern before \g, that is, is it equivalent to \2. Similarly, \g{-2} would be equivalent to \1. The use of relative references can be - helpful in long patterns, and also in patterns that are created by + helpful in long patterns, and also in patterns that are created by joining together fragments that contain references within themselves. - A back reference matches whatever actually matched the capturing sub- - pattern in the current subject string, rather than anything matching + A back reference matches whatever actually matched the capturing sub- + pattern in the current subject string, rather than anything matching the subpattern itself (see "Subpatterns as subroutines" below for a way of doing that). So the pattern (sens|respons)e and \1ibility - matches "sense and sensibility" and "response and responsibility", but - not "sense and responsibility". If caseful matching is in force at the - time of the back reference, the case of letters is relevant. For exam- + matches "sense and sensibility" and "response and responsibility", but + not "sense and responsibility". If caseful matching is in force at the + time of the back reference, the case of letters is relevant. For exam- ple, ((?i)rah)\s+\1 - matches "rah rah" and "RAH RAH", but not "RAH rah", even though the + matches "rah rah" and "RAH RAH", but not "RAH rah", even though the original capturing subpattern is matched caselessly. - There are several different ways of writing back references to named - subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or - \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's + There are several different ways of writing back references to named + subpatterns. The .NET syntax \k{name} and the Perl syntax \k<name> or + \k'name' are supported, as is the Python syntax (?P=name). Perl 5.10's unified back reference syntax, in which \g can be used for both numeric - and named references, is also supported. We could rewrite the above + and named references, is also supported. We could rewrite the above example in any of the following ways: (?<p1>(?i)rah)\s+\k<p1> @@ -4474,40 +4483,47 @@ BACK REFERENCES (?P<p1>(?i)rah)\s+(?P=p1) (?<p1>(?i)rah)\s+\g{p1} - A subpattern that is referenced by name may appear in the pattern + A subpattern that is referenced by name may appear in the pattern before or after the reference. - There may be more than one back reference to the same subpattern. If a - subpattern has not actually been used in a particular match, any back + There may be more than one back reference to the same subpattern. If a + subpattern has not actually been used in a particular match, any back references to it always fail by default. For example, the pattern (a|(bc))\2 - always fails if it starts to match "a" rather than "bc". However, if + always fails if it starts to match "a" rather than "bc". However, if the PCRE_JAVASCRIPT_COMPAT option is set at compile time, a back refer- ence to an unset value matches an empty string. - Because there may be many capturing parentheses in a pattern, all dig- - its following a backslash are taken as part of a potential back refer- - ence number. If the pattern continues with a digit character, some - delimiter must be used to terminate the back reference. If the + Because there may be many capturing parentheses in a pattern, all dig- + its following a backslash are taken as part of a potential back refer- + ence number. If the pattern continues with a digit character, some + delimiter must be used to terminate the back reference. If the PCRE_EXTENDED option is set, this can be whitespace. Otherwise, the \g{ syntax or an empty comment (see "Comments" below) can be used. - A back reference that occurs inside the parentheses to which it refers - fails when the subpattern is first used, so, for example, (a\1) never - matches. However, such references can be useful inside repeated sub- + Recursive back references + + A back reference that occurs inside the parentheses to which it refers + fails when the subpattern is first used, so, for example, (a\1) never + matches. However, such references can be useful inside repeated sub- patterns. For example, the pattern (a|b\1)+ matches any number of "a"s and also "aba", "ababbaa" etc. At each iter- - ation of the subpattern, the back reference matches the character - string corresponding to the previous iteration. In order for this to - work, the pattern must be such that the first iteration does not need - to match the back reference. This can be done using alternation, as in + ation of the subpattern, the back reference matches the character + string corresponding to the previous iteration. In order for this to + work, the pattern must be such that the first iteration does not need + to match the back reference. This can be done using alternation, as in the example above, or by a quantifier with a minimum of zero. + Back references of this type cause the group that they reference to be + treated as an atomic group. Once the whole group has been matched, a + subsequent matching failure cannot cause backtracking into the middle + of the group. + ASSERTIONS @@ -5244,8 +5260,8 @@ AUTHOR REVISION - Last updated: 18 October 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 06 March 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -5356,16 +5372,19 @@ GENERAL CATEGORY PROPERTY CODES FOR \p and \P SCRIPT NAMES FOR \p AND \P - Arabic, Armenian, Balinese, Bengali, Bopomofo, Braille, Buginese, - Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common, Coptic, Cu- - neiform, Cypriot, Cyrillic, Deseret, Devanagari, Ethiopic, Georgian, - Glagolitic, Gothic, Greek, Gujarati, Gurmukhi, Han, Hangul, Hanunoo, - Hebrew, Hiragana, Inherited, Kannada, Katakana, Kayah_Li, Kharoshthi, - Khmer, Lao, Latin, Lepcha, Limbu, Linear_B, Lycian, Lydian, Malayalam, - Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, Old_Persian, - Ol_Chiki, Oriya, Osmanya, Phags_Pa, Phoenician, Rejang, Runic, Saurash- - tra, Shavian, Sinhala, Sudanese, Syloti_Nagri, Syriac, Tagalog, Tag- - banwa, Tai_Le, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, + Arabic, Armenian, Avestan, Balinese, Bamum, Bengali, Bopomofo, Braille, + Buginese, Buhid, Canadian_Aboriginal, Carian, Cham, Cherokee, Common, + Coptic, Cuneiform, Cypriot, Cyrillic, Deseret, Devanagari, Egyp- + tian_Hieroglyphs, Ethiopic, Georgian, Glagolitic, Gothic, Greek, + Gujarati, Gurmukhi, Han, Hangul, Hanunoo, Hebrew, Hiragana, Impe- + rial_Aramaic, Inherited, Inscriptional_Pahlavi, Inscriptional_Parthian, + Javanese, Kaithi, Kannada, Katakana, Kayah_Li, Kharoshthi, Khmer, Lao, + Latin, Lepcha, Limbu, Linear_B, Lisu, Lycian, Lydian, Malayalam, + Meetei_Mayek, Mongolian, Myanmar, New_Tai_Lue, Nko, Ogham, Old_Italic, + Old_Persian, Old_South_Arabian, Old_Turkic, Ol_Chiki, Oriya, Osmanya, + Phags_Pa, Phoenician, Rejang, Runic, Samaritan, Saurashtra, Shavian, + Sinhala, Sundanese, Syloti_Nagri, Syriac, Tagalog, Tagbanwa, Tai_Le, + Tai_Tham, Tai_Viet, Tamil, Telugu, Thaana, Thai, Tibetan, Tifinagh, Ugaritic, Vai, Yi. @@ -5545,7 +5564,7 @@ BACKTRACKING CONTROL (*ACCEPT) force successful match (*FAIL) force backtrack; synonym (*F) - The following act only when a subsequent match failure causes a back- + The following act only when a subsequent match failure causes a back- track to reach them. They all force a match failure, but they differ in what happens afterwards. Those that advance the start-of-match point do so only if the pattern is not anchored. @@ -5558,7 +5577,7 @@ BACKTRACKING CONTROL NEWLINE CONVENTIONS - These are recognized only at the very start of the pattern or after a + These are recognized only at the very start of the pattern or after a (*BSR_...) or (*UTF8) option. (*CR) carriage return only @@ -5570,7 +5589,7 @@ NEWLINE CONVENTIONS WHAT \R MATCHES - These are recognized only at the very start of the pattern or after a + These are recognized only at the very start of the pattern or after a (*...) option that sets the newline convention or UTF-8 mode. (*BSR_ANYCRLF) CR, LF, or CRLF @@ -5597,8 +5616,8 @@ AUTHOR REVISION - Last updated: 11 April 2009 - Copyright (c) 1997-2009 University of Cambridge. + Last updated: 01 March 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -6122,14 +6141,14 @@ PCRE PERFORMANCE can affect both of them. -MEMORY USAGE +COMPILED PATTERN MEMORY USAGE Patterns are compiled by PCRE into a reasonably efficient byte code, so that most simple patterns do not use much memory. However, there is one - case where memory usage can be unexpectedly large. When a parenthesized - subpattern has a quantifier with a minimum greater than 1 and/or a lim- - ited maximum, the whole subpattern is repeated in the compiled code. - For example, the pattern + case where the memory usage of a compiled pattern can be unexpectedly + large. If a parenthesized subpattern has a quantifier with a minimum + greater than 1 and/or a limited maximum, the whole subpattern is + repeated in the compiled code. For example, the pattern (abc|def){2,4} @@ -6171,73 +6190,83 @@ MEMORY USAGE otherwise handle. +STACK USAGE AT RUN TIME + + When pcre_exec() is used for matching, certain kinds of pattern can + cause it to use large amounts of the process stack. In some environ- + ments the default process stack is quite small, and if it runs out the + result is often SIGSEGV. This issue is probably the most frequently + raised problem with PCRE. Rewriting your pattern can often help. The + pcrestack documentation discusses this issue in detail. + + PROCESSING TIME - Certain items in regular expression patterns are processed more effi- + Certain items in regular expression patterns are processed more effi- ciently than others. It is more efficient to use a character class like - [aeiou] than a set of single-character alternatives such as - (a|e|i|o|u). In general, the simplest construction that provides the + [aeiou] than a set of single-character alternatives such as + (a|e|i|o|u). In general, the simplest construction that provides the required behaviour is usually the most efficient. Jeffrey Friedl's book - contains a lot of useful general discussion about optimizing regular - expressions for efficient performance. This document contains a few + contains a lot of useful general discussion about optimizing regular + expressions for efficient performance. This document contains a few observations about PCRE. - Using Unicode character properties (the \p, \P, and \X escapes) is - slow, because PCRE has to scan a structure that contains data for over - fifteen thousand characters whenever it needs a character's property. - If you can find an alternative pattern that does not use character + Using Unicode character properties (the \p, \P, and \X escapes) is + slow, because PCRE has to scan a structure that contains data for over + fifteen thousand characters whenever it needs a character's property. + If you can find an alternative pattern that does not use character properties, it will probably be faster. - When a pattern begins with .* not in parentheses, or in parentheses + When a pattern begins with .* not in parentheses, or in parentheses that are not the subject of a backreference, and the PCRE_DOTALL option - is set, the pattern is implicitly anchored by PCRE, since it can match - only at the start of a subject string. However, if PCRE_DOTALL is not - set, PCRE cannot make this optimization, because the . metacharacter - does not then match a newline, and if the subject string contains new- - lines, the pattern may match from the character immediately following + is set, the pattern is implicitly anchored by PCRE, since it can match + only at the start of a subject string. However, if PCRE_DOTALL is not + set, PCRE cannot make this optimization, because the . metacharacter + does not then match a newline, and if the subject string contains new- + lines, the pattern may match from the character immediately following one of them instead of from the very start. For example, the pattern .*second - matches the subject "first\nand second" (where \n stands for a newline - character), with the match starting at the seventh character. In order + matches the subject "first\nand second" (where \n stands for a newline + character), with the match starting at the seventh character. In order to do this, PCRE has to retry the match starting after every newline in the subject. - If you are using such a pattern with subject strings that do not con- + If you are using such a pattern with subject strings that do not con- tain newlines, the best performance is obtained by setting PCRE_DOTALL, - or starting the pattern with ^.* or ^.*? to indicate explicit anchor- - ing. That saves PCRE from having to scan along the subject looking for + or starting the pattern with ^.* or ^.*? to indicate explicit anchor- + ing. That saves PCRE from having to scan along the subject looking for a newline to restart at. - Beware of patterns that contain nested indefinite repeats. These can - take a long time to run when applied to a string that does not match. + Beware of patterns that contain nested indefinite repeats. These can + take a long time to run when applied to a string that does not match. Consider the pattern fragment ^(a+)* - This can match "aaaa" in 16 different ways, and this number increases - very rapidly as the string gets longer. (The * repeat can match 0, 1, - 2, 3, or 4 times, and for each of those cases other than 0 or 4, the + - repeats can match different numbers of times.) When the remainder of + This can match "aaaa" in 16 different ways, and this number increases + very rapidly as the string gets longer. (The * repeat can match 0, 1, + 2, 3, or 4 times, and for each of those cases other than 0 or 4, the + + repeats can match different numbers of times.) When the remainder of the pattern is such that the entire match is going to fail, PCRE has in - principle to try every possible variation, and this can take an + principle to try every possible variation, and this can take an extremely long time, even for relatively short strings. An optimization catches some of the more simple cases such as (a+)*b - where a literal character follows. Before embarking on the standard - matching procedure, PCRE checks that there is a "b" later in the sub- - ject string, and if there is not, it fails the match immediately. How- - ever, when there is no following literal this optimization cannot be + where a literal character follows. Before embarking on the standard + matching procedure, PCRE checks that there is a "b" later in the sub- + ject string, and if there is not, it fails the match immediately. How- + ever, when there is no following literal this optimization cannot be used. You can see the difference by comparing the behaviour of (a+)*\d - with the pattern above. The former gives a failure almost instantly - when applied to a whole line of "a" characters, whereas the latter + with the pattern above. The former gives a failure almost instantly + when applied to a whole line of "a" characters, whereas the latter takes an appreciable time with strings longer than about 20 characters. In many cases, the solution to this kind of performance issue is to use @@ -6253,8 +6282,8 @@ AUTHOR REVISION - Last updated: 06 March 2007 - Copyright (c) 1997-2007 University of Cambridge. + Last updated: 07 March 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ @@ -6958,87 +6987,100 @@ PCRE DISCUSSION OF STACK USAGE restarted instead. The pcre_dfa_exec() function operates in an entirely different way, and - hardly uses recursion at all. The limit on its complexity is the amount - of workspace it is given. The comments that follow do NOT apply to - pcre_dfa_exec(); they are relevant only for pcre_exec(). - - You can set limits on the number of times that match() is called, both - in total and recursively. If the limit is exceeded, an error occurs. - For details, see the section on extra data for pcre_exec() in the - pcreapi documentation. - - Each time that match() is actually called recursively, it uses memory - from the process stack. For certain kinds of pattern and data, very - large amounts of stack may be needed, despite the recognition of "tail - recursion". You can often reduce the amount of recursion, and there- - fore the amount of stack used, by modifying the pattern that is being + uses recursion only when there is a regular expression recursion or + subroutine call in the pattern. This includes the processing of asser- + tion and "once-only" subpatterns, which are handled like subroutine + calls. Normally, these are never very deep, and the limit on the com- + plexity of pcre_dfa_exec() is controlled by the amount of workspace it + is given. However, it is possible to write patterns with runaway infi- + nite recursions; such patterns will cause pcre_dfa_exec() to run out of + stack. At present, there is no protection against this. + + The comments that follow do NOT apply to pcre_dfa_exec(); they are rel- + evant only for pcre_exec(). + + Reducing pcre_exec()'s stack usage + + Each time that match() is actually called recursively, it uses memory + from the process stack. For certain kinds of pattern and data, very + large amounts of stack may be needed, despite the recognition of "tail + recursion". You can often reduce the amount of recursion, and there- + fore the amount of stack used, by modifying the pattern that is being matched. Consider, for example, this pattern: ([^<]|<(?!inet))+ - It matches from wherever it starts until it encounters "<inet" or the - end of the data, and is the kind of pattern that might be used when + It matches from wherever it starts until it encounters "<inet" or the + end of the data, and is the kind of pattern that might be used when processing an XML file. Each iteration of the outer parentheses matches - either one character that is not "<" or a "<" that is not followed by - "inet". However, each time a parenthesis is processed, a recursion + either one character that is not "<" or a "<" that is not followed by + "inet". However, each time a parenthesis is processed, a recursion occurs, so this formulation uses a stack frame for each matched charac- - ter. For a long string, a lot of stack is required. Consider now this + ter. For a long string, a lot of stack is required. Consider now this rewritten pattern, which matches exactly the same strings: ([^<]++|<(?!inet))+ - This uses very much less stack, because runs of characters that do not - contain "<" are "swallowed" in one item inside the parentheses. Recur- - sion happens only when a "<" character that is not followed by "inet" - is encountered (and we assume this is relatively rare). A possessive - quantifier is used to stop any backtracking into the runs of non-"<" + This uses very much less stack, because runs of characters that do not + contain "<" are "swallowed" in one item inside the parentheses. Recur- + sion happens only when a "<" character that is not followed by "inet" + is encountered (and we assume this is relatively rare). A possessive + quantifier is used to stop any backtracking into the runs of non-"<" characters, but that is not related to stack usage. - This example shows that one way of avoiding stack problems when match- + This example shows that one way of avoiding stack problems when match- ing long subject strings is to write repeated parenthesized subpatterns to match more than one character whenever possible. - Compiling PCRE to use heap instead of stack - - In environments where stack memory is constrained, you might want to - compile PCRE to use heap memory instead of stack for remembering back- - up points. This makes it run a lot more slowly, however. Details of how - to do this are given in the pcrebuild documentation. When built in this - way, instead of using the stack, PCRE obtains and frees memory by call- - ing the functions that are pointed to by the pcre_stack_malloc and - pcre_stack_free variables. By default, these point to malloc() and - free(), but you can replace the pointers to cause PCRE to use your own - functions. Since the block sizes are always the same, and are always - freed in reverse order, it may be possible to implement customized mem- - ory handlers that are more efficient than the standard functions. - - Limiting PCRE's stack usage - - PCRE has an internal counter that can be used to limit the depth of - recursion, and thus cause pcre_exec() to give an error code before it - runs out of stack. By default, the limit is very large, and unlikely - ever to operate. It can be changed when PCRE is built, and it can also - be set when pcre_exec() is called. For details of these interfaces, see - the pcrebuild and pcreapi documentation. + Compiling PCRE to use heap instead of stack for pcre_exec() + + In environments where stack memory is constrained, you might want to + compile PCRE to use heap memory instead of stack for remembering back- + up points when pcre_exec() is running. This makes it run a lot more + slowly, however. Details of how to do this are given in the pcrebuild + documentation. When built in this way, instead of using the stack, PCRE + obtains and frees memory by calling the functions that are pointed to + by the pcre_stack_malloc and pcre_stack_free variables. By default, + these point to malloc() and free(), but you can replace the pointers to + cause PCRE to use your own functions. Since the block sizes are always + the same, and are always freed in reverse order, it may be possible to + implement customized memory handlers that are more efficient than the + standard functions. + + Limiting pcre_exec()'s stack usage + + You can set limits on the number of times that match() is called, both + in total and recursively. If a limit is exceeded, pcre_exec() returns + an error code. Setting suitable limits should prevent it from running + out of stack. The default values of the limits are very large, and + unlikely ever to operate. They can be changed when PCRE is built, and + they can also be set when pcre_exec() is called. For details of these + interfaces, see the pcrebuild documentation and the section on extra + data for pcre_exec() in the pcreapi documentation. As a very rough rule of thumb, you should reckon on about 500 bytes per recursion. Thus, if you want to limit your stack usage to 8Mb, you should set the limit at 16000 recursions. A 64Mb stack, on the other - hand, can support around 128000 recursions. The pcretest test program - has a command line option (-S) that can be used to increase the size of - its stack. + hand, can support around 128000 recursions. + + In Unix-like environments, the pcretest test program has a command line + option (-S) that can be used to increase the size of its stack. As long + as the stack is large enough, another option (-M) can be used to find + the smallest limits that allow a particular pattern to match a given + subject string. This is done by calling pcre_exec() repeatedly with + different limits. Changing stack size in Unix-like systems - In Unix-like environments, there is not often a problem with the stack - unless very long strings are involved, though the default limit on - stack size varies from system to system. Values from 8Mb to 64Mb are + In Unix-like environments, there is not often a problem with the stack + unless very long strings are involved, though the default limit on + stack size varies from system to system. Values from 8Mb to 64Mb are common. You can find your default limit by running the command: ulimit -s - Unfortunately, the effect of running out of stack is often SIGSEGV, - though sometimes a more explicit error message is given. You can nor- + Unfortunately, the effect of running out of stack is often SIGSEGV, + though sometimes a more explicit error message is given. You can nor- mally increase the limit on stack size by code such as this: struct rlimit rlim; @@ -7046,15 +7088,15 @@ PCRE DISCUSSION OF STACK USAGE rlim.rlim_cur = 100*1024*1024; setrlimit(RLIMIT_STACK, &rlim); - This reads the current limits (soft and hard) using getrlimit(), then - attempts to increase the soft limit to 100Mb using setrlimit(). You + This reads the current limits (soft and hard) using getrlimit(), then + attempts to increase the soft limit to 100Mb using setrlimit(). You must do this before calling pcre_exec(). Changing stack size in Mac OS X Using setrlimit(), as described above, should also work on Mac OS X. It is also possible to set a stack size when linking a program. There is a - discussion about stack sizes in Mac OS X at this web site: + discussion about stack sizes in Mac OS X at this web site: http://developer.apple.com/qa/qa2005/qa1419.html. @@ -7067,8 +7109,8 @@ AUTHOR REVISION - Last updated: 09 July 2008 - Copyright (c) 1997-2008 University of Cambridge. + Last updated: 03 January 2010 + Copyright (c) 1997-2010 University of Cambridge. ------------------------------------------------------------------------------ diff --git a/ext/pcre/pcrelib/pcre.h b/ext/pcre/pcrelib/pcre.h index 93dff102a..890b13de6 100644 --- a/ext/pcre/pcrelib/pcre.h +++ b/ext/pcre/pcrelib/pcre.h @@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE. /* The current PCRE version information. */ #define PCRE_MAJOR 8 -#define PCRE_MINOR 00 +#define PCRE_MINOR 02 #define PCRE_PRERELEASE -#define PCRE_DATE 2009-10-19 +#define PCRE_DATE 2010-03-19 /* When an application links to a PCRE DLL in Windows, the symbols that are imported have to be identified as such. When building PCRE, the appropriate diff --git a/ext/pcre/pcrelib/pcre_compile.c b/ext/pcre/pcrelib/pcre_compile.c index b197c1b54..54e23ea39 100644 --- a/ext/pcre/pcrelib/pcre_compile.c +++ b/ext/pcre/pcrelib/pcre_compile.c @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -51,10 +51,11 @@ supporting internal functions that are not used by other modules. */ #include "pcre_internal.h" -/* When DEBUG is defined, we need the pcre_printint() function, which is also -used by pcretest. DEBUG is not defined when building a production library. */ +/* When PCRE_DEBUG is defined, we need the pcre_printint() function, which is +also used by pcretest. PCRE_DEBUG is not defined when building a production +library. */ -#ifdef DEBUG +#ifdef PCRE_DEBUG #include "pcre_printint.src" #endif @@ -89,6 +90,11 @@ is 4 there is plenty of room. */ #define COMPILE_WORK_SIZE (4096) +/* The overrun tests check for a slightly smaller size so that they detect the +overrun before it actually does run off the end of the data block. */ + +#define WORK_SIZE_CHECK (COMPILE_WORK_SIZE - 100) + /* Table for handling escaped characters in the range '0'-'z'. Positive returns are simple data values; negative values are for special things like \d and so @@ -260,7 +266,11 @@ the number of relocations needed when a shared library is loaded dynamically, it is now one long string. We cannot use a table of offsets, because the lengths of inserts such as XSTRING(MAX_NAME_SIZE) are not known. Instead, we simply count through to the one we want - this isn't a performance issue -because these strings are used only when there is a compilation error. */ +because these strings are used only when there is a compilation error. + +Each substring ends with \0 to insert a null character. This includes the final +substring, so that the whole string ends with \0\0, which can be detected when +counting through. */ static const char error_texts[] = "no error\0" @@ -341,8 +351,7 @@ static const char error_texts[] = "digit expected after (?+\0" "] is an invalid data character in JavaScript compatibility mode\0" /* 65 */ - "different names for subpatterns of the same number are not allowed"; - + "different names for subpatterns of the same number are not allowed\0"; /* Table to identify digits and hex digits. This is used when compiling patterns. Note that the tables in chartables are dependent on the locale, and @@ -500,7 +509,11 @@ static const char * find_error_text(int n) { const char *s = error_texts; -for (; n > 0; n--) while (*s++ != 0) {}; +for (; n > 0; n--) + { + while (*s++ != 0) {}; + if (*s == 0) return "Error text not found (please report)"; + } return s; } @@ -1440,6 +1453,7 @@ for (;;) case OP_CALLOUT: case OP_SOD: case OP_SOM: + case OP_SET_SOM: case OP_EOD: case OP_EODN: case OP_CIRC: @@ -1774,12 +1788,14 @@ Arguments: code points to start of search endcode points to where to stop utf8 TRUE if in UTF8 mode + cd contains pointers to tables etc. Returns: TRUE if what is matched could be empty */ static BOOL -could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8) +could_be_empty_branch(const uschar *code, const uschar *endcode, BOOL utf8, + compile_data *cd) { register int c; for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE); @@ -1810,6 +1826,28 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE continue; } + /* For a recursion/subroutine call, if its end has been reached, which + implies a subroutine call, we can scan it. */ + + if (c == OP_RECURSE) + { + BOOL empty_branch = FALSE; + const uschar *scode = cd->start_code + GET(code, 1); + if (GET(scode, 1) == 0) return TRUE; /* Unclosed */ + do + { + if (could_be_empty_branch(scode, endcode, utf8, cd)) + { + empty_branch = TRUE; + break; + } + scode += GET(scode, 1); + } + while (*scode == OP_ALT); + if (!empty_branch) return FALSE; /* All branches are non-empty */ + continue; + } + /* For other groups, scan the branches. */ if (c == OP_BRA || c == OP_CBRA || c == OP_ONCE || c == OP_COND) @@ -1828,7 +1866,7 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE empty_branch = FALSE; do { - if (!empty_branch && could_be_empty_branch(code, endcode, utf8)) + if (!empty_branch && could_be_empty_branch(code, endcode, utf8, cd)) empty_branch = TRUE; code += GET(code, 1); } @@ -1962,6 +2000,11 @@ for (code = first_significant_code(code + _pcre_OP_lengths[*code], NULL, 0, TRUE if (utf8 && code[3] >= 0xc0) code += _pcre_utf8_table4[code[3] & 0x3f]; break; #endif + + /* None of the remaining opcodes are required to match a character. */ + + default: + break; } } @@ -1984,17 +2027,19 @@ Arguments: endcode points to where to stop (current RECURSE item) bcptr points to the chain of current (unclosed) branch starts utf8 TRUE if in UTF-8 mode + cd pointers to tables etc Returns: TRUE if what is matched could be empty */ static BOOL could_be_empty(const uschar *code, const uschar *endcode, branch_chain *bcptr, - BOOL utf8) + BOOL utf8, compile_data *cd) { -while (bcptr != NULL && bcptr->current >= code) +while (bcptr != NULL && bcptr->current_branch >= code) { - if (!could_be_empty_branch(bcptr->current, endcode, utf8)) return FALSE; + if (!could_be_empty_branch(bcptr->current_branch, endcode, utf8, cd)) + return FALSE; bcptr = bcptr->outer; } return TRUE; @@ -2656,7 +2701,7 @@ BOOL utf8 = FALSE; uschar *utf8_char = NULL; #endif -#ifdef DEBUG +#ifdef PCRE_DEBUG if (lengthptr != NULL) DPRINTF((">> start branch\n")); #endif @@ -2715,10 +2760,10 @@ for (;; ptr++) if (lengthptr != NULL) { -#ifdef DEBUG +#ifdef PCRE_DEBUG if (code > cd->hwm) cd->hwm = code; /* High water info */ #endif - if (code > cd->start_workspace + COMPILE_WORK_SIZE) /* Check for overrun */ + if (code > cd->start_workspace + WORK_SIZE_CHECK) /* Check for overrun */ { *errorcodeptr = ERR52; goto FAILED; @@ -2767,7 +2812,7 @@ for (;; ptr++) /* In the real compile phase, just check the workspace used by the forward reference list. */ - else if (cd->hwm > cd->start_workspace + COMPILE_WORK_SIZE) + else if (cd->hwm > cd->start_workspace + WORK_SIZE_CHECK) { *errorcodeptr = ERR52; goto FAILED; @@ -4211,13 +4256,15 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ { /* In the pre-compile phase, we don't actually do the replication. We just adjust the length as if we had. Do some paranoid checks for - potential integer overflow. */ + potential integer overflow. The INT64_OR_DOUBLE type is a 64-bit + integer type when available, otherwise double. */ if (lengthptr != NULL) { int delta = (repeat_min - 1)*length_prevgroup; - if ((double)(repeat_min - 1)*(double)length_prevgroup > - (double)INT_MAX || + if ((INT64_OR_DOUBLE)(repeat_min - 1)* + (INT64_OR_DOUBLE)length_prevgroup > + (INT64_OR_DOUBLE)INT_MAX || OFLOW_MAX - *lengthptr < delta) { *errorcodeptr = ERR20; @@ -4263,15 +4310,16 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ just adjust the length as if we had. For each repetition we must add 1 to the length for BRAZERO and for all but the last repetition we must add 2 + 2*LINKSIZE to allow for the nesting that occurs. Do some - paranoid checks to avoid integer overflow. */ + paranoid checks to avoid integer overflow. The INT64_OR_DOUBLE type is + a 64-bit integer type when available, otherwise double. */ if (lengthptr != NULL && repeat_max > 0) { int delta = repeat_max * (length_prevgroup + 1 + 2 + 2*LINK_SIZE) - 2 - 2*LINK_SIZE; /* Last one doesn't nest */ - if ((double)repeat_max * - (double)(length_prevgroup + 1 + 2 + 2*LINK_SIZE) - > (double)INT_MAX || + if ((INT64_OR_DOUBLE)repeat_max * + (INT64_OR_DOUBLE)(length_prevgroup + 1 + 2 + 2*LINK_SIZE) + > (INT64_OR_DOUBLE)INT_MAX || OFLOW_MAX - *lengthptr < delta) { *errorcodeptr = ERR20; @@ -4348,7 +4396,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ uschar *scode = bracode; do { - if (could_be_empty_branch(scode, ketcode, utf8)) + if (could_be_empty_branch(scode, ketcode, utf8, cd)) { *bracode += OP_SBRA - OP_BRA; break; @@ -4423,7 +4471,12 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ case OP_NOTQUERY: *tempcode = OP_NOTPOSQUERY; break; case OP_NOTUPTO: *tempcode = OP_NOTPOSUPTO; break; + /* Because we are moving code along, we must ensure that any + pending recursive references are updated. */ + default: + *code = OP_END; + adjust_recurse(tempcode, 1 + LINK_SIZE, utf8, cd, save_hwm); memmove(tempcode + 1+LINK_SIZE, tempcode, len); code += 1 + LINK_SIZE; len += 1 + LINK_SIZE; @@ -5142,6 +5195,11 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ *errorcodeptr = ERR15; goto FAILED; } + + /* Fudge the value of "called" so that when it is inserted as an + offset below, what it actually inserted is the reference number + of the group. */ + called = cd->start_code + recno; PUTINC(cd->hwm, 0, code + 2 + LINK_SIZE - cd->start_code); } @@ -5151,7 +5209,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ recursion that could loop for ever, and diagnose that case. */ else if (GET(called, 1) == 0 && - could_be_empty(called, code, bcptr, utf8)) + could_be_empty(called, code, bcptr, utf8, cd)) { *errorcodeptr = ERR40; goto FAILED; @@ -5246,7 +5304,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ { cd->external_options = newoptions; } - else + else { if ((options & PCRE_IMS) != (newoptions & PCRE_IMS)) { @@ -5583,6 +5641,7 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ if (-c >= ESC_REF) { + open_capitem *oc; recno = -c - ESC_REF; HANDLE_REFERENCE: /* Come here from named backref handling */ @@ -5592,6 +5651,19 @@ we set the flag only if there is a literal "\r" or "\n" in the class. */ PUT2INC(code, 0, recno); cd->backref_map |= (recno < 32)? (1 << recno) : 1; if (recno > cd->top_backref) cd->top_backref = recno; + + /* Check to see if this back reference is recursive, that it, it + is inside the group that it references. A flag is set so that the + group can be made atomic. */ + + for (oc = cd->open_caps; oc != NULL; oc = oc->next) + { + if (oc->number == recno) + { + oc->flag = TRUE; + break; + } + } } /* So are Unicode property matches, if supported. */ @@ -5781,10 +5853,11 @@ int branchfirstbyte, branchreqbyte; int length; int orig_bracount; int max_bracount; +int old_external_options = cd->external_options; branch_chain bc; bc.outer = bcptr; -bc.current = code; +bc.current_branch = code; firstbyte = reqbyte = REQ_UNSET; @@ -5803,13 +5876,15 @@ them global. It tests the value of length for (2 + 2*LINK_SIZE) in the pre-compile phase to find out whether anything has yet been compiled or not. */ /* If this is a capturing subpattern, add to the chain of open capturing items -so that we can detect them if (*ACCEPT) is encountered. */ +so that we can detect them if (*ACCEPT) is encountered. This is also used to +detect groups that contain recursive back references to themselves. */ if (*code == OP_CBRA) { capnumber = GET2(code, 1 + LINK_SIZE); capitem.number = capnumber; capitem.next = cd->open_caps; + capitem.flag = FALSE; cd->open_caps = &capitem; } @@ -5857,6 +5932,15 @@ for (;;) return FALSE; } + /* If the external options have changed during this branch, it means that we + are at the top level, and a leading option setting has been encountered. We + need to re-set the original option values to take account of this so that, + during the pre-compile phase, we know to allow for a re-set at the start of + subsequent branches. */ + + if (old_external_options != cd->external_options) + oldims = cd->external_options & PCRE_IMS; + /* Keep the highest bracket count in case (?| was used and some branch has fewer than the rest. */ @@ -5957,17 +6041,34 @@ for (;;) while (branch_length > 0); } - /* If it was a capturing subpattern, remove it from the chain. */ - - if (capnumber > 0) cd->open_caps = cd->open_caps->next; - /* Fill in the ket */ *code = OP_KET; PUT(code, 1, code - start_bracket); code += 1 + LINK_SIZE; - /* Resetting option if needed */ + /* If it was a capturing subpattern, check to see if it contained any + recursive back references. If so, we must wrap it in atomic brackets. + In any event, remove the block from the chain. */ + + if (capnumber > 0) + { + if (cd->open_caps->flag) + { + memmove(start_bracket + 1 + LINK_SIZE, start_bracket, + code - start_bracket); + *start_bracket = OP_ONCE; + code += 1 + LINK_SIZE; + PUT(start_bracket, 1, code - start_bracket); + *code = OP_KET; + PUT(code, 1, code - start_bracket); + code += 1 + LINK_SIZE; + length += 2 + 2*LINK_SIZE; + } + cd->open_caps = cd->open_caps->next; + } + + /* Reset options if needed. */ if ((options & PCRE_IMS) != oldims && *ptr == CHAR_RIGHT_PARENTHESIS) { @@ -6016,7 +6117,7 @@ for (;;) { *code = OP_ALT; PUT(code, 1, code - last_branch); - bc.current = last_branch = code; + bc.current_branch = last_branch = code; code += 1 + LINK_SIZE; } @@ -6432,7 +6533,7 @@ while (ptr[skipatstart] == CHAR_LEFT_PARENTHESIS && #ifdef SUPPORT_UTF8 if (utf8 && (options & PCRE_NO_UTF8_CHECK) == 0 && - (*erroroffset = _pcre_valid_utf8((uschar *)pattern, -1)) >= 0) + (*erroroffset = _pcre_valid_utf8((USPTR)pattern, -1)) >= 0) { errorcode = ERR44; goto PCRE_EARLY_ERROR_RETURN2; @@ -6629,7 +6730,7 @@ if debugging, leave the test till after things are printed out. */ *code++ = OP_END; -#ifndef DEBUG +#ifndef PCRE_DEBUG if (code - codestart > length) errorcode = ERR23; #endif @@ -6753,8 +6854,7 @@ if (reqbyte >= 0 && /* Print out the compiled data if debugging is enabled. This is never the case when building a production library. */ -#ifdef DEBUG - +#ifdef PCRE_DEBUG printf("Length = %d top_bracket = %d top_backref = %d\n", length, re->top_bracket, re->top_backref); @@ -6791,7 +6891,7 @@ if (code - codestart > length) if (errorcodeptr != NULL) *errorcodeptr = ERR23; return NULL; } -#endif /* DEBUG */ +#endif /* PCRE_DEBUG */ return (pcre *)re; } diff --git a/ext/pcre/pcrelib/pcre_exec.c b/ext/pcre/pcrelib/pcre_exec.c index ca3079b0a..4fe798e6b 100644 --- a/ext/pcre/pcrelib/pcre_exec.c +++ b/ext/pcre/pcrelib/pcre_exec.c @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -87,7 +87,7 @@ static const char rep_max[] = { 0, 0, 0, 0, 1, 1 }; -#ifdef DEBUG +#ifdef PCRE_DEBUG /************************************************* * Debugging function to print chars * *************************************************/ @@ -139,7 +139,7 @@ match_ref(int offset, register USPTR eptr, int length, match_data *md, { USPTR p = md->start_subject + md->offset_vector[offset]; -#ifdef DEBUG +#ifdef PCRE_DEBUG if (eptr >= md->end_subject) printf("matching subject <null>"); else @@ -247,16 +247,16 @@ enum { RM1=1, RM2, RM3, RM4, RM5, RM6, RM7, RM8, RM9, RM10, /* These versions of the macros use the stack, as normal. There are debugging versions and production versions. Note that the "rw" argument of RMATCH isn't -actuall used in this definition. */ +actually used in this definition. */ #ifndef NO_RECURSE #define REGISTER register -#ifdef DEBUG +#ifdef PCRE_DEBUG #define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \ { \ printf("match() called in line %d\n", __LINE__); \ - rrc = match(ra,rb,mstart,rc,rd,re,rf,rg,rdepth+1); \ + rrc = match(ra,rb,mstart,markptr,rc,rd,re,rf,rg,rdepth+1); \ printf("to line %d\n", __LINE__); \ } #define RRETURN(ra) \ @@ -266,7 +266,7 @@ actuall used in this definition. */ } #else #define RMATCH(ra,rb,rc,rd,re,rf,rg,rw) \ - rrc = match(ra,rb,mstart,rc,rd,re,rf,rg,rdepth+1) + rrc = match(ra,rb,mstart,markptr,rc,rd,re,rf,rg,rdepth+1) #define RRETURN(ra) return ra #endif @@ -286,6 +286,7 @@ argument of match(), which never changes. */ newframe->Xeptr = ra;\ newframe->Xecode = rb;\ newframe->Xmstart = mstart;\ + newframe->Xmarkptr = markptr;\ newframe->Xoffset_top = rc;\ newframe->Xims = re;\ newframe->Xeptrb = rf;\ @@ -323,6 +324,7 @@ typedef struct heapframe { USPTR Xeptr; const uschar *Xecode; USPTR Xmstart; + USPTR Xmarkptr; int Xoffset_top; long int Xims; eptrblock *Xeptrb; @@ -430,6 +432,7 @@ Arguments: ecode pointer to current position in compiled code mstart pointer to the current match start position (can be modified by encountering \K) + markptr pointer to the most recent MARK name, or NULL offset_top current top pointer md pointer to "static" info for the match ims current /i, /m, and /s options @@ -448,9 +451,9 @@ Returns: MATCH_MATCH if matched ) these values are >= 0 */ static int -match(REGISTER USPTR eptr, REGISTER const uschar *ecode, USPTR mstart, - int offset_top, match_data *md, unsigned long int ims, eptrblock *eptrb, - int flags, unsigned int rdepth) +match(REGISTER USPTR eptr, REGISTER const uschar *ecode, USPTR mstart, USPTR + markptr, int offset_top, match_data *md, unsigned long int ims, + eptrblock *eptrb, int flags, unsigned int rdepth) { /* These variables do not need to be preserved over recursion in this function, so they can be ordinary variables in all cases. Mark some of them with @@ -478,6 +481,7 @@ frame->Xprevframe = NULL; /* Marks the top level */ frame->Xeptr = eptr; frame->Xecode = ecode; frame->Xmstart = mstart; +frame->Xmarkptr = markptr; frame->Xoffset_top = offset_top; frame->Xims = ims; frame->Xeptrb = eptrb; @@ -493,6 +497,7 @@ HEAP_RECURSE: #define eptr frame->Xeptr #define ecode frame->Xecode #define mstart frame->Xmstart +#define markptr frame->Xmarkptr #define offset_top frame->Xoffset_top #define ims frame->Xims #define eptrb frame->Xeptrb @@ -620,7 +625,7 @@ TAIL_RECURSE: /* OK, now we can get on with the real code of the function. Recursive calls are specified by the macro RMATCH and RRETURN is used to return. When NO_RECURSE is *not* defined, these just turn into a recursive call to match() -and a "return", respectively (possibly with some debugging if DEBUG is +and a "return", respectively (possibly with some debugging if PCRE_DEBUG is defined). However, RMATCH isn't like a function call because it's quite a complicated macro. It has to be used in one particular way. This shouldn't, however, impact performance when true recursion is being used. */ @@ -711,7 +716,7 @@ for (;;) number = GET2(ecode, 1+LINK_SIZE); offset = number << 1; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("start bracket %d\n", number); printf("subject="); pchars(eptr, 16, TRUE, md); @@ -1037,7 +1042,7 @@ for (;;) number = GET2(ecode, 1); offset = number << 1; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("end bracket %d at *ACCEPT", number); printf("\n"); #endif @@ -1068,7 +1073,6 @@ for (;;) memmove(md->offset_vector, rec->offset_save, rec->saved_max * sizeof(int)); offset_top = rec->save_offset_top; - mstart = rec->save_start; ims = original_ims; ecode = rec->after_call; break; @@ -1112,7 +1116,11 @@ for (;;) { RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0, RM4); - if (rrc == MATCH_MATCH) break; + if (rrc == MATCH_MATCH) + { + mstart = md->start_match_ptr; /* In case \K reset it */ + break; + } if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); ecode += GET(ecode, 1); } @@ -1131,7 +1139,9 @@ for (;;) offset_top = md->end_offset_top; continue; - /* Negative assertion: all branches must fail to match */ + /* Negative assertion: all branches must fail to match. Encountering SKIP, + PRUNE, or COMMIT means we must assume failure without checking subsequent + branches. */ case OP_ASSERT_NOT: case OP_ASSERTBACK_NOT: @@ -1140,6 +1150,11 @@ for (;;) RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, NULL, 0, RM5); if (rrc == MATCH_MATCH) RRETURN(MATCH_NOMATCH); + if (rrc == MATCH_SKIP || rrc == MATCH_PRUNE || rrc == MATCH_COMMIT) + { + do ecode += GET(ecode,1); while (*ecode == OP_ALT); + break; + } if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); ecode += GET(ecode,1); } @@ -1258,9 +1273,7 @@ for (;;) memcpy(new_recursive.offset_save, md->offset_vector, new_recursive.saved_max * sizeof(int)); - new_recursive.save_start = mstart; new_recursive.save_offset_top = offset_top; - mstart = eptr; /* OK, now we can do the recursion. For each top-level alternative we restore the offset and recursion data. */ @@ -1307,7 +1320,8 @@ for (;;) a move back into the brackets. Friedl calls these "atomic" subpatterns. Check the alternative branches in turn - the matching won't pass the KET for this kind of subpattern. If any one branch matches, we carry on as at - the end of a normal bracket, leaving the subject pointer. */ + the end of a normal bracket, leaving the subject pointer, but resetting + the start-of-match value in case it was changed by \K. */ case OP_ONCE: prev = ecode; @@ -1316,7 +1330,11 @@ for (;;) do { RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, ims, eptrb, 0, RM7); - if (rrc == MATCH_MATCH) break; + if (rrc == MATCH_MATCH) + { + mstart = md->start_match_ptr; + break; + } if (rrc != MATCH_NOMATCH && rrc != MATCH_THEN) RRETURN(rrc); ecode += GET(ecode,1); } @@ -1435,9 +1453,10 @@ for (;;) } else saved_eptr = NULL; - /* If we are at the end of an assertion group, stop matching and return - MATCH_MATCH, but record the current high water mark for use by positive - assertions. Do this also for the "once" (atomic) groups. */ + /* If we are at the end of an assertion group or an atomic group, stop + matching and return MATCH_MATCH, but record the current high water mark for + use by positive assertions. We also need to record the match start in case + it was changed by \K. */ if (*prev == OP_ASSERT || *prev == OP_ASSERT_NOT || *prev == OP_ASSERTBACK || *prev == OP_ASSERTBACK_NOT || @@ -1445,6 +1464,7 @@ for (;;) { md->end_match_ptr = eptr; /* For ONCE */ md->end_offset_top = offset_top; + md->start_match_ptr = mstart; RRETURN(MATCH_MATCH); } @@ -1459,7 +1479,7 @@ for (;;) number = GET2(prev, 1+LINK_SIZE); offset = number << 1; -#ifdef DEBUG +#ifdef PCRE_DEBUG printf("end bracket %d", number); printf("\n"); #endif @@ -1481,7 +1501,6 @@ for (;;) recursion_info *rec = md->recursive; DPRINTF(("Recursion (%d) succeeded - continuing\n", number)); md->recursive = rec->prevrec; - mstart = rec->save_start; memcpy(md->offset_vector, rec->offset_save, rec->saved_max * sizeof(int)); offset_top = rec->save_offset_top; @@ -3686,8 +3705,12 @@ for (;;) case OP_NOT_WORDCHAR: for (i = 1; i <= min; i++) { - if (eptr >= md->end_subject || - (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0)) + if (eptr >= md->end_subject) + { + SCHECK_PARTIAL(); + RRETURN(MATCH_NOMATCH); + } + if (*eptr < 128 && (md->ctypes[*eptr] & ctype_word) != 0) RRETURN(MATCH_NOMATCH); while (++eptr < md->end_subject && (*eptr & 0xc0) == 0x80); } @@ -5563,7 +5586,7 @@ for(;;) bytes to avoid spending too much time in this optimization. */ if (study != NULL && (study->flags & PCRE_STUDY_MINLEN) != 0 && - end_subject - start_match < study->minlength) + (pcre_uint32)(end_subject - start_match) < study->minlength) { rc = MATCH_NOMATCH; break; @@ -5626,7 +5649,7 @@ for(;;) } } -#ifdef DEBUG /* Sigh. Some compilers never learn. */ +#ifdef PCRE_DEBUG /* Sigh. Some compilers never learn. */ printf(">>>> Match against: "); pchars(start_match, end_subject - start_match, TRUE, md); printf("\n"); @@ -5638,7 +5661,8 @@ for(;;) md->start_match_ptr = start_match; md->start_used_ptr = start_match; md->match_call_count = 0; - rc = match(start_match, md->start_code, start_match, 2, md, ims, NULL, 0, 0); + rc = match(start_match, md->start_code, start_match, NULL, 2, md, ims, NULL, + 0, 0); if (md->hitend && start_partial == NULL) start_partial = md->start_used_ptr; switch(rc) diff --git a/ext/pcre/pcrelib/pcre_globals.c b/ext/pcre/pcrelib/pcre_globals.c index aa3ef90a2..c633e5132 100644 --- a/ext/pcre/pcrelib/pcre_globals.c +++ b/ext/pcre/pcrelib/pcre_globals.c @@ -43,14 +43,35 @@ PCRE is thread-clean and doesn't use any global variables in the normal sense. However, it calls memory allocation and freeing functions via the four indirections below, and it can optionally do callouts, using the fifth indirection. These values can be changed by the caller, but are shared between -all threads. However, when compiling for Virtual Pascal, things are done -differently, and global variables are not used (see pcre.in). */ +all threads. + +For MS Visual Studio and Symbian OS, there are problems in initializing these +variables to non-local functions. In these cases, therefore, an indirection via +a local function is used. + +Also, when compiling for Virtual Pascal, things are done differently, and +global variables are not used. */ #include "config.h" #include "pcre_internal.h" -#ifndef VPCOMPAT +#if defined _MSC_VER || defined __SYMBIAN32__ +static void* LocalPcreMalloc(size_t aSize) + { + return malloc(aSize); + } +static void LocalPcreFree(void* aPtr) + { + free(aPtr); + } +PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = LocalPcreMalloc; +PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = LocalPcreFree; +PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = LocalPcreMalloc; +PCRE_EXP_DATA_DEFN void (*pcre_stack_free)(void *) = LocalPcreFree; +PCRE_EXP_DATA_DEFN int (*pcre_callout)(pcre_callout_block *) = NULL; + +#elif !defined VPCOMPAT PCRE_EXP_DATA_DEFN void *(*pcre_malloc)(size_t) = malloc; PCRE_EXP_DATA_DEFN void (*pcre_free)(void *) = free; PCRE_EXP_DATA_DEFN void *(*pcre_stack_malloc)(size_t) = malloc; diff --git a/ext/pcre/pcrelib/pcre_internal.h b/ext/pcre/pcrelib/pcre_internal.h index de0961435..0938782a7 100644 --- a/ext/pcre/pcrelib/pcre_internal.h +++ b/ext/pcre/pcrelib/pcre_internal.h @@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -45,10 +45,10 @@ functions whose names all begin with "_pcre_". */ #ifndef PCRE_INTERNAL_H #define PCRE_INTERNAL_H -/* Define DEBUG to get debugging output on stdout. */ +/* Define PCRE_DEBUG to get debugging output on stdout. */ #if 0 -#define DEBUG +#define PCRE_DEBUG #endif /* We do not support both EBCDIC and UTF-8 at the same time. The "configure" @@ -74,7 +74,7 @@ It turns out that the Mac Debugging.h header also defines the macro DPRINTF, so be absolutely sure we get our version. */ #undef DPRINTF -#ifdef DEBUG +#ifdef PCRE_DEBUG #define DPRINTF(p) printf p #else #define DPRINTF(p) /* Nothing */ @@ -86,8 +86,6 @@ setjmp and stdarg are used is when NO_RECURSE is set. */ #include <ctype.h> #include <limits.h> -#include <setjmp.h> -#include <stdarg.h> #include <stddef.h> #include <stdio.h> #include <stdlib.h> @@ -186,6 +184,27 @@ preprocessor time in standard C environments. */ #error Cannot determine a type for 32-bit unsigned integers #endif +/* When checking for integer overflow in pcre_compile(), we need to handle +large integers. If a 64-bit integer type is available, we can use that. +Otherwise we have to cast to double, which of course requires floating point +arithmetic. Handle this by defining a macro for the appropriate type. If +stdint.h is available, include it; it may define INT64_MAX. Systems that do not +have stdint.h (e.g. Solaris) may have inttypes.h. The macro int64_t may be set +by "configure". */ +#ifdef PHP_WIN32 +#include "win32/php_stdint.h" +#elif HAVE_STDINT_H +#include <stdint.h> +#elif HAVE_INTTYPES_H +#include <inttypes.h> +#endif + +#if defined INT64_MAX || defined int64_t +#define INT64_OR_DOUBLE int64_t +#else +#define INT64_OR_DOUBLE double +#endif + /* All character handling must be done as unsigned characters. Otherwise there are problems with top-bit-set characters and functions such as isspace(). However, we leave the interface to the outside world as char *, because that @@ -1373,7 +1392,13 @@ enum { /* This is used to skip a subpattern with a {0} quantifier */ - OP_SKIPZERO /* 114 */ + OP_SKIPZERO, /* 114 */ + + /* This is not an opcode, but is used to check that tables indexed by opcode + are the correct length, in order to catch updating errors - there have been + some in the past. */ + + OP_TABLE_LENGTH }; /* *** NOTE NOTE NOTE *** Whenever the list above is updated, the two macro @@ -1421,8 +1446,9 @@ in UTF-8 mode. The code that uses this table must know about such things. */ 1, 1, 1, 1, 1, /* \A, \G, \K, \B, \b */ \ 1, 1, 1, 1, 1, 1, /* \D, \d, \S, \s, \W, \w */ \ 1, 1, 1, /* Any, AllAny, Anybyte */ \ - 3, 3, 1, /* NOTPROP, PROP, EXTUNI */ \ + 3, 3, /* \P, \p */ \ 1, 1, 1, 1, 1, /* \R, \H, \h, \V, \v */ \ + 1, /* \X */ \ 1, 1, 2, 1, 1, /* \Z, \z, Opt, ^, $ */ \ 2, /* Char - the minimum length */ \ 2, /* Charnc - the minimum length */ \ @@ -1477,8 +1503,9 @@ condition. */ #define RREF_ANY 0xffff -/* Error code numbers. They are given names so that they can more easily be -tracked. */ +/* Compile time error code numbers. They are given names so that they can more +easily be tracked. When a new number is added, the table called eint in +pcreposix.c must be updated. */ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR10, ERR11, ERR12, ERR13, ERR14, ERR15, ERR16, ERR17, ERR18, ERR19, @@ -1486,7 +1513,7 @@ enum { ERR0, ERR1, ERR2, ERR3, ERR4, ERR5, ERR6, ERR7, ERR8, ERR9, ERR30, ERR31, ERR32, ERR33, ERR34, ERR35, ERR36, ERR37, ERR38, ERR39, ERR40, ERR41, ERR42, ERR43, ERR44, ERR45, ERR46, ERR47, ERR48, ERR49, ERR50, ERR51, ERR52, ERR53, ERR54, ERR55, ERR56, ERR57, ERR58, ERR59, - ERR60, ERR61, ERR62, ERR63, ERR64, ERR65 }; + ERR60, ERR61, ERR62, ERR63, ERR64, ERR65, ERRCOUNT }; /* The real format of the start of the pcre block; the index of names and the code vector run on as long as necessary after the end. We store an explicit @@ -1536,11 +1563,13 @@ typedef struct pcre_study_data { /* Structure for building a chain of open capturing subpatterns during compiling, so that instructions to close them can be compiled when (*ACCEPT) is -encountered. */ +encountered. This is also used to identify subpatterns that contain recursive +back references to themselves, so that they can be made atomic. */ typedef struct open_capitem { struct open_capitem *next; /* Chain link */ pcre_uint16 number; /* Capture number */ + pcre_uint16 flag; /* Set TRUE if recursive back ref */ } open_capitem; /* Structure for passing "static" information around between the functions @@ -1579,7 +1608,7 @@ branches, for testing for left recursion. */ typedef struct branch_chain { struct branch_chain *outer; - uschar *current; + uschar *current_branch; } branch_chain; /* Structure for items in a linked list that represents an explicit recursive @@ -1589,7 +1618,6 @@ typedef struct recursion_info { struct recursion_info *prevrec; /* Previous recursion record (or NULL) */ int group_num; /* Number of group that was called */ const uschar *after_call; /* "Return value": points after the call in the expr */ - USPTR save_start; /* Old value of mstart */ int *offset_save; /* Pointer to start of saved offsets */ int saved_max; /* Number of saved offsets */ int save_offset_top; /* Current value of offset_top */ @@ -1738,14 +1766,12 @@ one of the exported public functions. They have to be "external" in the C sense, but are not part of the PCRE public API. */ extern const uschar *_pcre_find_bracket(const uschar *, BOOL, int); -extern BOOL _pcre_is_newline(const uschar *, int, const uschar *, - int *, BOOL); +extern BOOL _pcre_is_newline(USPTR, int, USPTR, int *, BOOL); extern int _pcre_ord2utf8(int, uschar *); extern real_pcre *_pcre_try_flipped(const real_pcre *, real_pcre *, const pcre_study_data *, pcre_study_data *); -extern int _pcre_valid_utf8(const uschar *, int); -extern BOOL _pcre_was_newline(const uschar *, int, const uschar *, - int *, BOOL); +extern int _pcre_valid_utf8(USPTR, int); +extern BOOL _pcre_was_newline(USPTR, int, USPTR, int *, BOOL); extern BOOL _pcre_xclass(int, const uschar *); diff --git a/ext/pcre/pcrelib/pcre_printint.src b/ext/pcre/pcrelib/pcre_printint.src index acfc4ca68..86b02b5ca 100644 --- a/ext/pcre/pcrelib/pcre_printint.src +++ b/ext/pcre/pcrelib/pcre_printint.src @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -43,7 +43,8 @@ internal form of a compiled regular expression, along with some supporting local functions. This source file is used in two places: (1) It is #included by pcre_compile.c when it is compiled in debugging mode -(DEBUG defined in pcre_internal.h). It is not included in production compiles. +(PCRE_DEBUG defined in pcre_internal.h). It is not included in production +compiles. (2) It is always #included by pcretest.c, which can be asked to print out a compiled regex for debugging purposes. */ @@ -189,6 +190,25 @@ for(;;) switch(*code) { +/* ========================================================================== */ + /* These cases are never obeyed. This is a fudge that causes a compile- + time error if the vectors OP_names or _pcre_OP_lengths, which are indexed + by opcode, are not the correct length. It seems to be the only way to do + such a check at compile time, as the sizeof() operator does not work in + the C preprocessor. We do this while compiling pcretest, because that + #includes pcre_tables.c, which holds _pcre_OP_lengths. We can't do this + when building pcre_compile.c with PCRE_DEBUG set, because it doesn't then + know the size of _pcre_OP_lengths. */ + +#ifdef COMPILING_PCRETEST + case OP_TABLE_LENGTH: + case OP_TABLE_LENGTH + + ((sizeof(OP_names)/sizeof(const char *) == OP_TABLE_LENGTH) && + (sizeof(_pcre_OP_lengths) == OP_TABLE_LENGTH)): + break; +#endif +/* ========================================================================== */ + case OP_END: fprintf(f, " %s\n", OP_names[*code]); fprintf(f, "------------------------------------------------------------------\n"); diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c index a2e9f44fa..2653624e0 100644 --- a/ext/pcre/pcrelib/pcre_study.c +++ b/ext/pcre/pcrelib/pcre_study.c @@ -6,7 +6,7 @@ and semantics are as close as possible to those of the Perl 5 language. Written by Philip Hazel - Copyright (c) 1997-2009 University of Cambridge + Copyright (c) 1997-2010 University of Cambridge ----------------------------------------------------------------------------- Redistribution and use in source and binary forms, with or without @@ -94,13 +94,28 @@ for (;;) switch (op) { + case OP_COND: + case OP_SCOND: + + /* If there is only one branch in a condition, the implied branch has zero + length, so we don't add anything. This covers the DEFINE "condition" + automatically. */ + + cs = cc + GET(cc, 1); + if (*cs != OP_ALT) + { + cc = cs + 1 + LINK_SIZE; + break; + } + + /* Otherwise we can fall through and treat it the same as any other + subpattern. */ + case OP_CBRA: case OP_SCBRA: case OP_BRA: case OP_SBRA: case OP_ONCE: - case OP_COND: - case OP_SCOND: d = find_minlength(cc, startcode, options); if (d < 0) return d; branchlength += d; @@ -427,7 +442,8 @@ Returns: nothing */ static void -set_bit(uschar *start_bits, unsigned int c, BOOL caseless, compile_data *cd) +set_table_bit(uschar *start_bits, unsigned int c, BOOL caseless, + compile_data *cd) { start_bits[c/8] |= (1 << (c&7)); if (caseless && (cd->ctypes[c] & ctype_letter) != 0) @@ -589,7 +605,7 @@ do case OP_QUERY: case OP_MINQUERY: case OP_POSQUERY: - set_bit(start_bits, tcode[1], caseless, cd); + set_table_bit(start_bits, tcode[1], caseless, cd); tcode += 2; #ifdef SUPPORT_UTF8 if (utf8 && tcode[-1] >= 0xc0) @@ -602,7 +618,7 @@ do case OP_UPTO: case OP_MINUPTO: case OP_POSUPTO: - set_bit(start_bits, tcode[3], caseless, cd); + set_table_bit(start_bits, tcode[3], caseless, cd); tcode += 4; #ifdef SUPPORT_UTF8 if (utf8 && tcode[-1] >= 0xc0) @@ -620,7 +636,7 @@ do case OP_PLUS: case OP_MINPLUS: case OP_POSPLUS: - set_bit(start_bits, tcode[1], caseless, cd); + set_table_bit(start_bits, tcode[1], caseless, cd); try_next = FALSE; break; diff --git a/ext/pcre/pcrelib/pcre_tables.c b/ext/pcre/pcrelib/pcre_tables.c index 87e3c73b6..fbccd5685 100644 --- a/ext/pcre/pcrelib/pcre_tables.c +++ b/ext/pcre/pcrelib/pcre_tables.c @@ -118,7 +118,9 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Any0 STR_A STR_n STR_y "\0" #define STRING_Arabic0 STR_A STR_r STR_a STR_b STR_i STR_c "\0" #define STRING_Armenian0 STR_A STR_r STR_m STR_e STR_n STR_i STR_a STR_n "\0" +#define STRING_Avestan0 STR_A STR_v STR_e STR_s STR_t STR_a STR_n "\0" #define STRING_Balinese0 STR_B STR_a STR_l STR_i STR_n STR_e STR_s STR_e "\0" +#define STRING_Bamum0 STR_B STR_a STR_m STR_u STR_m "\0" #define STRING_Bengali0 STR_B STR_e STR_n STR_g STR_a STR_l STR_i "\0" #define STRING_Bopomofo0 STR_B STR_o STR_p STR_o STR_m STR_o STR_f STR_o "\0" #define STRING_Braille0 STR_B STR_r STR_a STR_i STR_l STR_l STR_e "\0" @@ -141,6 +143,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Cyrillic0 STR_C STR_y STR_r STR_i STR_l STR_l STR_i STR_c "\0" #define STRING_Deseret0 STR_D STR_e STR_s STR_e STR_r STR_e STR_t "\0" #define STRING_Devanagari0 STR_D STR_e STR_v STR_a STR_n STR_a STR_g STR_a STR_r STR_i "\0" +#define STRING_Egyptian_Hieroglyphs0 STR_E STR_g STR_y STR_p STR_t STR_i STR_a STR_n STR_UNDERSCORE STR_H STR_i STR_e STR_r STR_o STR_g STR_l STR_y STR_p STR_h STR_s "\0" #define STRING_Ethiopic0 STR_E STR_t STR_h STR_i STR_o STR_p STR_i STR_c "\0" #define STRING_Georgian0 STR_G STR_e STR_o STR_r STR_g STR_i STR_a STR_n "\0" #define STRING_Glagolitic0 STR_G STR_l STR_a STR_g STR_o STR_l STR_i STR_t STR_i STR_c "\0" @@ -153,7 +156,12 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Hanunoo0 STR_H STR_a STR_n STR_u STR_n STR_o STR_o "\0" #define STRING_Hebrew0 STR_H STR_e STR_b STR_r STR_e STR_w "\0" #define STRING_Hiragana0 STR_H STR_i STR_r STR_a STR_g STR_a STR_n STR_a "\0" +#define STRING_Imperial_Aramaic0 STR_I STR_m STR_p STR_e STR_r STR_i STR_a STR_l STR_UNDERSCORE STR_A STR_r STR_a STR_m STR_a STR_i STR_c "\0" #define STRING_Inherited0 STR_I STR_n STR_h STR_e STR_r STR_i STR_t STR_e STR_d "\0" +#define STRING_Inscriptional_Pahlavi0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_h STR_l STR_a STR_v STR_i "\0" +#define STRING_Inscriptional_Parthian0 STR_I STR_n STR_s STR_c STR_r STR_i STR_p STR_t STR_i STR_o STR_n STR_a STR_l STR_UNDERSCORE STR_P STR_a STR_r STR_t STR_h STR_i STR_a STR_n "\0" +#define STRING_Javanese0 STR_J STR_a STR_v STR_a STR_n STR_e STR_s STR_e "\0" +#define STRING_Kaithi0 STR_K STR_a STR_i STR_t STR_h STR_i "\0" #define STRING_Kannada0 STR_K STR_a STR_n STR_n STR_a STR_d STR_a "\0" #define STRING_Katakana0 STR_K STR_a STR_t STR_a STR_k STR_a STR_n STR_a "\0" #define STRING_Kayah_Li0 STR_K STR_a STR_y STR_a STR_h STR_UNDERSCORE STR_L STR_i "\0" @@ -166,6 +174,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Lepcha0 STR_L STR_e STR_p STR_c STR_h STR_a "\0" #define STRING_Limbu0 STR_L STR_i STR_m STR_b STR_u "\0" #define STRING_Linear_B0 STR_L STR_i STR_n STR_e STR_a STR_r STR_UNDERSCORE STR_B "\0" +#define STRING_Lisu0 STR_L STR_i STR_s STR_u "\0" #define STRING_Ll0 STR_L STR_l "\0" #define STRING_Lm0 STR_L STR_m "\0" #define STRING_Lo0 STR_L STR_o "\0" @@ -177,6 +186,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Malayalam0 STR_M STR_a STR_l STR_a STR_y STR_a STR_l STR_a STR_m "\0" #define STRING_Mc0 STR_M STR_c "\0" #define STRING_Me0 STR_M STR_e "\0" +#define STRING_Meetei_Mayek0 STR_M STR_e STR_e STR_t STR_e STR_i STR_UNDERSCORE STR_M STR_a STR_y STR_e STR_k "\0" #define STRING_Mn0 STR_M STR_n "\0" #define STRING_Mongolian0 STR_M STR_o STR_n STR_g STR_o STR_l STR_i STR_a STR_n "\0" #define STRING_Myanmar0 STR_M STR_y STR_a STR_n STR_m STR_a STR_r "\0" @@ -190,6 +200,8 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Ol_Chiki0 STR_O STR_l STR_UNDERSCORE STR_C STR_h STR_i STR_k STR_i "\0" #define STRING_Old_Italic0 STR_O STR_l STR_d STR_UNDERSCORE STR_I STR_t STR_a STR_l STR_i STR_c "\0" #define STRING_Old_Persian0 STR_O STR_l STR_d STR_UNDERSCORE STR_P STR_e STR_r STR_s STR_i STR_a STR_n "\0" +#define STRING_Old_South_Arabian0 STR_O STR_l STR_d STR_UNDERSCORE STR_S STR_o STR_u STR_t STR_h STR_UNDERSCORE STR_A STR_r STR_a STR_b STR_i STR_a STR_n "\0" +#define STRING_Old_Turkic0 STR_O STR_l STR_d STR_UNDERSCORE STR_T STR_u STR_r STR_k STR_i STR_c "\0" #define STRING_Oriya0 STR_O STR_r STR_i STR_y STR_a "\0" #define STRING_Osmanya0 STR_O STR_s STR_m STR_a STR_n STR_y STR_a "\0" #define STRING_P0 STR_P "\0" @@ -205,6 +217,7 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Rejang0 STR_R STR_e STR_j STR_a STR_n STR_g "\0" #define STRING_Runic0 STR_R STR_u STR_n STR_i STR_c "\0" #define STRING_S0 STR_S "\0" +#define STRING_Samaritan0 STR_S STR_a STR_m STR_a STR_r STR_i STR_t STR_a STR_n "\0" #define STRING_Saurashtra0 STR_S STR_a STR_u STR_r STR_a STR_s STR_h STR_t STR_r STR_a "\0" #define STRING_Sc0 STR_S STR_c "\0" #define STRING_Shavian0 STR_S STR_h STR_a STR_v STR_i STR_a STR_n "\0" @@ -218,6 +231,8 @@ strings to make sure that UTF-8 support works on EBCDIC platforms. */ #define STRING_Tagalog0 STR_T STR_a STR_g STR_a STR_l STR_o STR_g "\0" #define STRING_Tagbanwa0 STR_T STR_a STR_g STR_b STR_a STR_n STR_w STR_a "\0" #define STRING_Tai_Le0 STR_T STR_a STR_i STR_UNDERSCORE STR_L STR_e "\0" +#define STRING_Tai_Tham0 STR_T STR_a STR_i STR_UNDERSCORE STR_T STR_h STR_a STR_m "\0" +#define STRING_Tai_Viet0 STR_T STR_a STR_i STR_UNDERSCORE STR_V STR_i STR_e STR_t "\0" #define STRING_Tamil0 STR_T STR_a STR_m STR_i STR_l "\0" #define STRING_Telugu0 STR_T STR_e STR_l STR_u STR_g STR_u "\0" #define STRING_Thaana0 STR_T STR_h STR_a STR_a STR_n STR_a "\0" @@ -236,7 +251,9 @@ const char _pcre_utt_names[] = STRING_Any0 STRING_Arabic0 STRING_Armenian0 + STRING_Avestan0 STRING_Balinese0 + STRING_Bamum0 STRING_Bengali0 STRING_Bopomofo0 STRING_Braille0 @@ -259,6 +276,7 @@ const char _pcre_utt_names[] = STRING_Cyrillic0 STRING_Deseret0 STRING_Devanagari0 + STRING_Egyptian_Hieroglyphs0 STRING_Ethiopic0 STRING_Georgian0 STRING_Glagolitic0 @@ -271,7 +289,12 @@ const char _pcre_utt_names[] = STRING_Hanunoo0 STRING_Hebrew0 STRING_Hiragana0 + STRING_Imperial_Aramaic0 STRING_Inherited0 + STRING_Inscriptional_Pahlavi0 + STRING_Inscriptional_Parthian0 + STRING_Javanese0 + STRING_Kaithi0 STRING_Kannada0 STRING_Katakana0 STRING_Kayah_Li0 @@ -284,6 +307,7 @@ const char _pcre_utt_names[] = STRING_Lepcha0 STRING_Limbu0 STRING_Linear_B0 + STRING_Lisu0 STRING_Ll0 STRING_Lm0 STRING_Lo0 @@ -295,6 +319,7 @@ const char _pcre_utt_names[] = STRING_Malayalam0 STRING_Mc0 STRING_Me0 + STRING_Meetei_Mayek0 STRING_Mn0 STRING_Mongolian0 STRING_Myanmar0 @@ -308,6 +333,8 @@ const char _pcre_utt_names[] = STRING_Ol_Chiki0 STRING_Old_Italic0 STRING_Old_Persian0 + STRING_Old_South_Arabian0 + STRING_Old_Turkic0 STRING_Oriya0 STRING_Osmanya0 STRING_P0 @@ -323,6 +350,7 @@ const char _pcre_utt_names[] = STRING_Rejang0 STRING_Runic0 STRING_S0 + STRING_Samaritan0 STRING_Saurashtra0 STRING_Sc0 STRING_Shavian0 @@ -336,6 +364,8 @@ const char _pcre_utt_names[] = STRING_Tagalog0 STRING_Tagbanwa0 STRING_Tai_Le0 + STRING_Tai_Tham0 + STRING_Tai_Viet0 STRING_Tamil0 STRING_Telugu0 STRING_Thaana0 @@ -354,119 +384,134 @@ const ucp_type_table _pcre_utt[] = { { 0, PT_ANY, 0 }, { 4, PT_SC, ucp_Arabic }, { 11, PT_SC, ucp_Armenian }, - { 20, PT_SC, ucp_Balinese }, - { 29, PT_SC, ucp_Bengali }, - { 37, PT_SC, ucp_Bopomofo }, - { 46, PT_SC, ucp_Braille }, - { 54, PT_SC, ucp_Buginese }, - { 63, PT_SC, ucp_Buhid }, - { 69, PT_GC, ucp_C }, - { 71, PT_SC, ucp_Canadian_Aboriginal }, - { 91, PT_SC, ucp_Carian }, - { 98, PT_PC, ucp_Cc }, - { 101, PT_PC, ucp_Cf }, - { 104, PT_SC, ucp_Cham }, - { 109, PT_SC, ucp_Cherokee }, - { 118, PT_PC, ucp_Cn }, - { 121, PT_PC, ucp_Co }, - { 124, PT_SC, ucp_Common }, - { 131, PT_SC, ucp_Coptic }, - { 138, PT_PC, ucp_Cs }, - { 141, PT_SC, ucp_Cuneiform }, - { 151, PT_SC, ucp_Cypriot }, - { 159, PT_SC, ucp_Cyrillic }, - { 168, PT_SC, ucp_Deseret }, - { 176, PT_SC, ucp_Devanagari }, - { 187, PT_SC, ucp_Ethiopic }, - { 196, PT_SC, ucp_Georgian }, - { 205, PT_SC, ucp_Glagolitic }, - { 216, PT_SC, ucp_Gothic }, - { 223, PT_SC, ucp_Greek }, - { 229, PT_SC, ucp_Gujarati }, - { 238, PT_SC, ucp_Gurmukhi }, - { 247, PT_SC, ucp_Han }, - { 251, PT_SC, ucp_Hangul }, - { 258, PT_SC, ucp_Hanunoo }, - { 266, PT_SC, ucp_Hebrew }, - { 273, PT_SC, ucp_Hiragana }, - { 282, PT_SC, ucp_Inherited }, - { 292, PT_SC, ucp_Kannada }, - { 300, PT_SC, ucp_Katakana }, - { 309, PT_SC, ucp_Kayah_Li }, - { 318, PT_SC, ucp_Kharoshthi }, - { 329, PT_SC, ucp_Khmer }, - { 335, PT_GC, ucp_L }, - { 337, PT_LAMP, 0 }, - { 340, PT_SC, ucp_Lao }, - { 344, PT_SC, ucp_Latin }, - { 350, PT_SC, ucp_Lepcha }, - { 357, PT_SC, ucp_Limbu }, - { 363, PT_SC, ucp_Linear_B }, - { 372, PT_PC, ucp_Ll }, - { 375, PT_PC, ucp_Lm }, - { 378, PT_PC, ucp_Lo }, - { 381, PT_PC, ucp_Lt }, - { 384, PT_PC, ucp_Lu }, - { 387, PT_SC, ucp_Lycian }, - { 394, PT_SC, ucp_Lydian }, - { 401, PT_GC, ucp_M }, - { 403, PT_SC, ucp_Malayalam }, - { 413, PT_PC, ucp_Mc }, - { 416, PT_PC, ucp_Me }, - { 419, PT_PC, ucp_Mn }, - { 422, PT_SC, ucp_Mongolian }, - { 432, PT_SC, ucp_Myanmar }, - { 440, PT_GC, ucp_N }, - { 442, PT_PC, ucp_Nd }, - { 445, PT_SC, ucp_New_Tai_Lue }, - { 457, PT_SC, ucp_Nko }, - { 461, PT_PC, ucp_Nl }, - { 464, PT_PC, ucp_No }, - { 467, PT_SC, ucp_Ogham }, - { 473, PT_SC, ucp_Ol_Chiki }, - { 482, PT_SC, ucp_Old_Italic }, - { 493, PT_SC, ucp_Old_Persian }, - { 505, PT_SC, ucp_Oriya }, - { 511, PT_SC, ucp_Osmanya }, - { 519, PT_GC, ucp_P }, - { 521, PT_PC, ucp_Pc }, - { 524, PT_PC, ucp_Pd }, - { 527, PT_PC, ucp_Pe }, - { 530, PT_PC, ucp_Pf }, - { 533, PT_SC, ucp_Phags_Pa }, - { 542, PT_SC, ucp_Phoenician }, - { 553, PT_PC, ucp_Pi }, - { 556, PT_PC, ucp_Po }, - { 559, PT_PC, ucp_Ps }, - { 562, PT_SC, ucp_Rejang }, - { 569, PT_SC, ucp_Runic }, - { 575, PT_GC, ucp_S }, - { 577, PT_SC, ucp_Saurashtra }, - { 588, PT_PC, ucp_Sc }, - { 591, PT_SC, ucp_Shavian }, - { 599, PT_SC, ucp_Sinhala }, - { 607, PT_PC, ucp_Sk }, - { 610, PT_PC, ucp_Sm }, - { 613, PT_PC, ucp_So }, - { 616, PT_SC, ucp_Sundanese }, - { 626, PT_SC, ucp_Syloti_Nagri }, - { 639, PT_SC, ucp_Syriac }, - { 646, PT_SC, ucp_Tagalog }, - { 654, PT_SC, ucp_Tagbanwa }, - { 663, PT_SC, ucp_Tai_Le }, - { 670, PT_SC, ucp_Tamil }, - { 676, PT_SC, ucp_Telugu }, - { 683, PT_SC, ucp_Thaana }, - { 690, PT_SC, ucp_Thai }, - { 695, PT_SC, ucp_Tibetan }, - { 703, PT_SC, ucp_Tifinagh }, - { 712, PT_SC, ucp_Ugaritic }, - { 721, PT_SC, ucp_Vai }, - { 725, PT_SC, ucp_Yi }, - { 728, PT_GC, ucp_Z }, - { 730, PT_PC, ucp_Zl }, - { 733, PT_PC, ucp_Zp }, - { 736, PT_PC, ucp_Zs } + { 20, PT_SC, ucp_Avestan }, + { 28, PT_SC, ucp_Balinese }, + { 37, PT_SC, ucp_Bamum }, + { 43, PT_SC, ucp_Bengali }, + { 51, PT_SC, ucp_Bopomofo }, + { 60, PT_SC, ucp_Braille }, + { 68, PT_SC, ucp_Buginese }, + { 77, PT_SC, ucp_Buhid }, + { 83, PT_GC, ucp_C }, + { 85, PT_SC, ucp_Canadian_Aboriginal }, + { 105, PT_SC, ucp_Carian }, + { 112, PT_PC, ucp_Cc }, + { 115, PT_PC, ucp_Cf }, + { 118, PT_SC, ucp_Cham }, + { 123, PT_SC, ucp_Cherokee }, + { 132, PT_PC, ucp_Cn }, + { 135, PT_PC, ucp_Co }, + { 138, PT_SC, ucp_Common }, + { 145, PT_SC, ucp_Coptic }, + { 152, PT_PC, ucp_Cs }, + { 155, PT_SC, ucp_Cuneiform }, + { 165, PT_SC, ucp_Cypriot }, + { 173, PT_SC, ucp_Cyrillic }, + { 182, PT_SC, ucp_Deseret }, + { 190, PT_SC, ucp_Devanagari }, + { 201, PT_SC, ucp_Egyptian_Hieroglyphs }, + { 222, PT_SC, ucp_Ethiopic }, + { 231, PT_SC, ucp_Georgian }, + { 240, PT_SC, ucp_Glagolitic }, + { 251, PT_SC, ucp_Gothic }, + { 258, PT_SC, ucp_Greek }, + { 264, PT_SC, ucp_Gujarati }, + { 273, PT_SC, ucp_Gurmukhi }, + { 282, PT_SC, ucp_Han }, + { 286, PT_SC, ucp_Hangul }, + { 293, PT_SC, ucp_Hanunoo }, + { 301, PT_SC, ucp_Hebrew }, + { 308, PT_SC, ucp_Hiragana }, + { 317, PT_SC, ucp_Imperial_Aramaic }, + { 334, PT_SC, ucp_Inherited }, + { 344, PT_SC, ucp_Inscriptional_Pahlavi }, + { 366, PT_SC, ucp_Inscriptional_Parthian }, + { 389, PT_SC, ucp_Javanese }, + { 398, PT_SC, ucp_Kaithi }, + { 405, PT_SC, ucp_Kannada }, + { 413, PT_SC, ucp_Katakana }, + { 422, PT_SC, ucp_Kayah_Li }, + { 431, PT_SC, ucp_Kharoshthi }, + { 442, PT_SC, ucp_Khmer }, + { 448, PT_GC, ucp_L }, + { 450, PT_LAMP, 0 }, + { 453, PT_SC, ucp_Lao }, + { 457, PT_SC, ucp_Latin }, + { 463, PT_SC, ucp_Lepcha }, + { 470, PT_SC, ucp_Limbu }, + { 476, PT_SC, ucp_Linear_B }, + { 485, PT_SC, ucp_Lisu }, + { 490, PT_PC, ucp_Ll }, + { 493, PT_PC, ucp_Lm }, + { 496, PT_PC, ucp_Lo }, + { 499, PT_PC, ucp_Lt }, + { 502, PT_PC, ucp_Lu }, + { 505, PT_SC, ucp_Lycian }, + { 512, PT_SC, ucp_Lydian }, + { 519, PT_GC, ucp_M }, + { 521, PT_SC, ucp_Malayalam }, + { 531, PT_PC, ucp_Mc }, + { 534, PT_PC, ucp_Me }, + { 537, PT_SC, ucp_Meetei_Mayek }, + { 550, PT_PC, ucp_Mn }, + { 553, PT_SC, ucp_Mongolian }, + { 563, PT_SC, ucp_Myanmar }, + { 571, PT_GC, ucp_N }, + { 573, PT_PC, ucp_Nd }, + { 576, PT_SC, ucp_New_Tai_Lue }, + { 588, PT_SC, ucp_Nko }, + { 592, PT_PC, ucp_Nl }, + { 595, PT_PC, ucp_No }, + { 598, PT_SC, ucp_Ogham }, + { 604, PT_SC, ucp_Ol_Chiki }, + { 613, PT_SC, ucp_Old_Italic }, + { 624, PT_SC, ucp_Old_Persian }, + { 636, PT_SC, ucp_Old_South_Arabian }, + { 654, PT_SC, ucp_Old_Turkic }, + { 665, PT_SC, ucp_Oriya }, + { 671, PT_SC, ucp_Osmanya }, + { 679, PT_GC, ucp_P }, + { 681, PT_PC, ucp_Pc }, + { 684, PT_PC, ucp_Pd }, + { 687, PT_PC, ucp_Pe }, + { 690, PT_PC, ucp_Pf }, + { 693, PT_SC, ucp_Phags_Pa }, + { 702, PT_SC, ucp_Phoenician }, + { 713, PT_PC, ucp_Pi }, + { 716, PT_PC, ucp_Po }, + { 719, PT_PC, ucp_Ps }, + { 722, PT_SC, ucp_Rejang }, + { 729, PT_SC, ucp_Runic }, + { 735, PT_GC, ucp_S }, + { 737, PT_SC, ucp_Samaritan }, + { 747, PT_SC, ucp_Saurashtra }, + { 758, PT_PC, ucp_Sc }, + { 761, PT_SC, ucp_Shavian }, + { 769, PT_SC, ucp_Sinhala }, + { 777, PT_PC, ucp_Sk }, + { 780, PT_PC, ucp_Sm }, + { 783, PT_PC, ucp_So }, + { 786, PT_SC, ucp_Sundanese }, + { 796, PT_SC, ucp_Syloti_Nagri }, + { 809, PT_SC, ucp_Syriac }, + { 816, PT_SC, ucp_Tagalog }, + { 824, PT_SC, ucp_Tagbanwa }, + { 833, PT_SC, ucp_Tai_Le }, + { 840, PT_SC, ucp_Tai_Tham }, + { 849, PT_SC, ucp_Tai_Viet }, + { 858, PT_SC, ucp_Tamil }, + { 864, PT_SC, ucp_Telugu }, + { 871, PT_SC, ucp_Thaana }, + { 878, PT_SC, ucp_Thai }, + { 883, PT_SC, ucp_Tibetan }, + { 891, PT_SC, ucp_Tifinagh }, + { 900, PT_SC, ucp_Ugaritic }, + { 909, PT_SC, ucp_Vai }, + { 913, PT_SC, ucp_Yi }, + { 916, PT_GC, ucp_Z }, + { 918, PT_PC, ucp_Zl }, + { 921, PT_PC, ucp_Zp }, + { 924, PT_PC, ucp_Zs } }; const int _pcre_utt_size = sizeof(_pcre_utt)/sizeof(ucp_type_table); diff --git a/ext/pcre/pcrelib/pcre_ucd.c b/ext/pcre/pcrelib/pcre_ucd.c index 0e4a42237..b1dfc0386 100644 --- a/ext/pcre/pcrelib/pcre_ucd.c +++ b/ext/pcre/pcrelib/pcre_ucd.c @@ -4,7 +4,7 @@ /* Unicode character database. */ /* This file was autogenerated by the MultiStage2.py script. */ -/* Total size: 52808 bytes, block size: 128. */ +/* Total size: 56880 bytes, block size: 128. */ /* The tables herein are needed only when UCP support is built */ /* into PCRE. This module should not be referenced otherwise, so */ @@ -30,7 +30,7 @@ pcre_int32 property_2; } ucd_record; */ -const ucd_record _pcre_ucd_records[] = { /* 3656 bytes, record size 8 */ +const ucd_record _pcre_ucd_records[] = { /* 4144 bytes, record size 8 */ { 9, 0, 0, }, /* 0 */ { 9, 29, 0, }, /* 1 */ { 9, 21, 0, }, /* 2 */ @@ -88,956 +88,1017 @@ const ucd_record _pcre_ucd_records[] = { /* 3656 bytes, record size 8 */ { 33, 9, 10795, }, /* 54 */ { 33, 9, -163, }, /* 55 */ { 33, 9, 10792, }, /* 56 */ - { 33, 9, -195, }, /* 57 */ - { 33, 9, 69, }, /* 58 */ - { 33, 9, 71, }, /* 59 */ - { 33, 5, 10783, }, /* 60 */ - { 33, 5, 10780, }, /* 61 */ - { 33, 5, -210, }, /* 62 */ - { 33, 5, -206, }, /* 63 */ - { 33, 5, -205, }, /* 64 */ - { 33, 5, -202, }, /* 65 */ - { 33, 5, -203, }, /* 66 */ - { 33, 5, -207, }, /* 67 */ - { 33, 5, -209, }, /* 68 */ - { 33, 5, -211, }, /* 69 */ - { 33, 5, 10743, }, /* 70 */ - { 33, 5, 10749, }, /* 71 */ - { 33, 5, -213, }, /* 72 */ - { 33, 5, -214, }, /* 73 */ - { 33, 5, 10727, }, /* 74 */ - { 33, 5, -218, }, /* 75 */ - { 33, 5, -69, }, /* 76 */ - { 33, 5, -217, }, /* 77 */ - { 33, 5, -71, }, /* 78 */ - { 33, 5, -219, }, /* 79 */ - { 33, 6, 0, }, /* 80 */ - { 9, 6, 0, }, /* 81 */ - { 27, 12, 0, }, /* 82 */ - { 27, 12, 84, }, /* 83 */ - { 19, 9, 1, }, /* 84 */ - { 19, 5, -1, }, /* 85 */ - { 19, 24, 0, }, /* 86 */ - { 9, 2, 0, }, /* 87 */ - { 19, 6, 0, }, /* 88 */ - { 19, 5, 130, }, /* 89 */ - { 19, 9, 38, }, /* 90 */ - { 19, 9, 37, }, /* 91 */ - { 19, 9, 64, }, /* 92 */ - { 19, 9, 63, }, /* 93 */ - { 19, 5, 0, }, /* 94 */ - { 19, 9, 32, }, /* 95 */ - { 19, 5, -38, }, /* 96 */ - { 19, 5, -37, }, /* 97 */ - { 19, 5, -32, }, /* 98 */ - { 19, 5, -31, }, /* 99 */ - { 19, 5, -64, }, /* 100 */ - { 19, 5, -63, }, /* 101 */ - { 19, 9, 8, }, /* 102 */ - { 19, 5, -62, }, /* 103 */ - { 19, 5, -57, }, /* 104 */ - { 19, 9, 0, }, /* 105 */ - { 19, 5, -47, }, /* 106 */ - { 19, 5, -54, }, /* 107 */ - { 19, 5, -8, }, /* 108 */ - { 10, 9, 1, }, /* 109 */ - { 10, 5, -1, }, /* 110 */ - { 19, 5, -86, }, /* 111 */ - { 19, 5, -80, }, /* 112 */ - { 19, 5, 7, }, /* 113 */ - { 19, 9, -60, }, /* 114 */ - { 19, 5, -96, }, /* 115 */ - { 19, 25, 0, }, /* 116 */ - { 19, 9, -7, }, /* 117 */ - { 19, 9, -130, }, /* 118 */ - { 12, 9, 80, }, /* 119 */ - { 12, 9, 32, }, /* 120 */ - { 12, 5, -32, }, /* 121 */ - { 12, 5, -80, }, /* 122 */ - { 12, 9, 1, }, /* 123 */ - { 12, 5, -1, }, /* 124 */ - { 12, 26, 0, }, /* 125 */ - { 12, 12, 0, }, /* 126 */ - { 12, 11, 0, }, /* 127 */ - { 12, 9, 15, }, /* 128 */ - { 12, 5, -15, }, /* 129 */ - { 1, 9, 48, }, /* 130 */ - { 1, 6, 0, }, /* 131 */ - { 1, 21, 0, }, /* 132 */ - { 1, 5, -48, }, /* 133 */ - { 1, 5, 0, }, /* 134 */ - { 1, 17, 0, }, /* 135 */ - { 25, 12, 0, }, /* 136 */ - { 25, 17, 0, }, /* 137 */ - { 25, 21, 0, }, /* 138 */ - { 25, 7, 0, }, /* 139 */ - { 0, 25, 0, }, /* 140 */ - { 0, 21, 0, }, /* 141 */ - { 0, 23, 0, }, /* 142 */ - { 0, 26, 0, }, /* 143 */ - { 0, 12, 0, }, /* 144 */ - { 0, 7, 0, }, /* 145 */ - { 0, 11, 0, }, /* 146 */ - { 0, 6, 0, }, /* 147 */ - { 0, 13, 0, }, /* 148 */ - { 49, 21, 0, }, /* 149 */ - { 49, 1, 0, }, /* 150 */ - { 49, 7, 0, }, /* 151 */ - { 49, 12, 0, }, /* 152 */ - { 55, 7, 0, }, /* 153 */ - { 55, 12, 0, }, /* 154 */ - { 63, 13, 0, }, /* 155 */ - { 63, 7, 0, }, /* 156 */ - { 63, 12, 0, }, /* 157 */ - { 63, 6, 0, }, /* 158 */ - { 63, 26, 0, }, /* 159 */ - { 63, 21, 0, }, /* 160 */ - { 14, 12, 0, }, /* 161 */ - { 14, 10, 0, }, /* 162 */ - { 14, 7, 0, }, /* 163 */ - { 14, 13, 0, }, /* 164 */ - { 14, 6, 0, }, /* 165 */ - { 2, 12, 0, }, /* 166 */ - { 2, 10, 0, }, /* 167 */ - { 2, 7, 0, }, /* 168 */ - { 2, 13, 0, }, /* 169 */ - { 2, 23, 0, }, /* 170 */ - { 2, 15, 0, }, /* 171 */ - { 2, 26, 0, }, /* 172 */ - { 21, 12, 0, }, /* 173 */ - { 21, 10, 0, }, /* 174 */ - { 21, 7, 0, }, /* 175 */ - { 21, 13, 0, }, /* 176 */ - { 20, 12, 0, }, /* 177 */ - { 20, 10, 0, }, /* 178 */ - { 20, 7, 0, }, /* 179 */ - { 20, 13, 0, }, /* 180 */ - { 20, 23, 0, }, /* 181 */ - { 43, 12, 0, }, /* 182 */ - { 43, 10, 0, }, /* 183 */ - { 43, 7, 0, }, /* 184 */ - { 43, 13, 0, }, /* 185 */ - { 43, 26, 0, }, /* 186 */ - { 53, 12, 0, }, /* 187 */ - { 53, 7, 0, }, /* 188 */ - { 53, 10, 0, }, /* 189 */ - { 53, 13, 0, }, /* 190 */ - { 53, 15, 0, }, /* 191 */ - { 53, 26, 0, }, /* 192 */ - { 53, 23, 0, }, /* 193 */ - { 54, 10, 0, }, /* 194 */ - { 54, 7, 0, }, /* 195 */ - { 54, 12, 0, }, /* 196 */ - { 54, 13, 0, }, /* 197 */ - { 54, 15, 0, }, /* 198 */ - { 54, 26, 0, }, /* 199 */ - { 28, 10, 0, }, /* 200 */ - { 28, 7, 0, }, /* 201 */ - { 28, 12, 0, }, /* 202 */ - { 28, 13, 0, }, /* 203 */ - { 36, 10, 0, }, /* 204 */ - { 36, 7, 0, }, /* 205 */ - { 36, 12, 0, }, /* 206 */ - { 36, 13, 0, }, /* 207 */ - { 36, 15, 0, }, /* 208 */ - { 36, 26, 0, }, /* 209 */ - { 47, 10, 0, }, /* 210 */ - { 47, 7, 0, }, /* 211 */ - { 47, 12, 0, }, /* 212 */ - { 47, 21, 0, }, /* 213 */ - { 56, 7, 0, }, /* 214 */ - { 56, 12, 0, }, /* 215 */ - { 56, 6, 0, }, /* 216 */ - { 56, 21, 0, }, /* 217 */ - { 56, 13, 0, }, /* 218 */ - { 32, 7, 0, }, /* 219 */ - { 32, 12, 0, }, /* 220 */ - { 32, 6, 0, }, /* 221 */ - { 32, 13, 0, }, /* 222 */ - { 57, 7, 0, }, /* 223 */ - { 57, 26, 0, }, /* 224 */ - { 57, 21, 0, }, /* 225 */ - { 57, 12, 0, }, /* 226 */ - { 57, 13, 0, }, /* 227 */ - { 57, 15, 0, }, /* 228 */ - { 57, 22, 0, }, /* 229 */ - { 57, 18, 0, }, /* 230 */ - { 57, 10, 0, }, /* 231 */ - { 38, 7, 0, }, /* 232 */ - { 38, 10, 0, }, /* 233 */ - { 38, 12, 0, }, /* 234 */ - { 38, 13, 0, }, /* 235 */ - { 38, 21, 0, }, /* 236 */ - { 38, 26, 0, }, /* 237 */ - { 16, 9, 7264, }, /* 238 */ - { 16, 7, 0, }, /* 239 */ - { 16, 6, 0, }, /* 240 */ - { 23, 7, 0, }, /* 241 */ - { 15, 7, 0, }, /* 242 */ - { 15, 12, 0, }, /* 243 */ - { 15, 26, 0, }, /* 244 */ - { 15, 21, 0, }, /* 245 */ - { 15, 15, 0, }, /* 246 */ - { 8, 7, 0, }, /* 247 */ - { 7, 7, 0, }, /* 248 */ - { 7, 21, 0, }, /* 249 */ - { 40, 29, 0, }, /* 250 */ - { 40, 7, 0, }, /* 251 */ - { 40, 22, 0, }, /* 252 */ - { 40, 18, 0, }, /* 253 */ - { 45, 7, 0, }, /* 254 */ - { 45, 14, 0, }, /* 255 */ - { 50, 7, 0, }, /* 256 */ - { 50, 12, 0, }, /* 257 */ - { 24, 7, 0, }, /* 258 */ - { 24, 12, 0, }, /* 259 */ - { 6, 7, 0, }, /* 260 */ - { 6, 12, 0, }, /* 261 */ - { 51, 7, 0, }, /* 262 */ - { 51, 12, 0, }, /* 263 */ - { 31, 7, 0, }, /* 264 */ - { 31, 1, 0, }, /* 265 */ - { 31, 10, 0, }, /* 266 */ - { 31, 12, 0, }, /* 267 */ - { 31, 21, 0, }, /* 268 */ - { 31, 6, 0, }, /* 269 */ - { 31, 23, 0, }, /* 270 */ - { 31, 13, 0, }, /* 271 */ - { 31, 15, 0, }, /* 272 */ - { 37, 21, 0, }, /* 273 */ - { 37, 17, 0, }, /* 274 */ - { 37, 12, 0, }, /* 275 */ - { 37, 29, 0, }, /* 276 */ - { 37, 13, 0, }, /* 277 */ - { 37, 7, 0, }, /* 278 */ - { 37, 6, 0, }, /* 279 */ - { 34, 7, 0, }, /* 280 */ - { 34, 12, 0, }, /* 281 */ - { 34, 10, 0, }, /* 282 */ - { 34, 26, 0, }, /* 283 */ - { 34, 21, 0, }, /* 284 */ - { 34, 13, 0, }, /* 285 */ - { 52, 7, 0, }, /* 286 */ - { 39, 7, 0, }, /* 287 */ - { 39, 10, 0, }, /* 288 */ - { 39, 13, 0, }, /* 289 */ - { 39, 21, 0, }, /* 290 */ - { 31, 26, 0, }, /* 291 */ - { 5, 7, 0, }, /* 292 */ - { 5, 12, 0, }, /* 293 */ - { 5, 10, 0, }, /* 294 */ - { 5, 21, 0, }, /* 295 */ - { 61, 12, 0, }, /* 296 */ - { 61, 10, 0, }, /* 297 */ - { 61, 7, 0, }, /* 298 */ - { 61, 13, 0, }, /* 299 */ - { 61, 21, 0, }, /* 300 */ - { 61, 26, 0, }, /* 301 */ - { 75, 12, 0, }, /* 302 */ - { 75, 10, 0, }, /* 303 */ - { 75, 7, 0, }, /* 304 */ - { 75, 13, 0, }, /* 305 */ - { 69, 7, 0, }, /* 306 */ - { 69, 10, 0, }, /* 307 */ - { 69, 12, 0, }, /* 308 */ - { 69, 21, 0, }, /* 309 */ - { 69, 13, 0, }, /* 310 */ - { 72, 13, 0, }, /* 311 */ - { 72, 7, 0, }, /* 312 */ - { 72, 6, 0, }, /* 313 */ - { 72, 21, 0, }, /* 314 */ - { 12, 5, 0, }, /* 315 */ - { 12, 6, 0, }, /* 316 */ - { 33, 5, 35332, }, /* 317 */ - { 33, 5, 3814, }, /* 318 */ - { 33, 5, -59, }, /* 319 */ - { 33, 9, -7615, }, /* 320 */ - { 19, 5, 8, }, /* 321 */ - { 19, 9, -8, }, /* 322 */ - { 19, 5, 74, }, /* 323 */ - { 19, 5, 86, }, /* 324 */ - { 19, 5, 100, }, /* 325 */ - { 19, 5, 128, }, /* 326 */ - { 19, 5, 112, }, /* 327 */ - { 19, 5, 126, }, /* 328 */ - { 19, 8, -8, }, /* 329 */ - { 19, 5, 9, }, /* 330 */ - { 19, 9, -74, }, /* 331 */ - { 19, 8, -9, }, /* 332 */ - { 19, 5, -7205, }, /* 333 */ - { 19, 9, -86, }, /* 334 */ - { 19, 9, -100, }, /* 335 */ - { 19, 9, -112, }, /* 336 */ - { 19, 9, -128, }, /* 337 */ - { 19, 9, -126, }, /* 338 */ - { 27, 1, 0, }, /* 339 */ - { 9, 27, 0, }, /* 340 */ - { 9, 28, 0, }, /* 341 */ - { 27, 11, 0, }, /* 342 */ - { 9, 9, 0, }, /* 343 */ - { 9, 5, 0, }, /* 344 */ - { 19, 9, -7517, }, /* 345 */ - { 33, 9, -8383, }, /* 346 */ - { 33, 9, -8262, }, /* 347 */ - { 33, 9, 28, }, /* 348 */ - { 9, 7, 0, }, /* 349 */ - { 33, 5, -28, }, /* 350 */ - { 33, 14, 16, }, /* 351 */ - { 33, 14, -16, }, /* 352 */ - { 33, 14, 0, }, /* 353 */ - { 9, 26, 26, }, /* 354 */ - { 9, 26, -26, }, /* 355 */ - { 4, 26, 0, }, /* 356 */ - { 17, 9, 48, }, /* 357 */ - { 17, 5, -48, }, /* 358 */ - { 33, 9, -10743, }, /* 359 */ - { 33, 9, -3814, }, /* 360 */ - { 33, 9, -10727, }, /* 361 */ - { 33, 5, -10795, }, /* 362 */ - { 33, 5, -10792, }, /* 363 */ - { 33, 9, -10780, }, /* 364 */ - { 33, 9, -10749, }, /* 365 */ - { 33, 9, -10783, }, /* 366 */ - { 10, 5, 0, }, /* 367 */ - { 10, 26, 0, }, /* 368 */ - { 10, 21, 0, }, /* 369 */ - { 10, 15, 0, }, /* 370 */ - { 16, 5, -7264, }, /* 371 */ - { 58, 7, 0, }, /* 372 */ - { 58, 6, 0, }, /* 373 */ - { 22, 26, 0, }, /* 374 */ - { 22, 6, 0, }, /* 375 */ - { 22, 14, 0, }, /* 376 */ - { 26, 7, 0, }, /* 377 */ - { 26, 6, 0, }, /* 378 */ - { 29, 7, 0, }, /* 379 */ - { 29, 6, 0, }, /* 380 */ - { 3, 7, 0, }, /* 381 */ - { 23, 26, 0, }, /* 382 */ - { 29, 26, 0, }, /* 383 */ - { 22, 7, 0, }, /* 384 */ - { 60, 7, 0, }, /* 385 */ - { 60, 6, 0, }, /* 386 */ - { 60, 26, 0, }, /* 387 */ - { 76, 7, 0, }, /* 388 */ - { 76, 6, 0, }, /* 389 */ - { 76, 21, 0, }, /* 390 */ - { 76, 13, 0, }, /* 391 */ - { 12, 7, 0, }, /* 392 */ - { 12, 21, 0, }, /* 393 */ - { 33, 9, -35332, }, /* 394 */ - { 48, 7, 0, }, /* 395 */ - { 48, 12, 0, }, /* 396 */ - { 48, 10, 0, }, /* 397 */ - { 48, 26, 0, }, /* 398 */ - { 64, 7, 0, }, /* 399 */ - { 64, 21, 0, }, /* 400 */ - { 74, 10, 0, }, /* 401 */ - { 74, 7, 0, }, /* 402 */ - { 74, 12, 0, }, /* 403 */ - { 74, 21, 0, }, /* 404 */ - { 74, 13, 0, }, /* 405 */ - { 68, 13, 0, }, /* 406 */ - { 68, 7, 0, }, /* 407 */ - { 68, 12, 0, }, /* 408 */ - { 68, 21, 0, }, /* 409 */ - { 73, 7, 0, }, /* 410 */ - { 73, 12, 0, }, /* 411 */ - { 73, 10, 0, }, /* 412 */ - { 73, 21, 0, }, /* 413 */ - { 67, 7, 0, }, /* 414 */ - { 67, 12, 0, }, /* 415 */ - { 67, 10, 0, }, /* 416 */ - { 67, 13, 0, }, /* 417 */ - { 67, 21, 0, }, /* 418 */ - { 9, 4, 0, }, /* 419 */ - { 9, 3, 0, }, /* 420 */ - { 25, 25, 0, }, /* 421 */ - { 35, 7, 0, }, /* 422 */ - { 19, 14, 0, }, /* 423 */ - { 19, 15, 0, }, /* 424 */ - { 19, 26, 0, }, /* 425 */ - { 70, 7, 0, }, /* 426 */ - { 66, 7, 0, }, /* 427 */ - { 41, 7, 0, }, /* 428 */ - { 41, 15, 0, }, /* 429 */ - { 18, 7, 0, }, /* 430 */ - { 18, 14, 0, }, /* 431 */ - { 59, 7, 0, }, /* 432 */ - { 59, 21, 0, }, /* 433 */ - { 42, 7, 0, }, /* 434 */ - { 42, 21, 0, }, /* 435 */ - { 42, 14, 0, }, /* 436 */ - { 13, 9, 40, }, /* 437 */ - { 13, 5, -40, }, /* 438 */ - { 46, 7, 0, }, /* 439 */ - { 44, 7, 0, }, /* 440 */ - { 44, 13, 0, }, /* 441 */ - { 11, 7, 0, }, /* 442 */ - { 65, 7, 0, }, /* 443 */ - { 65, 15, 0, }, /* 444 */ - { 65, 21, 0, }, /* 445 */ - { 71, 7, 0, }, /* 446 */ - { 71, 21, 0, }, /* 447 */ - { 30, 7, 0, }, /* 448 */ - { 30, 12, 0, }, /* 449 */ - { 30, 15, 0, }, /* 450 */ - { 30, 21, 0, }, /* 451 */ - { 62, 7, 0, }, /* 452 */ - { 62, 14, 0, }, /* 453 */ - { 62, 21, 0, }, /* 454 */ - { 9, 10, 0, }, /* 455 */ - { 19, 12, 0, }, /* 456 */ + { 33, 5, 10815, }, /* 57 */ + { 33, 9, -195, }, /* 58 */ + { 33, 9, 69, }, /* 59 */ + { 33, 9, 71, }, /* 60 */ + { 33, 5, 10783, }, /* 61 */ + { 33, 5, 10780, }, /* 62 */ + { 33, 5, 10782, }, /* 63 */ + { 33, 5, -210, }, /* 64 */ + { 33, 5, -206, }, /* 65 */ + { 33, 5, -205, }, /* 66 */ + { 33, 5, -202, }, /* 67 */ + { 33, 5, -203, }, /* 68 */ + { 33, 5, -207, }, /* 69 */ + { 33, 5, -209, }, /* 70 */ + { 33, 5, -211, }, /* 71 */ + { 33, 5, 10743, }, /* 72 */ + { 33, 5, 10749, }, /* 73 */ + { 33, 5, -213, }, /* 74 */ + { 33, 5, -214, }, /* 75 */ + { 33, 5, 10727, }, /* 76 */ + { 33, 5, -218, }, /* 77 */ + { 33, 5, -69, }, /* 78 */ + { 33, 5, -217, }, /* 79 */ + { 33, 5, -71, }, /* 80 */ + { 33, 5, -219, }, /* 81 */ + { 33, 6, 0, }, /* 82 */ + { 9, 6, 0, }, /* 83 */ + { 27, 12, 0, }, /* 84 */ + { 27, 12, 84, }, /* 85 */ + { 19, 9, 1, }, /* 86 */ + { 19, 5, -1, }, /* 87 */ + { 19, 24, 0, }, /* 88 */ + { 9, 2, 0, }, /* 89 */ + { 19, 6, 0, }, /* 90 */ + { 19, 5, 130, }, /* 91 */ + { 19, 9, 38, }, /* 92 */ + { 19, 9, 37, }, /* 93 */ + { 19, 9, 64, }, /* 94 */ + { 19, 9, 63, }, /* 95 */ + { 19, 5, 0, }, /* 96 */ + { 19, 9, 32, }, /* 97 */ + { 19, 5, -38, }, /* 98 */ + { 19, 5, -37, }, /* 99 */ + { 19, 5, -32, }, /* 100 */ + { 19, 5, -31, }, /* 101 */ + { 19, 5, -64, }, /* 102 */ + { 19, 5, -63, }, /* 103 */ + { 19, 9, 8, }, /* 104 */ + { 19, 5, -62, }, /* 105 */ + { 19, 5, -57, }, /* 106 */ + { 19, 9, 0, }, /* 107 */ + { 19, 5, -47, }, /* 108 */ + { 19, 5, -54, }, /* 109 */ + { 19, 5, -8, }, /* 110 */ + { 10, 9, 1, }, /* 111 */ + { 10, 5, -1, }, /* 112 */ + { 19, 5, -86, }, /* 113 */ + { 19, 5, -80, }, /* 114 */ + { 19, 5, 7, }, /* 115 */ + { 19, 9, -60, }, /* 116 */ + { 19, 5, -96, }, /* 117 */ + { 19, 25, 0, }, /* 118 */ + { 19, 9, -7, }, /* 119 */ + { 19, 9, -130, }, /* 120 */ + { 12, 9, 80, }, /* 121 */ + { 12, 9, 32, }, /* 122 */ + { 12, 5, -32, }, /* 123 */ + { 12, 5, -80, }, /* 124 */ + { 12, 9, 1, }, /* 125 */ + { 12, 5, -1, }, /* 126 */ + { 12, 26, 0, }, /* 127 */ + { 12, 12, 0, }, /* 128 */ + { 12, 11, 0, }, /* 129 */ + { 12, 9, 15, }, /* 130 */ + { 12, 5, -15, }, /* 131 */ + { 1, 9, 48, }, /* 132 */ + { 1, 6, 0, }, /* 133 */ + { 1, 21, 0, }, /* 134 */ + { 1, 5, -48, }, /* 135 */ + { 1, 5, 0, }, /* 136 */ + { 1, 17, 0, }, /* 137 */ + { 25, 12, 0, }, /* 138 */ + { 25, 17, 0, }, /* 139 */ + { 25, 21, 0, }, /* 140 */ + { 25, 7, 0, }, /* 141 */ + { 0, 25, 0, }, /* 142 */ + { 0, 21, 0, }, /* 143 */ + { 0, 23, 0, }, /* 144 */ + { 0, 26, 0, }, /* 145 */ + { 0, 12, 0, }, /* 146 */ + { 0, 7, 0, }, /* 147 */ + { 0, 11, 0, }, /* 148 */ + { 0, 6, 0, }, /* 149 */ + { 0, 13, 0, }, /* 150 */ + { 49, 21, 0, }, /* 151 */ + { 49, 1, 0, }, /* 152 */ + { 49, 7, 0, }, /* 153 */ + { 49, 12, 0, }, /* 154 */ + { 55, 7, 0, }, /* 155 */ + { 55, 12, 0, }, /* 156 */ + { 63, 13, 0, }, /* 157 */ + { 63, 7, 0, }, /* 158 */ + { 63, 12, 0, }, /* 159 */ + { 63, 6, 0, }, /* 160 */ + { 63, 26, 0, }, /* 161 */ + { 63, 21, 0, }, /* 162 */ + { 89, 7, 0, }, /* 163 */ + { 89, 12, 0, }, /* 164 */ + { 89, 6, 0, }, /* 165 */ + { 89, 21, 0, }, /* 166 */ + { 14, 12, 0, }, /* 167 */ + { 14, 10, 0, }, /* 168 */ + { 14, 7, 0, }, /* 169 */ + { 14, 13, 0, }, /* 170 */ + { 14, 6, 0, }, /* 171 */ + { 2, 12, 0, }, /* 172 */ + { 2, 10, 0, }, /* 173 */ + { 2, 7, 0, }, /* 174 */ + { 2, 13, 0, }, /* 175 */ + { 2, 23, 0, }, /* 176 */ + { 2, 15, 0, }, /* 177 */ + { 2, 26, 0, }, /* 178 */ + { 21, 12, 0, }, /* 179 */ + { 21, 10, 0, }, /* 180 */ + { 21, 7, 0, }, /* 181 */ + { 21, 13, 0, }, /* 182 */ + { 20, 12, 0, }, /* 183 */ + { 20, 10, 0, }, /* 184 */ + { 20, 7, 0, }, /* 185 */ + { 20, 13, 0, }, /* 186 */ + { 20, 23, 0, }, /* 187 */ + { 43, 12, 0, }, /* 188 */ + { 43, 10, 0, }, /* 189 */ + { 43, 7, 0, }, /* 190 */ + { 43, 13, 0, }, /* 191 */ + { 43, 26, 0, }, /* 192 */ + { 53, 12, 0, }, /* 193 */ + { 53, 7, 0, }, /* 194 */ + { 53, 10, 0, }, /* 195 */ + { 53, 13, 0, }, /* 196 */ + { 53, 15, 0, }, /* 197 */ + { 53, 26, 0, }, /* 198 */ + { 53, 23, 0, }, /* 199 */ + { 54, 10, 0, }, /* 200 */ + { 54, 7, 0, }, /* 201 */ + { 54, 12, 0, }, /* 202 */ + { 54, 13, 0, }, /* 203 */ + { 54, 15, 0, }, /* 204 */ + { 54, 26, 0, }, /* 205 */ + { 28, 10, 0, }, /* 206 */ + { 28, 7, 0, }, /* 207 */ + { 28, 12, 0, }, /* 208 */ + { 28, 13, 0, }, /* 209 */ + { 36, 10, 0, }, /* 210 */ + { 36, 7, 0, }, /* 211 */ + { 36, 12, 0, }, /* 212 */ + { 36, 13, 0, }, /* 213 */ + { 36, 15, 0, }, /* 214 */ + { 36, 26, 0, }, /* 215 */ + { 47, 10, 0, }, /* 216 */ + { 47, 7, 0, }, /* 217 */ + { 47, 12, 0, }, /* 218 */ + { 47, 21, 0, }, /* 219 */ + { 56, 7, 0, }, /* 220 */ + { 56, 12, 0, }, /* 221 */ + { 56, 6, 0, }, /* 222 */ + { 56, 21, 0, }, /* 223 */ + { 56, 13, 0, }, /* 224 */ + { 32, 7, 0, }, /* 225 */ + { 32, 12, 0, }, /* 226 */ + { 32, 6, 0, }, /* 227 */ + { 32, 13, 0, }, /* 228 */ + { 57, 7, 0, }, /* 229 */ + { 57, 26, 0, }, /* 230 */ + { 57, 21, 0, }, /* 231 */ + { 57, 12, 0, }, /* 232 */ + { 57, 13, 0, }, /* 233 */ + { 57, 15, 0, }, /* 234 */ + { 57, 22, 0, }, /* 235 */ + { 57, 18, 0, }, /* 236 */ + { 57, 10, 0, }, /* 237 */ + { 38, 7, 0, }, /* 238 */ + { 38, 10, 0, }, /* 239 */ + { 38, 12, 0, }, /* 240 */ + { 38, 13, 0, }, /* 241 */ + { 38, 21, 0, }, /* 242 */ + { 38, 26, 0, }, /* 243 */ + { 16, 9, 7264, }, /* 244 */ + { 16, 7, 0, }, /* 245 */ + { 16, 6, 0, }, /* 246 */ + { 23, 7, 0, }, /* 247 */ + { 15, 7, 0, }, /* 248 */ + { 15, 12, 0, }, /* 249 */ + { 15, 26, 0, }, /* 250 */ + { 15, 21, 0, }, /* 251 */ + { 15, 15, 0, }, /* 252 */ + { 8, 7, 0, }, /* 253 */ + { 7, 17, 0, }, /* 254 */ + { 7, 7, 0, }, /* 255 */ + { 7, 21, 0, }, /* 256 */ + { 40, 29, 0, }, /* 257 */ + { 40, 7, 0, }, /* 258 */ + { 40, 22, 0, }, /* 259 */ + { 40, 18, 0, }, /* 260 */ + { 45, 7, 0, }, /* 261 */ + { 45, 14, 0, }, /* 262 */ + { 50, 7, 0, }, /* 263 */ + { 50, 12, 0, }, /* 264 */ + { 24, 7, 0, }, /* 265 */ + { 24, 12, 0, }, /* 266 */ + { 6, 7, 0, }, /* 267 */ + { 6, 12, 0, }, /* 268 */ + { 51, 7, 0, }, /* 269 */ + { 51, 12, 0, }, /* 270 */ + { 31, 7, 0, }, /* 271 */ + { 31, 1, 0, }, /* 272 */ + { 31, 10, 0, }, /* 273 */ + { 31, 12, 0, }, /* 274 */ + { 31, 21, 0, }, /* 275 */ + { 31, 6, 0, }, /* 276 */ + { 31, 23, 0, }, /* 277 */ + { 31, 13, 0, }, /* 278 */ + { 31, 15, 0, }, /* 279 */ + { 37, 21, 0, }, /* 280 */ + { 37, 17, 0, }, /* 281 */ + { 37, 12, 0, }, /* 282 */ + { 37, 29, 0, }, /* 283 */ + { 37, 13, 0, }, /* 284 */ + { 37, 7, 0, }, /* 285 */ + { 37, 6, 0, }, /* 286 */ + { 34, 7, 0, }, /* 287 */ + { 34, 12, 0, }, /* 288 */ + { 34, 10, 0, }, /* 289 */ + { 34, 26, 0, }, /* 290 */ + { 34, 21, 0, }, /* 291 */ + { 34, 13, 0, }, /* 292 */ + { 52, 7, 0, }, /* 293 */ + { 39, 7, 0, }, /* 294 */ + { 39, 10, 0, }, /* 295 */ + { 39, 13, 0, }, /* 296 */ + { 39, 21, 0, }, /* 297 */ + { 31, 26, 0, }, /* 298 */ + { 5, 7, 0, }, /* 299 */ + { 5, 12, 0, }, /* 300 */ + { 5, 10, 0, }, /* 301 */ + { 5, 21, 0, }, /* 302 */ + { 90, 7, 0, }, /* 303 */ + { 90, 10, 0, }, /* 304 */ + { 90, 12, 0, }, /* 305 */ + { 90, 13, 0, }, /* 306 */ + { 90, 21, 0, }, /* 307 */ + { 90, 6, 0, }, /* 308 */ + { 61, 12, 0, }, /* 309 */ + { 61, 10, 0, }, /* 310 */ + { 61, 7, 0, }, /* 311 */ + { 61, 13, 0, }, /* 312 */ + { 61, 21, 0, }, /* 313 */ + { 61, 26, 0, }, /* 314 */ + { 75, 12, 0, }, /* 315 */ + { 75, 10, 0, }, /* 316 */ + { 75, 7, 0, }, /* 317 */ + { 75, 13, 0, }, /* 318 */ + { 69, 7, 0, }, /* 319 */ + { 69, 10, 0, }, /* 320 */ + { 69, 12, 0, }, /* 321 */ + { 69, 21, 0, }, /* 322 */ + { 69, 13, 0, }, /* 323 */ + { 72, 13, 0, }, /* 324 */ + { 72, 7, 0, }, /* 325 */ + { 72, 6, 0, }, /* 326 */ + { 72, 21, 0, }, /* 327 */ + { 9, 10, 0, }, /* 328 */ + { 9, 7, 0, }, /* 329 */ + { 12, 5, 0, }, /* 330 */ + { 12, 6, 0, }, /* 331 */ + { 33, 5, 35332, }, /* 332 */ + { 33, 5, 3814, }, /* 333 */ + { 33, 5, -59, }, /* 334 */ + { 33, 9, -7615, }, /* 335 */ + { 19, 5, 8, }, /* 336 */ + { 19, 9, -8, }, /* 337 */ + { 19, 5, 74, }, /* 338 */ + { 19, 5, 86, }, /* 339 */ + { 19, 5, 100, }, /* 340 */ + { 19, 5, 128, }, /* 341 */ + { 19, 5, 112, }, /* 342 */ + { 19, 5, 126, }, /* 343 */ + { 19, 8, -8, }, /* 344 */ + { 19, 5, 9, }, /* 345 */ + { 19, 9, -74, }, /* 346 */ + { 19, 8, -9, }, /* 347 */ + { 19, 5, -7205, }, /* 348 */ + { 19, 9, -86, }, /* 349 */ + { 19, 9, -100, }, /* 350 */ + { 19, 9, -112, }, /* 351 */ + { 19, 9, -128, }, /* 352 */ + { 19, 9, -126, }, /* 353 */ + { 27, 1, 0, }, /* 354 */ + { 9, 27, 0, }, /* 355 */ + { 9, 28, 0, }, /* 356 */ + { 27, 11, 0, }, /* 357 */ + { 9, 9, 0, }, /* 358 */ + { 9, 5, 0, }, /* 359 */ + { 19, 9, -7517, }, /* 360 */ + { 33, 9, -8383, }, /* 361 */ + { 33, 9, -8262, }, /* 362 */ + { 33, 9, 28, }, /* 363 */ + { 33, 5, -28, }, /* 364 */ + { 33, 14, 16, }, /* 365 */ + { 33, 14, -16, }, /* 366 */ + { 33, 14, 0, }, /* 367 */ + { 9, 26, 26, }, /* 368 */ + { 9, 26, -26, }, /* 369 */ + { 4, 26, 0, }, /* 370 */ + { 17, 9, 48, }, /* 371 */ + { 17, 5, -48, }, /* 372 */ + { 33, 9, -10743, }, /* 373 */ + { 33, 9, -3814, }, /* 374 */ + { 33, 9, -10727, }, /* 375 */ + { 33, 5, -10795, }, /* 376 */ + { 33, 5, -10792, }, /* 377 */ + { 33, 9, -10780, }, /* 378 */ + { 33, 9, -10749, }, /* 379 */ + { 33, 9, -10783, }, /* 380 */ + { 33, 9, -10782, }, /* 381 */ + { 33, 9, -10815, }, /* 382 */ + { 10, 5, 0, }, /* 383 */ + { 10, 26, 0, }, /* 384 */ + { 10, 12, 0, }, /* 385 */ + { 10, 21, 0, }, /* 386 */ + { 10, 15, 0, }, /* 387 */ + { 16, 5, -7264, }, /* 388 */ + { 58, 7, 0, }, /* 389 */ + { 58, 6, 0, }, /* 390 */ + { 22, 26, 0, }, /* 391 */ + { 22, 6, 0, }, /* 392 */ + { 22, 14, 0, }, /* 393 */ + { 26, 7, 0, }, /* 394 */ + { 26, 6, 0, }, /* 395 */ + { 29, 7, 0, }, /* 396 */ + { 29, 6, 0, }, /* 397 */ + { 3, 7, 0, }, /* 398 */ + { 23, 26, 0, }, /* 399 */ + { 29, 26, 0, }, /* 400 */ + { 22, 7, 0, }, /* 401 */ + { 60, 7, 0, }, /* 402 */ + { 60, 6, 0, }, /* 403 */ + { 60, 26, 0, }, /* 404 */ + { 85, 7, 0, }, /* 405 */ + { 85, 6, 0, }, /* 406 */ + { 85, 21, 0, }, /* 407 */ + { 76, 7, 0, }, /* 408 */ + { 76, 6, 0, }, /* 409 */ + { 76, 21, 0, }, /* 410 */ + { 76, 13, 0, }, /* 411 */ + { 12, 7, 0, }, /* 412 */ + { 12, 21, 0, }, /* 413 */ + { 78, 7, 0, }, /* 414 */ + { 78, 14, 0, }, /* 415 */ + { 78, 12, 0, }, /* 416 */ + { 78, 21, 0, }, /* 417 */ + { 33, 9, -35332, }, /* 418 */ + { 48, 7, 0, }, /* 419 */ + { 48, 12, 0, }, /* 420 */ + { 48, 10, 0, }, /* 421 */ + { 48, 26, 0, }, /* 422 */ + { 64, 7, 0, }, /* 423 */ + { 64, 21, 0, }, /* 424 */ + { 74, 10, 0, }, /* 425 */ + { 74, 7, 0, }, /* 426 */ + { 74, 12, 0, }, /* 427 */ + { 74, 21, 0, }, /* 428 */ + { 74, 13, 0, }, /* 429 */ + { 14, 21, 0, }, /* 430 */ + { 68, 13, 0, }, /* 431 */ + { 68, 7, 0, }, /* 432 */ + { 68, 12, 0, }, /* 433 */ + { 68, 21, 0, }, /* 434 */ + { 73, 7, 0, }, /* 435 */ + { 73, 12, 0, }, /* 436 */ + { 73, 10, 0, }, /* 437 */ + { 73, 21, 0, }, /* 438 */ + { 83, 12, 0, }, /* 439 */ + { 83, 10, 0, }, /* 440 */ + { 83, 7, 0, }, /* 441 */ + { 83, 21, 0, }, /* 442 */ + { 83, 6, 0, }, /* 443 */ + { 83, 13, 0, }, /* 444 */ + { 67, 7, 0, }, /* 445 */ + { 67, 12, 0, }, /* 446 */ + { 67, 10, 0, }, /* 447 */ + { 67, 13, 0, }, /* 448 */ + { 67, 21, 0, }, /* 449 */ + { 38, 6, 0, }, /* 450 */ + { 91, 7, 0, }, /* 451 */ + { 91, 12, 0, }, /* 452 */ + { 91, 6, 0, }, /* 453 */ + { 91, 21, 0, }, /* 454 */ + { 86, 7, 0, }, /* 455 */ + { 86, 10, 0, }, /* 456 */ + { 86, 12, 0, }, /* 457 */ + { 86, 21, 0, }, /* 458 */ + { 86, 13, 0, }, /* 459 */ + { 9, 4, 0, }, /* 460 */ + { 9, 3, 0, }, /* 461 */ + { 25, 25, 0, }, /* 462 */ + { 35, 7, 0, }, /* 463 */ + { 19, 14, 0, }, /* 464 */ + { 19, 15, 0, }, /* 465 */ + { 19, 26, 0, }, /* 466 */ + { 70, 7, 0, }, /* 467 */ + { 66, 7, 0, }, /* 468 */ + { 41, 7, 0, }, /* 469 */ + { 41, 15, 0, }, /* 470 */ + { 18, 7, 0, }, /* 471 */ + { 18, 14, 0, }, /* 472 */ + { 59, 7, 0, }, /* 473 */ + { 59, 21, 0, }, /* 474 */ + { 42, 7, 0, }, /* 475 */ + { 42, 21, 0, }, /* 476 */ + { 42, 14, 0, }, /* 477 */ + { 13, 9, 40, }, /* 478 */ + { 13, 5, -40, }, /* 479 */ + { 46, 7, 0, }, /* 480 */ + { 44, 7, 0, }, /* 481 */ + { 44, 13, 0, }, /* 482 */ + { 11, 7, 0, }, /* 483 */ + { 80, 7, 0, }, /* 484 */ + { 80, 21, 0, }, /* 485 */ + { 80, 15, 0, }, /* 486 */ + { 65, 7, 0, }, /* 487 */ + { 65, 15, 0, }, /* 488 */ + { 65, 21, 0, }, /* 489 */ + { 71, 7, 0, }, /* 490 */ + { 71, 21, 0, }, /* 491 */ + { 30, 7, 0, }, /* 492 */ + { 30, 12, 0, }, /* 493 */ + { 30, 15, 0, }, /* 494 */ + { 30, 21, 0, }, /* 495 */ + { 87, 7, 0, }, /* 496 */ + { 87, 15, 0, }, /* 497 */ + { 87, 21, 0, }, /* 498 */ + { 77, 7, 0, }, /* 499 */ + { 77, 21, 0, }, /* 500 */ + { 82, 7, 0, }, /* 501 */ + { 82, 15, 0, }, /* 502 */ + { 81, 7, 0, }, /* 503 */ + { 81, 15, 0, }, /* 504 */ + { 88, 7, 0, }, /* 505 */ + { 0, 15, 0, }, /* 506 */ + { 84, 12, 0, }, /* 507 */ + { 84, 10, 0, }, /* 508 */ + { 84, 7, 0, }, /* 509 */ + { 84, 21, 0, }, /* 510 */ + { 84, 1, 0, }, /* 511 */ + { 62, 7, 0, }, /* 512 */ + { 62, 14, 0, }, /* 513 */ + { 62, 21, 0, }, /* 514 */ + { 79, 7, 0, }, /* 515 */ + { 19, 12, 0, }, /* 516 */ + { 26, 26, 0, }, /* 517 */ }; const uschar _pcre_ucd_stage1[] = { /* 8704 bytes */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, /* U+0000 */ - 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, /* U+0800 */ - 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 40, 40, 41, 42, 43, 44, /* U+1000 */ - 45, 46, 47, 48, 49, 16, 50, 51, 52, 16, 53, 54, 55, 56, 57, 58, /* U+1800 */ - 59, 60, 61, 62, 63, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, /* U+2000 */ - 74, 74, 63, 75, 63, 63, 76, 16, 77, 78, 79, 80, 81, 82, 83, 84, /* U+2800 */ - 85, 86, 87, 88, 89, 90, 91, 68, 92, 92, 92, 92, 92, 92, 92, 92, /* U+3000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+3800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+4000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 93, 92, 92, 92, 92, /* U+4800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+5000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+5800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+6000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+6800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+7000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+7800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+8000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+8800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+9000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 94, /* U+9800 */ - 95, 96, 96, 96, 96, 96, 96, 96, 96, 97, 98, 98, 99,100,101,102, /* U+A000 */ -103,104,105, 16,106, 16, 16, 16,107,107,107,107,107,107,107,107, /* U+A800 */ -107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+B000 */ -107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+B800 */ -107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+C000 */ -107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,107, /* U+C800 */ -107,107,107,107,107,107,107,107,107,107,107,107,107,107,107,108, /* U+D000 */ -109,109,109,109,109,109,109,109,109,109,109,109,109,109,109,109, /* U+D800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+E000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+E800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F000 */ -110,110, 92, 92,111,112,113,114,115,115,116,117,118,119,120,121, /* U+F800 */ -122,123,124,125, 16,126,127,128,129,130, 16, 16, 16, 16, 16, 16, /* U+10000 */ -131, 16,132, 16,133, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+10800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+11000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+11800 */ -134,134,134,134,134,134,135, 16,136, 16, 16, 16, 16, 16, 16, 16, /* U+12000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+12800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+13000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+13800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+14000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+14800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+15000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+15800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+16000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+16800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+17000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+17800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+18000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+18800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+19000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+19800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1C800 */ - 68,137,138,139,140, 16,141, 16,142,143,144,145,146,147,148,149, /* U+1D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1E800 */ -150,151, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+1F800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+20000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+20800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+21000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+21800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+22000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+22800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+23000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+23800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+24000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+24800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+25000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+25800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+26000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+26800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+27000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+27800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+28000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+28800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+29000 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, /* U+29800 */ - 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92, 92,152, 16, 16, /* U+2A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2F000 */ - 92, 92, 92, 92,153, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+2F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+30000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+30800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+31000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+31800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+32000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+32800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+33000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+33800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+34000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+34800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+35000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+35800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+36000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+36800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+37000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+37800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+38000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+38800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+39000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+39800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+3F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+40000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+40800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+41000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+41800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+42000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+42800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+43000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+43800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+44000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+44800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+45000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+45800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+46000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+46800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+47000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+47800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+48000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+48800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+49000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+49800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+4F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+50000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+50800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+51000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+51800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+52000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+52800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+53000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+53800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+54000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+54800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+55000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+55800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+56000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+56800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+57000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+57800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+58000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+58800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+59000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+59800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+5F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+60000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+60800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+61000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+61800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+62000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+62800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+63000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+63800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+64000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+64800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+65000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+65800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+66000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+66800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+67000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+67800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+68000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+68800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+69000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+69800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+6F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+70000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+70800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+71000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+71800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+72000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+72800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+73000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+73800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+74000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+74800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+75000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+75800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+76000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+76800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+77000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+77800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+78000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+78800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+79000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+79800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+7F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+80000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+80800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+81000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+81800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+82000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+82800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+83000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+83800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+84000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+84800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+85000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+85800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+86000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+86800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+87000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+87800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+88000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+88800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+89000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+89800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+8F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+90000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+90800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+91000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+91800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+92000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+92800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+93000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+93800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+94000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+94800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+95000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+95800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+96000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+96800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+97000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+97800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+98000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+98800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+99000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+99800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9A000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9A800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9B000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9B800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9C000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9C800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9D000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9D800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9E000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9E800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9F000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+9F800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A0000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A0800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A1000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A1800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A2000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A2800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A3000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A3800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A4000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A4800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A5000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A5800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A6000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A6800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A7000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A7800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A8000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A8800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A9000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+A9800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AA000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AA800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AB000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AB800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AC000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AC800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AD000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AD800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AE000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AE800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AF000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+AF800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B0000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B0800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B1000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B1800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B2000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B2800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B3000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B3800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B4000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B4800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B5000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B5800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B6000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B6800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B7000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B7800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B8000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B8800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B9000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+B9800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BA000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BA800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BB000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BB800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BC000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BC800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BD000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BD800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BE000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BE800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BF000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+BF800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C0000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C0800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C1000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C1800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C2000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C2800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C3000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C3800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C4000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C4800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C5000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C5800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C6000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C6800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C7000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C7800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C8000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C8800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C9000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+C9800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CA000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CA800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CB000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CB800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CC000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CC800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CD000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CD800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CE000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CE800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CF000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+CF800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D0000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D0800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D1000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D1800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D2000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D2800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D3000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D3800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D4000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D4800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D5000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D5800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D6000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D6800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D7000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D7800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D8000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D8800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D9000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+D9800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DA000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DA800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DB000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DB800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DC000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DC800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DD000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DD800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DE000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DE800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DF000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+DF800 */ -154, 16,155,156, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E0000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E0800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E1000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E1800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E2000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E2800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E3000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E3800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E4000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E4800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E5000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E5800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E6000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E6800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E7000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E7800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E8000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E8800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E9000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+E9800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EA000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EA800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EB000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EB800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EC000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EC800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+ED000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+ED800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EE000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EE800 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EF000 */ - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, /* U+EF800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F0000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F0800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F1000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F1800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F2000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F2800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F3000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F3800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F4000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F4800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F5000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F5800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F6000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F6800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F7000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F7800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F8000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F8800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F9000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+F9800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FA000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FA800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FB000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FB800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FC000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FC800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FD000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FD800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FE000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FE800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+FF000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,157, /* U+FF800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+100000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+100800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+101000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+101800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+102000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+102800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+103000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+103800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+104000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+104800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+105000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+105800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+106000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+106800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+107000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+107800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+108000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+108800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+109000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+109800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10A000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10A800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10B000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10B800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10C000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10C800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10D000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10D800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10E000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10E800 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,110, /* U+10F000 */ -110,110,110,110,110,110,110,110,110,110,110,110,110,110,110,157, /* U+10F800 */ + 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* U+0800 */ + 32, 33, 34, 34, 35, 36, 37, 38, 39, 40, 40, 40, 41, 42, 43, 44, /* U+1000 */ + 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, /* U+1800 */ + 61, 62, 63, 64, 65, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, /* U+2000 */ + 76, 76, 65, 77, 65, 65, 78, 17, 79, 80, 81, 82, 83, 84, 85, 86, /* U+2800 */ + 87, 88, 89, 90, 91, 92, 93, 70, 94, 94, 94, 94, 94, 94, 94, 94, /* U+3000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+3800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+4000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 95, 94, 94, 94, 94, /* U+4800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+5000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+5800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+6000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+6800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+7000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+7800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+8000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+8800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+9000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 96, /* U+9800 */ + 97, 98, 98, 98, 98, 98, 98, 98, 98, 99,100,100,101,102,103,104, /* U+A000 */ +105,106,107,108,109,110, 17,111, 34, 34, 34, 34, 34, 34, 34, 34, /* U+A800 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+B000 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+B800 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+C000 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, /* U+C800 */ + 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34,112, /* U+D000 */ +113,113,113,113,113,113,113,113,113,113,113,113,113,113,113,113, /* U+D800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+E000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+E800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F000 */ +114,114, 94, 94,115,116,117,118,119,119,120,121,122,123,124,125, /* U+F800 */ +126,127,128,129, 17,130,131,132,133,134, 17, 17, 17, 17, 17, 17, /* U+10000 */ +135, 17,136, 17,137, 17,138, 17,139, 17, 17, 17,140, 17, 17, 17, /* U+10800 */ + 17,141, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+11000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+11800 */ +142,142,142,142,142,142,143, 17,144, 17, 17, 17, 17, 17, 17, 17, /* U+12000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+12800 */ +145,145,145,145,145,145,145,145,146, 17, 17, 17, 17, 17, 17, 17, /* U+13000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+13800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+14000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+14800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+15000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+15800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+16000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+16800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+17000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+17800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+18000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+18800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+19000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+19800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1C800 */ + 70,147,148,149,150, 17,151, 17,152,153,154,155,156,157,158,159, /* U+1D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1E800 */ +160,161,162,163,164, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+1F800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+20000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+20800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+21000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+21800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+22000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+22800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+23000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+23800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+24000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+24800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+25000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+25800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+26000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+26800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+27000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+27800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+28000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+28800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+29000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+29800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,165, 94, 94, /* U+2A000 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, /* U+2A800 */ + 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94, 94,166, 17, /* U+2B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2F000 */ + 94, 94, 94, 94,167, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+2F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+30000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+30800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+31000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+31800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+32000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+32800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+33000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+33800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+34000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+34800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+35000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+35800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+36000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+36800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+37000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+37800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+38000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+38800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+39000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+39800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+3F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+40000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+40800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+41000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+41800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+42000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+42800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+43000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+43800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+44000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+44800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+45000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+45800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+46000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+46800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+47000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+47800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+48000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+48800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+49000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+49800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+4F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+50000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+50800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+51000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+51800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+52000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+52800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+53000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+53800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+54000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+54800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+55000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+55800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+56000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+56800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+57000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+57800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+58000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+58800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+59000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+59800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+5F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+60000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+60800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+61000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+61800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+62000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+62800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+63000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+63800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+64000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+64800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+65000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+65800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+66000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+66800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+67000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+67800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+68000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+68800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+69000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+69800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+6F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+70000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+70800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+71000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+71800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+72000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+72800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+73000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+73800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+74000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+74800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+75000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+75800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+76000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+76800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+77000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+77800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+78000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+78800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+79000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+79800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+7F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+80000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+80800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+81000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+81800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+82000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+82800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+83000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+83800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+84000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+84800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+85000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+85800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+86000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+86800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+87000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+87800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+88000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+88800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+89000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+89800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+8F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+90000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+90800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+91000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+91800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+92000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+92800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+93000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+93800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+94000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+94800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+95000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+95800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+96000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+96800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+97000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+97800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+98000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+98800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+99000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+99800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9A000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9A800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9B000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9B800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9C000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9C800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9D000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9D800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9E000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9E800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9F000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+9F800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+A9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+AF800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+B9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+BF800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+C9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+CF800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+D9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DD000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DD800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+DF800 */ +168, 17,169,170, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E0000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E0800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E1000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E1800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E2000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E2800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E3000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E3800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E4000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E4800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E5000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E5800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E6000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E6800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E7000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E7800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E8000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E8800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E9000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+E9800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EA000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EA800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EB000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EB800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EC000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EC800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+ED000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+ED800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EE000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EE800 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EF000 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, /* U+EF800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F0000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F0800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F1000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F1800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F2000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F2800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F3000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F3800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F4000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F4800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F5000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F5800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F6000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F6800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F7000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F7800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F8000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F8800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F9000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+F9800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FA000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FA800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FB000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FB800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FC000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FC800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FD000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FD800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FE000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FE800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+FF000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,171, /* U+FF800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+100000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+100800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+101000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+101800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+102000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+102800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+103000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+103800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+104000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+104800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+105000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+105800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+106000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+106800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+107000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+107800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+108000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+108800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+109000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+109800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10A000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10A800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10B000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10B800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10C000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10C800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10D000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10D800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10E000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10E800 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,114, /* U+10F000 */ +114,114,114,114,114,114,114,114,114,114,114,114,114,114,114,171, /* U+10F800 */ }; -const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ +const pcre_uint16 _pcre_ucd_stage2[] = { /* 44032 bytes, block = 128 */ /* block 0 */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -1082,513 +1143,533 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 53, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 21, 22, 14, 14, 14, 14, 14, 14, 54, 21, 22, 55, 56, 14, - 14, 21, 22, 57, 58, 59, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 60, 61, 14, 62, 63, 14, 64, 64, 14, 65, 14, 66, 14, 14, 14, 14, - 64, 14, 14, 67, 14, 14, 14, 14, 68, 69, 14, 70, 14, 14, 14, 69, - 14, 71, 72, 14, 14, 73, 14, 14, 14, 14, 14, 14, 14, 74, 14, 14, + 21, 22, 21, 22, 14, 14, 14, 14, 14, 14, 54, 21, 22, 55, 56, 57, + 57, 21, 22, 58, 59, 60, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 61, 62, 63, 64, 65, 14, 66, 66, 14, 67, 14, 68, 14, 14, 14, 14, + 66, 14, 14, 69, 14, 14, 14, 14, 70, 71, 14, 72, 14, 14, 14, 71, + 14, 73, 74, 14, 14, 75, 14, 14, 14, 14, 14, 14, 14, 76, 14, 14, /* block 5 */ - 75, 14, 14, 75, 14, 14, 14, 14, 75, 76, 77, 77, 78, 14, 14, 14, - 14, 14, 79, 14, 45, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 77, 14, 14, 77, 14, 14, 14, 14, 77, 78, 79, 79, 80, 14, 14, 14, + 14, 14, 81, 14, 45, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 10, 10, 10, 10, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, - 81, 81, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 80, 80, 80, 80, 80, 10, 10, 10, 10, 10, 10, 10, 81, 10, 81, 10, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 10, 10, 10, 10, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, + 82, 82, 82, 82, 82, 10, 10, 10, 10, 10, 10, 10, 83, 10, 83, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, /* block 6 */ - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 83, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 84, 85, 84, 85, 81, 86, 84, 85, 87, 87, 88, 89, 89, 89, 2, 87, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 85, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 86, 87, 86, 87, 83, 88, 86, 87, 89, 89, 90, 91, 91, 91, 2, 89, /* block 7 */ - 87, 87, 87, 87, 86, 10, 90, 2, 91, 91, 91, 87, 92, 87, 93, 93, - 94, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, - 95, 95, 87, 95, 95, 95, 95, 95, 95, 95, 95, 95, 96, 97, 97, 97, - 94, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, 98, - 98, 98, 99, 98, 98, 98, 98, 98, 98, 98, 98, 98,100,101,101,102, -103,104,105,105,105,106,107,108, 84, 85, 84, 85, 84, 85, 84, 85, - 84, 85,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -111,112,113, 94,114,115,116, 84, 85,117, 84, 85, 94,118,118,118, + 89, 89, 89, 89, 88, 10, 92, 2, 93, 93, 93, 89, 94, 89, 95, 95, + 96, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, + 97, 97, 89, 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, 99, 99, 99, + 96,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100, +100,100,101,100,100,100,100,100,100,100,100,100,102,103,103,104, +105,106,107,107,107,108,109,110, 86, 87, 86, 87, 86, 87, 86, 87, + 86, 87,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +113,114,115, 96,116,117,118, 86, 87,119, 86, 87, 96,120,120,120, /* block 8 */ -119,119,119,119,119,119,119,119,119,119,119,119,119,119,119,119, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -120,120,120,120,120,120,120,120,120,120,120,120,120,120,120,120, -121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121, 121,121,121,121,121,121,121,121,121,121,121,121,121,121,121,121, 122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +122,122,122,122,122,122,122,122,122,122,122,122,122,122,122,122, +123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, +123,123,123,123,123,123,123,123,123,123,123,123,123,123,123,123, +124,124,124,124,124,124,124,124,124,124,124,124,124,124,124,124, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, /* block 9 */ -123,124,125,126,126,126,126,126,127,127,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -128,123,124,123,124,123,124,123,124,123,124,123,124,123,124,129, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, +125,126,127,128,128, 84, 84,128,129,129,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +130,125,126,125,126,125,126,125,126,125,126,125,126,125,126,131, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, /* block 10 */ -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130, -130,130,130,130,130,130,130,130,130,130,130,130,130,130,130,130, -130,130,130,130,130,130,130, 87, 87,131,132,132,132,132,132,132, - 87,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133, -133,133,133,133,133,133,133,133,133,133,133,133,133,133,133,133, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132, +132,132,132,132,132,132,132,132,132,132,132,132,132,132,132,132, +132,132,132,132,132,132,132, 89, 89,133,134,134,134,134,134,134, + 89,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135, +135,135,135,135,135,135,135,135,135,135,135,135,135,135,135,135, /* block 11 */ -133,133,133,133,133,133,133,134, 87, 2,135, 87, 87, 87, 87, 87, - 87,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136, -136,136,136,136,136,136,136,136,136,136,136,136,136,136,136,136, -136,136,136,136,136,136,136,136,136,136,136,136,136,136,137,136, -138,136,136,138,136,136,138,136, 87, 87, 87, 87, 87, 87, 87, 87, -139,139,139,139,139,139,139,139,139,139,139,139,139,139,139,139, -139,139,139,139,139,139,139,139,139,139,139, 87, 87, 87, 87, 87, -139,139,139,138,138, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +135,135,135,135,135,135,135,136, 89, 2,137, 89, 89, 89, 89, 89, + 89,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138, +138,138,138,138,138,138,138,138,138,138,138,138,138,138,138,138, +138,138,138,138,138,138,138,138,138,138,138,138,138,138,139,138, +140,138,138,140,138,138,140,138, 89, 89, 89, 89, 89, 89, 89, 89, +141,141,141,141,141,141,141,141,141,141,141,141,141,141,141,141, +141,141,141,141,141,141,141,141,141,141,141, 89, 89, 89, 89, 89, +141,141,141,140,140, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 12 */ - 16, 16, 16, 16, 87, 87,140,140,140,141,141,142, 2,141,143,143, -144,144,144,144,144,144,144,144,144,144,144, 2, 87, 87,141, 2, - 87,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, - 81,145,145,145,145,145,145,145,145,145,145, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82,144,144,144,144,144,144,144,144,144, 87, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,141,141,141,141,145,145, - 82,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, + 16, 16, 16, 16, 89, 89,142,142,142,143,143,144, 2,143,145,145, +146,146,146,146,146,146,146,146,146,146,146, 2, 89, 89,143, 2, + 89,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, + 83,147,147,147,147,147,147,147,147,147,147, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84,146,146,146,146,146,146,146,146,146, 89, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,143,143,143,143,147,147, + 84,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* block 13 */ -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,141,145,144,144,144,144,144,144,144, 16,146,144, -144,144,144,144,144,147,147,144,144,143,144,144,144,144,145,145, -148,148,148,148,148,148,148,148,148,148,145,145,145,143,143,145, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,143,147,146,146,146,146,146,146,146, 16,148,146, +146,146,146,146,146,149,149,146,146,145,146,146,146,146,147,147, +150,150,150,150,150,150,150,150,150,150,147,147,147,145,145,147, /* block 14 */ -149,149,149,149,149,149,149,149,149,149,149,149,149,149, 87,150, -151,152,151,151,151,151,151,151,151,151,151,151,151,151,151,151, -151,151,151,151,151,151,151,151,151,151,151,151,151,151,151,151, -152,152,152,152,152,152,152,152,152,152,152,152,152,152,152,152, -152,152,152,152,152,152,152,152,152,152,152, 87, 87,151,151,151, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +151,151,151,151,151,151,151,151,151,151,151,151,151,151, 89,152, +153,154,153,153,153,153,153,153,153,153,153,153,153,153,153,153, +153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153, +154,154,154,154,154,154,154,154,154,154,154,154,154,154,154,154, +154,154,154,154,154,154,154,154,154,154,154, 89, 89,153,153,153, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* block 15 */ -153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153, -153,153,153,153,153,153,153,153,153,153,153,153,153,153,153,153, -153,153,153,153,153,153,154,154,154,154,154,154,154,154,154,154, -154,153, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -155,155,155,155,155,155,155,155,155,155,156,156,156,156,156,156, -156,156,156,156,156,156,156,156,156,156,156,156,156,156,156,156, -156,156,156,156,156,156,156,156,156,156,156,157,157,157,157,157, -157,157,157,157,158,158,159,160,160,160,158, 87, 87, 87, 87, 87, +155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155, +155,155,155,155,155,155,155,155,155,155,155,155,155,155,155,155, +155,155,155,155,155,155,156,156,156,156,156,156,156,156,156,156, +156,155, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +157,157,157,157,157,157,157,157,157,157,158,158,158,158,158,158, +158,158,158,158,158,158,158,158,158,158,158,158,158,158,158,158, +158,158,158,158,158,158,158,158,158,158,158,159,159,159,159,159, +159,159,159,159,160,160,161,162,162,162,160, 89, 89, 89, 89, 89, /* block 16 */ - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, +163,163,163,163,163,163,164,164,164,164,165,164,164,164,164,164, +164,164,164,164,165,164,164,164,165,164,164,164,164,164, 89, 89, +166,166,166,166,166,166,166,166,166,166,166,166,166,166,166, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 17 */ - 87,161,161,162,163,163,163,163,163,163,163,163,163,163,163,163, -163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, -163,163,163,163,163,163,163,163,163,163,163,163,163,163,163,163, -163,163,163,163,163,163,163,163,163,163, 87, 87,161,163,162,162, -162,161,161,161,161,161,161,161,161,162,162,162,162,161, 87, 87, -163, 82, 82,161,161, 87, 87, 87,163,163,163,163,163,163,163,163, -163,163,161,161, 2, 2,164,164,164,164,164,164,164,164,164,164, - 2,165,163, 87, 87, 87, 87, 87, 87, 87, 87,163,163,163,163,163, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 18 */ - 87,166,167,167, 87,168,168,168,168,168,168,168,168, 87, 87,168, -168, 87, 87,168,168,168,168,168,168,168,168,168,168,168,168,168, -168,168,168,168,168,168,168,168,168, 87,168,168,168,168,168,168, -168, 87,168, 87, 87, 87,168,168,168,168, 87, 87,166,168,167,167, -167,166,166,166,166, 87, 87,167,167, 87, 87,167,167,166,168, 87, - 87, 87, 87, 87, 87, 87, 87,167, 87, 87, 87, 87,168,168, 87,168, -168,168,166,166, 87, 87,169,169,169,169,169,169,169,169,169,169, -168,168,170,170,171,171,171,171,171,171,172, 87, 87, 87, 87, 87, +167,167,167,168,169,169,169,169,169,169,169,169,169,169,169,169, +169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169, +169,169,169,169,169,169,169,169,169,169,169,169,169,169,169,169, +169,169,169,169,169,169,169,169,169,169, 89, 89,167,169,168,168, +168,167,167,167,167,167,167,167,167,168,168,168,168,167,168, 89, +169, 84, 84,167,167,167, 89, 89,169,169,169,169,169,169,169,169, +169,169,167,167, 2, 2,170,170,170,170,170,170,170,170,170,170, + 2,171,169, 89, 89, 89, 89, 89, 89,169,169,169,169,169,169,169, /* block 19 */ - 87,173,173,174, 87,175,175,175,175,175,175, 87, 87, 87, 87,175, -175, 87, 87,175,175,175,175,175,175,175,175,175,175,175,175,175, -175,175,175,175,175,175,175,175,175, 87,175,175,175,175,175,175, -175, 87,175,175, 87,175,175, 87,175,175, 87, 87,173, 87,174,174, -174,173,173, 87, 87, 87, 87,173,173, 87, 87,173,173,173, 87, 87, - 87,173, 87, 87, 87, 87, 87, 87, 87,175,175,175,175, 87,175, 87, - 87, 87, 87, 87, 87, 87,176,176,176,176,176,176,176,176,176,176, -173,173,175,175,175,173, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89,172,173,173, 89,174,174,174,174,174,174,174,174, 89, 89,174, +174, 89, 89,174,174,174,174,174,174,174,174,174,174,174,174,174, +174,174,174,174,174,174,174,174,174, 89,174,174,174,174,174,174, +174, 89,174, 89, 89, 89,174,174,174,174, 89, 89,172,174,173,173, +173,172,172,172,172, 89, 89,173,173, 89, 89,173,173,172,174, 89, + 89, 89, 89, 89, 89, 89, 89,173, 89, 89, 89, 89,174,174, 89,174, +174,174,172,172, 89, 89,175,175,175,175,175,175,175,175,175,175, +174,174,176,176,177,177,177,177,177,177,178,176, 89, 89, 89, 89, /* block 20 */ - 87,177,177,178, 87,179,179,179,179,179,179,179,179,179, 87,179, -179,179, 87,179,179,179,179,179,179,179,179,179,179,179,179,179, -179,179,179,179,179,179,179,179,179, 87,179,179,179,179,179,179, -179, 87,179,179, 87,179,179,179,179,179, 87, 87,177,179,178,178, -178,177,177,177,177,177, 87,177,177,178, 87,178,178,177, 87, 87, -179, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -179,179,177,177, 87, 87,180,180,180,180,180,180,180,180,180,180, - 87,181, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89,179,179,180, 89,181,181,181,181,181,181, 89, 89, 89, 89,181, +181, 89, 89,181,181,181,181,181,181,181,181,181,181,181,181,181, +181,181,181,181,181,181,181,181,181, 89,181,181,181,181,181,181, +181, 89,181,181, 89,181,181, 89,181,181, 89, 89,179, 89,180,180, +180,179,179, 89, 89, 89, 89,179,179, 89, 89,179,179,179, 89, 89, + 89,179, 89, 89, 89, 89, 89, 89, 89,181,181,181,181, 89,181, 89, + 89, 89, 89, 89, 89, 89,182,182,182,182,182,182,182,182,182,182, +179,179,181,181,181,179, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 21 */ - 87,182,183,183, 87,184,184,184,184,184,184,184,184, 87, 87,184, -184, 87, 87,184,184,184,184,184,184,184,184,184,184,184,184,184, -184,184,184,184,184,184,184,184,184, 87,184,184,184,184,184,184, -184, 87,184,184, 87,184,184,184,184,184, 87, 87,182,184,183,182, -183,182,182,182,182, 87, 87,183,183, 87, 87,183,183,182, 87, 87, - 87, 87, 87, 87, 87, 87,182,183, 87, 87, 87, 87,184,184, 87,184, -184,184,182,182, 87, 87,185,185,185,185,185,185,185,185,185,185, -186,184, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89,183,183,184, 89,185,185,185,185,185,185,185,185,185, 89,185, +185,185, 89,185,185,185,185,185,185,185,185,185,185,185,185,185, +185,185,185,185,185,185,185,185,185, 89,185,185,185,185,185,185, +185, 89,185,185, 89,185,185,185,185,185, 89, 89,183,185,184,184, +184,183,183,183,183,183, 89,183,183,184, 89,184,184,183, 89, 89, +185, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +185,185,183,183, 89, 89,186,186,186,186,186,186,186,186,186,186, + 89,187, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 22 */ - 87, 87,187,188, 87,188,188,188,188,188,188, 87, 87, 87,188,188, -188, 87,188,188,188,188, 87, 87, 87,188,188, 87,188, 87,188,188, - 87, 87, 87,188,188, 87, 87, 87,188,188,188, 87, 87, 87,188,188, -188,188,188,188,188,188,188,188,188,188, 87, 87, 87, 87,189,189, -187,189,189, 87, 87, 87,189,189,189, 87,189,189,189,187, 87, 87, -188, 87, 87, 87, 87, 87, 87,189, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87,190,190,190,190,190,190,190,190,190,190, -191,191,191,192,192,192,192,192,192,193,192, 87, 87, 87, 87, 87, + 89,188,189,189, 89,190,190,190,190,190,190,190,190, 89, 89,190, +190, 89, 89,190,190,190,190,190,190,190,190,190,190,190,190,190, +190,190,190,190,190,190,190,190,190, 89,190,190,190,190,190,190, +190, 89,190,190, 89,190,190,190,190,190, 89, 89,188,190,189,188, +189,188,188,188,188, 89, 89,189,189, 89, 89,189,189,188, 89, 89, + 89, 89, 89, 89, 89, 89,188,189, 89, 89, 89, 89,190,190, 89,190, +190,190,188,188, 89, 89,191,191,191,191,191,191,191,191,191,191, +192,190, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 23 */ - 87,194,194,194, 87,195,195,195,195,195,195,195,195, 87,195,195, -195, 87,195,195,195,195,195,195,195,195,195,195,195,195,195,195, -195,195,195,195,195,195,195,195,195, 87,195,195,195,195,195,195, -195,195,195,195, 87,195,195,195,195,195, 87, 87, 87,195,196,196, -196,194,194,194,194, 87,196,196,196, 87,196,196,196,196, 87, 87, - 87, 87, 87, 87, 87,196,196, 87,195,195, 87, 87, 87, 87, 87, 87, -195,195,196,196, 87, 87,197,197,197,197,197,197,197,197,197,197, - 87, 87, 87, 87, 87, 87, 87, 87,198,198,198,198,198,198,198,199, + 89, 89,193,194, 89,194,194,194,194,194,194, 89, 89, 89,194,194, +194, 89,194,194,194,194, 89, 89, 89,194,194, 89,194, 89,194,194, + 89, 89, 89,194,194, 89, 89, 89,194,194,194, 89, 89, 89,194,194, +194,194,194,194,194,194,194,194,194,194, 89, 89, 89, 89,195,195, +193,195,195, 89, 89, 89,195,195,195, 89,195,195,195,193, 89, 89, +194, 89, 89, 89, 89, 89, 89,195, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89,196,196,196,196,196,196,196,196,196,196, +197,197,197,198,198,198,198,198,198,199,198, 89, 89, 89, 89, 89, /* block 24 */ - 87, 87,200,200, 87,201,201,201,201,201,201,201,201, 87,201,201, -201, 87,201,201,201,201,201,201,201,201,201,201,201,201,201,201, -201,201,201,201,201,201,201,201,201, 87,201,201,201,201,201,201, -201,201,201,201, 87,201,201,201,201,201, 87, 87,202,201,200,202, -200,200,200,200,200, 87,202,200,200, 87,200,200,202,202, 87, 87, - 87, 87, 87, 87, 87,200,200, 87, 87, 87, 87, 87, 87, 87,201, 87, -201,201,202,202, 87, 87,203,203,203,203,203,203,203,203,203,203, - 87, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89,200,200,200, 89,201,201,201,201,201,201,201,201, 89,201,201, +201, 89,201,201,201,201,201,201,201,201,201,201,201,201,201,201, +201,201,201,201,201,201,201,201,201, 89,201,201,201,201,201,201, +201,201,201,201, 89,201,201,201,201,201, 89, 89, 89,201,202,202, +202,200,200,200,200, 89,202,202,202, 89,202,202,202,202, 89, 89, + 89, 89, 89, 89, 89,202,202, 89,201,201, 89, 89, 89, 89, 89, 89, +201,201,202,202, 89, 89,203,203,203,203,203,203,203,203,203,203, + 89, 89, 89, 89, 89, 89, 89, 89,204,204,204,204,204,204,204,205, /* block 25 */ - 87, 87,204,204, 87,205,205,205,205,205,205,205,205, 87,205,205, -205, 87,205,205,205,205,205,205,205,205,205,205,205,205,205,205, -205,205,205,205,205,205,205,205,205, 87,205,205,205,205,205,205, -205,205,205,205,205,205,205,205,205,205, 87, 87, 87,205,204,204, -204,206,206,206,206, 87,204,204,204, 87,204,204,204,206, 87, 87, - 87, 87, 87, 87, 87, 87, 87,204, 87, 87, 87, 87, 87, 87, 87, 87, -205,205,206,206, 87, 87,207,207,207,207,207,207,207,207,207,207, -208,208,208,208,208,208, 87, 87, 87,209,205,205,205,205,205,205, + 89, 89,206,206, 89,207,207,207,207,207,207,207,207, 89,207,207, +207, 89,207,207,207,207,207,207,207,207,207,207,207,207,207,207, +207,207,207,207,207,207,207,207,207, 89,207,207,207,207,207,207, +207,207,207,207, 89,207,207,207,207,207, 89, 89,208,207,206,208, +206,206,206,206,206, 89,208,206,206, 89,206,206,208,208, 89, 89, + 89, 89, 89, 89, 89,206,206, 89, 89, 89, 89, 89, 89, 89,207, 89, +207,207,208,208, 89, 89,209,209,209,209,209,209,209,209,209,209, + 89, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 26 */ - 87, 87,210,210, 87,211,211,211,211,211,211,211,211,211,211,211, -211,211,211,211,211,211,211, 87, 87, 87,211,211,211,211,211,211, -211,211,211,211,211,211,211,211,211,211,211,211,211,211,211,211, -211,211, 87,211,211,211,211,211,211,211,211,211, 87,211, 87, 87, -211,211,211,211,211,211,211, 87, 87, 87,212, 87, 87, 87, 87,210, -210,210,212,212,212, 87,212, 87,210,210,210,210,210,210,210,210, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87,210,210,213, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89, 89,210,210, 89,211,211,211,211,211,211,211,211, 89,211,211, +211, 89,211,211,211,211,211,211,211,211,211,211,211,211,211,211, +211,211,211,211,211,211,211,211,211, 89,211,211,211,211,211,211, +211,211,211,211,211,211,211,211,211,211, 89, 89, 89,211,210,210, +210,212,212,212,212, 89,210,210,210, 89,210,210,210,212, 89, 89, + 89, 89, 89, 89, 89, 89, 89,210, 89, 89, 89, 89, 89, 89, 89, 89, +211,211,212,212, 89, 89,213,213,213,213,213,213,213,213,213,213, +214,214,214,214,214,214, 89, 89, 89,215,211,211,211,211,211,211, /* block 27 */ - 87,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, -214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, -214,214,214,214,214,214,214,214,214,214,214,214,214,214,214,214, -214,215,214,214,215,215,215,215,215,215,215, 87, 87, 87, 87, 3, -214,214,214,214,214,214,216,215,215,215,215,215,215,215,215,217, -218,218,218,218,218,218,218,218,218,218,217,217, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89, 89,216,216, 89,217,217,217,217,217,217,217,217,217,217,217, +217,217,217,217,217,217,217, 89, 89, 89,217,217,217,217,217,217, +217,217,217,217,217,217,217,217,217,217,217,217,217,217,217,217, +217,217, 89,217,217,217,217,217,217,217,217,217, 89,217, 89, 89, +217,217,217,217,217,217,217, 89, 89, 89,218, 89, 89, 89, 89,216, +216,216,218,218,218, 89,218, 89,216,216,216,216,216,216,216,216, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89,216,216,219, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 28 */ - 87,219,219, 87,219, 87, 87,219,219, 87,219, 87, 87,219, 87, 87, - 87, 87, 87, 87,219,219,219,219, 87,219,219,219,219,219,219,219, - 87,219,219,219, 87,219, 87,219, 87, 87,219,219, 87,219,219,219, -219,220,219,219,220,220,220,220,220,220, 87,220,220,219, 87, 87, -219,219,219,219,219, 87,221, 87,220,220,220,220,220,220, 87, 87, -222,222,222,222,222,222,222,222,222,222, 87, 87,219,219, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, +220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, +220,220,220,220,220,220,220,220,220,220,220,220,220,220,220,220, +220,221,220,220,221,221,221,221,221,221,221, 89, 89, 89, 89, 3, +220,220,220,220,220,220,222,221,221,221,221,221,221,221,221,223, +224,224,224,224,224,224,224,224,224,224,223,223, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 29 */ -223,224,224,224,225,225,225,225,225,225,225,225,225,225,225,225, -225,225,225,224,224,224,224,224,226,226,224,224,224,224,224,224, -227,227,227,227,227,227,227,227,227,227,228,228,228,228,228,228, -228,228,228,228,224,226,224,226,224,226,229,230,229,230,231,231, -223,223,223,223,223,223,223,223, 87,223,223,223,223,223,223,223, -223,223,223,223,223,223,223,223,223,223,223,223,223,223,223,223, -223,223,223,223,223,223,223,223,223,223,223,223,223, 87, 87, 87, - 87,226,226,226,226,226,226,226,226,226,226,226,226,226,226,231, + 89,225,225, 89,225, 89, 89,225,225, 89,225, 89, 89,225, 89, 89, + 89, 89, 89, 89,225,225,225,225, 89,225,225,225,225,225,225,225, + 89,225,225,225, 89,225, 89,225, 89, 89,225,225, 89,225,225,225, +225,226,225,225,226,226,226,226,226,226, 89,226,226,225, 89, 89, +225,225,225,225,225, 89,227, 89,226,226,226,226,226,226, 89, 89, +228,228,228,228,228,228,228,228,228,228, 89, 89,225,225, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 30 */ -226,226,226,226,226,225,226,226,223,223,223,223, 87, 87, 87, 87, -226,226,226,226,226,226,226,226, 87,226,226,226,226,226,226,226, -226,226,226,226,226,226,226,226,226,226,226,226,226,226,226,226, -226,226,226,226,226,226,226,226,226,226,226,226,226, 87,224,224, -224,224,224,224,224,224,226,224,224,224,224,224,224, 87,224,224, -225,225,225,225,225, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +229,230,230,230,231,231,231,231,231,231,231,231,231,231,231,231, +231,231,231,230,230,230,230,230,232,232,230,230,230,230,230,230, +233,233,233,233,233,233,233,233,233,233,234,234,234,234,234,234, +234,234,234,234,230,232,230,232,230,232,235,236,235,236,237,237, +229,229,229,229,229,229,229,229, 89,229,229,229,229,229,229,229, +229,229,229,229,229,229,229,229,229,229,229,229,229,229,229,229, +229,229,229,229,229,229,229,229,229,229,229,229,229, 89, 89, 89, + 89,232,232,232,232,232,232,232,232,232,232,232,232,232,232,237, /* block 31 */ +232,232,232,232,232,231,232,232,229,229,229,229, 89, 89, 89, 89, +232,232,232,232,232,232,232,232, 89,232,232,232,232,232,232,232, 232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232, -232,232,232,232,232,232,232,232,232,232,232,232,232,232,232,232, -232,232,232,232,232,232,232,232,232,232,232,233,233,234,234,234, -234,233,234,234,234,234,234,234,233,234,234,233,233,234,234,232, -235,235,235,235,235,235,235,235,235,235,236,236,236,236,236,236, -232,232,232,232,232,232,233,233,234,234,232,232,232,232,234,234, -234,232,233,233,233,232,232,233,233,233,233,233,233,233,232,232, -232,234,234,234,234,232,232,232,232,232,232,232,232,232,232,232, +232,232,232,232,232,232,232,232,232,232,232,232,232, 89,230,230, +230,230,230,230,230,230,232,230,230,230,230,230,230, 89,230,230, +231,231,231,231,231, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 32 */ -232,232,234,233,233,234,234,233,233,233,233,233,233,234,232,233, -235,235,235,235,235,235,235,235,235,235, 87, 87, 87, 87,237,237, 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, 238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, -238,238,238,238,238,238, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, -239,239,239,239,239,239,239,239,239,239,239,239,239,239,239,239, -239,239,239,239,239,239,239,239,239,239,239, 2,240, 87, 87, 87, +238,238,238,238,238,238,238,238,238,238,238,239,239,240,240,240, +240,239,240,240,240,240,240,240,239,240,240,239,239,240,240,238, +241,241,241,241,241,241,241,241,241,241,242,242,242,242,242,242, +238,238,238,238,238,238,239,239,240,240,238,238,238,238,240,240, +240,238,239,239,239,238,238,239,239,239,239,239,239,239,238,238, +238,240,240,240,240,238,238,238,238,238,238,238,238,238,238,238, /* block 33 */ -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241, 87, 87, 87, 87, 87,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +238,238,240,239,239,240,240,239,239,239,239,239,239,240,238,239, +241,241,241,241,241,241,241,241,241,241,239,239,239,240,243,243, +244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244, +244,244,244,244,244,244,244,244,244,244,244,244,244,244,244,244, +244,244,244,244,244,244, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, +245,245,245,245,245,245,245,245,245,245,245,245,245,245,245,245, +245,245,245,245,245,245,245,245,245,245,245, 2,246, 89, 89, 89, /* block 34 */ -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241, 87, 87, 87, 87, 87,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241, 87, 87, 87, 87, 87, 87, - -/* block 35 */ -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242, 87,242,242,242,242, 87, 87, -242,242,242,242,242,242,242, 87,242, 87,242,242,242,242, 87, 87, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, - -/* block 36 */ -242,242,242,242,242,242,242,242,242, 87,242,242,242,242, 87, 87, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242, 87,242,242,242,242, 87, 87,242,242,242,242,242,242,242, 87, -242, 87,242,242,242,242, 87, 87,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, - -/* block 37 */ -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242, 87,242,242,242,242, 87, 87,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242,242,242,242,242, 87, 87, 87, 87,243, -244,245,245,245,245,245,245,245,245,246,246,246,246,246,246,246, -246,246,246,246,246,246,246,246,246,246,246,246,246, 87, 87, 87, - -/* block 38 */ -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -244,244,244,244,244,244,244,244,244,244, 87, 87, 87, 87, 87, 87, 247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, -247,247,247,247,247, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, -/* block 39 */ - 87,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, +/* block 35 */ 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, 89,248,248,248,248, 89, 89, +248,248,248,248,248,248,248, 89,248, 89,248,248,248,248, 89, 89, 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, -/* block 40 */ -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, +/* block 36 */ +248,248,248,248,248,248,248,248,248, 89,248,248,248,248, 89, 89, 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, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248, 89, +248, 89,248,248,248,248, 89, 89,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248, 89,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, -/* block 41 */ -248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +/* block 37 */ 248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248, 89,248,248,248,248, 89, 89,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, 89, 89, 89, 89,249, +250,251,251,251,251,251,251,251,251,252,252,252,252,252,252,252, +252,252,252,252,252,252,252,252,252,252,252,252,252, 89, 89, 89, + +/* block 38 */ 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,249,249,248, -248,248,248,248,248,248,248, 87, 87, 87, 87, 87, 87, 87, 87, 87, +250,250,250,250,250,250,250,250,250,250, 89, 89, 89, 89, 89, 89, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253,253,253,253,253,253,253,253,253,253,253,253, +253,253,253,253,253, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 39 */ +254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + +/* block 40 */ +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + +/* block 41 */ +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,256,256,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, /* block 42 */ -250,251,251,251,251,251,251,251,251,251,251,251,251,251,251,251, -251,251,251,251,251,251,251,251,251,251,251,252,253, 87, 87, 87, -254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, -254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, -254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, -254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, -254,254,254,254,254,254,254,254,254,254,254, 2, 2, 2,255,255, -255, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +257,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258, +258,258,258,258,258,258,258,258,258,258,258,259,260, 89, 89, 89, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261,261,261,261,261,261, +261,261,261,261,261,261,261,261,261,261,261, 2, 2, 2,262,262, +262, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 43 */ -256,256,256,256,256,256,256,256,256,256,256,256,256, 87,256,256, -256,256,257,257,257, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -258,258,258,258,258,258,258,258,258,258,258,258,258,258,258,258, -258,258,259,259,259, 2, 2, 87, 87, 87, 87, 87, 87, 87, 87, 87, -260,260,260,260,260,260,260,260,260,260,260,260,260,260,260,260, -260,260,261,261, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -262,262,262,262,262,262,262,262,262,262,262,262,262, 87,262,262, -262, 87,263,263, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +263,263,263,263,263,263,263,263,263,263,263,263,263, 89,263,263, +263,263,264,264,264, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +265,265,265,265,265,265,265,265,265,265,265,265,265,265,265,265, +265,265,266,266,266, 2, 2, 89, 89, 89, 89, 89, 89, 89, 89, 89, +267,267,267,267,267,267,267,267,267,267,267,267,267,267,267,267, +267,267,268,268, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +269,269,269,269,269,269,269,269,269,269,269,269,269, 89,269,269, +269, 89,270,270, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 44 */ -264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, -264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, -264,264,264,264,264,264,264,264,264,264,264,264,264,264,264,264, -264,264,264,264,265,265,266,267,267,267,267,267,267,267,266,266, -266,266,266,266,266,266,267,266,266,267,267,267,267,267,267,267, -267,267,267,267,268,268,268,269,268,268,268,270,264,267, 87, 87, -271,271,271,271,271,271,271,271,271,271, 87, 87, 87, 87, 87, 87, -272,272,272,272,272,272,272,272,272,272, 87, 87, 87, 87, 87, 87, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, +271,271,271,271,271,271,271,271,271,271,271,271,271,271,271,271, +271,271,271,271,272,272,273,274,274,274,274,274,274,274,273,273, +273,273,273,273,273,273,274,273,273,274,274,274,274,274,274,274, +274,274,274,274,275,275,275,276,275,275,275,277,271,274, 89, 89, +278,278,278,278,278,278,278,278,278,278, 89, 89, 89, 89, 89, 89, +279,279,279,279,279,279,279,279,279,279, 89, 89, 89, 89, 89, 89, /* block 45 */ -273,273, 2, 2,273, 2,274,273,273,273,273,275,275,275,276, 87, -277,277,277,277,277,277,277,277,277,277, 87, 87, 87, 87, 87, 87, -278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,279,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,278,278,278,278,278, 87, 87, 87, 87, 87, 87, 87, 87, +280,280, 2, 2,280, 2,281,280,280,280,280,282,282,282,283, 89, +284,284,284,284,284,284,284,284,284,284, 89, 89, 89, 89, 89, 89, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,286,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285, 89, 89, 89, 89, 89, 89, 89, 89, /* block 46 */ -278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,278,278,278,278,278,278,278,278,278,278,278,278,278, -278,278,278,278,278,278,278,278,278,275,278, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,285,285,285,285,285,285,285, +285,285,285,285,285,285,285,285,285,282,285, 89, 89, 89, 89, 89, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, +255,255,255,255,255,255, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 47 */ -280,280,280,280,280,280,280,280,280,280,280,280,280,280,280,280, -280,280,280,280,280,280,280,280,280,280,280,280,280, 87, 87, 87, -281,281,281,282,282,282,282,281,281,282,282,282, 87, 87, 87, 87, -282,282,281,282,282,282,282,282,282,281,281,281, 87, 87, 87, 87, -283, 87, 87, 87,284,284,285,285,285,285,285,285,285,285,285,285, -286,286,286,286,286,286,286,286,286,286,286,286,286,286,286,286, -286,286,286,286,286,286,286,286,286,286,286,286,286,286, 87, 87, -286,286,286,286,286, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287, +287,287,287,287,287,287,287,287,287,287,287,287,287, 89, 89, 89, +288,288,288,289,289,289,289,288,288,289,289,289, 89, 89, 89, 89, +289,289,288,289,289,289,289,289,289,288,288,288, 89, 89, 89, 89, +290, 89, 89, 89,291,291,292,292,292,292,292,292,292,292,292,292, +293,293,293,293,293,293,293,293,293,293,293,293,293,293,293,293, +293,293,293,293,293,293,293,293,293,293,293,293,293,293, 89, 89, +293,293,293,293,293, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 48 */ -287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287, -287,287,287,287,287,287,287,287,287,287,287,287,287,287,287,287, -287,287,287,287,287,287,287,287,287,287, 87, 87, 87, 87, 87, 87, -288,288,288,288,288,288,288,288,288,288,288,288,288,288,288,288, -288,287,287,287,287,287,287,287,288,288, 87, 87, 87, 87, 87, 87, -289,289,289,289,289,289,289,289,289,289, 87, 87, 87, 87,290,290, -291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291, -291,291,291,291,291,291,291,291,291,291,291,291,291,291,291,291, +294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294, +294,294,294,294,294,294,294,294,294,294,294,294,294,294,294,294, +294,294,294,294,294,294,294,294,294,294,294,294, 89, 89, 89, 89, +295,295,295,295,295,295,295,295,295,295,295,295,295,295,295,295, +295,294,294,294,294,294,294,294,295,295, 89, 89, 89, 89, 89, 89, +296,296,296,296,296,296,296,296,296,296,296, 89, 89, 89,297,297, +298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298, +298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298, /* block 49 */ -292,292,292,292,292,292,292,292,292,292,292,292,292,292,292,292, -292,292,292,292,292,292,292,293,293,294,294,294, 87, 87,295,295, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +299,299,299,299,299,299,299,299,299,299,299,299,299,299,299,299, +299,299,299,299,299,299,299,300,300,301,301,301, 89, 89,302,302, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, +303,303,303,303,303,303,303,303,303,303,303,303,303,303,303,303, +303,303,303,303,303,304,305,304,305,305,305,305,305,305,305, 89, +305,304,305,304,304,305,305,305,305,305,305,305,305,304,304,304, +304,304,304,305,305,305,305,305,305,305,305,305,305, 89, 89,305, /* block 50 */ -296,296,296,296,297,298,298,298,298,298,298,298,298,298,298,298, -298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298, -298,298,298,298,298,298,298,298,298,298,298,298,298,298,298,298, -298,298,298,298,296,297,296,296,296,296,296,297,296,297,297,297, -297,297,296,297,297,298,298,298,298,298,298,298, 87, 87, 87, 87, -299,299,299,299,299,299,299,299,299,299,300,300,300,300,300,300, -300,301,301,301,301,301,301,301,301,301,301,296,296,296,296,296, -296,296,296,296,301,301,301,301,301,301,301,301,301, 87, 87, 87, +306,306,306,306,306,306,306,306,306,306, 89, 89, 89, 89, 89, 89, +306,306,306,306,306,306,306,306,306,306, 89, 89, 89, 89, 89, 89, +307,307,307,307,307,307,307,308,307,307,307,307,307,307, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 51 */ -302,302,303,304,304,304,304,304,304,304,304,304,304,304,304,304, -304,304,304,304,304,304,304,304,304,304,304,304,304,304,304,304, -304,303,302,302,302,302,303,303,302,302,303, 87, 87, 87,304,304, -305,305,305,305,305,305,305,305,305,305, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +309,309,309,309,310,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,311,311,311,311,311,311,311,311,311,311,311,311, +311,311,311,311,309,310,309,309,309,309,309,310,309,310,310,310, +310,310,309,310,310,311,311,311,311,311,311,311, 89, 89, 89, 89, +312,312,312,312,312,312,312,312,312,312,313,313,313,313,313,313, +313,314,314,314,314,314,314,314,314,314,314,309,309,309,309,309, +309,309,309,309,314,314,314,314,314,314,314,314,314, 89, 89, 89, /* block 52 */ -306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306, -306,306,306,306,306,306,306,306,306,306,306,306,306,306,306,306, -306,306,306,306,307,307,307,307,307,307,307,307,308,308,308,308, -308,308,308,308,307,307,308,308, 87, 87, 87,309,309,309,309,309, -310,310,310,310,310,310,310,310,310,310, 87, 87, 87,306,306,306, -311,311,311,311,311,311,311,311,311,311,312,312,312,312,312,312, -312,312,312,312,312,312,312,312,312,312,312,312,312,312,312,312, -312,312,312,312,312,312,312,312,313,313,313,313,313,313,314,314, +315,315,316,317,317,317,317,317,317,317,317,317,317,317,317,317, +317,317,317,317,317,317,317,317,317,317,317,317,317,317,317,317, +317,316,315,315,315,315,316,316,315,315,316, 89, 89, 89,317,317, +318,318,318,318,318,318,318,318,318,318, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 53 */ - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 94, 94, 94, 94, 94,315, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 88, 88, 88, - 88, 88, 14, 14, 14, 14, 94, 94, 94, 94, 94, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14,316,317, 14, 14, 14,318, 14, 14, +319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319, +319,319,319,319,319,319,319,319,319,319,319,319,319,319,319,319, +319,319,319,319,320,320,320,320,320,320,320,320,321,321,321,321, +321,321,321,321,320,320,321,321, 89, 89, 89,322,322,322,322,322, +323,323,323,323,323,323,323,323,323,323, 89, 89, 89,319,319,319, +324,324,324,324,324,324,324,324,324,324,325,325,325,325,325,325, +325,325,325,325,325,325,325,325,325,325,325,325,325,325,325,325, +325,325,325,325,325,325,325,325,326,326,326,326,326,326,327,327, /* block 54 */ + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 84, 84, 84, 2, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84,328, 84, 84, 84, 84, 84, 84, 84,329,329,329,329, 84,329,329, +329,329,328, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 55 */ + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, - 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 80, 88, + 14, 14, 14, 14, 14, 14, 96, 96, 96, 96, 96,330, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 90, 90, 90, + 90, 90, 14, 14, 14, 14, 96, 96, 96, 96, 96, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14,331,332, 14, 14, 14,333, 14, 14, -/* block 55 */ +/* block 56 */ + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, + 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, + 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 90, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 84, 84, 84, + +/* block 57 */ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, @@ -1598,9 +1679,9 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, -/* block 56 */ +/* block 58 */ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 21, 22, 21, 22, 21, 22, 14, 14, 14, 14, 14,319, 14, 14,320, 14, + 21, 22, 21, 22, 21, 22, 14, 14, 14, 14, 14,334, 14, 14,335, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, @@ -1608,58 +1689,58 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, -/* block 57 */ -321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, -321,321,321,321,321,321, 87, 87,322,322,322,322,322,322, 87, 87, -321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, -321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, -321,321,321,321,321,321, 87, 87,322,322,322,322,322,322, 87, 87, - 94,321, 94,321, 94,321, 94,321, 87,322, 87,322, 87,322, 87,322, -321,321,321,321,321,321,321,321,322,322,322,322,322,322,322,322, -323,323,324,324,324,324,325,325,326,326,327,327,328,328, 87, 87, +/* block 59 */ +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +336,336,336,336,336,336, 89, 89,337,337,337,337,337,337, 89, 89, +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +336,336,336,336,336,336, 89, 89,337,337,337,337,337,337, 89, 89, + 96,336, 96,336, 96,336, 96,336, 89,337, 89,337, 89,337, 89,337, +336,336,336,336,336,336,336,336,337,337,337,337,337,337,337,337, +338,338,339,339,339,339,340,340,341,341,342,342,343,343, 89, 89, -/* block 58 */ -321,321,321,321,321,321,321,321,329,329,329,329,329,329,329,329, -321,321,321,321,321,321,321,321,329,329,329,329,329,329,329,329, -321,321,321,321,321,321,321,321,329,329,329,329,329,329,329,329, -321,321, 94,330, 94, 87, 94, 94,322,322,331,331,332, 86,333, 86, - 86, 86, 94,330, 94, 87, 94, 94,334,334,334,334,332, 86, 86, 86, -321,321, 94, 94, 87, 87, 94, 94,322,322,335,335, 87, 86, 86, 86, -321,321, 94, 94, 94,113, 94, 94,322,322,336,336,117, 86, 86, 86, - 87, 87, 94,330, 94, 87, 94, 94,337,337,338,338,332, 86, 86, 87, +/* block 60 */ +336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344, +336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344, +336,336,336,336,336,336,336,336,344,344,344,344,344,344,344,344, +336,336, 96,345, 96, 89, 96, 96,337,337,346,346,347, 88,348, 88, + 88, 88, 96,345, 96, 89, 96, 96,349,349,349,349,347, 88, 88, 88, +336,336, 96, 96, 89, 89, 96, 96,337,337,350,350, 89, 88, 88, 88, +336,336, 96, 96, 96,115, 96, 96,337,337,351,351,119, 88, 88, 88, + 89, 89, 96,345, 96, 89, 96, 96,352,352,353,353,347, 88, 88, 89, -/* block 59 */ - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,339,339, 16, 16, +/* block 61 */ + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 16,354,354, 16, 16, 7, 7, 7, 7, 7, 7, 2, 2, 15, 19, 4, 15, 15, 19, 4, 15, - 2, 2, 2, 2, 2, 2, 2, 2,340,341, 16, 16, 16, 16, 16, 1, + 2, 2, 2, 2, 2, 2, 2, 2,355,356, 16, 16, 16, 16, 16, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 15, 19, 2, 2, 2, 2, 11, 11, 2, 2, 2, 6, 4, 5, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, - 16, 16, 16, 16, 16, 87, 87, 87, 87, 87, 16, 16, 16, 16, 16, 16, - 17, 14, 87, 87, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 14, + 16, 16, 16, 16, 16, 89, 89, 89, 89, 89, 16, 16, 16, 16, 16, 16, + 17, 82, 89, 89, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 82, -/* block 60 */ - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 87, - 80, 80, 80, 80, 80, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +/* block 62 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 6, 6, 6, 4, 5, 89, + 82, 82, 82, 82, 82, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 3, 3, 3, 3, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82,342,342,342, -342, 82,342,342,342, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 3, 3, 3, 3, 3, 3, 3, 3, 3, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84,357,357,357, +357, 84,357,357,357, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -/* block 61 */ - 13, 13,343, 13, 13, 13, 13,343, 13, 13,344,343,343,343,344,344, -343,343,343,344, 13,343, 13, 13, 13,343,343,343,343,343, 13, 13, - 13, 13, 13, 13,343, 13,345, 13,343, 13,346,347,343,343, 13,344, -343,343,348,343,344,349,349,349,349,344, 13, 13,344,344,343,343, - 6, 6, 6, 6, 6,343,344,344,344,344, 13, 6, 13, 13,350, 13, - 87, 87, 87, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, -351,351,351,351,351,351,351,351,351,351,351,351,351,351,351,351, -352,352,352,352,352,352,352,352,352,352,352,352,352,352,352,352, +/* block 63 */ + 13, 13,358, 13, 13, 13, 13,358, 13, 13,359,358,358,358,359,359, +358,358,358,359, 13,358, 13, 13, 13,358,358,358,358,358, 13, 13, + 13, 13, 13, 13,358, 13,360, 13,358, 13,361,362,358,358, 13,359, +358,358,363,358,359,329,329,329,329,359, 13, 13,359,359,358,358, + 6, 6, 6, 6, 6,358,359,359,359,359, 13, 6, 13, 13,364, 13, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, +365,365,365,365,365,365,365,365,365,365,365,365,365,365,365,365, +366,366,366,366,366,366,366,366,366,366,366,366,366,366,366,366, -/* block 62 */ -353,353,353, 21, 22,353,353,353,353, 87, 87, 87, 87, 87, 87, 87, +/* block 64 */ +367,367,367, 21, 22,367,367,367,367, 17, 89, 89, 89, 89, 89, 89, 6, 6, 6, 6, 6, 13, 13, 13, 13, 13, 6, 6, 13, 13, 13, 13, 6, 13, 13, 6, 13, 13, 6, 13, 13, 13, 13, 13, 13, 13, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1668,7 +1749,7 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -/* block 63 */ +/* block 65 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -1678,7 +1759,7 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -/* block 64 */ +/* block 66 */ 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 13, 13, 13, 13, 13, 13, 13, 4, 5, 13, 13, 13, 13, 13, @@ -1688,37 +1769,37 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 13, 13, 13, -/* block 65 */ +/* block 67 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, - 6, 6, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 6, 6, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, -/* block 66 */ +/* block 68 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, -/* block 67 */ +/* block 69 */ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13,354,354,354,354,354,354,354,354,354,354, -354,354,354,354,354,354,354,354,354,354,354,354,354,354,354,354, -355,355,355,355,355,355,355,355,355,355,355,355,355,355,355,355, -355,355,355,355,355,355,355,355,355,355, 17, 17, 17, 17, 17, 17, + 13, 13, 13, 13, 13, 13,368,368,368,368,368,368,368,368,368,368, +368,368,368,368,368,368,368,368,368,368,368,368,368,368,368,368, +369,369,369,369,369,369,369,369,369,369,369,369,369,369,369,369, +369,369,369,369,369,369,369,369,369,369, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, -/* block 68 */ +/* block 70 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1728,7 +1809,7 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -/* block 69 */ +/* block 71 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1738,7 +1819,7 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 6, 6, 6, 6, -/* block 70 */ +/* block 72 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, @@ -1748,47 +1829,47 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -/* block 71 */ +/* block 73 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, - 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 89, 13, 89, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -/* block 72 */ - 87, 13, 13, 13, 13, 87, 13, 13, 13, 13, 87, 87, 13, 13, 13, 13, +/* block 74 */ + 89, 13, 13, 13, 13, 89, 13, 13, 13, 13, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 87, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 13, 87, 13, - 13, 13, 13, 87, 87, 87, 13, 87, 13, 13, 13, 13, 13, 13, 13, 87, - 87, 13, 13, 13, 13, 13, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 13, 89, 13, + 13, 13, 13, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, + 89, 13, 13, 13, 13, 13, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, -/* block 73 */ +/* block 75 */ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 13, 87, 87, 87, 13, 13, 13, 13, 13, 13, 13, 13, + 17, 17, 17, 17, 13, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 87, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, - 6, 6, 6, 6, 6, 4, 5, 6, 6, 6, 6, 87, 6, 87, 87, 87, + 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, + 6, 6, 6, 6, 6, 4, 5, 6, 6, 6, 6, 89, 6, 89, 89, 89, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, -/* block 74 */ -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, -356,356,356,356,356,356,356,356,356,356,356,356,356,356,356,356, +/* block 76 */ +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, +370,370,370,370,370,370,370,370,370,370,370,370,370,370,370,370, -/* block 75 */ +/* block 77 */ 6, 6, 6, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, @@ -1798,789 +1879,909 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 4, 5, 6, 6, -/* block 76 */ +/* block 78 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, - 6, 6, 6, 6, 6, 13, 13, 6, 6, 6, 6, 6, 6, 87, 87, 87, - 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - -/* block 77 */ -357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, -357,357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, -357,357,357,357,357,357,357,357,357,357,357,357,357,357,357, 87, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, -358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, 87, - 21, 22,359,360,361,362,363, 21, 22, 21, 22, 21, 22,364,365,366, - 87, 14, 21, 22, 14, 21, 22, 14, 14, 14, 14, 14, 14, 80, 87, 87, - -/* block 78 */ -109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -109,110,109,110,109,110,109,110,109,110,109,110,109,110,109,110, -109,110,109,110,367,368,368,368,368,368,368, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87,369,369,369,369,370,369,369, + 6, 6, 6, 6, 6, 13, 13, 6, 6, 6, 6, 6, 6, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 79 */ 371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, 371,371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, -371,371,371,371,371,371, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, +371,371,371,371,371,371,371,371,371,371,371,371,371,371,371, 89, 372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, 372,372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, -372,372,372,372,372,372, 87, 87, 87, 87, 87, 87, 87, 87, 87,373, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +372,372,372,372,372,372,372,372,372,372,372,372,372,372,372, 89, + 21, 22,373,374,375,376,377, 21, 22, 21, 22, 21, 22,378,379,380, +381, 14, 21, 22, 14, 21, 22, 14, 14, 14, 14, 14, 14, 82,382,382, /* block 80 */ -242,242,242,242,242,242,242,242,242,242,242,242,242,242,242,242, -242,242,242,242,242,242,242, 87, 87, 87, 87, 87, 87, 87, 87, 87, -242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, -242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, -242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, -242,242,242,242,242,242,242, 87,242,242,242,242,242,242,242, 87, -126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, -126,126,126,126,126,126,126,126,126,126,126,126,126,126,126,126, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,111,112,111,112,111,112,111,112,111,112,111,112, +111,112,111,112,383,384,384,384,384,384,384,111,112,111,112,385, +385,385, 89, 89, 89, 89, 89, 89, 89,386,386,386,386,387,386,386, /* block 81 */ - 2, 2, 15, 19, 15, 19, 2, 2, 2, 15, 19, 2, 15, 19, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 7, 2, 2, 7, 2, 15, 19, 2, 2, - 15, 19, 4, 5, 4, 5, 4, 5, 4, 5, 2, 2, 2, 2, 2, 81, - 2, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +388,388,388,388,388,388, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389, +389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389, +389,389,389,389,389,389,389,389,389,389,389,389,389,389,389,389, +389,389,389,389,389,389, 89, 89, 89, 89, 89, 89, 89, 89, 89,390, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 82 */ -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374, 87,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +248,248,248,248,248,248,248,248,248,248,248,248,248,248,248,248, +248,248,248,248,248,248,248, 89, 89, 89, 89, 89, 89, 89, 89, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +248,248,248,248,248,248,248, 89,248,248,248,248,248,248,248, 89, +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, +128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, /* block 83 */ -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, + 2, 2, 15, 19, 15, 19, 2, 2, 2, 15, 19, 2, 15, 19, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 7, 2, 2, 7, 2, 15, 19, 2, 2, + 15, 19, 4, 5, 4, 5, 4, 5, 4, 5, 2, 2, 2, 2, 2, 83, + 2, 2, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 84 */ -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374,374,374,374,374,374,374,374,374,374,374, -374,374,374,374,374,374, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391, 89,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 85 */ - 1, 2, 2, 2, 13,375,349,376, 4, 5, 4, 5, 4, 5, 4, 5, - 4, 5, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, 7, 4, 5, 5, - 13,376,376,376,376,376,376,376,376,376, 82, 82, 82, 82, 82, 82, - 7, 81, 81, 81, 81, 81, 13, 13,376,376,376,375,349, 2, 13, 13, - 87,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, /* block 86 */ -377,377,377,377,377,377,377,377,377,377,377,377,377,377,377,377, -377,377,377,377,377,377,377, 87, 87, 82, 82, 10, 10,378,378,377, - 7,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,379,379,379,379,379,379,379,379,379, 2, 81,380,380,379, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391,391,391,391,391,391,391,391,391,391,391, +391,391,391,391,391,391, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, /* block 87 */ - 87, 87, 87, 87, 87,381,381,381,381,381,381,381,381,381,381,381, -381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381, -381,381,381,381,381,381,381,381,381,381,381,381,381,381, 87, 87, - 87,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, + 1, 2, 2, 2, 13,392,329,393, 4, 5, 4, 5, 4, 5, 4, 5, + 4, 5, 13, 13, 4, 5, 4, 5, 4, 5, 4, 5, 7, 4, 5, 5, + 13,393,393,393,393,393,393,393,393,393, 84, 84, 84, 84, 84, 84, + 7, 83, 83, 83, 83, 83, 13, 13,393,393,393,392,329, 2, 13, 13, + 89,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, /* block 88 */ -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, 87, +394,394,394,394,394,394,394,394,394,394,394,394,394,394,394,394, +394,394,394,394,394,394,394, 89, 89, 84, 84, 10, 10,395,395,394, + 7,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396, 2, 83,397,397,396, + +/* block 89 */ + 89, 89, 89, 89, 89,398,398,398,398,398,398,398,398,398,398,398, +398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, +398,398,398,398,398,398,398,398,398,398,398,398,398,398, 89, 89, + 89,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, + +/* block 90 */ +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 89, 13, 13, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -381,381,381,381,381,381,381,381,381,381,381,381,381,381,381,381, -381,381,381,381,381,381,381,381, 87, 87, 87, 87, 87, 87, 87, 87, +398,398,398,398,398,398,398,398,398,398,398,398,398,398,398,398, +398,398,398,398,398,398,398,398, 89, 89, 89, 89, 89, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, + 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, -/* block 89 */ -382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, -382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, 87, +/* block 91 */ +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, 89, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, -382,382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, -382,382,382,382,382,382,382,382,382,382,382,382,382,382,382, 13, +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, +399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, 13, -/* block 90 */ +/* block 92 */ 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, 87, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, 89, -/* block 91 */ -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383,383,383,383,383,383,383,383,383, -383,383,383,383,383,383,383,383, 13, 13, 13, 13, 13, 13, 13, 13, +/* block 93 */ +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400,400,400,400,400,400,400,400,400, +400,400,400,400,400,400,400,400, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -/* block 92 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, +/* block 94 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, -/* block 93 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +/* block 95 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -/* block 94 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - -/* block 95 */ -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,386,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, - /* block 96 */ -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, -385,385,385,385,385,385,385,385,385,385,385,385,385,385,385,385, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 97 */ -385,385,385,385,385,385,385,385,385,385,385,385,385, 87, 87, 87, -387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, -387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, -387,387,387,387,387,387,387,387,387,387,387,387,387,387,387,387, -387,387,387,387,387,387,387, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,403,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, /* block 98 */ -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, +402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, /* block 99 */ -388,388,388,388,388,388,388,388,388,388,388,388,389,390,390,390, -388,388,388,388,388,388,388,388,388,388,388,388,388,388,388,388, -391,391,391,391,391,391,391,391,391,391,388,388, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, - 87, 87,123,124,123,124,123,124,123,124,123,124,123,124,392,126, -127,127,127,393, 87, 87, 87, 87, 87, 87, 87, 87,126,126,393,316, +402,402,402,402,402,402,402,402,402,402,402,402,402, 89, 89, 89, +404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, +404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, +404,404,404,404,404,404,404,404,404,404,404,404,404,404,404,404, +404,404,404,404,404,404,404, 89, 89, 89, 89, 89, 89, 89, 89, 89, +405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405, +405,405,405,405,405,405,405,405,405,405,405,405,405,405,405,405, +405,405,405,405,405,405,405,405,406,406,406,406,406,406,407,407, /* block 100 */ -123,124,123,124,123,124,123,124,123,124,123,124,123,124,123,124, -123,124,123,124,123,124,123,124, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, /* block 101 */ +408,408,408,408,408,408,408,408,408,408,408,408,409,410,410,410, +408,408,408,408,408,408,408,408,408,408,408,408,408,408,408,408, +411,411,411,411,411,411,411,411,411,411,408,408, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, + 89, 89,125,126,125,126,125,126,125,126,125,126,125,126,412,128, +129,129,129,413, 89, 89, 89, 89, 89, 89, 89, 89,128,128,413,331, + +/* block 102 */ +125,126,125,126,125,126,125,126,125,126,125,126,125,126,125,126, +125,126,125,126,125,126,125,126, 89, 89, 89, 89, 89, 89, 89, 89, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, +414,414,414,414,414,414,415,415,415,415,415,415,415,415,415,415, +416,416,417,417,417,417,417,417, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 103 */ 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, - 10, 10, 10, 10, 10, 10, 10, 81, 81, 81, 81, 81, 81, 81, 81, 81, + 10, 10, 10, 10, 10, 10, 10, 83, 83, 83, 83, 83, 83, 83, 83, 83, 10, 10, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 14, 14, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, - 80, 14, 14, 14, 14, 14, 14, 14, 14, 21, 22, 21, 22,394, 21, 22, - -/* block 102 */ - 21, 22, 21, 22, 21, 22, 21, 22, 81, 10, 10, 21, 22, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 45, 45, 45, 45, 45, - -/* block 103 */ -395,395,396,395,395,395,396,395,395,395,395,396,395,395,395,395, -395,395,395,395,395,395,395,395,395,395,395,395,395,395,395,395, -395,395,395,397,397,396,396,397,398,398,398,398, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, -399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, -399,399,399,399,399,399,399,399,399,399,399,399,399,399,399,399, -399,399,399,399,400,400,400,400, 87, 87, 87, 87, 87, 87, 87, 87, + 82, 14, 14, 14, 14, 14, 14, 14, 14, 21, 22, 21, 22,418, 21, 22, /* block 104 */ -401,401,402,402,402,402,402,402,402,402,402,402,402,402,402,402, -402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, -402,402,402,402,402,402,402,402,402,402,402,402,402,402,402,402, -402,402,402,402,401,401,401,401,401,401,401,401,401,401,401,401, -401,401,401,401,403, 87, 87, 87, 87, 87, 87, 87, 87, 87,404,404, -405,405,405,405,405,405,405,405,405,405, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 21, 22, 21, 22, 21, 22, 21, 22, 83, 10, 10, 21, 22, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 45, 45, 45, 45, 45, /* block 105 */ -406,406,406,406,406,406,406,406,406,406,407,407,407,407,407,407, -407,407,407,407,407,407,407,407,407,407,407,407,407,407,407,407, -407,407,407,407,407,407,408,408,408,408,408,408,408,408,409,409, -410,410,410,410,410,410,410,410,410,410,410,410,410,410,410,410, -410,410,410,410,410,410,410,411,411,411,411,411,411,411,411,411, -411,411,412,412, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87,413, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +419,419,420,419,419,419,420,419,419,419,419,420,419,419,419,419, +419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +419,419,419,421,421,420,420,421,422,422,422,422, 89, 89, 89, 89, + 17, 17, 17, 17, 17, 17, 13, 13, 3, 13, 89, 89, 89, 89, 89, 89, +423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, +423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, +423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, +423,423,423,423,424,424,424,424, 89, 89, 89, 89, 89, 89, 89, 89, /* block 106 */ -414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, -414,414,414,414,414,414,414,414,414,414,414,414,414,414,414,414, -414,414,414,414,414,414,414,414,414,415,415,415,415,415,415,416, -416,415,415,416,416,415,415, 87, 87, 87, 87, 87, 87, 87, 87, 87, -414,414,414,415,414,414,414,414,414,414,414,414,415,416, 87, 87, -417,417,417,417,417,417,417,417,417,417, 87, 87,418,418,418,418, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +425,425,426,426,426,426,426,426,426,426,426,426,426,426,426,426, +426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, +426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, +426,426,426,426,425,425,425,425,425,425,425,425,425,425,425,425, +425,425,425,425,427, 89, 89, 89, 89, 89, 89, 89, 89, 89,428,428, +429,429,429,429,429,429,429,429,429,429, 89, 89, 89, 89, 89, 89, +167,167,167,167,167,167,167,167,167,167,167,167,167,167,167,167, +167,167,169,169,169,169,169,169,430,430,430,169, 89, 89, 89, 89, /* block 107 */ -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, +431,431,431,431,431,431,431,431,431,431,432,432,432,432,432,432, +432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432, +432,432,432,432,432,432,433,433,433,433,433,433,433,433,434,434, +435,435,435,435,435,435,435,435,435,435,435,435,435,435,435,435, +435,435,435,435,435,435,435,436,436,436,436,436,436,436,436,436, +436,436,437,437, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,438, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247, 89, 89, 89, /* block 108 */ -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +439,439,439,440,441,441,441,441,441,441,441,441,441,441,441,441, +441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441, +441,441,441,441,441,441,441,441,441,441,441,441,441,441,441,441, +441,441,441,439,440,440,439,439,439,439,440,440,439,440,440,440, +440,442,442,442,442,442,442,442,442,442,442,442,442,442, 89,443, +444,444,444,444,444,444,444,444,444,444, 89, 89, 89, 89,442,442, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 109 */ -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, -419,419,419,419,419,419,419,419,419,419,419,419,419,419,419,419, +445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445, +445,445,445,445,445,445,445,445,445,445,445,445,445,445,445,445, +445,445,445,445,445,445,445,445,445,446,446,446,446,446,446,447, +447,446,446,447,447,446,446, 89, 89, 89, 89, 89, 89, 89, 89, 89, +445,445,445,446,445,445,445,445,445,445,445,445,446,447, 89, 89, +448,448,448,448,448,448,448,448,448,448, 89, 89,449,449,449,449, +238,238,238,238,238,238,238,238,238,238,238,238,238,238,238,238, +450,238,238,238,238,238,238,243,243,243,238,239, 89, 89, 89, 89, /* block 110 */ -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, +451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451, +451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451, +451,451,451,451,451,451,451,451,451,451,451,451,451,451,451,451, +452,451,452,452,452,451,451,452,452,451,451,451,451,451,452,452, +451,452,451, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89,451,451,453,454,454, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 111 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384, 87, 87, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384, 87, 87, 87, 87, 87, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455, +455,455,455,455,455,455,455,455,455,455,455,455,455,455,455,455, +455,455,455,456,456,457,456,456,457,456,456,458,456,457, 89, 89, +459,459,459,459,459,459,459,459,459,459, 89, 89, 89, 89, 89, 89, /* block 112 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247, 89, 89, 89, 89,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247, 89, 89, 89, 89, /* block 113 */ - 14, 14, 14, 14, 14, 14, 14, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87,134,134,134,134,134, 87, 87, 87, 87, 87,139,136,139, -139,139,139,139,139,139,139,139,139,421,139,139,139,139,139,139, -139,139,139,139,139,139,139, 87,139,139,139,139,139, 87,139, 87, -139,139, 87,139,139, 87,139,139,139,139,139,139,139,139,139,139, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, +460,460,460,460,460,460,460,460,460,460,460,460,460,460,460,460, /* block 114 */ -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, /* block 115 */ -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401, 89, 89, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401, 89, 89, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, /* block 116 */ -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145, 4, 5, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 117 */ -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, - 87, 87,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -145,145,145,145,145,145,145,145,145,145,145,145,142, 13, 87, 87, + 14, 14, 14, 14, 14, 14, 14, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89,136,136,136,136,136, 89, 89, 89, 89, 89,141,138,141, +141,141,141,141,141,141,141,141,141,462,141,141,141,141,141,141, +141,141,141,141,141,141,141, 89,141,141,141,141,141, 89,141, 89, +141,141, 89,141,141, 89,141,141,141,141,141,141,141,141,141,141, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* block 118 */ - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 2, 2, 2, 2, 2, 2, 2, 4, 5, 2, 87, 87, 87, 87, 87, 87, - 82, 82, 82, 82, 82, 82, 82, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 2, 7, 7, 11, 11, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, - 5, 4, 5, 4, 5, 2, 2, 4, 5, 2, 2, 2, 2, 11, 11, 11, - 2, 2, 2, 87, 2, 2, 2, 2, 7, 4, 5, 4, 5, 4, 5, 2, - 2, 2, 6, 7, 6, 6, 6, 87, 2, 3, 2, 2, 87, 87, 87, 87, -145,145,145,145,145, 87,145,145,145,145,145,145,145,145,145,145, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* block 119 */ -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145,145,145,145, -145,145,145,145,145,145,145,145,145,145,145,145,145, 87, 87, 16, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* block 120 */ - 87, 2, 2, 2, 3, 2, 2, 2, 4, 5, 2, 6, 2, 7, 2, 2, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 6, 6, 6, 2, - 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, - 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 2, 5, 10, 11, - 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, - 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 6, 5, 6, 4, - 5, 2, 4, 5, 2, 2,379,379,379,379,379,379,379,379,379,379, - 81,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147, 4, 5, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, /* block 121 */ -379,379,379,379,379,379,379,379,379,379,379,379,379,379,379,379, -379,379,379,379,379,379,379,379,379,379,379,379,379,379, 81, 81, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, -241,241,241,241,241,241,241,241,241,241,241,241,241,241,241, 87, - 87, 87,241,241,241,241,241,241, 87, 87,241,241,241,241,241,241, - 87, 87,241,241,241,241,241,241, 87, 87,241,241,241, 87, 87, 87, - 3, 3, 6, 10, 13, 3, 3, 87, 13, 6, 6, 6, 6, 13, 13, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 16, 16, 16, 13, 13, 87, 87, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, + 89, 89,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +147,147,147,147,147,147,147,147,147,147,147,147,144, 13, 89, 89, /* block 122 */ -422,422,422,422,422,422,422,422,422,422,422,422, 87,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422, 87,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422, 87,422,422, 87,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422, 87, 87, -422,422,422,422,422,422,422,422,422,422,422,422,422,422, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 2, 2, 2, 2, 2, 2, 2, 4, 5, 2, 89, 89, 89, 89, 89, 89, + 84, 84, 84, 84, 84, 84, 84, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 2, 7, 7, 11, 11, 4, 5, 4, 5, 4, 5, 4, 5, 4, 5, 4, + 5, 4, 5, 4, 5, 2, 2, 4, 5, 2, 2, 2, 2, 11, 11, 11, + 2, 2, 2, 89, 2, 2, 2, 2, 7, 4, 5, 4, 5, 4, 5, 2, + 2, 2, 6, 7, 6, 6, 6, 89, 2, 3, 2, 2, 89, 89, 89, 89, +147,147,147,147,147, 89,147,147,147,147,147,147,147,147,147,147, /* block 123 */ -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422,422,422,422,422,422, -422,422,422,422,422,422,422,422,422,422,422, 87, 87, 87, 87, 87, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147,147,147,147, +147,147,147,147,147,147,147,147,147,147,147,147,147, 89, 89, 16, /* block 124 */ - 2, 2, 13, 87, 87, 87, 87, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 17, 17, 87, 87, 87, 13, 13, 13, 13, 13, 13, 13, 13, 13, -423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, -423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, -423,423,423,423,423,423,423,423,423,423,423,423,423,423,423,423, -423,423,423,423,423,424,424,424,424,425,425,425,425,425,425,425, + 89, 2, 2, 2, 3, 2, 2, 2, 4, 5, 2, 6, 2, 7, 2, 2, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 2, 2, 6, 6, 6, 2, + 2, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, + 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 4, 2, 5, 10, 11, + 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, + 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 4, 6, 5, 6, 4, + 5, 2, 4, 5, 2, 2,396,396,396,396,396,396,396,396,396,396, + 83,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, /* block 125 */ -425,425,425,425,425,425,425,425,425,425,424, 87, 87, 87, 87, 87, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 82, 87, 87, +396,396,396,396,396,396,396,396,396,396,396,396,396,396,396,396, +396,396,396,396,396,396,396,396,396,396,396,396,396,396, 83, 83, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, +247,247,247,247,247,247,247,247,247,247,247,247,247,247,247, 89, + 89, 89,247,247,247,247,247,247, 89, 89,247,247,247,247,247,247, + 89, 89,247,247,247,247,247,247, 89, 89,247,247,247, 89, 89, 89, + 3, 3, 6, 10, 13, 3, 3, 89, 13, 6, 6, 6, 6, 13, 13, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 16, 16, 16, 13, 13, 89, 89, /* block 126 */ -426,426,426,426,426,426,426,426,426,426,426,426,426,426,426,426, -426,426,426,426,426,426,426,426,426,426,426,426,426, 87, 87, 87, -427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, -427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, -427,427,427,427,427,427,427,427,427,427,427,427,427,427,427,427, -427, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +463,463,463,463,463,463,463,463,463,463,463,463, 89,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463, 89,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463, 89,463,463, 89,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463, 89, 89, +463,463,463,463,463,463,463,463,463,463,463,463,463,463, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 127 */ -428,428,428,428,428,428,428,428,428,428,428,428,428,428,428,428, -428,428,428,428,428,428,428,428,428,428,428,428,428,428,428, 87, -429,429,429,429, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -430,430,430,430,430,430,430,430,430,430,430,430,430,430,430,430, -430,431,430,430,430,430,430,430,430,430,431, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463,463,463,463,463,463, +463,463,463,463,463,463,463,463,463,463,463, 89, 89, 89, 89, 89, /* block 128 */ -432,432,432,432,432,432,432,432,432,432,432,432,432,432,432,432, -432,432,432,432,432,432,432,432,432,432,432,432,432,432, 87,433, -434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434, -434,434,434,434,434,434,434,434,434,434,434,434,434,434,434,434, -434,434,434,434, 87, 87, 87, 87,434,434,434,434,434,434,434,434, -435,436,436,436,436,436, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 2, 2, 13, 89, 89, 89, 89, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 17, 17, 89, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, +464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464, +464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464, +464,464,464,464,464,464,464,464,464,464,464,464,464,464,464,464, +464,464,464,464,464,465,465,465,465,466,466,466,466,466,466,466, /* block 129 */ -437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437, -437,437,437,437,437,437,437,437,437,437,437,437,437,437,437,437, -437,437,437,437,437,437,437,437,438,438,438,438,438,438,438,438, -438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, -438,438,438,438,438,438,438,438,438,438,438,438,438,438,438,438, -439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, -439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, -439,439,439,439,439,439,439,439,439,439,439,439,439,439,439,439, +466,466,466,466,466,466,466,466,466,466,465, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 84, 89, 89, /* block 130 */ -440,440,440,440,440,440,440,440,440,440,440,440,440,440,440,440, -440,440,440,440,440,440,440,440,440,440,440,440,440,440, 87, 87, -441,441,441,441,441,441,441,441,441,441, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +467,467,467,467,467,467,467,467,467,467,467,467,467,467,467,467, +467,467,467,467,467,467,467,467,467,467,467,467,467, 89, 89, 89, +468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468, +468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468, +468,468,468,468,468,468,468,468,468,468,468,468,468,468,468,468, +468, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 131 */ -442,442,442,442,442,442, 87, 87,442, 87,442,442,442,442,442,442, -442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442, -442,442,442,442,442,442,442,442,442,442,442,442,442,442,442,442, -442,442,442,442,442,442, 87,442,442, 87, 87, 87,442, 87, 87,442, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +469,469,469,469,469,469,469,469,469,469,469,469,469,469,469,469, +469,469,469,469,469,469,469,469,469,469,469,469,469,469,469, 89, +470,470,470,470, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +471,471,471,471,471,471,471,471,471,471,471,471,471,471,471,471, +471,472,471,471,471,471,471,471,471,471,472, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 132 */ -443,443,443,443,443,443,443,443,443,443,443,443,443,443,443,443, -443,443,443,443,443,443,444,444,444,444, 87, 87, 87, 87, 87,445, -446,446,446,446,446,446,446,446,446,446,446,446,446,446,446,446, -446,446,446,446,446,446,446,446,446,446, 87, 87, 87, 87, 87,447, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +473,473,473,473,473,473,473,473,473,473,473,473,473,473,473,473, +473,473,473,473,473,473,473,473,473,473,473,473,473,473, 89,474, +475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475, +475,475,475,475,475,475,475,475,475,475,475,475,475,475,475,475, +475,475,475,475, 89, 89, 89, 89,475,475,475,475,475,475,475,475, +476,477,477,477,477,477, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 133 */ -448,449,449,449, 87,449,449, 87, 87, 87, 87, 87,449,449,449,449, -448,448,448,448, 87,448,448,448, 87,448,448,448,448,448,448,448, -448,448,448,448,448,448,448,448,448,448,448,448,448,448,448,448, -448,448,448,448, 87, 87, 87, 87,449,449,449, 87, 87, 87, 87,449, -450,450,450,450,450,450,450,450, 87, 87, 87, 87, 87, 87, 87, 87, -451,451,451,451,451,451,451,451,451, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,478,478,478,478,478,478,478,478, +478,478,478,478,478,478,478,478,479,479,479,479,479,479,479,479, +479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479, +479,479,479,479,479,479,479,479,479,479,479,479,479,479,479,479, +480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, +480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, +480,480,480,480,480,480,480,480,480,480,480,480,480,480,480,480, /* block 134 */ -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, +481,481,481,481,481,481,481,481,481,481,481,481,481,481,481,481, +481,481,481,481,481,481,481,481,481,481,481,481,481,481, 89, 89, +482,482,482,482,482,482,482,482,482,482, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 135 */ -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, -452,452,452,452,452,452,452,452,452,452,452,452,452,452,452, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +483,483,483,483,483,483, 89, 89,483, 89,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483,483,483,483,483,483,483,483,483,483,483, +483,483,483,483,483,483, 89,483,483, 89, 89, 89,483, 89, 89,483, +484,484,484,484,484,484,484,484,484,484,484,484,484,484,484,484, +484,484,484,484,484,484, 89,485,486,486,486,486,486,486,486,486, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 136 */ -453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, -453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, -453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, -453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, -453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, -453,453,453,453,453,453,453,453,453,453,453,453,453,453,453,453, -453,453,453, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, -454,454,454,454, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +487,487,487,487,487,487,487,487,487,487,487,487,487,487,487,487, +487,487,487,487,487,487,488,488,488,488,488,488, 89, 89, 89,489, +490,490,490,490,490,490,490,490,490,490,490,490,490,490,490,490, +490,490,490,490,490,490,490,490,490,490, 89, 89, 89, 89, 89,491, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 137 */ - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +492,493,493,493, 89,493,493, 89, 89, 89, 89, 89,493,493,493,493, +492,492,492,492, 89,492,492,492, 89,492,492,492,492,492,492,492, +492,492,492,492,492,492,492,492,492,492,492,492,492,492,492,492, +492,492,492,492, 89, 89, 89, 89,493,493,493, 89, 89, 89, 89,493, +494,494,494,494,494,494,494,494, 89, 89, 89, 89, 89, 89, 89, 89, +495,495,495,495,495,495,495,495,495, 89, 89, 89, 89, 89, 89, 89, +496,496,496,496,496,496,496,496,496,496,496,496,496,496,496,496, +496,496,496,496,496,496,496,496,496,496,496,496,496,497,497,498, /* block 138 */ - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 87, 87, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13,455,455, 82, 82, 82, 13, 13, 13,455,455,455, -455,455,455, 16, 16, 16, 16, 16, 16, 16, 16, 82, 82, 82, 82, 82, +499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499, +499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499, +499,499,499,499,499,499,499,499,499,499,499,499,499,499,499,499, +499,499,499,499,499,499, 89, 89, 89,500,500,500,500,500,500,500, +501,501,501,501,501,501,501,501,501,501,501,501,501,501,501,501, +501,501,501,501,501,501, 89, 89,502,502,502,502,502,502,502,502, +503,503,503,503,503,503,503,503,503,503,503,503,503,503,503,503, +503,503,503, 89, 89, 89, 89, 89,504,504,504,504,504,504,504,504, /* block 139 */ - 82, 82, 82, 13, 13, 82, 82, 82, 82, 82, 82, 82, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 82, 82, 82, 82, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +505,505,505,505,505,505,505,505,505,505,505,505,505,505,505,505, +505,505,505,505,505,505,505,505,505, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 140 */ -425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, -425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, -425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, -425,425,425,425,425,425,425,425,425,425,425,425,425,425,425,425, -425,425,456,456,456,425, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +506,506,506,506,506,506,506,506,506,506,506,506,506,506,506,506, +506,506,506,506,506,506,506,506,506,506,506,506,506,506,506, 89, /* block 141 */ - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, - 17, 17, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +507,507,508,509,509,509,509,509,509,509,509,509,509,509,509,509, +509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509, +509,509,509,509,509,509,509,509,509,509,509,509,509,509,509,509, +508,508,508,507,507,507,507,508,508,507,507,510,510,511,510,510, +510,510, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 142 */ -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,344,344, -344,344,344,344,344, 87,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, /* block 143 */ -343,343,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,343, 87,343,343, - 87, 87,343, 87, 87,343,343, 87, 87,343,343,343,343, 87,343,343, -343,343,343,343,343,343,344,344,344,344, 87,344, 87,344,344,344, -344,344,344,344, 87,344,344,344,344,344,344,344,344,344,344,344, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, +512,512,512,512,512,512,512,512,512,512,512,512,512,512,512, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 144 */ -344,344,344,344,343,343, 87,343,343,343,343, 87, 87,343,343,343, -343,343,343,343,343, 87,343,343,343,343,343,343,343, 87,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,343,343, 87,343,343,343,343, 87, -343,343,343,343,343, 87,343, 87, 87, 87,343,343,343,343,343,343, -343, 87,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513,513,513,513,513,513,513,513,513,513,513,513,513,513, +513,513,513, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, +514,514,514,514, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 145 */ -343,343,343,343,343,343,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, /* block 146 */ -344,344,344,344,344,344,344,344,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, +515,515,515,515,515,515,515,515,515,515,515,515,515,515,515, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 147 */ -343,343,343,343,343,343,343,343,343,343,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344, 87, 87,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343, 6,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344, 6,344,344,344,344, -344,344,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343, 6,344,344,344,344, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 148 */ -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344, 6,344,344,344,344,344,344,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343, 6,344,344,344,344,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, 6, -344,344,344,344,344,344,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, 6, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, - -/* block 149 */ -344,344,344,344,344,344,344,344,344, 6,344,344,344,344,344,344, -343,343,343,343,343,343,343,343,343,343,343,343,343,343,343,343, -343,343,343,343,343,343,343,343,343, 6,344,344,344,344,344,344, -344,344,344,344,344,344,344,344,344,344,344,344,344,344,344,344, -344,344,344, 6,344,344,344,344,344,344,343,344, 87, 87, 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, 8, 8, 8, 8, 8, 8, 8, 8, - 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, - -/* block 150 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 89, 89, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13,328,328, 84, 84, 84, 13, 13, 13,328,328,328, +328,328,328, 16, 16, 16, 16, 16, 16, 16, 16, 84, 84, 84, 84, 84, + +/* block 149 */ + 84, 84, 84, 13, 13, 84, 84, 84, 84, 84, 84, 84, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 84, 84, 84, 84, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 150 */ +466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466, +466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466, +466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466, +466,466,466,466,466,466,466,466,466,466,466,466,466,466,466,466, +466,466,516,516,516,466, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 151 */ 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, - 13, 13, 13, 13, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, + 17, 17, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, /* block 152 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,359,359, +359,359,359,359,359, 89,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, /* block 153 */ -384,384,384,384,384,384,384,384,384,384,384,384,384,384,384,384, -384,384,384,384,384,384,384,384,384,384,384,384,384,384, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +358,358,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,358, 89,358,358, + 89, 89,358, 89, 89,358,358, 89, 89,358,358,358,358, 89,358,358, +358,358,358,358,358,358,359,359,359,359, 89,359, 89,359,359,359, +359,359,359,359, 89,359,359,359,359,359,359,359,359,359,359,359, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, /* block 154 */ - 87, 16, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, +359,359,359,359,358,358, 89,358,358,358,358, 89, 89,358,358,358, +358,358,358,358,358, 89,358,358,358,358,358,358,358, 89,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,358,358, 89,358,358,358,358, 89, +358,358,358,358,358, 89,358, 89, 89, 89,358,358,358,358,358,358, +358, 89,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, + +/* block 155 */ +358,358,358,358,358,358,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, + +/* block 156 */ +359,359,359,359,359,359,359,359,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, + +/* block 157 */ +358,358,358,358,358,358,358,358,358,358,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359, 89, 89,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358, 6,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359, 6,359,359,359,359, +359,359,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358, 6,359,359,359,359, + +/* block 158 */ +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359, 6,359,359,359,359,359,359,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358, 6,359,359,359,359,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, 6, +359,359,359,359,359,359,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, 6, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, + +/* block 159 */ +359,359,359,359,359,359,359,359,359, 6,359,359,359,359,359,359, +358,358,358,358,358,358,358,358,358,358,358,358,358,358,358,358, +358,358,358,358,358,358,358,358,358, 6,359,359,359,359,359,359, +359,359,359,359,359,359,359,359,359,359,359,359,359,359,359,359, +359,359,359, 6,359,359,359,359,359,359,358,359, 89, 89, 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, 8, 8, 8, 8, 8, 8, 8, 8, + 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, + +/* block 160 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + +/* block 161 */ + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 162 */ + 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, + 89, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 89, 13, + 89, 89, 13, 89, 89, 89, 13, 89, 89, 89, 13, 13, 13, 13, 13, 89, + 89, 89, 89, 89, 89, 89, 89, 13, 89, 89, 89, 89, 89, 89, 89, 13, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 89, 13, 13, 89, 89, 13, + +/* block 163 */ + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 13, 13, 13, 13, 89, 89, + 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 164 */ +517, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, + 13, 13, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 13, 13, 13, 13, 13, 13, 13, 13, 13, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 165 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 166 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 167 */ +401,401,401,401,401,401,401,401,401,401,401,401,401,401,401,401, +401,401,401,401,401,401,401,401,401,401,401,401,401,401, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 168 */ + 89, 16, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, @@ -2588,35 +2789,35 @@ const pcre_uint16 _pcre_ucd_stage2[] = { /* 40448 bytes, block = 128 */ 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, -/* block 155 */ - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - -/* block 156 */ - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, 87, - -/* block 157 */ -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420,420,420, -420,420,420,420,420,420,420,420,420,420,420,420,420,420, 87, 87, +/* block 169 */ + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + +/* block 170 */ + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, 84, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + +/* block 171 */ +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461,461,461, +461,461,461,461,461,461,461,461,461,461,461,461,461,461, 89, 89, }; diff --git a/ext/pcre/pcrelib/pcredemo.c b/ext/pcre/pcrelib/pcredemo.c index c6ba56ed5..d565aecdd 100644 --- a/ext/pcre/pcrelib/pcredemo.c +++ b/ext/pcre/pcrelib/pcredemo.c @@ -7,14 +7,24 @@ of calling the PCRE regular expression library from a C program. See the pcresample documentation for a short discussion ("man pcresample" if you have the PCRE man pages installed). -In Unix-like environments, compile this program thuswise: +In Unix-like environments, if PCRE is installed in your standard system +libraries, you should be able to compile this program using this command: - gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \ - -R/usr/local/lib -lpcre +gcc -Wall pcredemo.c -lpcre -o pcredemo + +If PCRE is not installed in a standard place, it is likely to be installed with +support for the pkg-config mechanism. If you have pkg-config, you can compile +this program using this command: + +gcc -Wall pcredemo.c `pkg-config --cflags --libs libpcre` -o pcredemo + +If you do not have pkg-config, you may have to use this: + +gcc -Wall pcredemo.c -I/usr/local/include -L/usr/local/lib \ + -R/usr/local/lib -lpcre -o pcredemo Replace "/usr/local/include" and "/usr/local/lib" with wherever the include and -library files for PCRE are installed on your system. You don't need -I and -L -if PCRE is installed in the standard system libraries. Only some operating +library files for PCRE are installed on your system. Only some operating systems (e.g. Solaris) use the -R option. Building under Windows: diff --git a/ext/pcre/pcrelib/pcreposix.c b/ext/pcre/pcrelib/pcreposix.c index 1cc063d3e..bae205416 100644 --- a/ext/pcre/pcrelib/pcreposix.c +++ b/ext/pcre/pcrelib/pcreposix.c @@ -342,6 +342,8 @@ rc = pcre_exec((const pcre *)preg->re_pcre, NULL, string + so, (eo - so), if (rc == 0) rc = nmatch; /* All captured slots were filled in */ +/* Successful match */ + if (rc >= 0) { size_t i; @@ -358,22 +360,33 @@ if (rc >= 0) return 0; } -else +/* Unsuccessful match */ + +if (allocated_ovector) free(ovector); +switch(rc) { - if (allocated_ovector) free(ovector); - switch(rc) - { - case PCRE_ERROR_NOMATCH: return REG_NOMATCH; - case PCRE_ERROR_NULL: return REG_INVARG; - case PCRE_ERROR_BADOPTION: return REG_INVARG; - case PCRE_ERROR_BADMAGIC: return REG_INVARG; - case PCRE_ERROR_UNKNOWN_NODE: return REG_ASSERT; - case PCRE_ERROR_NOMEMORY: return REG_ESPACE; - case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE; - case PCRE_ERROR_BADUTF8: return REG_INVARG; - case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG; - default: return REG_ASSERT; - } +/* ========================================================================== */ + /* These cases are never obeyed. This is a fudge that causes a compile-time + error if the vector eint, which is indexed by compile-time error number, is + not the correct length. It seems to be the only way to do such a check at + compile time, as the sizeof() operator does not work in the C preprocessor. + As all the PCRE_ERROR_xxx values are negative, we can use 0 and 1. */ + + case 0: + case (sizeof(eint)/sizeof(int) == ERRCOUNT): + return REG_ASSERT; +/* ========================================================================== */ + + case PCRE_ERROR_NOMATCH: return REG_NOMATCH; + case PCRE_ERROR_NULL: return REG_INVARG; + case PCRE_ERROR_BADOPTION: return REG_INVARG; + case PCRE_ERROR_BADMAGIC: return REG_INVARG; + case PCRE_ERROR_UNKNOWN_NODE: return REG_ASSERT; + case PCRE_ERROR_NOMEMORY: return REG_ESPACE; + case PCRE_ERROR_MATCHLIMIT: return REG_ESPACE; + case PCRE_ERROR_BADUTF8: return REG_INVARG; + case PCRE_ERROR_BADUTF8_OFFSET: return REG_INVARG; + default: return REG_ASSERT; } } diff --git a/ext/pcre/pcrelib/testdata/testinput1 b/ext/pcre/pcrelib/testdata/testinput1 index 6cacbb512..d999d2948 100644 --- a/ext/pcre/pcrelib/testdata/testinput1 +++ b/ext/pcre/pcrelib/testdata/testinput1 @@ -2332,15 +2332,14 @@ baz foobarbaz -/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/ -/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/ -/where it does set $1 to aa when matching aaaaaa./ +/The cases of aaaa and aaaaaa are missed out below because Perl does things/ +/differently. We know that odd, and maybe incorrect, things happen with/ +/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./ /^(a\1?){4}$/ a aa aaa - aaaa aaaaa aaaaaaa aaaaaaaa @@ -4067,4 +4066,11 @@ /^%((?(?=[a])[^%])|b)*%$/ %ab% +/(?i)a(?-i)b|c/ + XabX + XAbX + CcC + ** Failers + XABX + /-- End of testinput1 --/ diff --git a/ext/pcre/pcrelib/testdata/testinput2 b/ext/pcre/pcrelib/testdata/testinput2 index 3319bb732..94a18c9a4 100644 --- a/ext/pcre/pcrelib/testdata/testinput2 +++ b/ext/pcre/pcrelib/testdata/testinput2 @@ -344,10 +344,25 @@ *** Failers a -/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I +/This one is here because Perl behaves differently; see also the following/I /^(a\1?){4}$/I + aaaa aaaaaa + +/Perl does not fail these two for the final subjects. Neither did PCRE until/ +/release 8.01. The problem is in backtracking into a subpattern that contains/ +/a recursive reference to itself. PCRE has now made these into atomic patterns./ + +/^(xa|=?\1a){2}$/ + xa=xaa + ** Failers + xa=xaaa + +/^(xa|=?\1a)+$/ + xa=xaa + ** Failers + xa=xaaa /These are syntax tests from Perl 5.005/I @@ -3169,4 +3184,52 @@ a random value. /Ix /(\3)(\1)(a)/SI cat +/i(?(DEFINE)(?<s>a))/SI + i + +/()i(?(1)a)/SI + ia + +/(?i)a(?-i)b|c/BZ + XabX + XAbX + CcC + ** Failers + XABX + +/(?i)a(?s)b|c/BZ + +/(?i)a(?s-i)b|c/BZ + +/^(ab(c\1)d|x){2}$/BZ + xabcxd + +/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ + +/^(?&t)*(?(DEFINE)(?<t>.))$/BZ + +/ -- The first four of these are not in the Perl 5.10 test because Perl + documents that the use of \K in assertions is "not well defined". The + last is here because Perl gives the match as "b" rather than "ab". I + believe this to be a Perl bug. --/ + +/(?=a\Kb)ab/ + ab + +/(?!a\Kb)ac/ + ac + +/^abc(?<=b\Kc)d/ + abcd + +/^abc(?<!b\Kq)d/ + abcd + +/(?>a\Kb)z|(ab)/ + ab + +/----------------------/ + +/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ + /-- End of testinput2 --/ diff --git a/ext/pcre/pcrelib/testdata/testinput5 b/ext/pcre/pcrelib/testdata/testinput5 index 82818d7dc..68795e609 100644 --- a/ext/pcre/pcrelib/testdata/testinput5 +++ b/ext/pcre/pcrelib/testdata/testinput5 @@ -742,4 +742,7 @@ can't tell the difference.) --/ xxxxabcde\P xxxxabcde\P\P +/X\W{3}X/8 + \PX + /-- End of testinput5 --/ diff --git a/ext/pcre/pcrelib/testdata/testinput6 b/ext/pcre/pcrelib/testdata/testinput6 index f4249da81..759018a3a 100644 --- a/ext/pcre/pcrelib/testdata/testinput6 +++ b/ext/pcre/pcrelib/testdata/testinput6 @@ -370,13 +370,6 @@ \x{3b1} \x{ff5a} -/^\X/8 - A - A\x{300}BC - A\x{300}\x{301}\x{302}BC - *** Failers - \x{300} - /^[\X]/8 X123 *** Failers @@ -756,4 +749,7 @@ /[\p{Lu}\x20]+/ \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59 +/\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/8 + \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0} + /-- End of testinput6 --/ diff --git a/ext/pcre/pcrelib/testdata/testinput7 b/ext/pcre/pcrelib/testdata/testinput7 index 710d9ee9b..5d2731192 100644 --- a/ext/pcre/pcrelib/testdata/testinput7 +++ b/ext/pcre/pcrelib/testdata/testinput7 @@ -4542,4 +4542,22 @@ CAD BAD +/^(?!a(*SKIP)b)/ + ac + +/^(?=a(*SKIP)b|ac)/ + ** Failers + ac + +/^(?=a(*THEN)b|ac)/ + ac + +/^(?=a(*PRUNE)b)/ + ab + ** Failers + ac + +/^(?(?!a(*SKIP)b))/ + ac + /-- End of testinput7 --/ diff --git a/ext/pcre/pcrelib/testdata/testoutput1 b/ext/pcre/pcrelib/testdata/testoutput1 index a2a6dd4e2..2fd033cc3 100644 --- a/ext/pcre/pcrelib/testdata/testoutput1 +++ b/ext/pcre/pcrelib/testdata/testoutput1 @@ -3752,10 +3752,10 @@ No match foobarbaz No match -/The case of aaaaaa is missed out below because I think Perl 5.005_02 gets/ -/it wrong; it sets $1 to aaa rather than aa. Compare the following test,/ +/The cases of aaaa and aaaaaa are missed out below because Perl does things/ +/differently. We know that odd, and maybe incorrect, things happen with/ No match -/where it does set $1 to aa when matching aaaaaa./ +/recursive references in Perl, as far as 5.11.3 - see some stuff in test #2./ No match /^(a\1?){4}$/ @@ -3765,9 +3765,6 @@ No match No match aaa No match - aaaa - 0: aaaa - 1: a aaaaa 0: aaaaa 1: a @@ -6649,4 +6646,16 @@ No match 0: %ab% 1: +/(?i)a(?-i)b|c/ + XabX + 0: ab + XAbX + 0: Ab + CcC + 0: c + ** Failers +No match + XABX +No match + /-- End of testinput1 --/ diff --git a/ext/pcre/pcrelib/testdata/testoutput2 b/ext/pcre/pcrelib/testdata/testoutput2 index 30ea63b9c..c29bd5fd3 100644 --- a/ext/pcre/pcrelib/testdata/testoutput2 +++ b/ext/pcre/pcrelib/testdata/testoutput2 @@ -857,7 +857,7 @@ No match a No match -/This one is here because I think Perl 5.005_02 gets the setting of $1 wrong/I +/This one is here because Perl behaves differently; see also the following/I Capturing subpattern count = 0 No options First char = 'T' @@ -869,9 +869,34 @@ Max back reference = 1 Options: anchored No first char No need char + aaaa +No match aaaaaa - 0: aaaaaa - 1: aa +No match + +/Perl does not fail these two for the final subjects. Neither did PCRE until/ +/release 8.01. The problem is in backtracking into a subpattern that contains/ +No match +/a recursive reference to itself. PCRE has now made these into atomic patterns./ +No match + +/^(xa|=?\1a){2}$/ + xa=xaa + 0: xa=xaa + 1: =xaa + ** Failers +No match + xa=xaaa +No match + +/^(xa|=?\1a)+$/ + xa=xaa + 0: xa=xaa + 1: =xaa + ** Failers +No match + xa=xaaa +No match /These are syntax tests from Perl 5.005/I Capturing subpattern count = 0 @@ -10463,4 +10488,184 @@ No set of starting bytes cat No match +/i(?(DEFINE)(?<s>a))/SI +Capturing subpattern count = 1 +Named capturing subpatterns: + s 1 +No options +First char = 'i' +No need char +Subject length lower bound = 1 +No set of starting bytes + i + 0: i + +/()i(?(1)a)/SI +Capturing subpattern count = 1 +No options +No first char +Need char = 'i' +Subject length lower bound = 1 +Starting byte set: i + ia + 0: ia + 1: + +/(?i)a(?-i)b|c/BZ +------------------------------------------------------------------ + Bra + NC a + 00 Opt + b + Alt + 00 Opt + c + Ket + End +------------------------------------------------------------------ + XabX + 0: ab + XAbX + 0: Ab + CcC + 0: c + ** Failers +No match + XABX +No match + +/(?i)a(?s)b|c/BZ +------------------------------------------------------------------ + Bra + NC a + 05 Opt + NC b + Alt + 05 Opt + NC c + Ket + End +------------------------------------------------------------------ + +/(?i)a(?s-i)b|c/BZ +------------------------------------------------------------------ + Bra + NC a + 04 Opt + b + Alt + 04 Opt + c + Ket + End +------------------------------------------------------------------ + +/^(ab(c\1)d|x){2}$/BZ +------------------------------------------------------------------ + Bra + ^ + Once + CBra 1 + ab + CBra 2 + c + \1 + Ket + d + Alt + x + Ket + Ket + Once + CBra 1 + ab + CBra 2 + c + \1 + Ket + d + Alt + x + Ket + Ket + $ + Ket + End +------------------------------------------------------------------ + xabcxd + 0: xabcxd + 1: abcxd + 2: cx + +/^(?&t)*+(?(DEFINE)(?<t>.))$/BZ +------------------------------------------------------------------ + Bra + ^ + Once + Brazero + Once + Recurse + KetRmax + Ket + Cond + Cond def + CBra 1 + Any + Ket + Ket + $ + Ket + End +------------------------------------------------------------------ + +/^(?&t)*(?(DEFINE)(?<t>.))$/BZ +------------------------------------------------------------------ + Bra + ^ + Brazero + Once + Recurse + KetRmax + Cond + Cond def + CBra 1 + Any + Ket + Ket + $ + Ket + End +------------------------------------------------------------------ + +/ -- The first four of these are not in the Perl 5.10 test because Perl + documents that the use of \K in assertions is "not well defined". The + last is here because Perl gives the match as "b" rather than "ab". I + believe this to be a Perl bug. --/ + +/(?=a\Kb)ab/ + ab + 0: b + +/(?!a\Kb)ac/ + ac + 0: ac + +/^abc(?<=b\Kc)d/ + abcd + 0: cd + +/^abc(?<!b\Kq)d/ + abcd + 0: abcd + +/(?>a\Kb)z|(ab)/ + ab + 0: ab + 1: ab + +/----------------------/ + +/(?P<L1>(?P<L2>0|)|(?P>L2)(?P>L1))/ +Failed: recursive call could loop indefinitely at offset 31 + /-- End of testinput2 --/ diff --git a/ext/pcre/pcrelib/testdata/testoutput5 b/ext/pcre/pcrelib/testdata/testoutput5 index f5de747ba..9d815ffa8 100644 --- a/ext/pcre/pcrelib/testdata/testoutput5 +++ b/ext/pcre/pcrelib/testdata/testoutput5 @@ -2072,4 +2072,8 @@ Partial match: abca xxxxabcde\P\P Partial match: abcde +/X\W{3}X/8 + \PX +Partial match: X + /-- End of testinput5 --/ diff --git a/ext/pcre/pcrelib/testdata/testoutput6 b/ext/pcre/pcrelib/testdata/testoutput6 index 4245d6a37..b4176eb57 100644 --- a/ext/pcre/pcrelib/testdata/testoutput6 +++ b/ext/pcre/pcrelib/testdata/testoutput6 @@ -618,18 +618,6 @@ No match \x{ff5a} 0: \x{ff5a} -/^\X/8 - A - 0: A - A\x{300}BC - 0: A\x{300} - A\x{300}\x{301}\x{302}BC - 0: A\x{300}\x{301}\x{302} - *** Failers - 0: * - \x{300} -No match - /^[\X]/8 X123 0: X @@ -1293,4 +1281,8 @@ No match \x41\x20\x50\xC2\x54\xC9\x20\x54\x4F\x44\x41\x59 0: A P\xc2T\xc9 TODAY +/\p{Avestan}\p{Bamum}\p{Egyptian_Hieroglyphs}\p{Imperial_Aramaic}\p{Inscriptional_Pahlavi}\p{Inscriptional_Parthian}\p{Javanese}\p{Kaithi}\p{Lisu}\p{Meetei_Mayek}\p{Old_South_Arabian}\p{Old_Turkic}\p{Samaritan}\p{Tai_Tham}\p{Tai_Viet}/8 + \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{0800}\x{1aad}\x{aac0} + 0: \x{10b00}\x{a6ef}\x{13007}\x{10857}\x{10b78}\x{10b58}\x{a980}\x{110c1}\x{a4ff}\x{abc0}\x{10a7d}\x{10c48}\x{800}\x{1aad}\x{aac0} + /-- End of testinput6 --/ diff --git a/ext/pcre/pcrelib/testdata/testoutput7 b/ext/pcre/pcrelib/testdata/testoutput7 index c6c9df46f..2aab80d74 100644 --- a/ext/pcre/pcrelib/testdata/testoutput7 +++ b/ext/pcre/pcrelib/testdata/testoutput7 @@ -7584,4 +7584,30 @@ No match BAD No match +/^(?!a(*SKIP)b)/ + ac +Error -16 + +/^(?=a(*SKIP)b|ac)/ + ** Failers +No match + ac +Error -16 + +/^(?=a(*THEN)b|ac)/ + ac +Error -16 + +/^(?=a(*PRUNE)b)/ + ab +Error -16 + ** Failers +No match + ac +Error -16 + +/^(?(?!a(*SKIP)b))/ + ac +Error -16 + /-- End of testinput7 --/ diff --git a/ext/pcre/pcrelib/ucp.h b/ext/pcre/pcrelib/ucp.h index ef62e4058..d68737e31 100644 --- a/ext/pcre/pcrelib/ucp.h +++ b/ext/pcre/pcrelib/ucp.h @@ -137,7 +137,23 @@ enum { ucp_Rejang, ucp_Saurashtra, ucp_Sundanese, - ucp_Vai + ucp_Vai, + /* New for Unicode 5.2: */ + ucp_Avestan, + ucp_Bamum, + ucp_Egyptian_Hieroglyphs, + ucp_Imperial_Aramaic, + ucp_Inscriptional_Pahlavi, + ucp_Inscriptional_Parthian, + ucp_Javanese, + ucp_Kaithi, + ucp_Lisu, + ucp_Meetei_Mayek, + ucp_Old_South_Arabian, + ucp_Old_Turkic, + ucp_Samaritan, + ucp_Tai_Tham, + ucp_Tai_Viet }; #endif diff --git a/ext/pdo/pdo_dbh.c b/ext/pdo/pdo_dbh.c index bb1f5bcfe..ac124370b 100755 --- a/ext/pdo/pdo_dbh.c +++ b/ext/pdo/pdo_dbh.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_dbh.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: pdo_dbh.c 300464 2010-06-15 11:13:20Z iliaa $ */ /* The PDO Database Handle Class */ @@ -683,6 +683,21 @@ static PHP_METHOD(PDO, rollBack) } /* }}} */ +/* {{{ proto bool PDO::inTransaction() + determine if inside a transaction */ +static PHP_METHOD(PDO, inTransaction) +{ + pdo_dbh_t *dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + + if (zend_parse_parameters_none() == FAILURE) { + return; + } + PDO_CONSTRUCT_CHECK; + + RETURN_LONG(dbh->in_txn); +} +/* }}} */ + static int pdo_dbh_attribute_set(pdo_dbh_t *dbh, long attr, zval *value TSRMLS_DC) /* {{{ */ { @@ -851,6 +866,7 @@ static PHP_METHOD(PDO, setAttribute) RETURN_FALSE; } + PDO_DBH_CLEAR_ERR(); PDO_CONSTRUCT_CHECK; if (pdo_dbh_attribute_set(dbh, attr, value TSRMLS_CC) != FAILURE) { @@ -1245,6 +1261,7 @@ const zend_function_entry pdo_dbh_functions[] = { PHP_ME(PDO, beginTransaction, arginfo_pdo__void, ZEND_ACC_PUBLIC) PHP_ME(PDO, commit, arginfo_pdo__void, ZEND_ACC_PUBLIC) PHP_ME(PDO, rollBack, arginfo_pdo__void, ZEND_ACC_PUBLIC) + PHP_ME(PDO, inTransaction, arginfo_pdo__void, ZEND_ACC_PUBLIC) PHP_ME(PDO, setAttribute, arginfo_pdo_setattribute, ZEND_ACC_PUBLIC) PHP_ME(PDO, exec, arginfo_pdo_exec, ZEND_ACC_PUBLIC) PHP_ME(PDO, query, NULL, ZEND_ACC_PUBLIC) diff --git a/ext/pdo/pdo_stmt.c b/ext/pdo/pdo_stmt.c index 5e0e9cb78..5c85bff5c 100755 --- a/ext/pdo/pdo_stmt.c +++ b/ext/pdo/pdo_stmt.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_stmt.c 294942 2010-02-12 00:19:10Z johannes $ */ +/* $Id: pdo_stmt.c 300503 2010-06-16 23:13:29Z felipe $ */ /* The PDO Statement Handle Class */ @@ -2080,6 +2080,8 @@ static int pdo_stmt_do_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) } if (!stmt->methods->next_rowset(stmt TSRMLS_CC)) { + /* Set the executed flag to 0 to reallocate columns on next execute */ + stmt->executed = 0; return 0; } @@ -2280,6 +2282,10 @@ static union _zend_function *dbstmt_method_get( if (zend_hash_find(&Z_OBJCE_P(object)->function_table, lc_method_name, method_len+1, (void**)&fbc) == FAILURE) { pdo_stmt_t *stmt = (pdo_stmt_t*)zend_object_store_get_object(object TSRMLS_CC); + /* instance not created by PDO object */ + if (!stmt->dbh) { + goto out; + } /* not a pre-defined method, nor a user-defined method; check * the driver specific methods */ if (!stmt->dbh->cls_methods[PDO_DBH_DRIVER_METHOD_KIND_STMT]) { diff --git a/ext/pdo/php_pdo_driver.h b/ext/pdo/php_pdo_driver.h index 3fcbde71b..de64830e5 100755 --- a/ext/pdo/php_pdo_driver.h +++ b/ext/pdo/php_pdo_driver.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_driver.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_pdo_driver.h 301252 2010-07-13 23:59:54Z kalle $ */ #ifndef PHP_PDO_DRIVER_H #define PHP_PDO_DRIVER_H @@ -188,7 +188,7 @@ enum pdo_case_conversion { enum pdo_null_handling { PDO_NULL_NATURAL = 0, PDO_NULL_EMPTY_STRING = 1, - PDO_NULL_TO_STRING = 2, + PDO_NULL_TO_STRING = 2 }; /* {{{ utils for reading attributes set as driver_options */ @@ -348,7 +348,7 @@ enum pdo_param_event { PDO_PARAM_EVT_EXEC_POST, PDO_PARAM_EVT_FETCH_PRE, PDO_PARAM_EVT_FETCH_POST, - PDO_PARAM_EVT_NORMALIZE, + PDO_PARAM_EVT_NORMALIZE }; typedef int (*pdo_stmt_param_hook_func)(pdo_stmt_t *stmt, struct pdo_bound_param_data *param, enum pdo_param_event event_type TSRMLS_DC); diff --git a/ext/pdo/tests/pdo_037.phpt b/ext/pdo/tests/pdo_037.phpt new file mode 100644 index 000000000..a0ead4b75 --- /dev/null +++ b/ext/pdo/tests/pdo_037.phpt @@ -0,0 +1,19 @@ +--TEST-- +Crash when calling a method of a class that inherits PDOStatement +--SKIPIF-- +<?php +if (!extension_loaded('pdo')) die('skip'); +?> +--FILE-- +<?php + +class MyStatement extends PDOStatement +{ +} + +$obj = new MyStatement; +var_dump($obj->foo()); + +?> +--EXPECTF-- +Fatal error: Call to undefined method MyStatement::foo() in %s on line %d diff --git a/ext/pdo_dblib/dblib_driver.c b/ext/pdo_dblib/dblib_driver.c index 5e9464e71..febe9c01b 100644 --- a/ext/pdo_dblib/dblib_driver.c +++ b/ext/pdo_dblib/dblib_driver.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dblib_driver.c 294444 2010-02-03 19:48:04Z pajoye $ */ +/* $Id: dblib_driver.c 293447 2010-01-12 12:46:54Z iliaa $ */ #ifdef HAVE_CONFIG_H # include "config.h" diff --git a/ext/pdo_dblib/dblib_stmt.c b/ext/pdo_dblib/dblib_stmt.c index 290a25cb8..09f653ac6 100644 --- a/ext/pdo_dblib/dblib_stmt.c +++ b/ext/pdo_dblib/dblib_stmt.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dblib_stmt.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: dblib_stmt.c 295958 2010-03-08 12:39:44Z iliaa $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -166,7 +166,14 @@ static int pdo_dblib_stmt_execute(pdo_stmt_t *stmt TSRMLS_DC) memcpy(val->data, dbdata(H->link, i+1), val->len); val->data[val->len] = '\0'; break; - + case SQLMONEY: + case SQLMONEY4: + case SQLMONEYN: { + DBFLT8 money_value; + dbconvert(NULL, S->cols[i].coltype, dbdata(H->link, i+1), dbdatlen(H->link, i+1), SQLFLT8, (LPBYTE)&money_value, val->len); + val->len = spprintf(val->data, 0, "%.4f", money_value); + } + break; default: if (dbwillconvert(S->cols[i].coltype, SQLCHAR)) { val->len = 32 + (2 * dbdatlen(H->link, i+1)); diff --git a/ext/pdo_firebird/firebird_driver.c b/ext/pdo_firebird/firebird_driver.c index 50392238d..db6bca16d 100644 --- a/ext/pdo_firebird/firebird_driver.c +++ b/ext/pdo_firebird/firebird_driver.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: firebird_driver.c 294444 2010-02-03 19:48:04Z pajoye $ */ +/* $Id: firebird_driver.c 293447 2010-01-12 12:46:54Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_mysql/config.m4 b/ext/pdo_mysql/config.m4 index 0b0de12bd..2eb2f8262 100755 --- a/ext/pdo_mysql/config.m4 +++ b/ext/pdo_mysql/config.m4 @@ -1,9 +1,9 @@ -dnl $Id: config.m4 291501 2009-11-30 15:11:29Z jani $ +dnl $Id: config.m4 297583 2010-04-06 13:42:21Z tony2001 $ dnl config.m4 for extension pdo_mysql dnl vim: se ts=2 sw=2 et: PHP_ARG_WITH(pdo-mysql, for MySQL support for PDO, -[ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directoy +[ --with-pdo-mysql[=DIR] PDO: MySQL support. DIR is the MySQL base directory If mysqlnd is passed as DIR, the MySQL native native driver will be used [/usr/local]]) diff --git a/ext/pdo_mysql/mysql_driver.c b/ext/pdo_mysql/mysql_driver.c index 37a67e56e..07b7f920e 100755 --- a/ext/pdo_mysql/mysql_driver.c +++ b/ext/pdo_mysql/mysql_driver.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_driver.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysql_driver.c 298626 2010-04-26 23:55:03Z kalle $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -649,7 +649,7 @@ static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_ goto cleanup; } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if ((PG(open_basedir) && PG(open_basedir)[0] != '\0') || PG(safe_mode)) #else if (PG(open_basedir) && PG(open_basedir)[0] != '\0') diff --git a/ext/pdo_mysql/mysql_statement.c b/ext/pdo_mysql/mysql_statement.c index 074e9fbb2..f4a501f80 100755 --- a/ext/pdo_mysql/mysql_statement.c +++ b/ext/pdo_mysql/mysql_statement.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mysql_statement.c 294543 2010-02-04 20:28:55Z johannes $ */ +/* $Id: mysql_statement.c 299574 2010-05-21 11:09:28Z andrey $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -111,7 +111,7 @@ static int pdo_mysql_stmt_dtor(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ #endif /* HAVE_MYSQL_NEXT_RESULT || PDO_USE_MYSQLND */ #if PDO_USE_MYSQLND if (!S->stmt && S->current_data) { - free(S->current_data); + mnd_free(S->current_data); } #endif /* PDO_USE_MYSQLND */ @@ -264,7 +264,7 @@ static int pdo_mysql_stmt_execute_prepared_mysqlnd(pdo_stmt_t *stmt TSRMLS_DC) / } /* for SHOW/DESCRIBE and others the column/field count is not available before execute */ - stmt->column_count = S->stmt->field_count; + stmt->column_count = mysql_stmt_field_count(S->stmt); for (i = 0; i < stmt->column_count; i++) { mysqlnd_stmt_bind_one_result(S->stmt, i); } @@ -376,7 +376,7 @@ static int pdo_mysql_stmt_next_rowset(pdo_stmt_t *stmt TSRMLS_DC) /* {{{ */ /* for SHOW/DESCRIBE and others the column/field count is not available before execute */ int i; - stmt->column_count = S->stmt->field_count; + stmt->column_count = mysql_stmt_field_count(S->stmt); for (i = 0; i < stmt->column_count; i++) { mysqlnd_stmt_bind_one_result(S->stmt, i); } @@ -652,7 +652,7 @@ static int pdo_mysql_stmt_fetch(pdo_stmt_t *stmt, } #if PDO_USE_MYSQLND if (!S->stmt && S->current_data) { - free(S->current_data); + mnd_free(S->current_data); } #endif /* PDO_USE_MYSQLND */ @@ -745,8 +745,8 @@ static int pdo_mysql_stmt_get_col(pdo_stmt_t *stmt, int colno, char **ptr, unsig } #if PDO_USE_MYSQLND if (S->stmt) { - Z_ADDREF_P(S->stmt->result_bind[colno].zv); - *ptr = (char*)&S->stmt->result_bind[colno].zv; + Z_ADDREF_P(S->stmt->data->result_bind[colno].zv); + *ptr = (char*)&S->stmt->data->result_bind[colno].zv; *len = sizeof(zval); PDO_DBG_RETURN(1); } diff --git a/ext/pdo_mysql/pdo_mysql.c b/ext/pdo_mysql/pdo_mysql.c index 158c033b0..ec3e0441b 100755 --- a/ext/pdo_mysql/pdo_mysql.c +++ b/ext/pdo_mysql/pdo_mysql.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_mysql.c 294514 2010-02-04 09:37:38Z pajoye $ */ +/* $Id: pdo_mysql.c 294274 2010-01-31 19:18:56Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -115,12 +115,11 @@ static PHP_MINFO_FUNCTION(pdo_mysql) /* }}} */ -#if PDO_USE_MYSQLND +#if PDO_USE_MYSQLND && PDO_DBG_ENABLED /* {{{ PHP_RINIT_FUNCTION */ static PHP_RINIT_FUNCTION(pdo_mysql) { -#if PDO_DBG_ENABLED if (PDO_MYSQL_G(debug)) { MYSQLND_DEBUG *dbg = mysqlnd_debug_init(mysqlnd_debug_std_no_trace_funcs TSRMLS_CC); if (!dbg) { @@ -129,18 +128,15 @@ static PHP_RINIT_FUNCTION(pdo_mysql) dbg->m->set_mode(dbg, PDO_MYSQL_G(debug)); PDO_MYSQL_G(dbg) = dbg; } -#endif return SUCCESS; } /* }}} */ - /* {{{ PHP_RSHUTDOWN_FUNCTION */ static PHP_RSHUTDOWN_FUNCTION(pdo_mysql) { -#if PDO_DBG_ENABLED MYSQLND_DEBUG *dbg = PDO_MYSQL_G(dbg); PDO_DBG_ENTER("RSHUTDOWN"); if (dbg) { @@ -148,11 +144,11 @@ static PHP_RSHUTDOWN_FUNCTION(pdo_mysql) dbg->m->free_handle(dbg); PDO_MYSQL_G(dbg) = NULL; } -#endif + return SUCCESS; } /* }}} */ - +#endif /* {{{ PHP_GINIT_FUNCTION */ @@ -167,8 +163,6 @@ static PHP_GINIT_FUNCTION(pdo_mysql) #endif } /* }}} */ -#endif - /* {{{ pdo_mysql_functions[] */ const zend_function_entry pdo_mysql_functions[] = { @@ -205,15 +199,11 @@ zend_module_entry pdo_mysql_module_entry = { #endif PHP_MINFO(pdo_mysql), "1.0.2", -#if PDO_USE_MYSQLND PHP_MODULE_GLOBALS(pdo_mysql), PHP_GINIT(pdo_mysql), NULL, NULL, STANDARD_MODULE_PROPERTIES_EX -#else - STANDARD_MODULE_PROPERTIES -#endif }; /* }}} */ diff --git a/ext/pdo_mysql/php_pdo_mysql_int.h b/ext/pdo_mysql/php_pdo_mysql_int.h index 51e5e5591..d9728b01a 100755 --- a/ext/pdo_mysql/php_pdo_mysql_int.h +++ b/ext/pdo_mysql/php_pdo_mysql_int.h @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_mysql_int.h 294514 2010-02-04 09:37:38Z pajoye $ */ +/* $Id: php_pdo_mysql_int.h 294278 2010-01-31 20:00:36Z gwynne $ */ #ifndef PHP_PDO_MYSQL_INT_H #define PHP_PDO_MYSQL_INT_H diff --git a/ext/pdo_mysql/tests/bug_51670.phpt b/ext/pdo_mysql/tests/bug_51670.phpt new file mode 100644 index 000000000..d5387e6c6 --- /dev/null +++ b/ext/pdo_mysql/tests/bug_51670.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #51670 (getColumnMeta causes segfault when re-executing query after calling nextRowset) +--SKIPIF-- +<?php +if (!extension_loaded('pdo') || !extension_loaded('pdo_mysql')) die('skip not loaded'); +require dirname(__FILE__) . '/config.inc'; +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +PDOTest::skip(); +?> +--FILE-- +<?php +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$query = $db->prepare('SELECT 1 AS num'); +$query->execute(); +if(!is_array($query->getColumnMeta(0))) die('FAIL!'); +$query->nextRowset(); +$query->execute(); +if(!is_array($query->getColumnMeta(0))) die('FAIL!'); +echo 'done!'; +?> +--EXPECTF-- +done! + diff --git a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt index c0df4a512..ea25cdc32 100644 --- a/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql___construct_options.phpt @@ -178,5 +178,5 @@ Warning: PDO::getAttribute(): SQLSTATE[IM001]: Driver does not support this func [021] Execting '1'/boolean got ''/boolean' for options 'PDO::MYSQL_ATTR_LOCAL_INFILE' [023] Execting 'SET @a=1'/string got ''/boolean' for options 'PDO::MYSQL_ATTR_INIT_COMMAND' [024] SQLSTATE[42000] [1065] Query was empty -[025] SQLSTATE[42S02] [1146] Table 'test.nonexistent' doesn't exist +[025] SQLSTATE[42S02] [1146] Table '%s.nonexistent' doesn't exist done! diff --git a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt index 9c54dc2f6..18ef17b7c 100644 --- a/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt +++ b/ext/pdo_mysql/tests/pdo_mysql_stmt_fetch_serialize.phpt @@ -142,8 +142,8 @@ object(myclass)#%d (1) { } Using PDO::FETCH_CLASS to fetch the object from DB and unserialize it... -myclass::__construct(PDO shall call __construct()) myclass::__set(myobj, 'C:7:"myclass":19:{Data from serialize}') +myclass::__construct(PDO shall call __construct()) object(myclass)#%d (2) { [%u|b%"myprotected":protected]=> %unicode|string%(19) "a protected propery" diff --git a/ext/pdo_oci/config.m4 b/ext/pdo_oci/config.m4 index 27512a265..0fd2027a2 100755 --- a/ext/pdo_oci/config.m4 +++ b/ext/pdo_oci/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4 294541 2010-02-04 19:50:49Z pajoye $ +dnl $Id: config.m4 294487 2010-02-04 01:12:14Z johannes $ dnl config.m4 for extension pdo_oci dnl vim:et:sw=2:ts=2: diff --git a/ext/pdo_oci/oci_driver.c b/ext/pdo_oci/oci_driver.c index 92f5045ae..07df7f9aa 100755 --- a/ext/pdo_oci/oci_driver.c +++ b/ext/pdo_oci/oci_driver.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: oci_driver.c 294444 2010-02-03 19:48:04Z pajoye $ */ +/* $Id: oci_driver.c 293447 2010-01-12 12:46:54Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_odbc/odbc_driver.c b/ext/pdo_odbc/odbc_driver.c index fbf54ff32..e7ebb1b5f 100755 --- a/ext/pdo_odbc/odbc_driver.c +++ b/ext/pdo_odbc/odbc_driver.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: odbc_driver.c 294444 2010-02-03 19:48:04Z pajoye $ */ +/* $Id: odbc_driver.c 293447 2010-01-12 12:46:54Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/pdo_pgsql/pdo_pgsql.c b/ext/pdo_pgsql/pdo_pgsql.c index 1be19cef7..5b3bff589 100644 --- a/ext/pdo_pgsql/pdo_pgsql.c +++ b/ext/pdo_pgsql/pdo_pgsql.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_pgsql.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: pdo_pgsql.c 300351 2010-06-10 12:11:19Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -86,6 +86,12 @@ ZEND_GET_MODULE(pdo_pgsql) PHP_MINIT_FUNCTION(pdo_pgsql) { REGISTER_PDO_CLASS_CONST_LONG("PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT", PDO_PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT); + REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_IDLE", (long)PGSQL_TRANSACTION_IDLE); + REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_ACTIVE", (long)PGSQL_TRANSACTION_ACTIVE); + REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INTRANS", (long)PGSQL_TRANSACTION_INTRANS); + REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_INERROR", (long)PGSQL_TRANSACTION_INERROR); + REGISTER_PDO_CLASS_CONST_LONG("PGSQL_TRANSACTION_UNKNOWN", (long)PGSQL_TRANSACTION_UNKNOWN); + php_pdo_register_driver(&pdo_pgsql_driver); return SUCCESS; } @@ -128,7 +134,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 293036 2010-01-03 09:23:27Z sebastian $ "); + php_info_print_table_row(2, "Revision", " $Id: pdo_pgsql.c 300351 2010-06-10 12:11:19Z iliaa $ "); php_info_print_table_end(); } diff --git a/ext/pdo_pgsql/pgsql_driver.c b/ext/pdo_pgsql/pgsql_driver.c index 32fd472e9..0720ce6b0 100644 --- a/ext/pdo_pgsql/pgsql_driver.c +++ b/ext/pdo_pgsql/pgsql_driver.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql_driver.c 294444 2010-02-03 19:48:04Z pajoye $ */ +/* $Id: pgsql_driver.c 300464 2010-06-15 11:13:20Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -29,6 +29,7 @@ #include "ext/standard/info.h" #include "pdo/php_pdo.h" #include "pdo/php_pdo_driver.h" +#include "ext/standard/file.h" #undef PACKAGE_BUGREPORT #undef PACKAGE_NAME @@ -496,6 +497,368 @@ static int pgsql_handle_rollback(pdo_dbh_t *dbh TSRMLS_DC) return pdo_pgsql_transaction_cmd("ROLLBACK", dbh TSRMLS_CC); } +/* {{{ proto string PDO::pgsqlCopyFromArray(string $table_name , array $rows [, string $delimiter [, string $null_as ] [, string $fields]) + Returns true if the copy worked fine or false if error */ +static PHP_METHOD(PDO, pgsqlCopyFromArray) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + + zval *pg_rows; + + char *table_name, *pg_delim = NULL, *pg_null_as = NULL, *pg_fields = NULL; + int table_name_len, pg_delim_len = 0, pg_null_as_len = 0, pg_fields_len; + char *query; + + PGresult *pgsql_result; + ExecStatusType status; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s/a|sss", + &table_name, &table_name_len, &pg_rows, + &pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) { + return; + } + + if (!zend_hash_num_elements(Z_ARRVAL_P(pg_rows))) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Cannot copy from an empty array"); + RETURN_FALSE; + } + + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + if (pg_fields) { + spprintf(&query, 0, "COPY %s (%s) FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, pg_fields, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } else { + spprintf(&query, 0, "COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } + + // Obtain db Handle + H = (pdo_pgsql_db_handle *)dbh->driver_data; + + while ((pgsql_result = PQgetResult(H->server))) { + PQclear(pgsql_result); + } + pgsql_result = PQexec(H->server, query); + + efree(query); + query = NULL; + + if (pgsql_result) { + status = PQresultStatus(pgsql_result); + } else { + status = (ExecStatusType) PQstatus(H->server); + } + + if (status == PGRES_COPY_IN && pgsql_result) { + int command_failed = 0; + int buffer_len = 0; + zval **tmp; + HashPosition pos; + + PQclear(pgsql_result); + zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(pg_rows), &pos); + while (zend_hash_get_current_data_ex(Z_ARRVAL_P(pg_rows), (void **) &tmp, &pos) == SUCCESS) { + int query_len; + convert_to_string_ex(tmp); + + if (buffer_len < Z_STRLEN_PP(tmp)) { + buffer_len = Z_STRLEN_PP(tmp); + query = erealloc(query, buffer_len + 2); /* room for \n\0 */ + } + memcpy(query, Z_STRVAL_PP(tmp), Z_STRLEN_PP(tmp)); + query_len = Z_STRLEN_PP(tmp); + if (query[query_len - 1] != '\n') { + query[query_len++] = '\n'; + } + query[query_len] = '\0'; + if (PQputCopyData(H->server, query, query_len) != 1) { + efree(query); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "copy failed"); + RETURN_FALSE; + } + zend_hash_move_forward_ex(Z_ARRVAL_P(pg_rows), &pos); + } + if (query) { + efree(query); + } + + if (PQputCopyEnd(H->server, NULL) != 1) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "putcopyend failed"); + RETURN_FALSE; + } + + while ((pgsql_result = PQgetResult(H->server))) { + if (PGRES_COMMAND_OK != PQresultStatus(pgsql_result)) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed"); + command_failed = 1; + } + PQclear(pgsql_result); + } + + RETURN_BOOL(!command_failed); + } else { + PQclear(pgsql_result); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed"); + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto string PDO::pgsqlCopyFromFile(string $table_name , string $filename [, string $delimiter [, string $null_as ] [, string $fields]) + Returns true if the copy worked fine or false if error */ +static PHP_METHOD(PDO, pgsqlCopyFromFile) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + + char *table_name, *filename, *pg_delim = NULL, *pg_null_as = NULL, *pg_fields = NULL; + int table_name_len, filename_len, pg_delim_len = 0, pg_null_as_len = 0, pg_fields_len; + char *query; + PGresult *pgsql_result; + ExecStatusType status; + php_stream *stream; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|sss", + &table_name, &table_name_len, &filename, &filename_len, + &pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) { + return; + } + + // Obtain db Handler + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + stream = php_stream_open_wrapper_ex(filename, "rb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, FG(default_context)); + if (!stream) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Unable to open the file"); + RETURN_FALSE; + } + + if (pg_fields) { + spprintf(&query, 0, "COPY %s (%s) FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, pg_fields, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } else { + spprintf(&query, 0, "COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } + + H = (pdo_pgsql_db_handle *)dbh->driver_data; + + while ((pgsql_result = PQgetResult(H->server))) { + PQclear(pgsql_result); + } + pgsql_result = PQexec(H->server, query); + + efree(query); + + if (pgsql_result) { + status = PQresultStatus(pgsql_result); + } else { + status = (ExecStatusType) PQstatus(H->server); + } + + if (status == PGRES_COPY_IN && pgsql_result) { + char *buf; + int command_failed = 0; + size_t line_len = 0; + + PQclear(pgsql_result); + while ((buf = php_stream_get_line(stream, NULL, 0, &line_len)) != NULL) { + if (PQputCopyData(H->server, buf, line_len) != 1) { + efree(buf); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "copy failed"); + php_stream_close(stream); + RETURN_FALSE; + } + efree(buf); + } + php_stream_close(stream); + + if (PQputCopyEnd(H->server, NULL) != 1) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "putcopyend failed"); + RETURN_FALSE; + } + + while ((pgsql_result = PQgetResult(H->server))) { + if (PGRES_COMMAND_OK != PQresultStatus(pgsql_result)) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed"); + command_failed = 1; + } + PQclear(pgsql_result); + } + + RETURN_BOOL(!command_failed); + } else { + PQclear(pgsql_result); + php_stream_close(stream); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed"); + RETURN_FALSE; + } +} +/* }}} */ + + +/* {{{ proto string PDO::pgsqlCopyToFile(string $table_name , $filename, [string $delimiter [, string $null_as [, string $fields]]]) + Returns true if the copy worked fine or false if error */ +static PHP_METHOD(PDO, pgsqlCopyToFile) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + + char *table_name, *pg_delim = NULL, *pg_null_as = NULL, *pg_fields = NULL, *filename = NULL; + int table_name_len, pg_delim_len = 0, pg_null_as_len = 0, pg_fields_len, filename_len; + char *query; + + PGresult *pgsql_result; + ExecStatusType status; + + php_stream *stream; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|sss", + &table_name, &table_name_len, &filename, &filename_len, + &pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) { + return; + } + + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + H = (pdo_pgsql_db_handle *)dbh->driver_data; + + stream = php_stream_open_wrapper_ex(filename, "wb", ENFORCE_SAFE_MODE | REPORT_ERRORS, NULL, FG(default_context)); + if (!stream) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Unable to open the file for writing"); + RETURN_FALSE; + } + + while ((pgsql_result = PQgetResult(H->server))) { + PQclear(pgsql_result); + } + + if (pg_fields) { + spprintf(&query, 0, "COPY %s (%s) TO STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, pg_fields, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } else { + spprintf(&query, 0, "COPY %s TO STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } + pgsql_result = PQexec(H->server, query); + efree(query); + + if (pgsql_result) { + status = PQresultStatus(pgsql_result); + } else { + status = (ExecStatusType) PQstatus(H->server); + } + + if (status == PGRES_COPY_OUT && pgsql_result) { + PQclear(pgsql_result); + while (1) { + char *csv = NULL; + int ret = PQgetCopyData(H->server, &csv, 0); + + if (ret == -1) { + break; /* done */ + } else if (ret > 0) { + if (php_stream_write(stream, csv, ret) != ret) { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Unable to write to file"); + PQfreemem(csv); + php_stream_close(stream); + RETURN_FALSE; + } else { + PQfreemem(csv); + } + } else { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed: getline failed"); + php_stream_close(stream); + RETURN_FALSE; + } + } + php_stream_close(stream); + + while ((pgsql_result = PQgetResult(H->server))) { + PQclear(pgsql_result); + } + RETURN_TRUE; + } else { + php_stream_close(stream); + PQclear(pgsql_result); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed"); + RETURN_FALSE; + } +} +/* }}} */ + +/* {{{ proto string PDO::pgsqlCopyToArray(string $table_name , [string $delimiter [, string $null_as [, string $fields]]]) + Returns true if the copy worked fine or false if error */ +static PHP_METHOD(PDO, pgsqlCopyToArray) +{ + pdo_dbh_t *dbh; + pdo_pgsql_db_handle *H; + + char *table_name, *pg_delim = NULL, *pg_null_as = NULL, *pg_fields = NULL; + int table_name_len, pg_delim_len = 0, pg_null_as_len = 0, pg_fields_len; + char *query; + + PGresult *pgsql_result; + ExecStatusType status; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sss", + &table_name, &table_name_len, + &pg_delim, &pg_delim_len, &pg_null_as, &pg_null_as_len, &pg_fields, &pg_fields_len) == FAILURE) { + return; + } + + dbh = zend_object_store_get_object(getThis() TSRMLS_CC); + PDO_CONSTRUCT_CHECK; + + H = (pdo_pgsql_db_handle *)dbh->driver_data; + + while ((pgsql_result = PQgetResult(H->server))) { + PQclear(pgsql_result); + } + + if (pg_fields) { + spprintf(&query, 0, "COPY %s (%s) TO STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, pg_fields, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } else { + spprintf(&query, 0, "COPY %s TO STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, (pg_delim_len ? *pg_delim : '\t'), (pg_null_as_len ? pg_null_as : "\\\\N")); + } + pgsql_result = PQexec(H->server, query); + efree(query); + + if (pgsql_result) { + status = PQresultStatus(pgsql_result); + } else { + status = (ExecStatusType) PQstatus(H->server); + } + + if (status == PGRES_COPY_OUT && pgsql_result) { + PQclear(pgsql_result); + array_init(return_value); + + while (1) { + char *csv = NULL; + int ret = PQgetCopyData(H->server, &csv, 0); + if (ret == -1) { + break; /* copy done */ + } else if (ret > 0) { + add_next_index_stringl(return_value, csv, ret, 1); + PQfreemem(csv); + } else { + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed: getline failed"); + RETURN_FALSE; + } + } + + while ((pgsql_result = PQgetResult(H->server))) { + PQclear(pgsql_result); + } + } else { + PQclear(pgsql_result); + pdo_pgsql_error(dbh, PGRES_FATAL_ERROR, "Copy command failed"); + RETURN_FALSE; + } +} +/* }}} */ + + /* {{{ proto string PDO::pgsqlLOBCreate() Creates a new large object, returning its identifier. Must be called inside a transaction. */ static PHP_METHOD(PDO, pgsqlLOBCreate) @@ -608,6 +971,10 @@ static const zend_function_entry dbh_methods[] = { PHP_ME(PDO, pgsqlLOBCreate, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, pgsqlLOBOpen, NULL, ZEND_ACC_PUBLIC) PHP_ME(PDO, pgsqlLOBUnlink, NULL, ZEND_ACC_PUBLIC) + PHP_ME(PDO, pgsqlCopyFromArray, NULL, ZEND_ACC_PUBLIC) + PHP_ME(PDO, pgsqlCopyFromFile, NULL, ZEND_ACC_PUBLIC) + PHP_ME(PDO, pgsqlCopyToArray, NULL, ZEND_ACC_PUBLIC) + PHP_ME(PDO, pgsqlCopyToFile, NULL, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; @@ -653,7 +1020,8 @@ static struct pdo_dbh_methods pgsql_methods = { pdo_pgsql_fetch_error_func, pdo_pgsql_get_attribute, pdo_pgsql_check_liveness, /* check_liveness */ - pdo_pgsql_get_driver_methods /* get_driver_methods */ + pdo_pgsql_get_driver_methods, /* get_driver_methods */ + NULL, }; static int pdo_pgsql_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRMLS_DC) /* {{{ */ diff --git a/ext/pdo_pgsql/php_pdo_pgsql_int.h b/ext/pdo_pgsql/php_pdo_pgsql_int.h index a9c686ba1..8cdfe1291 100644 --- a/ext/pdo_pgsql/php_pdo_pgsql_int.h +++ b/ext/pdo_pgsql/php_pdo_pgsql_int.h @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pdo_pgsql_int.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_pdo_pgsql_int.h 300351 2010-06-10 12:11:19Z iliaa $ */ #ifndef PHP_PDO_PGSQL_INT_H #define PHP_PDO_PGSQL_INT_H @@ -102,6 +102,13 @@ struct pdo_pgsql_lob_self { Oid oid; }; +enum pdo_pgsql_specific_constants { + PGSQL_TRANSACTION_IDLE = PQTRANS_IDLE, + PGSQL_TRANSACTION_ACTIVE = PQTRANS_ACTIVE, + PGSQL_TRANSACTION_INTRANS = PQTRANS_INTRANS, + PGSQL_TRANSACTION_INERROR = PQTRANS_INERROR, + PGSQL_TRANSACTION_UNKNOWN = PQTRANS_UNKNOWN +}; php_stream *pdo_pgsql_create_lob_stream(pdo_dbh_t *stmt, int lfd, Oid oid TSRMLS_DC); extern php_stream_ops pdo_pgsql_lob_stream_ops; diff --git a/ext/pdo_pgsql/tests/copy_from.phpt b/ext/pdo_pgsql/tests/copy_from.phpt new file mode 100644 index 000000000..2858905d0 --- /dev/null +++ b/ext/pdo_pgsql/tests/copy_from.phpt @@ -0,0 +1,386 @@ +--TEST-- +PDO PgSQL pgsqlCopyFromArray and pgsqlCopyFromFile +--SKIPIF-- +<?php # vim:se ft=php: +if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); +require dirname(__FILE__) . '/config.inc'; +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +PDOTest::skip(); +?> +--FILE-- +<?php +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); + +$db->exec('CREATE TABLE test (a integer not null primary key, b text, c integer)'); + +try { + +echo "Preparing test file and array for CopyFrom tests\n"; + +$tableRows = array(); +$tableRowsWithDifferentNullValues = array(); + +for($i=0;$i<3;$i++) { + $firstParameter = $i; + $secondParameter = "test insert {$i}"; + $tableRows[] = "{$firstParameter}\t{$secondParameter}\t\\N"; + $tableRowsWithDifferentNullValues[] = "{$firstParameter};{$secondParameter};NULL"; + $tableRowsWithDifferentNullValuesAndSelectedFields[] = "{$firstParameter};NULL"; +} +$filename = 'test_pgsqlCopyFromFile.csv'; +$filenameWithDifferentNullValues = 'test_pgsqlCopyFromFileWithDifferentNullValues.csv'; +$filenameWithDifferentNullValuesAndSelectedFields = 'test_pgsqlCopyFromFileWithDifferentNullValuesAndSelectedFields.csv'; + +file_put_contents($filename, implode("\n",$tableRows)); +file_put_contents($filenameWithDifferentNullValues, implode("\n",$tableRowsWithDifferentNullValues)); +file_put_contents($filenameWithDifferentNullValuesAndSelectedFields, implode("\n",$tableRowsWithDifferentNullValuesAndSelectedFields)); + +echo "Testing pgsqlCopyFromArray() with default parameters\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromArray('test',$tableRows)); + +$stmt = $db->query("select * from test"); +foreach($stmt as $r) { + var_dump($r); +} +$db->rollback(); + +echo "Testing pgsqlCopyFromArray() with different field separator and not null indicator\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromArray('test',$tableRowsWithDifferentNullValues,";","NULL")); +$stmt = $db->query("select * from test"); +foreach($stmt as $r) { + var_dump($r); +} +$db->rollback(); + +echo "Testing pgsqlCopyFromArray() with only selected fields\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromArray('test',$tableRowsWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); +$stmt = $db->query("select * from test"); +foreach($stmt as $r) { + var_dump($r); +} +$db->rollback(); + +echo "Testing pgsqlCopyFromArray() with error\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromArray('test_error',$tableRowsWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); +$db->rollback(); + + +echo "Testing pgsqlCopyFromFile() with default parameters\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromFile('test',$filename)); + +$stmt = $db->query("select * from test"); +foreach($stmt as $r) { + var_dump($r); +} +$db->rollback(); + +echo "Testing pgsqlCopyFromFile() with different field separator and not null indicator\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromFile('test',$filenameWithDifferentNullValues,";","NULL")); +$stmt = $db->query("select * from test"); +foreach($stmt as $r) { + var_dump($r); +} +$db->rollback(); + +echo "Testing pgsqlCopyFromFile() with only selected fields\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromFile('test',$filenameWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); +$stmt = $db->query("select * from test"); +foreach($stmt as $r) { + var_dump($r); +} +$db->rollback(); + +echo "Testing pgsqlCopyFromFile() with error\n"; +$db->beginTransaction(); +var_dump($db->pgsqlCopyFromFile('test_error',$filenameWithDifferentNullValuesAndSelectedFields,";","NULL",'a,c')); +$db->rollback(); + +} catch (Exception $e) { + /* catch exceptions so that we can show the relative error */ + echo "Exception! at line ", $e->getLine(), "\n"; + var_dump($e->getMessage()); +} +if(isset($filename)) { + @unlink($filename); +} +?> +--EXPECT-- +Preparing test file and array for CopyFrom tests +Testing pgsqlCopyFromArray() with default parameters +bool(true) +array(6) { + ["a"]=> + int(0) + [0]=> + int(0) + ["b"]=> + string(13) "test insert 0" + [1]=> + string(13) "test insert 0" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(1) + [0]=> + int(1) + ["b"]=> + string(13) "test insert 1" + [1]=> + string(13) "test insert 1" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(2) + [0]=> + int(2) + ["b"]=> + string(13) "test insert 2" + [1]=> + string(13) "test insert 2" + ["c"]=> + NULL + [2]=> + NULL +} +Testing pgsqlCopyFromArray() with different field separator and not null indicator +bool(true) +array(6) { + ["a"]=> + int(0) + [0]=> + int(0) + ["b"]=> + string(13) "test insert 0" + [1]=> + string(13) "test insert 0" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(1) + [0]=> + int(1) + ["b"]=> + string(13) "test insert 1" + [1]=> + string(13) "test insert 1" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(2) + [0]=> + int(2) + ["b"]=> + string(13) "test insert 2" + [1]=> + string(13) "test insert 2" + ["c"]=> + NULL + [2]=> + NULL +} +Testing pgsqlCopyFromArray() with only selected fields +bool(true) +array(6) { + ["a"]=> + int(0) + [0]=> + int(0) + ["b"]=> + NULL + [1]=> + NULL + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(1) + [0]=> + int(1) + ["b"]=> + NULL + [1]=> + NULL + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(2) + [0]=> + int(2) + ["b"]=> + NULL + [1]=> + NULL + ["c"]=> + NULL + [2]=> + NULL +} +Testing pgsqlCopyFromArray() with error +bool(false) +Testing pgsqlCopyFromFile() with default parameters +bool(true) +array(6) { + ["a"]=> + int(0) + [0]=> + int(0) + ["b"]=> + string(13) "test insert 0" + [1]=> + string(13) "test insert 0" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(1) + [0]=> + int(1) + ["b"]=> + string(13) "test insert 1" + [1]=> + string(13) "test insert 1" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(2) + [0]=> + int(2) + ["b"]=> + string(13) "test insert 2" + [1]=> + string(13) "test insert 2" + ["c"]=> + NULL + [2]=> + NULL +} +Testing pgsqlCopyFromFile() with different field separator and not null indicator +bool(true) +array(6) { + ["a"]=> + int(0) + [0]=> + int(0) + ["b"]=> + string(13) "test insert 0" + [1]=> + string(13) "test insert 0" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(1) + [0]=> + int(1) + ["b"]=> + string(13) "test insert 1" + [1]=> + string(13) "test insert 1" + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(2) + [0]=> + int(2) + ["b"]=> + string(13) "test insert 2" + [1]=> + string(13) "test insert 2" + ["c"]=> + NULL + [2]=> + NULL +} +Testing pgsqlCopyFromFile() with only selected fields +bool(true) +array(6) { + ["a"]=> + int(0) + [0]=> + int(0) + ["b"]=> + NULL + [1]=> + NULL + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(1) + [0]=> + int(1) + ["b"]=> + NULL + [1]=> + NULL + ["c"]=> + NULL + [2]=> + NULL +} +array(6) { + ["a"]=> + int(2) + [0]=> + int(2) + ["b"]=> + NULL + [1]=> + NULL + ["c"]=> + NULL + [2]=> + NULL +} +Testing pgsqlCopyFromFile() with error +bool(false)
\ No newline at end of file diff --git a/ext/pdo_pgsql/tests/copy_to.phpt b/ext/pdo_pgsql/tests/copy_to.phpt new file mode 100644 index 000000000..1dc7d1de3 --- /dev/null +++ b/ext/pdo_pgsql/tests/copy_to.phpt @@ -0,0 +1,129 @@ +--TEST-- +PDO PgSQL pgsqlCopyToArray and pgsqlCopyToFile +--SKIPIF-- +<?php # vim:se ft=php: +if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); +require dirname(__FILE__) . '/config.inc'; +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +PDOTest::skip(); +?> +--FILE-- +<?php +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); + +$db->exec('CREATE TABLE test (a integer not null primary key, b text, c integer)'); + +$db->beginTransaction(); +try { + +echo "Preparing test table for CopyTo tests\n"; +$stmt = $db->prepare("INSERT INTO test (a, b, c) values (?, ?, ?)"); + +for($i=0;$i<3;$i++) { + $firstParameter = $i; + $secondParameter = "test insert {$i}"; + $thirdParameter = NULL; + $stmt->bindValue(1, $firstParameter); + $stmt->bindValue(2, $secondParameter); + $stmt->bindValue(3, $thirdParameter); + $stmt->execute(); +} + +$db->commit(); + +echo "Testing pgsqlCopyToArray() with default parameters\n"; +var_dump($db->pgsqlCopyToArray('test')); +echo "Testing pgsqlCopyToArray() with different field separator and not null indicator\n"; +var_dump($db->pgsqlCopyToArray('test',";","NULL")); +echo "Testing pgsqlCopyToArray() with only selected fields\n"; +var_dump($db->pgsqlCopyToArray('test',";","NULL",'a,c')); + +echo "Testing pgsqlCopyToArray() with error\n"; +var_dump($db->pgsqlCopyToArray('test_error')); + + +echo "Testing pgsqlCopyToFile() with default parameters\n"; + +$filename="test_pgsqlCopyToFile.csv"; +var_dump($db->pgsqlCopyToFile('test',$filename)); +echo file_get_contents($filename); +echo "Testing pgsqlCopyToFile() with different field separator and not null indicator\n"; +var_dump($db->pgsqlCopyToFile('test',$filename,";","NULL")); +echo file_get_contents($filename); +echo "Testing pgsqlCopyToFile() with only selected fields\n"; +var_dump($db->pgsqlCopyToFile('test',$filename,";","NULL",'a,c')); +echo file_get_contents($filename); + +echo "Testing pgsqlCopyToFile() with error\n"; +var_dump($db->pgsqlCopyToFile('test_error',$filename)); + + +} catch (Exception $e) { + /* catch exceptions so that we can show the relative error */ + echo "Exception! at line ", $e->getLine(), "\n"; + var_dump($e->getMessage()); +} +if(isset($filename)) { + @unlink($filename); +} +?> +--EXPECT-- +Preparing test table for CopyTo tests +Testing pgsqlCopyToArray() with default parameters +array(3) { + [0]=> + string(19) "0 test insert 0 \N +" + [1]=> + string(19) "1 test insert 1 \N +" + [2]=> + string(19) "2 test insert 2 \N +" +} +Testing pgsqlCopyToArray() with different field separator and not null indicator +array(3) { + [0]=> + string(21) "0;test insert 0;NULL +" + [1]=> + string(21) "1;test insert 1;NULL +" + [2]=> + string(21) "2;test insert 2;NULL +" +} +Testing pgsqlCopyToArray() with only selected fields +array(3) { + [0]=> + string(7) "0;NULL +" + [1]=> + string(7) "1;NULL +" + [2]=> + string(7) "2;NULL +" +} +Testing pgsqlCopyToArray() with error +bool(false) +Testing pgsqlCopyToFile() with default parameters +bool(true) +0 test insert 0 \N +1 test insert 1 \N +2 test insert 2 \N +Testing pgsqlCopyToFile() with different field separator and not null indicator +bool(true) +0;test insert 0;NULL +1;test insert 1;NULL +2;test insert 2;NULL +Testing pgsqlCopyToFile() with only selected fields +bool(true) +0;NULL +1;NULL +2;NULL +Testing pgsqlCopyToFile() with error +bool(false)
\ No newline at end of file diff --git a/ext/pdo_pgsql/tests/is_in_transaction.phpt b/ext/pdo_pgsql/tests/is_in_transaction.phpt new file mode 100644 index 000000000..99ff56162 --- /dev/null +++ b/ext/pdo_pgsql/tests/is_in_transaction.phpt @@ -0,0 +1,66 @@ +--TEST-- +PDO PgSQL isInTransaction +--SKIPIF-- +<?php # vim:se ft=php: +if (!extension_loaded('pdo') || !extension_loaded('pdo_pgsql')) die('skip not loaded'); +require dirname(__FILE__) . '/config.inc'; +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +PDOTest::skip(); +?> +--FILE-- +<?php +require dirname(__FILE__) . '/../../../ext/pdo/tests/pdo_test.inc'; +$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); +$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); +$db->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false); + +$db->exec('CREATE TABLE test (a integer not null primary key, b text)'); + +$db->beginTransaction(); +try { +echo "Test PDO::PGSQL_TRANSACTION_INTRANS\n"; +var_dump($db->inTransaction()); + +$stmt = $db->prepare("INSERT INTO test (a, b) values (?, ?)"); +$stmt->bindValue(1, 1); +$stmt->bindValue(2, "test insert"); +$stmt->execute(); + +$db->commit(); + +echo "Test PDO::PGSQL_TRANSACTION_IDLE\n"; +var_dump($db->inTransaction()); + +$db->beginTransaction(); + +try { +$stmt = $db->prepare("INSERT INTO test (a, b) values (?, ?)"); +$stmt->bindValue(1, "error"); +$stmt->bindValue(2, "test insert"); +$stmt->execute(); +} catch (Exception $e) { + /* We catch the exception because the execute will give error and we must test the PDO::PGSQL_TRANSACTION_ERROR */ + echo "Test PDO::PGSQL_TRANSACTION_INERROR\n"; + var_dump($db->inTransaction()); + $db->rollBack(); +} + +echo "Test PDO::PGSQL_TRANSACTION_IDLE\n"; +var_dump($db->inTransaction()); + +} catch (Exception $e) { + /* catch exceptions so that we can show the relative error */ + echo "Exception! at line ", $e->getLine(), "\n"; + var_dump($e->getMessage()); +} + +?> +--EXPECT-- +Test PDO::PGSQL_TRANSACTION_INTRANS +int(2) +Test PDO::PGSQL_TRANSACTION_IDLE +int(0) +Test PDO::PGSQL_TRANSACTION_INERROR +int(3) +Test PDO::PGSQL_TRANSACTION_IDLE +int(0) diff --git a/ext/pdo_sqlite/sqlite_driver.c b/ext/pdo_sqlite/sqlite_driver.c index 56d6f3d20..550e96bea 100644 --- a/ext/pdo_sqlite/sqlite_driver.c +++ b/ext/pdo_sqlite/sqlite_driver.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite_driver.c 294444 2010-02-03 19:48:04Z pajoye $ */ +/* $Id: sqlite_driver.c 300612 2010-06-20 14:12:06Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -636,7 +636,7 @@ static struct pdo_dbh_methods sqlite_methods = { static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 273bee058..af8988e60 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pgsql.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: pgsql.c 298840 2010-05-01 18:27:42Z geissert $ */ #include <stdlib.h> @@ -434,12 +434,12 @@ ZEND_END_ARG_INFO() #endif ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_connection_status, 0, 0, 1) - ZEND_ARG_INFO(0, connnection) + ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() #if HAVE_PGTRANSACTIONSTATUS ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_transaction_status, 0, 0, 1) - ZEND_ARG_INFO(0, connnection) + ZEND_ARG_INFO(0, connection) ZEND_END_ARG_INFO() #endif @@ -3303,7 +3303,7 @@ PHP_FUNCTION(pg_lo_read_all) tbytes = 0; while ((nbytes = lo_read((PGconn *)pgsql->conn, pgsql->lofd, buf, PGSQL_LO_READ_BUF_SIZE))>0) { - php_body_write(buf, nbytes TSRMLS_CC); + PHPWRITE(buf, nbytes); tbytes += nbytes; } RETURN_LONG(tbytes); @@ -3735,7 +3735,7 @@ PHP_FUNCTION(pg_copy_to) { zval *pgsql_link; char *table_name, *pg_delim = NULL, *pg_null_as = NULL; - int table_name_len, pg_delim_len, pg_null_as_len; + int table_name_len, pg_delim_len, pg_null_as_len, free_pg_null = 0; char *query; int id = -1; PGconn *pgsql; @@ -3762,19 +3762,18 @@ PHP_FUNCTION(pg_copy_to) if (!pg_null_as) { pg_null_as = safe_estrdup("\\\\N"); + free_pg_null = 1; } - if (memchr(table_name, '.', table_name_len)) { - spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); - } else { - spprintf(&query, 0, "COPY \"%s\" TO STDOUT DELIMITERS '%c' WITH NULL AS '%s'", table_name, *pg_delim, pg_null_as); - } + spprintf(&query, 0, "COPY %s TO STDOUT DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); while ((pgsql_result = PQgetResult(pgsql))) { PQclear(pgsql_result); } pgsql_result = PQexec(pgsql, query); - efree(pg_null_as); + if (free_pg_null) { + efree(pg_null_as); + } efree(query); if (pgsql_result) { @@ -3898,7 +3897,7 @@ PHP_FUNCTION(pg_copy_from) ZEND_FETCH_RESOURCE2(pgsql, PGconn *, &pgsql_link, id, "PostgreSQL link", le_link, le_plink); - spprintf(&query, 0, "COPY \"%s\" FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); + spprintf(&query, 0, "COPY %s FROM STDIN DELIMITERS E'%c' WITH NULL AS E'%s'", table_name, *pg_delim, pg_null_as); while ((pgsql_result = PQgetResult(pgsql))) { PQclear(pgsql_result); } @@ -4279,7 +4278,7 @@ PHP_FUNCTION(pg_result_error_field) /* }}} */ #endif -/* {{{ proto int pg_connection_status(resource connnection) +/* {{{ proto int pg_connection_status(resource connection) Get connection status */ PHP_FUNCTION(pg_connection_status) { @@ -4300,7 +4299,7 @@ PHP_FUNCTION(pg_connection_status) /* }}} */ #if HAVE_PGTRANSACTIONSTATUS -/* {{{ proto int pg_transaction_status(resource connnection) +/* {{{ proto int pg_transaction_status(resource connection) Get transaction status */ PHP_FUNCTION(pg_transaction_status) { diff --git a/ext/phar/Makefile.frag b/ext/phar/Makefile.frag index 076ce8a93..fc93d1d6b 100755 --- a/ext/phar/Makefile.frag +++ b/ext/phar/Makefile.frag @@ -19,11 +19,7 @@ PHP_PHARCMD_EXECUTABLE = ` \ else \ $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ fi;` -PHP_PHARCMD_BANG = `if test -x "$(PHP_EXECUTABLE)"; then \ - $(top_srcdir)/build/shtool echo -n -- "$(PHP_EXECUTABLE)"; \ - else \ - $(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)"; \ - fi; ` +PHP_PHARCMD_BANG = `$(top_srcdir)/build/shtool echo -n -- "$(INSTALL_ROOT)$(bindir)/$(program_prefix)php$(program_suffix)$(EXEEXT)";` $(builddir)/phar/phar.inc: $(srcdir)/phar/phar.inc -@test -d $(builddir)/phar || mkdir $(builddir)/phar diff --git a/ext/phar/dirstream.c b/ext/phar/dirstream.c index c1758d420..0e5c09b8b 100644 --- a/ext/phar/dirstream.c +++ b/ext/phar/dirstream.c @@ -360,7 +360,7 @@ php_stream *phar_wrapper_open_dir(php_stream_wrapper *wrapper, char *path, char if (FAILURE == phar_get_archive(&phar, resource->host, host_len, NULL, 0, &error TSRMLS_CC)) { if (error) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); efree(error); } else { php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar file \"%s\" is unknown", resource->host); diff --git a/ext/phar/phar.c b/ext/phar/phar.c index 9b8233d7d..4bdf6199c 100644 --- a/ext/phar/phar.c +++ b/ext/phar/phar.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar.c 290435 2009-11-09 17:21:15Z rasmus $ */ +/* $Id: phar.c 298908 2010-05-03 14:41:40Z iliaa $ */ #define PHAR_MAIN 1 #include "phar_internal.h" @@ -1327,7 +1327,7 @@ int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int a if (!pphar) { pphar = &mydata; } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { return FAILURE; } @@ -1369,7 +1369,7 @@ int phar_create_or_parse_filename(char *fname, int fname_len, char *alias, int a if (PHAR_G(readonly) && !is_data) { if (options & REPORT_ERRORS) { if (error) { - spprintf(error, 0, "creating archive \"%s\" disabled by INI setting", fname); + spprintf(error, 0, "creating archive \"%s\" disabled by the php.ini setting phar.readonly", fname); } } return FAILURE; @@ -1491,7 +1491,7 @@ int phar_open_from_filename(char *fname, int fname_len, char *alias, int alias_l } else if (error && *error) { return FAILURE; } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { return FAILURE; } @@ -2359,7 +2359,7 @@ int phar_open_executed_filename(char *alias, int alias_len, char **error TSRMLS_ FREE_ZVAL(halt_constant); -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { return FAILURE; } @@ -2563,8 +2563,8 @@ char *phar_create_default_stub(const char *index_php, const char *web_index, siz */ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert, char **error TSRMLS_DC) /* {{{ */ { -/* static const char newstub[] = "<?php __HALT_COMPILER(); ?>\r\n"; */ - char *newstub; + char halt_stub[] = "__HALT_COMPILER();"; + char *newstub, *tmp; phar_entry_info *entry, *newentry; int halt_offset, restore_alias_len, global_flags = 0, closeoldfile; char *pos, has_dirs = 0; @@ -2665,8 +2665,9 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert, } else { free_user_stub = 0; } - if ((pos = strstr(user_stub, "__HALT_COMPILER();")) == NULL) - { + tmp = estrndup(user_stub, len); + if ((pos = php_stristr(tmp, halt_stub, len, sizeof(halt_stub) - 1)) == NULL) { + efree(tmp); if (closeoldfile) { php_stream_close(oldfile); } @@ -2679,6 +2680,8 @@ int phar_flush(phar_archive_data *phar, char *user_stub, long len, int convert, } return EOF; } + pos = user_stub + (pos - tmp); + efree(tmp); len = pos - user_stub + 18; if ((size_t)len != php_stream_write(newfile, user_stub, len) || 5 != php_stream_write(newfile, " ?>\r\n", 5)) { @@ -3665,7 +3668,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: 290435 $"); + php_info_print_table_row(2, "SVN revision", "$Revision: 298908 $"); 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_object.c b/ext/phar/phar_object.c index 9c6d8847c..e7ee3e72f 100755 --- a/ext/phar/phar_object.c +++ b/ext/phar/phar_object.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: phar_object.c 290647 2009-11-13 00:58:11Z cellog $ */ +/* $Id: phar_object.c 298642 2010-04-27 08:23:25Z bjori $ */ #include "phar_internal.h" #include "func_interceptors.h" @@ -1754,7 +1754,7 @@ phar_spl_fileinfo: return ZEND_HASH_APPLY_STOP; } } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { zend_throw_exception_ex(spl_ce_UnexpectedValueException, 0 TSRMLS_CC, "Iterator %v returned a path \"%s\" that safe mode prevents opening", ce->name, fname); @@ -3824,7 +3824,7 @@ PHP_METHOD(Phar, offsetSet) PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by INI setting"); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } @@ -3863,7 +3863,7 @@ PHP_METHOD(Phar, offsetUnset) PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by INI setting"); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } @@ -3943,7 +3943,7 @@ PHP_METHOD(Phar, addFile) return; } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { zend_throw_exception_ex(spl_ce_RuntimeException, 0 TSRMLS_CC, "phar error: unable to open file \"%s\" to add to phar archive, safe_mode restrictions prevent this", fname); return; @@ -4125,7 +4125,7 @@ PHP_METHOD(Phar, setMetadata) PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by INI setting"); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } @@ -4164,7 +4164,7 @@ PHP_METHOD(Phar, delMetadata) PHAR_ARCHIVE_OBJECT(); if (PHAR_G(readonly) && !phar_obj->arc.archive->is_data) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by INI setting"); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } @@ -4187,11 +4187,11 @@ PHP_METHOD(Phar, delMetadata) } } /* }}} */ -#if (PHP_MAJOR_VERSION < 6) -#define OPENBASEDIR_CHECKPATH(filename) \ +#if PHP_API_VERSION < 20100412 +#define PHAR_OPENBASEDIR_CHECKPATH(filename) \ (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC) #else -#define OPENBASEDIR_CHECKPATH(filename) \ +#define PHAR_OPENBASEDIR_CHECKPATH(filename) \ php_check_open_basedir(filename TSRMLS_CC) #endif @@ -4235,7 +4235,7 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * return FAILURE; } - if (OPENBASEDIR_CHECKPATH(fullpath)) { + if (PHAR_OPENBASEDIR_CHECKPATH(fullpath)) { spprintf(error, 4096, "Cannot extract \"%s\" to \"%s\", openbasedir/safe mode restrictions in effect", entry->filename, fullpath); efree(fullpath); return FAILURE; @@ -4285,7 +4285,11 @@ static int phar_extract_file(zend_bool overwrite, phar_entry_info *entry, char * return SUCCESS; } +#if PHP_API_VERSION < 20100412 fp = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); +#else + fp = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL); +#endif if (!fp) { spprintf(error, 4096, "Cannot extract \"%s\", could not open for writing \"%s\"", entry->filename, fullpath); @@ -4768,7 +4772,7 @@ PHP_METHOD(PharFileInfo, setMetadata) PHAR_ENTRY_OBJECT(); if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by phar.readonly INI setting"); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } @@ -4821,7 +4825,7 @@ PHP_METHOD(PharFileInfo, delMetadata) PHAR_ENTRY_OBJECT(); if (PHAR_G(readonly) && !entry_obj->ent.entry->phar->is_data) { - zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by phar.readonly INI setting"); + zend_throw_exception_ex(spl_ce_BadMethodCallException, 0 TSRMLS_CC, "Write operations disabled by the php.ini setting phar.readonly"); return; } diff --git a/ext/phar/stream.c b/ext/phar/stream.c index a357ba0da..2b91e8df2 100644 --- a/ext/phar/stream.c +++ b/ext/phar/stream.c @@ -108,7 +108,7 @@ php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char *mode, } if (PHAR_G(readonly) && (!pphar || !(*pphar)->is_data)) { if (!(options & PHP_STREAM_URL_STAT_QUIET)) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: write operations disabled by INI setting"); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: write operations disabled by the php.ini setting phar.readonly"); } php_url_free(resource); return NULL; @@ -117,7 +117,7 @@ php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char *mode, { if (error) { if (!(options & PHP_STREAM_URL_STAT_QUIET)) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); } efree(error); } @@ -128,7 +128,7 @@ php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char *mode, if (error) { spprintf(&error, 0, "Cannot open cached phar '%s' as writeable, copy on write failed", resource->host); if (!(options & PHP_STREAM_URL_STAT_QUIET)) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); } efree(error); } @@ -140,7 +140,7 @@ php_url* phar_parse_url(php_stream_wrapper *wrapper, char *filename, char *mode, { if (error) { if (!(options & PHP_STREAM_URL_STAT_QUIET)) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); } efree(error); } @@ -192,7 +192,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat if (mode[0] == 'w' || (mode[0] == 'r' && mode[1] == '+')) { if (NULL == (idata = phar_get_or_create_entry_data(resource->host, host_len, internal_file, strlen(internal_file), mode, 0, &error, 1 TSRMLS_CC))) { if (error) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); efree(error); } else { php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: file \"%s\" could not be created in phar \"%s\"", internal_file, resource->host); @@ -297,7 +297,7 @@ static php_stream * phar_wrapper_open_url(php_stream_wrapper *wrapper, char *pat if ((FAILURE == phar_get_entry_data(&idata, resource->host, host_len, internal_file, strlen(internal_file), "r", 0, &error, 0 TSRMLS_CC)) || !idata) { idata_error: if (error) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); efree(error); } else { php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: \"%s\" is not a file in phar \"%s\"", internal_file, resource->host); @@ -320,7 +320,7 @@ idata_error: /* check length, crc32 */ if (!idata->internal_file->is_crc_checked && phar_postprocess_file(idata, idata->internal_file->crc32, &error, 2 TSRMLS_CC) != SUCCESS) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); efree(error); phar_entry_delref(idata TSRMLS_CC); efree(internal_file); @@ -727,7 +727,7 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, char *url, int optio } if (PHAR_G(readonly) && (!pphar || !(*pphar)->is_data)) { php_url_free(resource); - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: write operations disabled by INI setting"); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "phar error: write operations disabled by the php.ini setting phar.readonly"); return 0; } @@ -761,7 +761,7 @@ static int phar_wrapper_unlink(php_stream_wrapper *wrapper, char *url, int optio efree(internal_file); phar_entry_remove(idata, &error TSRMLS_CC); if (error) { - php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, error); + php_stream_wrapper_log_error(wrapper, options TSRMLS_CC, "%s", error); efree(error); } return 1; @@ -792,7 +792,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, char *url_from, char } if (PHAR_G(readonly) && (!pfrom || !pfrom->is_data)) { php_url_free(resource_from); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "phar error: write operations disabled by phar.readonly INI setting"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "phar error: Write operations disabled by the php.ini setting phar.readonly"); return 0; } @@ -809,7 +809,7 @@ static int phar_wrapper_rename(php_stream_wrapper *wrapper, char *url_from, char } if (PHAR_G(readonly) && (!pto || !pto->is_data)) { php_url_free(resource_from); - php_error_docref(NULL TSRMLS_CC, E_WARNING, "phar error: write operations disabled by phar.readonly INI setting"); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "phar error: Write operations disabled by the php.ini setting phar.readonly"); return 0; } diff --git a/ext/phar/tar.c b/ext/phar/tar.c index 53255b1d2..a0b6f511f 100644 --- a/ext/phar/tar.c +++ b/ext/phar/tar.c @@ -911,7 +911,8 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int defau php_stream *oldfile, *newfile, *stubfile; int closeoldfile, free_user_stub, signature_length; struct _phar_pass_tar_info pass; - char *buf, *signature, sigbuf[8]; + char *buf, *signature, *tmp, sigbuf[8]; + char halt_stub[] = "__HALT_COMPILER();"; entry.flags = PHAR_ENT_PERM_DEF_FILE; entry.timestamp = time(NULL); @@ -990,7 +991,9 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int defau free_user_stub = 0; } - if ((pos = strstr(user_stub, "__HALT_COMPILER();")) == NULL) { + tmp = estrndup(user_stub, len); + if ((pos = php_stristr(tmp, halt_stub, len, sizeof(halt_stub) - 1)) == NULL) { + efree(tmp); if (error) { spprintf(error, 0, "illegal stub for tar-based phar \"%s\"", phar->fname); } @@ -999,6 +1002,8 @@ int phar_tar_flush(phar_archive_data *phar, char *user_stub, long len, int defau } return EOF; } + pos = user_stub + (pos - tmp); + efree(tmp); len = pos - user_stub + 18; entry.fp = php_stream_fopen_tmpfile(); diff --git a/ext/phar/tar.h b/ext/phar/tar.h index 6a38faa0b..2532c6198 100644 --- a/ext/phar/tar.h +++ b/ext/phar/tar.h @@ -24,8 +24,10 @@ # define PHAR_TAR_PACK #elif defined(__sgi) # define PHAR_TAR_PACK -#else +#elif defined(__GNUC__) # define PHAR_TAR_PACK __attribute__((__packed__)) +#else +# define PHAR_TAR_PACK #endif #if defined(__sgi) diff --git a/ext/phar/tests/badparameters.phpt b/ext/phar/tests/badparameters.phpt index d4291e622..317969799 100644 --- a/ext/phar/tests/badparameters.phpt +++ b/ext/phar/tests/badparameters.phpt @@ -172,15 +172,15 @@ Warning: Phar::offsetGet() expects parameter 1 to be %string, array given in %sb Warning: Phar::offsetSet() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d Warning: PharData::offsetUnset() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d -Write operations disabled by INI setting +Write operations disabled by the php.ini setting phar.readonly Warning: Phar::addEmptyDir() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d Warning: Phar::addFile() expects parameter 1 to be %string, array given in %sbadparameters.php on line %d Warning: Phar::addFromString() expects exactly 2 parameters, 1 given in %sbadparameters.php on line %d -Write operations disabled by INI setting +Write operations disabled by the php.ini setting phar.readonly Warning: Phar::setMetadata() expects exactly 1 parameter, 2 given in %sbadparameters.php on line %d -Write operations disabled by INI setting +Write operations disabled by the php.ini setting phar.readonly ===DONE=== diff --git a/ext/phar/tests/bug52013.phpt b/ext/phar/tests/bug52013.phpt new file mode 100644 index 000000000..f4635a466 --- /dev/null +++ b/ext/phar/tests/bug52013.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test for bug 52013 about Phar::decompressFiles(). +--DESCRIPTION-- +Test for a bug where Phar::decompressFiles() mistakenly throws BadMethodCallException. +http://bugs.php.net/bug.php?id=52013 +--CREDITS-- +Frederic Hardy frederic.hardy@mageekbox.net +--SKIPIF-- +<?php if (!extension_loaded("phar")) die("skip"); ?> +--INI-- +phar.require_hash=0 +phar.readonly=0 +open_basedir= +--FILE-- +<?php +mkdir(dirname(__FILE__) . '/testdir'); +file_put_contents(dirname(__FILE__) . '/testdir/1.php', str_repeat(' ', 1455)); + +$phar = new Phar(dirname(__FILE__) . '/compressed.phar'); +$phar->buildFromDirectory(dirname(__FILE__) . '/testdir', '/\.php$/'); +$phar->setSignatureAlgorithm(Phar::SHA1); +$phar->compressFiles(Phar::GZ); +$phar->decompressFiles(); + +echo 'ok'; +?> +--CLEAN-- +<?php +if (is_file(dirname(__FILE__) . '/testdir/1.php')) + unlink(dirname(__FILE__) . '/testdir/1.php'); +if (is_dir(dirname(__FILE__) . '/testdir')) + rmdir(dirname(__FILE__) . '/testdir'); +if (is_file(dirname(__FILE__) . '/compressed.phar')) + unlink(dirname(__FILE__) . '/compressed.phar'); +?> +--EXPECT-- +ok diff --git a/ext/phar/tests/create_new_phar_b.phpt b/ext/phar/tests/create_new_phar_b.phpt index 8f1298245..39fc31e27 100755 --- a/ext/phar/tests/create_new_phar_b.phpt +++ b/ext/phar/tests/create_new_phar_b.phpt @@ -18,7 +18,7 @@ include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.pha <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: file_put_contents(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: phar error: write operations disabled by INI setting in %screate_new_phar_b.php on line %d +Warning: file_put_contents(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d Warning: include(phar://%screate_new_phar_b.phar.php/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d diff --git a/ext/phar/tests/delete_in_phar_b.phpt b/ext/phar/tests/delete_in_phar_b.phpt index d26f51cbf..a6d5b3a35 100755 --- a/ext/phar/tests/delete_in_phar_b.phpt +++ b/ext/phar/tests/delete_in_phar_b.phpt @@ -37,7 +37,7 @@ This is a This is b This is b/c -Warning: unlink(): phar error: write operations disabled by INI setting in %sdelete_in_phar_b.php on line %d +Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d ===AFTER=== This is a This is b diff --git a/ext/phar/tests/open_for_write_existing_b.phpt b/ext/phar/tests/open_for_write_existing_b.phpt index f0474372a..ef48906de 100755 --- a/ext/phar/tests/open_for_write_existing_b.phpt +++ b/ext/phar/tests/open_for_write_existing_b.phpt @@ -36,7 +36,7 @@ include $pname . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_b.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_b.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_b.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_existing_b.php on line %d diff --git a/ext/phar/tests/open_for_write_existing_b_5_2.phpt b/ext/phar/tests/open_for_write_existing_b_5_2.phpt index 453d702d8..03edd54e5 100644 --- a/ext/phar/tests/open_for_write_existing_b_5_2.phpt +++ b/ext/phar/tests/open_for_write_existing_b_5_2.phpt @@ -34,7 +34,7 @@ include $pname . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_b_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d diff --git a/ext/phar/tests/open_for_write_existing_c.phpt b/ext/phar/tests/open_for_write_existing_c.phpt index 3f1d76bac..f64d538ef 100755 --- a/ext/phar/tests/open_for_write_existing_c.phpt +++ b/ext/phar/tests/open_for_write_existing_c.phpt @@ -30,7 +30,7 @@ include $pname . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_c.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_c.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_c.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d diff --git a/ext/phar/tests/open_for_write_existing_c_5_2.phpt b/ext/phar/tests/open_for_write_existing_c_5_2.phpt index 2ef41e943..2d5a98398 100644 --- a/ext/phar/tests/open_for_write_existing_c_5_2.phpt +++ b/ext/phar/tests/open_for_write_existing_c_5_2.phpt @@ -28,7 +28,7 @@ include $pname . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_c_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.php/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d diff --git a/ext/phar/tests/open_for_write_newfile_b.phpt b/ext/phar/tests/open_for_write_newfile_b.phpt index 9cfeeccec..45131c489 100755 --- a/ext/phar/tests/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/open_for_write_newfile_b.phpt @@ -38,7 +38,7 @@ include $pname . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_b.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_b.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d diff --git a/ext/phar/tests/open_for_write_newfile_b_5_2.phpt b/ext/phar/tests/open_for_write_newfile_b_5_2.phpt index 6cb61b74c..7d43f1c8e 100644 --- a/ext/phar/tests/open_for_write_newfile_b_5_2.phpt +++ b/ext/phar/tests/open_for_write_newfile_b_5_2.phpt @@ -36,7 +36,7 @@ include $pname . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_b_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d diff --git a/ext/phar/tests/open_for_write_newfile_c.phpt b/ext/phar/tests/open_for_write_newfile_c.phpt index fc509a5a5..d79005111 100755 --- a/ext/phar/tests/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/open_for_write_newfile_c.phpt @@ -32,7 +32,7 @@ include $pname . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_c.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_c.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d diff --git a/ext/phar/tests/open_for_write_newfile_c_5_2.phpt b/ext/phar/tests/open_for_write_newfile_c_5_2.phpt index f2718495d..421aa98d7 100644 --- a/ext/phar/tests/open_for_write_newfile_c_5_2.phpt +++ b/ext/phar/tests/open_for_write_newfile_c_5_2.phpt @@ -30,7 +30,7 @@ include $pname . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.php'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_c_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.php/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d diff --git a/ext/phar/tests/phar_oo_011b.phpt b/ext/phar/tests/phar_oo_011b.phpt index 37a0e570a..36d9963a2 100755 --- a/ext/phar/tests/phar_oo_011b.phpt +++ b/ext/phar/tests/phar_oo_011b.phpt @@ -35,5 +35,5 @@ unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php'); __halt_compiler(); ?> --EXPECTF-- -Exception: Write operations disabled by INI setting +Exception: Write operations disabled by the php.ini setting phar.readonly ===DONE=== diff --git a/ext/phar/tests/phar_oo_012b.phpt b/ext/phar/tests/phar_oo_012b.phpt index 01cf77698..80d8ed8dc 100755 --- a/ext/phar/tests/phar_oo_012b.phpt +++ b/ext/phar/tests/phar_oo_012b.phpt @@ -38,5 +38,5 @@ unlink(dirname(__FILE__) . '/files/phar_oo_test.phar.php'); __halt_compiler(); ?> --EXPECTF-- -Exception: Write operations disabled by INI setting +Exception: Write operations disabled by the php.ini setting phar.readonly ===DONE=== diff --git a/ext/phar/tests/phar_setsignaturealgo1.phpt b/ext/phar/tests/phar_setsignaturealgo1.phpt index edc032e7b..eacee7bb8 100644 --- a/ext/phar/tests/phar_setsignaturealgo1.phpt +++ b/ext/phar/tests/phar_setsignaturealgo1.phpt @@ -3,6 +3,7 @@ Phar::setSignatureAlgorithm() --SKIPIF-- <?php if (!extension_loaded("phar")) die("skip"); ?> <?php if ( extension_loaded("hash")) die("skip extension hash conflicts"); ?> +<?php if (!defined("Phar::PGP")) die("skip PGP Signature algorithm not available"); ?> --INI-- phar.require_hash=0 phar.readonly=0 diff --git a/ext/phar/tests/pharfileinfo_setmetadata.phpt b/ext/phar/tests/pharfileinfo_setmetadata.phpt index 5b34d7dde..8fb6935f2 100644 --- a/ext/phar/tests/pharfileinfo_setmetadata.phpt +++ b/ext/phar/tests/pharfileinfo_setmetadata.phpt @@ -46,8 +46,8 @@ $b->setMetadata(1,2,3); --EXPECTF-- Phar entry is a temporary directory (not an actual entry in the archive), cannot set metadata Phar entry is a temporary directory (not an actual entry in the archive), cannot delete metadata -Write operations disabled by phar.readonly INI setting -Write operations disabled by phar.readonly INI setting +Write operations disabled by the php.ini setting phar.readonly +Write operations disabled by the php.ini setting phar.readonly Warning: PharFileInfo::setMetadata() expects exactly 1 parameter, 3 given in %spharfileinfo_setmetadata.php on line %d ===DONE=== diff --git a/ext/phar/tests/security.phpt b/ext/phar/tests/security.phpt index 2d54db790..f2944da41 100644 --- a/ext/phar/tests/security.phpt +++ b/ext/phar/tests/security.phpt @@ -32,5 +32,5 @@ include $fname2; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.1.php'); ?> --EXPECT-- bool(false) -Write operations disabled by INI setting +Write operations disabled by the php.ini setting phar.readonly ===DONE===
\ No newline at end of file diff --git a/ext/phar/tests/tar/create_new_phar_b.phpt b/ext/phar/tests/tar/create_new_phar_b.phpt index a608be470..371e47d93 100644 --- a/ext/phar/tests/tar/create_new_phar_b.phpt +++ b/ext/phar/tests/tar/create_new_phar_b.phpt @@ -18,7 +18,7 @@ include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.pha <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: file_put_contents(phar://%screate_new_phar_b.phar.tar/a.php): failed to open stream: phar error: write operations disabled by INI setting in %screate_new_phar_b.php on line %d +Warning: file_put_contents(phar://%screate_new_phar_b.phar.tar/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d Warning: include(phar://%screate_new_phar_b.phar.tar/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d diff --git a/ext/phar/tests/tar/delete_in_phar_b.phpt b/ext/phar/tests/tar/delete_in_phar_b.phpt index 2af1c66de..a67bf7a16 100644 --- a/ext/phar/tests/tar/delete_in_phar_b.phpt +++ b/ext/phar/tests/tar/delete_in_phar_b.phpt @@ -40,7 +40,7 @@ This is a This is b This is b/c -Warning: unlink(): phar error: write operations disabled by INI setting in %sdelete_in_phar_b.php on line %d +Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d ===AFTER=== This is a This is b diff --git a/ext/phar/tests/tar/open_for_write_existing_b.phpt b/ext/phar/tests/tar/open_for_write_existing_b.phpt index c8dcd3cb7..fa631e618 100755 --- a/ext/phar/tests/tar/open_for_write_existing_b.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_b.phpt @@ -49,7 +49,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_b.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_b.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_b.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_existing_b.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt b/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt index 2a2228e87..a6fea062a 100644 --- a/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_b_5_2.phpt @@ -47,7 +47,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_b_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_b_5_2.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_existing_c.phpt b/ext/phar/tests/tar/open_for_write_existing_c.phpt index 929558088..aeb28b02b 100755 --- a/ext/phar/tests/tar/open_for_write_existing_c.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_c.phpt @@ -43,7 +43,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_c.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_c.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_c.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt b/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt index f58312893..091b7df2f 100644 --- a/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt +++ b/ext/phar/tests/tar/open_for_write_existing_c_5_2.phpt @@ -41,7 +41,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_c_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.tar/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_newfile_b.phpt b/ext/phar/tests/tar/open_for_write_newfile_b.phpt index f322ac27a..2ea557b8a 100755 --- a/ext/phar/tests/tar/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_b.phpt @@ -50,7 +50,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_b.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_b.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt b/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt index 2af7b6e80..1bb02a0be 100644 --- a/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_b_5_2.phpt @@ -48,7 +48,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_b_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_newfile_c.phpt b/ext/phar/tests/tar/open_for_write_newfile_c.phpt index 192516201..f7cbb3a9a 100755 --- a/ext/phar/tests/tar/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_c.phpt @@ -43,7 +43,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_c.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_c.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d diff --git a/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt b/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt index 13c8d6fb7..8a7d8733f 100644 --- a/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt +++ b/ext/phar/tests/tar/open_for_write_newfile_c_5_2.phpt @@ -41,7 +41,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.tar'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_c_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.tar/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d diff --git a/ext/phar/tests/zip/create_new_phar_b.phpt b/ext/phar/tests/zip/create_new_phar_b.phpt index e6a5398f6..5fda5b4fd 100644 --- a/ext/phar/tests/zip/create_new_phar_b.phpt +++ b/ext/phar/tests/zip/create_new_phar_b.phpt @@ -18,7 +18,7 @@ include 'phar://' . dirname(__FILE__) . '/' . basename(__FILE__, '.php') . '.pha <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: file_put_contents(phar://%screate_new_phar_b.phar.zip/a.php): failed to open stream: phar error: write operations disabled by INI setting in %screate_new_phar_b.php on line %d +Warning: file_put_contents(phar://%screate_new_phar_b.phar.zip/a.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %screate_new_phar_b.php on line %d Warning: include(phar://%screate_new_phar_b.phar.zip/a.php): failed to open stream: %s in %screate_new_phar_b.php on line %d diff --git a/ext/phar/tests/zip/delete_in_phar_b.phpt b/ext/phar/tests/zip/delete_in_phar_b.phpt index 7bc3a2bf1..eb1a6cca6 100644 --- a/ext/phar/tests/zip/delete_in_phar_b.phpt +++ b/ext/phar/tests/zip/delete_in_phar_b.phpt @@ -39,7 +39,7 @@ This is a This is b This is b/c -Warning: unlink(): phar error: write operations disabled by INI setting in %sdelete_in_phar_b.php on line %d +Warning: unlink(): phar error: write operations disabled by the php.ini setting phar.readonly in %sdelete_in_phar_b.php on line %d ===AFTER=== This is a This is b diff --git a/ext/phar/tests/zip/open_for_write_existing_b.phpt b/ext/phar/tests/zip/open_for_write_existing_b.phpt index afb73f61c..b997c6829 100755 --- a/ext/phar/tests/zip/open_for_write_existing_b.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_b.phpt @@ -46,7 +46,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_b.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_b.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_b.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_b.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt b/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt index 30cafcf82..b88a49632 100644 --- a/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_b_5_2.phpt @@ -44,7 +44,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_b_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_b_5_2.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_b_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %spen_for_write_existing_b_5_2.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_existing_c.phpt b/ext/phar/tests/zip/open_for_write_existing_c.phpt index 1d4e8f345..313ee4ab3 100755 --- a/ext/phar/tests/zip/open_for_write_existing_c.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_c.phpt @@ -40,7 +40,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_c.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_c.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_c.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %spen_for_write_existing_c.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt b/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt index 24bc8d511..9e23fd55b 100644 --- a/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt +++ b/ext/phar/tests/zip/open_for_write_existing_c_5_2.phpt @@ -38,7 +38,7 @@ include $alias . '/b/c.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_existing_c_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_existing_c_5_2.phar.zip/b/c.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_existing_c_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_existing_c_5_2.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_newfile_b.phpt b/ext/phar/tests/zip/open_for_write_newfile_b.phpt index 1a57206ac..96fd2e426 100755 --- a/ext/phar/tests/zip/open_for_write_newfile_b.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_b.phpt @@ -49,7 +49,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_b.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_b.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_b.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt b/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt index e390a3a41..3032427bc 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_b_5_2.phpt @@ -47,7 +47,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_b_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_b_5_2.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_b_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_b_5_2.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_newfile_c.phpt b/ext/phar/tests/zip/open_for_write_newfile_c.phpt index e9c68aa07..ef580cb22 100755 --- a/ext/phar/tests/zip/open_for_write_newfile_c.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_c.phpt @@ -43,7 +43,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_c.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_c.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c.php on line %d Warning: fwrite() expects parameter 1 to be resource, boolean given in %sopen_for_write_newfile_c.php on line %d diff --git a/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt b/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt index 20c1d338a..9bf5af54f 100644 --- a/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt +++ b/ext/phar/tests/zip/open_for_write_newfile_c_5_2.phpt @@ -41,7 +41,7 @@ include $alias . '/b/new.php'; <?php unlink(dirname(__FILE__) . '/' . basename(__FILE__, '.clean.php') . '.phar.zip'); ?> --EXPECTF-- -Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by INI setting in %sopen_for_write_newfile_c_5_2.php on line %d +Warning: fopen(phar://%sopen_for_write_newfile_c_5_2.phar.zip/b/new.php): failed to open stream: phar error: write operations disabled by the php.ini setting phar.readonly in %sopen_for_write_newfile_c_5_2.php on line %d Warning: fwrite(): supplied argument is not a valid stream resource in %sopen_for_write_newfile_c_5_2.php on line %d diff --git a/ext/phar/util.c b/ext/phar/util.c index e65f76061..e91819666 100644 --- a/ext/phar/util.c +++ b/ext/phar/util.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: util.c 284729 2009-07-24 23:53:24Z cellog $ */ +/* $Id: util.c 298626 2010-04-26 23:55:03Z kalle $ */ #include "phar_internal.h" #ifdef PHAR_HASH_OK @@ -201,7 +201,7 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, int filename_len, entry.tmp = estrndup(filename, filename_len); } } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && !is_phar && (!php_checkuid(entry.tmp, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { efree(entry.tmp); efree(entry.filename); @@ -850,7 +850,7 @@ int phar_open_archive_fp(phar_archive_data *phar TSRMLS_DC) /* {{{ */ if (phar_get_pharfp(phar TSRMLS_CC)) { return SUCCESS; } -#if PHP_MAJOR_VERSION < 6 +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(phar->fname, NULL, CHECKUID_ALLOW_ONLY_FILE))) { return FAILURE; } diff --git a/ext/phar/zip.c b/ext/phar/zip.c index 383561ab8..eb64dea04 100644 --- a/ext/phar/zip.c +++ b/ext/phar/zip.c @@ -1167,6 +1167,9 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, long len, int defau char *pos; smart_str main_metadata_str = {0}; static const char newstub[] = "<?php // zip-based phar archive stub file\n__HALT_COMPILER();"; + char halt_stub[] = "__HALT_COMPILER();"; + char *tmp; + php_stream *stubfile, *oldfile; php_serialize_data_t metadata_hash; int free_user_stub, closeoldfile = 0; @@ -1261,8 +1264,9 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, long len, int defau free_user_stub = 0; } - if ((pos = strstr(user_stub, "__HALT_COMPILER();")) == NULL) - { + tmp = estrndup(user_stub, len); + if ((pos = php_stristr(tmp, halt_stub, len, sizeof(halt_stub) - 1)) == NULL) { + efree(tmp); if (error) { spprintf(error, 0, "illegal stub for zip-based phar \"%s\"", phar->fname); } @@ -1271,6 +1275,8 @@ int phar_zip_flush(phar_archive_data *phar, char *user_stub, long len, int defau } return EOF; } + pos = user_stub + (pos - tmp); + efree(tmp); len = pos - user_stub + 18; entry.fp = php_stream_fopen_tmpfile(); diff --git a/ext/posix/posix.c b/ext/posix/posix.c index 3d4dd640f..f3d936650 100644 --- a/ext/posix/posix.c +++ b/ext/posix/posix.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: posix.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: posix.c 300764 2010-06-26 16:03:39Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -295,7 +295,7 @@ const zend_function_entry posix_functions[] = { #endif PHP_FE(posix_get_last_error, arginfo_posix_get_last_error) - PHP_FALIAS(posix_errno, posix_get_last_error, NULL) + PHP_FALIAS(posix_errno, posix_get_last_error, arginfo_posix_get_last_error) PHP_FE(posix_strerror, arginfo_posix_strerror) #ifdef HAVE_INITGROUPS PHP_FE(posix_initgroups, arginfo_posix_initgroups) @@ -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: 293036 $"); + php_info_print_table_row(2, "Revision", "$Revision: 300764 $"); php_info_print_table_end(); } /* }}} */ @@ -703,7 +703,9 @@ static int php_posix_stream_get_fd(zval *zfp, int *fd TSRMLS_DC) /* {{{ */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "expects argument 1 to be a valid stream resource"); return 0; } - if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { + if (php_stream_can_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT) == SUCCESS) { + php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT, (void*)fd, 0); + } else if (php_stream_can_cast(stream, PHP_STREAM_AS_FD) == SUCCESS) { php_stream_cast(stream, PHP_STREAM_AS_FD, (void*)fd, 0); } else { php_error_docref(NULL TSRMLS_CC, E_WARNING, "could not use stream of type '%s'", diff --git a/ext/posix/tests/posix_getgrgid_basic.phpt b/ext/posix/tests/posix_getgrgid_basic.phpt index 866e11681..fdcdf35a4 100644 --- a/ext/posix/tests/posix_getgrgid_basic.phpt +++ b/ext/posix/tests/posix_getgrgid_basic.phpt @@ -20,11 +20,11 @@ Basic test of POSIX getgid and getgrid fucntions Array ( [name] => %s - [passwd] => %s + [passwd] => %a [members] => Array %a [gid] => %d ) ===DONE=== -
\ No newline at end of file + diff --git a/ext/posix/tests/posix_uname.phpt b/ext/posix/tests/posix_uname.phpt deleted file mode 100644 index 3acbdaf13..000000000 --- a/ext/posix/tests/posix_uname.phpt +++ /dev/null @@ -1,35 +0,0 @@ ---TEST-- -Test posix_uname() ---DESCRIPTION-- -Gets information about the system. -Source code: ext/posix/posix.c ---CREDITS-- -Falko Menge, mail at falko-menge dot de -PHP Testfest Berlin 2009-05-10 ---SKIPIF-- -<?php - if (!extension_loaded('posix')) { - die('SKIP - POSIX extension not available'); - } -?> ---FILE-- -<?php - $uname = posix_uname(); - unset($uname['domainname']); - var_dump($uname); -?> -===DONE=== ---EXPECTF-- -array(5) { - ["sysname"]=> - string(%d) "%s" - ["nodename"]=> - string(%d) "%s" - ["release"]=> - string(%d) "%s" - ["version"]=> - string(%d) "%s" - ["machine"]=> - string(%d) "%s" -} -===DONE=== diff --git a/ext/reflection/php_reflection.c b/ext/reflection/php_reflection.c index ae77dd2d3..a1363a943 100644 --- a/ext/reflection/php_reflection.c +++ b/ext/reflection/php_reflection.c @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_reflection.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_reflection.c 300393 2010-06-11 23:37:55Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -79,7 +79,7 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection) #define METHOD_NOTSTATIC(ce) \ if (!this_ptr || !instanceof_function(Z_OBJCE_P(this_ptr), ce TSRMLS_CC)) { \ - zend_error(E_ERROR, "%s() cannot be called statically", get_active_function_name(TSRMLS_C)); \ + php_error_docref(NULL TSRMLS_CC, E_ERROR, "%s() cannot be called statically", get_active_function_name(TSRMLS_C)); \ return; \ } \ @@ -97,7 +97,7 @@ ZEND_DECLARE_MODULE_GLOBALS(reflection) intern = (reflection_object *) zend_object_store_get_object(getThis() TSRMLS_CC); \ if (intern == NULL || intern->ptr == NULL) { \ RETURN_ON_EXCEPTION \ - zend_error(E_ERROR, "Internal error: Failed to retrieve the reflection object"); \ + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the reflection object"); \ } \ target = intern->ptr; \ @@ -1079,7 +1079,7 @@ static void _extension_string(string *str, zend_module_entry *module, char *inde /* Is there a better way of doing this? */ while (func->fname) { if (zend_hash_find(EG(function_table), func->fname, strlen(func->fname) + 1, (void**) &fptr) == FAILURE) { - zend_error(E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname); func++; continue; } @@ -1427,7 +1427,7 @@ ZEND_METHOD(reflection, export) } if (!retval_ptr) { - zend_error(E_WARNING, "%s::__toString() did not return anything", Z_OBJCE_P(object)->name); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::__toString() did not return anything", Z_OBJCE_P(object)->name); RETURN_FALSE; } @@ -2408,7 +2408,7 @@ ZEND_METHOD(reflection_parameter, getDefaultValue) *return_value = precv->op2.u.constant; INIT_PZVAL(return_value); - if (Z_TYPE_P(return_value) != IS_CONSTANT) { + if (Z_TYPE_P(return_value) != IS_CONSTANT && Z_TYPE_P(return_value) != IS_CONSTANT_ARRAY) { zval_copy_ctor(return_value); } zval_update_constant_ex(&return_value, (void*)0, param->fptr->common.scope TSRMLS_CC); @@ -3002,7 +3002,7 @@ static void reflection_class_object_ctor(INTERNAL_FUNCTION_PARAMETERS, int is_ob return; } } else { - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z", &argument) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &argument) == FAILURE) { return; } } @@ -3384,7 +3384,9 @@ ZEND_METHOD(reflection_class, hasMethod) GET_REFLECTION_OBJECT_PTR(ce); lc_name = zend_str_tolower_dup(name, name_len); - if (zend_hash_exists(&ce->function_table, lc_name, name_len + 1)) { + if ((ce == zend_ce_closure && (name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) + && memcmp(lc_name, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0) + || zend_hash_exists(&ce->function_table, lc_name, name_len + 1)) { efree(lc_name); RETURN_TRUE; } else { @@ -3401,6 +3403,7 @@ ZEND_METHOD(reflection_class, getMethod) reflection_object *intern; zend_class_entry *ce; zend_function *mptr; + zval obj_tmp; char *name, *lc_name; int name_len; @@ -3419,6 +3422,14 @@ ZEND_METHOD(reflection_class, getMethod) method and not the closure definition itself */ reflection_method_factory(ce, mptr, NULL, return_value TSRMLS_CC); efree(lc_name); + } else if (ce == zend_ce_closure && !intern->obj && (name_len == sizeof(ZEND_INVOKE_FUNC_NAME)-1) + && memcmp(lc_name, ZEND_INVOKE_FUNC_NAME, sizeof(ZEND_INVOKE_FUNC_NAME)-1) == 0 + && object_init_ex(&obj_tmp, ce) == SUCCESS && (mptr = zend_get_closure_invoke_method(&obj_tmp TSRMLS_CC)) != NULL) { + /* don't assign closure_object since we only reflect the invoke handler + method and not the closure definition itself */ + reflection_method_factory(ce, mptr, NULL, return_value TSRMLS_CC); + zval_dtor(&obj_tmp); + efree(lc_name); } else if (zend_hash_find(&ce->function_table, lc_name, name_len + 1, (void**) &mptr) == SUCCESS) { reflection_method_factory(ce, mptr, NULL, return_value TSRMLS_CC); efree(lc_name); @@ -3895,7 +3906,7 @@ ZEND_METHOD(reflection_class, newInstance) if (retval_ptr) { zval_ptr_dtor(&retval_ptr); } - zend_error(E_WARNING, "Invocation of %s's constructor failed", ce->name); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invocation of %s's constructor failed", ce->name); RETURN_NULL(); } if (retval_ptr) { @@ -3975,7 +3986,7 @@ ZEND_METHOD(reflection_class, newInstanceArgs) if (retval_ptr) { zval_ptr_dtor(&retval_ptr); } - zend_error(E_WARNING, "Invocation of %s's constructor failed", ce->name); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invocation of %s's constructor failed", ce->name); RETURN_NULL(); } if (retval_ptr) { @@ -4090,7 +4101,7 @@ ZEND_METHOD(reflection_class, isSubclassOf) if (instanceof_function(Z_OBJCE_P(class_name), reflection_class_ptr TSRMLS_CC)) { argument = (reflection_object *) zend_object_store_get_object(class_name TSRMLS_CC); if (argument == NULL || argument->ptr == NULL) { - zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); /* Bails out */ } class_ce = argument->ptr; @@ -4135,7 +4146,7 @@ ZEND_METHOD(reflection_class, implementsInterface) if (instanceof_function(Z_OBJCE_P(interface), reflection_class_ptr TSRMLS_CC)) { argument = (reflection_object *) zend_object_store_get_object(interface TSRMLS_CC); if (argument == NULL || argument->ptr == NULL) { - zend_error(E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Failed to retrieve the argument's reflection object"); /* Bails out */ } interface_ce = argument->ptr; @@ -4520,7 +4531,7 @@ ZEND_METHOD(reflection_property, getValue) if ((ref->prop.flags & ZEND_ACC_STATIC)) { zend_update_class_constants(intern->ce TSRMLS_CC); if (zend_hash_quick_find(CE_STATIC_MEMBERS(intern->ce), ref->prop.name, ref->prop.name_length + 1, ref->prop.h, (void **) &member) == FAILURE) { - zend_error(E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name); /* Bails out */ } MAKE_COPY_ZVAL(member, return_value); @@ -4575,7 +4586,7 @@ ZEND_METHOD(reflection_property, setValue) prop_table = CE_STATIC_MEMBERS(intern->ce); if (zend_hash_quick_find(prop_table, ref->prop.name, ref->prop.name_length + 1, ref->prop.h, (void **) &variable_ptr) == FAILURE) { - zend_error(E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name); + php_error_docref(NULL TSRMLS_CC, E_ERROR, "Internal error: Could not find the property %s::%s", intern->ce->name, ref->prop.name); /* Bails out */ } if (*variable_ptr == value) { @@ -4809,7 +4820,7 @@ ZEND_METHOD(reflection_extension, getFunctions) /* Is there a better way of doing this? */ while (func->fname) { if (zend_hash_find(EG(function_table), func->fname, strlen(func->fname) + 1, (void**) &fptr) == FAILURE) { - zend_error(E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Internal error: Cannot find extension function %s in global function table", func->fname); func++; continue; } @@ -5285,7 +5296,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_property_export, 0, 0, 2) ZEND_ARG_INFO(0, return) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_property___construct, 0, 0, 0) +ZEND_BEGIN_ARG_INFO_EX(arginfo_reflection_property___construct, 0, 0, 2) ZEND_ARG_INFO(0, class) ZEND_ARG_INFO(0, name) ZEND_END_ARG_INFO() @@ -5494,7 +5505,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: 293036 $"); + php_info_print_table_row(2, "Version", "$Revision: 300393 $"); php_info_print_table_end(); } /* }}} */ @@ -5508,7 +5519,7 @@ zend_module_entry reflection_module_entry = { /* {{{ */ NULL, NULL, PHP_MINFO(reflection), - "$Revision: 293036 $", + "$Revision: 300393 $", STANDARD_MODULE_PROPERTIES }; /* }}} */ diff --git a/ext/reflection/tests/ReflectionMethod_basic2.phpt b/ext/reflection/tests/ReflectionMethod_basic2.phpt index e2c23c1c1..c91af6770 100644 --- a/ext/reflection/tests/ReflectionMethod_basic2.phpt +++ b/ext/reflection/tests/ReflectionMethod_basic2.phpt @@ -153,8 +153,8 @@ __toString(): string(%d) "Method [ <internal:Reflection, ctor> public method __construct ] { - Parameters [2] { - Parameter #0 [ <optional> $class ] - Parameter #1 [ <optional> $name ] + Parameter #0 [ <required> $class ] + Parameter #1 [ <required> $name ] } } " @@ -163,8 +163,8 @@ export(): string(%d) "Method [ <internal:Reflection, ctor> public method __construct ] { - Parameters [2] { - Parameter #0 [ <optional> $class ] - Parameter #1 [ <optional> $name ] + Parameter #0 [ <required> $class ] + Parameter #1 [ <required> $name ] } } " diff --git a/ext/reflection/tests/bug42976.phpt b/ext/reflection/tests/bug42976.phpt index 3669d957d..2e4ade284 100644 --- a/ext/reflection/tests/bug42976.phpt +++ b/ext/reflection/tests/bug42976.phpt @@ -28,11 +28,11 @@ string(9) "x.changed" Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 15 -Warning: Invocation of C's constructor failed in %sbug42976.php on line 15 +Warning: ReflectionClass::newInstance(): Invocation of C's constructor failed in %sbug42976.php on line 15 string(10) "x.original" Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 18 -Warning: Invocation of C's constructor failed in %sbug42976.php on line 18 +Warning: ReflectionClass::newInstanceArgs(): Invocation of C's constructor failed in %sbug42976.php on line 18 string(10) "x.original" Done diff --git a/ext/reflection/tests/bug51905.phpt b/ext/reflection/tests/bug51905.phpt new file mode 100644 index 000000000..8969924e4 --- /dev/null +++ b/ext/reflection/tests/bug51905.phpt @@ -0,0 +1,28 @@ +--TEST-- +Bug #51905 (ReflectionParameter fails if default value is an array with an access to self::) +--FILE-- +<?php + +class Bar { + const Y = 20; +} + +class Foo extends Bar { + const X = 12; + public function x($x = 1, $y = array(self::X), $z = parent::Y) {} +} + +$clazz = new ReflectionClass('Foo'); +$method = $clazz->getMethod('x'); +foreach ($method->getParameters() as $param) { + if ( $param->isDefaultValueAvailable()) + echo '$', $param->getName(), ' : ', var_export($param->getDefaultValue(), 1), "\n"; +} + +?> +--EXPECT-- +$x : 1 +$y : array ( + 0 => 12, +) +$z : 20 diff --git a/ext/reflection/tests/bug51911.phpt b/ext/reflection/tests/bug51911.phpt new file mode 100644 index 000000000..12eb459fb --- /dev/null +++ b/ext/reflection/tests/bug51911.phpt @@ -0,0 +1,22 @@ +--TEST-- +Bug #51911 (ReflectionParameter::getDefaultValue() memory leaks with constant array) +--FILE-- +<?php + +class Foo { + const X = 1; + public function x($x = array(1)) {} +} + +$clazz = new ReflectionClass('Foo'); +$method = $clazz->getMethod('x'); +foreach ($method->getParameters() as $param) { + if ( $param->isDefaultValueAvailable()) + echo '$', $param->getName(), ' : ', var_export($param->getDefaultValue(), 1), "\n"; +} + +?> +--EXPECT-- +$x : array ( + 0 => 1, +) diff --git a/ext/reflection/tests/bug52057.phpt b/ext/reflection/tests/bug52057.phpt new file mode 100644 index 000000000..b80703571 --- /dev/null +++ b/ext/reflection/tests/bug52057.phpt @@ -0,0 +1,54 @@ +--TEST-- +Bug #52057 (ReflectionClass fails on Closure class) +--FILE-- +<?php + +$closure = function($a) { echo $a; }; + +$reflection = new ReflectionClass('closure'); +var_dump($reflection->hasMethod('__invoke')); // true + +$reflection = new ReflectionClass($closure); +var_dump($reflection->hasMethod('__invoke')); // true + +$reflection = new ReflectionObject($closure); +var_dump($reflection->hasMethod('__invoke')); // true + +$reflection = new ReflectionClass('closure'); +var_dump($h = $reflection->getMethod('__invoke')); // true +var_dump($h->class.'::'.$h->getName()); + +$reflection = new ReflectionClass($closure); +var_dump($h = $reflection->getMethod('__invoke')); // true +var_dump($h->class.'::'.$h->getName()); + +$reflection = new ReflectionObject($closure); +var_dump($h = $reflection->getMethod('__invoke')); // true +var_dump($h->class.'::'.$h->getName()); + +?> +--EXPECTF-- +bool(true) +bool(true) +bool(true) +object(ReflectionMethod)#%d (2) { + ["name"]=> + string(8) "__invoke" + ["class"]=> + string(7) "Closure" +} +string(17) "Closure::__invoke" +object(ReflectionMethod)#%d (2) { + ["name"]=> + string(8) "__invoke" + ["class"]=> + string(7) "Closure" +} +string(17) "Closure::__invoke" +object(ReflectionMethod)#%d (2) { + ["name"]=> + string(8) "__invoke" + ["class"]=> + string(7) "Closure" +} +string(17) "Closure::__invoke" diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 512f93ee6..f7b785b74 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mod_files.c 294027 2010-01-25 23:06:09Z johannes $ */ +/* $Id: mod_files.c 293036 2010-01-03 09:23:27Z sebastian $ */ #include "php.h" diff --git a/ext/session/session.c b/ext/session/session.c index 0d8ddd00c..095fc7d45 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: session.c 294515 2010-02-04 09:40:38Z pajoye $ */ +/* $Id: session.c 300296 2010-06-08 22:30:16Z pajoye $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -26,7 +26,8 @@ #include "php.h" #ifdef PHP_WIN32 -#include "win32/time.h" +# include "win32/winutil.h" +# include "win32/time.h" #else #include <sys/time.h> #endif @@ -402,6 +403,28 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ efree(buf); if (PS(entropy_length) > 0) { + unsigned char rbuf[2048]; + +#ifdef PHP_WIN32 + size_t toread = PS(entropy_length); + + if (php_win32_get_random_bytes(rbuf, (size_t) toread) == SUCCESS){ + + switch (PS(hash_func)) { + case PS_HASH_FUNC_MD5: + PHP_MD5Update(&md5_context, rbuf, toread); + break; + case PS_HASH_FUNC_SHA1: + PHP_SHA1Update(&sha1_context, rbuf, toread); + break; +# if defined(HAVE_HASH_EXT) && !defined(COMPILE_DL_HASH) + case PS_HASH_FUNC_OTHER: + PS(hash_ops)->hash_update(hash_context, rbuf, toread); + break; +# endif /* HAVE_HASH_EXT */ + } + } +#else int fd; fd = VCWD_OPEN(PS(entropy_file), O_RDONLY); @@ -431,6 +454,7 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ } close(fd); } +#endif } digest = emalloc(digest_len + 1); @@ -456,8 +480,8 @@ PHPAPI char *php_session_create_id(PS_CREATE_SID_ARGS) /* {{{ */ php_error_docref(NULL TSRMLS_CC, E_WARNING, "The ini setting hash_bits_per_character is out of range (should be 4, 5, or 6) - using 4 for now"); } - outid = emalloc((digest_len + 2) * ((8.0f / PS(hash_bits_per_character)) + 0.5)); - j = (int) (bin_to_readable((char *)digest, digest_len, outid, PS(hash_bits_per_character)) - outid); + outid = emalloc((size_t)((digest_len + 2) * ((8.0f / PS(hash_bits_per_character)) + 0.5))); + j = (int) (bin_to_readable((char *)digest, digest_len, outid, (char)PS(hash_bits_per_character)) - outid); efree(digest); if (newlen) { @@ -895,7 +919,7 @@ PS_SERIALIZER_ENCODE_FUNC(php) /* {{{ */ PS_ENCODE_LOOP( smart_str_appendl(&buf, key, key_length); - if (memchr(key, PS_DELIMITER, key_length)) { + if (memchr(key, PS_DELIMITER, key_length) || memchr(key, PS_UNDEF_MARKER, key_length)) { PHP_VAR_SERIALIZE_DESTROY(var_hash); smart_str_free(&buf); return FAILURE; @@ -1343,7 +1367,11 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ int nrand; int lensess; - PS(apply_trans_sid) = PS(use_trans_sid); + if (PS(use_only_cookies)) { + PS(apply_trans_sid) = 0; + } else { + PS(apply_trans_sid) = PS(use_trans_sid); + } switch (PS(session_status)) { case php_session_active: @@ -1445,7 +1473,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ efree(PS(id)); PS(id) = NULL; PS(send_cookie) = 1; - if (PS(use_trans_sid)) { + if (PS(use_trans_sid) && !PS(use_only_cookies)) { PS(apply_trans_sid) = 1; } } @@ -1453,7 +1481,7 @@ PHPAPI void php_session_start(TSRMLS_D) /* {{{ */ php_session_initialize(TSRMLS_C); if (!PS(use_cookies) && PS(send_cookie)) { - if (PS(use_trans_sid)) { + if (PS(use_trans_sid) && !PS(use_only_cookies)) { PS(apply_trans_sid) = 1; } PS(send_cookie) = 0; diff --git a/ext/session/tests/bug51338.phpt b/ext/session/tests/bug51338.phpt new file mode 100644 index 000000000..d806c0bf3 --- /dev/null +++ b/ext/session/tests/bug51338.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #51338 (URL-Rewriter should not get enabled if use_only_cookies is set to 1) +--SKIPIF-- +<?php include('skipif.inc'); ?> +--INI-- +session.use_only_cookies=1 +session.use_trans_sid=1 +--FILE-- +<?php +session_start(); +print_r(ob_list_handlers()); +--EXPECT-- +Array +( +) diff --git a/ext/simplexml/config.w32 b/ext/simplexml/config.w32 index 5e9a95d9a..f51367873 100644 --- a/ext/simplexml/config.w32 +++ b/ext/simplexml/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 272005 2008-12-27 12:22:38Z rrichards $ +// $Id: config.w32 295508 2010-02-25 17:08:17Z kalle $ // vim:ft=javascript ARG_WITH("simplexml", "Simple XML support", "yes"); @@ -17,7 +17,7 @@ if (PHP_SIMPLEXML == "yes") { } ADD_FLAG("CFLAGS_SIMPLEXML", "/D PHP_SIMPLEXML_EXPORTS "); } else { - PHP_SIMPLEXML == "no"; + PHP_SIMPLEXML = "no"; WARNING("simplexml not enabled; libraries and headers not found"); } } diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 1f3966ffb..430130791 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: simplexml.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: simplexml.c 299424 2010-05-17 07:50:33Z dmitry $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -988,9 +988,14 @@ static void sxe_dimension_delete(zval *object, zval *offset TSRMLS_DC) static inline char * sxe_xmlNodeListGetString(xmlDocPtr doc, xmlNodePtr list, int inLine) /* {{{ */ { xmlChar *tmp = xmlNodeListGetString(doc, list, inLine); - char *res = estrdup((char*)tmp); - - xmlFree(tmp); + char *res; + + if (tmp) { + res = estrdup((char*)tmp); + xmlFree(tmp); + } else { + res = STR_EMPTY_ALLOC(); + } return res; } @@ -1078,6 +1083,9 @@ static HashTable * sxe_get_prop_hash(zval *object, int is_debug TSRMLS_DC) /* {{ zend_hash_clean(sxe->properties); rv = sxe->properties; } else { + if (GC_G(gc_active)) { + return NULL; + } ALLOC_HASHTABLE(rv); zend_hash_init(rv, 0, NULL, ZVAL_PTR_DTOR, 0); sxe->properties = rv; @@ -1253,31 +1261,29 @@ SXE_METHOD(xpath) } result = retval->nodesetval; - if (!result) { - xmlXPathFreeObject(retval); - RETURN_FALSE; - } 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) { - MAKE_STD_ZVAL(value); - /** - * Detect the case where the last selector is text(), simplexml - * always accesses the text() child by default, therefore we assign - * to the parent node. - */ - if (nodeptr->type == XML_TEXT_NODE) { - _node_as_zval(sxe, nodeptr->parent, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC); - } else if (nodeptr->type == XML_ATTRIBUTE_NODE) { - _node_as_zval(sxe, nodeptr->parent, value, SXE_ITER_ATTRLIST, (char*)nodeptr->name, nodeptr->ns ? (xmlChar *)nodeptr->ns->href : NULL, 0 TSRMLS_CC); - } else { - _node_as_zval(sxe, nodeptr, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC); - } + if (result != NULL) { + 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) { + MAKE_STD_ZVAL(value); + /** + * Detect the case where the last selector is text(), simplexml + * always accesses the text() child by default, therefore we assign + * to the parent node. + */ + if (nodeptr->type == XML_TEXT_NODE) { + _node_as_zval(sxe, nodeptr->parent, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC); + } else if (nodeptr->type == XML_ATTRIBUTE_NODE) { + _node_as_zval(sxe, nodeptr->parent, value, SXE_ITER_ATTRLIST, (char*)nodeptr->name, nodeptr->ns ? (xmlChar *)nodeptr->ns->href : NULL, 0 TSRMLS_CC); + } else { + _node_as_zval(sxe, nodeptr, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC); + } - add_next_index_zval(return_value, value); + add_next_index_zval(return_value, value); + } } } @@ -1863,13 +1869,17 @@ static int sxe_count_elements(zval *object, long *count TSRMLS_DC) /* {{{ */ } /* }}} */ -/* {{{ proto int SimpleXMLIterator::count() +/* {{{ proto int SimpleXMLElement::count() Get number of child elements */ SXE_METHOD(count) { long count = 0; php_sxe_object *sxe = php_sxe_fetch_object(getThis() TSRMLS_CC); + if (zend_parse_parameters_none() == FAILURE) { + return; + } + php_sxe_count_elements_helper(sxe, &count TSRMLS_CC); RETURN_LONG(count); @@ -2557,7 +2567,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: 293036 $"); + php_info_print_table_row(2, "Revision", "$Revision: 299424 $"); php_info_print_table_row(2, "Schema support", #ifdef LIBXML_SCHEMAS_ENABLED "enabled"); diff --git a/ext/simplexml/tests/bug48601.phpt b/ext/simplexml/tests/bug48601.phpt new file mode 100644 index 000000000..24bf2bf8a --- /dev/null +++ b/ext/simplexml/tests/bug48601.phpt @@ -0,0 +1,20 @@ +--TEST-- +Bug #48601 (xpath() returns FALSE for legitimate query) +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php + +$sxe = simplexml_load_string('<root><node1>1</node1></root>'); + +$nodes = $sxe->xpath("/root/node2/@test"); + +if (! is_array($nodes)) { + echo "An error occured\n"; +} else { + echo "Result Count: " . count($nodes) . "\n"; +} + +?> +--EXPECTF-- +Result Count: 0 diff --git a/ext/simplexml/tests/bug51615.phpt b/ext/simplexml/tests/bug51615.phpt new file mode 100644 index 000000000..75f6769ff --- /dev/null +++ b/ext/simplexml/tests/bug51615.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #51615 (PHP crash with wrong HTML in SimpleXML) +--SKIPIF-- +<?php if (!extension_loaded("simplexml")) print "skip"; ?> +--FILE-- +<?php + +$dom = new DOMDocument; +$dom->loadHTML('<span title=""y">x</span><span title=""z">x</span>'); +$html = simplexml_import_dom($dom); + +var_dump($html->body->span); + +foreach ($html->body->span as $obj) { + var_dump((string)$obj->title); +} + +?> +--EXPECTF-- +Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d + +Warning: DOMDocument::loadHTML(): error parsing attribute name in Entity, line: 1 in %s on line %d +object(SimpleXMLElement)#%d (2) { + ["@attributes"]=> + array(2) { + ["title"]=> + string(0) "" + ["y"]=> + string(0) "" + } + [0]=> + string(1) "x" +} +string(0) "" +string(0) "" diff --git a/ext/snmp/config.w32 b/ext/snmp/config.w32 index 6ee042f6e..45a9712ed 100644 --- a/ext/snmp/config.w32 +++ b/ext/snmp/config.w32 @@ -1,4 +1,4 @@ -// $Id: config.w32 294815 2010-02-09 16:42:40Z pajoye $ +// $Id: config.w32 294814 2010-02-09 16:38:24Z pajoye $ // vim:ft=javascript ARG_WITH("snmp", "SNMP support", "no"); diff --git a/ext/soap/php_encoding.c b/ext/soap/php_encoding.c index 6cc6113ca..621ae0858 100644 --- a/ext/soap/php_encoding.c +++ b/ext/soap/php_encoding.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_encoding.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_encoding.c 300457 2010-06-15 08:22:51Z dmitry $ */ #include <time.h> @@ -1562,8 +1562,13 @@ static zval *to_zval_object_ex(encodeTypePtr type, xmlNodePtr data, zend_class_e } model_to_zval_object(ret, sdlType->model, data, sdl TSRMLS_CC); if (redo_any) { - if (get_zval_property(ret, "any" TSRMLS_CC) == NULL) { + zval *tmp = get_zval_property(ret, "any" TSRMLS_CC); + + if (tmp == NULL) { model_to_zval_any(ret, data->children TSRMLS_CC); + } else if (Z_REFCOUNT_P(tmp) == 0) { + zval_dtor(tmp); + efree(tmp); } zval_ptr_dtor(&redo_any); } diff --git a/ext/soap/php_http.c b/ext/soap/php_http.c index f13e89af4..a6a645fa9 100644 --- a/ext/soap/php_http.c +++ b/ext/soap/php_http.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_http.c 294456 2010-02-03 20:29:09Z pajoye $ */ +/* $Id: php_http.c 299903 2010-05-28 12:18:03Z dmitry $ */ #include "php_soap.h" #include "ext/standard/base64.h" @@ -212,6 +212,9 @@ int make_http_soap_request(zval *this_ptr, char *http_msg = NULL; zend_bool old_allow_url_fopen; php_stream_context *context = NULL; + zend_bool has_authorization = 0; + zend_bool has_proxy_authorization = 0; + zend_bool has_cookies = 0; if (this_ptr == NULL || Z_TYPE_P(this_ptr) != IS_OBJECT) { return FALSE; @@ -480,6 +483,7 @@ try_again: Z_TYPE_PP(login) == IS_STRING) { zval **digest; + has_authorization = 1; if (zend_hash_find(Z_OBJPROP_P(this_ptr), "_digest", sizeof("_digest"), (void **)&digest) == SUCCESS) { if (Z_TYPE_PP(digest) == IS_ARRAY) { char HA1[33], HA2[33], response[33], cnonce[33], nc[9]; @@ -651,6 +655,7 @@ try_again: /* Proxy HTTP Authentication */ if (use_proxy && !use_ssl) { + has_proxy_authorization = 1; proxy_authentication(this_ptr, &soap_headers TSRMLS_CC); } @@ -660,6 +665,7 @@ try_again: char *key; int i, n; + has_cookies = 1; n = zend_hash_num_elements(Z_ARRVAL_PP(cookies)); if (n > 0) { zend_hash_internal_pointer_reset(Z_ARRVAL_PP(cookies)); @@ -734,11 +740,14 @@ try_again: strncasecmp(s, "content-length", sizeof("content-length")-1) != 0) && (name_len != sizeof("content-type")-1 || strncasecmp(s, "content-type", sizeof("content-type")-1) != 0) && - (name_len != sizeof("cookie")-1 || + (!has_cookies || + name_len != sizeof("cookie")-1 || strncasecmp(s, "cookie", sizeof("cookie")-1) != 0) && - (name_len != sizeof("authorization")-1 || + (!has_authorization || + name_len != sizeof("authorization")-1 || strncasecmp(s, "authorization", sizeof("authorization")-1) != 0) && - (name_len != sizeof("proxy-authorization")-1 || + (!has_proxy_authorization || + name_len != sizeof("proxy-authorization")-1 || strncasecmp(s, "proxy-authorization", sizeof("proxy-authorization")-1) != 0)) { /* add header */ smart_str_appendl(&soap_headers, s, p-s); diff --git a/ext/soap/php_sdl.c b/ext/soap/php_sdl.c index 462c589b1..256ece55c 100644 --- a/ext/soap/php_sdl.c +++ b/ext/soap/php_sdl.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: php_sdl.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_sdl.c 299013 2010-05-05 07:43:45Z dmitry $ */ #include "php_soap.h" #include "ext/libxml/php_libxml.h" @@ -832,7 +832,12 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) if (strncmp((char*)tmp->children->content, WSDL_HTTP_TRANSPORT, sizeof(WSDL_HTTP_TRANSPORT)) == 0) { soapBinding->transport = SOAP_TRANSPORT_HTTP; } else { - soap_error1(E_ERROR, "Parsing WSDL: PHP-SOAP doesn't support transport '%s'", tmp->children->content); + /* try the next binding */ + efree(soapBinding); + efree(tmpbinding->location); + efree(tmpbinding); + trav = trav->next; + continue; } } } @@ -1128,6 +1133,10 @@ static sdlPtr load_wsdl(zval *this_ptr, char *struri TSRMLS_DC) soap_error0(E_ERROR, "Parsing WSDL: Couldn't bind to service"); } + if (ctx.sdl->bindings == NULL || ctx.sdl->bindings->nNumOfElements == 0) { + soap_error0(E_ERROR, "Parsing WSDL: Could not find any usable binding services in WSDL."); + } + zend_hash_destroy(&ctx.messages); zend_hash_destroy(&ctx.bindings); zend_hash_destroy(&ctx.portTypes); diff --git a/ext/soap/soap.c b/ext/soap/soap.c index c1c51ce1a..c535d5f5f 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -17,7 +17,7 @@ | Dmitry Stogov <dmitry@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: soap.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: soap.c 300317 2010-06-09 15:48:22Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1699,6 +1699,7 @@ PHP_METHOD(SoapServer, handle) doc_request = soap_xmlParseMemory(post_data, post_data_length); } } else { + zval_ptr_dtor(&retval); return; } } else { @@ -1873,6 +1874,7 @@ PHP_METHOD(SoapServer, handle) soapHeader *h = header; header = header->next; +#if 0 if (service->sdl && !h->function && !h->hdr) { if (h->mustUnderstand) { soap_server_fault("MustUnderstand","Header not understood", NULL, NULL, NULL TSRMLS_CC); @@ -1880,7 +1882,7 @@ PHP_METHOD(SoapServer, handle) continue; } } - +#endif fn_name = estrndup(Z_STRVAL(h->function_name),Z_STRLEN(h->function_name)); if (zend_hash_exists(function_table, php_strtolower(fn_name, Z_STRLEN(h->function_name)), Z_STRLEN(h->function_name) + 1) || ((service->type == SOAP_CLASS || service->type == SOAP_OBJECT) && @@ -3420,12 +3422,12 @@ static void set_soap_fault(zval *obj, char *fault_code_ns, char *fault_code, cha if (Z_TYPE_P(obj) != IS_OBJECT) { object_init_ex(obj, soap_fault_class_entry); } - if (fault_string != NULL) { - add_property_string(obj, "faultstring", fault_string, 1); + + add_property_string(obj, "faultstring", fault_string ? fault_string : "", 1); #ifdef ZEND_ENGINE_2 - zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, fault_string TSRMLS_CC); + zend_update_property_string(zend_exception_get_default(TSRMLS_C), obj, "message", sizeof("message")-1, (fault_string ? fault_string : "") TSRMLS_CC); #endif - } + if (fault_code != NULL) { int soap_version = SOAP_GLOBAL(soap_version); diff --git a/ext/soap/tests/bug46760.phpt b/ext/soap/tests/bug46760.phpt index 0b7c9ab4c..95cb58867 100644 --- a/ext/soap/tests/bug46760.phpt +++ b/ext/soap/tests/bug46760.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #46760 (SoapClient doRequest fails when proxy is used) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --FILE-- <?php diff --git a/ext/soap/tests/bug48557.phpt b/ext/soap/tests/bug48557.phpt index 8ef778ff3..07245793d 100644 --- a/ext/soap/tests/bug48557.phpt +++ b/ext/soap/tests/bug48557.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #48557 (Numeric string keys in Apache Hashmaps are not cast to integers) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --FILE-- <?php error_reporting(E_ALL); diff --git a/ext/soap/tests/bugs/bug34657.phpt b/ext/soap/tests/bugs/bug34657.phpt index 19dbf31c5..0069c9395 100755 --- a/ext/soap/tests/bugs/bug34657.phpt +++ b/ext/soap/tests/bugs/bug34657.phpt @@ -31,5 +31,5 @@ Warning: SoapClient::SoapClient(http://i_dont_exist.com/some.wsdl): failed to op Warning: SoapClient::SoapClient(): I/O warning : failed to load external entity "http://i_dont_exist.com/some.wsdl" in %sbug34657.php on line 3 SoapFault -SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://i_dont_exist.com/some.wsdl' +SOAP-ERROR: Parsing WSDL: Couldn't load from 'http://i_dont_exist.com/some.wsdl'%S ok diff --git a/ext/soap/tests/bugs/bug36226-2.phpt b/ext/soap/tests/bugs/bug36226-2.phpt index 811073761..e14832db4 100755 --- a/ext/soap/tests/bugs/bug36226-2.phpt +++ b/ext/soap/tests/bugs/bug36226-2.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #36226 (Inconsistent handling when passing nillable arrays) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --INI-- soap.wsdl_cache_enabled=0 --FILE-- diff --git a/ext/soap/tests/bugs/bug42692.phpt b/ext/soap/tests/bugs/bug42692.phpt index 3a4e099b1..1436f881e 100755 --- a/ext/soap/tests/bugs/bug42692.phpt +++ b/ext/soap/tests/bugs/bug42692.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #42692 (Procedure 'int1' not present with doc/lit SoapServer) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --FILE-- <?php ini_set('soap.wsdl_cache_enabled','0'); diff --git a/ext/soap/tests/bugs/bug46427.phpt b/ext/soap/tests/bugs/bug46427.phpt index 5cf2e8f96..a49071e21 100644 --- a/ext/soap/tests/bugs/bug46427.phpt +++ b/ext/soap/tests/bugs/bug46427.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #46427 (SoapClient() stumbles over its "stream_context" parameter) +--SKIPIF-- +<?php require_once('skipif.inc'); ?> --FILE-- <?php error_reporting(E_ALL|E_STRICT); diff --git a/ext/soap/tests/bugs/bug50698_1.phpt b/ext/soap/tests/bugs/bug50698_1.phpt new file mode 100644 index 000000000..c5d634a97 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_1.phpt @@ -0,0 +1,11 @@ +--TEST-- +Request #50698_1 (SoapClient should handle wsdls with some incompatiable endpoints) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . '/bug50698_1.wsdl'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_1.wsdl b/ext/soap/tests/bugs/bug50698_1.wsdl new file mode 100644 index 000000000..9c6a9ad14 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_1.wsdl @@ -0,0 +1,228 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="BasicHttpBinding_EchoService" type="tns:EchoService"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="Echo"> + <soap:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService"> + <wsdl:port name="BasicHttpBinding_EchoService" binding="tns:BasicHttpBinding_EchoService"> + <soap:address location="http://localhost:8731/EchoService/Basic"/> + </wsdl:port> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_2.phpt b/ext/soap/tests/bugs/bug50698_2.phpt new file mode 100644 index 000000000..86ddf4806 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_2.phpt @@ -0,0 +1,20 @@ +--TEST-- +Request #50698_2 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large mix of compatiable and incompatiable endpoints.) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + new SoapClient(dirname(__FILE__) . '/bug50698_2.wsdl'); + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" should throw an exception of type 'SoapFault'"; +} catch (SoapFault $e) { + if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { + echo "ok\n"; + } else { + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_2.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + print_r($e); + } +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_2.wsdl b/ext/soap/tests/bugs/bug50698_2.wsdl new file mode 100644 index 000000000..e4dab6ce0 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_2.wsdl @@ -0,0 +1,422 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService-NetTcp-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-NetTcp-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="http://localhost:8731/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>http://localhost:8731/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_3.phpt b/ext/soap/tests/bugs/bug50698_3.phpt new file mode 100644 index 000000000..16a24dbe5 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_3.phpt @@ -0,0 +1,20 @@ +--TEST-- +Request #50698_3 (SoapClient should handle wsdls with some incompatiable endpoints -- EDGECASE: Large set of endpoints all incompatiable.) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +try { + new SoapClient(dirname(__FILE__) . '/bug50698_3.wsdl'); + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" should throw an exception of type 'SoapFault'"; +} catch (SoapFault $e) { + if ($e->faultcode == 'WSDL' && $e->faultstring == 'SOAP-ERROR: Parsing WSDL: Could not find any usable binding services in WSDL.') { + echo "ok\n"; + } else { + echo "Call: \"new SoapClient(dirname(__FILE__).'/bug50698_3.wsdl');\" threw a SoapFault with an incorrect faultcode or faultmessage."; + print_r($e); + } +} +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_3.wsdl b/ext/soap/tests/bugs/bug50698_3.wsdl new file mode 100644 index 000000000..bed21dfa4 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_3.wsdl @@ -0,0 +1,312 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService-1"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-2"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-3"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-4"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-5"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-6"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-7"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-8"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-9"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> + <wsdl:service name="EchoService-10"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50698_4.phpt b/ext/soap/tests/bugs/bug50698_4.phpt new file mode 100644 index 000000000..ca444d777 --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_4.phpt @@ -0,0 +1,11 @@ +--TEST-- +Request #50698_4 (SoapClient should handle wsdls with some incompatiable endpoints) +--INI-- +soap.wsdl_cache_enabled=0 +--FILE-- +<?php +new SoapClient(dirname(__FILE__) . '/bug50698_4.wsdl'); +echo "ok\n"; +?> +--EXPECT-- +ok diff --git a/ext/soap/tests/bugs/bug50698_4.wsdl b/ext/soap/tests/bugs/bug50698_4.wsdl new file mode 100644 index 000000000..dc9c3297e --- /dev/null +++ b/ext/soap/tests/bugs/bug50698_4.wsdl @@ -0,0 +1,228 @@ +<wsdl:definitions name="EchoService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:tns="http://tempuri.org/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex"> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SymmetricBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SecureConversationToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + <sp:BootstrapPolicy> + <wsp:Policy> + <sp:SignedParts> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts> + <sp:Body/> + </sp:EncryptedParts> + <sp:SymmetricBinding> + <wsp:Policy> + <sp:ProtectionToken> + <wsp:Policy> + <sp:SpnegoContextToken sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient"> + <wsp:Policy> + <sp:RequireDerivedKeys/> + </wsp:Policy> + </sp:SpnegoContextToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + </wsp:Policy> + </sp:BootstrapPolicy> + </wsp:Policy> + </sp:SecureConversationToken> + </wsp:Policy> + </sp:ProtectionToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + <sp:IncludeTimestamp/> + <sp:EncryptSignature/> + <sp:OnlySignEntireHeadersAndBody/> + </wsp:Policy> + </sp:SymmetricBinding> + <sp:Wss11 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportRefKeyIdentifier/> + <sp:MustSupportRefIssuerSerial/> + <sp:MustSupportRefThumbprint/> + <sp:MustSupportRefEncryptedKey/> + </wsp:Policy> + </sp:Wss11> + <sp:Trust10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:MustSupportIssuedTokens/> + <sp:RequireClientEntropy/> + <sp:RequireServerEntropy/> + </wsp:Policy> + </sp:Trust10> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_Input_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="WSHttpBinding_EchoService_Echo_output_policy"> + <wsp:ExactlyOne> + <wsp:All> + <sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/> + <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/> + </sp:SignedParts> + <sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <sp:Body/> + </sp:EncryptedParts> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsp:Policy wsu:Id="NetTcpBinding_EchoService_policy"> + <wsp:ExactlyOne> + <wsp:All> + <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1"/> + <sp:TransportBinding xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"> + <wsp:Policy> + <sp:TransportToken> + <wsp:Policy> + <msf:WindowsTransportSecurity xmlns:msf="http://schemas.microsoft.com/ws/2006/05/framing/policy"> + <msf:ProtectionLevel>EncryptAndSign</msf:ProtectionLevel> + </msf:WindowsTransportSecurity> + </wsp:Policy> + </sp:TransportToken> + <sp:AlgorithmSuite> + <wsp:Policy> + <sp:Basic256/> + </wsp:Policy> + </sp:AlgorithmSuite> + <sp:Layout> + <wsp:Policy> + <sp:Strict/> + </wsp:Policy> + </sp:Layout> + </wsp:Policy> + </sp:TransportBinding> + <wsaw:UsingAddressing/> + </wsp:All> + </wsp:ExactlyOne> + </wsp:Policy> + <wsdl:types> + </wsdl:types> + <wsdl:message name="EchoService_Echo_InputMessage"> + <wsdl:part name="parameters" element="tns:Echo"/> + </wsdl:message> + <wsdl:message name="EchoService_Echo_OutputMessage"> + <wsdl:part name="parameters" element="tns:EchoResponse"/> + </wsdl:message> + <wsdl:portType name="EchoService"> + <wsdl:operation name="Echo"> + <wsdl:input wsaw:Action="http://tempuri.org/EchoService/Echo" message="tns:EchoService_Echo_InputMessage"/> + <wsdl:output wsaw:Action="http://tempuri.org/EchoService/EchoResponse" message="tns:EchoService_Echo_OutputMessage"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="BasicHttpBinding_EchoService" type="tns:EchoService"> + <soap:binding transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="Echo"> + <soap:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:binding name="NetTcpBinding_EchoService" type="tns:EchoService"> + <wsp:PolicyReference URI="#NetTcpBinding_EchoService_policy"/> + <soap12:binding transport="http://schemas.microsoft.com/soap/tcp"/> + <wsdl:operation name="Echo"> + <soap12:operation soapAction="http://tempuri.org/EchoService/Echo" style="document"/> + <wsdl:input> + <soap12:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap12:body use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="EchoService"> + <wsdl:port name="NetTcpBinding_EchoService" binding="tns:NetTcpBinding_EchoService"> + <soap12:address location="net.tcp://localhost:8732/EchoService/"/> + <wsa10:EndpointReference> + <wsa10:Address>net.tcp://localhost:8732/EchoService/</wsa10:Address> + <Identity xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity"> + <Upn>MAYA-DELL\Justin Dearing</Upn> + </Identity> + </wsa10:EndpointReference> + </wsdl:port> + <wsdl:port name="BasicHttpBinding_EchoService" binding="tns:BasicHttpBinding_EchoService"> + <soap:address location="http://localhost:8731/EchoService/Basic"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/bugs/bug50762.phpt b/ext/soap/tests/bugs/bug50762.phpt new file mode 100644 index 000000000..f9099f1ac --- /dev/null +++ b/ext/soap/tests/bugs/bug50762.phpt @@ -0,0 +1,45 @@ +--TEST-- +Bug #50762 (in WSDL mode Soap Header handler function only being called if defined in WSDL) +--FILE-- +<?php +class testSoap { + private $auth; + public function authToken($token){ + $this->auth=true; + } + public function testHeader($param){ + return 'header handler ' . ($this->auth ? 'called' : 'not called'); + } +} + +class LocalSoapClient extends SoapClient { + + function __construct($wsdl, $options) { + parent::__construct($wsdl, $options); + $this->server = new SoapServer($wsdl, $options); + $this->server->setObject(new testSoap()); + } + + function __doRequest($request, $location, $action, $version, $one_way = 0) { + ob_start(); + $this->server->handle($request); + $response = ob_get_contents(); + ob_end_clean(); + return $response; + } + +} + +$cl = new LocalSoapClient(dirname(__FILE__).'/bug50762.wsdl', array('cache_wsdl'=>WSDL_CACHE_NONE, 'trace'=>true)); + +class authToken{ + public function __construct($token){ + $this->authToken=$token; + } +} + +$cl->__setSoapHeaders(array(new SoapHeader('http://sova.pronto.ru/', 'authToken', new authToken('tokendata')))); +echo $cl->testHeader('param') . PHP_EOL; +?> +--EXPECT-- +header handler called diff --git a/ext/soap/tests/bugs/bug50762.wsdl b/ext/soap/tests/bugs/bug50762.wsdl new file mode 100644 index 000000000..2980589ac --- /dev/null +++ b/ext/soap/tests/bugs/bug50762.wsdl @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://sova.pronto.ru/" xmlns:xsd1="http://sova.pronto.ru/schema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="sova" targetNamespace="http://sova.pronto.ru/"> + <wsdl:message name="authToken"> + <wsdl:part name="authToken" type="xsd:string"/> + </wsdl:message> + <wsdl:message name="message"> + <wsdl:part name="param" type="xsd:string"/> + </wsdl:message> + + <wsdl:portType name="sova"> + <wsdl:operation name="testHeader"> + <wsdl:input message="tns:message"/> + <wsdl:output message="tns:message"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="sovaSOAP" type="tns:sova"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + + <wsdl:operation name="testHeader"> + <soap:operation soapAction="http://sova.pronto.ru/testHeader"/> + <wsdl:input> + <soap:body namespace="http://sova.pronto.ru/" use="literal"/> + <soap:header use="literal" part="authToken" message="tns:authToken" wsdl:required="true"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://sova.pronto.ru/" use="literal"/> + </wsdl:output> + </wsdl:operation> + + </wsdl:binding> + <wsdl:service name="sova"> + <wsdl:port binding="tns:sovaSOAP" name="sovaSOAP"> + <soap:address location="http://sova.mephius.prontosoft.by/sova/soaptest.php"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt index 8e7876fef..8d149a304 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_005w.phpt @@ -22,51 +22,30 @@ $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> ---EXPECT-- +--EXPECTF-- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -object(stdClass)#7 (3) { +object(stdClass)#%d (3) { ["varInt"]=> int(1) ["varString"]=> string(4) "arg1" ["child"]=> - object(stdClass)#8 (3) { + object(stdClass)#%d (3) { ["varInt"]=> int(2) ["varString"]=> string(4) "arg2" ["child"]=> - object(stdClass)#9 (3) { + object(stdClass)#%d (3) { ["varInt"]=> int(3) ["varString"]=> string(4) "arg3" ["child"]=> - object(stdClass)#7 (3) { - ["varInt"]=> - int(1) - ["varString"]=> - string(4) "arg1" - ["child"]=> - object(stdClass)#8 (3) { - ["varInt"]=> - int(2) - ["varString"]=> - string(4) "arg2" - ["child"]=> - object(stdClass)#9 (3) { - ["varInt"]=> - int(3) - ["varString"]=> - string(4) "arg3" - ["child"]=> - *RECURSION* - } - } - } + *RECURSION* } } } diff --git a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt index 6932d5cf9..3549f4523 100644 --- a/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt +++ b/ext/soap/tests/interop/Round3/GroupE/r3_groupE_list_006w.phpt @@ -22,44 +22,30 @@ $HTTP_RAW_POST_DATA = $client->__getlastrequest(); include("round3_groupE_list.inc"); echo "ok\n"; ?> ---EXPECT-- +--EXPECTF-- <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedList><param0 xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></param0></ns1:echoLinkedList></SOAP-ENV:Body></SOAP-ENV:Envelope> <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://soapinterop.org/WSDLInteropTestRpcEnc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://soapinterop.org/xsd" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:echoLinkedListResponse><return xsi:type="ns2:List"><varInt xsi:type="xsd:int">1</varInt><varString xsi:type="xsd:string">arg1</varString><child id="ref1" xsi:type="ns2:List"><varInt xsi:type="xsd:int">2</varInt><varString xsi:type="xsd:string">arg2</varString><child xsi:type="ns2:List"><varInt xsi:type="xsd:int">3</varInt><varString xsi:type="xsd:string">arg3</varString><child href="#ref1"/></child></child></return></ns1:echoLinkedListResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> -object(stdClass)#7 (3) { +object(stdClass)#%d (3) { ["varInt"]=> int(1) ["varString"]=> string(4) "arg1" ["child"]=> - &object(stdClass)#8 (3) { + &object(stdClass)#%d (3) { ["varInt"]=> int(2) ["varString"]=> string(4) "arg2" ["child"]=> - object(stdClass)#9 (3) { + object(stdClass)#%d (3) { ["varInt"]=> int(3) ["varString"]=> string(4) "arg3" ["child"]=> - object(stdClass)#8 (3) { - ["varInt"]=> - int(2) - ["varString"]=> - string(4) "arg2" - ["child"]=> - object(stdClass)#9 (3) { - ["varInt"]=> - int(3) - ["varString"]=> - string(4) "arg3" - ["child"]=> - *RECURSION* - } - } + *RECURSION* } } } diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index 93f892a51..f3d2ec45b 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 294029 2010-01-25 23:12:42Z johannes $ +dnl $Id: config.m4 292683 2009-12-27 01:00:50Z mkoppanen $ dnl PHP_ARG_ENABLE(sockets, whether to enable sockets support, diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index f9aaaa532..e941e6417 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h 294029 2010-01-25 23:12:42Z johannes $ */ +/* $Id: php_sockets.h 293036 2010-01-03 09:23:27Z sebastian $ */ #if HAVE_SOCKETS diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 099d391d8..9547f5695 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c 294029 2010-01-25 23:12:42Z johannes $ */ +/* $Id: sockets.c 293036 2010-01-03 09:23:27Z sebastian $ */ #ifdef HAVE_CONFIG_H #include "config.h" diff --git a/ext/spl/php_spl.c b/ext/spl/php_spl.c index 8a7d6f32e..58bf883f0 100755 --- a/ext/spl/php_spl.c +++ b/ext/spl/php_spl.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_spl.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_spl.c 300176 2010-06-04 00:10:15Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -231,6 +231,17 @@ static int spl_autoload(const char *class_name, const char * lc_name, int class_ class_file_len = spprintf(&class_file, 0, "%s%s", lc_name, file_extension); +#if DEFAULT_SLASH != '\\' + { + char *ptr = class_file; + char *end = ptr + class_file_len; + + while ((ptr = memchr(ptr, '\\', (end - ptr))) != NULL) { + *ptr = DEFAULT_SLASH; + } + } +#endif + ret = php_stream_open_for_zend_ex(class_file, &file_handle, ENFORCE_SAFE_MODE|USE_PATH|STREAM_OPEN_FOR_INCLUDE TSRMLS_CC); if (ret == SUCCESS) { diff --git a/ext/spl/spl_array.c b/ext/spl/spl_array.c index db3de0486..313e5a3d7 100755 --- a/ext/spl/spl_array.c +++ b/ext/spl/spl_array.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_array.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: spl_array.c 299327 2010-05-13 08:09:54Z dmitry $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -320,6 +320,11 @@ static zval **spl_array_get_dimension_ptr_ptr(int check_inherited, zval *object, return &EG(uninitialized_zval_ptr); } + if ((type == BP_VAR_W || type == BP_VAR_RW) && (ht->nApplyCount > 0)) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return &EG(uninitialized_zval_ptr);; + } + switch(Z_TYPE_P(offset)) { case IS_STRING: if (zend_symtable_find(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void **) &retval) == FAILURE) { @@ -421,6 +426,7 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); long index; + HashTable *ht; if (check_inherited && intern->fptr_offset_set) { if (!offset) { @@ -434,30 +440,50 @@ static void spl_array_write_dimension_ex(int check_inherited, zval *object, zval } if (!offset) { + ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); + if (ht->nApplyCount > 0) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return; + } Z_ADDREF_P(value); - zend_hash_next_index_insert(spl_array_get_hash_table(intern, 0 TSRMLS_CC), (void**)&value, sizeof(void*), NULL); + zend_hash_next_index_insert(ht, (void**)&value, sizeof(void*), NULL); return; } switch(Z_TYPE_P(offset)) { case IS_STRING: + ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); + if (ht->nApplyCount > 0) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return; + } Z_ADDREF_P(value); - zend_symtable_update(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL); + zend_symtable_update(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1, (void**)&value, sizeof(void*), NULL); return; case IS_DOUBLE: case IS_RESOURCE: case IS_BOOL: case IS_LONG: + ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); + if (ht->nApplyCount > 0) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return; + } if (offset->type == IS_DOUBLE) { index = (long)Z_DVAL_P(offset); } else { index = Z_LVAL_P(offset); } Z_ADDREF_P(value); - zend_hash_index_update(spl_array_get_hash_table(intern, 0 TSRMLS_CC), index, (void**)&value, sizeof(void*), NULL); + zend_hash_index_update(ht, index, (void**)&value, sizeof(void*), NULL); return; case IS_NULL: + ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); + if (ht->nApplyCount > 0) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return; + } Z_ADDREF_P(value); - zend_hash_next_index_insert(spl_array_get_hash_table(intern, 0 TSRMLS_CC), (void**)&value, sizeof(void*), NULL); + zend_hash_next_index_insert(ht, (void**)&value, sizeof(void*), NULL); return; default: zend_error(E_WARNING, "Illegal offset type"); @@ -474,6 +500,7 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval { spl_array_object *intern = (spl_array_object*)zend_object_store_get_object(object TSRMLS_CC); long index; + HashTable *ht; if (check_inherited && intern->fptr_offset_del) { SEPARATE_ARG_IF_REF(offset); @@ -484,12 +511,17 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval switch(Z_TYPE_P(offset)) { case IS_STRING: - if (spl_array_get_hash_table(intern, 0 TSRMLS_CC) == &EG(symbol_table)) { + ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); + if (ht->nApplyCount > 0) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return; + } + if (ht == &EG(symbol_table)) { if (zend_delete_global_variable(Z_STRVAL_P(offset), Z_STRLEN_P(offset) TSRMLS_CC)) { zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); } } else { - if (zend_symtable_del(spl_array_get_hash_table(intern, 0 TSRMLS_CC), Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1) == FAILURE) { + if (zend_symtable_del(ht, Z_STRVAL_P(offset), Z_STRLEN_P(offset)+1) == FAILURE) { zend_error(E_NOTICE,"Undefined index: %s", Z_STRVAL_P(offset)); } } @@ -503,7 +535,12 @@ static void spl_array_unset_dimension_ex(int check_inherited, zval *object, zval } else { index = Z_LVAL_P(offset); } - if (zend_hash_index_del(spl_array_get_hash_table(intern, 0 TSRMLS_CC), index) == FAILURE) { + ht = spl_array_get_hash_table(intern, 0 TSRMLS_CC); + if (ht->nApplyCount > 0) { + zend_error(E_WARNING, "Modification of ArrayObject during sorting is prohibited"); + return; + } + if (zend_hash_index_del(ht, index) == FAILURE) { zend_error(E_NOTICE,"Undefined offset: %ld", Z_LVAL_P(offset)); } break; @@ -746,7 +783,7 @@ static zval **spl_array_get_property_ptr_ptr(zval *object, zval *member TSRMLS_D if ((intern->ar_flags & SPL_ARRAY_ARRAY_AS_PROPS) != 0 && !std_object_handlers.has_property(object, member, 2 TSRMLS_CC)) { - return spl_array_get_dimension_ptr_ptr(1, object, member, 0 TSRMLS_CC); + return spl_array_get_dimension_ptr_ptr(1, object, member, BP_VAR_RW TSRMLS_CC); } return std_object_handlers.get_property_ptr_ptr(object, member TSRMLS_CC); } /* }}} */ @@ -1303,9 +1340,13 @@ static void spl_array_method(INTERNAL_FUNCTION_PARAMETERS, char *fname, int fnam zend_throw_exception(spl_ce_BadMethodCallException, "Function expects exactly one argument", 0 TSRMLS_CC); return; } + aht->nApplyCount++; zend_call_method(NULL, NULL, NULL, fname, fname_len, &retval_ptr, 2, tmp, arg TSRMLS_CC); + aht->nApplyCount--; } else { + aht->nApplyCount++; zend_call_method(NULL, NULL, NULL, fname, fname_len, &retval_ptr, 1, tmp, NULL TSRMLS_CC); + aht->nApplyCount--; } Z_TYPE_P(tmp) = IS_NULL; /* we want to destroy the zval, not the hashtable */ zval_ptr_dtor(&tmp); diff --git a/ext/spl/spl_directory.c b/ext/spl/spl_directory.c index 5606062a7..92f89ffff 100755 --- a/ext/spl/spl_directory.c +++ b/ext/spl/spl_directory.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_directory.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: spl_directory.c 298647 2010-04-27 08:56:01Z colder $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -397,6 +397,9 @@ static spl_filesystem_object * spl_filesystem_object_create_info(spl_filesystem_ zend_replace_error_handling(EH_THROW, spl_ce_RuntimeException, &error_handling TSRMLS_CC); ce = ce ? ce : source->info_class; + + zend_update_class_constants(ce TSRMLS_CC); + return_value->value.obj = spl_filesystem_object_new_ex(ce, &intern TSRMLS_CC); Z_TYPE_P(return_value) = IS_OBJECT; @@ -437,6 +440,9 @@ static spl_filesystem_object * spl_filesystem_object_create_type(int ht, spl_fil switch (type) { case SPL_FS_INFO: ce = ce ? ce : source->info_class; + + zend_update_class_constants(ce TSRMLS_CC); + return_value->value.obj = spl_filesystem_object_new_ex(ce, &intern TSRMLS_CC); Z_TYPE_P(return_value) = IS_OBJECT; @@ -455,6 +461,9 @@ static spl_filesystem_object * spl_filesystem_object_create_type(int ht, spl_fil break; case SPL_FS_FILE: ce = ce ? ce : source->file_class; + + zend_update_class_constants(ce TSRMLS_CC); + return_value->value.obj = spl_filesystem_object_new_ex(ce, &intern TSRMLS_CC); Z_TYPE_P(return_value) = IS_OBJECT; @@ -1178,7 +1187,10 @@ SPL_METHOD(SplFileInfo, getPathInfo) int path_len; char *path = spl_filesystem_object_get_pathname(intern, &path_len TSRMLS_CC); if (path) { - spl_filesystem_object_create_info(intern, path, path_len, 1, ce, return_value TSRMLS_CC); + char *dpath = estrndup(path, path_len); + path_len = php_dirname(dpath, path_len); + spl_filesystem_object_create_info(intern, dpath, path_len, 1, ce, return_value TSRMLS_CC); + efree(dpath); } } @@ -2567,9 +2579,8 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fgetss, 0, 0, 0) ZEND_ARG_INFO(0, allowable_tags) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 1, 0, 1) +ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fscanf, 0, 0, 1) ZEND_ARG_INFO(0, format) - ZEND_ARG_INFO(1, ...) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_file_object_fwrite, 0, 0, 1) diff --git a/ext/spl/spl_dllist.h b/ext/spl/spl_dllist.h index 52b029c4e..08545b703 100644 --- a/ext/spl/spl_dllist.h +++ b/ext/spl/spl_dllist.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_dllist.h 294892 2010-02-11 17:24:43Z johannes $ */ +/* $Id: spl_dllist.h 293730 2010-01-19 13:24:02Z johannes $ */ #ifndef SPL_DLLIST_H #define SPL_DLLIST_H diff --git a/ext/spl/spl_fixedarray.h b/ext/spl/spl_fixedarray.h index 83e796acc..224103a85 100644 --- a/ext/spl/spl_fixedarray.h +++ b/ext/spl/spl_fixedarray.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_fixedarray.h 294892 2010-02-11 17:24:43Z johannes $ */ +/* $Id: spl_fixedarray.h 293721 2010-01-19 10:44:36Z johannes $ */ #ifndef SPL_FIXEDARRAY_H #define SPL_FIXEDARRAY_H diff --git a/ext/spl/spl_heap.h b/ext/spl/spl_heap.h index 0cc707d60..3a309ca35 100644 --- a/ext/spl/spl_heap.h +++ b/ext/spl/spl_heap.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_heap.h 294892 2010-02-11 17:24:43Z johannes $ */ +/* $Id: spl_heap.h 293721 2010-01-19 10:44:36Z johannes $ */ #ifndef SPL_HEAP_H #define SPL_HEAP_H diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index daf228496..f55a199fd 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_iterators.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: spl_iterators.c 301065 2010-07-07 22:46:54Z felipe $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -131,7 +131,7 @@ static void spl_recursive_it_dtor(zend_object_iterator *_iter TSRMLS_DC) spl_recursive_it_object *object = (spl_recursive_it_object*)_iter->data; zend_object_iterator *sub_iter; - while (object->level) { + while (object->level > 0) { sub_iter = object->iterators[object->level].iterator; sub_iter->funcs->dtor(sub_iter TSRMLS_CC); zval_ptr_dtor(&object->iterators[object->level--].zobject); @@ -139,10 +139,10 @@ static void spl_recursive_it_dtor(zend_object_iterator *_iter TSRMLS_DC) object->iterators = erealloc(object->iterators, sizeof(spl_sub_iterator)); object->level = 0; - zval_ptr_dtor(&iter->zobject); + zval_ptr_dtor(&iter->zobject); efree(iter); } - + static int spl_recursive_it_valid_ex(spl_recursive_it_object *object, zval *zthis TSRMLS_DC) { zend_object_iterator *sub_iter; @@ -536,6 +536,18 @@ static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_cla intern->iterators[0].state = RS_START; zend_restore_error_handling(&error_handling TSRMLS_CC); + + if (EG(exception)) { + zend_object_iterator *sub_iter; + + while (intern->level >= 0) { + sub_iter = intern->iterators[intern->level].iterator; + sub_iter->funcs->dtor(sub_iter TSRMLS_CC); + zval_ptr_dtor(&intern->iterators[intern->level--].zobject); + } + efree(intern->iterators); + intern->iterators = NULL; + } } /* {{{ proto void RecursiveIteratorIterator::__construct(RecursiveIterator|IteratorAggregate it [, int mode = RIT_LEAVES_ONLY [, int flags = 0]]) throws InvalidArgumentException @@ -778,11 +790,14 @@ static union _zend_function *spl_recursive_it_get_method(zval **object_ptr, char } /* {{{ spl_RecursiveIteratorIterator_dtor */ -static void spl_RecursiveIteratorIterator_free_storage(void *_object TSRMLS_DC) +static void spl_RecursiveIteratorIterator_dtor(zend_object *_object, zend_object_handle handle TSRMLS_DC) { spl_recursive_it_object *object = (spl_recursive_it_object *)_object; zend_object_iterator *sub_iter; + /* call standard dtor */ + zend_objects_destroy_object(_object, handle TSRMLS_CC); + if (object->iterators) { while (object->level >= 0) { sub_iter = object->iterators[object->level].iterator; @@ -792,6 +807,13 @@ static void spl_RecursiveIteratorIterator_free_storage(void *_object TSRMLS_DC) efree(object->iterators); object->iterators = NULL; } +} +/* }}} */ + +/* {{{ spl_RecursiveIteratorIterator_dtor */ +static void spl_RecursiveIteratorIterator_free_storage(void *_object TSRMLS_DC) +{ + spl_recursive_it_object *object = (spl_recursive_it_object *)_object; zend_object_std_dtor(&object->std TSRMLS_CC); smart_str_free(&object->prefix[0]); @@ -827,7 +849,7 @@ static zend_object_value spl_RecursiveIteratorIterator_new_ex(zend_class_entry * zend_object_std_init(&intern->std, class_type TSRMLS_CC); zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_RecursiveIteratorIterator_free_storage, NULL TSRMLS_CC); + retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)spl_RecursiveIteratorIterator_dtor, (zend_objects_free_object_storage_t) spl_RecursiveIteratorIterator_free_storage, NULL TSRMLS_CC); retval.handlers = &spl_handlers_rec_it_it; return retval; } @@ -1272,7 +1294,7 @@ static spl_dual_it_object* spl_dual_it_construct(INTERNAL_FUNCTION_PARAMETERS, z return NULL; } if (intern->u.limit.offset < 0) { - zend_throw_exception(spl_ce_OutOfRangeException, "Parameter offset must be > 0", 0 TSRMLS_CC); + zend_throw_exception(spl_ce_OutOfRangeException, "Parameter offset must be >= 0", 0 TSRMLS_CC); zend_restore_error_handling(&error_handling TSRMLS_CC); return NULL; } @@ -1909,16 +1931,26 @@ SPL_METHOD(RecursiveRegexIterator, getChildren) #endif -/* {{{ spl_dual_it_free_storage */ -static void spl_dual_it_free_storage(void *_object TSRMLS_DC) +/* {{{ spl_dual_it_dtor */ +static void spl_dual_it_dtor(zend_object *_object, zend_object_handle handle TSRMLS_DC) { spl_dual_it_object *object = (spl_dual_it_object *)_object; + /* call standard dtor */ + zend_objects_destroy_object(_object, handle TSRMLS_CC); + spl_dual_it_free(object TSRMLS_CC); if (object->inner.iterator) { object->inner.iterator->funcs->dtor(object->inner.iterator TSRMLS_CC); } +} +/* }}} */ + +/* {{{ spl_dual_it_free_storage */ +static void spl_dual_it_free_storage(void *_object TSRMLS_DC) +{ + spl_dual_it_object *object = (spl_dual_it_object *)_object; if (object->inner.zobject) { zval_ptr_dtor(&object->inner.zobject); @@ -1969,7 +2001,7 @@ static zend_object_value spl_dual_it_new(zend_class_entry *class_type TSRMLS_DC) zend_object_std_init(&intern->std, class_type TSRMLS_CC); zend_hash_copy(intern->std.properties, &class_type->default_properties, (copy_ctor_func_t) zval_add_ref, (void *) &tmp, sizeof(zval *)); - retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)zend_objects_destroy_object, (zend_objects_free_object_storage_t) spl_dual_it_free_storage, NULL TSRMLS_CC); + retval.handle = zend_objects_store_put(intern, (zend_objects_store_dtor_t)spl_dual_it_dtor, (zend_objects_free_object_storage_t) spl_dual_it_free_storage, NULL TSRMLS_CC); retval.handlers = &spl_handlers_dual_it; return retval; } @@ -2080,7 +2112,7 @@ static inline void spl_limit_it_seek(spl_dual_it_object *intern, long pos TSRMLS zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0 TSRMLS_CC, "Cannot seek to %ld which is behind offset %ld plus count %ld", pos, intern->u.limit.offset, intern->u.limit.count); return; } - if (instanceof_function(intern->inner.ce, spl_ce_SeekableIterator TSRMLS_CC)) { + if (pos != intern->current.pos && instanceof_function(intern->inner.ce, spl_ce_SeekableIterator TSRMLS_CC)) { MAKE_STD_ZVAL(zpos); ZVAL_LONG(zpos, pos); spl_dual_it_free(intern TSRMLS_CC); @@ -3035,7 +3067,9 @@ PHPAPI int spl_iterator_apply(zval *obj, spl_iterator_apply_func_t apply_func, v } done: - iter->funcs->dtor(iter TSRMLS_CC); + if (iter) { + iter->funcs->dtor(iter TSRMLS_CC); + } return EG(exception) ? FAILURE : SUCCESS; } /* }}} */ diff --git a/ext/spl/spl_observer.c b/ext/spl/spl_observer.c index 75855ada4..290297290 100755 --- a/ext/spl/spl_observer.c +++ b/ext/spl/spl_observer.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: spl_observer.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: spl_observer.c 300843 2010-06-29 00:58:31Z stas $ */ #ifdef HAVE_CONFIG_H # include "config.h" @@ -115,6 +115,7 @@ static void spl_object_storage_dtor(spl_SplObjectStorageElement *element) /* {{{ zval_ptr_dtor(&element->inf); } /* }}} */ + spl_SplObjectStorageElement* spl_object_storage_get(spl_SplObjectStorage *intern, zval *obj TSRMLS_DC) /* {{{ */ { spl_SplObjectStorageElement *element; @@ -632,15 +633,24 @@ SPL_METHOD(SplObjectStorage, unserialize) zval_ptr_dtor(&pcount); while(count-- > 0) { + spl_SplObjectStorageElement *pelement; + if (*p != ';') { goto outexcept; } ++p; + if(*p != 'O' && *p != 'C' && *p != 'r') { + goto outexcept; + } ALLOC_INIT_ZVAL(pentry); if (!php_var_unserialize(&pentry, &p, s + buf_len, &var_hash TSRMLS_CC)) { zval_ptr_dtor(&pentry); goto outexcept; } + if(Z_TYPE_P(pentry) != IS_OBJECT) { + zval_ptr_dtor(&pentry); + goto outexcept; + } ALLOC_INIT_ZVAL(pinf); if (*p == ',') { /* new version has inf */ ++p; @@ -649,6 +659,16 @@ SPL_METHOD(SplObjectStorage, unserialize) goto outexcept; } } + + pelement = spl_object_storage_get(intern, pentry TSRMLS_CC); + if(pelement) { + if(pelement->inf) { + var_push_dtor(&var_hash, &pelement->inf); + } + if(pelement->obj) { + var_push_dtor(&var_hash, &pelement->obj); + } + } spl_object_storage_attach(intern, pentry, pinf TSRMLS_CC); zval_ptr_dtor(&pentry); zval_ptr_dtor(&pinf); diff --git a/ext/spl/tests/SplFileObject_fgetcsv_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_basic.phpt new file mode 100644 index 000000000..ba53a1891 --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_basic.phpt @@ -0,0 +1,31 @@ +--TEST-- +SplFileObject::fgetcsv default path +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fputcsv($fp, array( + 'field1', + 'field2', + 'field3', + 5 +)); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv()); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +array(4) { + [0]=> + string(6) "field1" + [1]=> + string(6) "field2" + [2]=> + string(6) "field3" + [3]=> + string(1) "5" +} diff --git a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt new file mode 100644 index 000000000..38b32c234 --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_basic.phpt @@ -0,0 +1,31 @@ +--TEST-- +SplFileObject::fgetcsv with alternative delimeter +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fputcsv($fp, array( + 'field1', + 'field2', + 'field3', + 5 +), '|'); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv('|')); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +array(4) { + [0]=> + string(6) "field1" + [1]=> + string(6) "field2" + [2]=> + string(6) "field3" + [3]=> + string(1) "5" +} diff --git a/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt new file mode 100644 index 000000000..42677cca4 --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_delimiter_error.phpt @@ -0,0 +1,23 @@ +--TEST-- +SplFileObject::fgetcsv with alternative delimeter +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fputcsv($fp, array( + 'field1', + 'field2', + 'field3', + 5 +), '|'); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv('invalid')); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +Warning: SplFileObject::fgetcsv(): delimiter must be a character in %s on line %d +bool(false) diff --git a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt new file mode 100644 index 000000000..ab071acac --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_basic.phpt @@ -0,0 +1,31 @@ +--TEST-- +SplFileObject::fgetcsv with alternative delimeter +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fputcsv($fp, array( + 'field1', + 'field2', + 'field3', + 5 +), ',', '"'); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv(',', '"')); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +array(4) { + [0]=> + string(6) "field1" + [1]=> + string(6) "field2" + [2]=> + string(6) "field3" + [3]=> + string(1) "5" +} diff --git a/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt new file mode 100644 index 000000000..afc8ad3f0 --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_enclosure_error.phpt @@ -0,0 +1,23 @@ +--TEST-- +SplFileObject::fgetcsv with alternative delimeter +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fputcsv($fp, array( + 'field1', + 'field2', + 'field3', + 5 +), ',', '"'); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv(',', 'invalid')); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +Warning: SplFileObject::fgetcsv(): enclosure must be a character in %s on line %d +bool(false) diff --git a/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt b/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt new file mode 100644 index 000000000..1e2e273ae --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_escape_basic.phpt @@ -0,0 +1,24 @@ +--TEST-- +SplFileObject::fgetcsv with alternative delimeter +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fwrite($fp, '"aaa","b""bb","ccc"'); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv(',', '"', '"')); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +array(3) { + [0]=> + string(3) "aaa" + [1]=> + string(4) "b"bb" + [2]=> + string(3) "ccc" +} diff --git a/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt b/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt new file mode 100644 index 000000000..8dcfc9220 --- /dev/null +++ b/ext/spl/tests/SplFileObject_fgetcsv_escape_error.phpt @@ -0,0 +1,18 @@ +--TEST-- +SplFileObject::fgetcsv with alternative delimeter +--FILE-- +<?php +$fp = fopen('SplFileObject::fgetcsv.csv', 'w+'); +fwrite($fp, '"aaa","b""bb","ccc"'); +fclose($fp); + +$fo = new SplFileObject('SplFileObject::fgetcsv.csv'); +var_dump($fo->fgetcsv(',', '"', 'invalid')); +?> +--CLEAN-- +<?php +unlink('SplFileObject::fgetcsv.csv'); +?> +--EXPECTF-- +Warning: SplFileObject::fgetcsv(): escape must be a character in %s on line %d +bool(false) diff --git a/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt b/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt new file mode 100644 index 000000000..9e3f3605b --- /dev/null +++ b/ext/spl/tests/SplObjectStorage_unserialize_bad.phpt @@ -0,0 +1,45 @@ +--TEST-- +SPL: Test that serialized blob contains unique elements (CVE-2010-2225) +--FILE-- +<?php + +$badblobs = array( +'x:i:2;i:0;,i:1;;i:0;,i:2;;m:a:0:{}', +'x:i:3;O:8:"stdClass":0:{},O:8:"stdClass":0:{};R:1;,i:1;;O:8:"stdClass":0:{},r:2;;m:a:0:{}', +'x:i:3;O:8:"stdClass":0:{},O:8:"stdClass":0:{};r:1;,i:1;;O:8:"stdClass":0:{},r:2;;m:a:0:{}', +); +foreach($badblobs as $blob) { +try { + $so = new SplObjectStorage(); + $so->unserialize($blob); + var_dump($so); +} catch(UnexpectedValueException $e) { + echo $e->getMessage()."\n"; +} +} +--EXPECTF-- +Error at offset 6 of 34 bytes +Error at offset 46 of 89 bytes +object(SplObjectStorage)#2 (1) { + ["storage":"SplObjectStorage":private]=> + array(2) { + ["%s"]=> + array(2) { + ["obj"]=> + object(stdClass)#3 (0) { + } + ["inf"]=> + int(1) + } + ["%s"]=> + array(2) { + ["obj"]=> + object(stdClass)#1 (0) { + } + ["inf"]=> + object(stdClass)#4 (0) { + } + } + } +} + diff --git a/ext/spl/tests/SplObjectStorage_unserialize_nested.phpt b/ext/spl/tests/SplObjectStorage_unserialize_nested.phpt new file mode 100644 index 000000000..56e83f805 --- /dev/null +++ b/ext/spl/tests/SplObjectStorage_unserialize_nested.phpt @@ -0,0 +1,47 @@ +--TEST-- +SPL: Test unserializing tested & linked storage +--FILE-- +<?php +$o = new StdClass(); +$a = new StdClass(); + +$o->a = $a; + +$so = new SplObjectStorage(); + +$so[$o] = 1; +$so[$a] = 2; + +$s = serialize($so); +echo $s."\n"; + +$so1 = unserialize($s); +var_dump($so1); + +--EXPECTF-- +C:16:"SplObjectStorage":76:{x:i:2;O:8:"stdClass":1:{s:1:"a";O:8:"stdClass":0:{}},i:1;;r:2;,i:2;;m:a:0:{}} +object(SplObjectStorage)#4 (1) { + ["storage":"SplObjectStorage":private]=> + array(2) { + ["%s"]=> + array(2) { + ["obj"]=> + object(stdClass)#5 (1) { + ["a"]=> + object(stdClass)#6 (0) { + } + } + ["inf"]=> + int(1) + } + ["%s"]=> + array(2) { + ["obj"]=> + object(stdClass)#6 (0) { + } + ["inf"]=> + int(2) + } + } +} + diff --git a/ext/spl/tests/SplObjectStorage_var_dump.phpt b/ext/spl/tests/SplObjectStorage_var_dump.phpt index c1c7158ec..0439f465c 100644 --- a/ext/spl/tests/SplObjectStorage_var_dump.phpt +++ b/ext/spl/tests/SplObjectStorage_var_dump.phpt @@ -8,28 +8,16 @@ $o[new StdClass] = $o; var_dump($o); --EXPECTF-- -object(SplObjectStorage)#1 (1) { +object(SplObjectStorage)#%d (1) { ["storage":"SplObjectStorage":private]=> array(1) { ["%s"]=> array(2) { ["obj"]=> - object(stdClass)#2 (0) { + object(stdClass)#%d (0) { } ["inf"]=> - object(SplObjectStorage)#1 (1) { - ["storage":"SplObjectStorage":private]=> - array(1) { - ["%s"]=> - array(2) { - ["obj"]=> - object(stdClass)#2 (0) { - } - ["inf"]=> - *RECURSION* - } - } - } + *RECURSION* } } } diff --git a/ext/spl/tests/SplTempFileObject_constructor_basic.phpt b/ext/spl/tests/SplTempFileObject_constructor_basic.phpt new file mode 100644 index 000000000..b2e640c7a --- /dev/null +++ b/ext/spl/tests/SplTempFileObject_constructor_basic.phpt @@ -0,0 +1,19 @@ +--TEST-- +SPL SplTempFileObject constructor sets correct defaults when pass 0 arguments +--FILE-- +<?php +var_dump(new SplTempFileObject()); +?> +--EXPECTF-- +object(SplTempFileObject)#1 (5) { + ["pathName":"SplFileInfo":private]=> + string(10) "php://temp" + ["fileName":"SplFileInfo":private]=> + string(10) "php://temp" + ["openMode":"SplFileObject":private]=> + string(1) "w" + ["delimiter":"SplFileObject":private]=> + string(1) "," + ["enclosure":"SplFileObject":private]=> + string(1) """ +} diff --git a/ext/spl/tests/SplTempFileObject_constructor_error.phpt b/ext/spl/tests/SplTempFileObject_constructor_error.phpt new file mode 100644 index 000000000..d2717ac5a --- /dev/null +++ b/ext/spl/tests/SplTempFileObject_constructor_error.phpt @@ -0,0 +1,12 @@ +--TEST-- +SPL SplTempFileObject constructor sets correct defaults when pass 0 arguments +--FILE-- +<?php +new SplTempFileObject('invalid'); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'RuntimeException' with message 'SplTempFileObject::__construct() expects parameter 1 to be long, string given' in %s +Stack trace: +#0 %s: SplTempFileObject->__construct('invalid') +#1 {main} + thrown in %s diff --git a/ext/spl/tests/SplTempFileObject_constructor_maxmemory_basic.phpt b/ext/spl/tests/SplTempFileObject_constructor_maxmemory_basic.phpt new file mode 100644 index 000000000..2ef1b2cd1 --- /dev/null +++ b/ext/spl/tests/SplTempFileObject_constructor_maxmemory_basic.phpt @@ -0,0 +1,19 @@ +--TEST-- +SPL SplTempFileObject constructor sets correct values when passed fixed memory size +--FILE-- +<?php +var_dump(new SplTempFileObject(1024)); +?> +--EXPECTF-- +object(SplTempFileObject)#1 (5) { + ["pathName":"SplFileInfo":private]=> + string(25) "php://temp/maxmemory:1024" + ["fileName":"SplFileInfo":private]=> + string(25) "php://temp/maxmemory:1024" + ["openMode":"SplFileObject":private]=> + string(1) "w" + ["delimiter":"SplFileObject":private]=> + string(1) "," + ["enclosure":"SplFileObject":private]=> + string(1) """ +} diff --git a/ext/spl/tests/SplTempFileObject_constructor_memory_lt1_variation.phpt b/ext/spl/tests/SplTempFileObject_constructor_memory_lt1_variation.phpt new file mode 100644 index 000000000..9fe589211 --- /dev/null +++ b/ext/spl/tests/SplTempFileObject_constructor_memory_lt1_variation.phpt @@ -0,0 +1,19 @@ +--TEST-- +SPL SplTempFileObject constructor sets correct defaults when passed a negative value +--FILE-- +<?php +var_dump(new SplTempFileObject(-1)); +?> +--EXPECTF-- +object(SplTempFileObject)#1 (5) { + ["pathName":"SplFileInfo":private]=> + string(12) "php://memory" + ["fileName":"SplFileInfo":private]=> + string(12) "php://memory" + ["openMode":"SplFileObject":private]=> + string(1) "w" + ["delimiter":"SplFileObject":private]=> + string(1) "," + ["enclosure":"SplFileObject":private]=> + string(1) """ +} diff --git a/ext/spl/tests/array_027.phpt b/ext/spl/tests/array_027.phpt index 791e76322..509b8f9ff 100644 --- a/ext/spl/tests/array_027.phpt +++ b/ext/spl/tests/array_027.phpt @@ -9,16 +9,10 @@ $o['plop'] = $o; var_dump($o); --EXPECTF-- -object(AO)#1 (1) { +object(AO)#%d (1) { ["storage":"ArrayObject":private]=> array(1) { ["plop"]=> - object(AO)#1 (1) { - ["storage":"ArrayObject":private]=> - array(1) { - ["plop"]=> - *RECURSION* - } - } + *RECURSION* } } diff --git a/ext/spl/tests/bug48361.phpt b/ext/spl/tests/bug48361.phpt new file mode 100644 index 000000000..44b05abba --- /dev/null +++ b/ext/spl/tests/bug48361.phpt @@ -0,0 +1,14 @@ +--TEST-- +SPL: Bug #48361 SpleFileInfo::getPathName should return the dirname's path +--FILE-- +<?php +$info = new SplFileInfo(__FILE__); +var_dump($info->getRealPath()); +var_dump($info->getPathInfo()->getRealPath()); +?> +===DONE=== +--EXPECTF-- +string(%d) "%stests%sbug48361.php" +string(%d) "%stests" +===DONE=== + diff --git a/ext/spl/tests/bug49723.phpt b/ext/spl/tests/bug49723.phpt new file mode 100644 index 000000000..221e80661 --- /dev/null +++ b/ext/spl/tests/bug49723.phpt @@ -0,0 +1,16 @@ +--TEST-- +LimitIterator: do not seek if not needed +--FILE-- +<?php + +$it = new ArrayIterator(array()); + +$lit = new LimitIterator($it, 0, 5); + +foreach ($lit as $v) { + echo $v; +} +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/ext/spl/tests/bug51119.phpt b/ext/spl/tests/bug51119.phpt new file mode 100644 index 000000000..441aa1280 --- /dev/null +++ b/ext/spl/tests/bug51119.phpt @@ -0,0 +1,34 @@ +--TEST-- +SPL: LimitIterator zero is valid offset +--FILE-- +<?php + +$array = array('a', 'b', 'c'); +$arrayIterator = new ArrayIterator($array); + +try { + $limitIterator = new LimitIterator($arrayIterator, 0); + foreach ($limitIterator as $item) { + echo $item . "\n"; + } +} catch (OutOfRangeException $e){ + print $e->getMessage() . "\n"; +} + +try { + $limitIterator = new LimitIterator($arrayIterator, -1); + foreach ($limitIterator as $item) { + echo $item . "\n"; + } +} catch (OutOfRangeException $e){ + print $e->getMessage() . "\n"; +} + +?> +===DONE=== +--EXPECT-- +a +b +c +Parameter offset must be >= 0 +===DONE=== diff --git a/ext/spl/tests/bug51374.phpt b/ext/spl/tests/bug51374.phpt new file mode 100644 index 000000000..a4d285322 --- /dev/null +++ b/ext/spl/tests/bug51374.phpt @@ -0,0 +1,19 @@ +--TEST-- +SPL: SplFileObject wrongly initializes objects +--FILE-- +<?php +class Foo extends SplFileObject +{ + public $bam = array(); +} +$fileInfo = new SplFileInfo('php://temp'); +$fileInfo->setFileClass('Foo'); +$file = $fileInfo->openFile('r'); + +print var_dump($file->bam); // is null or UNKNOWN:0 +?> +===DONE=== +--EXPECT-- +array(0) { +} +===DONE=== diff --git a/ext/spl/tests/bug51532.phpt b/ext/spl/tests/bug51532.phpt new file mode 100644 index 000000000..3a0722b2a --- /dev/null +++ b/ext/spl/tests/bug51532.phpt @@ -0,0 +1,14 @@ +--TEST-- +SPL: Allow valid extension of SplFileObject::fscanf +--FILE-- +<?php + +class A extends SplFileObject { + public function fscanf($format) { + + } +} +?> +===DONE=== +--EXPECT-- +===DONE=== diff --git a/ext/spl/tests/bug52238.phpt b/ext/spl/tests/bug52238.phpt new file mode 100644 index 000000000..85410bdf1 --- /dev/null +++ b/ext/spl/tests/bug52238.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #52238 - Crash when an Exception occured in iterator_to_array +--FILE-- +<?php +class Foo implements IteratorAggregate +{ + public function bar() { + throw new Exception; + } + + public function getIterator() { + return new ArrayIterator($this->bar()); + } +} +var_dump(iterator_to_array(new Foo)); +?> +--EXPECTF-- +Fatal error: Uncaught exception 'Exception' in %s +Stack trace: +#0 %s: Foo->bar() +#1 [internal function]: Foo->getIterator() +#2 %s: iterator_to_array(Object(Foo)) +#3 {main} + thrown in %s on line %d diff --git a/ext/spl/tests/dllist_012.phpt b/ext/spl/tests/dllist_012.phpt index 75783fc8c..4eec9bda3 100644 --- a/ext/spl/tests/dllist_012.phpt +++ b/ext/spl/tests/dllist_012.phpt @@ -8,22 +8,14 @@ $a[] = $a; var_dump($a); ?> ===DONE=== ---EXPECT-- -object(SplDoublyLinkedList)#1 (2) { +--EXPECTF-- +object(SplDoublyLinkedList)#%d (2) { ["flags":"SplDoublyLinkedList":private]=> int(0) ["dllist":"SplDoublyLinkedList":private]=> array(1) { [0]=> - object(SplDoublyLinkedList)#1 (2) { - ["flags":"SplDoublyLinkedList":private]=> - int(0) - ["dllist":"SplDoublyLinkedList":private]=> - array(1) { - [0]=> - *RECURSION* - } - } + *RECURSION* } } ===DONE=== diff --git a/ext/spl/tests/heap_012.phpt b/ext/spl/tests/heap_012.phpt index bf00f50cc..f86f14f4d 100644 --- a/ext/spl/tests/heap_012.phpt +++ b/ext/spl/tests/heap_012.phpt @@ -7,8 +7,8 @@ $a->insert($a); var_dump($a) ?> ===DONE=== ---EXPECT-- -object(SplMaxHeap)#1 (3) { +--EXPECTF-- +object(SplMaxHeap)#%d (3) { ["flags":"SplHeap":private]=> int(0) ["isCorrupted":"SplHeap":private]=> @@ -16,17 +16,7 @@ object(SplMaxHeap)#1 (3) { ["heap":"SplHeap":private]=> array(1) { [0]=> - object(SplMaxHeap)#1 (3) { - ["flags":"SplHeap":private]=> - int(0) - ["isCorrupted":"SplHeap":private]=> - bool(false) - ["heap":"SplHeap":private]=> - array(1) { - [0]=> - *RECURSION* - } - } + *RECURSION* } } ===DONE=== diff --git a/ext/spl/tests/spl_limit_iterator_check_limits.phpt b/ext/spl/tests/spl_limit_iterator_check_limits.phpt index 01436a8fb..ae1bc85e8 100644 --- a/ext/spl/tests/spl_limit_iterator_check_limits.phpt +++ b/ext/spl/tests/spl_limit_iterator_check_limits.phpt @@ -32,6 +32,6 @@ try { ?> ===DONE=== --EXPECTF-- -Parameter offset must be > 0 +Parameter offset must be >= 0 Parameter count must either be -1 or a value greater than or equal 0 ===DONE=== diff --git a/ext/sqlite/pdo_sqlite2.c b/ext/sqlite/pdo_sqlite2.c index 826a9fac6..8b7a93fd3 100644 --- a/ext/sqlite/pdo_sqlite2.c +++ b/ext/sqlite/pdo_sqlite2.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: pdo_sqlite2.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: pdo_sqlite2.c 300612 2010-06-20 14:12:06Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -515,7 +515,7 @@ static struct pdo_dbh_methods sqlite2_methods = { static char *make_filename_safe(const char *filename TSRMLS_DC) { - if (strncmp(filename, ":memory:", sizeof(":memory:")-1)) { + if (*filename && strncmp(filename, ":memory:", sizeof(":memory:")-1)) { char *fullpath = expand_filepath(filename, NULL TSRMLS_CC); if (!fullpath) { @@ -594,6 +594,7 @@ static int pdo_sqlite2_handle_factory(pdo_dbh_t *dbh, zval *driver_options TSRML efree(filename); if (!H->db) { + H->einfo.errcode = SQLITE_ERROR; pdo_sqlite2_error(errmsg, dbh); goto cleanup; } diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 4ea17ee09..c180f81ef 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -17,7 +17,7 @@ | Marcus Boerger <helly@php.net> | +----------------------------------------------------------------------+ - $Id: sqlite.c 293036 2010-01-03 09:23:27Z sebastian $ + $Id: sqlite.c 298697 2010-04-28 12:10:10Z iliaa $ */ #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 293036 2010-01-03 09:23:27Z sebastian $"); + php_info_print_table_row(2, "PECL Module version", PHP_SQLITE_MODULE_VERSION " $Id: sqlite.c 298697 2010-04-28 12:10:10Z iliaa $"); 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(); @@ -2508,7 +2508,7 @@ PHP_FUNCTION(sqlite_array_query) return; } - rres = (struct php_sqlite_result *)emalloc(sizeof(*rres)); + rres = (struct php_sqlite_result *)ecalloc(1, sizeof(*rres)); sqlite_query(NULL, db, sql, sql_len, (int)mode, 0, NULL, &rres, NULL TSRMLS_CC); if (db->last_err_code != SQLITE_OK) { if (rres) { @@ -2624,7 +2624,7 @@ PHP_FUNCTION(sqlite_single_query) return; } - rres = (struct php_sqlite_result *)emalloc(sizeof(*rres)); + rres = (struct php_sqlite_result *)ecalloc(1, sizeof(*rres)); sqlite_query(NULL, db, sql, sql_len, PHPSQLITE_NUM, 0, NULL, &rres, NULL TSRMLS_CC); if (db->last_err_code != SQLITE_OK) { if (rres) { diff --git a/ext/sqlite3/config0.m4 b/ext/sqlite3/config0.m4 index 13aaf5a02..2c8cd7a4b 100644 --- a/ext/sqlite3/config0.m4 +++ b/ext/sqlite3/config0.m4 @@ -1,4 +1,4 @@ -dnl $Id: config0.m4 277992 2009-03-29 21:34:13Z scottmac $ +dnl $Id: config0.m4 300694 2010-06-23 15:11:02Z johannes $ dnl config.m4 for extension sqlite3 dnl vim:et:ts=2:sw=2 @@ -80,6 +80,7 @@ if test $PHP_SQLITE3 != "no"; then fi PHP_SQLITE3_CFLAGS="-I@ext_srcdir@/libsqlite $other_flags $threadsafe_flags $debug_flags" + PHP_INSTALL_HEADERS([ext/sqlite3/libsqlite/sqlite3.h]) fi AC_DEFINE(HAVE_SQLITE3,1,[ ]) diff --git a/ext/sqlite3/libsqlite/sqlite3.c b/ext/sqlite3/libsqlite/sqlite3.c index 5339b314b..45ee79c85 100644 --- a/ext/sqlite3/libsqlite/sqlite3.c +++ b/ext/sqlite3/libsqlite/sqlite3.c @@ -4,7 +4,7 @@ /****************************************************************************** ** This file is an amalgamation of many separate C source files from SQLite -** version 3.6.22. By combining all the individual C code files into this +** version 3.6.23.1. By combining all the individual C code files into this ** single large file, the entire code can be compiled as a one translation ** unit. This allows many compilers to do optimizations that would not be ** possible if the files were compiled separately. Performance improvements @@ -311,41 +311,43 @@ #include <inttypes.h> #endif +/* +** The number of samples of an index that SQLite takes in order to +** construct a histogram of the table content when running ANALYZE +** and with SQLITE_ENABLE_STAT2 +*/ #define SQLITE_INDEX_SAMPLES 10 /* -** This macro is used to "hide" some ugliness in casting an int -** value to a ptr value under the MSVC 64-bit compiler. Casting -** non 64-bit values to ptr types results in a "hard" error with -** the MSVC 64-bit compiler which this attempts to avoid. +** The following macros are used to cast pointers to integers and +** integers to pointers. The way you do this varies from one compiler +** to the next, so we have developed the following set of #if statements +** to generate appropriate macros for a wide range of compilers. ** -** A simple compiler pragma or casting sequence could not be found -** to correct this in all situations, so this macro was introduced. -** -** It could be argued that the intptr_t type could be used in this -** case, but that type is not available on all compilers, or -** requires the #include of specific headers which differs between -** platforms. +** The correct "ANSI" way to do this is to use the intptr_t type. +** Unfortunately, that typedef is not available on all compilers, or +** if it is available, it requires an #include of specific headers +** that very from one machine to the next. ** ** Ticket #3860: The llvm-gcc-4.2 compiler from Apple chokes on ** the ((void*)&((char*)0)[X]) construct. But MSVC chokes on ((void*)(X)). ** So we have to define the macros in different ways depending on the ** compiler. */ -#if defined(__GNUC__) -# if defined(HAVE_STDINT_H) -# define SQLITE_INT_TO_PTR(X) ((void*)(intptr_t)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(intptr_t)(X)) -# else -# define SQLITE_INT_TO_PTR(X) ((void*)(X)) -# define SQLITE_PTR_TO_INT(X) ((int)(X)) -# endif -#else -# define SQLITE_INT_TO_PTR(X) ((void*)&((char*)0)[X]) -# define SQLITE_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0)) +#if defined(__PTRDIFF_TYPE__) /* This case should work for GCC */ +# define SQLITE_INT_TO_PTR(X) ((void*)(__PTRDIFF_TYPE__)(X)) +# define SQLITE_PTR_TO_INT(X) ((int)(__PTRDIFF_TYPE__)(X)) +#elif !defined(__GNUC__) /* Works for compilers other than LLVM */ +# define SQLITE_INT_TO_PTR(X) ((void*)&((char*)0)[X]) +# define SQLITE_PTR_TO_INT(X) ((int)(((char*)X)-(char*)0)) +#elif defined(HAVE_STDINT_H) /* Use this case if we have ANSI headers */ +# define SQLITE_INT_TO_PTR(X) ((void*)(intptr_t)(X)) +# define SQLITE_PTR_TO_INT(X) ((int)(intptr_t)(X)) +#else /* Generates a warning - but it always works */ +# define SQLITE_INT_TO_PTR(X) ((void*)(X)) +# define SQLITE_PTR_TO_INT(X) ((int)(X)) #endif - /* ** The SQLITE_THREADSAFE macro must be defined as either 0 or 1. ** Older versions of SQLite used an optional THREADSAFE macro. @@ -375,19 +377,18 @@ ** ** SQLITE_SYSTEM_MALLOC // Use normal system malloc() ** SQLITE_MEMDEBUG // Debugging version of system malloc() -** SQLITE_MEMORY_SIZE // internal allocator #1 -** SQLITE_MMAP_HEAP_SIZE // internal mmap() allocator -** SQLITE_POW2_MEMORY_SIZE // internal power-of-two allocator +** +** (Historical note: There used to be several other options, but we've +** pared it down to just these two.) ** ** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as ** the default. */ -#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+defined(SQLITE_POW2_MEMORY_SIZE)>1 +#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)>1 # error "At most one of the following compile-time configuration options\ - is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG, SQLITE_MEMORY_SIZE,\ - SQLITE_MMAP_HEAP_SIZE, SQLITE_POW2_MEMORY_SIZE" + is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG" #endif -#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)+defined(SQLITE_MEMORY_SIZE)+defined(SQLITE_MMAP_HEAP_SIZE)+defined(SQLITE_POW2_MEMORY_SIZE)==0 +#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)==0 # define SQLITE_SYSTEM_MALLOC 1 #endif @@ -631,13 +632,13 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.6.22" -#define SQLITE_VERSION_NUMBER 3006022 -#define SQLITE_SOURCE_ID "2010-01-05 15:30:36 28d0d7710761114a44a1a3a425a6883c661f06e7" +#define SQLITE_VERSION "3.6.23.1" +#define SQLITE_VERSION_NUMBER 3006023 +#define SQLITE_SOURCE_ID "2010-03-26 22:28:06 b078b588d617e07886ad156e9f54ade6d823568e" /* ** CAPI3REF: Run-Time Library Version Numbers -** KEYWORDS: sqlite3_version +** KEYWORDS: sqlite3_version, sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros @@ -659,9 +660,9 @@ extern "C" { ** function is provided for use in DLLs since DLL users usually do not have ** direct access to string constants within the DLL. ^The ** sqlite3_libversion_number() function returns an integer equal to -** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function a pointer -** to a string constant whose value is the same as the [SQLITE_SOURCE_ID] -** C preprocessor macro. +** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns +** a pointer to a string constant whose value is the same as the +** [SQLITE_SOURCE_ID] C preprocessor macro. ** ** See also: [sqlite_version()] and [sqlite_source_id()]. */ @@ -670,6 +671,33 @@ SQLITE_API const char *sqlite3_libversion(void); SQLITE_API const char *sqlite3_sourceid(void); SQLITE_API int sqlite3_libversion_number(void); +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS +/* +** CAPI3REF: Run-Time Library Compilation Options Diagnostics +** +** ^The sqlite3_compileoption_used() function returns 0 or 1 +** indicating whether the specified option was defined at +** compile time. ^The SQLITE_ prefix may be omitted from the +** option name passed to sqlite3_compileoption_used(). +** +** ^The sqlite3_compileoption_get() function allows interating +** over the list of options that were defined at compile time by +** returning the N-th compile time option string. ^If N is out of range, +** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ +** prefix is omitted from any strings returned by +** sqlite3_compileoption_get(). +** +** ^Support for the diagnostic functions sqlite3_compileoption_used() +** and sqlite3_compileoption_get() may be omitted by specifing the +** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time. +** +** See also: SQL functions [sqlite_compileoption_used()] and +** [sqlite_compileoption_get()] and the [compile_options pragma]. +*/ +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); +SQLITE_API const char *sqlite3_compileoption_get(int N); +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ + /* ** CAPI3REF: Test To See If The Library Is Threadsafe ** @@ -961,6 +989,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ #define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ #define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ +#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ #define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ #define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ #define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ @@ -1442,7 +1471,6 @@ SQLITE_API int sqlite3_os_end(void); /* ** CAPI3REF: Configuring The SQLite Library -** EXPERIMENTAL ** ** The sqlite3_config() interface is used to make global configuration ** changes to SQLite in order to tune SQLite to the specific needs of @@ -1783,6 +1811,7 @@ struct sqlite3_mem_methods { #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ #define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */ #define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */ +#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ /* ** CAPI3REF: Configuration Options @@ -4185,6 +4214,7 @@ SQLITE_API int sqlite3_collation_needed16( void(*)(void*,sqlite3*,int eTextRep,const void*) ); +#if SQLITE_HAS_CODEC /* ** Specify the key for an encrypted database. This routine should be ** called right after sqlite3_open(). @@ -4211,6 +4241,25 @@ SQLITE_API int sqlite3_rekey( ); /* +** Specify the activation key for a SEE database. Unless +** activated, none of the SEE routines will work. +*/ +SQLITE_API void sqlite3_activate_see( + const char *zPassPhrase /* Activation phrase */ +); +#endif + +#ifdef SQLITE_ENABLE_CEROD +/* +** Specify the activation key for a CEROD database. Unless +** activated, none of the CEROD routines will work. +*/ +SQLITE_API void sqlite3_activate_cerod( + const char *zPassPhrase /* Activation phrase */ +); +#endif + +/* ** CAPI3REF: Suspend Execution For A Short Time ** ** ^The sqlite3_sleep() function causes the current thread to suspend execution @@ -6172,6 +6221,30 @@ SQLITE_API int sqlite3_unlock_notify( SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); /* +** CAPI3REF: Error Logging Interface +** EXPERIMENTAL +** +** ^The [sqlite3_log()] interface writes a message into the error log +** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. +** ^If logging is enabled, the zFormat string and subsequent arguments are +** passed through to [sqlite3_vmprintf()] to generate the final output string. +** +** The sqlite3_log() interface is intended for use by extensions such as +** virtual tables, collating functions, and SQL functions. While there is +** nothing to prevent an application from calling sqlite3_log(), doing so +** is considered bad form. +** +** The zFormat string must not be NULL. +** +** To avoid deadlocks and other threading problems, the sqlite3_log() routine +** will not use dynamically allocated memory. The log message is stored in +** a fixed-length buffer on the stack. If the log message is longer than +** a few hundred characters, it will be truncated to the length of the +** buffer. +*/ +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); + +/* ** Undo the hack that converts floating point types to integer for ** builds on processors without floating point support. */ @@ -6487,20 +6560,6 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*); #endif /* -** If the following macro is set to 1, then NULL values are considered -** distinct when determining whether or not two entries are the same -** in a UNIQUE index. This is the way PostgreSQL, Oracle, DB2, MySQL, -** OCELOT, and Firebird all work. The SQL92 spec explicitly says this -** is the way things are suppose to work. -** -** If the following macro is set to 0, the NULLs are indistinct for -** a UNIQUE index. In this mode, you can only have a single NULL entry -** for a column declared UNIQUE. This is the way Informix and SQL Server -** work. -*/ -#define NULL_DISTINCT_FOR_UNIQUE 1 - -/* ** The "file format" number is an integer that is incremented whenever ** the VDBE-level file format changes. The following macros define the ** the default file format for new databases and the maximum file format @@ -6511,6 +6570,10 @@ SQLITE_PRIVATE void sqlite3HashClear(Hash*); # define SQLITE_DEFAULT_FILE_FORMAT 1 #endif +/* +** Determine whether triggers are recursive by default. This can be +** changed at run-time using a pragma. +*/ #ifndef SQLITE_DEFAULT_RECURSIVE_TRIGGERS # define SQLITE_DEFAULT_RECURSIVE_TRIGGERS 0 #endif @@ -6755,7 +6818,6 @@ typedef struct AggInfo AggInfo; typedef struct AuthContext AuthContext; typedef struct AutoincInfo AutoincInfo; typedef struct Bitvec Bitvec; -typedef struct RowSet RowSet; typedef struct CollSeq CollSeq; typedef struct Column Column; typedef struct Db Db; @@ -6776,6 +6838,7 @@ typedef struct LookasideSlot LookasideSlot; typedef struct Module Module; typedef struct NameContext NameContext; typedef struct Parse Parse; +typedef struct RowSet RowSet; typedef struct Savepoint Savepoint; typedef struct Select Select; typedef struct SrcList SrcList; @@ -6783,9 +6846,9 @@ typedef struct StrAccum StrAccum; typedef struct Table Table; typedef struct TableLock TableLock; typedef struct Token Token; +typedef struct Trigger Trigger; typedef struct TriggerPrg TriggerPrg; typedef struct TriggerStep TriggerStep; -typedef struct Trigger Trigger; typedef struct UnpackedRecord UnpackedRecord; typedef struct VTable VTable; typedef struct Walker Walker; @@ -6883,6 +6946,7 @@ SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*); SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix); SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*); SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int); +SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int); SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*); SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int); SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *); @@ -7415,6 +7479,7 @@ SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N) SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int); SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int); SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*); +SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*); SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*); SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,int,int,int,int,int,int); SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*); @@ -8188,7 +8253,7 @@ struct Schema { /* ** These macros can be used to test, set, or clear bits in the -** Db.flags field. +** Db.pSchema->flags field. */ #define DbHasProperty(D,I,P) (((D)->aDb[I].pSchema->flags&(P))==(P)) #define DbHasAnyProperty(D,I,P) (((D)->aDb[I].pSchema->flags&(P))!=0) @@ -8196,7 +8261,7 @@ struct Schema { #define DbClearProperty(D,I,P) (D)->aDb[I].pSchema->flags&=~(P) /* -** Allowed values for the DB.flags field. +** Allowed values for the DB.pSchema->flags field. ** ** The DB_SchemaLoaded flag is set after the database schema has been ** read into internal hash tables. @@ -8260,7 +8325,7 @@ struct FuncDefHash { }; /* -** Each database is an instance of the following structure. +** Each database connection is an instance of the following structure. ** ** The sqlite.lastRowid records the last insert rowid generated by an ** insert statement. Inserts on views do not affect its value. Each @@ -8299,6 +8364,7 @@ struct sqlite3 { u8 dfltLockMode; /* Default locking-mode for attached dbs */ u8 dfltJournalMode; /* Default journal mode for attached dbs */ signed char nextAutovac; /* Autovac setting after VACUUM if >=0 */ + u8 suppressErr; /* Do not issue error messages if true */ int nextPagesize; /* Pagesize after VACUUM if >0 */ int nTable; /* Number of tables in the database */ CollSeq *pDfltColl; /* The default collating sequence (BINARY) */ @@ -9875,6 +9941,8 @@ struct Sqlite3Config { int isPCacheInit; /* True after malloc is initialized */ sqlite3_mutex *pInitMutex; /* Mutex used by sqlite3_initialize() */ int nRefInitMutex; /* Number of users of pInitMutex */ + void (*xLog)(void*,int,const char*); /* Function for logging */ + void *pLogArg; /* First argument to xLog() */ }; /* @@ -9916,16 +9984,27 @@ SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker*, Select*); } /* -** The SQLITE_CORRUPT_BKPT macro can be either a constant (for production -** builds) or a function call (for debugging). If it is a function call, -** it allows the operator to set a breakpoint at the spot where database -** corruption is first detected. +** The SQLITE_*_BKPT macros are substitutes for the error codes with +** the same name but without the _BKPT suffix. These macros invoke +** routines that report the line-number on which the error originated +** using sqlite3_log(). The routines also provide a convenient place +** to set a debugger breakpoint. */ -#ifdef SQLITE_DEBUG -SQLITE_PRIVATE int sqlite3Corrupt(void); -# define SQLITE_CORRUPT_BKPT sqlite3Corrupt() -#else -# define SQLITE_CORRUPT_BKPT SQLITE_CORRUPT +SQLITE_PRIVATE int sqlite3CorruptError(int); +SQLITE_PRIVATE int sqlite3MisuseError(int); +SQLITE_PRIVATE int sqlite3CantopenError(int); +#define SQLITE_CORRUPT_BKPT sqlite3CorruptError(__LINE__) +#define SQLITE_MISUSE_BKPT sqlite3MisuseError(__LINE__) +#define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__) + + +/* +** FTS4 is really an extension for FTS3. It is enabled using the +** SQLITE_ENABLE_FTS3 macro. But to avoid confusion we also all +** the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3. +*/ +#if defined(SQLITE_ENABLE_FTS4) && !defined(SQLITE_ENABLE_FTS3) +# define SQLITE_ENABLE_FTS3 #endif /* @@ -10027,7 +10106,11 @@ SQLITE_PRIVATE int sqlite3StatusValue(int); SQLITE_PRIVATE void sqlite3StatusAdd(int, int); SQLITE_PRIVATE void sqlite3StatusSet(int, int); -SQLITE_PRIVATE int sqlite3IsNaN(double); +#ifndef SQLITE_OMIT_FLOATING_POINT +SQLITE_PRIVATE int sqlite3IsNaN(double); +#else +# define sqlite3IsNaN(X) 0 +#endif SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, int, const char*, va_list); #ifndef SQLITE_OMIT_TRACE @@ -10044,7 +10127,6 @@ SQLITE_PRIVATE void *sqlite3TestTextToPtr(const char*); #endif SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...); SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...); -SQLITE_PRIVATE void sqlite3ErrorClear(Parse*); SQLITE_PRIVATE int sqlite3Dequote(char*); SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int); SQLITE_PRIVATE int sqlite3RunParser(Parse*, const char*, char **); @@ -10214,13 +10296,6 @@ SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int) SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*); SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void); SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void); -#ifdef SQLITE_DEBUG -SQLITE_PRIVATE int sqlite3SafetyOn(sqlite3*); -SQLITE_PRIVATE int sqlite3SafetyOff(sqlite3*); -#else -# define sqlite3SafetyOn(A) 0 -# define sqlite3SafetyOff(A) 0 -#endif SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*); SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*); SQLITE_PRIVATE void sqlite3ChangeCookie(Parse*, int); @@ -10356,7 +10431,7 @@ SQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8, void(*)(void*)); SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value*); SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *); -SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int); +SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8); #ifdef SQLITE_ENABLE_STAT2 SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *, u8, char *, int, int *); #endif @@ -10756,6 +10831,8 @@ SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = { 0, /* isPCacheInit */ 0, /* pInitMutex */ 0, /* nRefInitMutex */ + 0, /* xLog */ + 0, /* pLogArg */ }; @@ -10795,6 +10872,393 @@ SQLITE_PRIVATE int sqlite3PendingByte = 0x40000000; SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER; /************** End of global.c **********************************************/ +/************** Begin file ctime.c *******************************************/ +/* +** 2010 February 23 +** +** The author disclaims copyright to this source code. In place of +** a legal notice, here is a blessing: +** +** May you do good and not evil. +** May you find forgiveness for yourself and forgive others. +** May you share freely, never taking more than you give. +** +************************************************************************* +** +** This file implements routines used to report what compile-time options +** SQLite was built with. +*/ + +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS + + +/* +** An array of names of all compile-time options. This array should +** be sorted A-Z. +** +** This array looks large, but in a typical installation actually uses +** only a handful of compile-time options, so most times this array is usually +** rather short and uses little memory space. +*/ +static const char * const azCompileOpt[] = { + +/* These macros are provided to "stringify" the value of the define +** for those options in which the value is meaningful. */ +#define CTIMEOPT_VAL_(opt) #opt +#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt) + +#ifdef SQLITE_32BIT_ROWID + "32BIT_ROWID", +#endif +#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC + "4_BYTE_ALIGNED_MALLOC", +#endif +#ifdef SQLITE_CASE_SENSITIVE_LIKE + "CASE_SENSITIVE_LIKE", +#endif +#ifdef SQLITE_CHECK_PAGES + "CHECK_PAGES", +#endif +#ifdef SQLITE_COVERAGE_TEST + "COVERAGE_TEST", +#endif +#ifdef SQLITE_DEBUG + "DEBUG", +#endif +#ifdef SQLITE_DEFAULT_LOCKING_MODE + "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE), +#endif +#ifdef SQLITE_DISABLE_DIRSYNC + "DISABLE_DIRSYNC", +#endif +#ifdef SQLITE_DISABLE_LFS + "DISABLE_LFS", +#endif +#ifdef SQLITE_ENABLE_ATOMIC_WRITE + "ENABLE_ATOMIC_WRITE", +#endif +#ifdef SQLITE_ENABLE_CEROD + "ENABLE_CEROD", +#endif +#ifdef SQLITE_ENABLE_COLUMN_METADATA + "ENABLE_COLUMN_METADATA", +#endif +#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT + "ENABLE_EXPENSIVE_ASSERT", +#endif +#ifdef SQLITE_ENABLE_FTS1 + "ENABLE_FTS1", +#endif +#ifdef SQLITE_ENABLE_FTS2 + "ENABLE_FTS2", +#endif +#ifdef SQLITE_ENABLE_FTS3 + "ENABLE_FTS3", +#endif +#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS + "ENABLE_FTS3_PARENTHESIS", +#endif +#ifdef SQLITE_ENABLE_FTS4 + "ENABLE_FTS4", +#endif +#ifdef SQLITE_ENABLE_ICU + "ENABLE_ICU", +#endif +#ifdef SQLITE_ENABLE_IOTRACE + "ENABLE_IOTRACE", +#endif +#ifdef SQLITE_ENABLE_LOAD_EXTENSION + "ENABLE_LOAD_EXTENSION", +#endif +#ifdef SQLITE_ENABLE_LOCKING_STYLE + "ENABLE_LOCKING_STYLE=" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE), +#endif +#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT + "ENABLE_MEMORY_MANAGEMENT", +#endif +#ifdef SQLITE_ENABLE_MEMSYS3 + "ENABLE_MEMSYS3", +#endif +#ifdef SQLITE_ENABLE_MEMSYS5 + "ENABLE_MEMSYS5", +#endif +#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK + "ENABLE_OVERSIZE_CELL_CHECK", +#endif +#ifdef SQLITE_ENABLE_RTREE + "ENABLE_RTREE", +#endif +#ifdef SQLITE_ENABLE_STAT2 + "ENABLE_STAT2", +#endif +#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY + "ENABLE_UNLOCK_NOTIFY", +#endif +#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT + "ENABLE_UPDATE_DELETE_LIMIT", +#endif +#ifdef SQLITE_HAS_CODEC + "HAS_CODEC", +#endif +#ifdef SQLITE_HAVE_ISNAN + "HAVE_ISNAN", +#endif +#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX + "HOMEGROWN_RECURSIVE_MUTEX", +#endif +#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS + "IGNORE_AFP_LOCK_ERRORS", +#endif +#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS + "IGNORE_FLOCK_LOCK_ERRORS", +#endif +#ifdef SQLITE_INT64_TYPE + "INT64_TYPE", +#endif +#ifdef SQLITE_LOCK_TRACE + "LOCK_TRACE", +#endif +#ifdef SQLITE_MEMDEBUG + "MEMDEBUG", +#endif +#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT + "MIXED_ENDIAN_64BIT_FLOAT", +#endif +#ifdef SQLITE_NO_SYNC + "NO_SYNC", +#endif +#ifdef SQLITE_OMIT_ALTERTABLE + "OMIT_ALTERTABLE", +#endif +#ifdef SQLITE_OMIT_ANALYZE + "OMIT_ANALYZE", +#endif +#ifdef SQLITE_OMIT_ATTACH + "OMIT_ATTACH", +#endif +#ifdef SQLITE_OMIT_AUTHORIZATION + "OMIT_AUTHORIZATION", +#endif +#ifdef SQLITE_OMIT_AUTOINCREMENT + "OMIT_AUTOINCREMENT", +#endif +#ifdef SQLITE_OMIT_AUTOINIT + "OMIT_AUTOINIT", +#endif +#ifdef SQLITE_OMIT_AUTOVACUUM + "OMIT_AUTOVACUUM", +#endif +#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION + "OMIT_BETWEEN_OPTIMIZATION", +#endif +#ifdef SQLITE_OMIT_BLOB_LITERAL + "OMIT_BLOB_LITERAL", +#endif +#ifdef SQLITE_OMIT_BTREECOUNT + "OMIT_BTREECOUNT", +#endif +#ifdef SQLITE_OMIT_BUILTIN_TEST + "OMIT_BUILTIN_TEST", +#endif +#ifdef SQLITE_OMIT_CAST + "OMIT_CAST", +#endif +#ifdef SQLITE_OMIT_CHECK + "OMIT_CHECK", +#endif +#ifdef SQLITE_OMIT_COMPILEOPTION_DIAGS + "OMIT_COMPILEOPTION_DIAGS", +#endif +#ifdef SQLITE_OMIT_COMPLETE + "OMIT_COMPLETE", +#endif +#ifdef SQLITE_OMIT_COMPOUND_SELECT + "OMIT_COMPOUND_SELECT", +#endif +#ifdef SQLITE_OMIT_DATETIME_FUNCS + "OMIT_DATETIME_FUNCS", +#endif +#ifdef SQLITE_OMIT_DECLTYPE + "OMIT_DECLTYPE", +#endif +#ifdef SQLITE_OMIT_DEPRECATED + "OMIT_DEPRECATED", +#endif +#ifdef SQLITE_OMIT_DISKIO + "OMIT_DISKIO", +#endif +#ifdef SQLITE_OMIT_EXPLAIN + "OMIT_EXPLAIN", +#endif +#ifdef SQLITE_OMIT_FLAG_PRAGMAS + "OMIT_FLAG_PRAGMAS", +#endif +#ifdef SQLITE_OMIT_FLOATING_POINT + "OMIT_FLOATING_POINT", +#endif +#ifdef SQLITE_OMIT_FOREIGN_KEY + "OMIT_FOREIGN_KEY", +#endif +#ifdef SQLITE_OMIT_GET_TABLE + "OMIT_GET_TABLE", +#endif +#ifdef SQLITE_OMIT_GLOBALRECOVER + "OMIT_GLOBALRECOVER", +#endif +#ifdef SQLITE_OMIT_INCRBLOB + "OMIT_INCRBLOB", +#endif +#ifdef SQLITE_OMIT_INTEGRITY_CHECK + "OMIT_INTEGRITY_CHECK", +#endif +#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION + "OMIT_LIKE_OPTIMIZATION", +#endif +#ifdef SQLITE_OMIT_LOAD_EXTENSION + "OMIT_LOAD_EXTENSION", +#endif +#ifdef SQLITE_OMIT_LOCALTIME + "OMIT_LOCALTIME", +#endif +#ifdef SQLITE_OMIT_LOOKASIDE + "OMIT_LOOKASIDE", +#endif +#ifdef SQLITE_OMIT_MEMORYDB + "OMIT_MEMORYDB", +#endif +#ifdef SQLITE_OMIT_OR_OPTIMIZATION + "OMIT_OR_OPTIMIZATION", +#endif +#ifdef SQLITE_OMIT_PAGER_PRAGMAS + "OMIT_PAGER_PRAGMAS", +#endif +#ifdef SQLITE_OMIT_PRAGMA + "OMIT_PRAGMA", +#endif +#ifdef SQLITE_OMIT_PROGRESS_CALLBACK + "OMIT_PROGRESS_CALLBACK", +#endif +#ifdef SQLITE_OMIT_QUICKBALANCE + "OMIT_QUICKBALANCE", +#endif +#ifdef SQLITE_OMIT_REINDEX + "OMIT_REINDEX", +#endif +#ifdef SQLITE_OMIT_SCHEMA_PRAGMAS + "OMIT_SCHEMA_PRAGMAS", +#endif +#ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS + "OMIT_SCHEMA_VERSION_PRAGMAS", +#endif +#ifdef SQLITE_OMIT_SHARED_CACHE + "OMIT_SHARED_CACHE", +#endif +#ifdef SQLITE_OMIT_SUBQUERY + "OMIT_SUBQUERY", +#endif +#ifdef SQLITE_OMIT_TCL_VARIABLE + "OMIT_TCL_VARIABLE", +#endif +#ifdef SQLITE_OMIT_TEMPDB + "OMIT_TEMPDB", +#endif +#ifdef SQLITE_OMIT_TRACE + "OMIT_TRACE", +#endif +#ifdef SQLITE_OMIT_TRIGGER + "OMIT_TRIGGER", +#endif +#ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION + "OMIT_TRUNCATE_OPTIMIZATION", +#endif +#ifdef SQLITE_OMIT_UTF16 + "OMIT_UTF16", +#endif +#ifdef SQLITE_OMIT_VACUUM + "OMIT_VACUUM", +#endif +#ifdef SQLITE_OMIT_VIEW + "OMIT_VIEW", +#endif +#ifdef SQLITE_OMIT_VIRTUALTABLE + "OMIT_VIRTUALTABLE", +#endif +#ifdef SQLITE_OMIT_WSD + "OMIT_WSD", +#endif +#ifdef SQLITE_OMIT_XFER_OPT + "OMIT_XFER_OPT", +#endif +#ifdef SQLITE_PERFORMANCE_TRACE + "PERFORMANCE_TRACE", +#endif +#ifdef SQLITE_PROXY_DEBUG + "PROXY_DEBUG", +#endif +#ifdef SQLITE_SECURE_DELETE + "SECURE_DELETE", +#endif +#ifdef SQLITE_SMALL_STACK + "SMALL_STACK", +#endif +#ifdef SQLITE_SOUNDEX + "SOUNDEX", +#endif +#ifdef SQLITE_TCL + "TCL", +#endif +#ifdef SQLITE_TEMP_STORE + "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE), +#endif +#ifdef SQLITE_TEST + "TEST", +#endif +#ifdef SQLITE_THREADSAFE + "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE), +#endif +#ifdef SQLITE_USE_ALLOCA + "USE_ALLOCA", +#endif +#ifdef SQLITE_ZERO_MALLOC + "ZERO_MALLOC" +#endif +}; + +/* +** Given the name of a compile-time option, return true if that option +** was used and false if not. +** +** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix +** is not required for a match. +*/ +SQLITE_API int sqlite3_compileoption_used(const char *zOptName){ + int i, n; + if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7; + n = sqlite3Strlen30(zOptName); + + /* Since ArraySize(azCompileOpt) is normally in single digits, a + ** linear search is adequate. No need for a binary search. */ + for(i=0; i<ArraySize(azCompileOpt); i++){ + if( (sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0) + && ( (azCompileOpt[i][n]==0) || (azCompileOpt[i][n]=='=') ) ) return 1; + } + return 0; +} + +/* +** Return the N-th compile-time option string. If N is out of range, +** return a NULL pointer. +*/ +SQLITE_API const char *sqlite3_compileoption_get(int N){ + if( N>=0 && N<ArraySize(azCompileOpt) ){ + return azCompileOpt[N]; + } + return 0; +} + +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ + +/************** End of ctime.c ***********************************************/ /************** Begin file status.c ******************************************/ /* ** 2008 June 18 @@ -10880,7 +11344,7 @@ SQLITE_PRIVATE void sqlite3StatusSet(int op, int X){ SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){ wsdStatInit; if( op<0 || op>=ArraySize(wsdStat.nowValue) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } *pCurrent = wsdStat.nowValue[op]; *pHighwater = wsdStat.mxValue[op]; @@ -12009,8 +12473,8 @@ SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){ FUNCTION(current_date, 0, 0, 0, cdateFunc ), #else STR_FUNCTION(current_time, 0, "%H:%M:%S", 0, currentTimeFunc), - STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d", 0, currentTimeFunc), - STR_FUNCTION(current_date, 0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc), + STR_FUNCTION(current_date, 0, "%Y-%m-%d", 0, currentTimeFunc), + STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc), #endif }; int i; @@ -12137,11 +12601,11 @@ SQLITE_PRIVATE int sqlite3OsOpen( ){ int rc; DO_OS_MALLOC_TEST(0); - /* 0x7f1f is a mask of SQLITE_OPEN_ flags that are valid to be passed + /* 0x7f3f is a mask of SQLITE_OPEN_ flags that are valid to be passed ** down into the VFS layer. Some SQLITE_OPEN_ flags (for example, ** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before ** reaching the VFS. */ - rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x7f1f, pFlagsOut); + rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x7f3f, pFlagsOut); assert( rc==SQLITE_OK || pFile->pMethods==0 ); return rc; } @@ -12516,6 +12980,9 @@ static void *sqlite3MemMalloc(int nByte){ if( p ){ p[0] = nByte; p++; + }else{ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte); } return (void *)p; } @@ -12536,6 +13003,18 @@ static void sqlite3MemFree(void *pPrior){ } /* +** Report the allocated size of a prior return from xMalloc() +** or xRealloc(). +*/ +static int sqlite3MemSize(void *pPrior){ + sqlite3_int64 *p; + if( pPrior==0 ) return 0; + p = (sqlite3_int64*)pPrior; + p--; + return (int)p[0]; +} + +/* ** Like realloc(). Resize an allocation previously obtained from ** sqlite3MemMalloc(). ** @@ -12549,29 +13028,21 @@ static void *sqlite3MemRealloc(void *pPrior, int nByte){ sqlite3_int64 *p = (sqlite3_int64*)pPrior; assert( pPrior!=0 && nByte>0 ); nByte = ROUND8(nByte); - p = (sqlite3_int64*)pPrior; p--; p = realloc(p, nByte+8 ); if( p ){ p[0] = nByte; p++; + }else{ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(SQLITE_NOMEM, + "failed memory resize %u to %u bytes", + sqlite3MemSize(pPrior), nByte); } return (void*)p; } /* -** Report the allocated size of a prior return from xMalloc() -** or xRealloc(). -*/ -static int sqlite3MemSize(void *pPrior){ - sqlite3_int64 *p; - if( pPrior==0 ) return 0; - p = (sqlite3_int64*)pPrior; - p--; - return (int)p[0]; -} - -/* ** Round up a request size to the next valid allocation size. */ static int sqlite3MemRoundup(int n){ @@ -12918,7 +13389,8 @@ static void sqlite3MemFree(void *pPrior){ struct MemBlockHdr *pHdr; void **pBt; char *z; - assert( sqlite3GlobalConfig.bMemstat || mem.mutex!=0 ); + assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0 + || mem.mutex!=0 ); pHdr = sqlite3MemsysGetHeader(pPrior); pBt = (void**)pHdr; pBt -= pHdr->nBacktraceSlots; @@ -14045,7 +14517,11 @@ static void *memsys5MallocUnsafe(int nByte){ ** two in order to create a new free block of size iLogsize. */ for(iBin=iLogsize; mem5.aiFreelist[iBin]<0 && iBin<=LOGMAX; iBin++){} - if( iBin>LOGMAX ) return 0; + if( iBin>LOGMAX ){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte); + return 0; + } i = memsys5UnlinkFirst(iBin); while( iBin>iLogsize ){ int newSize; @@ -15322,7 +15798,16 @@ struct sqlite3_mutex { int id; /* Mutex type */ int nRef; /* Number of enterances */ DWORD owner; /* Thread holding this mutex */ +#ifdef SQLITE_DEBUG + int trace; /* True to trace changes */ +#endif }; +#define SQLITE_W32_MUTEX_INITIALIZER { 0 } +#ifdef SQLITE_DEBUG +#define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER, 0, 0L, (DWORD)0, 0 } +#else +#define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER, 0, 0L, (DWORD)0 } +#endif /* ** Return true (non-zero) if we are running under WinNT, Win2K, WinXP, @@ -15366,8 +15851,12 @@ struct sqlite3_mutex { static int winMutexHeld(sqlite3_mutex *p){ return p->nRef!=0 && p->owner==GetCurrentThreadId(); } +static int winMutexNotheld2(sqlite3_mutex *p, DWORD tid){ + return p->nRef==0 || p->owner!=tid; +} static int winMutexNotheld(sqlite3_mutex *p){ - return p->nRef==0 || p->owner!=GetCurrentThreadId(); + DWORD tid = GetCurrentThreadId(); + return winMutexNotheld2(p, tid); } #endif @@ -15375,7 +15864,14 @@ static int winMutexNotheld(sqlite3_mutex *p){ /* ** Initialize and deinitialize the mutex subsystem. */ -static sqlite3_mutex winMutex_staticMutexes[6]; +static sqlite3_mutex winMutex_staticMutexes[6] = { + SQLITE3_MUTEX_INITIALIZER, + SQLITE3_MUTEX_INITIALIZER, + SQLITE3_MUTEX_INITIALIZER, + SQLITE3_MUTEX_INITIALIZER, + SQLITE3_MUTEX_INITIALIZER, + SQLITE3_MUTEX_INITIALIZER +}; static int winMutex_isInit = 0; /* As winMutexInit() and winMutexEnd() are called as part ** of the sqlite3_initialize and sqlite3_shutdown() @@ -15509,14 +16005,23 @@ static void winMutexFree(sqlite3_mutex *p){ ** more than once, the behavior is undefined. */ static void winMutexEnter(sqlite3_mutex *p){ - assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) ); + DWORD tid = GetCurrentThreadId(); + assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld2(p, tid) ); EnterCriticalSection(&p->mutex); - p->owner = GetCurrentThreadId(); + p->owner = tid; p->nRef++; +#ifdef SQLITE_DEBUG + if( p->trace ){ + printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef); + } +#endif } static int winMutexTry(sqlite3_mutex *p){ +#ifndef NDEBUG + DWORD tid = GetCurrentThreadId(); +#endif int rc = SQLITE_BUSY; - assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld(p) ); + assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld2(p, tid) ); /* ** The sqlite3_mutex_try() routine is very rarely used, and when it ** is used it is merely an optimization. So it is OK for it to always @@ -15530,13 +16035,18 @@ static int winMutexTry(sqlite3_mutex *p){ */ #if 0 if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){ - p->owner = GetCurrentThreadId(); + p->owner = tid; p->nRef++; rc = SQLITE_OK; } #else UNUSED_PARAMETER(p); #endif +#ifdef SQLITE_DEBUG + if( rc==SQLITE_OK && p->trace ){ + printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef); + } +#endif return rc; } @@ -15547,11 +16057,19 @@ static int winMutexTry(sqlite3_mutex *p){ ** is not currently allocated. SQLite will never do either. */ static void winMutexLeave(sqlite3_mutex *p){ +#ifndef NDEBUG + DWORD tid = GetCurrentThreadId(); +#endif assert( p->nRef>0 ); - assert( p->owner==GetCurrentThreadId() ); + assert( p->owner==tid ); p->nRef--; assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE ); LeaveCriticalSection(&p->mutex); +#ifdef SQLITE_DEBUG + if( p->trace ){ + printf("leave mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef); + } +#endif } SQLITE_PRIVATE sqlite3_mutex_methods *sqlite3DefaultMutex(void){ @@ -16750,7 +17268,9 @@ SQLITE_PRIVATE void sqlite3VXPrintf( case etEXP: case etGENERIC: realvalue = va_arg(ap,double); -#ifndef SQLITE_OMIT_FLOATING_POINT +#ifdef SQLITE_OMIT_FLOATING_POINT + length = 0; +#else if( precision<0 ) precision = 6; /* Set default precision */ if( precision>etBUFSIZE/2-10 ) precision = etBUFSIZE/2-10; if( realvalue<0.0 ){ @@ -16896,7 +17416,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf( while( nPad-- ) bufpt[i++] = '0'; length = width; } -#endif +#endif /* !defined(SQLITE_OMIT_FLOATING_POINT) */ break; case etSIZE: *(va_arg(ap,int*)) = pAccum->nChar; @@ -16943,7 +17463,7 @@ SQLITE_PRIVATE void sqlite3VXPrintf( isnull = escarg==0; if( isnull ) escarg = (xtype==etSQLESCAPE2 ? "NULL" : "(NULL)"); k = precision; - for(i=n=0; (ch=escarg[i])!=0 && k!=0; i++, k--){ + for(i=n=0; k!=0 && (ch=escarg[i])!=0; i++, k--){ if( ch==q ) n++; } needQuote = !isnull && xtype==etSQLESCAPE2; @@ -17227,6 +17747,38 @@ SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){ return z; } +/* +** This is the routine that actually formats the sqlite3_log() message. +** We house it in a separate routine from sqlite3_log() to avoid using +** stack space on small-stack systems when logging is disabled. +** +** sqlite3_log() must render into a static buffer. It cannot dynamically +** allocate memory because it might be called while the memory allocator +** mutex is held. +*/ +static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){ + StrAccum acc; /* String accumulator */ + char zMsg[SQLITE_PRINT_BUF_SIZE*3]; /* Complete log message */ + + sqlite3StrAccumInit(&acc, zMsg, sizeof(zMsg), 0); + acc.useMalloc = 0; + sqlite3VXPrintf(&acc, 0, zFormat, ap); + sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode, + sqlite3StrAccumFinish(&acc)); +} + +/* +** Format and write a message to the log if logging is enabled. +*/ +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){ + va_list ap; /* Vararg list */ + if( sqlite3GlobalConfig.xLog ){ + va_start(ap, zFormat); + renderLogMsg(iErrCode, zFormat, ap); + va_end(ap); + } +} + #if defined(SQLITE_DEBUG) /* ** A version of printf() that understands %lld. Used for debugging. @@ -17749,6 +18301,7 @@ struct Vdbe { u8 explain; /* True if EXPLAIN present on SQL command */ u8 changeCntOn; /* True to update the change-counter */ u8 expired; /* True if the VM needs to be recompiled */ + u8 runOnlyOnce; /* Automatically expire on reset */ u8 minWriteFileFormat; /* Minimum file format for writable database files */ u8 inVtabMethod; /* See comments above */ u8 usesStmtJournal; /* True if uses a statement journal */ @@ -17810,7 +18363,11 @@ SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem*, Mem*); SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem*); SQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*)); SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64); -SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem*, double); +#ifdef SQLITE_OMIT_FLOATING_POINT +# define sqlite3VdbeMemSetDouble sqlite3VdbeMemSetInt64 +#else +SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem*, double); +#endif SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*); SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int); SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem*); @@ -18263,11 +18820,11 @@ SQLITE_PRIVATE int sqlite3Utf8To8(unsigned char *zIn){ ** ** NULL is returned if there is an allocation error. */ -SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte){ +SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){ Mem m; memset(&m, 0, sizeof(m)); m.db = db; - sqlite3VdbeMemSetStr(&m, z, nByte, SQLITE_UTF16NATIVE, SQLITE_STATIC); + sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC); sqlite3VdbeChangeEncoding(&m, SQLITE_UTF8); if( db->mallocFailed ){ sqlite3VdbeMemRelease(&m); @@ -18275,7 +18832,9 @@ SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte){ } assert( (m.flags & MEM_Term)!=0 || db->mallocFailed ); assert( (m.flags & MEM_Str)!=0 || db->mallocFailed ); - return (m.flags & MEM_Dyn)!=0 ? m.z : sqlite3DbStrDup(db, m.z); + assert( (m.flags & MEM_Dyn)!=0 || db->mallocFailed ); + assert( m.z || db->mallocFailed ); + return m.z; } /* @@ -18416,6 +18975,7 @@ SQLITE_PRIVATE void sqlite3Coverage(int x){ } #endif +#ifndef SQLITE_OMIT_FLOATING_POINT /* ** Return true if the floating point value is Not a Number (NaN). ** @@ -18460,6 +19020,7 @@ SQLITE_PRIVATE int sqlite3IsNaN(double x){ testcase( rc ); return rc; } +#endif /* SQLITE_OMIT_FLOATING_POINT */ /* ** Compute a string length that is limited to what can be stored in @@ -18531,23 +19092,20 @@ SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ** (sqlite3_step() etc.). */ SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){ + char *zMsg; va_list ap; sqlite3 *db = pParse->db; - pParse->nErr++; - sqlite3DbFree(db, pParse->zErrMsg); va_start(ap, zFormat); - pParse->zErrMsg = sqlite3VMPrintf(db, zFormat, ap); + zMsg = sqlite3VMPrintf(db, zFormat, ap); va_end(ap); - pParse->rc = SQLITE_ERROR; -} - -/* -** Clear the error message in pParse, if any -*/ -SQLITE_PRIVATE void sqlite3ErrorClear(Parse *pParse){ - sqlite3DbFree(pParse->db, pParse->zErrMsg); - pParse->zErrMsg = 0; - pParse->nErr = 0; + if( db->suppressErr ){ + sqlite3DbFree(db, zMsg); + }else{ + pParse->nErr++; + sqlite3DbFree(db, pParse->zErrMsg); + pParse->zErrMsg = zMsg; + pParse->rc = SQLITE_ERROR; + } } /* @@ -18640,6 +19198,7 @@ SQLITE_PRIVATE int sqlite3IsNumber(const char *z, int *realnum, u8 enc){ z += incr; *realnum = 0; while( sqlite3Isdigit(*z) ){ z += incr; } +#ifndef SQLITE_OMIT_FLOATING_POINT if( *z=='.' ){ z += incr; if( !sqlite3Isdigit(*z) ) return 0; @@ -18653,6 +19212,7 @@ SQLITE_PRIVATE int sqlite3IsNumber(const char *z, int *realnum, u8 enc){ while( sqlite3Isdigit(*z) ){ z += incr; } *realnum = 1; } +#endif return *z==0; } @@ -18814,6 +19374,9 @@ static int compare2pow63(const char *zNum){ c = memcmp(zNum,"922337203685477580",18)*10; if( c==0 ){ c = zNum[18] - '8'; + testcase( c==(-1) ); + testcase( c==0 ); + testcase( c==(+1) ); } return c; } @@ -18850,6 +19413,9 @@ SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum){ v = v*10 + c - '0'; } *pNum = neg ? -v : v; + testcase( i==18 ); + testcase( i==19 ); + testcase( i==20 ); if( c!=0 || (i==0 && zStart==zNum) || i>19 ){ /* zNum is empty or contains non-numeric text or is longer ** than 19 digits (thus guaranting that it is too large) */ @@ -18893,6 +19459,9 @@ SQLITE_PRIVATE int sqlite3FitsIn64Bits(const char *zNum, int negFlag){ zNum++; /* Skip leading zeros. Ticket #2454 */ } for(i=0; zNum[i]; i++){ assert( zNum[i]>='0' && zNum[i]<='9' ); } + testcase( i==18 ); + testcase( i==19 ); + testcase( i==20 ); if( i<19 ){ /* Guaranteed to fit if less than 19 digits */ return 1; @@ -18933,9 +19502,11 @@ SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){ ** 1234567890 ** 2^31 -> 2147483648 */ + testcase( i==10 ); if( i>10 ){ return 0; } + testcase( v-neg==2147483647 ); if( v-neg>2147483647 ){ return 0; } @@ -19024,6 +19595,19 @@ SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char *p, u32 v){ } /* +** Bitmasks used by sqlite3GetVarint(). These precomputed constants +** are defined here rather than simply putting the constant expressions +** inline in order to work around bugs in the RVT compiler. +** +** SLOT_2_0 A mask for (0x7f<<14) | 0x7f +** +** SLOT_4_2_0 A mask for (0x7f<<28) | SLOT_2_0 +*/ +#define SLOT_2_0 0x001fc07f +#define SLOT_4_2_0 0xf01fc07f + + +/* ** Read a 64-bit variable-length integer from memory starting at p[0]. ** Return the number of bytes read. The value is stored in *v. */ @@ -19050,13 +19634,17 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ return 2; } + /* Verify that constants are precomputed correctly */ + assert( SLOT_2_0 == ((0x7f<<14) | (0x7f)) ); + assert( SLOT_4_2_0 == ((0xfU<<28) | (0x7f<<14) | (0x7f)) ); + p++; a = a<<14; a |= *p; /* a: p0<<14 | p2 (unmasked) */ if (!(a&0x80)) { - a &= (0x7f<<14)|(0x7f); + a &= SLOT_2_0; b &= 0x7f; b = b<<7; a |= b; @@ -19065,14 +19653,14 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ } /* CSE1 from below */ - a &= (0x7f<<14)|(0x7f); + a &= SLOT_2_0; p++; b = b<<14; b |= *p; /* b: p1<<14 | p3 (unmasked) */ if (!(b&0x80)) { - b &= (0x7f<<14)|(0x7f); + b &= SLOT_2_0; /* moved CSE1 up */ /* a &= (0x7f<<14)|(0x7f); */ a = a<<7; @@ -19086,7 +19674,7 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */ /* moved CSE1 up */ /* a &= (0x7f<<14)|(0x7f); */ - b &= (0x7f<<14)|(0x7f); + b &= SLOT_2_0; s = a; /* s: p0<<14 | p2 (masked) */ @@ -19119,7 +19707,7 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ { /* we can skip this cause it was (effectively) done above in calc'ing s */ /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */ - a &= (0x7f<<14)|(0x7f); + a &= SLOT_2_0; a = a<<7; a |= b; s = s>>18; @@ -19133,8 +19721,8 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ /* a: p2<<28 | p4<<14 | p6 (unmasked) */ if (!(a&0x80)) { - a &= (0x1f<<28)|(0x7f<<14)|(0x7f); - b &= (0x7f<<14)|(0x7f); + a &= SLOT_4_2_0; + b &= SLOT_2_0; b = b<<7; a |= b; s = s>>11; @@ -19143,14 +19731,14 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ } /* CSE2 from below */ - a &= (0x7f<<14)|(0x7f); + a &= SLOT_2_0; p++; b = b<<14; b |= *p; /* b: p3<<28 | p5<<14 | p7 (unmasked) */ if (!(b&0x80)) { - b &= (0x1f<<28)|(0x7f<<14)|(0x7f); + b &= SLOT_4_2_0; /* moved CSE2 up */ /* a &= (0x7f<<14)|(0x7f); */ a = a<<7; @@ -19167,7 +19755,7 @@ SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){ /* moved CSE2 up */ /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */ - b &= (0x7f<<14)|(0x7f); + b &= SLOT_2_0; b = b<<8; a |= b; @@ -19287,9 +19875,9 @@ SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){ /* a: p0<<28 | p2<<14 | p4 (unmasked) */ if (!(a&0x80)) { - /* Walues between 268435456 and 34359738367 */ - a &= (0x1f<<28)|(0x7f<<14)|(0x7f); - b &= (0x1f<<28)|(0x7f<<14)|(0x7f); + /* Values between 268435456 and 34359738367 */ + a &= SLOT_4_2_0; + b &= SLOT_4_2_0; b = b<<7; *v = a | b; return 5; @@ -19382,64 +19970,17 @@ SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){ } #endif /* !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */ - /* -** Change the sqlite.magic from SQLITE_MAGIC_OPEN to SQLITE_MAGIC_BUSY. -** Return an error (non-zero) if the magic was not SQLITE_MAGIC_OPEN -** when this routine is called. -** -** This routine is called when entering an SQLite API. The SQLITE_MAGIC_OPEN -** value indicates that the database connection passed into the API is -** open and is not being used by another thread. By changing the value -** to SQLITE_MAGIC_BUSY we indicate that the connection is in use. -** sqlite3SafetyOff() below will change the value back to SQLITE_MAGIC_OPEN -** when the API exits. -** -** This routine is a attempt to detect if two threads use the -** same sqlite* pointer at the same time. There is a race -** condition so it is possible that the error is not detected. -** But usually the problem will be seen. The result will be an -** error which can be used to debug the application that is -** using SQLite incorrectly. -** -** Ticket #202: If db->magic is not a valid open value, take care not -** to modify the db structure at all. It could be that db is a stale -** pointer. In other words, it could be that there has been a prior -** call to sqlite3_close(db) and db has been deallocated. And we do -** not want to write into deallocated memory. +** Log an error that is an API call on a connection pointer that should +** not have been used. The "type" of connection pointer is given as the +** argument. The zType is a word like "NULL" or "closed" or "invalid". */ -#ifdef SQLITE_DEBUG -SQLITE_PRIVATE int sqlite3SafetyOn(sqlite3 *db){ - if( db->magic==SQLITE_MAGIC_OPEN ){ - db->magic = SQLITE_MAGIC_BUSY; - assert( sqlite3_mutex_held(db->mutex) ); - return 0; - }else if( db->magic==SQLITE_MAGIC_BUSY ){ - db->magic = SQLITE_MAGIC_ERROR; - db->u1.isInterrupted = 1; - } - return 1; -} -#endif - -/* -** Change the magic from SQLITE_MAGIC_BUSY to SQLITE_MAGIC_OPEN. -** Return an error (non-zero) if the magic was not SQLITE_MAGIC_BUSY -** when this routine is called. -*/ -#ifdef SQLITE_DEBUG -SQLITE_PRIVATE int sqlite3SafetyOff(sqlite3 *db){ - if( db->magic==SQLITE_MAGIC_BUSY ){ - db->magic = SQLITE_MAGIC_OPEN; - assert( sqlite3_mutex_held(db->mutex) ); - return 0; - }else{ - db->magic = SQLITE_MAGIC_ERROR; - db->u1.isInterrupted = 1; - return 1; - } +static void logBadConnection(const char *zType){ + sqlite3_log(SQLITE_MISUSE, + "API call with %s database connection pointer", + zType + ); } -#endif /* ** Check to make sure we have a valid db pointer. This test is not @@ -19457,13 +19998,16 @@ SQLITE_PRIVATE int sqlite3SafetyOff(sqlite3 *db){ */ SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){ u32 magic; - if( db==0 ) return 0; + if( db==0 ){ + logBadConnection("NULL"); + return 0; + } magic = db->magic; - if( magic!=SQLITE_MAGIC_OPEN -#ifdef SQLITE_DEBUG - && magic!=SQLITE_MAGIC_BUSY -#endif - ){ + if( magic!=SQLITE_MAGIC_OPEN ){ + if( sqlite3SafetyCheckSickOrOk(db) ){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + logBadConnection("unopened"); + } return 0; }else{ return 1; @@ -19474,8 +20018,13 @@ SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){ magic = db->magic; if( magic!=SQLITE_MAGIC_SICK && magic!=SQLITE_MAGIC_OPEN && - magic!=SQLITE_MAGIC_BUSY ) return 0; - return 1; + magic!=SQLITE_MAGIC_BUSY ){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + logBadConnection("invalid"); + return 0; + }else{ + return 1; + } } /************** End of util.c ************************************************/ @@ -21389,10 +21938,18 @@ SQLITE_API int sqlite3_os_end(void){ # else # include <sys/file.h> # include <sys/param.h> -# include <sys/mount.h> # endif #endif /* SQLITE_ENABLE_LOCKING_STYLE */ +#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS) +# include <sys/mount.h> +#endif + +/* +** Allowed values of unixFile.fsFlags +*/ +#define SQLITE_FSFLAGS_IS_MSDOS 0x1 + /* ** If we are to be thread-safe, include the pthreads header and define ** the SQLITE_UNIX_THREADS macro. @@ -21459,6 +22016,9 @@ struct unixFile { #if SQLITE_ENABLE_LOCKING_STYLE int openFlags; /* The flags specified at open() */ #endif +#if SQLITE_ENABLE_LOCKING_STYLE || defined(__APPLE__) + unsigned fsFlags; /* cached details from statfs() */ +#endif #if SQLITE_THREADSAFE && defined(__linux__) pthread_t tid; /* The thread that "owns" this unixFile */ #endif @@ -22226,6 +22786,9 @@ struct unixLockInfo { int cnt; /* Number of SHARED locks held */ int locktype; /* One of SHARED_LOCK, RESERVED_LOCK etc. */ int nRef; /* Number of pointers to this structure */ +#if defined(SQLITE_ENABLE_LOCKING_STYLE) + unsigned long long sharedByte; /* for AFP simulated shared lock */ +#endif struct unixLockInfo *pNext; /* List of all unixLockInfo objects */ struct unixLockInfo *pPrev; /* .... doubly linked */ }; @@ -22469,9 +23032,10 @@ static int findLockInfo( ** is a race condition such that another thread has already populated ** the first page of the database, no damage is done. */ - if( statbuf.st_size==0 ){ + if( statbuf.st_size==0 && (pFile->fsFlags & SQLITE_FSFLAGS_IS_MSDOS)!=0 ){ rc = write(fd, "S", 1); if( rc!=1 ){ + pFile->lastErrno = errno; return SQLITE_IOERR; } rc = fstat(fd, &statbuf); @@ -22511,6 +23075,9 @@ static int findLockInfo( pLock->nRef = 1; pLock->cnt = 0; pLock->locktype = 0; +#if defined(SQLITE_ENABLE_LOCKING_STYLE) + pLock->sharedByte = 0; +#endif pLock->pNext = lockList; pLock->pPrev = 0; if( lockList ) lockList->pPrev = pLock; @@ -22575,7 +23142,7 @@ static int transferOwnership(unixFile *pFile){ } if( pFile->locktype!=NO_LOCK ){ /* We cannot change ownership while we are holding a lock! */ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } OSTRACE4("Transfer ownership of %d from %d to %d\n", pFile->h, pFile->tid, hSelf); @@ -22645,62 +23212,6 @@ static int unixCheckReservedLock(sqlite3_file *id, int *pResOut){ } /* -** Perform a file locking operation on a range of bytes in a file. -** The "op" parameter should be one of F_RDLCK, F_WRLCK, or F_UNLCK. -** Return 0 on success or -1 for failure. On failure, write the error -** code into *pErrcode. -** -** If the SQLITE_WHOLE_FILE_LOCKING bit is clear, then only lock -** the range of bytes on the locking page between SHARED_FIRST and -** SHARED_SIZE. If SQLITE_WHOLE_FILE_LOCKING is set, then lock all -** bytes from 0 up to but not including PENDING_BYTE, and all bytes -** that follow SHARED_FIRST. -** -** In other words, of SQLITE_WHOLE_FILE_LOCKING if false (the historical -** default case) then only lock a small range of bytes from SHARED_FIRST -** through SHARED_FIRST+SHARED_SIZE-1. But if SQLITE_WHOLE_FILE_LOCKING is -** true then lock every byte in the file except for PENDING_BYTE and -** RESERVED_BYTE. -** -** SQLITE_WHOLE_FILE_LOCKING=true overlaps SQLITE_WHOLE_FILE_LOCKING=false -** and so the locking schemes are compatible. One type of lock will -** effectively exclude the other type. The reason for using the -** SQLITE_WHOLE_FILE_LOCKING=true is that by indicating the full range -** of bytes to be read or written, we give hints to NFS to help it -** maintain cache coherency. On the other hand, whole file locking -** is slower, so we don't want to use it except for NFS. -*/ -static int rangeLock(unixFile *pFile, int op, int *pErrcode){ - struct flock lock; - int rc; - lock.l_type = op; - lock.l_start = SHARED_FIRST; - lock.l_whence = SEEK_SET; - if( (pFile->fileFlags & SQLITE_WHOLE_FILE_LOCKING)==0 ){ - lock.l_len = SHARED_SIZE; - rc = fcntl(pFile->h, F_SETLK, &lock); - *pErrcode = errno; - }else{ - lock.l_len = 0; - rc = fcntl(pFile->h, F_SETLK, &lock); - *pErrcode = errno; - if( NEVER(op==F_UNLCK) || rc!=(-1) ){ - lock.l_start = 0; - lock.l_len = PENDING_BYTE; - rc = fcntl(pFile->h, F_SETLK, &lock); - if( ALWAYS(op!=F_UNLCK) && rc==(-1) ){ - *pErrcode = errno; - lock.l_type = F_UNLCK; - lock.l_start = SHARED_FIRST; - lock.l_len = 0; - fcntl(pFile->h, F_SETLK, &lock); - } - } - } - return rc; -} - -/* ** Lock the file with the lock specified by parameter locktype - one ** of the following: ** @@ -22768,7 +23279,7 @@ static int unixLock(sqlite3_file *id, int locktype){ struct unixLockInfo *pLock = pFile->pLock; struct flock lock; int s = 0; - int tErrno; + int tErrno = 0; assert( pFile ); OSTRACE7("LOCK %d %s was %s(%s,%d) pid=%d (unix)\n", pFile->h, @@ -22864,8 +23375,11 @@ static int unixLock(sqlite3_file *id, int locktype){ assert( pLock->locktype==0 ); /* Now get the read-lock */ - s = rangeLock(pFile, F_RDLCK, &tErrno); - + lock.l_start = SHARED_FIRST; + lock.l_len = SHARED_SIZE; + if( (s = fcntl(pFile->h, F_SETLK, &lock))==(-1) ){ + tErrno = errno; + } /* Drop the temporary PENDING lock */ lock.l_start = PENDING_BYTE; lock.l_len = 1L; @@ -22905,16 +23419,17 @@ static int unixLock(sqlite3_file *id, int locktype){ switch( locktype ){ case RESERVED_LOCK: lock.l_start = RESERVED_BYTE; - s = fcntl(pFile->h, F_SETLK, &lock); - tErrno = errno; break; case EXCLUSIVE_LOCK: - s = rangeLock(pFile, F_WRLCK, &tErrno); + lock.l_start = SHARED_FIRST; + lock.l_len = SHARED_SIZE; break; default: assert(0); } + s = fcntl(pFile->h, F_SETLK, &lock); if( s==(-1) ){ + tErrno = errno; rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK); if( IS_LOCK_ERROR(rc) ){ pFile->lastErrno = tErrno; @@ -23004,13 +23519,19 @@ static void setPendingFd(unixFile *pFile){ ** ** If the locking level of the file descriptor is already at or below ** the requested locking level, this routine is a no-op. +** +** If handleNFSUnlock is true, then on downgrading an EXCLUSIVE_LOCK to SHARED +** the byte range is divided into 2 parts and the first part is unlocked then +** set to a read lock, then the other part is simply unlocked. This works +** around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to +** remove the write lock on a region when a read lock is set. */ -static int unixUnlock(sqlite3_file *id, int locktype){ - unixFile *pFile = (unixFile*)id; /* The open file */ - struct unixLockInfo *pLock; /* Structure describing current lock state */ - struct flock lock; /* Information passed into fcntl() */ - int rc = SQLITE_OK; /* Return code from this interface */ - int h; /* The underlying file descriptor */ +static int _posixUnlock(sqlite3_file *id, int locktype, int handleNFSUnlock){ + unixFile *pFile = (unixFile*)id; + struct unixLockInfo *pLock; + struct flock lock; + int rc = SQLITE_OK; + int h; int tErrno; /* Error code from system call errors */ assert( pFile ); @@ -23022,7 +23543,7 @@ static int unixUnlock(sqlite3_file *id, int locktype){ return SQLITE_OK; } if( CHECK_THREADID(pFile) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } unixEnterMutex(); h = pFile->h; @@ -23049,14 +23570,68 @@ static int unixUnlock(sqlite3_file *id, int locktype){ pFile->inNormalWrite = 0; #endif - + /* downgrading to a shared lock on NFS involves clearing the write lock + ** before establishing the readlock - to avoid a race condition we downgrade + ** the lock in 2 blocks, so that part of the range will be covered by a + ** write lock until the rest is covered by a read lock: + ** 1: [WWWWW] + ** 2: [....W] + ** 3: [RRRRW] + ** 4: [RRRR.] + */ if( locktype==SHARED_LOCK ){ - if( rangeLock(pFile, F_RDLCK, &tErrno)==(-1) ){ - rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_RDLOCK); - if( IS_LOCK_ERROR(rc) ){ - pFile->lastErrno = tErrno; + if( handleNFSUnlock ){ + off_t divSize = SHARED_SIZE - 1; + + lock.l_type = F_UNLCK; + lock.l_whence = SEEK_SET; + lock.l_start = SHARED_FIRST; + lock.l_len = divSize; + if( fcntl(h, F_SETLK, &lock)==(-1) ){ + tErrno = errno; + rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); + if( IS_LOCK_ERROR(rc) ){ + pFile->lastErrno = tErrno; + } + goto end_unlock; + } + lock.l_type = F_RDLCK; + lock.l_whence = SEEK_SET; + lock.l_start = SHARED_FIRST; + lock.l_len = divSize; + if( fcntl(h, F_SETLK, &lock)==(-1) ){ + tErrno = errno; + rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_RDLOCK); + if( IS_LOCK_ERROR(rc) ){ + pFile->lastErrno = tErrno; + } + goto end_unlock; + } + lock.l_type = F_UNLCK; + lock.l_whence = SEEK_SET; + lock.l_start = SHARED_FIRST+divSize; + lock.l_len = SHARED_SIZE-divSize; + if( fcntl(h, F_SETLK, &lock)==(-1) ){ + tErrno = errno; + rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK); + if( IS_LOCK_ERROR(rc) ){ + pFile->lastErrno = tErrno; + } + goto end_unlock; + } + }else{ + lock.l_type = F_RDLCK; + lock.l_whence = SEEK_SET; + lock.l_start = SHARED_FIRST; + lock.l_len = SHARED_SIZE; + if( fcntl(h, F_SETLK, &lock)==(-1) ){ + tErrno = errno; + rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_RDLOCK); + if( IS_LOCK_ERROR(rc) ){ + pFile->lastErrno = tErrno; + } + goto end_unlock; } - goto end_unlock; } } lock.l_type = F_UNLCK; @@ -23124,6 +23699,17 @@ end_unlock: } /* +** Lower the locking level on file descriptor pFile to locktype. locktype +** must be either NO_LOCK or SHARED_LOCK. +** +** If the locking level of the file descriptor is already at or below +** the requested locking level, this routine is a no-op. +*/ +static int unixUnlock(sqlite3_file *id, int locktype){ + return _posixUnlock(id, locktype, 0); +} + +/* ** This function performs the parts of the "close file" operation ** common to all locking schemes. It closes the directory and file ** handles, if they are valid, and sets all fields of the unixFile @@ -23834,7 +24420,7 @@ static int semClose(sqlite3_file *id) { */ typedef struct afpLockingContext afpLockingContext; struct afpLockingContext { - unsigned long long sharedByte; + int reserved; const char *dbPath; /* Name of the open file */ }; @@ -23911,9 +24497,14 @@ static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){ assert( pFile ); afpLockingContext *context = (afpLockingContext *) pFile->lockingContext; + if( context->reserved ){ + *pResOut = 1; + return SQLITE_OK; + } + unixEnterMutex(); /* Because pFile->pLock is shared across threads */ /* Check if a thread in this process holds such a lock */ - if( pFile->locktype>SHARED_LOCK ){ + if( pFile->pLock->locktype>SHARED_LOCK ){ reserved = 1; } @@ -23935,6 +24526,7 @@ static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){ } } + unixLeaveMutex(); OSTRACE4("TEST WR-LOCK %d %d %d (afp)\n", pFile->h, rc, reserved); *pResOut = reserved; @@ -23968,11 +24560,13 @@ static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){ static int afpLock(sqlite3_file *id, int locktype){ int rc = SQLITE_OK; unixFile *pFile = (unixFile*)id; + struct unixLockInfo *pLock = pFile->pLock; afpLockingContext *context = (afpLockingContext *) pFile->lockingContext; assert( pFile ); - OSTRACE5("LOCK %d %s was %s pid=%d (afp)\n", pFile->h, - locktypeName(locktype), locktypeName(pFile->locktype), getpid()); + OSTRACE7("LOCK %d %s was %s(%s,%d) pid=%d (afp)\n", pFile->h, + locktypeName(locktype), locktypeName(pFile->locktype), + locktypeName(pLock->locktype), pLock->cnt , getpid()); /* If there is already a lock of this type or more restrictive on the ** unixFile, do nothing. Don't use the afp_end_lock: exit path, as @@ -23985,6 +24579,9 @@ static int afpLock(sqlite3_file *id, int locktype){ } /* Make sure the locking sequence is correct + ** (1) We never move from unlocked to anything higher than shared lock. + ** (2) SQLite never explicitly requests a pendig lock. + ** (3) A shared lock is always held when a reserve lock is requested. */ assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK ); assert( locktype!=PENDING_LOCK ); @@ -24001,6 +24598,32 @@ static int afpLock(sqlite3_file *id, int locktype){ unixLeaveMutex(); return rc; } + pLock = pFile->pLock; + + /* If some thread using this PID has a lock via a different unixFile* + ** handle that precludes the requested lock, return BUSY. + */ + if( (pFile->locktype!=pLock->locktype && + (pLock->locktype>=PENDING_LOCK || locktype>SHARED_LOCK)) + ){ + rc = SQLITE_BUSY; + goto afp_end_lock; + } + + /* If a SHARED lock is requested, and some thread using this PID already + ** has a SHARED or RESERVED lock, then increment reference counts and + ** return SQLITE_OK. + */ + if( locktype==SHARED_LOCK && + (pLock->locktype==SHARED_LOCK || pLock->locktype==RESERVED_LOCK) ){ + assert( locktype==SHARED_LOCK ); + assert( pFile->locktype==0 ); + assert( pLock->cnt>0 ); + pFile->locktype = SHARED_LOCK; + pLock->cnt++; + pFile->pOpen->nLock++; + goto afp_end_lock; + } /* A PENDING lock is needed before acquiring a SHARED lock and before ** acquiring an EXCLUSIVE lock. For the SHARED lock, the PENDING will @@ -24021,15 +24644,19 @@ static int afpLock(sqlite3_file *id, int locktype){ ** operating system calls for the specified lock. */ if( locktype==SHARED_LOCK ){ - int lk, lrc1, lrc2; - int lrc1Errno = 0; + int lrc1, lrc2, lrc1Errno; + long lk, mask; + assert( pLock->cnt==0 ); + assert( pLock->locktype==0 ); + + mask = (sizeof(long)==8) ? LARGEST_INT64 : 0x7fffffff; /* Now get the read-lock SHARED_LOCK */ /* note that the quality of the randomness doesn't matter that much */ lk = random(); - context->sharedByte = (lk & 0x7fffffff)%(SHARED_SIZE - 1); + pLock->sharedByte = (lk & mask)%(SHARED_SIZE - 1); lrc1 = afpSetLock(context->dbPath, pFile, - SHARED_FIRST+context->sharedByte, 1, 1); + SHARED_FIRST+pLock->sharedByte, 1, 1); if( IS_LOCK_ERROR(lrc1) ){ lrc1Errno = pFile->lastErrno; } @@ -24048,7 +24675,12 @@ static int afpLock(sqlite3_file *id, int locktype){ } else { pFile->locktype = SHARED_LOCK; pFile->pOpen->nLock++; + pLock->cnt = 1; } + }else if( locktype==EXCLUSIVE_LOCK && pLock->cnt>1 ){ + /* We are trying for an exclusive lock but another thread in this + ** same process is still holding a shared lock. */ + rc = SQLITE_BUSY; }else{ /* The request was for a RESERVED or EXCLUSIVE lock. It is ** assumed that there is a SHARED or greater lock on the file @@ -24059,6 +24691,9 @@ static int afpLock(sqlite3_file *id, int locktype){ if (locktype >= RESERVED_LOCK && pFile->locktype < RESERVED_LOCK) { /* Acquire a RESERVED lock */ failed = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1); + if( !failed ){ + context->reserved = 1; + } } if (!failed && locktype == EXCLUSIVE_LOCK) { /* Acquire an EXCLUSIVE lock */ @@ -24067,13 +24702,13 @@ static int afpLock(sqlite3_file *id, int locktype){ ** reestablish the shared lock if we can't get the afpUnlock */ if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST + - context->sharedByte, 1, 0)) ){ + pLock->sharedByte, 1, 0)) ){ int failed2 = SQLITE_OK; /* now attemmpt to get the exclusive lock range */ failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 1); if( failed && (failed2 = afpSetLock(context->dbPath, pFile, - SHARED_FIRST + context->sharedByte, 1, 1)) ){ + SHARED_FIRST + pLock->sharedByte, 1, 1)) ){ /* Can't reestablish the shared lock. Sqlite can't deal, this is ** a critical I/O error */ @@ -24092,8 +24727,10 @@ static int afpLock(sqlite3_file *id, int locktype){ if( rc==SQLITE_OK ){ pFile->locktype = locktype; + pLock->locktype = locktype; }else if( locktype==EXCLUSIVE_LOCK ){ pFile->locktype = PENDING_LOCK; + pLock->locktype = PENDING_LOCK; } afp_end_lock: @@ -24113,45 +24750,94 @@ afp_end_lock: static int afpUnlock(sqlite3_file *id, int locktype) { int rc = SQLITE_OK; unixFile *pFile = (unixFile*)id; - afpLockingContext *pCtx = (afpLockingContext *) pFile->lockingContext; + struct unixLockInfo *pLock; + afpLockingContext *context = (afpLockingContext *) pFile->lockingContext; + int skipShared = 0; +#ifdef SQLITE_TEST + int h = pFile->h; +#endif assert( pFile ); - OSTRACE5("UNLOCK %d %d was %d pid=%d (afp)\n", pFile->h, locktype, - pFile->locktype, getpid()); + OSTRACE7("UNLOCK %d %d was %d(%d,%d) pid=%d (afp)\n", pFile->h, locktype, + pFile->locktype, pFile->pLock->locktype, pFile->pLock->cnt, getpid()); assert( locktype<=SHARED_LOCK ); if( pFile->locktype<=locktype ){ return SQLITE_OK; } if( CHECK_THREADID(pFile) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } unixEnterMutex(); + pLock = pFile->pLock; + assert( pLock->cnt!=0 ); if( pFile->locktype>SHARED_LOCK ){ + assert( pLock->locktype==pFile->locktype ); + SimulateIOErrorBenign(1); + SimulateIOError( h=(-1) ) + SimulateIOErrorBenign(0); + +#ifndef NDEBUG + /* When reducing a lock such that other processes can start + ** reading the database file again, make sure that the + ** transaction counter was updated if any part of the database + ** file changed. If the transaction counter is not updated, + ** other connections to the same file might not realize that + ** the file has changed and hence might not know to flush their + ** cache. The use of a stale cache can lead to database corruption. + */ + assert( pFile->inNormalWrite==0 + || pFile->dbUpdate==0 + || pFile->transCntrChng==1 ); + pFile->inNormalWrite = 0; +#endif if( pFile->locktype==EXCLUSIVE_LOCK ){ - rc = afpSetLock(pCtx->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0); - if( rc==SQLITE_OK && locktype==SHARED_LOCK ){ + rc = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0); + if( rc==SQLITE_OK && (locktype==SHARED_LOCK || pLock->cnt>1) ){ /* only re-establish the shared lock if necessary */ - int sharedLockByte = SHARED_FIRST+pCtx->sharedByte; - rc = afpSetLock(pCtx->dbPath, pFile, sharedLockByte, 1, 1); + int sharedLockByte = SHARED_FIRST+pLock->sharedByte; + rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 1); + } else { + skipShared = 1; } } if( rc==SQLITE_OK && pFile->locktype>=PENDING_LOCK ){ - rc = afpSetLock(pCtx->dbPath, pFile, PENDING_BYTE, 1, 0); + rc = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0); } - if( rc==SQLITE_OK && pFile->locktype>=RESERVED_LOCK ){ - rc = afpSetLock(pCtx->dbPath, pFile, RESERVED_BYTE, 1, 0); + if( rc==SQLITE_OK && pFile->locktype>=RESERVED_LOCK && context->reserved ){ + rc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0); + if( !rc ){ + context->reserved = 0; + } + } + if( rc==SQLITE_OK && (locktype==SHARED_LOCK || pLock->cnt>1)){ + pLock->locktype = SHARED_LOCK; } - }else if( locktype==NO_LOCK ){ - /* clear the shared lock */ - int sharedLockByte = SHARED_FIRST+pCtx->sharedByte; - rc = afpSetLock(pCtx->dbPath, pFile, sharedLockByte, 1, 0); } + if( rc==SQLITE_OK && locktype==NO_LOCK ){ - if( rc==SQLITE_OK ){ - if( locktype==NO_LOCK ){ + /* Decrement the shared lock counter. Release the lock using an + ** OS call only when all threads in this same process have released + ** the lock. + */ + unsigned long long sharedLockByte = SHARED_FIRST+pLock->sharedByte; + pLock->cnt--; + if( pLock->cnt==0 ){ + SimulateIOErrorBenign(1); + SimulateIOError( h=(-1) ) + SimulateIOErrorBenign(0); + if( !skipShared ){ + rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 0); + } + if( !rc ){ + pLock->locktype = NO_LOCK; + pFile->locktype = NO_LOCK; + } + } + if( rc==SQLITE_OK ){ struct unixOpenCnt *pOpen = pFile->pOpen; + pOpen->nLock--; assert( pOpen->nLock>=0 ); if( pOpen->nLock==0 ){ @@ -24159,10 +24845,9 @@ static int afpUnlock(sqlite3_file *id, int locktype) { } } } + unixLeaveMutex(); - if( rc==SQLITE_OK ){ - pFile->locktype = locktype; - } + if( rc==SQLITE_OK ) pFile->locktype = locktype; return rc; } @@ -24170,6 +24855,7 @@ static int afpUnlock(sqlite3_file *id, int locktype) { ** Close a file & cleanup AFP specific locking context */ static int afpClose(sqlite3_file *id) { + int rc = SQLITE_OK; if( id ){ unixFile *pFile = (unixFile*)id; afpUnlock(id, NO_LOCK); @@ -24182,12 +24868,13 @@ static int afpClose(sqlite3_file *id) { */ setPendingFd(pFile); } + releaseLockInfo(pFile->pLock); releaseOpenCnt(pFile->pOpen); sqlite3_free(pFile->lockingContext); - closeUnixFile(id); + rc = closeUnixFile(id); unixLeaveMutex(); } - return SQLITE_OK; + return rc; } #endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */ @@ -24200,6 +24887,29 @@ static int afpClose(sqlite3_file *id) { ********************* End of the AFP lock implementation ********************** ******************************************************************************/ +/****************************************************************************** +*************************** Begin NFS Locking ********************************/ + +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE +/* + ** Lower the locking level on file descriptor pFile to locktype. locktype + ** must be either NO_LOCK or SHARED_LOCK. + ** + ** If the locking level of the file descriptor is already at or below + ** the requested locking level, this routine is a no-op. + */ +static int nfsUnlock(sqlite3_file *id, int locktype){ + return _posixUnlock(id, locktype, 1); +} + +#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */ +/* +** The code above is the NFS lock implementation. The code is specific +** to MacOSX and does not work on other unix platforms. No alternative +** is available. +** +********************* End of the NFS lock implementation ********************** +******************************************************************************/ /****************************************************************************** **************** Non-locking sqlite3_file methods ***************************** @@ -24226,7 +24936,9 @@ static int afpClose(sqlite3_file *id) { */ static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){ int got; +#if (!defined(USE_PREAD) && !defined(USE_PREAD64)) i64 newOffset; +#endif TIMER_START; #if defined(USE_PREAD) got = pread(id->h, pBuf, cnt, offset); @@ -24300,7 +25012,9 @@ static int unixRead( */ static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){ int got; +#if (!defined(USE_PREAD) && !defined(USE_PREAD64)) i64 newOffset; +#endif TIMER_START; #if defined(USE_PREAD) got = pwrite(id->h, pBuf, cnt, offset); @@ -24494,6 +25208,11 @@ static int full_fsync(int fd, int fullSync, int dataOnly){ */ if( rc ) rc = fsync(fd); +#elif defined(__APPLE__) + /* fdatasync() on HFS+ doesn't yet flush the file size if it changed correctly + ** so currently we default to the macro that redefines fdatasync to fsync + */ + rc = fsync(fd); #else rc = fdatasync(fd); #if OS_VXWORKS @@ -24829,23 +25548,6 @@ IOMETHODS( #endif /* -** The "Whole File Locking" finder returns the same set of methods as -** the posix locking finder. But it also sets the SQLITE_WHOLE_FILE_LOCKING -** flag to force the posix advisory locks to cover the whole file instead -** of just a small span of bytes near the 1GiB boundary. Whole File Locking -** is useful on NFS-mounted files since it helps NFS to maintain cache -** coherency. But it is a detriment to other filesystems since it runs -** slower. -*/ -static const sqlite3_io_methods *posixWflIoFinderImpl(const char*z, unixFile*p){ - UNUSED_PARAMETER(z); - p->fileFlags = SQLITE_WHOLE_FILE_LOCKING; - return &posixIoMethods; -} -static const sqlite3_io_methods - *(*const posixWflIoFinder)(const char*,unixFile *p) = posixWflIoFinderImpl; - -/* ** The proxy locking method is a "super-method" in the sense that it ** opens secondary file descriptors for the conch and lock files and ** it uses proxy, dot-file, AFP, and flock() locking methods on those @@ -24869,6 +25571,17 @@ IOMETHODS( ) #endif +/* nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set */ +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE +IOMETHODS( + nfsIoFinder, /* Finder function name */ + nfsIoMethods, /* sqlite3_io_methods object name */ + unixClose, /* xClose method */ + unixLock, /* xLock method */ + nfsUnlock, /* xUnlock method */ + unixCheckReservedLock /* xCheckReservedLock method */ +) +#endif #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE /* @@ -24889,11 +25602,7 @@ static const sqlite3_io_methods *autolockIoFinderImpl( { "hfs", &posixIoMethods }, { "ufs", &posixIoMethods }, { "afpfs", &afpIoMethods }, -#ifdef SQLITE_ENABLE_AFP_LOCKING_SMB { "smbfs", &afpIoMethods }, -#else - { "smbfs", &flockIoMethods }, -#endif { "webdav", &nolockIoMethods }, { 0, 0 } }; @@ -24926,8 +25635,11 @@ static const sqlite3_io_methods *autolockIoFinderImpl( lockInfo.l_whence = SEEK_SET; lockInfo.l_type = F_RDLCK; if( fcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) { - pNew->fileFlags = SQLITE_WHOLE_FILE_LOCKING; - return &posixIoMethods; + if( strcmp(fsInfo.f_fstypename, "nfs")==0 ){ + return &nfsIoMethods; + } else { + return &posixIoMethods; + } }else{ return &dotlockIoMethods; } @@ -25038,7 +25750,11 @@ static int fillInUnixFile( #endif } - if( pLockingStyle == &posixIoMethods ){ + if( pLockingStyle == &posixIoMethods +#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE + || pLockingStyle == &nfsIoMethods +#endif + ){ unixEnterMutex(); rc = findLockInfo(pNew, &pNew->pLock, &pNew->pOpen); if( rc!=SQLITE_OK ){ @@ -25080,9 +25796,15 @@ static int fillInUnixFile( ** according to requirement F11141. So we do not need to make a ** copy of the filename. */ pCtx->dbPath = zFilename; + pCtx->reserved = 0; srandomdev(); unixEnterMutex(); - rc = findLockInfo(pNew, NULL, &pNew->pOpen); + rc = findLockInfo(pNew, &pNew->pLock, &pNew->pOpen); + if( rc!=SQLITE_OK ){ + sqlite3_free(pNew->lockingContext); + close(h); + h = -1; + } unixLeaveMutex(); } } @@ -25131,6 +25853,8 @@ static int fillInUnixFile( pNew->lastErrno = 0; #if OS_VXWORKS if( rc!=SQLITE_OK ){ + if( h>=0 ) close(h); + h = -1; unlink(zFilename); isDelete = 0; } @@ -25174,7 +25898,7 @@ static int openDirectory(const char *zFilename, int *pFd){ } } *pFd = fd; - return (fd>=0?SQLITE_OK:SQLITE_CANTOPEN); + return (fd>=0?SQLITE_OK:SQLITE_CANTOPEN_BKPT); } /* @@ -25347,6 +26071,9 @@ static int unixOpen( int isCreate = (flags & SQLITE_OPEN_CREATE); int isReadonly = (flags & SQLITE_OPEN_READONLY); int isReadWrite = (flags & SQLITE_OPEN_READWRITE); +#if SQLITE_ENABLE_LOCKING_STYLE + int isAutoProxy = (flags & SQLITE_OPEN_AUTOPROXY); +#endif /* If creating a master or main-file journal, this function will open ** a file-descriptor on the directory too. The first time unixSync() @@ -25434,7 +26161,7 @@ static int unixOpen( fd = open(zName, openFlags, openMode); } if( fd<0 ){ - rc = SQLITE_CANTOPEN; + rc = SQLITE_CANTOPEN_BKPT; goto open_finished; } } @@ -25480,8 +26207,25 @@ static int unixOpen( noLock = eType!=SQLITE_OPEN_MAIN_DB; + +#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE + struct statfs fsInfo; + if( fstatfs(fd, &fsInfo) == -1 ){ + ((unixFile*)pFile)->lastErrno = errno; + if( dirfd>=0 ) close(dirfd); /* silently leak if fail, in error */ + close(fd); /* silently leak if fail, in error */ + return SQLITE_IOERR_ACCESS; + } + if (0 == strncmp("msdos", fsInfo.f_fstypename, 5)) { + ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS; + } +#endif + +#if SQLITE_ENABLE_LOCKING_STYLE #if SQLITE_PREFER_PROXY_LOCKING - if( zPath!=NULL && !noLock && pVfs->xOpen ){ + isAutoProxy = 1; +#endif + if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){ char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING"); int useProxy = 0; @@ -25513,6 +26257,14 @@ static int unixOpen( rc = fillInUnixFile(pVfs, fd, dirfd, pFile, zPath, noLock, isDelete); if( rc==SQLITE_OK ){ rc = proxyTransformUnixFile((unixFile*)pFile, ":auto:"); + if( rc!=SQLITE_OK ){ + /* Use unixClose to clean up the resources added in fillInUnixFile + ** and clear all the structure's references. Specifically, + ** pFile->pMethods will be NULL so sqlite3OsClose will be a no-op + */ + unixClose(pFile); + return rc; + } } goto open_finished; } @@ -25633,7 +26385,7 @@ static int unixFullPathname( }else{ int nCwd; if( getcwd(zOut, nOut-1)==0 ){ - return SQLITE_CANTOPEN; + return SQLITE_CANTOPEN_BKPT; } nCwd = (int)strlen(zOut); sqlite3_snprintf(nOut-nCwd, &zOut[nCwd], "/%s", zPath); @@ -25940,11 +26692,6 @@ static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){ ** of the database file for multiple readers and writers on the same ** host (the conch ensures that they all use the same local lock file). ** -** There is a third file - the host ID file - used as a persistent record -** of a unique identifier for the host, a 128-byte unique host id file -** in the path defined by the HOSTIDPATH macro (default value is -** /Library/Caches/.com.apple.sqliteConchHostId). -** ** Requesting the lock proxy does not immediately take the conch, it is ** only taken when the first request to lock database file is made. ** This matches the semantics of the traditional locking behavior, where @@ -25970,10 +26717,6 @@ static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){ ** Enables the logging of error messages during host id file ** retrieval and creation ** -** HOSTIDPATH -** -** Overrides the default host ID file path location -** ** LOCKPROXYDIR ** ** Overrides the default directory used for lock proxy files that @@ -25998,11 +26741,6 @@ static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){ */ #if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE -#ifdef SQLITE_TEST -/* simulate multiple hosts by creating unique hostid file paths */ -SQLITE_API int sqlite3_hostid_num = 0; -#endif - /* ** The proxyLockingContext has the path and file structures for the remote ** and local proxy files in it @@ -26014,134 +26752,16 @@ struct proxyLockingContext { unixFile *lockProxy; /* Open proxy lock file */ char *lockProxyPath; /* Name of the proxy lock file */ char *dbPath; /* Name of the open file */ - int conchHeld; /* True if the conch is currently held */ + int conchHeld; /* 1 if the conch is held, -1 if lockless */ void *oldLockingContext; /* Original lockingcontext to restore on close */ sqlite3_io_methods const *pOldMethod; /* Original I/O methods for close */ }; -/* HOSTIDLEN and CONCHLEN both include space for the string -** terminating nul -*/ -#define HOSTIDLEN 128 -#define CONCHLEN (MAXPATHLEN+HOSTIDLEN+1) -#ifndef HOSTIDPATH -# define HOSTIDPATH "/Library/Caches/.com.apple.sqliteConchHostId" -#endif - -/* basically a copy of unixRandomness with different -** test behavior built in */ -static int proxyGenerateHostID(char *pHostID){ - int pid, fd, len; - unsigned char *key = (unsigned char *)pHostID; - - memset(key, 0, HOSTIDLEN); - len = 0; - fd = open("/dev/urandom", O_RDONLY); - if( fd>=0 ){ - len = read(fd, key, HOSTIDLEN); - close(fd); /* silently leak the fd if it fails */ - } - if( len < HOSTIDLEN ){ - time_t t; - time(&t); - memcpy(key, &t, sizeof(t)); - pid = getpid(); - memcpy(&key[sizeof(t)], &pid, sizeof(pid)); - } - -#ifdef MAKE_PRETTY_HOSTID - { - int i; - /* filter the bytes into printable ascii characters and NUL terminate */ - key[(HOSTIDLEN-1)] = 0x00; - for( i=0; i<(HOSTIDLEN-1); i++ ){ - unsigned char pa = key[i]&0x7F; - if( pa<0x20 ){ - key[i] = (key[i]&0x80 == 0x80) ? pa+0x40 : pa+0x20; - }else if( pa==0x7F ){ - key[i] = (key[i]&0x80 == 0x80) ? pa=0x20 : pa+0x7E; - } - } - } -#endif - return SQLITE_OK; -} - -/* writes the host id path to path, path should be an pre-allocated buffer -** with enough space for a path -*/ -static void proxyGetHostIDPath(char *path, size_t len){ - strlcpy(path, HOSTIDPATH, len); -#ifdef SQLITE_TEST - if( sqlite3_hostid_num>0 ){ - char suffix[2] = "1"; - suffix[0] = suffix[0] + sqlite3_hostid_num; - strlcat(path, suffix, len); - } -#endif - OSTRACE3("GETHOSTIDPATH %s pid=%d\n", path, getpid()); -} - -/* get the host ID from a sqlite hostid file stored in the -** user-specific tmp directory, create the ID if it's not there already +/* +** The proxy lock file path for the database at dbPath is written into lPath, +** which must point to valid, writable memory large enough for a maxLen length +** file path. */ -static int proxyGetHostID(char *pHostID, int *pError){ - int fd; - char path[MAXPATHLEN]; - size_t len; - int rc=SQLITE_OK; - - proxyGetHostIDPath(path, MAXPATHLEN); - /* try to create the host ID file, if it already exists read the contents */ - fd = open(path, O_CREAT|O_WRONLY|O_EXCL, 0644); - if( fd<0 ){ - int err=errno; - - if( err!=EEXIST ){ -#ifdef SQLITE_PROXY_DEBUG /* set the sqlite error message instead */ - fprintf(stderr, "sqlite error creating host ID file %s: %s\n", - path, strerror(err)); -#endif - return SQLITE_PERM; - } - /* couldn't create the file, read it instead */ - fd = open(path, O_RDONLY|O_EXCL); - if( fd<0 ){ -#ifdef SQLITE_PROXY_DEBUG /* set the sqlite error message instead */ - int err = errno; - fprintf(stderr, "sqlite error opening host ID file %s: %s\n", - path, strerror(err)); -#endif - return SQLITE_PERM; - } - len = pread(fd, pHostID, HOSTIDLEN, 0); - if( len<0 ){ - *pError = errno; - rc = SQLITE_IOERR_READ; - }else if( len<HOSTIDLEN ){ - *pError = 0; - rc = SQLITE_IOERR_SHORT_READ; - } - close(fd); /* silently leak the fd if it fails */ - OSTRACE3("GETHOSTID read %s pid=%d\n", pHostID, getpid()); - return rc; - }else{ - /* we're creating the host ID file (use a random string of bytes) */ - proxyGenerateHostID(pHostID); - len = pwrite(fd, pHostID, HOSTIDLEN, 0); - if( len<0 ){ - *pError = errno; - rc = SQLITE_IOERR_WRITE; - }else if( len<HOSTIDLEN ){ - *pError = 0; - rc = SQLITE_IOERR_WRITE; - } - close(fd); /* silently leak the fd if it fails */ - OSTRACE3("GETHOSTID wrote %s pid=%d\n", pHostID, getpid()); - return rc; - } -} - static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){ int len; int dbLen; @@ -26152,21 +26772,12 @@ static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){ #else # ifdef _CS_DARWIN_USER_TEMP_DIR { - confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen); - len = strlcat(lPath, "sqliteplocks", maxLen); - if( mkdir(lPath, SQLITE_DEFAULT_PROXYDIR_PERMISSIONS) ){ - /* if mkdir fails, handle as lock file creation failure */ -# ifdef SQLITE_DEBUG - int err = errno; - if( err!=EEXIST ){ - fprintf(stderr, "proxyGetLockPath: mkdir(%s,0%o) error %d %s\n", lPath, - SQLITE_DEFAULT_PROXYDIR_PERMISSIONS, err, strerror(err)); - } -# endif - }else{ - OSTRACE3("GETLOCKPATH mkdir %s pid=%d\n", lPath, getpid()); + if( !confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) ){ + OSTRACE4("GETLOCKPATH failed %s errno=%d pid=%d\n", + lPath, errno, getpid()); + return SQLITE_IOERR_LOCK; } - + len = strlcat(lPath, "sqliteplocks", maxLen); } # else len = strlcpy(lPath, "/tmp/", maxLen); @@ -26185,9 +26796,46 @@ static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){ } lPath[i+len]='\0'; strlcat(lPath, ":auto:", maxLen); + OSTRACE3("GETLOCKPATH proxy lock path=%s pid=%d\n", lPath, getpid()); return SQLITE_OK; } +/* + ** Creates the lock file and any missing directories in lockPath + */ +static int proxyCreateLockPath(const char *lockPath){ + int i, len; + char buf[MAXPATHLEN]; + int start = 0; + + assert(lockPath!=NULL); + /* try to create all the intermediate directories */ + len = (int)strlen(lockPath); + buf[0] = lockPath[0]; + for( i=1; i<len; i++ ){ + if( lockPath[i] == '/' && (i - start > 0) ){ + /* only mkdir if leaf dir != "." or "/" or ".." */ + if( i-start>2 || (i-start==1 && buf[start] != '.' && buf[start] != '/') + || (i-start==2 && buf[start] != '.' && buf[start+1] != '.') ){ + buf[i]='\0'; + if( mkdir(buf, SQLITE_DEFAULT_PROXYDIR_PERMISSIONS) ){ + int err=errno; + if( err!=EEXIST ) { + OSTRACE5("CREATELOCKPATH FAILED creating %s, " + "'%s' proxy lock path=%s pid=%d\n", + buf, strerror(err), lockPath, getpid()); + return err; + } + } + } + start=i+1; + } + buf[i] = lockPath[i]; + } + OSTRACE3("CREATELOCKPATH proxy lock path=%s pid=%d\n", lockPath, getpid()); + return 0; +} + /* ** Create a new VFS file descriptor (stored in memory obtained from ** sqlite3_malloc) and open the file named "path" in the file descriptor. @@ -26195,48 +26843,263 @@ static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){ ** The caller is responsible not only for closing the file descriptor ** but also for freeing the memory associated with the file descriptor. */ -static int proxyCreateUnixFile(const char *path, unixFile **ppFile) { +static int proxyCreateUnixFile( + const char *path, /* path for the new unixFile */ + unixFile **ppFile, /* unixFile created and returned by ref */ + int islockfile /* if non zero missing dirs will be created */ +) { + int fd = -1; + int dirfd = -1; unixFile *pNew; - int flags = SQLITE_OPEN_MAIN_DB|SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE; int rc = SQLITE_OK; + int openFlags = O_RDWR | O_CREAT; sqlite3_vfs dummyVfs; - - pNew = (unixFile *)sqlite3_malloc(sizeof(unixFile)); - if( !pNew ){ - return SQLITE_NOMEM; + int terrno = 0; + UnixUnusedFd *pUnused = NULL; + + /* 1. first try to open/create the file + ** 2. if that fails, and this is a lock file (not-conch), try creating + ** the parent directories and then try again. + ** 3. if that fails, try to open the file read-only + ** otherwise return BUSY (if lock file) or CANTOPEN for the conch file + */ + pUnused = findReusableFd(path, openFlags); + if( pUnused ){ + fd = pUnused->fd; + }else{ + pUnused = sqlite3_malloc(sizeof(*pUnused)); + if( !pUnused ){ + return SQLITE_NOMEM; + } + } + if( fd<0 ){ + fd = open(path, openFlags, SQLITE_DEFAULT_FILE_PERMISSIONS); + terrno = errno; + if( fd<0 && errno==ENOENT && islockfile ){ + if( proxyCreateLockPath(path) == SQLITE_OK ){ + fd = open(path, openFlags, SQLITE_DEFAULT_FILE_PERMISSIONS); + } + } + } + if( fd<0 ){ + openFlags = O_RDONLY; + fd = open(path, openFlags, SQLITE_DEFAULT_FILE_PERMISSIONS); + terrno = errno; + } + if( fd<0 ){ + if( islockfile ){ + return SQLITE_BUSY; + } + switch (terrno) { + case EACCES: + return SQLITE_PERM; + case EIO: + return SQLITE_IOERR_LOCK; /* even though it is the conch */ + default: + return SQLITE_CANTOPEN_BKPT; + } + } + + pNew = (unixFile *)sqlite3_malloc(sizeof(*pNew)); + if( pNew==NULL ){ + rc = SQLITE_NOMEM; + goto end_create_proxy; } memset(pNew, 0, sizeof(unixFile)); - - /* Call unixOpen() to open the proxy file. The flags passed to unixOpen() - ** suggest that the file being opened is a "main database". This is - ** necessary as other file types do not necessarily support locking. It - ** is better to use unixOpen() instead of opening the file directly with - ** open(), as unixOpen() sets up the various mechanisms required to - ** make sure a call to close() does not cause the system to discard - ** POSIX locks prematurely. - ** - ** It is important that the xOpen member of the VFS object passed to - ** unixOpen() is NULL. This tells unixOpen() may try to open a proxy-file - ** for the proxy-file (creating a potential infinite loop). - */ + pNew->openFlags = openFlags; dummyVfs.pAppData = (void*)&autolockIoFinder; - dummyVfs.xOpen = 0; - rc = unixOpen(&dummyVfs, path, (sqlite3_file *)pNew, flags, &flags); - if( rc==SQLITE_OK && (flags&SQLITE_OPEN_READONLY) ){ - pNew->pMethod->xClose((sqlite3_file *)pNew); - rc = SQLITE_CANTOPEN; + pUnused->fd = fd; + pUnused->flags = openFlags; + pNew->pUnused = pUnused; + + rc = fillInUnixFile(&dummyVfs, fd, dirfd, (sqlite3_file*)pNew, path, 0, 0); + if( rc==SQLITE_OK ){ + *ppFile = pNew; + return SQLITE_OK; } +end_create_proxy: + close(fd); /* silently leak fd if error, we're already in error */ + sqlite3_free(pNew); + sqlite3_free(pUnused); + return rc; +} - if( rc!=SQLITE_OK ){ - sqlite3_free(pNew); - pNew = 0; +#ifdef SQLITE_TEST +/* simulate multiple hosts by creating unique hostid file paths */ +SQLITE_API int sqlite3_hostid_num = 0; +#endif + +#define PROXY_HOSTIDLEN 16 /* conch file host id length */ + +/* get the host ID via gethostuuid(), pHostID must point to PROXY_HOSTIDLEN +** bytes of writable memory. +*/ +static int proxyGetHostID(unsigned char *pHostID, int *pError){ + struct timespec timeout = {1, 0}; /* 1 sec timeout */ + + assert(PROXY_HOSTIDLEN == sizeof(uuid_t)); + memset(pHostID, 0, PROXY_HOSTIDLEN); + if( gethostuuid(pHostID, &timeout) ){ + int err = errno; + if( pError ){ + *pError = err; + } + return SQLITE_IOERR; + } +#ifdef SQLITE_TEST + /* simulate multiple hosts by creating unique hostid file paths */ + if( sqlite3_hostid_num != 0){ + pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF)); } +#endif + + return SQLITE_OK; +} + +/* The conch file contains the header, host id and lock file path + */ +#define PROXY_CONCHVERSION 2 /* 1-byte header, 16-byte host id, path */ +#define PROXY_HEADERLEN 1 /* conch file header length */ +#define PROXY_PATHINDEX (PROXY_HEADERLEN+PROXY_HOSTIDLEN) +#define PROXY_MAXCONCHLEN (PROXY_HEADERLEN+PROXY_HOSTIDLEN+MAXPATHLEN) + +/* +** Takes an open conch file, copies the contents to a new path and then moves +** it back. The newly created file's file descriptor is assigned to the +** conch file structure and finally the original conch file descriptor is +** closed. Returns zero if successful. +*/ +static int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){ + proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; + unixFile *conchFile = pCtx->conchFile; + char tPath[MAXPATHLEN]; + char buf[PROXY_MAXCONCHLEN]; + char *cPath = pCtx->conchFilePath; + size_t readLen = 0; + size_t pathLen = 0; + char errmsg[64] = ""; + int fd = -1; + int rc = -1; - *ppFile = pNew; + /* create a new path by replace the trailing '-conch' with '-break' */ + pathLen = strlcpy(tPath, cPath, MAXPATHLEN); + if( pathLen>MAXPATHLEN || pathLen<6 || + (strlcpy(&tPath[pathLen-5], "break", 6) != 5) ){ + sprintf(errmsg, "path error (len %d)", (int)pathLen); + goto end_breaklock; + } + /* read the conch content */ + readLen = pread(conchFile->h, buf, PROXY_MAXCONCHLEN, 0); + if( readLen<PROXY_PATHINDEX ){ + sprintf(errmsg, "read error (len %d)", (int)readLen); + goto end_breaklock; + } + /* write it out to the temporary break file */ + fd = open(tPath, (O_RDWR|O_CREAT|O_EXCL), SQLITE_DEFAULT_FILE_PERMISSIONS); + if( fd<0 ){ + sprintf(errmsg, "create failed (%d)", errno); + goto end_breaklock; + } + if( pwrite(fd, buf, readLen, 0) != readLen ){ + sprintf(errmsg, "write failed (%d)", errno); + goto end_breaklock; + } + if( rename(tPath, cPath) ){ + sprintf(errmsg, "rename failed (%d)", errno); + goto end_breaklock; + } + rc = 0; + fprintf(stderr, "broke stale lock on %s\n", cPath); + close(conchFile->h); + conchFile->h = fd; + conchFile->openFlags = O_RDWR | O_CREAT; + +end_breaklock: + if( rc ){ + if( fd>=0 ){ + unlink(tPath); + close(fd); + } + fprintf(stderr, "failed to break stale lock on %s, %s\n", cPath, errmsg); + } return rc; } -/* takes the conch by taking a shared lock and read the contents conch, if +/* Take the requested lock on the conch file and break a stale lock if the +** host id matches. +*/ +static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){ + proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; + unixFile *conchFile = pCtx->conchFile; + int rc = SQLITE_OK; + int nTries = 0; + struct timespec conchModTime; + + do { + rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType); + nTries ++; + if( rc==SQLITE_BUSY ){ + /* If the lock failed (busy): + * 1st try: get the mod time of the conch, wait 0.5s and try again. + * 2nd try: fail if the mod time changed or host id is different, wait + * 10 sec and try again + * 3rd try: break the lock unless the mod time has changed. + */ + struct stat buf; + if( fstat(conchFile->h, &buf) ){ + pFile->lastErrno = errno; + return SQLITE_IOERR_LOCK; + } + + if( nTries==1 ){ + conchModTime = buf.st_mtimespec; + usleep(500000); /* wait 0.5 sec and try the lock again*/ + continue; + } + + assert( nTries>1 ); + if( conchModTime.tv_sec != buf.st_mtimespec.tv_sec || + conchModTime.tv_nsec != buf.st_mtimespec.tv_nsec ){ + return SQLITE_BUSY; + } + + if( nTries==2 ){ + char tBuf[PROXY_MAXCONCHLEN]; + int len = pread(conchFile->h, tBuf, PROXY_MAXCONCHLEN, 0); + if( len<0 ){ + pFile->lastErrno = errno; + return SQLITE_IOERR_LOCK; + } + if( len>PROXY_PATHINDEX && tBuf[0]==(char)PROXY_CONCHVERSION){ + /* don't break the lock if the host id doesn't match */ + if( 0!=memcmp(&tBuf[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN) ){ + return SQLITE_BUSY; + } + }else{ + /* don't break the lock on short read or a version mismatch */ + return SQLITE_BUSY; + } + usleep(10000000); /* wait 10 sec and try the lock again */ + continue; + } + + assert( nTries==3 ); + if( 0==proxyBreakConchLock(pFile, myHostID) ){ + rc = SQLITE_OK; + if( lockType==EXCLUSIVE_LOCK ){ + rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK); + } + if( !rc ){ + rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType); + } + } + } + } while( rc==SQLITE_BUSY && nTries<3 ); + + return rc; +} + +/* Takes the conch by taking a shared lock and read the contents conch, if ** lockPath is non-NULL, the host ID and lock file path must match. A NULL ** lockPath means that the lockPath in the conch file will be used if the ** host IDs match, or a new lock path will be generated automatically @@ -26245,149 +27108,219 @@ static int proxyCreateUnixFile(const char *path, unixFile **ppFile) { static int proxyTakeConch(unixFile *pFile){ proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; - if( pCtx->conchHeld>0 ){ + if( pCtx->conchHeld!=0 ){ return SQLITE_OK; }else{ unixFile *conchFile = pCtx->conchFile; - char testValue[CONCHLEN]; - char conchValue[CONCHLEN]; + uuid_t myHostID; + int pError = 0; + char readBuf[PROXY_MAXCONCHLEN]; char lockPath[MAXPATHLEN]; - char *tLockPath = NULL; + char *tempLockPath = NULL; int rc = SQLITE_OK; - int readRc = SQLITE_OK; - int syncPerms = 0; - + int createConch = 0; + int hostIdMatch = 0; + int readLen = 0; + int tryOldLockPath = 0; + int forceNewLockPath = 0; + OSTRACE4("TAKECONCH %d for %s pid=%d\n", conchFile->h, (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), getpid()); - rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK); - if( rc==SQLITE_OK ){ - int pError = 0; - memset(testValue, 0, CONCHLEN); /* conch is fixed size */ - rc = proxyGetHostID(testValue, &pError); - if( (rc&0xff)==SQLITE_IOERR ){ - pFile->lastErrno = pError; - } - if( pCtx->lockProxyPath ){ - strlcpy(&testValue[HOSTIDLEN], pCtx->lockProxyPath, MAXPATHLEN); - } + rc = proxyGetHostID(myHostID, &pError); + if( (rc&0xff)==SQLITE_IOERR ){ + pFile->lastErrno = pError; + goto end_takeconch; } + rc = proxyConchLock(pFile, myHostID, SHARED_LOCK); if( rc!=SQLITE_OK ){ goto end_takeconch; } - - readRc = unixRead((sqlite3_file *)conchFile, conchValue, CONCHLEN, 0); - if( readRc!=SQLITE_IOERR_SHORT_READ ){ - if( readRc!=SQLITE_OK ){ - if( (rc&0xff)==SQLITE_IOERR ){ - pFile->lastErrno = conchFile->lastErrno; + /* read the existing conch file */ + readLen = seekAndRead((unixFile*)conchFile, 0, readBuf, PROXY_MAXCONCHLEN); + if( readLen<0 ){ + /* I/O error: lastErrno set by seekAndRead */ + pFile->lastErrno = conchFile->lastErrno; + rc = SQLITE_IOERR_READ; + goto end_takeconch; + }else if( readLen<=(PROXY_HEADERLEN+PROXY_HOSTIDLEN) || + readBuf[0]!=(char)PROXY_CONCHVERSION ){ + /* a short read or version format mismatch means we need to create a new + ** conch file. + */ + createConch = 1; + } + /* if the host id matches and the lock path already exists in the conch + ** we'll try to use the path there, if we can't open that path, we'll + ** retry with a new auto-generated path + */ + do { /* in case we need to try again for an :auto: named lock file */ + + if( !createConch && !forceNewLockPath ){ + hostIdMatch = !memcmp(&readBuf[PROXY_HEADERLEN], myHostID, + PROXY_HOSTIDLEN); + /* if the conch has data compare the contents */ + if( !pCtx->lockProxyPath ){ + /* for auto-named local lock file, just check the host ID and we'll + ** use the local lock file path that's already in there + */ + if( hostIdMatch ){ + size_t pathLen = (readLen - PROXY_PATHINDEX); + + if( pathLen>=MAXPATHLEN ){ + pathLen=MAXPATHLEN-1; + } + memcpy(lockPath, &readBuf[PROXY_PATHINDEX], pathLen); + lockPath[pathLen] = 0; + tempLockPath = lockPath; + tryOldLockPath = 1; + /* create a copy of the lock path if the conch is taken */ + goto end_takeconch; + } + }else if( hostIdMatch + && !strncmp(pCtx->lockProxyPath, &readBuf[PROXY_PATHINDEX], + readLen-PROXY_PATHINDEX) + ){ + /* conch host and lock path match */ + goto end_takeconch; } - rc = readRc; + } + + /* if the conch isn't writable and doesn't match, we can't take it */ + if( (conchFile->openFlags&O_RDWR) == 0 ){ + rc = SQLITE_BUSY; goto end_takeconch; } - /* if the conch has data compare the contents */ + + /* either the conch didn't match or we need to create a new one */ if( !pCtx->lockProxyPath ){ - /* for auto-named local lock file, just check the host ID and we'll - ** use the local lock file path that's already in there */ - if( !memcmp(testValue, conchValue, HOSTIDLEN) ){ - tLockPath = (char *)&conchValue[HOSTIDLEN]; - goto end_takeconch; + proxyGetLockPath(pCtx->dbPath, lockPath, MAXPATHLEN); + tempLockPath = lockPath; + /* create a copy of the lock path _only_ if the conch is taken */ + } + + /* update conch with host and path (this will fail if other process + ** has a shared lock already), if the host id matches, use the big + ** stick. + */ + futimes(conchFile->h, NULL); + if( hostIdMatch && !createConch ){ + if( conchFile->pLock && conchFile->pLock->cnt>1 ){ + /* We are trying for an exclusive lock but another thread in this + ** same process is still holding a shared lock. */ + rc = SQLITE_BUSY; + } else { + rc = proxyConchLock(pFile, myHostID, EXCLUSIVE_LOCK); } }else{ - /* we've got the conch if conchValue matches our path and host ID */ - if( !memcmp(testValue, conchValue, CONCHLEN) ){ - goto end_takeconch; - } + rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, EXCLUSIVE_LOCK); } - }else{ - /* a short read means we're "creating" the conch (even though it could - ** have been user-intervention), if we acquire the exclusive lock, - ** we'll try to match the current on-disk permissions of the database - */ - syncPerms = 1; - } - - /* either conch was emtpy or didn't match */ - if( !pCtx->lockProxyPath ){ - proxyGetLockPath(pCtx->dbPath, lockPath, MAXPATHLEN); - tLockPath = lockPath; - strlcpy(&testValue[HOSTIDLEN], lockPath, MAXPATHLEN); - } - - /* update conch with host and path (this will fail if other process - ** has a shared lock already) */ - rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, EXCLUSIVE_LOCK); - if( rc==SQLITE_OK ){ - rc = unixWrite((sqlite3_file *)conchFile, testValue, CONCHLEN, 0); - if( rc==SQLITE_OK && syncPerms ){ - struct stat buf; - int err = fstat(pFile->h, &buf); - if( err==0 ){ - /* try to match the database file permissions, ignore failure */ + if( rc==SQLITE_OK ){ + char writeBuffer[PROXY_MAXCONCHLEN]; + int writeSize = 0; + + writeBuffer[0] = (char)PROXY_CONCHVERSION; + memcpy(&writeBuffer[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN); + if( pCtx->lockProxyPath!=NULL ){ + strlcpy(&writeBuffer[PROXY_PATHINDEX], pCtx->lockProxyPath, MAXPATHLEN); + }else{ + strlcpy(&writeBuffer[PROXY_PATHINDEX], tempLockPath, MAXPATHLEN); + } + writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]); + ftruncate(conchFile->h, writeSize); + rc = unixWrite((sqlite3_file *)conchFile, writeBuffer, writeSize, 0); + fsync(conchFile->h); + /* If we created a new conch file (not just updated the contents of a + ** valid conch file), try to match the permissions of the database + */ + if( rc==SQLITE_OK && createConch ){ + struct stat buf; + int err = fstat(pFile->h, &buf); + if( err==0 ){ + mode_t cmode = buf.st_mode&(S_IRUSR|S_IWUSR | S_IRGRP|S_IWGRP | + S_IROTH|S_IWOTH); + /* try to match the database file R/W permissions, ignore failure */ #ifndef SQLITE_PROXY_DEBUG - fchmod(conchFile->h, buf.st_mode); + fchmod(conchFile->h, cmode); #else - if( fchmod(conchFile->h, buf.st_mode)!=0 ){ + if( fchmod(conchFile->h, cmode)!=0 ){ + int code = errno; + fprintf(stderr, "fchmod %o FAILED with %d %s\n", + cmode, code, strerror(code)); + } else { + fprintf(stderr, "fchmod %o SUCCEDED\n",cmode); + } + }else{ int code = errno; - fprintf(stderr, "fchmod %o FAILED with %d %s\n", - buf.st_mode, code, strerror(code)); - } else { - fprintf(stderr, "fchmod %o SUCCEDED\n",buf.st_mode); - } - }else{ - int code = errno; - fprintf(stderr, "STAT FAILED[%d] with %d %s\n", - err, code, strerror(code)); + fprintf(stderr, "STAT FAILED[%d] with %d %s\n", + err, code, strerror(code)); #endif + } } } - } - conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, SHARED_LOCK); - -end_takeconch: - OSTRACE2("TRANSPROXY: CLOSE %d\n", pFile->h); - if( rc==SQLITE_OK && pFile->openFlags ){ - if( pFile->h>=0 ){ + conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, SHARED_LOCK); + + end_takeconch: + OSTRACE2("TRANSPROXY: CLOSE %d\n", pFile->h); + if( rc==SQLITE_OK && pFile->openFlags ){ + if( pFile->h>=0 ){ #ifdef STRICT_CLOSE_ERROR - if( close(pFile->h) ){ - pFile->lastErrno = errno; - return SQLITE_IOERR_CLOSE; - } + if( close(pFile->h) ){ + pFile->lastErrno = errno; + return SQLITE_IOERR_CLOSE; + } #else - close(pFile->h); /* silently leak fd if fail */ + close(pFile->h); /* silently leak fd if fail */ #endif + } + pFile->h = -1; + int fd = open(pCtx->dbPath, pFile->openFlags, + SQLITE_DEFAULT_FILE_PERMISSIONS); + OSTRACE2("TRANSPROXY: OPEN %d\n", fd); + if( fd>=0 ){ + pFile->h = fd; + }else{ + rc=SQLITE_CANTOPEN_BKPT; /* SQLITE_BUSY? proxyTakeConch called + during locking */ + } } - pFile->h = -1; - int fd = open(pCtx->dbPath, pFile->openFlags, - SQLITE_DEFAULT_FILE_PERMISSIONS); - OSTRACE2("TRANSPROXY: OPEN %d\n", fd); - if( fd>=0 ){ - pFile->h = fd; - }else{ - rc=SQLITE_CANTOPEN; /* SQLITE_BUSY? proxyTakeConch called - during locking */ + if( rc==SQLITE_OK && !pCtx->lockProxy ){ + char *path = tempLockPath ? tempLockPath : pCtx->lockProxyPath; + rc = proxyCreateUnixFile(path, &pCtx->lockProxy, 1); + if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM && tryOldLockPath ){ + /* we couldn't create the proxy lock file with the old lock file path + ** so try again via auto-naming + */ + forceNewLockPath = 1; + tryOldLockPath = 0; + continue; /* go back to the do {} while start point, try again */ + } } - } - if( rc==SQLITE_OK && !pCtx->lockProxy ){ - char *path = tLockPath ? tLockPath : pCtx->lockProxyPath; - /* ACS: Need to make a copy of path sometimes */ - rc = proxyCreateUnixFile(path, &pCtx->lockProxy); - } - if( rc==SQLITE_OK ){ - pCtx->conchHeld = 1; - - if( tLockPath ){ - pCtx->lockProxyPath = sqlite3DbStrDup(0, tLockPath); + if( rc==SQLITE_OK ){ + /* Need to make a copy of path if we extracted the value + ** from the conch file or the path was allocated on the stack + */ + if( tempLockPath ){ + pCtx->lockProxyPath = sqlite3DbStrDup(0, tempLockPath); + if( !pCtx->lockProxyPath ){ + rc = SQLITE_NOMEM; + } + } + } + if( rc==SQLITE_OK ){ + pCtx->conchHeld = 1; + if( pCtx->lockProxy->pMethod == &afpIoMethods ){ - ((afpLockingContext *)pCtx->lockProxy->lockingContext)->dbPath = - pCtx->lockProxyPath; + afpLockingContext *afpCtx; + afpCtx = (afpLockingContext *)pCtx->lockProxy->lockingContext; + afpCtx->dbPath = pCtx->lockProxyPath; } + } else { + conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK); } - } else { - conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK); - } - OSTRACE3("TAKECONCH %d %s\n", conchFile->h, rc==SQLITE_OK?"ok":"failed"); - return rc; + OSTRACE3("TAKECONCH %d %s\n", conchFile->h, rc==SQLITE_OK?"ok":"failed"); + return rc; + } while (1); /* in case we need to retry the :auto: lock file - we should never get here except via the 'continue' call. */ } } @@ -26404,8 +27337,10 @@ static int proxyReleaseConch(unixFile *pFile){ OSTRACE4("RELEASECONCH %d for %s pid=%d\n", conchFile->h, (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), getpid()); + if( pCtx->conchHeld>0 ){ + rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK); + } pCtx->conchHeld = 0; - rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK); OSTRACE3("RELEASECONCH %d %s\n", conchFile->h, (rc==SQLITE_OK ? "ok" : "failed")); return rc; @@ -26501,8 +27436,8 @@ static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){ /* afp style keeps a reference to the db path in the filePath field ** of the struct */ assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN ); - strcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath); - }else + strlcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath, MAXPATHLEN); + } else #endif if( pFile->pMethod == &dotlockIoMethods ){ /* dot lock style uses the locking context to store the dot lock @@ -26512,7 +27447,7 @@ static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){ }else{ /* all other styles use the locking context to store the db file path */ assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN ); - strcpy(dbPath, (char *)pFile->lockingContext); + strlcpy(dbPath, (char *)pFile->lockingContext, MAXPATHLEN); } return SQLITE_OK; } @@ -26552,27 +27487,53 @@ static int proxyTransformUnixFile(unixFile *pFile, const char *path) { rc = proxyCreateConchPathname(dbPath, &pCtx->conchFilePath); if( rc==SQLITE_OK ){ - rc = proxyCreateUnixFile(pCtx->conchFilePath, &pCtx->conchFile); + rc = proxyCreateUnixFile(pCtx->conchFilePath, &pCtx->conchFile, 0); + if( rc==SQLITE_CANTOPEN && ((pFile->openFlags&O_RDWR) == 0) ){ + /* if (a) the open flags are not O_RDWR, (b) the conch isn't there, and + ** (c) the file system is read-only, then enable no-locking access. + ** Ugh, since O_RDONLY==0x0000 we test for !O_RDWR since unixOpen asserts + ** that openFlags will have only one of O_RDONLY or O_RDWR. + */ + struct statfs fsInfo; + struct stat conchInfo; + int goLockless = 0; + + if( stat(pCtx->conchFilePath, &conchInfo) == -1 ) { + int err = errno; + if( (err==ENOENT) && (statfs(dbPath, &fsInfo) != -1) ){ + goLockless = (fsInfo.f_flags&MNT_RDONLY) == MNT_RDONLY; + } + } + if( goLockless ){ + pCtx->conchHeld = -1; /* read only FS/ lockless */ + rc = SQLITE_OK; + } + } } if( rc==SQLITE_OK && lockPath ){ pCtx->lockProxyPath = sqlite3DbStrDup(0, lockPath); } if( rc==SQLITE_OK ){ + pCtx->dbPath = sqlite3DbStrDup(0, dbPath); + if( pCtx->dbPath==NULL ){ + rc = SQLITE_NOMEM; + } + } + if( rc==SQLITE_OK ){ /* all memory is allocated, proxys are created and assigned, ** switch the locking context and pMethod then return. */ - pCtx->dbPath = sqlite3DbStrDup(0, dbPath); pCtx->oldLockingContext = pFile->lockingContext; pFile->lockingContext = pCtx; pCtx->pOldMethod = pFile->pMethod; pFile->pMethod = &proxyIoMethods; }else{ if( pCtx->conchFile ){ - rc = pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile); - if( rc ) return rc; + pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile); sqlite3_free(pCtx->conchFile); } + sqlite3_free(pCtx->lockProxyPath); sqlite3_free(pCtx->conchFilePath); sqlite3_free(pCtx); } @@ -26661,8 +27622,12 @@ static int proxyCheckReservedLock(sqlite3_file *id, int *pResOut) { int rc = proxyTakeConch(pFile); if( rc==SQLITE_OK ){ proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; - unixFile *proxy = pCtx->lockProxy; - return proxy->pMethod->xCheckReservedLock((sqlite3_file*)proxy, pResOut); + if( pCtx->conchHeld>0 ){ + unixFile *proxy = pCtx->lockProxy; + return proxy->pMethod->xCheckReservedLock((sqlite3_file*)proxy, pResOut); + }else{ /* conchHeld < 0 is lockless */ + pResOut=0; + } } return rc; } @@ -26696,9 +27661,13 @@ static int proxyLock(sqlite3_file *id, int locktype) { int rc = proxyTakeConch(pFile); if( rc==SQLITE_OK ){ proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; - unixFile *proxy = pCtx->lockProxy; - rc = proxy->pMethod->xLock((sqlite3_file*)proxy, locktype); - pFile->locktype = proxy->locktype; + if( pCtx->conchHeld>0 ){ + unixFile *proxy = pCtx->lockProxy; + rc = proxy->pMethod->xLock((sqlite3_file*)proxy, locktype); + pFile->locktype = proxy->locktype; + }else{ + /* conchHeld < 0 is lockless */ + } } return rc; } @@ -26716,9 +27685,13 @@ static int proxyUnlock(sqlite3_file *id, int locktype) { int rc = proxyTakeConch(pFile); if( rc==SQLITE_OK ){ proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; - unixFile *proxy = pCtx->lockProxy; - rc = proxy->pMethod->xUnlock((sqlite3_file*)proxy, locktype); - pFile->locktype = proxy->locktype; + if( pCtx->conchHeld>0 ){ + unixFile *proxy = pCtx->lockProxy; + rc = proxy->pMethod->xUnlock((sqlite3_file*)proxy, locktype); + pFile->locktype = proxy->locktype; + }else{ + /* conchHeld < 0 is lockless */ + } } return rc; } @@ -26845,7 +27818,6 @@ SQLITE_API int sqlite3_os_init(void){ #endif UNIXVFS("unix-none", nolockIoFinder ), UNIXVFS("unix-dotfile", dotlockIoFinder ), - UNIXVFS("unix-wfl", posixWflIoFinder ), #if OS_VXWORKS UNIXVFS("unix-namedsem", semIoFinder ), #endif @@ -26857,6 +27829,7 @@ SQLITE_API int sqlite3_os_init(void){ #endif #if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) UNIXVFS("unix-afp", afpIoFinder ), + UNIXVFS("unix-nfs", nfsIoFinder ), UNIXVFS("unix-proxy", proxyIoFinder ), #endif }; @@ -28520,7 +29493,7 @@ static int winOpen( return winOpen(pVfs, zName, id, ((flags|SQLITE_OPEN_READONLY)&~SQLITE_OPEN_READWRITE), pOutFlags); }else{ - return SQLITE_CANTOPEN; + return SQLITE_CANTOPEN_BKPT; } } if( pOutFlags ){ @@ -28542,7 +29515,7 @@ static int winOpen( ){ CloseHandle(h); free(zConverted); - return SQLITE_CANTOPEN; + return SQLITE_CANTOPEN_BKPT; } if( isTemp ){ pFile->zDeleteOnClose = zConverted; @@ -29629,6 +30602,7 @@ SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *pCache, int szPage){ if( pCache->pCache ){ sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache); pCache->pCache = 0; + pCache->pPage1 = 0; } pCache->szPage = szPage; } @@ -29682,6 +30656,7 @@ SQLITE_PRIVATE int sqlite3PcacheFetch( pPg && (pPg->nRef || (pPg->flags&PGHDR_NEED_SYNC)); pPg=pPg->pDirtyPrev ); + pCache->pSynced = pPg; if( !pPg ){ for(pPg=pCache->pDirtyTail; pPg && pPg->nRef; pPg=pPg->pDirtyPrev); } @@ -33240,6 +34215,9 @@ end_playback: rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1); testcase( rc!=SQLITE_OK ); } + if( rc==SQLITE_OK && pPager->noSync==0 && pPager->state>=PAGER_EXCLUSIVE ){ + rc = sqlite3OsSync(pPager->fd, pPager->sync_flags); + } if( rc==SQLITE_OK ){ rc = pager_end_transaction(pPager, zMaster[0]!='\0'); testcase( rc!=SQLITE_OK ); @@ -34096,9 +35074,7 @@ static int pager_write_pagelist(PgHdr *pList){ ** any such pages to the file. ** ** Also, do not write out any page that has the PGHDR_DONT_WRITE flag - ** set (set by sqlite3PagerDontWrite()). Note that if compiled with - ** SQLITE_SECURE_DELETE the PGHDR_DONT_WRITE bit is never set and so - ** the second test is always true. + ** set (set by sqlite3PagerDontWrite()). */ if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){ i64 offset = (pgno-1)*(i64)pPager->pageSize; /* Offset to write */ @@ -34385,7 +35361,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( ** as it will not be possible to open the journal file or even ** check for a hot-journal before reading. */ - rc = SQLITE_CANTOPEN; + rc = SQLITE_CANTOPEN_BKPT; } if( rc!=SQLITE_OK ){ sqlite3_free(zPathname); @@ -34562,6 +35538,7 @@ SQLITE_PRIVATE int sqlite3PagerOpen( /* pPager->pBusyHandlerArg = 0; */ pPager->xReiniter = xReinit; /* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */ + *ppPager = pPager; return SQLITE_OK; } @@ -34711,8 +35688,24 @@ static int readDbPage(PgHdr *pPg){ rc = SQLITE_OK; } if( pgno==1 ){ - u8 *dbFileVers = &((u8*)pPg->pData)[24]; - memcpy(&pPager->dbFileVers, dbFileVers, sizeof(pPager->dbFileVers)); + if( rc ){ + /* If the read is unsuccessful, set the dbFileVers[] to something + ** that will never be a valid file version. dbFileVers[] is a copy + ** of bytes 24..39 of the database. Bytes 28..31 should always be + ** zero. Bytes 32..35 and 35..39 should be page numbers which are + ** never 0xffffffff. So filling pPager->dbFileVers[] with all 0xff + ** bytes should suffice. + ** + ** For an encrypted database, the situation is more complex: bytes + ** 24..39 of the database are white noise. But the probability of + ** white noising equaling 16 bytes of 0xff is vanishingly small so + ** we should still be ok. + */ + memset(pPager->dbFileVers, 0xff, sizeof(pPager->dbFileVers)); + }else{ + u8 *dbFileVers = &((u8*)pPg->pData)[24]; + memcpy(&pPager->dbFileVers, dbFileVers, sizeof(pPager->dbFileVers)); + } } CODEC1(pPager, pPg->pData, pgno, 3, rc = SQLITE_NOMEM); @@ -34844,7 +35837,7 @@ SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){ rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &fout); assert( rc!=SQLITE_OK || isOpen(pPager->jfd) ); if( rc==SQLITE_OK && fout&SQLITE_OPEN_READONLY ){ - rc = SQLITE_CANTOPEN; + rc = SQLITE_CANTOPEN_BKPT; sqlite3OsClose(pPager->jfd); } }else{ @@ -35063,7 +36056,7 @@ SQLITE_PRIVATE int sqlite3PagerAcquire( goto pager_acquire_err; } - if( MEMDB || nMax<(int)pgno || noContent ){ + if( MEMDB || nMax<(int)pgno || noContent || !isOpen(pPager->fd) ){ if( pgno>pPager->mxPgno ){ rc = SQLITE_FULL; goto pager_acquire_err; @@ -35606,7 +36599,6 @@ SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage *pPg){ } #endif -#ifndef SQLITE_SECURE_DELETE /* ** A call to this routine tells the pager that it is not necessary to ** write the information on page pPg back to the disk, even though @@ -35632,7 +36624,6 @@ SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){ #endif } } -#endif /* !defined(SQLITE_SECURE_DELETE) */ /* ** This routine is called to increment the value of the database file @@ -36202,30 +37193,35 @@ SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){ ** operation. Store this value in nNew. Then free resources associated ** with any savepoints that are destroyed by this operation. */ - nNew = iSavepoint + (op==SAVEPOINT_ROLLBACK); + nNew = iSavepoint + (( op==SAVEPOINT_RELEASE ) ? 0 : 1); for(ii=nNew; ii<pPager->nSavepoint; ii++){ sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint); } pPager->nSavepoint = nNew; - /* If this is a rollback operation, playback the specified savepoint. + /* If this is a release of the outermost savepoint, truncate + ** the sub-journal to zero bytes in size. */ + if( op==SAVEPOINT_RELEASE ){ + if( nNew==0 && isOpen(pPager->sjfd) ){ + /* Only truncate if it is an in-memory sub-journal. */ + if( sqlite3IsMemJournal(pPager->sjfd) ){ + rc = sqlite3OsTruncate(pPager->sjfd, 0); + assert( rc==SQLITE_OK ); + } + pPager->nSubRec = 0; + } + } + /* Else this is a rollback operation, playback the specified savepoint. ** If this is a temp-file, it is possible that the journal file has ** not yet been opened. In this case there have been no changes to ** the database file, so the playback operation can be skipped. */ - if( op==SAVEPOINT_ROLLBACK && isOpen(pPager->jfd) ){ + else if( isOpen(pPager->jfd) ){ PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1]; rc = pagerPlaybackSavepoint(pPager, pSavepoint); assert(rc!=SQLITE_DONE); } - /* If this is a release of the outermost savepoint, truncate - ** the sub-journal to zero bytes in size. */ - if( nNew==0 && op==SAVEPOINT_RELEASE && isOpen(pPager->sjfd) ){ - assert( rc==SQLITE_OK ); - rc = sqlite3OsTruncate(pPager->sjfd, 0); - pPager->nSubRec = 0; - } } return rc; } @@ -36985,6 +37981,7 @@ struct BtShared { MemPage *pPage1; /* First page of the database */ u8 readOnly; /* True if the underlying file is readonly */ u8 pageSizeFixed; /* True if the page size can no longer be changed */ + u8 secureDelete; /* True if secure_delete is enabled */ #ifndef SQLITE_OMIT_AUTOVACUUM u8 autoVacuum; /* True if auto-vacuum is enabled */ u8 incrVacuum; /* True if incr-vacuum is enabled */ @@ -38808,11 +39805,11 @@ static int freeSpace(MemPage *pPage, int start, int size){ assert( sqlite3_mutex_held(pPage->pBt->mutex) ); assert( size>=0 ); /* Minimum cell size is 4 */ -#ifdef SQLITE_SECURE_DELETE - /* Overwrite deleted information with zeros when the SECURE_DELETE - ** option is enabled at compile-time */ - memset(&data[start], 0, size); -#endif + if( pPage->pBt->secureDelete ){ + /* Overwrite deleted information with zeros when the secure_delete + ** option is enabled */ + memset(&data[start], 0, size); + } /* Add the space back into the linked list of freeblocks. Note that ** even though the freeblock list was checked by btreeInitPage(), @@ -39044,9 +40041,9 @@ static void zeroPage(MemPage *pPage, int flags){ assert( sqlite3PagerGetData(pPage->pDbPage) == data ); assert( sqlite3PagerIswriteable(pPage->pDbPage) ); assert( sqlite3_mutex_held(pBt->mutex) ); -#ifdef SQLITE_SECURE_DELETE - memset(&data[hdr], 0, pBt->usableSize - hdr); -#endif + if( pBt->secureDelete ){ + memset(&data[hdr], 0, pBt->usableSize - hdr); + } data[hdr] = (char)flags; first = hdr + 8 + 4*((flags&PTF_LEAF)==0 ?1:0); memset(&data[hdr+1], 0, 4); @@ -39366,6 +40363,9 @@ SQLITE_PRIVATE int sqlite3BtreeOpen( pBt->pCursor = 0; pBt->pPage1 = 0; pBt->readOnly = sqlite3PagerIsreadonly(pBt->pPager); +#ifdef SQLITE_SECURE_DELETE + pBt->secureDelete = 1; +#endif pBt->pageSize = get2byte(&zDbHeader[16]); if( pBt->pageSize<512 || pBt->pageSize>SQLITE_MAX_PAGE_SIZE || ((pBt->pageSize-1)&pBt->pageSize)!=0 ){ @@ -39722,6 +40722,23 @@ SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){ sqlite3BtreeLeave(p); return n; } + +/* +** Set the secureDelete flag if newFlag is 0 or 1. If newFlag is -1, +** then make no changes. Always return the value of the secureDelete +** setting after the change. +*/ +SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree *p, int newFlag){ + int b; + if( p==0 ) return 0; + sqlite3BtreeEnter(p); + if( newFlag>=0 ){ + p->pBt->secureDelete = (newFlag!=0) ? 1 : 0; + } + b = p->pBt->secureDelete; + sqlite3BtreeLeave(p); + return b; +} #endif /* !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM) */ /* @@ -42465,17 +43482,17 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){ nFree = get4byte(&pPage1->aData[36]); put4byte(&pPage1->aData[36], nFree+1); -#ifdef SQLITE_SECURE_DELETE - /* If the SQLITE_SECURE_DELETE compile-time option is enabled, then - ** always fully overwrite deleted information with zeros. - */ - if( (!pPage && (rc = btreeGetPage(pBt, iPage, &pPage, 0))) - || (rc = sqlite3PagerWrite(pPage->pDbPage)) - ){ - goto freepage_out; + if( pBt->secureDelete ){ + /* If the secure_delete option is enabled, then + ** always fully overwrite deleted information with zeros. + */ + if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0) ) + || ((rc = sqlite3PagerWrite(pPage->pDbPage))!=0) + ){ + goto freepage_out; + } + memset(pPage->aData, 0, pPage->pBt->pageSize); } - memset(pPage->aData, 0, pPage->pBt->pageSize); -#endif /* If the database supports auto-vacuum, write an entry in the pointer-map ** to indicate that the page is free. @@ -42526,11 +43543,9 @@ static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){ if( rc==SQLITE_OK ){ put4byte(&pTrunk->aData[4], nLeaf+1); put4byte(&pTrunk->aData[8+nLeaf*4], iPage); -#ifndef SQLITE_SECURE_DELETE - if( pPage ){ + if( pPage && !pBt->secureDelete ){ sqlite3PagerDontWrite(pPage->pDbPage); } -#endif rc = btreeSetHasContent(pBt, iPage); } TRACE(("FREE-PAGE: %d leaf on trunk page %d\n",pPage->pgno,pTrunk->pgno)); @@ -42604,7 +43619,25 @@ static int clearCell(MemPage *pPage, unsigned char *pCell){ rc = getOverflowPage(pBt, ovflPgno, &pOvfl, &iNext); if( rc ) return rc; } - rc = freePage2(pBt, pOvfl, ovflPgno); + + if( ( pOvfl || ((pOvfl = btreePageLookup(pBt, ovflPgno))!=0) ) + && sqlite3PagerPageRefcount(pOvfl->pDbPage)!=1 + ){ + /* There is no reason any cursor should have an outstanding reference + ** to an overflow page belonging to a cell that is being deleted/updated. + ** So if there exists more than one reference to this page, then it + ** must not really be an overflow page and the database must be corrupt. + ** It is helpful to detect this before calling freePage2(), as + ** freePage2() may zero the page contents if secure-delete mode is + ** enabled. If this 'overflow' page happens to be a page that the + ** caller is iterating through or using in some other way, this + ** can be problematic. + */ + rc = SQLITE_CORRUPT_BKPT; + }else{ + rc = freePage2(pBt, pOvfl, ovflPgno); + } + if( pOvfl ){ sqlite3PagerUnref(pOvfl->pDbPage); } @@ -42848,7 +43881,7 @@ static void insertCell( Pgno iChild, /* If non-zero, replace first 4 bytes with this value */ int *pRC /* Read and write return code from here */ ){ - int idx; /* Where to write new cell content in data[] */ + int idx = 0; /* Where to write new cell content in data[] */ int j; /* Loop counter */ int end; /* First byte past the last cell pointer in data[] */ int ins; /* Index in data[] where new cell pointer is inserted */ @@ -43339,10 +44372,17 @@ static int balance_nonroot( ** In this case, temporarily copy the cell into the aOvflSpace[] ** buffer. It will be copied out again as soon as the aSpace[] buffer ** is allocated. */ -#ifdef SQLITE_SECURE_DELETE - memcpy(&aOvflSpace[apDiv[i]-pParent->aData], apDiv[i], szNew[i]); - apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData]; -#endif + if( pBt->secureDelete ){ + int iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData); + if( (iOff+szNew[i])>pBt->usableSize ){ + rc = SQLITE_CORRUPT_BKPT; + memset(apOld, 0, (i+1)*sizeof(MemPage*)); + goto balance_cleanup; + }else{ + memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]); + apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData]; + } + } dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc); } } @@ -43462,7 +44502,7 @@ static int balance_nonroot( if( leafData ){ i--; } subtotal = 0; k++; - if( k>NB+1 ){ rc = SQLITE_CORRUPT; goto balance_cleanup; } + if( k>NB+1 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; } } } szNew[k] = subtotal; @@ -43516,7 +44556,7 @@ static int balance_nonroot( ** Allocate k new pages. Reuse old pages where possible. */ if( apOld[0]->pgno<=1 ){ - rc = SQLITE_CORRUPT; + rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; } pageFlags = apOld[0]->aData[0]; @@ -44954,7 +45994,9 @@ static void checkList( static int checkTreePage( IntegrityCk *pCheck, /* Context for the sanity check */ int iPage, /* Page number of the page to check */ - char *zParentContext /* Parent context */ + char *zParentContext, /* Parent context */ + i64 *pnParentMinKey, + i64 *pnParentMaxKey ){ MemPage *pPage; int i, rc, depth, d2, pgno, cnt; @@ -44965,6 +46007,8 @@ static int checkTreePage( int usableSize; char zContext[100]; char *hit = 0; + i64 nMinKey = 0; + i64 nMaxKey = 0; sqlite3_snprintf(sizeof(zContext), zContext, "Page %d: ", iPage); @@ -45007,6 +46051,16 @@ static int checkTreePage( btreeParseCellPtr(pPage, pCell, &info); sz = info.nData; if( !pPage->intKey ) sz += (int)info.nKey; + /* For intKey pages, check that the keys are in order. + */ + else if( i==0 ) nMinKey = nMaxKey = info.nKey; + else{ + if( info.nKey <= nMaxKey ){ + checkAppendMsg(pCheck, zContext, + "Rowid %lld out of order (previous was %lld)", info.nKey, nMaxKey); + } + nMaxKey = info.nKey; + } assert( sz==info.nPayload ); if( (sz>info.nLocal) && (&pCell[info.iOverflow]<=&pPage->aData[pBt->usableSize]) @@ -45030,25 +46084,62 @@ static int checkTreePage( checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext); } #endif - d2 = checkTreePage(pCheck, pgno, zContext); + d2 = checkTreePage(pCheck, pgno, zContext, &nMinKey, i==0 ? NULL : &nMaxKey); if( i>0 && d2!=depth ){ checkAppendMsg(pCheck, zContext, "Child page depth differs"); } depth = d2; } } + if( !pPage->leaf ){ pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]); sqlite3_snprintf(sizeof(zContext), zContext, "On page %d at right child: ", iPage); #ifndef SQLITE_OMIT_AUTOVACUUM if( pBt->autoVacuum ){ - checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, 0); + checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext); } #endif - checkTreePage(pCheck, pgno, zContext); + checkTreePage(pCheck, pgno, zContext, NULL, !pPage->nCell ? NULL : &nMaxKey); } + /* For intKey leaf pages, check that the min/max keys are in order + ** with any left/parent/right pages. + */ + if( pPage->leaf && pPage->intKey ){ + /* if we are a left child page */ + if( pnParentMinKey ){ + /* if we are the left most child page */ + if( !pnParentMaxKey ){ + if( nMaxKey > *pnParentMinKey ){ + checkAppendMsg(pCheck, zContext, + "Rowid %lld out of order (max larger than parent min of %lld)", + nMaxKey, *pnParentMinKey); + } + }else{ + if( nMinKey <= *pnParentMinKey ){ + checkAppendMsg(pCheck, zContext, + "Rowid %lld out of order (min less than parent min of %lld)", + nMinKey, *pnParentMinKey); + } + if( nMaxKey > *pnParentMaxKey ){ + checkAppendMsg(pCheck, zContext, + "Rowid %lld out of order (max larger than parent max of %lld)", + nMaxKey, *pnParentMaxKey); + } + *pnParentMinKey = nMaxKey; + } + /* else if we're a right child page */ + } else if( pnParentMaxKey ){ + if( nMinKey <= *pnParentMaxKey ){ + checkAppendMsg(pCheck, zContext, + "Rowid %lld out of order (min less than parent max of %lld)", + nMinKey, *pnParentMaxKey); + } + } + } + /* Check for complete coverage of the page */ data = pPage->aData; @@ -45072,7 +46163,7 @@ static int checkTreePage( } if( (pc+size-1)>=usableSize ){ checkAppendMsg(pCheck, 0, - "Corruption detected in cell %d on page %d",i,iPage,0); + "Corruption detected in cell %d on page %d",i,iPage); }else{ for(j=pc+size-1; j>=pc; j--) hit[j]++; } @@ -45178,7 +46269,7 @@ SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck( checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0, 0); } #endif - checkTreePage(&sCheck, aRoot[i], "List of tree roots: "); + checkTreePage(&sCheck, aRoot[i], "List of tree roots: ", NULL, NULL); } /* Make sure every page in the file is referenced @@ -45511,10 +46602,10 @@ static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){ }else{ pParse->db = pDb; if( sqlite3OpenTempDatabase(pParse) ){ - sqlite3ErrorClear(pParse); sqlite3Error(pErrorDb, pParse->rc, "%s", pParse->zErrMsg); rc = SQLITE_ERROR; } + sqlite3DbFree(pErrorDb, pParse->zErrMsg); sqlite3StackFree(pErrorDb, pParse); } if( rc ){ @@ -46357,6 +47448,10 @@ SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){ ** before attempting the conversion. */ static i64 doubleToInt64(double r){ +#ifdef SQLITE_OMIT_FLOATING_POINT + /* When floating-point is omitted, double and int64 are the same thing */ + return r; +#else /* ** Many compilers we encounter do not define constants for the ** minimum and maximum 64-bit integers, or they define them @@ -46378,6 +47473,7 @@ static i64 doubleToInt64(double r){ }else{ return (i64)r; } +#endif } /* @@ -46505,21 +47601,26 @@ SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){ /* ** Convert pMem so that it has types MEM_Real or MEM_Int or both. ** Invalidate any prior representations. +** +** Every effort is made to force the conversion, even if the input +** is a string that does not look completely like a number. Convert +** as much of the string as we can and ignore the rest. */ SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){ - double r1, r2; - i64 i; + int rc; assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_Null))==0 ); assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 ); assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) ); - r1 = sqlite3VdbeRealValue(pMem); - i = doubleToInt64(r1); - r2 = (double)i; - if( r1==r2 ){ - sqlite3VdbeMemIntegerify(pMem); + rc = sqlite3VdbeChangeEncoding(pMem, SQLITE_UTF8); + if( rc ) return rc; + rc = sqlite3VdbeMemNulTerminate(pMem); + if( rc ) return rc; + if( sqlite3Atoi64(pMem->z, &pMem->u.i) ){ + MemSetTypeFlag(pMem, MEM_Int); }else{ - pMem->r = r1; + pMem->r = sqlite3VdbeRealValue(pMem); MemSetTypeFlag(pMem, MEM_Real); + sqlite3VdbeIntegerAffinity(pMem); } return SQLITE_OK; } @@ -46571,6 +47672,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){ pMem->type = SQLITE_INTEGER; } +#ifndef SQLITE_OMIT_FLOATING_POINT /* ** Delete any previous value and set the value stored in *pMem to val, ** manifest type REAL. @@ -46585,6 +47687,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){ pMem->type = SQLITE_FLOAT; } } +#endif /* ** Delete any previous value and set the value of pMem to be an @@ -46639,7 +47742,7 @@ SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int sr sqlite3VdbeMemReleaseExternal(pTo); memcpy(pTo, pFrom, MEMCELLSIZE); pTo->xDel = 0; - if( (pFrom->flags&MEM_Dyn)!=0 || pFrom->z==pFrom->zMalloc ){ + if( (pFrom->flags&MEM_Static)==0 ){ pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem); assert( srcType==MEM_Ephem || srcType==MEM_Static ); pTo->flags |= srcType; @@ -47210,7 +48313,7 @@ SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepa */ SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){ Vdbe *p = (Vdbe *)pStmt; - return (p->isPrepareV2 ? p->zSql : 0); + return (p && p->isPrepareV2) ? p->zSql : 0; } /* @@ -47399,6 +48502,13 @@ SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe *p, int x){ } } +/* +** Mark the VDBE as one that can only be run one time. +*/ +SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe *p){ + p->runOnlyOnce = 1; +} + #ifdef SQLITE_DEBUG /* sqlite3AssertMayAbort() logic */ /* @@ -48203,7 +49313,6 @@ SQLITE_PRIVATE int sqlite3VdbeList( assert( p->explain ); assert( p->magic==VDBE_MAGIC_RUN ); - assert( db->magic==SQLITE_MAGIC_BUSY ); assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM ); /* Even though this opcode does not use dynamic strings for @@ -48618,9 +49727,7 @@ SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){ sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor; const sqlite3_module *pModule = pCx->pModule; p->inVtabMethod = 1; - (void)sqlite3SafetyOff(p->db); pModule->xClose(pVtabCursor); - (void)sqlite3SafetyOn(p->db); p->inVtabMethod = 0; } #endif @@ -48801,9 +49908,7 @@ static int vdbeCommit(sqlite3 *db, Vdbe *p){ /* If there are any write-transactions at all, invoke the commit hook */ if( needXcommit && db->xCommitCallback ){ - (void)sqlite3SafetyOff(db); rc = db->xCommitCallback(db->pCommitArg); - (void)sqlite3SafetyOn(db); if( rc ){ return SQLITE_CONSTRAINT; } @@ -49269,12 +50374,17 @@ SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){ /* If eStatementOp is non-zero, then a statement transaction needs to ** be committed or rolled back. Call sqlite3VdbeCloseStatement() to ** do so. If this operation returns an error, and the current statement - ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then set the error - ** code to the new value. + ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then promote the + ** current statement error code. + ** + ** Note that sqlite3VdbeCloseStatement() can only fail if eStatementOp + ** is SAVEPOINT_ROLLBACK. But if p->rc==SQLITE_OK then eStatementOp + ** must be SAVEPOINT_RELEASE. Hence the NEVER(p->rc==SQLITE_OK) in + ** the following code. */ if( eStatementOp ){ rc = sqlite3VdbeCloseStatement(p, eStatementOp); - if( rc && (p->rc==SQLITE_OK || p->rc==SQLITE_CONSTRAINT) ){ + if( rc && (NEVER(p->rc==SQLITE_OK) || p->rc==SQLITE_CONSTRAINT) ){ p->rc = rc; sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = 0; @@ -49357,9 +50467,7 @@ SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){ ** error, then it might not have been halted properly. So halt ** it now. */ - (void)sqlite3SafetyOn(db); sqlite3VdbeHalt(p); - (void)sqlite3SafetyOff(db); /* If the VDBE has be run even partially, then transfer the error code ** and error message from the VDBE into the main database structure. But @@ -49379,6 +50487,7 @@ SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){ }else{ sqlite3Error(db, SQLITE_OK, 0); } + if( p->runOnlyOnce ) p->expired = 1; }else if( p->rc && p->expired ){ /* The expired flag was set on the VDBE before the first call ** to sqlite3_step(). For consistency (since sqlite3_step() was @@ -49480,6 +50589,7 @@ SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe *p){ sqlite3DbFree(db, p->zSql); p->magic = VDBE_MAGIC_DEAD; sqlite3DbFree(db, p->pFree); + p->db = 0; sqlite3DbFree(db, p); } @@ -50160,7 +51270,7 @@ SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare( ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */ if( nCellKey<=0 || nCellKey>0x7fffffff ){ *res = 0; - return SQLITE_CORRUPT; + return SQLITE_CORRUPT_BKPT; } memset(&m, 0, sizeof(m)); rc = sqlite3VdbeMemFromBtree(pC->pCursor, 0, (int)nCellKey, 1, &m); @@ -50288,6 +51398,28 @@ SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){ #endif /* +** Check on a Vdbe to make sure it has not been finalized. Log +** an error and return true if it has been finalized (or is otherwise +** invalid). Return false if it is ok. +*/ +static int vdbeSafety(Vdbe *p){ + if( p->db==0 ){ + sqlite3_log(SQLITE_MISUSE, "API called with finalized prepared statement"); + return 1; + }else{ + return 0; + } +} +static int vdbeSafetyNotNull(Vdbe *p){ + if( p==0 ){ + sqlite3_log(SQLITE_MISUSE, "API called with NULL prepared statement"); + return 1; + }else{ + return vdbeSafety(p); + } +} + +/* ** The following routine destroys a virtual machine that is created by ** the sqlite3_compile() routine. The integer returned is an SQLITE_ ** success/failure code that describes the result of executing the virtual @@ -50304,7 +51436,11 @@ SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){ Vdbe *v = (Vdbe*)pStmt; sqlite3 *db = v->db; #if SQLITE_THREADSAFE - sqlite3_mutex *mutex = v->db->mutex; + sqlite3_mutex *mutex; +#endif + if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT; +#if SQLITE_THREADSAFE + mutex = v->db->mutex; #endif sqlite3_mutex_enter(mutex); rc = sqlite3VdbeFinalize(v); @@ -50551,26 +51687,23 @@ static int sqlite3Step(Vdbe *p){ assert(p); if( p->magic!=VDBE_MAGIC_RUN ){ - return SQLITE_MISUSE; + sqlite3_log(SQLITE_MISUSE, + "attempt to step a halted statement: [%s]", p->zSql); + return SQLITE_MISUSE_BKPT; } - /* Assert that malloc() has not failed */ + /* Check that malloc() has not failed. If it has, return early. */ db = p->db; if( db->mallocFailed ){ + p->rc = SQLITE_NOMEM; return SQLITE_NOMEM; } if( p->pc<=0 && p->expired ){ - if( ALWAYS(p->rc==SQLITE_OK || p->rc==SQLITE_SCHEMA) ){ - p->rc = SQLITE_SCHEMA; - } + p->rc = SQLITE_SCHEMA; rc = SQLITE_ERROR; goto end_of_step; } - if( sqlite3SafetyOn(db) ){ - p->rc = SQLITE_MISUSE; - return SQLITE_MISUSE; - } if( p->pc<0 ){ /* If there are no other statements currently running, then ** reset the interrupt flag. This prevents a call to sqlite3_interrupt @@ -50603,10 +51736,6 @@ static int sqlite3Step(Vdbe *p){ rc = sqlite3VdbeExec(p); } - if( sqlite3SafetyOff(db) ){ - rc = SQLITE_MISUSE; - } - #ifndef SQLITE_OMIT_TRACE /* Invoke the profile callback if there is one */ @@ -50653,39 +51782,44 @@ end_of_step: ** call sqlite3Reprepare() and try again. */ SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){ - int rc = SQLITE_MISUSE; - if( pStmt ){ - int cnt = 0; - Vdbe *v = (Vdbe*)pStmt; - sqlite3 *db = v->db; - sqlite3_mutex_enter(db->mutex); - while( (rc = sqlite3Step(v))==SQLITE_SCHEMA - && cnt++ < 5 - && (rc = sqlite3Reprepare(v))==SQLITE_OK ){ - sqlite3_reset(pStmt); - v->expired = 0; - } - if( rc==SQLITE_SCHEMA && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){ - /* This case occurs after failing to recompile an sql statement. - ** The error message from the SQL compiler has already been loaded - ** into the database handle. This block copies the error message - ** from the database handle into the statement and sets the statement - ** program counter to 0 to ensure that when the statement is - ** finalized or reset the parser error message is available via - ** sqlite3_errmsg() and sqlite3_errcode(). - */ - const char *zErr = (const char *)sqlite3_value_text(db->pErr); - sqlite3DbFree(db, v->zErrMsg); - if( !db->mallocFailed ){ - v->zErrMsg = sqlite3DbStrDup(db, zErr); - } else { - v->zErrMsg = 0; - v->rc = SQLITE_NOMEM; - } + int rc = SQLITE_OK; /* Result from sqlite3Step() */ + int rc2 = SQLITE_OK; /* Result from sqlite3Reprepare() */ + Vdbe *v = (Vdbe*)pStmt; /* the prepared statement */ + int cnt = 0; /* Counter to prevent infinite loop of reprepares */ + sqlite3 *db; /* The database connection */ + + if( vdbeSafetyNotNull(v) ){ + return SQLITE_MISUSE_BKPT; + } + db = v->db; + sqlite3_mutex_enter(db->mutex); + while( (rc = sqlite3Step(v))==SQLITE_SCHEMA + && cnt++ < 5 + && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){ + sqlite3_reset(pStmt); + v->expired = 0; + } + if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){ + /* This case occurs after failing to recompile an sql statement. + ** The error message from the SQL compiler has already been loaded + ** into the database handle. This block copies the error message + ** from the database handle into the statement and sets the statement + ** program counter to 0 to ensure that when the statement is + ** finalized or reset the parser error message is available via + ** sqlite3_errmsg() and sqlite3_errcode(). + */ + const char *zErr = (const char *)sqlite3_value_text(db->pErr); + sqlite3DbFree(db, v->zErrMsg); + if( !db->mallocFailed ){ + v->zErrMsg = sqlite3DbStrDup(db, zErr); + v->rc = rc2; + } else { + v->zErrMsg = 0; + v->rc = rc = SQLITE_NOMEM; } - rc = sqlite3ApiExit(db, rc); - sqlite3_mutex_leave(db->mutex); } + rc = sqlite3ApiExit(db, rc); + sqlite3_mutex_leave(db->mutex); return rc; } @@ -51155,12 +52289,16 @@ SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){ */ static int vdbeUnbind(Vdbe *p, int i){ Mem *pVar; - if( p==0 ) return SQLITE_MISUSE; + if( vdbeSafetyNotNull(p) ){ + return SQLITE_MISUSE_BKPT; + } sqlite3_mutex_enter(p->db->mutex); if( p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){ sqlite3Error(p->db, SQLITE_MISUSE, 0); sqlite3_mutex_leave(p->db->mutex); - return SQLITE_MISUSE; + sqlite3_log(SQLITE_MISUSE, + "bind on a busy prepared statement: [%s]", p->zSql); + return SQLITE_MISUSE_BKPT; } if( i<1 || i>p->nVar ){ sqlite3Error(p->db, SQLITE_RANGE, 0); @@ -51865,17 +53003,30 @@ static VdbeCursor *allocateCursor( static void applyNumericAffinity(Mem *pRec){ if( (pRec->flags & (MEM_Real|MEM_Int))==0 ){ int realnum; + u8 enc = pRec->enc; sqlite3VdbeMemNulTerminate(pRec); - if( (pRec->flags&MEM_Str) - && sqlite3IsNumber(pRec->z, &realnum, pRec->enc) ){ + if( (pRec->flags&MEM_Str) && sqlite3IsNumber(pRec->z, &realnum, enc) ){ i64 value; - sqlite3VdbeChangeEncoding(pRec, SQLITE_UTF8); - if( !realnum && sqlite3Atoi64(pRec->z, &value) ){ + char *zUtf8 = pRec->z; +#ifndef SQLITE_OMIT_UTF16 + if( enc!=SQLITE_UTF8 ){ + assert( pRec->db ); + zUtf8 = sqlite3Utf16to8(pRec->db, pRec->z, pRec->n, enc); + if( !zUtf8 ) return; + } +#endif + if( !realnum && sqlite3Atoi64(zUtf8, &value) ){ pRec->u.i = value; MemSetTypeFlag(pRec, MEM_Int); }else{ - sqlite3VdbeMemRealify(pRec); + sqlite3AtoF(zUtf8, &pRec->r); + MemSetTypeFlag(pRec, MEM_Real); + } +#ifndef SQLITE_OMIT_UTF16 + if( enc!=SQLITE_UTF8 ){ + sqlite3DbFree(pRec->db, zUtf8); } +#endif } } } @@ -52253,7 +53404,7 @@ static int checkSavepointCount(sqlite3 *db){ SQLITE_PRIVATE int sqlite3VdbeExec( Vdbe *p /* The VDBE */ ){ - int pc; /* The program counter */ + int pc=0; /* The program counter */ Op *aOp = p->aOp; /* Copy of p->aOp */ Op *pOp; /* Current operation */ int rc = SQLITE_OK; /* Value to return */ @@ -52327,6 +53478,8 @@ SQLITE_PRIVATE int sqlite3VdbeExec( struct OP_Ge_stack_vars { int res; /* Result of the comparison of pIn1 against pIn3 */ char affinity; /* Affinity to use for comparison */ + u16 flags1; /* Copy of initial value of pIn1->flags */ + u16 flags3; /* Copy of initial value of pIn3->flags */ } ai; struct OP_Compare_stack_vars { int n; @@ -52364,7 +53517,7 @@ SQLITE_PRIVATE int sqlite3VdbeExec( u8 *zIdx; /* Index into header */ u8 *zEndHdr; /* Pointer to first byte after the header */ u32 offset; /* Offset into the data */ - u64 offset64; /* 64-bit offset. 64 bits needed to catch overflow */ + u32 szField; /* Number of bytes in the content of a field */ int szHdr; /* Size of the header size field at start of record */ int avail; /* Number of bytes of available data */ Mem *pReg; /* PseudoTable input register */ @@ -52676,7 +53829,6 @@ SQLITE_PRIVATE int sqlite3VdbeExec( ********************************************************************/ assert( p->magic==VDBE_MAGIC_RUN ); /* sqlite3_step() verifies this */ - assert( db->magic==SQLITE_MAGIC_BUSY ); sqlite3VdbeMutexArrayEnter(p); if( p->rc==SQLITE_NOMEM ){ /* This happens if a malloc() inside a call to sqlite3_column_text() or @@ -52761,9 +53913,7 @@ SQLITE_PRIVATE int sqlite3VdbeExec( if( checkProgress ){ if( db->nProgressOps==nProgressOps ){ int prc; - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; - prc =db->xProgress(db->pProgressArg); - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; + prc = db->xProgress(db->pProgressArg); if( prc!=0 ){ rc = SQLITE_INTERRUPT; goto vdbe_error_halt; @@ -52965,7 +54115,13 @@ case OP_Halt: { p->errorAction = (u8)pOp->p2; p->pc = pc; if( pOp->p4.z ){ + assert( p->rc!=SQLITE_OK ); sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z); + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(pOp->p1, "abort at %d in [%s]: %s", pc, p->zSql, pOp->p4.z); + }else if( p->rc ){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(pOp->p1, "constraint failed at %d in [%s]", pc, p->zSql); } rc = sqlite3VdbeHalt(p); assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR ); @@ -52999,6 +54155,7 @@ case OP_Int64: { /* out2-prerelease */ break; } +#ifndef SQLITE_OMIT_FLOATING_POINT /* Opcode: Real * P2 * P4 * ** ** P4 is a pointer to a 64-bit floating point value. @@ -53010,6 +54167,7 @@ case OP_Real: { /* same as TK_FLOAT, out2-prerelease */ pOut->r = *pOp->p4.pReal; break; } +#endif /* Opcode: String8 * P2 * P4 * ** @@ -53420,6 +54578,10 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ break; } } +#ifdef SQLITE_OMIT_FLOATING_POINT + pOut->u.i = u.af.rB; + MemSetTypeFlag(pOut, MEM_Int); +#else if( sqlite3IsNaN(u.af.rB) ){ goto arithmetic_result_is_null; } @@ -53428,6 +54590,7 @@ case OP_Remainder: { /* same as TK_REM, in1, in2, out3 */ if( (u.af.flags & MEM_Real)==0 ){ sqlite3VdbeIntegerAffinity(pOut); } +#endif } break; @@ -53520,21 +54683,12 @@ case OP_Function: { assert( pOp[-1].opcode==OP_CollSeq ); u.ag.ctx.pColl = pOp[-1].p4.pColl; } - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; (*u.ag.ctx.pFunc->xFunc)(&u.ag.ctx, u.ag.n, u.ag.apVal); - if( sqlite3SafetyOn(db) ){ - sqlite3VdbeMemRelease(&u.ag.ctx.s); - goto abort_due_to_misuse; - } if( db->mallocFailed ){ /* Even though a malloc() has failed, the implementation of the ** user function may have called an sqlite3_result_XXX() function ** to return a value. The following call releases any resources ** associated with such a value. - ** - ** Note: Maybe MemRelease() should be called if sqlite3SafetyOn() - ** fails also (the if(...) statement above). But if people are - ** misusing sqlite, they have bigger problems than a leaked value. */ sqlite3VdbeMemRelease(&u.ag.ctx.s); goto no_mem; @@ -53659,6 +54813,7 @@ case OP_MustBeInt: { /* jump, in1 */ break; } +#ifndef SQLITE_OMIT_FLOATING_POINT /* Opcode: RealAffinity P1 * * * * ** ** If register P1 holds an integer convert it to a real value. @@ -53675,6 +54830,7 @@ case OP_RealAffinity: { /* in1 */ } break; } +#endif #ifndef SQLITE_OMIT_CAST /* Opcode: ToText P1 * * * * @@ -53758,7 +54914,7 @@ case OP_ToInt: { /* same as TK_TO_INT, in1 */ break; } -#ifndef SQLITE_OMIT_CAST +#if !defined(SQLITE_OMIT_CAST) && !defined(SQLITE_OMIT_FLOATING_POINT) /* Opcode: ToReal P1 * * * * ** ** Force the value in register P1 to be a floating point number. @@ -53775,7 +54931,7 @@ case OP_ToReal: { /* same as TK_TO_REAL, in1 */ } break; } -#endif /* SQLITE_OMIT_CAST */ +#endif /* !defined(SQLITE_OMIT_CAST) && !defined(SQLITE_OMIT_FLOATING_POINT) */ /* Opcode: Lt P1 P2 P3 P4 P5 ** @@ -53858,10 +55014,14 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ #if 0 /* local variables moved into u.ai */ int res; /* Result of the comparison of pIn1 against pIn3 */ char affinity; /* Affinity to use for comparison */ + u16 flags1; /* Copy of initial value of pIn1->flags */ + u16 flags3; /* Copy of initial value of pIn3->flags */ #endif /* local variables moved into u.ai */ pIn1 = &aMem[pOp->p1]; pIn3 = &aMem[pOp->p3]; + u.ai.flags1 = pIn1->flags; + u.ai.flags3 = pIn3->flags; if( (pIn1->flags | pIn3->flags)&MEM_Null ){ /* One or both operands are NULL */ if( pOp->p5 & SQLITE_NULLEQ ){ @@ -53916,6 +55076,10 @@ case OP_Ge: { /* same as TK_GE, jump, in1, in3 */ }else if( u.ai.res ){ pc = pOp->p2-1; } + + /* Undo any changes made by applyAffinity() to the input registers. */ + pIn1->flags = (pIn1->flags&~MEM_TypeMask) | (u.ai.flags1&MEM_TypeMask); + pIn3->flags = (pIn3->flags&~MEM_TypeMask) | (u.ai.flags3&MEM_TypeMask); break; } @@ -54197,7 +55361,7 @@ case OP_Column: { u8 *zIdx; /* Index into header */ u8 *zEndHdr; /* Pointer to first byte after the header */ u32 offset; /* Offset into the data */ - u64 offset64; /* 64-bit offset. 64 bits needed to catch overflow */ + u32 szField; /* Number of bytes in the content of a field */ int szHdr; /* Size of the header size field at start of record */ int avail; /* Number of bytes of available data */ Mem *pReg; /* PseudoTable input register */ @@ -54373,12 +55537,16 @@ case OP_Column: { ** column and u.am.aOffset[u.am.i] will contain the u.am.offset from the beginning ** of the record to the start of the data for the u.am.i-th column */ - u.am.offset64 = u.am.offset; for(u.am.i=0; u.am.i<u.am.nField; u.am.i++){ if( u.am.zIdx<u.am.zEndHdr ){ - u.am.aOffset[u.am.i] = (u32)u.am.offset64; + u.am.aOffset[u.am.i] = u.am.offset; u.am.zIdx += getVarint32(u.am.zIdx, u.am.aType[u.am.i]); - u.am.offset64 += sqlite3VdbeSerialTypeLen(u.am.aType[u.am.i]); + u.am.szField = sqlite3VdbeSerialTypeLen(u.am.aType[u.am.i]); + u.am.offset += u.am.szField; + if( u.am.offset<u.am.szField ){ /* True if u.am.offset overflows */ + u.am.zIdx = &u.am.zEndHdr[1]; /* Forces SQLITE_CORRUPT return below */ + break; + } }else{ /* If u.am.i is less that u.am.nField, then there are less fields in this ** record than SetNumColumns indicated there are columns in the @@ -54398,8 +55566,8 @@ case OP_Column: { ** of the record (when all fields present), then we must be dealing ** with a corrupt database. */ - if( (u.am.zIdx > u.am.zEndHdr)|| (u.am.offset64 > u.am.payloadSize) - || (u.am.zIdx==u.am.zEndHdr && u.am.offset64!=(u64)u.am.payloadSize) ){ + if( (u.am.zIdx > u.am.zEndHdr) || (u.am.offset > u.am.payloadSize) + || (u.am.zIdx==u.am.zEndHdr && u.am.offset!=u.am.payloadSize) ){ rc = SQLITE_CORRUPT_BKPT; goto op_column_out; } @@ -55267,7 +56435,7 @@ case OP_OpenEphemeral: { ** register P2. In other words, cursor P1 becomes an alias for the ** MEM_Blob content contained in register P2. ** -** A pseudo-table created by this opcode is used to hold the a single +** A pseudo-table created by this opcode is used to hold a single ** row output from the sorter so that the row can be decomposed into ** individual columns using the OP_Column opcode. The OP_Column opcode ** is the only cursor opcode that works with a pseudo-table. @@ -56219,12 +57387,10 @@ case OP_Rowid: { /* out2-prerelease */ u.bi.pVtab = u.bi.pC->pVtabCursor->pVtab; u.bi.pModule = u.bi.pVtab->pModule; assert( u.bi.pModule->xRowid ); - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; rc = u.bi.pModule->xRowid(u.bi.pC->pVtabCursor, &u.bi.v); sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = u.bi.pVtab->zErrMsg; u.bi.pVtab->zErrMsg = 0; - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; #endif /* SQLITE_OMIT_VIRTUALTABLE */ }else{ assert( u.bi.pC->pCursor!=0 ); @@ -56779,12 +57945,11 @@ case OP_ParseSchema: { u.bu.initData.iDb = pOp->p1; u.bu.initData.pzErrMsg = &p->zErrMsg; u.bu.zSql = sqlite3MPrintf(db, - "SELECT name, rootpage, sql FROM '%q'.%s WHERE %s", + "SELECT name, rootpage, sql FROM '%q'.%s WHERE %s ORDER BY rowid", db->aDb[u.bu.iDb].zName, u.bu.zMaster, pOp->p4.z); if( u.bu.zSql==0 ){ rc = SQLITE_NOMEM; }else{ - (void)sqlite3SafetyOff(db); assert( db->init.busy==0 ); db->init.busy = 1; u.bu.initData.rc = SQLITE_OK; @@ -56793,7 +57958,6 @@ case OP_ParseSchema: { if( rc==SQLITE_OK ) rc = u.bu.initData.rc; sqlite3DbFree(db, u.bu.zSql); db->init.busy = 0; - (void)sqlite3SafetyOn(db); } } sqlite3BtreeLeaveAll(db); @@ -57379,9 +58543,7 @@ case OP_AggFinal: { ** a transaction. */ case OP_Vacuum: { - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; rc = sqlite3RunVacuum(&p->zErrMsg, db); - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; break; } #endif @@ -57531,12 +58693,10 @@ case OP_VOpen: { u.cf.pVtab = pOp->p4.pVtab->pVtab; u.cf.pModule = (sqlite3_module *)u.cf.pVtab->pModule; assert(u.cf.pVtab && u.cf.pModule); - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; rc = u.cf.pModule->xOpen(u.cf.pVtab, &u.cf.pVtabCursor); sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = u.cf.pVtab->zErrMsg; u.cf.pVtab->zErrMsg = 0; - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; if( SQLITE_OK==rc ){ /* Initialize sqlite3_vtab_cursor base class */ u.cf.pVtabCursor->pVtab = u.cf.pVtab; @@ -57612,7 +58772,6 @@ case OP_VFilter: { /* jump */ sqlite3VdbeMemStoreType(u.cg.apArg[u.cg.i]); } - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; p->inVtabMethod = 1; rc = u.cg.pModule->xFilter(u.cg.pVtabCursor, u.cg.iQuery, pOp->p4.z, u.cg.nArg, u.cg.apArg); p->inVtabMethod = 0; @@ -57622,7 +58781,6 @@ case OP_VFilter: { /* jump */ if( rc==SQLITE_OK ){ u.cg.res = u.cg.pModule->xEof(u.cg.pVtabCursor); } - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; if( u.cg.res ){ pc = pOp->p2 - 1; @@ -57670,7 +58828,6 @@ case OP_VColumn: { sqlite3VdbeMemMove(&u.ch.sContext.s, u.ch.pDest); MemSetTypeFlag(&u.ch.sContext.s, MEM_Null); - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; rc = u.ch.pModule->xColumn(pCur->pVtabCursor, &u.ch.sContext, pOp->p2); sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = u.ch.pVtab->zErrMsg; @@ -57688,9 +58845,6 @@ case OP_VColumn: { REGISTER_TRACE(pOp->p3, u.ch.pDest); UPDATE_MAX_BLOBSIZE(u.ch.pDest); - if( sqlite3SafetyOn(db) ){ - goto abort_due_to_misuse; - } if( sqlite3VdbeMemTooBig(u.ch.pDest) ){ goto too_big; } @@ -57729,7 +58883,6 @@ case OP_VNext: { /* jump */ ** data is available) and the error code returned when xColumn or ** some other method is next invoked on the save virtual table cursor. */ - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; p->inVtabMethod = 1; rc = u.ci.pModule->xNext(u.ci.pCur->pVtabCursor); p->inVtabMethod = 0; @@ -57739,7 +58892,6 @@ case OP_VNext: { /* jump */ if( rc==SQLITE_OK ){ u.ci.res = u.ci.pModule->xEof(u.ci.pCur->pVtabCursor); } - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; if( !u.ci.res ){ /* If there is data, jump to P2 */ @@ -57767,12 +58919,10 @@ case OP_VRename: { assert( u.cj.pVtab->pModule->xRename ); REGISTER_TRACE(pOp->p1, u.cj.pName); assert( u.cj.pName->flags & MEM_Str ); - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; rc = u.cj.pVtab->pModule->xRename(u.cj.pVtab, u.cj.pName->z); sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = u.cj.pVtab->zErrMsg; u.cj.pVtab->zErrMsg = 0; - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; break; } @@ -57825,12 +58975,10 @@ case OP_VUpdate: { u.ck.apArg[u.ck.i] = u.ck.pX; u.ck.pX++; } - if( sqlite3SafetyOff(db) ) goto abort_due_to_misuse; rc = u.ck.pModule->xUpdate(u.ck.pVtab, u.ck.nArg, u.ck.apArg, &u.ck.rowid); sqlite3DbFree(db, p->zErrMsg); p->zErrMsg = u.ck.pVtab->zErrMsg; u.ck.pVtab->zErrMsg = 0; - if( sqlite3SafetyOn(db) ) goto abort_due_to_misuse; if( rc==SQLITE_OK && pOp->p1 ){ assert( u.ck.nArg>1 && u.ck.apArg[0] && (u.ck.apArg[0]->flags&MEM_Null) ); db->lastRowid = u.ck.rowid; @@ -57907,6 +59055,7 @@ case OP_Trace: { ** the same as a no-op. This opcodesnever appears in a real VM program. */ default: { /* This is really OP_Noop and OP_Explain */ + assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain ); break; } @@ -57958,6 +59107,9 @@ default: { /* This is really OP_Noop and OP_Explain */ vdbe_error_halt: assert( rc ); p->rc = rc; + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(rc, "statement aborts at %d: [%s] %s", + pc, p->zSql, p->zErrMsg); sqlite3VdbeHalt(p); if( rc==SQLITE_IOERR_NOMEM ) db->mallocFailed = 1; rc = SQLITE_ERROR; @@ -57986,12 +59138,6 @@ no_mem: rc = SQLITE_NOMEM; goto vdbe_error_halt; - /* Jump to here for an SQLITE_MISUSE error. - */ -abort_due_to_misuse: - rc = SQLITE_MISUSE; - /* Fall thru into abort_due_to_error */ - /* Jump to here for any other kind of fatal error. The "rc" variable ** should hold the error number. */ @@ -58111,13 +59257,6 @@ SQLITE_API int sqlite3_blob_open( memset(pParse, 0, sizeof(Parse)); pParse->db = db; - if( sqlite3SafetyOn(db) ){ - sqlite3DbFree(db, zErr); - sqlite3StackFree(db, pParse); - sqlite3_mutex_leave(db->mutex); - return SQLITE_MISUSE; - } - sqlite3BtreeEnterAll(db); pTab = sqlite3LocateTable(pParse, 0, zTable, zDb); if( pTab && IsVirtual(pTab) ){ @@ -58137,7 +59276,6 @@ SQLITE_API int sqlite3_blob_open( pParse->zErrMsg = 0; } rc = SQLITE_ERROR; - (void)sqlite3SafetyOff(db); sqlite3BtreeLeaveAll(db); goto blob_open_out; } @@ -58152,7 +59290,6 @@ SQLITE_API int sqlite3_blob_open( sqlite3DbFree(db, zErr); zErr = sqlite3MPrintf(db, "no such column: \"%s\"", zColumn); rc = SQLITE_ERROR; - (void)sqlite3SafetyOff(db); sqlite3BtreeLeaveAll(db); goto blob_open_out; } @@ -58193,7 +59330,6 @@ SQLITE_API int sqlite3_blob_open( sqlite3DbFree(db, zErr); zErr = sqlite3MPrintf(db, "cannot open %s column for writing", zFault); rc = SQLITE_ERROR; - (void)sqlite3SafetyOff(db); sqlite3BtreeLeaveAll(db); goto blob_open_out; } @@ -58243,8 +59379,7 @@ SQLITE_API int sqlite3_blob_open( } sqlite3BtreeLeaveAll(db); - rc = sqlite3SafetyOff(db); - if( NEVER(rc!=SQLITE_OK) || db->mallocFailed ){ + if( db->mallocFailed ){ goto blob_open_out; } @@ -58345,7 +59480,7 @@ static int blobReadWrite( Vdbe *v; sqlite3 *db; - if( p==0 ) return SQLITE_MISUSE; + if( p==0 ) return SQLITE_MISUSE_BKPT; db = p->db; sqlite3_mutex_enter(db->mutex); v = (Vdbe*)p->pStmt; @@ -59703,6 +60838,9 @@ static int resolveOrderByTermToExprList( int i; /* Loop counter */ ExprList *pEList; /* The columns of the result set */ NameContext nc; /* Name context for resolving pE */ + sqlite3 *db; /* Database connection */ + int rc; /* Return code from subprocedures */ + u8 savedSuppErr; /* Saved value of db->suppressErr */ assert( sqlite3ExprIsInteger(pE, &i)==0 ); pEList = pSelect->pEList; @@ -59715,17 +60853,19 @@ static int resolveOrderByTermToExprList( nc.pEList = pEList; nc.allowAgg = 1; nc.nErr = 0; - if( sqlite3ResolveExprNames(&nc, pE) ){ - sqlite3ErrorClear(pParse); - return 0; - } + db = pParse->db; + savedSuppErr = db->suppressErr; + db->suppressErr = 1; + rc = sqlite3ResolveExprNames(&nc, pE); + db->suppressErr = savedSuppErr; + if( rc ) return 0; /* Try to match the ORDER BY expression against an expression ** in the result set. Return an 1-based index of the matching ** result-set entry. */ for(i=0; i<pEList->nExpr; i++){ - if( sqlite3ExprCompare(pEList->a[i].pExpr, pE) ){ + if( sqlite3ExprCompare(pEList->a[i].pExpr, pE)<2 ){ return i+1; } } @@ -60485,10 +61625,6 @@ static int codeCompare( addr = sqlite3VdbeAddOp4(pParse->pVdbe, opcode, in2, dest, in1, (void*)p4, P4_COLLSEQ); sqlite3VdbeChangeP5(pParse->pVdbe, (u8)p5); - if( (p5 & SQLITE_AFF_MASK)!=SQLITE_AFF_NONE ){ - sqlite3ExprCacheAffinityChange(pParse, in1, 1); - sqlite3ExprCacheAffinityChange(pParse, in2, 1); - } return addr; } @@ -62119,6 +63255,7 @@ static char *dup8bytes(Vdbe *v, const char *in){ return out; } +#ifndef SQLITE_OMIT_FLOATING_POINT /* ** Generate an instruction that will put the floating point ** value described by z[0..n-1] into register iMem. @@ -62138,6 +63275,7 @@ static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){ sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL); } } +#endif /* @@ -62148,7 +63286,8 @@ static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){ ** z[n] character is guaranteed to be something that does not look ** like the continuation of the number. */ -static void codeInteger(Vdbe *v, Expr *pExpr, int negFlag, int iMem){ +static void codeInteger(Parse *pParse, Expr *pExpr, int negFlag, int iMem){ + Vdbe *v = pParse->pVdbe; if( pExpr->flags & EP_IntValue ){ int i = pExpr->u.iValue; if( negFlag ) i = -i; @@ -62164,7 +63303,11 @@ static void codeInteger(Vdbe *v, Expr *pExpr, int negFlag, int iMem){ zV = dup8bytes(v, (char*)&value); sqlite3VdbeAddOp4(v, OP_Int64, 0, iMem, 0, zV, P4_INT64); }else{ +#ifdef SQLITE_OMIT_FLOATING_POINT + sqlite3ErrorMsg(pParse, "oversized integer: %s%s", negFlag ? "-" : "", z); +#else codeReal(v, z, negFlag, iMem); +#endif } } } @@ -62551,14 +63694,16 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) break; } case TK_INTEGER: { - codeInteger(v, pExpr, 0, target); + codeInteger(pParse, pExpr, 0, target); break; } +#ifndef SQLITE_OMIT_FLOATING_POINT case TK_FLOAT: { assert( !ExprHasProperty(pExpr, EP_IntValue) ); codeReal(v, pExpr->u.zToken, 0, target); break; } +#endif case TK_STRING: { assert( !ExprHasProperty(pExpr, EP_IntValue) ); sqlite3VdbeAddOp4(v, OP_String8, 0, target, 0, pExpr->u.zToken, 0); @@ -62728,11 +63873,13 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) case TK_UMINUS: { Expr *pLeft = pExpr->pLeft; assert( pLeft ); - if( pLeft->op==TK_FLOAT ){ + if( pLeft->op==TK_INTEGER ){ + codeInteger(pParse, pLeft, 1, target); +#ifndef SQLITE_OMIT_FLOATING_POINT + }else if( pLeft->op==TK_FLOAT ){ assert( !ExprHasProperty(pExpr, EP_IntValue) ); codeReal(v, pLeft->u.zToken, 1, target); - }else if( pLeft->op==TK_INTEGER ){ - codeInteger(v, pLeft, 1, target); +#endif }else{ regFree1 = r1 = sqlite3GetTempReg(pParse); sqlite3VdbeAddOp2(v, OP_Integer, 0, r1); @@ -62980,6 +64127,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) target )); +#ifndef SQLITE_OMIT_FLOATING_POINT /* If the column has REAL affinity, it may currently be stored as an ** integer. Use OP_RealAffinity to make sure it is really real. */ if( pExpr->iColumn>=0 @@ -62987,6 +64135,7 @@ SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target) ){ sqlite3VdbeAddOp1(v, OP_RealAffinity, target); } +#endif break; } @@ -63652,57 +64801,61 @@ SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int } /* -** Do a deep comparison of two expression trees. Return TRUE (non-zero) -** if they are identical and return FALSE if they differ in any way. +** Do a deep comparison of two expression trees. Return 0 if the two +** expressions are completely identical. Return 1 if they differ only +** by a COLLATE operator at the top level. Return 2 if there are differences +** other than the top-level COLLATE operator. ** -** Sometimes this routine will return FALSE even if the two expressions +** Sometimes this routine will return 2 even if the two expressions ** really are equivalent. If we cannot prove that the expressions are -** identical, we return FALSE just to be safe. So if this routine -** returns false, then you do not really know for certain if the two -** expressions are the same. But if you get a TRUE return, then you +** identical, we return 2 just to be safe. So if this routine +** returns 2, then you do not really know for certain if the two +** expressions are the same. But if you get a 0 or 1 return, then you ** can be sure the expressions are the same. In the places where -** this routine is used, it does not hurt to get an extra FALSE - that +** this routine is used, it does not hurt to get an extra 2 - that ** just might result in some slightly slower code. But returning -** an incorrect TRUE could lead to a malfunction. +** an incorrect 0 or 1 could lead to a malfunction. */ SQLITE_PRIVATE int sqlite3ExprCompare(Expr *pA, Expr *pB){ int i; if( pA==0||pB==0 ){ - return pB==pA; + return pB==pA ? 0 : 2; } assert( !ExprHasAnyProperty(pA, EP_TokenOnly|EP_Reduced) ); assert( !ExprHasAnyProperty(pB, EP_TokenOnly|EP_Reduced) ); if( ExprHasProperty(pA, EP_xIsSelect) || ExprHasProperty(pB, EP_xIsSelect) ){ - return 0; + return 2; } - if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 0; - if( pA->op!=pB->op ) return 0; - if( !sqlite3ExprCompare(pA->pLeft, pB->pLeft) ) return 0; - if( !sqlite3ExprCompare(pA->pRight, pB->pRight) ) return 0; + if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2; + if( pA->op!=pB->op ) return 2; + if( sqlite3ExprCompare(pA->pLeft, pB->pLeft) ) return 2; + if( sqlite3ExprCompare(pA->pRight, pB->pRight) ) return 2; if( pA->x.pList && pB->x.pList ){ - if( pA->x.pList->nExpr!=pB->x.pList->nExpr ) return 0; + if( pA->x.pList->nExpr!=pB->x.pList->nExpr ) return 2; for(i=0; i<pA->x.pList->nExpr; i++){ Expr *pExprA = pA->x.pList->a[i].pExpr; Expr *pExprB = pB->x.pList->a[i].pExpr; - if( !sqlite3ExprCompare(pExprA, pExprB) ) return 0; + if( sqlite3ExprCompare(pExprA, pExprB) ) return 2; } }else if( pA->x.pList || pB->x.pList ){ - return 0; + return 2; } - if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 0; + if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 2; if( ExprHasProperty(pA, EP_IntValue) ){ if( !ExprHasProperty(pB, EP_IntValue) || pA->u.iValue!=pB->u.iValue ){ - return 0; + return 2; } }else if( pA->op!=TK_COLUMN && pA->u.zToken ){ - if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 0; + if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 2; if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ){ - return 0; + return 2; } } - return 1; + if( (pA->flags & EP_ExpCollate)!=(pB->flags & EP_ExpCollate) ) return 1; + if( (pA->flags & EP_ExpCollate)!=0 && pA->pColl!=pB->pColl ) return 2; + return 0; } @@ -63833,7 +64986,7 @@ static int analyzeAggregate(Walker *pWalker, Expr *pExpr){ */ struct AggInfo_func *pItem = pAggInfo->aFunc; for(i=0; i<pAggInfo->nFunc; i++, pItem++){ - if( sqlite3ExprCompare(pItem->pExpr, pExpr) ){ + if( sqlite3ExprCompare(pItem->pExpr, pExpr)==0 ){ break; } } @@ -64454,9 +65607,9 @@ SQLITE_PRIVATE void sqlite3AlterRenameTable( ** for which the renamed table is the parent table. */ if( (zWhere=whereForeignKeys(pParse, pTab))!=0 ){ sqlite3NestedParse(pParse, - "UPDATE sqlite_master SET " + "UPDATE \"%w\".%s SET " "sql = sqlite_rename_parent(sql, %Q, %Q) " - "WHERE %s;", zTabName, zName, zWhere); + "WHERE %s;", zDb, SCHEMA_TABLE(iDb), zTabName, zName, zWhere); sqlite3DbFree(db, zWhere); } } @@ -65329,9 +66482,7 @@ SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){ if( zSql==0 ){ rc = SQLITE_NOMEM; }else{ - (void)sqlite3SafetyOff(db); rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0); - (void)sqlite3SafetyOn(db); sqlite3DbFree(db, zSql); } @@ -65349,14 +66500,11 @@ SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){ if( !zSql ){ rc = SQLITE_NOMEM; }else{ - (void)sqlite3SafetyOff(db); rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0); - (void)sqlite3SafetyOn(db); sqlite3DbFree(db, zSql); } if( rc==SQLITE_OK ){ - (void)sqlite3SafetyOff(db); while( sqlite3_step(pStmt)==SQLITE_ROW ){ char *zIndex = (char *)sqlite3_column_text(pStmt, 0); Index *pIdx = sqlite3FindIndex(db, zIndex, sInfo.zDatabase); @@ -65406,7 +66554,6 @@ SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){ } } rc = sqlite3_finalize(pStmt); - (void)sqlite3SafetyOn(db); } } #endif @@ -65567,11 +66714,17 @@ static void attachFunc( pPager = sqlite3BtreePager(aNew->pBt); sqlite3PagerLockingMode(pPager, db->dfltLockMode); sqlite3PagerJournalMode(pPager, db->dfltJournalMode); + sqlite3BtreeSecureDelete(aNew->pBt, + sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) ); } - aNew->zName = sqlite3DbStrDup(db, zName); aNew->safety_level = 3; + aNew->zName = sqlite3DbStrDup(db, zName); + if( rc==SQLITE_OK && aNew->zName==0 ){ + rc = SQLITE_NOMEM; + } -#if SQLITE_HAS_CODEC + +#ifdef SQLITE_HAS_CODEC if( rc==SQLITE_OK ){ extern int sqlite3CodecAttach(sqlite3*, int, const void*, int); extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*); @@ -65607,11 +66760,9 @@ static void attachFunc( ** we found it. */ if( rc==SQLITE_OK ){ - (void)sqlite3SafetyOn(db); sqlite3BtreeEnterAll(db); rc = sqlite3Init(db, &zErrDyn); sqlite3BtreeLeaveAll(db); - (void)sqlite3SafetyOff(db); } if( rc ){ int iDb = db->nDb - 1; @@ -66413,7 +67564,7 @@ SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){ pParse->isMultiWrite && pParse->mayAbort); pParse->rc = SQLITE_DONE; pParse->colNamesSet = 0; - }else if( pParse->rc==SQLITE_OK ){ + }else{ pParse->rc = SQLITE_ERROR; } pParse->nTab = 0; @@ -68185,13 +69336,12 @@ SQLITE_PRIVATE void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView, } assert( pParse->nErr==0 ); assert( pName->nSrc==1 ); + if( noErr ) db->suppressErr++; pTab = sqlite3LocateTable(pParse, isView, pName->a[0].zName, pName->a[0].zDatabase); + if( noErr ) db->suppressErr--; if( pTab==0 ){ - if( noErr ){ - sqlite3ErrorClear(pParse); - } goto exit_drop_table; } iDb = sqlite3SchemaToIndex(db, pTab->pSchema); @@ -69613,6 +70763,7 @@ SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *pParse){ sqlite3 *db = pParse->db; if( db->aDb[1].pBt==0 && !pParse->explain ){ int rc; + Btree *pBt; static const int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | @@ -69620,17 +70771,20 @@ SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *pParse){ SQLITE_OPEN_DELETEONCLOSE | SQLITE_OPEN_TEMP_DB; - rc = sqlite3BtreeFactory(db, 0, 0, SQLITE_DEFAULT_CACHE_SIZE, flags, - &db->aDb[1].pBt); + rc = sqlite3BtreeFactory(db, 0, 0, SQLITE_DEFAULT_CACHE_SIZE, flags, &pBt); if( rc!=SQLITE_OK ){ sqlite3ErrorMsg(pParse, "unable to open a temporary database " "file for storing temporary tables"); pParse->rc = rc; return 1; } + db->aDb[1].pBt = pBt; assert( db->aDb[1].pSchema ); - sqlite3PagerJournalMode(sqlite3BtreePager(db->aDb[1].pBt), - db->dfltJournalMode); + if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, -1, 0) ){ + db->mallocFailed = 1; + return 1; + } + sqlite3PagerJournalMode(sqlite3BtreePager(pBt), db->dfltJournalMode); } return 0; } @@ -71275,14 +72429,24 @@ static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){ } if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return; r = sqlite3_value_double(argv[0]); - zBuf = sqlite3_mprintf("%.*f",n,r); - if( zBuf==0 ){ - sqlite3_result_error_nomem(context); + /* If Y==0 and X will fit in a 64-bit int, + ** handle the rounding directly, + ** otherwise use printf. + */ + if( n==0 && r>=0 && r<LARGEST_INT64-1 ){ + r = (double)((sqlite_int64)(r+0.5)); + }else if( n==0 && r<0 && (-r)<LARGEST_INT64-1 ){ + r = -(double)((sqlite_int64)((-r)+0.5)); }else{ + zBuf = sqlite3_mprintf("%.*f",n,r); + if( zBuf==0 ){ + sqlite3_result_error_nomem(context); + return; + } sqlite3AtoF(zBuf, &r); sqlite3_free(zBuf); - sqlite3_result_double(context, r); } + sqlite3_result_double(context, r); } #endif @@ -71444,12 +72608,18 @@ static void last_insert_rowid( ){ sqlite3 *db = sqlite3_context_db_handle(context); UNUSED_PARAMETER2(NotUsed, NotUsed2); + /* IMP: R-51513-12026 The last_insert_rowid() SQL function is a + ** wrapper around the sqlite3_last_insert_rowid() C/C++ interface + ** function. */ sqlite3_result_int64(context, sqlite3_last_insert_rowid(db)); } /* -** Implementation of the changes() SQL function. The return value is the -** same as the sqlite3_changes() API function. +** Implementation of the changes() SQL function. +** +** IMP: R-62073-11209 The changes() SQL function is a wrapper +** around the sqlite3_changes() C/C++ function and hence follows the same +** rules for counting changes. */ static void changes( sqlite3_context *context, @@ -71472,6 +72642,8 @@ static void total_changes( ){ sqlite3 *db = sqlite3_context_db_handle(context); UNUSED_PARAMETER2(NotUsed, NotUsed2); + /* IMP: R-52756-41993 This function is a wrapper around the + ** sqlite3_total_changes() C/C++ interface. */ sqlite3_result_int(context, sqlite3_total_changes(db)); } @@ -71739,7 +72911,9 @@ static void versionFunc( sqlite3_value **NotUsed2 ){ UNUSED_PARAMETER2(NotUsed, NotUsed2); - sqlite3_result_text(context, sqlite3_version, -1, SQLITE_STATIC); + /* IMP: R-48699-48617 This function is an SQL wrapper around the + ** sqlite3_libversion() C-interface. */ + sqlite3_result_text(context, sqlite3_libversion(), -1, SQLITE_STATIC); } /* @@ -71753,8 +72927,53 @@ static void sourceidFunc( sqlite3_value **NotUsed2 ){ UNUSED_PARAMETER2(NotUsed, NotUsed2); - sqlite3_result_text(context, SQLITE_SOURCE_ID, -1, SQLITE_STATIC); + /* IMP: R-24470-31136 This function is an SQL wrapper around the + ** sqlite3_sourceid() C interface. */ + sqlite3_result_text(context, sqlite3_sourceid(), -1, SQLITE_STATIC); +} + +/* +** Implementation of the sqlite_compileoption_used() function. +** The result is an integer that identifies if the compiler option +** was used to build SQLite. +*/ +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS +static void compileoptionusedFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + const char *zOptName; + assert( argc==1 ); + UNUSED_PARAMETER(argc); + /* IMP: R-xxxx This function is an SQL wrapper around the + ** sqlite3_compileoption_used() C interface. */ + if( (zOptName = (const char*)sqlite3_value_text(argv[0]))!=0 ){ + sqlite3_result_int(context, sqlite3_compileoption_used(zOptName)); + } } +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ + +/* +** Implementation of the sqlite_compileoption_get() function. +** The result is a string that identifies the compiler options +** used to build SQLite. +*/ +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS +static void compileoptiongetFunc( + sqlite3_context *context, + int argc, + sqlite3_value **argv +){ + int n; + assert( argc==1 ); + UNUSED_PARAMETER(argc); + /* IMP: R-xxxx This function is an SQL wrapper around the + ** sqlite3_compileoption_get() C interface. */ + n = sqlite3_value_int(argv[0]); + sqlite3_result_text(context, sqlite3_compileoption_get(n), -1, SQLITE_STATIC); +} +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ /* Array for converting from half-bytes (nybbles) into ASCII hex ** digits. */ @@ -71882,7 +73101,7 @@ static void zeroblobFunc( if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){ sqlite3_result_error_toobig(context); }else{ - sqlite3_result_zeroblob(context, (int)n); + sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */ } } @@ -72487,6 +73706,10 @@ SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void){ FUNCTION(nullif, 2, 0, 1, nullifFunc ), FUNCTION(sqlite_version, 0, 0, 0, versionFunc ), FUNCTION(sqlite_source_id, 0, 0, 0, sourceidFunc ), +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS + FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc ), + FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc ), +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ FUNCTION(quote, 1, 0, 0, quoteFunc ), FUNCTION(last_insert_rowid, 0, 0, 0, last_insert_rowid), FUNCTION(changes, 0, 0, 0, changes ), @@ -74986,19 +76209,33 @@ SQLITE_PRIVATE void sqlite3GenerateConstraintChecks( ** the triggers and remove both the table and index b-tree entries. ** ** Otherwise, if there are no triggers or the recursive-triggers - ** flag is not set, call GenerateRowIndexDelete(). This removes - ** the index b-tree entries only. The table b-tree entry will be - ** replaced by the new entry when it is inserted. */ + ** flag is not set, but the table has one or more indexes, call + ** GenerateRowIndexDelete(). This removes the index b-tree entries + ** only. The table b-tree entry will be replaced by the new entry + ** when it is inserted. + ** + ** If either GenerateRowDelete() or GenerateRowIndexDelete() is called, + ** also invoke MultiWrite() to indicate that this VDBE may require + ** statement rollback (if the statement is aborted after the delete + ** takes place). Earlier versions called sqlite3MultiWrite() regardless, + ** but being more selective here allows statements like: + ** + ** REPLACE INTO t(rowid) VALUES($newrowid) + ** + ** to run without a statement journal if there are no indexes on the + ** table. + */ Trigger *pTrigger = 0; if( pParse->db->flags&SQLITE_RecTriggers ){ pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0); } - sqlite3MultiWrite(pParse); if( pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0) ){ + sqlite3MultiWrite(pParse); sqlite3GenerateRowDelete( pParse, pTab, baseCur, regRowid, 0, pTrigger, OE_Replace ); - }else{ + }else if( pTab->pIndex ){ + sqlite3MultiWrite(pParse); sqlite3GenerateRowIndexDelete(pParse, pTab, baseCur, 0); } seenReplace = 1; @@ -75440,7 +76677,7 @@ static int xferOptimization( } } #ifndef SQLITE_OMIT_CHECK - if( pDest->pCheck && !sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){ + if( pDest->pCheck && sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){ return 0; /* Tables have different CHECK constraints. Ticket #2252 */ } #endif @@ -75583,6 +76820,7 @@ SQLITE_API int sqlite3_exec( int nRetry = 0; /* Number of retry attempts */ int callbackIsInit; /* True if callback data is initialized */ + if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT; if( zSql==0 ) zSql = ""; sqlite3_mutex_enter(db->mutex); @@ -76964,6 +78202,7 @@ SQLITE_PRIVATE void sqlite3Pragma( Db *pDb; Vdbe *v = pParse->pVdbe = sqlite3VdbeCreate(db); if( v==0 ) return; + sqlite3VdbeRunOnlyOnce(v); pParse->nMem = 2; /* Interpret the [database.] part of the pragma statement. iDb is the @@ -77096,6 +78335,31 @@ SQLITE_PRIVATE void sqlite3Pragma( }else /* + ** PRAGMA [database.]secure_delete + ** PRAGMA [database.]secure_delete=ON/OFF + ** + ** The first form reports the current setting for the + ** secure_delete flag. The second form changes the secure_delete + ** flag setting and reports thenew value. + */ + if( sqlite3StrICmp(zLeft,"secure_delete")==0 ){ + Btree *pBt = pDb->pBt; + int b = -1; + assert( pBt!=0 ); + if( zRight ){ + b = getBoolean(zRight); + } + if( pId2->n==0 && b>=0 ){ + int ii; + for(ii=0; ii<db->nDb; ii++){ + sqlite3BtreeSecureDelete(db->aDb[ii].pBt, b); + } + } + b = sqlite3BtreeSecureDelete(pBt, b); + returnSingleInt(pParse, "secure_delete", b); + }else + + /* ** PRAGMA [database.]page_count ** ** Return the number of pages in the specified database. @@ -78013,6 +79277,26 @@ SQLITE_PRIVATE void sqlite3Pragma( }else #endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */ +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS + /* + ** PRAGMA compile_options + ** + ** Return the names of all compile-time options used in this build, + ** one option per row. + */ + if( sqlite3StrICmp(zLeft, "compile_options")==0 ){ + int i = 0; + const char *zOpt; + sqlite3VdbeSetNumCols(v, 1); + pParse->nMem = 1; + sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "compile_option", SQLITE_STATIC); + while( (zOpt = sqlite3_compileoption_get(i++))!=0 ){ + sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zOpt, 0); + sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1); + } + }else +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ + #if defined(SQLITE_DEBUG) || defined(SQLITE_TEST) /* ** Report the current state of file logs for all databases @@ -78047,7 +79331,7 @@ SQLITE_PRIVATE void sqlite3Pragma( }else #endif -#if SQLITE_HAS_CODEC +#ifdef SQLITE_HAS_CODEC if( sqlite3StrICmp(zLeft, "key")==0 && zRight ){ sqlite3_key(db, zRight, sqlite3Strlen30(zRight)); }else @@ -78070,17 +79354,15 @@ SQLITE_PRIVATE void sqlite3Pragma( } }else #endif -#if SQLITE_HAS_CODEC || defined(SQLITE_ENABLE_CEROD) +#if defined(SQLITE_HAS_CODEC) || defined(SQLITE_ENABLE_CEROD) if( sqlite3StrICmp(zLeft, "activate_extensions")==0 ){ -#if SQLITE_HAS_CODEC +#ifdef SQLITE_HAS_CODEC if( sqlite3StrNICmp(zRight, "see-", 4)==0 ){ - extern void sqlite3_activate_see(const char*); sqlite3_activate_see(&zRight[4]); } #endif #ifdef SQLITE_ENABLE_CEROD if( sqlite3StrNICmp(zRight, "cerod-", 6)==0 ){ - extern void sqlite3_activate_cerod(const char*); sqlite3_activate_cerod(&zRight[6]); } #endif @@ -78090,12 +79372,6 @@ SQLITE_PRIVATE void sqlite3Pragma( {/* Empty ELSE clause */} - /* Code an OP_Expire at the end of each PRAGMA program to cause - ** the VDBE implementing the pragma to expire. Most (all?) pragmas - ** are only valid for a single execution. - */ - sqlite3VdbeAddOp2(v, OP_Expire, 1, 0); - /* ** Reset the safety level, in case the fullfsync flag or synchronous ** setting changed. @@ -78308,9 +79584,7 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){ initData.iDb = iDb; initData.rc = SQLITE_OK; initData.pzErrMsg = pzErrMsg; - (void)sqlite3SafetyOff(db); sqlite3InitCallback(&initData, 3, (char **)azArg, 0); - (void)sqlite3SafetyOn(db); if( initData.rc ){ rc = initData.rc; goto error_out; @@ -78431,9 +79705,8 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){ { char *zSql; zSql = sqlite3MPrintf(db, - "SELECT name, rootpage, sql FROM '%q'.%s", + "SELECT name, rootpage, sql FROM '%q'.%s ORDER BY rowid", db->aDb[iDb].zName, zMasterName); - (void)sqlite3SafetyOff(db); #ifndef SQLITE_OMIT_AUTHORIZATION { int (*xAuth)(void*,int,const char*,const char*,const char*,const char*); @@ -78446,7 +79719,6 @@ static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){ } #endif if( rc==SQLITE_OK ) rc = initData.rc; - (void)sqlite3SafetyOn(db); sqlite3DbFree(db, zSql); #ifndef SQLITE_OMIT_ANALYZE if( rc==SQLITE_OK ){ @@ -78655,11 +79927,6 @@ static int sqlite3Prepare( goto end_prepare; } pParse->pReprepare = pReprepare; - - if( sqlite3SafetyOn(db) ){ - rc = SQLITE_MISUSE; - goto end_prepare; - } assert( ppStmt && *ppStmt==0 ); assert( !db->mallocFailed ); assert( sqlite3_mutex_held(db->mutex) ); @@ -78695,7 +79962,6 @@ static int sqlite3Prepare( if( rc ){ const char *zDb = db->aDb[i].zName; sqlite3Error(db, rc, "database schema is locked: %s", zDb); - (void)sqlite3SafetyOff(db); testcase( db->flags & SQLITE_ReadUncommitted ); goto end_prepare; } @@ -78712,7 +79978,6 @@ static int sqlite3Prepare( testcase( nBytes==mxLen+1 ); if( nBytes>mxLen ){ sqlite3Error(db, SQLITE_TOOBIG, "statement too long"); - (void)sqlite3SafetyOff(db); rc = sqlite3ApiExit(db, SQLITE_TOOBIG); goto end_prepare; } @@ -78769,10 +80034,6 @@ static int sqlite3Prepare( } #endif - if( sqlite3SafetyOff(db) ){ - rc = SQLITE_MISUSE; - } - assert( db->init.busy==0 || saveSqlFlag==0 ); if( db->init.busy==0 ){ Vdbe *pVdbe = pParse->pVdbe; @@ -78820,7 +80081,7 @@ static int sqlite3LockAndPrepare( assert( ppStmt!=0 ); *ppStmt = 0; if( !sqlite3SafetyCheckOk(db) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } sqlite3_mutex_enter(db->mutex); sqlite3BtreeEnterAll(db); @@ -78859,7 +80120,7 @@ SQLITE_PRIVATE int sqlite3Reprepare(Vdbe *p){ db->mallocFailed = 1; } assert( pNew==0 ); - return (rc==SQLITE_LOCKED) ? SQLITE_LOCKED : SQLITE_SCHEMA; + return rc; }else{ assert( pNew!=0 ); } @@ -78928,10 +80189,10 @@ static int sqlite3Prepare16( assert( ppStmt ); *ppStmt = 0; if( !sqlite3SafetyCheckOk(db) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } sqlite3_mutex_enter(db->mutex); - zSql8 = sqlite3Utf16to8(db, zSql, nBytes); + zSql8 = sqlite3Utf16to8(db, zSql, nBytes, SQLITE_UTF16NATIVE); if( zSql8 ){ rc = sqlite3LockAndPrepare(db, zSql8, -1, saveSqlFlag, 0, ppStmt, &zTail8); } @@ -82316,18 +83577,19 @@ static int selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){ struct SrcList_item *pFrom; assert( p->selFlags & SF_Resolved ); - assert( (p->selFlags & SF_HasTypeInfo)==0 ); - p->selFlags |= SF_HasTypeInfo; - pParse = pWalker->pParse; - pTabList = p->pSrc; - for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){ - Table *pTab = pFrom->pTab; - if( ALWAYS(pTab!=0) && (pTab->tabFlags & TF_Ephemeral)!=0 ){ - /* A sub-query in the FROM clause of a SELECT */ - Select *pSel = pFrom->pSelect; - assert( pSel ); - while( pSel->pPrior ) pSel = pSel->pPrior; - selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSel); + if( (p->selFlags & SF_HasTypeInfo)==0 ){ + p->selFlags |= SF_HasTypeInfo; + pParse = pWalker->pParse; + pTabList = p->pSrc; + for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){ + Table *pTab = pFrom->pTab; + if( ALWAYS(pTab!=0) && (pTab->tabFlags & TF_Ephemeral)!=0 ){ + /* A sub-query in the FROM clause of a SELECT */ + Select *pSel = pFrom->pSelect; + assert( pSel ); + while( pSel->pPrior ) pSel = pSel->pPrior; + selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSel); + } } } return WRC_Continue; @@ -83599,7 +84861,8 @@ SQLITE_PRIVATE void sqlite3BeginTrigger( goto trigger_cleanup; } pTab = sqlite3SrcListLookup(pParse, pTableName); - if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){ + if( db->init.busy==0 && pName2->n==0 && pTab + && pTab->pSchema==db->aDb[1].pSchema ){ iDb = 1; } @@ -83727,12 +84990,12 @@ SQLITE_PRIVATE void sqlite3FinishTrigger( TriggerStep *pStepList, /* The triggered program */ Token *pAll /* Token that describes the complete CREATE TRIGGER */ ){ - Trigger *pTrig = pParse->pNewTrigger; /* Trigger being finished */ - char *zName; /* Name of trigger */ - sqlite3 *db = pParse->db; /* The database */ - DbFixer sFix; - int iDb; /* Database containing the trigger */ - Token nameToken; /* Trigger name for error reporting */ + Trigger *pTrig = pParse->pNewTrigger; /* Trigger being finished */ + char *zName; /* Name of trigger */ + sqlite3 *db = pParse->db; /* The database */ + DbFixer sFix; /* Fixer object */ + int iDb; /* Database containing the trigger */ + Token nameToken; /* Trigger name for error reporting */ pTrig = pParse->pNewTrigger; pParse->pNewTrigger = 0; @@ -83751,7 +85014,7 @@ SQLITE_PRIVATE void sqlite3FinishTrigger( goto triggerfinish_cleanup; } - /* if we are not initializing, and this trigger is not on a TEMP table, + /* if we are not initializing, ** build the sqlite_master entry */ if( !db->init.busy ){ @@ -85251,27 +86514,41 @@ static void updateVirtualTable( #if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH) /* +** Finalize a prepared statement. If there was an error, store the +** text of the error message in *pzErrMsg. Return the result code. +*/ +static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){ + int rc; + rc = sqlite3VdbeFinalize((Vdbe*)pStmt); + if( rc ){ + sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db)); + } + return rc; +} + +/* ** Execute zSql on database db. Return an error code. */ -static int execSql(sqlite3 *db, const char *zSql){ +static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){ sqlite3_stmt *pStmt; VVA_ONLY( int rc; ) if( !zSql ){ return SQLITE_NOMEM; } if( SQLITE_OK!=sqlite3_prepare(db, zSql, -1, &pStmt, 0) ){ + sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db)); return sqlite3_errcode(db); } VVA_ONLY( rc = ) sqlite3_step(pStmt); assert( rc!=SQLITE_ROW ); - return sqlite3_finalize(pStmt); + return vacuumFinalize(db, pStmt, pzErrMsg); } /* ** Execute zSql on database db. The statement returns exactly ** one column. Execute this as SQL on the same database. */ -static int execExecSql(sqlite3 *db, const char *zSql){ +static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){ sqlite3_stmt *pStmt; int rc; @@ -85279,14 +86556,14 @@ static int execExecSql(sqlite3 *db, const char *zSql){ if( rc!=SQLITE_OK ) return rc; while( SQLITE_ROW==sqlite3_step(pStmt) ){ - rc = execSql(db, (char*)sqlite3_column_text(pStmt, 0)); + rc = execSql(db, pzErrMsg, (char*)sqlite3_column_text(pStmt, 0)); if( rc!=SQLITE_OK ){ - sqlite3_finalize(pStmt); + vacuumFinalize(db, pStmt, pzErrMsg); return rc; } } - return sqlite3_finalize(pStmt); + return vacuumFinalize(db, pStmt, pzErrMsg); } /* @@ -85336,7 +86613,7 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ saved_nTotalChange = db->nTotalChange; saved_xTrace = db->xTrace; db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks; - db->flags &= ~SQLITE_ForeignKeys; + db->flags &= ~(SQLITE_ForeignKeys | SQLITE_ReverseOrder); db->xTrace = 0; pMain = db->aDb[0].pBt; @@ -85356,8 +86633,12 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ ** time to parse and run the PRAGMA to turn journalling off than it does ** to write the journal header file. */ - zSql = "ATTACH '' AS vacuum_db;"; - rc = execSql(db, zSql); + if( sqlite3TempInMemory(db) ){ + zSql = "ATTACH ':memory:' AS vacuum_db;"; + }else{ + zSql = "ATTACH '' AS vacuum_db;"; + } + rc = execSql(db, pzErrMsg, zSql); if( rc!=SQLITE_OK ) goto end_of_vacuum; pDb = &db->aDb[db->nDb-1]; assert( strcmp(db->aDb[db->nDb-1].zName,"vacuum_db")==0 ); @@ -85389,7 +86670,7 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ rc = SQLITE_NOMEM; goto end_of_vacuum; } - rc = execSql(db, "PRAGMA vacuum_db.synchronous=OFF"); + rc = execSql(db, pzErrMsg, "PRAGMA vacuum_db.synchronous=OFF"); if( rc!=SQLITE_OK ){ goto end_of_vacuum; } @@ -85400,23 +86681,23 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ #endif /* Begin a transaction */ - rc = execSql(db, "BEGIN EXCLUSIVE;"); + rc = execSql(db, pzErrMsg, "BEGIN EXCLUSIVE;"); if( rc!=SQLITE_OK ) goto end_of_vacuum; /* Query the schema of the main database. Create a mirror schema ** in the temporary database. */ - rc = execExecSql(db, + rc = execExecSql(db, pzErrMsg, "SELECT 'CREATE TABLE vacuum_db.' || substr(sql,14) " " FROM sqlite_master WHERE type='table' AND name!='sqlite_sequence'" " AND rootpage>0" ); if( rc!=SQLITE_OK ) goto end_of_vacuum; - rc = execExecSql(db, + rc = execExecSql(db, pzErrMsg, "SELECT 'CREATE INDEX vacuum_db.' || substr(sql,14)" " FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' "); if( rc!=SQLITE_OK ) goto end_of_vacuum; - rc = execExecSql(db, + rc = execExecSql(db, pzErrMsg, "SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21) " " FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'"); if( rc!=SQLITE_OK ) goto end_of_vacuum; @@ -85425,24 +86706,23 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ ** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy ** the contents to the temporary database. */ - rc = execExecSql(db, + rc = execExecSql(db, pzErrMsg, "SELECT 'INSERT INTO vacuum_db.' || quote(name) " "|| ' SELECT * FROM main.' || quote(name) || ';'" "FROM main.sqlite_master " "WHERE type = 'table' AND name!='sqlite_sequence' " " AND rootpage>0" - ); if( rc!=SQLITE_OK ) goto end_of_vacuum; /* Copy over the sequence table */ - rc = execExecSql(db, + rc = execExecSql(db, pzErrMsg, "SELECT 'DELETE FROM vacuum_db.' || quote(name) || ';' " "FROM vacuum_db.sqlite_master WHERE name='sqlite_sequence' " ); if( rc!=SQLITE_OK ) goto end_of_vacuum; - rc = execExecSql(db, + rc = execExecSql(db, pzErrMsg, "SELECT 'INSERT INTO vacuum_db.' || quote(name) " "|| ' SELECT * FROM main.' || quote(name) || ';' " "FROM vacuum_db.sqlite_master WHERE name=='sqlite_sequence';" @@ -85455,7 +86735,7 @@ SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){ ** associated storage, so all we have to do is copy their entries ** from the SQLITE_MASTER table. */ - rc = execSql(db, + rc = execSql(db, pzErrMsg, "INSERT INTO vacuum_db.sqlite_master " " SELECT type, name, tbl_name, rootpage, sql" " FROM main.sqlite_master" @@ -85667,16 +86947,7 @@ SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){ if( pVTab->nRef==0 ){ sqlite3_vtab *p = pVTab->pVtab; if( p ){ -#ifdef SQLITE_DEBUG - if( pVTab->db->magic==SQLITE_MAGIC_BUSY ){ - (void)sqlite3SafetyOff(db); - p->pModule->xDisconnect(p); - (void)sqlite3SafetyOn(db); - } else -#endif - { - p->pModule->xDisconnect(p); - } + p->pModule->xDisconnect(p); } sqlite3DbFree(db, pVTab); } @@ -86012,9 +87283,7 @@ static int vtabCallConstructor( db->pVTab = pTab; /* Invoke the virtual table constructor */ - (void)sqlite3SafetyOff(db); rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr); - (void)sqlite3SafetyOn(db); if( rc==SQLITE_NOMEM ) db->mallocFailed = 1; if( SQLITE_OK!=rc ){ @@ -86202,7 +87471,7 @@ SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){ if( !pTab ){ sqlite3Error(db, SQLITE_MISUSE, 0); sqlite3_mutex_leave(db->mutex); - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } assert( (pTab->tabFlags & TF_Virtual)!=0 ); @@ -86261,10 +87530,8 @@ SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){ VTable *p = vtabDisconnectAll(db, pTab); - rc = sqlite3SafetyOff(db); assert( rc==SQLITE_OK ); rc = p->pMod->pModule->xDestroy(p->pVtab); - (void)sqlite3SafetyOn(db); /* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */ if( rc==SQLITE_OK ){ @@ -86316,10 +87583,8 @@ static void callFinaliser(sqlite3 *db, int offset){ SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){ int i; int rc = SQLITE_OK; - int rcsafety; VTable **aVTrans = db->aVTrans; - rc = sqlite3SafetyOff(db); db->aVTrans = 0; for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){ int (*x)(sqlite3_vtab *); @@ -86332,11 +87597,6 @@ SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){ } } db->aVTrans = aVTrans; - rcsafety = sqlite3SafetyOn(db); - - if( rc==SQLITE_OK ){ - rc = rcsafety; - } return rc; } @@ -87159,7 +88419,7 @@ static int isLikeOrGlob( } assert( pLeft->iColumn!=(-1) ); /* Because IPK never has AFF_TEXT */ pColl = sqlite3ExprCollSeq(pParse, pLeft); - assert( pColl!=0 ); /* Every non-IPK column has a collating sequence */ + if( pColl==0 ) return 0; /* Happens when LHS has an undefined collation */ if( (pColl->type!=SQLITE_COLL_BINARY || *pnoCase) && (pColl->type!=SQLITE_COLL_NOCASE || !*pnoCase) ){ /* IMP: R-09003-32046 For the GLOB operator, the column must use the @@ -87602,7 +88862,7 @@ static void exprAnalyze( Expr *pExpr; /* The expression to be analyzed */ Bitmask prereqLeft; /* Prerequesites of the pExpr->pLeft */ Bitmask prereqAll; /* Prerequesites of pExpr */ - Bitmask extraRight = 0; /* */ + Bitmask extraRight = 0; /* Extra dependencies on LEFT JOIN */ Expr *pStr1 = 0; /* RHS of LIKE/GLOB operator */ int isComplete = 0; /* RHS of LIKE/GLOB ends with wildcard */ int noCase = 0; /* LIKE/GLOB distinguishes case */ @@ -87674,7 +88934,8 @@ static void exprAnalyze( pLeft = pDup->pLeft; pNew->leftCursor = pLeft->iTable; pNew->u.leftColumn = pLeft->iColumn; - pNew->prereqRight = prereqLeft; + testcase( (prereqLeft | extraRight) != prereqLeft ); + pNew->prereqRight = prereqLeft | extraRight; pNew->prereqAll = prereqAll; pNew->eOperator = operatorMask(pDup->op); } @@ -88264,12 +89525,10 @@ static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){ int i; int rc; - (void)sqlite3SafetyOff(pParse->db); WHERETRACE(("xBestIndex for %s\n", pTab->zName)); TRACE_IDX_INPUTS(p); rc = pVtab->pModule->xBestIndex(pVtab, p); TRACE_IDX_OUTPUTS(p); - (void)sqlite3SafetyOn(pParse->db); if( rc!=SQLITE_OK ){ if( rc==SQLITE_NOMEM ){ @@ -90899,7 +92158,7 @@ static const YYMINORTYPE yyzerominor = { 0 }; ** shifting non-terminals after a reduce. ** yy_default[] Default action for each state. */ -#define YY_ACTTAB_COUNT (1543) +#define YY_ACTTAB_COUNT (1550) static const YYACTIONTYPE yy_action[] = { /* 0 */ 313, 49, 556, 46, 147, 172, 628, 598, 55, 55, /* 10 */ 55, 55, 302, 53, 53, 53, 53, 52, 52, 51, @@ -91049,13 +92308,13 @@ static const YYACTIONTYPE yy_action[] = { /* 1450 */ 249, 389, 487, 486, 314, 164, 602, 79, 310, 240, /* 1460 */ 414, 373, 480, 163, 262, 371, 414, 162, 369, 602, /* 1470 */ 78, 212, 478, 26, 477, 602, 9, 161, 467, 363, - /* 1480 */ 141, 122, 339, 187, 119, 457, 348, 117, 347, 116, - /* 1490 */ 115, 114, 448, 112, 182, 320, 22, 433, 19, 432, - /* 1500 */ 431, 63, 428, 610, 193, 298, 597, 574, 572, 404, - /* 1510 */ 555, 552, 290, 281, 510, 499, 498, 497, 495, 380, - /* 1520 */ 356, 460, 256, 250, 345, 447, 306, 5, 570, 550, - /* 1530 */ 299, 211, 370, 401, 550, 508, 502, 501, 490, 527, - /* 1540 */ 525, 483, 238, + /* 1480 */ 141, 122, 339, 187, 119, 457, 348, 347, 117, 116, + /* 1490 */ 115, 112, 114, 448, 182, 22, 320, 433, 432, 431, + /* 1500 */ 19, 428, 610, 597, 574, 193, 572, 63, 298, 404, + /* 1510 */ 555, 552, 290, 281, 510, 460, 498, 499, 495, 447, + /* 1520 */ 356, 497, 256, 380, 306, 570, 5, 250, 345, 238, + /* 1530 */ 299, 550, 527, 490, 508, 525, 502, 401, 501, 963, + /* 1540 */ 211, 963, 483, 963, 963, 963, 963, 963, 963, 370, }; static const YYCODETYPE yy_lookahead[] = { /* 0 */ 19, 222, 223, 224, 225, 24, 1, 26, 77, 78, @@ -91206,18 +92465,18 @@ static const YYCODETYPE yy_lookahead[] = { /* 1450 */ 107, 150, 176, 176, 111, 156, 174, 175, 179, 116, /* 1460 */ 165, 18, 157, 156, 238, 157, 165, 156, 45, 174, /* 1470 */ 175, 157, 157, 135, 239, 174, 175, 156, 189, 157, - /* 1480 */ 68, 189, 139, 219, 22, 199, 157, 192, 18, 192, - /* 1490 */ 192, 192, 199, 189, 219, 157, 243, 40, 243, 157, - /* 1500 */ 157, 246, 38, 153, 196, 198, 166, 233, 233, 228, - /* 1510 */ 177, 177, 209, 177, 182, 177, 166, 177, 166, 178, - /* 1520 */ 242, 199, 242, 209, 209, 199, 148, 196, 166, 208, - /* 1530 */ 195, 236, 237, 191, 208, 183, 183, 183, 186, 174, - /* 1540 */ 174, 186, 92, + /* 1480 */ 68, 189, 139, 219, 22, 199, 157, 18, 192, 192, + /* 1490 */ 192, 189, 192, 199, 219, 243, 157, 40, 157, 157, + /* 1500 */ 243, 38, 153, 166, 233, 196, 233, 246, 198, 228, + /* 1510 */ 177, 177, 209, 177, 182, 199, 166, 177, 166, 199, + /* 1520 */ 242, 177, 242, 178, 148, 166, 196, 209, 209, 92, + /* 1530 */ 195, 208, 174, 186, 183, 174, 183, 191, 183, 253, + /* 1540 */ 236, 253, 186, 253, 253, 253, 253, 253, 253, 237, }; #define YY_SHIFT_USE_DFLT (-90) #define YY_SHIFT_COUNT (418) #define YY_SHIFT_MIN (-89) -#define YY_SHIFT_MAX (1470) +#define YY_SHIFT_MAX (1469) static const short yy_shift_ofst[] = { /* 0 */ 993, 1114, 1343, 1114, 1213, 1213, 90, 90, 0, -19, /* 10 */ 1213, 1213, 1213, 1213, 1213, 352, 517, 721, 1091, 1213, @@ -91232,7 +92491,7 @@ static const short yy_shift_ofst[] = { /* 100 */ 1017, -69, -69, -69, -69, -1, -1, 58, 138, -44, /* 110 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, /* 120 */ 517, 517, 517, 517, 517, 517, 202, 579, 517, 517, - /* 130 */ 517, 517, 517, 382, 885, 1450, -90, -90, -90, 1293, + /* 130 */ 517, 517, 517, 382, 885, 1437, -90, -90, -90, 1293, /* 140 */ 73, 272, 272, 309, 311, 297, 282, 216, 602, 538, /* 150 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, /* 160 */ 517, 517, 517, 517, 517, 517, 517, 517, 517, 517, @@ -91243,8 +92502,8 @@ static const short yy_shift_ofst[] = { /* 210 */ 149, 604, 516, 149, 149, 508, 3, 299, 677, 871, /* 220 */ 613, 613, 879, 871, 879, 144, 382, 226, 382, 226, /* 230 */ 564, 226, 613, 226, 226, 404, 625, 625, 382, 426, - /* 240 */ -89, 801, 1464, 1244, 1244, 1457, 1457, 1244, 1462, 1412, - /* 250 */ 1188, 1470, 1470, 1470, 1470, 1244, 1188, 1462, 1412, 1412, + /* 240 */ -89, 801, 1463, 1244, 1244, 1457, 1457, 1244, 1462, 1412, + /* 250 */ 1188, 1469, 1469, 1469, 1469, 1244, 1188, 1462, 1412, 1412, /* 260 */ 1244, 1443, 1338, 1423, 1244, 1244, 1443, 1244, 1443, 1244, /* 270 */ 1443, 1414, 1306, 1306, 1306, 1365, 1348, 1348, 1414, 1306, /* 280 */ 1317, 1306, 1365, 1306, 1306, 1267, 1268, 1267, 1268, 1267, @@ -91265,7 +92524,7 @@ static const short yy_shift_ofst[] = { #define YY_REDUCE_USE_DFLT (-222) #define YY_REDUCE_COUNT (312) #define YY_REDUCE_MIN (-221) -#define YY_REDUCE_MAX (1378) +#define YY_REDUCE_MAX (1376) static const short yy_reduce_ofst[] = { /* 0 */ 310, 994, 1134, 221, 169, 157, 89, 18, 83, 301, /* 10 */ 377, 316, 312, 16, 295, 238, 249, 391, 1301, 1295, @@ -91286,13 +92545,13 @@ static const short yy_reduce_ofst[] = { /* 160 */ 1084, 1066, 1049, 1011, 1010, 1006, 1002, 999, 998, 973, /* 170 */ 972, 970, 966, 964, 895, 894, 892, 833, 822, 762, /* 180 */ 761, 229, 811, 804, 803, 389, 688, 808, 807, 737, - /* 190 */ 460, 464, 572, 584, 1355, 1366, 1365, 1352, 1354, 1353, - /* 200 */ 1352, 1326, 1335, 1342, 1335, 1335, 1335, 1335, 1335, 1335, - /* 210 */ 1335, 1295, 1295, 1335, 1335, 1321, 1362, 1331, 1378, 1326, - /* 220 */ 1315, 1314, 1280, 1322, 1278, 1341, 1352, 1340, 1350, 1338, - /* 230 */ 1332, 1336, 1303, 1334, 1333, 1281, 1275, 1274, 1340, 1307, - /* 240 */ 1308, 1350, 1255, 1343, 1342, 1255, 1253, 1338, 1275, 1304, - /* 250 */ 1293, 1299, 1298, 1297, 1295, 1329, 1286, 1264, 1292, 1289, + /* 190 */ 460, 464, 572, 584, 1356, 1361, 1358, 1347, 1355, 1353, + /* 200 */ 1351, 1323, 1335, 1346, 1335, 1335, 1335, 1335, 1335, 1335, + /* 210 */ 1335, 1312, 1304, 1335, 1335, 1323, 1359, 1330, 1376, 1320, + /* 220 */ 1319, 1318, 1280, 1316, 1278, 1345, 1352, 1344, 1350, 1340, + /* 230 */ 1332, 1336, 1303, 1334, 1333, 1281, 1273, 1271, 1337, 1310, + /* 240 */ 1309, 1349, 1261, 1342, 1341, 1257, 1252, 1339, 1275, 1302, + /* 250 */ 1294, 1300, 1298, 1297, 1296, 1329, 1286, 1264, 1292, 1289, /* 260 */ 1322, 1321, 1235, 1226, 1315, 1314, 1311, 1308, 1307, 1305, /* 270 */ 1299, 1279, 1277, 1276, 1270, 1258, 1211, 1209, 1250, 1259, /* 280 */ 1255, 1242, 1243, 1241, 1201, 1200, 1184, 1186, 1182, 1178, @@ -94786,6 +96045,7 @@ abort_parse: assert( pzErrMsg!=0 ); if( pParse->zErrMsg ){ *pzErrMsg = pParse->zErrMsg; + sqlite3_log(pParse->rc, "%s", *pzErrMsg); pParse->zErrMsg = 0; nErr++; } @@ -95464,7 +96724,7 @@ SQLITE_API int sqlite3_config(int op, ...){ /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while ** the SQLite library is in use. */ - if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE; + if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE_BKPT; va_start(ap, op); switch( op ){ @@ -95585,6 +96845,21 @@ SQLITE_API int sqlite3_config(int op, ...){ sqlite3GlobalConfig.nLookaside = va_arg(ap, int); break; } + + /* Record a pointer to the logger funcction and its first argument. + ** The default is NULL. Logging is disabled if the function pointer is + ** NULL. + */ + case SQLITE_CONFIG_LOG: { + /* MSVC is picky about pulling func ptrs from va lists. + ** http://support.microsoft.com/kb/47961 + ** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*)); + */ + typedef void(*LOGFUNC_t)(void*,int,const char*); + sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t); + sqlite3GlobalConfig.pLogArg = va_arg(ap, void*); + break; + } default: { rc = SQLITE_ERROR; @@ -95798,7 +97073,7 @@ SQLITE_API int sqlite3_close(sqlite3 *db){ return SQLITE_OK; } if( !sqlite3SafetyCheckSickOrOk(db) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } sqlite3_mutex_enter(db->mutex); @@ -96145,7 +97420,7 @@ SQLITE_PRIVATE int sqlite3CreateFunc( (!xFunc && (!xFinal && xStep)) || (nArg<-1 || nArg>SQLITE_MAX_FUNCTION_ARG) || (255<(nName = sqlite3Strlen30( zFunctionName))) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } #ifndef SQLITE_OMIT_UTF16 @@ -96242,7 +97517,7 @@ SQLITE_API int sqlite3_create_function16( char *zFunc8; sqlite3_mutex_enter(db->mutex); assert( !db->mallocFailed ); - zFunc8 = sqlite3Utf16to8(db, zFunctionName, -1); + zFunc8 = sqlite3Utf16to8(db, zFunctionName, -1, SQLITE_UTF16NATIVE); rc = sqlite3CreateFunc(db, zFunc8, nArg, eTextRep, p, xFunc, xStep, xFinal); sqlite3DbFree(db, zFunc8); rc = sqlite3ApiExit(db, rc); @@ -96476,7 +97751,7 @@ SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){ return sqlite3ErrStr(SQLITE_NOMEM); } if( !sqlite3SafetyCheckSickOrOk(db) ){ - return sqlite3ErrStr(SQLITE_MISUSE); + return sqlite3ErrStr(SQLITE_MISUSE_BKPT); } sqlite3_mutex_enter(db->mutex); if( db->mallocFailed ){ @@ -96545,7 +97820,7 @@ SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){ */ SQLITE_API int sqlite3_errcode(sqlite3 *db){ if( db && !sqlite3SafetyCheckSickOrOk(db) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } if( !db || db->mallocFailed ){ return SQLITE_NOMEM; @@ -96554,7 +97829,7 @@ SQLITE_API int sqlite3_errcode(sqlite3 *db){ } SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){ if( db && !sqlite3SafetyCheckSickOrOk(db) ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } if( !db || db->mallocFailed ){ return SQLITE_NOMEM; @@ -96592,7 +97867,7 @@ static int createCollation( enc2 = SQLITE_UTF16NATIVE; } if( enc2<SQLITE_UTF8 || enc2>SQLITE_UTF16BE ){ - return SQLITE_MISUSE; + return SQLITE_MISUSE_BKPT; } /* Check if this call is removing or replacing an existing collation @@ -97065,7 +98340,7 @@ SQLITE_API int sqlite3_create_collation16( char *zName8; sqlite3_mutex_enter(db->mutex); assert( !db->mallocFailed ); - zName8 = sqlite3Utf16to8(db, zName, -1); + zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE); if( zName8 ){ rc = createCollation(db, zName8, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, 0); sqlite3DbFree(db, zName8); @@ -97136,16 +98411,34 @@ SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){ return db->autoCommit; } -#ifdef SQLITE_DEBUG /* -** The following routine is subtituted for constant SQLITE_CORRUPT in -** debugging builds. This provides a way to set a breakpoint for when -** corruption is first detected. +** The following routines are subtitutes for constants SQLITE_CORRUPT, +** SQLITE_MISUSE, SQLITE_CANTOPEN, SQLITE_IOERR and possibly other error +** constants. They server two purposes: +** +** 1. Serve as a convenient place to set a breakpoint in a debugger +** to detect when version error conditions occurs. +** +** 2. Invoke sqlite3_log() to provide the source code location where +** a low-level error is first detected. */ -SQLITE_PRIVATE int sqlite3Corrupt(void){ +SQLITE_PRIVATE int sqlite3CorruptError(int lineno){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(SQLITE_CORRUPT, + "database corruption found by source line %d", lineno); return SQLITE_CORRUPT; } -#endif +SQLITE_PRIVATE int sqlite3MisuseError(int lineno){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(SQLITE_MISUSE, "misuse detected by source line %d", lineno); + return SQLITE_MISUSE; +} +SQLITE_PRIVATE int sqlite3CantopenError(int lineno){ + testcase( sqlite3GlobalConfig.xLog!=0 ); + sqlite3_log(SQLITE_CANTOPEN, "cannot open file at source line %d", lineno); + return SQLITE_CANTOPEN; +} + #ifndef SQLITE_OMIT_DEPRECATED /* @@ -97189,7 +98482,6 @@ SQLITE_API int sqlite3_table_column_metadata( /* Ensure the database schema has been loaded */ sqlite3_mutex_enter(db->mutex); - (void)sqlite3SafetyOn(db); sqlite3BtreeEnterAll(db); rc = sqlite3Init(db, &zErrMsg); if( SQLITE_OK!=rc ){ @@ -97248,7 +98540,6 @@ SQLITE_API int sqlite3_table_column_metadata( error_out: sqlite3BtreeLeaveAll(db); - (void)sqlite3SafetyOff(db); /* Whether the function call succeeded or failed, set the output parameters ** to whatever their local counterparts contain. If an error did occur, @@ -97887,9 +99178,6 @@ SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){ ** SQLite (in which case SQLITE_ENABLE_FTS3 is defined). */ -/* TODO(shess) Consider exporting this comment to an HTML file or the -** wiki. -*/ /* The full-text index is stored in a series of b+tree (-like) ** structures called segments which map terms to doclists. The ** structures are like b+trees in layout, but are constructed from the @@ -97912,13 +99200,27 @@ SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){ ** 21 bits - BBA ** and so on. ** -** This is identical to how sqlite encodes varints (see util.c). +** This is similar in concept to how sqlite encodes "varints" but +** the encoding is not the same. SQLite varints are big-endian +** are are limited to 9 bytes in length whereas FTS3 varints are +** little-endian and can be upt to 10 bytes in length (in theory). +** +** Example encodings: +** +** 1: 0x01 +** 127: 0x7f +** 128: 0x81 0x00 ** ** **** Document lists **** ** A doclist (document list) holds a docid-sorted list of hits for a ** given term. Doclists hold docids, and can optionally associate -** token positions and offsets with docids. +** token positions and offsets with docids. A position is the index +** of a word within the document. The first word of the document has +** a position of 0. +** +** FTS3 used to optionally store character offsets using a compile-time +** option. But that functionality is no longer supported. ** ** A DL_POSITIONS_OFFSETS doclist is stored like this: ** @@ -97926,16 +99228,12 @@ SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){ ** varint docid; ** array { (position list for column 0) ** varint position; (delta from previous position plus POS_BASE) -** varint startOffset; (delta from previous startOffset) -** varint endOffset; (delta from startOffset) ** } ** array { ** varint POS_COLUMN; (marks start of position list for new column) ** varint column; (index of new column) ** array { ** varint position; (delta from previous position plus POS_BASE) -** varint startOffset;(delta from previous startOffset) -** varint endOffset; (delta from startOffset) ** } ** } ** varint POS_END; (marks end of positions for this document. @@ -97943,10 +99241,23 @@ SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){ ** ** Here, array { X } means zero or more occurrences of X, adjacent in ** memory. A "position" is an index of a token in the token stream -** generated by the tokenizer, while an "offset" is a byte offset, -** both based at 0. Note that POS_END and POS_COLUMN occur in the -** same logical place as the position element, and act as sentinals -** ending a position list array. +** generated by the tokenizer. Note that POS_END and POS_COLUMN occur +** in the same logical place as the position element, and act as sentinals +** ending a position list array. POS_END is 0. POS_COLUMN is 1. +** The positions numbers are not stored literally but rather as two more +** the difference from the prior position, or the just the position plus +** 2 for the first position. Example: +** +** label: A B C D E F G H I J K +** value: 123 5 9 1 1 14 35 0 234 72 0 +** +** The 123 value is the first docid. For column zero in this document +** there are two matches at positions 3 and 10 (5-2 and 9-2+3). The 1 +** at D signals the start of a new column; the 1 at E indicates that the +** new column is column number 1. There are two positions at 12 and 45 +** (14-2 and 35-2+12). The 0 at H indicate the end-of-document. The +** 234 at I is the next docid. It has one position 72 (72-2) and then +** terminates with the 0 at K. ** ** A DL_POSITIONS doclist omits the startOffset and endOffset ** information. A DL_DOCIDS doclist omits both the position and @@ -98520,7 +99831,7 @@ struct Fts3Table { /* Precompiled statements used by the implementation. Each of these ** statements is run and reset within a single virtual table API call. */ - sqlite3_stmt *aStmt[18]; + sqlite3_stmt *aStmt[25]; /* Pointer to string containing the SQL: ** @@ -98534,6 +99845,8 @@ struct Fts3Table { sqlite3_stmt **aLeavesStmt; /* Array of prepared zSelectLeaves stmts */ int nNodeSize; /* Soft limit for node size */ + u8 bHasContent; /* True if %_content table exists */ + u8 bHasDocsize; /* True if %_docsize table exists */ /* The following hash table is used to buffer pending index updates during ** transactions. Variable nPendingData estimates the memory size of the @@ -98564,8 +99877,8 @@ struct Fts3Cursor { char *pNextId; /* Pointer into the body of aDoclist */ char *aDoclist; /* List of docids for full-text queries */ int nDoclist; /* Size of buffer at aDoclist */ - int isMatchinfoOk; /* True when aMatchinfo[] matches iPrevId */ - u32 *aMatchinfo; + int isMatchinfoNeeded; /* True when aMatchinfo[] needs filling in */ + u32 *aMatchinfo; /* Information about most recent match */ }; /* @@ -98671,6 +99984,8 @@ SQLITE_PRIVATE int sqlite3Fts3SegReaderIterate( ); SQLITE_PRIVATE int sqlite3Fts3ReadBlock(Fts3Table*, sqlite3_int64, char const**, int*); SQLITE_PRIVATE int sqlite3Fts3AllSegdirs(Fts3Table*, sqlite3_stmt **); +SQLITE_PRIVATE int sqlite3Fts3MatchinfoDocsizeLocal(Fts3Cursor*, u32*); +SQLITE_PRIVATE int sqlite3Fts3MatchinfoDocsizeGlobal(Fts3Cursor*, u32*); /* Flags allowed as part of the 4th argument to SegmentReaderIterate() */ #define FTS3_SEGMENT_REQUIRE_POS 0x00000001 @@ -98695,6 +100010,7 @@ SQLITE_PRIVATE void sqlite3Fts3Dequote(char *); SQLITE_PRIVATE char *sqlite3Fts3FindPositions(Fts3Expr *, sqlite3_int64, int); SQLITE_PRIVATE int sqlite3Fts3ExprLoadDoclist(Fts3Table *, Fts3Expr *); +SQLITE_PRIVATE int sqlite3Fts3ExprNearTrim(Fts3Expr *, Fts3Expr *, int); /* fts3_tokenizer.c */ SQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *, int *); @@ -98705,10 +100021,7 @@ SQLITE_PRIVATE int sqlite3Fts3InitTokenizer(Fts3Hash *pHash, /* fts3_snippet.c */ SQLITE_PRIVATE void sqlite3Fts3Offsets(sqlite3_context*, Fts3Cursor*); -SQLITE_PRIVATE void sqlite3Fts3Snippet(sqlite3_context*, Fts3Cursor*, - const char *, const char *, const char * -); -SQLITE_PRIVATE void sqlite3Fts3Snippet2(sqlite3_context *, Fts3Cursor *, const char *, +SQLITE_PRIVATE void sqlite3Fts3Snippet(sqlite3_context *, Fts3Cursor *, const char *, const char *, const char *, int, int ); SQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *, Fts3Cursor *); @@ -98828,12 +100141,23 @@ SQLITE_PRIVATE void sqlite3Fts3Dequote(char *z){ } } +/* +** Read a single varint from the doclist at *pp and advance *pp to point +** to the next element of the varlist. Add the value of the varint +** to *pVal. +*/ static void fts3GetDeltaVarint(char **pp, sqlite3_int64 *pVal){ sqlite3_int64 iVal; *pp += sqlite3Fts3GetVarint(*pp, &iVal); *pVal += iVal; } +/* +** As long as *pp has not reached its end (pEnd), then do the same +** as fts3GetDeltaVarint(): read a single varint and add it to *pVal. +** But if we have reached the end of the varint, just set *pp=0 and +** leave *pVal unchanged. +*/ static void fts3GetDeltaVarint2(char **pp, char *pEnd, sqlite3_int64 *pVal){ if( *pp>=pEnd ){ *pp = 0; @@ -98869,29 +100193,46 @@ static int fts3DisconnectMethod(sqlite3_vtab *pVtab){ } /* +** Construct one or more SQL statements from the format string given +** and then evaluate those statements. The success code is writting +** into *pRc. +** +** If *pRc is initially non-zero then this routine is a no-op. +*/ +void fts3DbExec( + int *pRc, /* Success code */ + sqlite3 *db, /* Database in which to run SQL */ + const char *zFormat, /* Format string for SQL */ + ... /* Arguments to the format string */ +){ + va_list ap; + char *zSql; + if( *pRc ) return; + va_start(ap, zFormat); + zSql = sqlite3_vmprintf(zFormat, ap); + va_end(ap); + if( zSql==0 ){ + *pRc = SQLITE_NOMEM; + }else{ + *pRc = sqlite3_exec(db, zSql, 0, 0, 0); + sqlite3_free(zSql); + } +} + +/* ** The xDestroy() virtual table method. */ static int fts3DestroyMethod(sqlite3_vtab *pVtab){ - int rc; /* Return code */ + int rc = SQLITE_OK; /* Return code */ Fts3Table *p = (Fts3Table *)pVtab; + sqlite3 *db = p->db; - /* Create a script to drop the underlying three storage tables. */ - char *zSql = sqlite3_mprintf( - "DROP TABLE IF EXISTS %Q.'%q_content';" - "DROP TABLE IF EXISTS %Q.'%q_segments';" - "DROP TABLE IF EXISTS %Q.'%q_segdir';", - p->zDb, p->zName, p->zDb, p->zName, p->zDb, p->zName - ); - - /* If malloc has failed, set rc to SQLITE_NOMEM. Otherwise, try to - ** execute the SQL script created above. - */ - if( zSql ){ - rc = sqlite3_exec(p->db, zSql, 0, 0, 0); - sqlite3_free(zSql); - }else{ - rc = SQLITE_NOMEM; - } + /* Drop the shadow tables */ + fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_content'", p->zDb, p->zName); + fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segments'", p->zDb,p->zName); + fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segdir'", p->zDb, p->zName); + fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_docsize'", p->zDb, p->zName); + fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_stat'", p->zDb, p->zName); /* If everything has worked, invoke fts3DisconnectMethod() to free the ** memory associated with the Fts3Table structure and return SQLITE_OK. @@ -98940,22 +100281,33 @@ static int fts3DeclareVtab(Fts3Table *p){ ** as part of the vtab xCreate() method. */ static int fts3CreateTables(Fts3Table *p){ - int rc; /* Return code */ + int rc = SQLITE_OK; /* Return code */ int i; /* Iterator variable */ char *zContentCols; /* Columns of %_content table */ - char *zSql; /* SQL script to create required tables */ + sqlite3 *db = p->db; /* The database connection */ /* Create a list of user columns for the content table */ - zContentCols = sqlite3_mprintf("docid INTEGER PRIMARY KEY"); - for(i=0; zContentCols && i<p->nColumn; i++){ - char *z = p->azColumn[i]; - zContentCols = sqlite3_mprintf("%z, 'c%d%q'", zContentCols, i, z); + if( p->bHasContent ){ + zContentCols = sqlite3_mprintf("docid INTEGER PRIMARY KEY"); + for(i=0; zContentCols && i<p->nColumn; i++){ + char *z = p->azColumn[i]; + zContentCols = sqlite3_mprintf("%z, 'c%d%q'", zContentCols, i, z); + } + if( zContentCols==0 ) rc = SQLITE_NOMEM; + + /* Create the content table */ + fts3DbExec(&rc, db, + "CREATE TABLE %Q.'%q_content'(%s)", + p->zDb, p->zName, zContentCols + ); + sqlite3_free(zContentCols); } - - /* Create the whole SQL script */ - zSql = sqlite3_mprintf( - "CREATE TABLE %Q.'%q_content'(%s);" - "CREATE TABLE %Q.'%q_segments'(blockid INTEGER PRIMARY KEY, block BLOB);" + /* Create other tables */ + fts3DbExec(&rc, db, + "CREATE TABLE %Q.'%q_segments'(blockid INTEGER PRIMARY KEY, block BLOB);", + p->zDb, p->zName + ); + fts3DbExec(&rc, db, "CREATE TABLE %Q.'%q_segdir'(" "level INTEGER," "idx INTEGER," @@ -98965,21 +100317,52 @@ static int fts3CreateTables(Fts3Table *p){ "root BLOB," "PRIMARY KEY(level, idx)" ");", - p->zDb, p->zName, zContentCols, p->zDb, p->zName, p->zDb, p->zName + p->zDb, p->zName ); - - /* Unless a malloc() failure has occurred, execute the SQL script to - ** create the tables used to store data for this FTS3 virtual table. - */ - if( zContentCols==0 || zSql==0 ){ - rc = SQLITE_NOMEM; - }else{ - rc = sqlite3_exec(p->db, zSql, 0, 0, 0); + if( p->bHasDocsize ){ + fts3DbExec(&rc, db, + "CREATE TABLE %Q.'%q_docsize'(docid INTEGER PRIMARY KEY, size BLOB);", + p->zDb, p->zName + ); + fts3DbExec(&rc, db, + "CREATE TABLE %Q.'%q_stat'(id INTEGER PRIMARY KEY, value BLOB);", + p->zDb, p->zName + ); } + return rc; +} + +/* +** An sqlite3_exec() callback for fts3TableExists. +*/ +static int fts3TableExistsCallback(void *pArg, int n, char **pp1, char **pp2){ + *(int*)pArg = 1; + return 1; +} +/* +** Determine if a table currently exists in the database. +*/ +static void fts3TableExists( + int *pRc, /* Success code */ + sqlite3 *db, /* The database connection to test */ + const char *zDb, /* ATTACHed database within the connection */ + const char *zName, /* Name of the FTS3 table */ + const char *zSuffix, /* Shadow table extension */ + u8 *pResult /* Write results here */ +){ + int rc = SQLITE_OK; + int res = 0; + char *zSql; + if( *pRc ) return; + zSql = sqlite3_mprintf( + "SELECT 1 FROM %Q.sqlite_master WHERE name='%q%s'", + zDb, zName, zSuffix + ); + rc = sqlite3_exec(db, zSql, fts3TableExistsCallback, &res, 0); sqlite3_free(zSql); - sqlite3_free(zContentCols); - return rc; + *pResult = res & 0xff; + if( rc!=SQLITE_ABORT ) *pRc = rc; } /* @@ -99098,9 +100481,15 @@ static int fts3InitVtab( ** database. TODO: For xConnect(), it could verify that said tables exist. */ if( isCreate ){ + p->bHasContent = 1; + p->bHasDocsize = argv[0][3]=='4'; rc = fts3CreateTables(p); - if( rc!=SQLITE_OK ) goto fts3_init_out; + }else{ + rc = SQLITE_OK; + fts3TableExists(&rc, db, argv[1], argv[2], "_content", &p->bHasContent); + fts3TableExists(&rc, db, argv[1], argv[2], "_docsize", &p->bHasDocsize); } + if( rc!=SQLITE_OK ) goto fts3_init_out; rc = fts3DeclareVtab(p); if( rc!=SQLITE_OK ) goto fts3_init_out; @@ -99222,12 +100611,6 @@ static int fts3OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){ return SQLITE_OK; } -/****************************************************************/ -/****************************************************************/ -/****************************************************************/ -/****************************************************************/ - - /* ** Close the cursor. For additional information see the documentation ** on the xClose method of the virtual table interface. @@ -99283,7 +100666,7 @@ static int fts3NextMethod(sqlite3_vtab_cursor *pCursor){ sqlite3_reset(pCsr->pStmt); fts3GetDeltaVarint(&pCsr->pNextId, &pCsr->iPrevId); pCsr->isRequireSeek = 1; - pCsr->isMatchinfoOk = 1; + pCsr->isMatchinfoNeeded = 1; } return rc; } @@ -99401,7 +100784,12 @@ static void fts3PutDeltaVarint( /* ** When this function is called, *ppPoslist is assumed to point to the -** start of a position-list. +** start of a position-list. After it returns, *ppPoslist points to the +** first byte after the position-list. +** +** If pp is not NULL, then the contents of the position list are copied +** to *pp. *pp is set to point to the first byte past the last byte copied +** before this function returns. */ static void fts3PoslistCopy(char **pp, char **ppPoslist){ char *pEnd = *ppPoslist; @@ -100149,6 +101537,74 @@ static int fts3PhraseSelect( return rc; } +static int fts3NearMerge( + int mergetype, /* MERGE_POS_NEAR or MERGE_NEAR */ + int nNear, /* Parameter to NEAR operator */ + int nTokenLeft, /* Number of tokens in LHS phrase arg */ + char *aLeft, /* Doclist for LHS (incl. positions) */ + int nLeft, /* Size of LHS doclist in bytes */ + int nTokenRight, /* As nTokenLeft */ + char *aRight, /* As aLeft */ + int nRight, /* As nRight */ + char **paOut, /* OUT: Results of merge (malloced) */ + int *pnOut /* OUT: Sized of output buffer */ +){ + char *aOut; + int rc; + + assert( mergetype==MERGE_POS_NEAR || MERGE_NEAR ); + + aOut = sqlite3_malloc(nLeft+nRight+1); + if( aOut==0 ){ + rc = SQLITE_NOMEM; + }else{ + rc = fts3DoclistMerge(mergetype, nNear+nTokenRight, nNear+nTokenLeft, + aOut, pnOut, aLeft, nLeft, aRight, nRight + ); + if( rc!=SQLITE_OK ){ + sqlite3_free(aOut); + aOut = 0; + } + } + + *paOut = aOut; + return rc; +} + +SQLITE_PRIVATE int sqlite3Fts3ExprNearTrim(Fts3Expr *pLeft, Fts3Expr *pRight, int nNear){ + int rc; + if( pLeft->aDoclist==0 || pRight->aDoclist==0 ){ + sqlite3_free(pLeft->aDoclist); + sqlite3_free(pRight->aDoclist); + pRight->aDoclist = 0; + pLeft->aDoclist = 0; + rc = SQLITE_OK; + }else{ + char *aOut; + int nOut; + + rc = fts3NearMerge(MERGE_POS_NEAR, nNear, + pLeft->pPhrase->nToken, pLeft->aDoclist, pLeft->nDoclist, + pRight->pPhrase->nToken, pRight->aDoclist, pRight->nDoclist, + &aOut, &nOut + ); + if( rc!=SQLITE_OK ) return rc; + sqlite3_free(pRight->aDoclist); + pRight->aDoclist = aOut; + pRight->nDoclist = nOut; + + rc = fts3NearMerge(MERGE_POS_NEAR, nNear, + pRight->pPhrase->nToken, pRight->aDoclist, pRight->nDoclist, + pLeft->pPhrase->nToken, pLeft->aDoclist, pLeft->nDoclist, + &aOut, &nOut + ); + sqlite3_free(pLeft->aDoclist); + pLeft->aDoclist = aOut; + pLeft->nDoclist = nOut; + } + return rc; +} + /* ** Evaluate the full-text expression pExpr against fts3 table pTab. Store ** the resulting doclist in *paOut and *pnOut. @@ -100193,9 +101649,6 @@ static int evalFts3Expr( Fts3Expr *pLeft; Fts3Expr *pRight; int mergetype = isReqPos ? MERGE_POS_NEAR : MERGE_NEAR; - int nParam1; - int nParam2; - char *aBuffer; if( pExpr->pParent && pExpr->pParent->eType==FTSQUERY_NEAR ){ mergetype = MERGE_POS_NEAR; @@ -100208,17 +101661,11 @@ static int evalFts3Expr( assert( pRight->eType==FTSQUERY_PHRASE ); assert( pLeft->eType==FTSQUERY_PHRASE ); - nParam1 = pExpr->nNear+1; - nParam2 = nParam1+pLeft->pPhrase->nToken+pRight->pPhrase->nToken-2; - aBuffer = sqlite3_malloc(nLeft+nRight+1); - rc = fts3DoclistMerge(mergetype, nParam1, nParam2, aBuffer, - pnOut, aLeft, nLeft, aRight, nRight + rc = fts3NearMerge(mergetype, pExpr->nNear, + pLeft->pPhrase->nToken, aLeft, nLeft, + pRight->pPhrase->nToken, aRight, nRight, + paOut, pnOut ); - if( rc!=SQLITE_OK ){ - sqlite3_free(aBuffer); - }else{ - *paOut = aBuffer; - } sqlite3_free(aLeft); break; } @@ -100333,7 +101780,13 @@ static int fts3FilterMethod( rc = sqlite3Fts3ExprParse(p->pTokenizer, p->azColumn, p->nColumn, iCol, zQuery, -1, &pCsr->pExpr ); - if( rc!=SQLITE_OK ) return rc; + if( rc!=SQLITE_OK ){ + if( rc==SQLITE_ERROR ){ + p->base.zErrMsg = sqlite3_mprintf("malformed MATCH expression: [%s]", + zQuery); + } + return rc; + } rc = evalFts3Expr(p, pCsr->pExpr, &pCsr->aDoclist, &pCsr->nDoclist, 0); pCsr->pNextId = pCsr->aDoclist; @@ -100469,7 +101922,7 @@ SQLITE_PRIVATE int sqlite3Fts3ExprLoadDoclist(Fts3Table *pTab, Fts3Expr *pExpr){ /* ** After ExprLoadDoclist() (see above) has been called, this function is -** used to iterate through the position lists that make up the doclist +** used to iterate/search through the position lists that make up the doclist ** stored in pExpr->aDoclist. */ SQLITE_PRIVATE char *sqlite3Fts3FindPositions( @@ -100486,7 +101939,9 @@ SQLITE_PRIVATE char *sqlite3Fts3FindPositions( while( pCsr<pEnd ){ if( pExpr->iCurrent<iDocid ){ fts3PoslistCopy(0, &pCsr); - fts3GetDeltaVarint(&pCsr, &pExpr->iCurrent); + if( pCsr<pEnd ){ + fts3GetDeltaVarint(&pCsr, &pExpr->iCurrent); + } pExpr->pCurrent = pCsr; }else{ if( pExpr->iCurrent==iDocid ){ @@ -100504,7 +101959,7 @@ SQLITE_PRIVATE char *sqlite3Fts3FindPositions( pCsr++; pCsr += sqlite3Fts3GetVarint32(pCsr, &iThis); } - if( iCol==iThis ) return pCsr; + if( iCol==iThis && (*pCsr&0xFE) ) return pCsr; } return 0; } @@ -100556,45 +102011,8 @@ static void fts3SnippetFunc( const char *zStart = "<b>"; const char *zEnd = "</b>"; const char *zEllipsis = "<b>...</b>"; - - /* There must be at least one argument passed to this function (otherwise - ** the non-overloaded version would have been called instead of this one). - */ - assert( nVal>=1 ); - - if( nVal>4 ){ - sqlite3_result_error(pContext, - "wrong number of arguments to function snippet()", -1); - return; - } - if( fts3FunctionArg(pContext, "snippet", apVal[0], &pCsr) ) return; - - switch( nVal ){ - case 4: zEllipsis = (const char*)sqlite3_value_text(apVal[3]); - case 3: zEnd = (const char*)sqlite3_value_text(apVal[2]); - case 2: zStart = (const char*)sqlite3_value_text(apVal[1]); - } - if( !zEllipsis || !zEnd || !zStart ){ - sqlite3_result_error_nomem(pContext); - }else if( SQLITE_OK==fts3CursorSeek(pContext, pCsr) ){ - sqlite3Fts3Snippet(pContext, pCsr, zStart, zEnd, zEllipsis); - } -} - -/* -** Implementation of the snippet2() function for FTS3 -*/ -static void fts3Snippet2Func( - sqlite3_context *pContext, /* SQLite function call context */ - int nVal, /* Size of apVal[] array */ - sqlite3_value **apVal /* Array of arguments */ -){ - Fts3Cursor *pCsr; /* Cursor handle passed through apVal[0] */ - const char *zStart = "<b>"; - const char *zEnd = "</b>"; - const char *zEllipsis = "<b>...</b>"; int iCol = -1; - int nToken = 10; + int nToken = 15; /* Default number of tokens in snippet */ /* There must be at least one argument passed to this function (otherwise ** the non-overloaded version would have been called instead of this one). @@ -100618,7 +102036,7 @@ static void fts3Snippet2Func( if( !zEllipsis || !zEnd || !zStart ){ sqlite3_result_error_nomem(pContext); }else if( SQLITE_OK==fts3CursorSeek(pContext, pCsr) ){ - sqlite3Fts3Snippet2(pContext, pCsr, zStart, zEnd, zEllipsis, iCol, nToken); + sqlite3Fts3Snippet(pContext, pCsr, zStart, zEnd, zEllipsis, iCol, nToken); } } @@ -100719,7 +102137,6 @@ static int fts3FindFunctionMethod( void (*xFunc)(sqlite3_context*,int,sqlite3_value**); } aOverload[] = { { "snippet", fts3SnippetFunc }, - { "snippet2", fts3Snippet2Func }, { "offsets", fts3OffsetsFunc }, { "optimize", fts3OptimizeFunc }, { "matchinfo", fts3MatchinfoFunc }, @@ -100748,22 +102165,35 @@ static int fts3RenameMethod( sqlite3_vtab *pVtab, /* Virtual table handle */ const char *zName /* New name of table */ ){ - Fts3Table *p = (Fts3Table *)pVtab; - int rc = SQLITE_NOMEM; /* Return Code */ - char *zSql; /* SQL script to run to rename tables */ + Fts3Table *p = (Fts3Table *)pVtab; + sqlite3 *db; /* Database connection */ + int rc; /* Return Code */ - zSql = sqlite3_mprintf( - "ALTER TABLE %Q.'%q_content' RENAME TO '%q_content';" - "ALTER TABLE %Q.'%q_segments' RENAME TO '%q_segments';" - "ALTER TABLE %Q.'%q_segdir' RENAME TO '%q_segdir';" - , p->zDb, p->zName, zName - , p->zDb, p->zName, zName - , p->zDb, p->zName, zName + db = p->db; + rc = SQLITE_OK; + fts3DbExec(&rc, db, + "ALTER TABLE %Q.'%q_content' RENAME TO '%q_content';", + p->zDb, p->zName, zName ); - if( zSql ){ - rc = sqlite3_exec(p->db, zSql, 0, 0, 0); - sqlite3_free(zSql); + if( rc==SQLITE_ERROR ) rc = SQLITE_OK; + if( p->bHasDocsize ){ + fts3DbExec(&rc, db, + "ALTER TABLE %Q.'%q_docsize' RENAME TO '%q_docsize';", + p->zDb, p->zName, zName + ); + fts3DbExec(&rc, db, + "ALTER TABLE %Q.'%q_stat' RENAME TO '%q_stat';", + p->zDb, p->zName, zName + ); } + fts3DbExec(&rc, db, + "ALTER TABLE %Q.'%q_segments' RENAME TO '%q_segments';", + p->zDb, p->zName, zName + ); + fts3DbExec(&rc, db, + "ALTER TABLE %Q.'%q_segdir' RENAME TO '%q_segdir';", + p->zDb, p->zName, zName + ); return rc; } @@ -100869,14 +102299,19 @@ SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){ if( SQLITE_OK==rc && SQLITE_OK==(rc = sqlite3Fts3InitHashTable(db, pHash, "fts3_tokenizer")) && SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet", -1)) - && SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet2", -1)) && SQLITE_OK==(rc = sqlite3_overload_function(db, "offsets", 1)) && SQLITE_OK==(rc = sqlite3_overload_function(db, "matchinfo", -1)) && SQLITE_OK==(rc = sqlite3_overload_function(db, "optimize", 1)) ){ - return sqlite3_create_module_v2( + rc = sqlite3_create_module_v2( db, "fts3", &fts3Module, (void *)pHash, hashDestroy ); + if( rc==SQLITE_OK ){ + rc = sqlite3_create_module_v2( + db, "fts4", &fts3Module, (void *)pHash, 0 + ); + } + return rc; } /* An error has occurred. Delete the hash table and return the error code. */ @@ -102806,9 +104241,11 @@ static int porterNext( if( c->iOffset>iStartOffset ){ int n = c->iOffset-iStartOffset; if( n>c->nAllocated ){ + char *pNew; c->nAllocated = n+20; - c->zToken = sqlite3_realloc(c->zToken, c->nAllocated); - if( c->zToken==NULL ) return SQLITE_NOMEM; + pNew = sqlite3_realloc(c->zToken, c->nAllocated); + if( !pNew ) return SQLITE_NOMEM; + c->zToken = pNew; } porter_stemmer(&z[iStartOffset], n, c->zToken, pnBytes); *pzToken = c->zToken; @@ -103519,9 +104956,11 @@ static int simpleNext( if( c->iOffset>iStartOffset ){ int i, n = c->iOffset-iStartOffset; if( n>c->nTokenAllocated ){ + char *pNew; c->nTokenAllocated = n+20; - c->pToken = sqlite3_realloc(c->pToken, c->nTokenAllocated); - if( c->pToken==NULL ) return SQLITE_NOMEM; + pNew = sqlite3_realloc(c->pToken, c->nTokenAllocated); + if( !pNew ) return SQLITE_NOMEM; + c->pToken = pNew; } for(i=0; i<n; i++){ /* TODO(shess) This needs expansion to handle UTF-8 @@ -103705,19 +105144,26 @@ struct SegmentNode { #define SQL_DELETE_ALL_CONTENT 2 #define SQL_DELETE_ALL_SEGMENTS 3 #define SQL_DELETE_ALL_SEGDIR 4 -#define SQL_SELECT_CONTENT_BY_ROWID 5 -#define SQL_NEXT_SEGMENT_INDEX 6 -#define SQL_INSERT_SEGMENTS 7 -#define SQL_NEXT_SEGMENTS_ID 8 -#define SQL_INSERT_SEGDIR 9 -#define SQL_SELECT_LEVEL 10 -#define SQL_SELECT_ALL_LEVEL 11 -#define SQL_SELECT_LEVEL_COUNT 12 -#define SQL_SELECT_SEGDIR_COUNT_MAX 13 -#define SQL_DELETE_SEGDIR_BY_LEVEL 14 -#define SQL_DELETE_SEGMENTS_RANGE 15 -#define SQL_CONTENT_INSERT 16 -#define SQL_GET_BLOCK 17 +#define SQL_DELETE_ALL_DOCSIZE 5 +#define SQL_DELETE_ALL_STAT 6 +#define SQL_SELECT_CONTENT_BY_ROWID 7 +#define SQL_NEXT_SEGMENT_INDEX 8 +#define SQL_INSERT_SEGMENTS 9 +#define SQL_NEXT_SEGMENTS_ID 10 +#define SQL_INSERT_SEGDIR 11 +#define SQL_SELECT_LEVEL 12 +#define SQL_SELECT_ALL_LEVEL 13 +#define SQL_SELECT_LEVEL_COUNT 14 +#define SQL_SELECT_SEGDIR_COUNT_MAX 15 +#define SQL_DELETE_SEGDIR_BY_LEVEL 16 +#define SQL_DELETE_SEGMENTS_RANGE 17 +#define SQL_CONTENT_INSERT 18 +#define SQL_GET_BLOCK 19 +#define SQL_DELETE_DOCSIZE 20 +#define SQL_REPLACE_DOCSIZE 21 +#define SQL_SELECT_DOCSIZE 22 +#define SQL_SELECT_DOCTOTAL 23 +#define SQL_REPLACE_DOCTOTAL 24 /* ** This function is used to obtain an SQLite prepared statement handle @@ -103742,25 +105188,32 @@ static int fts3SqlStmt( /* 2 */ "DELETE FROM %Q.'%q_content'", /* 3 */ "DELETE FROM %Q.'%q_segments'", /* 4 */ "DELETE FROM %Q.'%q_segdir'", -/* 5 */ "SELECT * FROM %Q.'%q_content' WHERE rowid=?", -/* 6 */ "SELECT coalesce(max(idx)+1, 0) FROM %Q.'%q_segdir' WHERE level=?", -/* 7 */ "INSERT INTO %Q.'%q_segments'(blockid, block) VALUES(?, ?)", -/* 8 */ "SELECT coalesce(max(blockid)+1, 1) FROM %Q.'%q_segments'", -/* 9 */ "INSERT INTO %Q.'%q_segdir' VALUES(?,?,?,?,?,?)", +/* 5 */ "DELETE FROM %Q.'%q_docsize'", +/* 6 */ "DELETE FROM %Q.'%q_stat'", +/* 7 */ "SELECT * FROM %Q.'%q_content' WHERE rowid=?", +/* 8 */ "SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1", +/* 9 */ "INSERT INTO %Q.'%q_segments'(blockid, block) VALUES(?, ?)", +/* 10 */ "SELECT coalesce((SELECT max(blockid) FROM %Q.'%q_segments') + 1, 1)", +/* 11 */ "INSERT INTO %Q.'%q_segdir' VALUES(?,?,?,?,?,?)", /* Return segments in order from oldest to newest.*/ -/* 10 */ "SELECT idx, start_block, leaves_end_block, end_block, root " +/* 12 */ "SELECT idx, start_block, leaves_end_block, end_block, root " "FROM %Q.'%q_segdir' WHERE level = ? ORDER BY idx ASC", -/* 11 */ "SELECT idx, start_block, leaves_end_block, end_block, root " +/* 13 */ "SELECT idx, start_block, leaves_end_block, end_block, root " "FROM %Q.'%q_segdir' ORDER BY level DESC, idx ASC", -/* 12 */ "SELECT count(*) FROM %Q.'%q_segdir' WHERE level = ?", -/* 13 */ "SELECT count(*), max(level) FROM %Q.'%q_segdir'", - -/* 14 */ "DELETE FROM %Q.'%q_segdir' WHERE level = ?", -/* 15 */ "DELETE FROM %Q.'%q_segments' WHERE blockid BETWEEN ? AND ?", -/* 16 */ "INSERT INTO %Q.'%q_content' VALUES(%z)", -/* 17 */ "SELECT block FROM %Q.'%q_segments' WHERE blockid = ?", +/* 14 */ "SELECT count(*) FROM %Q.'%q_segdir' WHERE level = ?", +/* 15 */ "SELECT count(*), max(level) FROM %Q.'%q_segdir'", + +/* 16 */ "DELETE FROM %Q.'%q_segdir' WHERE level = ?", +/* 17 */ "DELETE FROM %Q.'%q_segments' WHERE blockid BETWEEN ? AND ?", +/* 18 */ "INSERT INTO %Q.'%q_content' VALUES(%z)", +/* 19 */ "SELECT block FROM %Q.'%q_segments' WHERE blockid = ?", +/* 20 */ "DELETE FROM %Q.'%q_docsize' WHERE docid = ?", +/* 21 */ "REPLACE INTO %Q.'%q_docsize' VALUES(?,?)", +/* 22 */ "SELECT size FROM %Q.'%q_docsize' WHERE docid=?", +/* 23 */ "SELECT value FROM %Q.'%q_stat' WHERE id=0", +/* 24 */ "REPLACE INTO %Q.'%q_stat' VALUES(0,?)", }; int rc = SQLITE_OK; sqlite3_stmt *pStmt; @@ -103817,14 +105270,21 @@ static int fts3SqlStmt( ** Returns SQLITE_OK if the statement is successfully executed, or an ** SQLite error code otherwise. */ -static int fts3SqlExec(Fts3Table *p, int eStmt, sqlite3_value **apVal){ +static void fts3SqlExec( + int *pRC, /* Result code */ + Fts3Table *p, /* The FTS3 table */ + int eStmt, /* Index of statement to evaluate */ + sqlite3_value **apVal /* Parameters to bind */ +){ sqlite3_stmt *pStmt; - int rc = fts3SqlStmt(p, eStmt, &pStmt, apVal); + int rc; + if( *pRC ) return; + rc = fts3SqlStmt(p, eStmt, &pStmt, apVal); if( rc==SQLITE_OK ){ sqlite3_step(pStmt); rc = sqlite3_reset(pStmt); } - return rc; + *pRC = rc; } @@ -104004,11 +105464,17 @@ static int fts3PendingListAppend( ** ** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code. */ -static int fts3PendingTermsAdd(Fts3Table *p, const char *zText, int iCol){ +static int fts3PendingTermsAdd( + Fts3Table *p, /* FTS table into which text will be inserted */ + const char *zText, /* Text of document to be inseted */ + int iCol, /* Column number into which text is inserted */ + u32 *pnWord /* OUT: Number of tokens inserted */ +){ int rc; int iStart; int iEnd; int iPos; + int nWord = 0; char const *zToken; int nToken; @@ -104032,6 +105498,8 @@ static int fts3PendingTermsAdd(Fts3Table *p, const char *zText, int iCol){ && SQLITE_OK==(rc = xNext(pCsr, &zToken, &nToken, &iStart, &iEnd, &iPos)) ){ PendingList *pList; + + if( iPos>=nWord ) nWord = iPos+1; /* Positions cannot be negative; we use -1 as a terminator internally. ** Tokens must have a non-zero length. @@ -104061,6 +105529,7 @@ static int fts3PendingTermsAdd(Fts3Table *p, const char *zText, int iCol){ } pModule->xClose(pCsr); + *pnWord = nWord; return (rc==SQLITE_DONE ? SQLITE_OK : rc); } @@ -104101,12 +105570,12 @@ SQLITE_PRIVATE void sqlite3Fts3PendingTermsClear(Fts3Table *p){ ** Argument apVal is the same as the similarly named argument passed to ** fts3InsertData(). Parameter iDocid is the docid of the new row. */ -static int fts3InsertTerms(Fts3Table *p, sqlite3_value **apVal){ +static int fts3InsertTerms(Fts3Table *p, sqlite3_value **apVal, u32 *aSz){ int i; /* Iterator variable */ for(i=2; i<p->nColumn+2; i++){ const char *zText = (const char *)sqlite3_value_text(apVal[i]); if( zText ){ - int rc = fts3PendingTermsAdd(p, zText, i-2); + int rc = fts3PendingTermsAdd(p, zText, i-2, &aSz[i-2]); if( rc!=SQLITE_OK ){ return rc; } @@ -104187,18 +105656,18 @@ static int fts3InsertData( ** pending terms. */ static int fts3DeleteAll(Fts3Table *p){ - int rc; /* Return code */ + int rc = SQLITE_OK; /* Return code */ /* Discard the contents of the pending-terms hash table. */ sqlite3Fts3PendingTermsClear(p); /* Delete everything from the %_content, %_segments and %_segdir tables. */ - rc = fts3SqlExec(p, SQL_DELETE_ALL_CONTENT, 0); - if( rc==SQLITE_OK ){ - rc = fts3SqlExec(p, SQL_DELETE_ALL_SEGMENTS, 0); - } - if( rc==SQLITE_OK ){ - rc = fts3SqlExec(p, SQL_DELETE_ALL_SEGDIR, 0); + fts3SqlExec(&rc, p, SQL_DELETE_ALL_CONTENT, 0); + fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGMENTS, 0); + fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGDIR, 0); + if( p->bHasDocsize ){ + fts3SqlExec(&rc, p, SQL_DELETE_ALL_DOCSIZE, 0); + fts3SqlExec(&rc, p, SQL_DELETE_ALL_STAT, 0); } return rc; } @@ -104208,20 +105677,27 @@ static int fts3DeleteAll(Fts3Table *p){ ** (an integer) of a row about to be deleted. Remove all terms from the ** full-text index. */ -static int fts3DeleteTerms(Fts3Table *p, sqlite3_value **apVal){ +static void fts3DeleteTerms( + int *pRC, /* Result code */ + Fts3Table *p, /* The FTS table to delete from */ + sqlite3_value **apVal, /* apVal[] contains the docid to be deleted */ + u32 *aSz /* Sizes of deleted document written here */ +){ int rc; sqlite3_stmt *pSelect; + if( *pRC ) return; rc = fts3SqlStmt(p, SQL_SELECT_CONTENT_BY_ROWID, &pSelect, apVal); if( rc==SQLITE_OK ){ if( SQLITE_ROW==sqlite3_step(pSelect) ){ int i; for(i=1; i<=p->nColumn; i++){ const char *zText = (const char *)sqlite3_column_text(pSelect, i); - rc = fts3PendingTermsAdd(p, zText, -1); + rc = fts3PendingTermsAdd(p, zText, -1, &aSz[i-1]); if( rc!=SQLITE_OK ){ sqlite3_reset(pSelect); - return rc; + *pRC = rc; + return; } } } @@ -104229,7 +105705,7 @@ static int fts3DeleteTerms(Fts3Table *p, sqlite3_value **apVal){ }else{ sqlite3_reset(pSelect); } - return rc; + *pRC = rc; } /* @@ -105349,7 +106825,7 @@ static int fts3DeleteSegdir( rc = sqlite3_reset(pDelete); } }else{ - rc = fts3SqlExec(p, SQL_DELETE_ALL_SEGDIR, 0); + fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGDIR, 0); } return rc; @@ -105778,6 +107254,211 @@ SQLITE_PRIVATE int sqlite3Fts3PendingTermsFlush(Fts3Table *p){ } /* +** Encode N integers as varints into a blob. +*/ +static void fts3EncodeIntArray( + int N, /* The number of integers to encode */ + u32 *a, /* The integer values */ + char *zBuf, /* Write the BLOB here */ + int *pNBuf /* Write number of bytes if zBuf[] used here */ +){ + int i, j; + for(i=j=0; i<N; i++){ + j += sqlite3Fts3PutVarint(&zBuf[j], (sqlite3_int64)a[i]); + } + *pNBuf = j; +} + +/* +** Decode a blob of varints into N integers +*/ +static void fts3DecodeIntArray( + int N, /* The number of integers to decode */ + u32 *a, /* Write the integer values */ + const char *zBuf, /* The BLOB containing the varints */ + int nBuf /* size of the BLOB */ +){ + int i, j; + UNUSED_PARAMETER(nBuf); + for(i=j=0; i<N; i++){ + sqlite3_int64 x; + j += sqlite3Fts3GetVarint(&zBuf[j], &x); + assert(j<=nBuf); + a[i] = (u32)(x & 0xffffffff); + } +} + +/* +** Fill in the document size auxiliary information for the matchinfo +** structure. The auxiliary information is: +** +** N Total number of documents in the full-text index +** a0 Average length of column 0 over the whole index +** n0 Length of column 0 on the matching row +** ... +** aM Average length of column M over the whole index +** nM Length of column M on the matching row +** +** The fts3MatchinfoDocsizeLocal() routine fills in the nX values. +** The fts3MatchinfoDocsizeGlobal() routine fills in N and the aX values. +*/ +SQLITE_PRIVATE int sqlite3Fts3MatchinfoDocsizeLocal(Fts3Cursor *pCur, u32 *a){ + const char *pBlob; /* The BLOB holding %_docsize info */ + int nBlob; /* Size of the BLOB */ + sqlite3_stmt *pStmt; /* Statement for reading and writing */ + int i, j; /* Loop counters */ + sqlite3_int64 x; /* Varint value */ + int rc; /* Result code from subfunctions */ + Fts3Table *p; /* The FTS table */ + + p = (Fts3Table*)pCur->base.pVtab; + rc = fts3SqlStmt(p, SQL_SELECT_DOCSIZE, &pStmt, 0); + if( rc ){ + return rc; + } + sqlite3_bind_int64(pStmt, 1, pCur->iPrevId); + if( sqlite3_step(pStmt)==SQLITE_ROW ){ + nBlob = sqlite3_column_bytes(pStmt, 0); + pBlob = (const char*)sqlite3_column_blob(pStmt, 0); + for(i=j=0; i<p->nColumn && j<nBlob; i++){ + j = sqlite3Fts3GetVarint(&pBlob[j], &x); + a[2+i*2] = (u32)(x & 0xffffffff); + } + } + sqlite3_reset(pStmt); + return SQLITE_OK; +} +SQLITE_PRIVATE int sqlite3Fts3MatchinfoDocsizeGlobal(Fts3Cursor *pCur, u32 *a){ + const char *pBlob; /* The BLOB holding %_stat info */ + int nBlob; /* Size of the BLOB */ + sqlite3_stmt *pStmt; /* Statement for reading and writing */ + int i, j; /* Loop counters */ + sqlite3_int64 x; /* Varint value */ + int nDoc; /* Number of documents */ + int rc; /* Result code from subfunctions */ + Fts3Table *p; /* The FTS table */ + + p = (Fts3Table*)pCur->base.pVtab; + rc = fts3SqlStmt(p, SQL_SELECT_DOCTOTAL, &pStmt, 0); + if( rc ){ + return rc; + } + if( sqlite3_step(pStmt)==SQLITE_ROW ){ + nBlob = sqlite3_column_bytes(pStmt, 0); + pBlob = (const char*)sqlite3_column_blob(pStmt, 0); + j = sqlite3Fts3GetVarint(pBlob, &x); + a[0] = nDoc = (u32)(x & 0xffffffff); + for(i=0; i<p->nColumn && j<nBlob; i++){ + j = sqlite3Fts3GetVarint(&pBlob[j], &x); + a[1+i*2] = ((u32)(x & 0xffffffff) + nDoc/2)/nDoc; + } + } + sqlite3_reset(pStmt); + return SQLITE_OK; +} + +/* +** Insert the sizes (in tokens) for each column of the document +** with docid equal to p->iPrevDocid. The sizes are encoded as +** a blob of varints. +*/ +static void fts3InsertDocsize( + int *pRC, /* Result code */ + Fts3Table *p, /* Table into which to insert */ + u32 *aSz /* Sizes of each column */ +){ + char *pBlob; /* The BLOB encoding of the document size */ + int nBlob; /* Number of bytes in the BLOB */ + sqlite3_stmt *pStmt; /* Statement used to insert the encoding */ + int rc; /* Result code from subfunctions */ + + if( *pRC ) return; + pBlob = sqlite3_malloc( 10*p->nColumn ); + if( pBlob==0 ){ + *pRC = SQLITE_NOMEM; + return; + } + fts3EncodeIntArray(p->nColumn, aSz, pBlob, &nBlob); + rc = fts3SqlStmt(p, SQL_REPLACE_DOCSIZE, &pStmt, 0); + if( rc ){ + sqlite3_free(pBlob); + *pRC = rc; + return; + } + sqlite3_bind_int64(pStmt, 1, p->iPrevDocid); + sqlite3_bind_blob(pStmt, 2, pBlob, nBlob, sqlite3_free); + sqlite3_step(pStmt); + *pRC = sqlite3_reset(pStmt); +} + +/* +** Update the 0 record of the %_stat table so that it holds a blob +** which contains the document count followed by the cumulative +** document sizes for all columns. +*/ +static void fts3UpdateDocTotals( + int *pRC, /* The result code */ + Fts3Table *p, /* Table being updated */ + u32 *aSzIns, /* Size increases */ + u32 *aSzDel, /* Size decreases */ + int nChng /* Change in the number of documents */ +){ + char *pBlob; /* Storage for BLOB written into %_stat */ + int nBlob; /* Size of BLOB written into %_stat */ + u32 *a; /* Array of integers that becomes the BLOB */ + sqlite3_stmt *pStmt; /* Statement for reading and writing */ + int i; /* Loop counter */ + int rc; /* Result code from subfunctions */ + + if( *pRC ) return; + a = sqlite3_malloc( (sizeof(u32)+10)*(p->nColumn+1) ); + if( a==0 ){ + *pRC = SQLITE_NOMEM; + return; + } + pBlob = (char*)&a[p->nColumn+1]; + rc = fts3SqlStmt(p, SQL_SELECT_DOCTOTAL, &pStmt, 0); + if( rc ){ + sqlite3_free(a); + *pRC = rc; + return; + } + if( sqlite3_step(pStmt)==SQLITE_ROW ){ + fts3DecodeIntArray(p->nColumn+1, a, + sqlite3_column_blob(pStmt, 0), + sqlite3_column_bytes(pStmt, 0)); + }else{ + memset(a, 0, sizeof(u32)*(p->nColumn+1) ); + } + sqlite3_reset(pStmt); + if( nChng<0 && a[0]<(u32)(-nChng) ){ + a[0] = 0; + }else{ + a[0] += nChng; + } + for(i=0; i<p->nColumn; i++){ + u32 x = a[i+1]; + if( x+aSzIns[i] < aSzDel[i] ){ + x = 0; + }else{ + x = x + aSzIns[i] - aSzDel[i]; + } + a[i+1] = x; + } + fts3EncodeIntArray(p->nColumn+1, a, pBlob, &nBlob); + rc = fts3SqlStmt(p, SQL_REPLACE_DOCTOTAL, &pStmt, 0); + if( rc ){ + sqlite3_free(a); + *pRC = rc; + return; + } + sqlite3_bind_blob(pStmt, 1, pBlob, nBlob, SQLITE_STATIC); + sqlite3_step(pStmt); + *pRC = sqlite3_reset(pStmt); + sqlite3_free(a); +} + +/* ** Handle a 'special' INSERT of the form: ** ** "INSERT INTO tbl(tbl) VALUES(<expr>)" @@ -105828,8 +107509,17 @@ SQLITE_PRIVATE int sqlite3Fts3UpdateMethod( int rc = SQLITE_OK; /* Return Code */ int isRemove = 0; /* True for an UPDATE or DELETE */ sqlite3_int64 iRemove = 0; /* Rowid removed by UPDATE or DELETE */ + u32 *aSzIns; /* Sizes of inserted documents */ + u32 *aSzDel; /* Sizes of deleted documents */ + int nChng = 0; /* Net change in number of documents */ + /* Allocate space to hold the change in document sizes */ + aSzIns = sqlite3_malloc( sizeof(aSzIns[0])*p->nColumn*2 ); + if( aSzIns==0 ) return SQLITE_NOMEM; + aSzDel = &aSzIns[p->nColumn]; + memset(aSzIns, 0, sizeof(aSzIns[0])*p->nColumn*2); + /* If this is a DELETE or UPDATE operation, remove the old record. */ if( sqlite3_value_type(apVal[0])!=SQLITE_NULL ){ int isEmpty; @@ -105845,15 +107535,16 @@ SQLITE_PRIVATE int sqlite3Fts3UpdateMethod( isRemove = 1; iRemove = sqlite3_value_int64(apVal[0]); rc = fts3PendingTermsDocid(p, iRemove); - if( rc==SQLITE_OK ){ - rc = fts3DeleteTerms(p, apVal); - if( rc==SQLITE_OK ){ - rc = fts3SqlExec(p, SQL_DELETE_CONTENT, apVal); - } + fts3DeleteTerms(&rc, p, apVal, aSzDel); + fts3SqlExec(&rc, p, SQL_DELETE_CONTENT, apVal); + if( p->bHasDocsize ){ + fts3SqlExec(&rc, p, SQL_DELETE_DOCSIZE, apVal); + nChng--; } } } }else if( sqlite3_value_type(apVal[p->nColumn+2])!=SQLITE_NULL ){ + sqlite3_free(aSzIns); return fts3SpecialInsert(p, apVal[p->nColumn+2]); } @@ -105864,10 +107555,19 @@ SQLITE_PRIVATE int sqlite3Fts3UpdateMethod( rc = fts3PendingTermsDocid(p, *pRowid); } if( rc==SQLITE_OK ){ - rc = fts3InsertTerms(p, apVal); + rc = fts3InsertTerms(p, apVal, aSzIns); } + if( p->bHasDocsize ){ + nChng++; + fts3InsertDocsize(&rc, p, aSzIns); + } + } + + if( p->bHasDocsize ){ + fts3UpdateDocTotals(&rc, p, aSzIns, aSzDel, nChng); } + sqlite3_free(aSzIns); return rc; } @@ -105914,1024 +107614,521 @@ SQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *p){ #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) -typedef struct Snippet Snippet; /* -** An instance of the following structure keeps track of generated -** matching-word offset information and snippets. +** Used as an fts3ExprIterate() context when loading phrase doclists to +** Fts3Expr.aDoclist[]/nDoclist. */ -struct Snippet { - int nMatch; /* Total number of matches */ - int nAlloc; /* Space allocated for aMatch[] */ - struct snippetMatch { /* One entry for each matching term */ - char snStatus; /* Status flag for use while constructing snippets */ - short int nByte; /* Number of bytes in the term */ - short int iCol; /* The column that contains the match */ - short int iTerm; /* The index in Query.pTerms[] of the matching term */ - int iToken; /* The index of the matching document token */ - int iStart; /* The offset to the first character of the term */ - } *aMatch; /* Points to space obtained from malloc */ - char *zOffset; /* Text rendering of aMatch[] */ - int nOffset; /* strlen(zOffset) */ - char *zSnippet; /* Snippet text */ - int nSnippet; /* strlen(zSnippet) */ +typedef struct LoadDoclistCtx LoadDoclistCtx; +struct LoadDoclistCtx { + Fts3Table *pTab; /* FTS3 Table */ + int nPhrase; /* Number of phrases seen so far */ + int nToken; /* Number of tokens seen so far */ }; - -/* It is not safe to call isspace(), tolower(), or isalnum() on -** hi-bit-set characters. This is the same solution used in the -** tokenizer. -*/ -static int fts3snippetIsspace(char c){ - return (c&0x80)==0 ? isspace(c) : 0; -} - - /* -** A StringBuffer object holds a zero-terminated string that grows -** arbitrarily by appending. Space to hold the string is obtained -** from sqlite3_malloc(). After any memory allocation failure, -** StringBuffer.z is set to NULL and no further allocation is attempted. +** The following types are used as part of the implementation of the +** fts3BestSnippet() routine. */ -typedef struct StringBuffer { - char *z; /* Text of the string. Space from malloc. */ - int nUsed; /* Number bytes of z[] used, not counting \000 terminator */ - int nAlloc; /* Bytes allocated for z[] */ -} StringBuffer; +typedef struct SnippetIter SnippetIter; +typedef struct SnippetPhrase SnippetPhrase; +typedef struct SnippetFragment SnippetFragment; +struct SnippetIter { + Fts3Cursor *pCsr; /* Cursor snippet is being generated from */ + int iCol; /* Extract snippet from this column */ + int nSnippet; /* Requested snippet length (in tokens) */ + int nPhrase; /* Number of phrases in query */ + SnippetPhrase *aPhrase; /* Array of size nPhrase */ + int iCurrent; /* First token of current snippet */ +}; -/* -** Initialize a new StringBuffer. -*/ -static void fts3SnippetSbInit(StringBuffer *p){ - p->nAlloc = 100; - p->nUsed = 0; - p->z = sqlite3_malloc( p->nAlloc ); -} - -/* -** Append text to the string buffer. -*/ -static void fts3SnippetAppend(StringBuffer *p, const char *zNew, int nNew){ - if( p->z==0 ) return; - if( nNew<0 ) nNew = (int)strlen(zNew); - if( p->nUsed + nNew >= p->nAlloc ){ - int nAlloc; - char *zNew; +struct SnippetPhrase { + int nToken; /* Number of tokens in phrase */ + char *pList; /* Pointer to start of phrase position list */ + int iHead; /* Next value in position list */ + char *pHead; /* Position list data following iHead */ + int iTail; /* Next value in trailing position list */ + char *pTail; /* Position list data following iTail */ +}; - nAlloc = p->nUsed + nNew + p->nAlloc; - zNew = sqlite3_realloc(p->z, nAlloc); - if( zNew==0 ){ - sqlite3_free(p->z); - p->z = 0; - return; - } - p->z = zNew; - p->nAlloc = nAlloc; - } - memcpy(&p->z[p->nUsed], zNew, nNew); - p->nUsed += nNew; - p->z[p->nUsed] = 0; -} +struct SnippetFragment { + int iCol; /* Column snippet is extracted from */ + int iPos; /* Index of first token in snippet */ + u64 covered; /* Mask of query phrases covered */ + u64 hlmask; /* Mask of snippet terms to highlight */ +}; -/* If the StringBuffer ends in something other than white space, add a -** single space character to the end. +/* +** This type is used as an fts3ExprIterate() context object while +** accumulating the data returned by the matchinfo() function. */ -static void fts3SnippetAppendWhiteSpace(StringBuffer *p){ - if( p->z && p->nUsed && !fts3snippetIsspace(p->z[p->nUsed-1]) ){ - fts3SnippetAppend(p, " ", 1); - } -} +typedef struct MatchInfo MatchInfo; +struct MatchInfo { + Fts3Cursor *pCursor; /* FTS3 Cursor */ + int nCol; /* Number of columns in table */ + u32 *aMatchinfo; /* Pre-allocated buffer */ +}; -/* Remove white space from the end of the StringBuffer */ -static void fts3SnippetTrimWhiteSpace(StringBuffer *p){ - if( p->z ){ - while( p->nUsed && fts3snippetIsspace(p->z[p->nUsed-1]) ){ - p->nUsed--; - } - p->z[p->nUsed] = 0; - } -} -/* -** Release all memory associated with the Snippet structure passed as -** an argument. -*/ -static void fts3SnippetFree(Snippet *p){ - if( p ){ - sqlite3_free(p->aMatch); - sqlite3_free(p->zOffset); - sqlite3_free(p->zSnippet); - sqlite3_free(p); - } -} /* -** Append a single entry to the p->aMatch[] log. +** The snippet() and offsets() functions both return text values. An instance +** of the following structure is used to accumulate those values while the +** functions are running. See fts3StringAppend() for details. */ -static int snippetAppendMatch( - Snippet *p, /* Append the entry to this snippet */ - int iCol, int iTerm, /* The column and query term */ - int iToken, /* Matching token in document */ - int iStart, int nByte /* Offset and size of the match */ -){ - int i; - struct snippetMatch *pMatch; - if( p->nMatch+1>=p->nAlloc ){ - struct snippetMatch *pNew; - p->nAlloc = p->nAlloc*2 + 10; - pNew = sqlite3_realloc(p->aMatch, p->nAlloc*sizeof(p->aMatch[0]) ); - if( pNew==0 ){ - p->aMatch = 0; - p->nMatch = 0; - p->nAlloc = 0; - return SQLITE_NOMEM; - } - p->aMatch = pNew; - } - i = p->nMatch++; - pMatch = &p->aMatch[i]; - pMatch->iCol = (short)iCol; - pMatch->iTerm = (short)iTerm; - pMatch->iToken = iToken; - pMatch->iStart = iStart; - pMatch->nByte = (short)nByte; - return SQLITE_OK; -} +typedef struct StrBuffer StrBuffer; +struct StrBuffer { + char *z; /* Pointer to buffer containing string */ + int n; /* Length of z in bytes (excl. nul-term) */ + int nAlloc; /* Allocated size of buffer z in bytes */ +}; -/* -** Sizing information for the circular buffer used in snippetOffsetsOfColumn() -*/ -#define FTS3_ROTOR_SZ (32) -#define FTS3_ROTOR_MASK (FTS3_ROTOR_SZ-1) /* -** Function to iterate through the tokens of a compiled expression. +** This function is used to help iterate through a position-list. A position +** list is a list of unique integers, sorted from smallest to largest. Each +** element of the list is represented by an FTS3 varint that takes the value +** of the difference between the current element and the previous one plus +** two. For example, to store the position-list: +** +** 4 9 113 +** +** the three varints: +** +** 6 7 106 ** -** Except, skip all tokens on the right-hand side of a NOT operator. -** This function is used to find tokens as part of snippet and offset -** generation and we do nt want snippets and offsets to report matches -** for tokens on the RHS of a NOT. +** are encoded. +** +** When this function is called, *pp points to the start of an element of +** the list. *piPos contains the value of the previous entry in the list. +** After it returns, *piPos contains the value of the next element of the +** list and *pp is advanced to the following varint. */ -static int fts3NextExprToken(Fts3Expr **ppExpr, int *piToken){ - Fts3Expr *p = *ppExpr; - int iToken = *piToken; - if( iToken<0 ){ - /* In this case the expression p is the root of an expression tree. - ** Move to the first token in the expression tree. - */ - while( p->pLeft ){ - p = p->pLeft; - } - iToken = 0; - }else{ - assert(p && p->eType==FTSQUERY_PHRASE ); - if( iToken<(p->pPhrase->nToken-1) ){ - iToken++; - }else{ - iToken = 0; - while( p->pParent && p->pParent->pLeft!=p ){ - assert( p->pParent->pRight==p ); - p = p->pParent; - } - p = p->pParent; - if( p ){ - assert( p->pRight!=0 ); - p = p->pRight; - while( p->pLeft ){ - p = p->pLeft; - } - } - } - } - - *ppExpr = p; - *piToken = iToken; - return p?1:0; +static void fts3GetDeltaPosition(char **pp, int *piPos){ + int iVal; + *pp += sqlite3Fts3GetVarint32(*pp, &iVal); + *piPos += (iVal-2); } /* -** Return TRUE if the expression node pExpr is located beneath the -** RHS of a NOT operator. +** Helper function for fts3ExprIterate() (see below). */ -static int fts3ExprBeneathNot(Fts3Expr *p){ - Fts3Expr *pParent; - while( p ){ - pParent = p->pParent; - if( pParent && pParent->eType==FTSQUERY_NOT && pParent->pRight==p ){ - return 1; +static int fts3ExprIterate2( + Fts3Expr *pExpr, /* Expression to iterate phrases of */ + int *piPhrase, /* Pointer to phrase counter */ + int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */ + void *pCtx /* Second argument to pass to callback */ +){ + int rc; /* Return code */ + int eType = pExpr->eType; /* Type of expression node pExpr */ + + if( eType!=FTSQUERY_PHRASE ){ + assert( pExpr->pLeft && pExpr->pRight ); + rc = fts3ExprIterate2(pExpr->pLeft, piPhrase, x, pCtx); + if( rc==SQLITE_OK && eType!=FTSQUERY_NOT ){ + rc = fts3ExprIterate2(pExpr->pRight, piPhrase, x, pCtx); } - p = pParent; + }else{ + rc = x(pExpr, *piPhrase, pCtx); + (*piPhrase)++; } - return 0; + return rc; } /* -** Add entries to pSnippet->aMatch[] for every match that occurs against -** document zDoc[0..nDoc-1] which is stored in column iColumn. +** Iterate through all phrase nodes in an FTS3 query, except those that +** are part of a sub-tree that is the right-hand-side of a NOT operator. +** For each phrase node found, the supplied callback function is invoked. +** +** If the callback function returns anything other than SQLITE_OK, +** the iteration is abandoned and the error code returned immediately. +** Otherwise, SQLITE_OK is returned after a callback has been made for +** all eligible phrase nodes. */ -static int snippetOffsetsOfColumn( - Fts3Cursor *pCur, /* The fulltest search cursor */ - Snippet *pSnippet, /* The Snippet object to be filled in */ - int iColumn, /* Index of fulltext table column */ - const char *zDoc, /* Text of the fulltext table column */ - int nDoc /* Length of zDoc in bytes */ +static int fts3ExprIterate( + Fts3Expr *pExpr, /* Expression to iterate phrases of */ + int (*x)(Fts3Expr*,int,void*), /* Callback function to invoke for phrases */ + void *pCtx /* Second argument to pass to callback */ ){ - const sqlite3_tokenizer_module *pTModule; /* The tokenizer module */ - sqlite3_tokenizer *pTokenizer; /* The specific tokenizer */ - sqlite3_tokenizer_cursor *pTCursor; /* Tokenizer cursor */ - Fts3Table *pVtab; /* The full text index */ - int nColumn; /* Number of columns in the index */ - int i, j; /* Loop counters */ - int rc; /* Return code */ - unsigned int match, prevMatch; /* Phrase search bitmasks */ - const char *zToken; /* Next token from the tokenizer */ - int nToken; /* Size of zToken */ - int iBegin, iEnd, iPos; /* Offsets of beginning and end */ - - /* The following variables keep a circular buffer of the last - ** few tokens */ - unsigned int iRotor = 0; /* Index of current token */ - int iRotorBegin[FTS3_ROTOR_SZ]; /* Beginning offset of token */ - int iRotorLen[FTS3_ROTOR_SZ]; /* Length of token */ - - pVtab = (Fts3Table *)pCur->base.pVtab; - nColumn = pVtab->nColumn; - pTokenizer = pVtab->pTokenizer; - pTModule = pTokenizer->pModule; - rc = pTModule->xOpen(pTokenizer, zDoc, nDoc, &pTCursor); - if( rc ) return rc; - pTCursor->pTokenizer = pTokenizer; - - prevMatch = 0; - while( (rc = pTModule->xNext(pTCursor, &zToken, &nToken, - &iBegin, &iEnd, &iPos))==SQLITE_OK ){ - Fts3Expr *pIter = pCur->pExpr; - int iIter = -1; - iRotorBegin[iRotor&FTS3_ROTOR_MASK] = iBegin; - iRotorLen[iRotor&FTS3_ROTOR_MASK] = iEnd-iBegin; - match = 0; - for(i=0; i<(FTS3_ROTOR_SZ-1) && fts3NextExprToken(&pIter, &iIter); i++){ - int nPhrase; /* Number of tokens in current phrase */ - struct PhraseToken *pToken; /* Current token */ - int iCol; /* Column index */ - - if( fts3ExprBeneathNot(pIter) ) continue; - nPhrase = pIter->pPhrase->nToken; - pToken = &pIter->pPhrase->aToken[iIter]; - iCol = pIter->pPhrase->iColumn; - if( iCol>=0 && iCol<nColumn && iCol!=iColumn ) continue; - if( pToken->n>nToken ) continue; - if( !pToken->isPrefix && pToken->n<nToken ) continue; - assert( pToken->n<=nToken ); - if( memcmp(pToken->z, zToken, pToken->n) ) continue; - if( iIter>0 && (prevMatch & (1<<i))==0 ) continue; - match |= 1<<i; - if( i==(FTS3_ROTOR_SZ-2) || nPhrase==iIter+1 ){ - for(j=nPhrase-1; j>=0; j--){ - int k = (iRotor-j) & FTS3_ROTOR_MASK; - rc = snippetAppendMatch(pSnippet, iColumn, i-j, iPos-j, - iRotorBegin[k], iRotorLen[k]); - if( rc ) goto end_offsets_of_column; - } - } - } - prevMatch = match<<1; - iRotor++; - } -end_offsets_of_column: - pTModule->xClose(pTCursor); - return rc==SQLITE_DONE ? SQLITE_OK : rc; + int iPhrase = 0; /* Variable used as the phrase counter */ + return fts3ExprIterate2(pExpr, &iPhrase, x, pCtx); } /* -** Remove entries from the pSnippet structure to account for the NEAR -** operator. When this is called, pSnippet contains the list of token -** offsets produced by treating all NEAR operators as AND operators. -** This function removes any entries that should not be present after -** accounting for the NEAR restriction. For example, if the queried -** document is: -** -** "A B C D E A" -** -** and the query is: -** -** A NEAR/0 E -** -** then when this function is called the Snippet contains token offsets -** 0, 4 and 5. This function removes the "0" entry (because the first A -** is not near enough to an E). +** The argument to this function is always a phrase node. Its doclist +** (Fts3Expr.aDoclist[]) and the doclists associated with all phrase nodes +** to the left of this one in the query tree have already been loaded. ** -** When this function is called, the value pointed to by parameter piLeft is -** the integer id of the left-most token in the expression tree headed by -** pExpr. This function increments *piLeft by the total number of tokens -** in the expression tree headed by pExpr. +** If this phrase node is part of a series of phrase nodes joined by +** NEAR operators (and is not the left-most of said series), then elements are +** removed from the phrases doclist consistent with the NEAR restriction. If +** required, elements may be removed from the doclists of phrases to the +** left of this one that are part of the same series of NEAR operator +** connected phrases. ** -** Return 1 if any trimming occurs. Return 0 if no trimming is required. +** If an OOM error occurs, SQLITE_NOMEM is returned. Otherwise, SQLITE_OK. */ -static int trimSnippetOffsets( - Fts3Expr *pExpr, /* The search expression */ - Snippet *pSnippet, /* The set of snippet offsets to be trimmed */ - int *piLeft /* Index of left-most token in pExpr */ -){ - if( pExpr ){ - if( trimSnippetOffsets(pExpr->pLeft, pSnippet, piLeft) ){ - return 1; - } +static int fts3ExprNearTrim(Fts3Expr *pExpr){ + int rc = SQLITE_OK; + Fts3Expr *pParent = pExpr->pParent; - switch( pExpr->eType ){ - case FTSQUERY_PHRASE: - *piLeft += pExpr->pPhrase->nToken; - break; - case FTSQUERY_NEAR: { - /* The right-hand-side of a NEAR operator is always a phrase. The - ** left-hand-side is either a phrase or an expression tree that is - ** itself headed by a NEAR operator. The following initializations - ** set local variable iLeft to the token number of the left-most - ** token in the right-hand phrase, and iRight to the right most - ** token in the same phrase. For example, if we had: - ** - ** <col> MATCH '"abc def" NEAR/2 "ghi jkl"' - ** - ** then iLeft will be set to 2 (token number of ghi) and nToken will - ** be set to 4. - */ - Fts3Expr *pLeft = pExpr->pLeft; - Fts3Expr *pRight = pExpr->pRight; - int iLeft = *piLeft; - int nNear = pExpr->nNear; - int nToken = pRight->pPhrase->nToken; - int jj, ii; - if( pLeft->eType==FTSQUERY_NEAR ){ - pLeft = pLeft->pRight; - } - assert( pRight->eType==FTSQUERY_PHRASE ); - assert( pLeft->eType==FTSQUERY_PHRASE ); - nToken += pLeft->pPhrase->nToken; - - for(ii=0; ii<pSnippet->nMatch; ii++){ - struct snippetMatch *p = &pSnippet->aMatch[ii]; - if( p->iTerm==iLeft ){ - int isOk = 0; - /* Snippet ii is an occurence of query term iLeft in the document. - ** It occurs at position (p->iToken) of the document. We now - ** search for an instance of token (iLeft-1) somewhere in the - ** range (p->iToken - nNear)...(p->iToken + nNear + nToken) within - ** the set of snippetMatch structures. If one is found, proceed. - ** If one cannot be found, then remove snippets ii..(ii+N-1) - ** from the matching snippets, where N is the number of tokens - ** in phrase pRight->pPhrase. - */ - for(jj=0; isOk==0 && jj<pSnippet->nMatch; jj++){ - struct snippetMatch *p2 = &pSnippet->aMatch[jj]; - if( p2->iTerm==(iLeft-1) ){ - if( p2->iToken>=(p->iToken-nNear-1) - && p2->iToken<(p->iToken+nNear+nToken) - ){ - isOk = 1; - } - } - } - if( !isOk ){ - int kk; - for(kk=0; kk<pRight->pPhrase->nToken; kk++){ - pSnippet->aMatch[kk+ii].iTerm = -2; - } - return 1; - } - } - if( p->iTerm==(iLeft-1) ){ - int isOk = 0; - for(jj=0; isOk==0 && jj<pSnippet->nMatch; jj++){ - struct snippetMatch *p2 = &pSnippet->aMatch[jj]; - if( p2->iTerm==iLeft ){ - if( p2->iToken<=(p->iToken+nNear+1) - && p2->iToken>(p->iToken-nNear-nToken) - ){ - isOk = 1; - } - } - } - if( !isOk ){ - int kk; - for(kk=0; kk<pLeft->pPhrase->nToken; kk++){ - pSnippet->aMatch[ii-kk].iTerm = -2; - } - return 1; - } - } - } - break; - } - } + assert( pExpr->eType==FTSQUERY_PHRASE ); + while( rc==SQLITE_OK + && pParent + && pParent->eType==FTSQUERY_NEAR + && pParent->pRight==pExpr + ){ + /* This expression (pExpr) is the right-hand-side of a NEAR operator. + ** Find the expression to the left of the same operator. + */ + int nNear = pParent->nNear; + Fts3Expr *pLeft = pParent->pLeft; - if( trimSnippetOffsets(pExpr->pRight, pSnippet, piLeft) ){ - return 1; + if( pLeft->eType!=FTSQUERY_PHRASE ){ + assert( pLeft->eType==FTSQUERY_NEAR ); + assert( pLeft->pRight->eType==FTSQUERY_PHRASE ); + pLeft = pLeft->pRight; } + + rc = sqlite3Fts3ExprNearTrim(pLeft, pExpr, nNear); + + pExpr = pLeft; + pParent = pExpr->pParent; } - return 0; + + return rc; } /* -** Compute all offsets for the current row of the query. -** If the offsets have already been computed, this routine is a no-op. +** This is an fts3ExprIterate() callback used while loading the doclists +** for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also +** fts3ExprLoadDoclists(). */ -static int snippetAllOffsets(Fts3Cursor *pCsr, Snippet **ppSnippet){ - Fts3Table *p = (Fts3Table *)pCsr->base.pVtab; /* The FTS3 virtual table */ - int nColumn; /* Number of columns. Docid does count */ - int iColumn; /* Index of of a column */ - int i; /* Loop index */ - int iFirst; /* First column to search */ - int iLast; /* Last coumn to search */ - int iTerm = 0; - Snippet *pSnippet; +static int fts3ExprLoadDoclistsCb1(Fts3Expr *pExpr, int iPhrase, void *ctx){ int rc = SQLITE_OK; + LoadDoclistCtx *p = (LoadDoclistCtx *)ctx; - if( pCsr->pExpr==0 ){ - return SQLITE_OK; - } + UNUSED_PARAMETER(iPhrase); - pSnippet = (Snippet *)sqlite3_malloc(sizeof(Snippet)); - *ppSnippet = pSnippet; - if( !pSnippet ){ - return SQLITE_NOMEM; - } - memset(pSnippet, 0, sizeof(Snippet)); + p->nPhrase++; + p->nToken += pExpr->pPhrase->nToken; - nColumn = p->nColumn; - iColumn = (pCsr->eSearch - 2); - if( iColumn<0 || iColumn>=nColumn ){ - /* Look for matches over all columns of the full-text index */ - iFirst = 0; - iLast = nColumn-1; - }else{ - /* Look for matches in the iColumn-th column of the index only */ - iFirst = iColumn; - iLast = iColumn; - } - for(i=iFirst; rc==SQLITE_OK && i<=iLast; i++){ - const char *zDoc; - int nDoc; - zDoc = (const char*)sqlite3_column_text(pCsr->pStmt, i+1); - nDoc = sqlite3_column_bytes(pCsr->pStmt, i+1); - if( zDoc==0 && sqlite3_column_type(pCsr->pStmt, i+1)!=SQLITE_NULL ){ - rc = SQLITE_NOMEM; - }else{ - rc = snippetOffsetsOfColumn(pCsr, pSnippet, i, zDoc, nDoc); + if( pExpr->isLoaded==0 ){ + rc = sqlite3Fts3ExprLoadDoclist(p->pTab, pExpr); + pExpr->isLoaded = 1; + if( rc==SQLITE_OK ){ + rc = fts3ExprNearTrim(pExpr); } } - while( trimSnippetOffsets(pCsr->pExpr, pSnippet, &iTerm) ){ - iTerm = 0; - } - return rc; } /* -** Convert the information in the aMatch[] array of the snippet -** into the string zOffset[0..nOffset-1]. This string is used as -** the return of the SQL offsets() function. +** This is an fts3ExprIterate() callback used while loading the doclists +** for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also +** fts3ExprLoadDoclists(). */ -static void snippetOffsetText(Snippet *p){ - int i; - int cnt = 0; - StringBuffer sb; - char zBuf[200]; - if( p->zOffset ) return; - fts3SnippetSbInit(&sb); - for(i=0; i<p->nMatch; i++){ - struct snippetMatch *pMatch = &p->aMatch[i]; - if( pMatch->iTerm>=0 ){ - /* If snippetMatch.iTerm is less than 0, then the match was - ** discarded as part of processing the NEAR operator (see the - ** trimSnippetOffsetsForNear() function for details). Ignore - ** it in this case - */ - zBuf[0] = ' '; - sqlite3_snprintf(sizeof(zBuf)-1, &zBuf[cnt>0], "%d %d %d %d", - pMatch->iCol, pMatch->iTerm, pMatch->iStart, pMatch->nByte); - fts3SnippetAppend(&sb, zBuf, -1); - cnt++; - } +static int fts3ExprLoadDoclistsCb2(Fts3Expr *pExpr, int iPhrase, void *ctx){ + UNUSED_PARAMETER(iPhrase); + UNUSED_PARAMETER(ctx); + if( pExpr->aDoclist ){ + pExpr->pCurrent = pExpr->aDoclist; + pExpr->iCurrent = 0; + pExpr->pCurrent += sqlite3Fts3GetVarint(pExpr->pCurrent, &pExpr->iCurrent); } - p->zOffset = sb.z; - p->nOffset = sb.z ? sb.nUsed : 0; + return SQLITE_OK; } /* -** zDoc[0..nDoc-1] is phrase of text. aMatch[0..nMatch-1] are a set -** of matching words some of which might be in zDoc. zDoc is column -** number iCol. +** Load the doclists for each phrase in the query associated with FTS3 cursor +** pCsr. ** -** iBreak is suggested spot in zDoc where we could begin or end an -** excerpt. Return a value similar to iBreak but possibly adjusted -** to be a little left or right so that the break point is better. +** If pnPhrase is not NULL, then *pnPhrase is set to the number of matchable +** phrases in the expression (all phrases except those directly or +** indirectly descended from the right-hand-side of a NOT operator). If +** pnToken is not NULL, then it is set to the number of tokens in all +** matchable phrases of the expression. */ -static int wordBoundary( - int iBreak, /* The suggested break point */ - const char *zDoc, /* Document text */ - int nDoc, /* Number of bytes in zDoc[] */ - struct snippetMatch *aMatch, /* Matching words */ - int nMatch, /* Number of entries in aMatch[] */ - int iCol /* The column number for zDoc[] */ +static int fts3ExprLoadDoclists( + Fts3Cursor *pCsr, /* Fts3 cursor for current query */ + int *pnPhrase, /* OUT: Number of phrases in query */ + int *pnToken /* OUT: Number of tokens in query */ ){ - int i; - if( iBreak<=10 ){ - return 0; - } - if( iBreak>=nDoc-10 ){ - return nDoc; - } - for(i=0; ALWAYS(i<nMatch) && aMatch[i].iCol<iCol; i++){} - while( i<nMatch && aMatch[i].iStart+aMatch[i].nByte<iBreak ){ i++; } - if( i<nMatch ){ - if( aMatch[i].iStart<iBreak+10 ){ - return aMatch[i].iStart; - } - if( i>0 && aMatch[i-1].iStart+aMatch[i-1].nByte>=iBreak ){ - return aMatch[i-1].iStart; - } - } - for(i=1; i<=10; i++){ - if( fts3snippetIsspace(zDoc[iBreak-i]) ){ - return iBreak - i + 1; - } - if( fts3snippetIsspace(zDoc[iBreak+i]) ){ - return iBreak + i + 1; - } + int rc; /* Return Code */ + LoadDoclistCtx sCtx = {0,0,0}; /* Context for fts3ExprIterate() */ + sCtx.pTab = (Fts3Table *)pCsr->base.pVtab; + rc = fts3ExprIterate(pCsr->pExpr, fts3ExprLoadDoclistsCb1, (void *)&sCtx); + if( rc==SQLITE_OK ){ + (void)fts3ExprIterate(pCsr->pExpr, fts3ExprLoadDoclistsCb2, 0); } - return iBreak; + if( pnPhrase ) *pnPhrase = sCtx.nPhrase; + if( pnToken ) *pnToken = sCtx.nToken; + return rc; } - - -/* -** Allowed values for Snippet.aMatch[].snStatus -*/ -#define SNIPPET_IGNORE 0 /* It is ok to omit this match from the snippet */ -#define SNIPPET_DESIRED 1 /* We want to include this match in the snippet */ - /* -** Generate the text of a snippet. +** Advance the position list iterator specified by the first two +** arguments so that it points to the first element with a value greater +** than or equal to parameter iNext. */ -static void snippetText( - Fts3Cursor *pCursor, /* The cursor we need the snippet for */ - Snippet *pSnippet, - const char *zStartMark, /* Markup to appear before each match */ - const char *zEndMark, /* Markup to appear after each match */ - const char *zEllipsis /* Ellipsis mark */ -){ - int i, j; - struct snippetMatch *aMatch; - int nMatch; - int nDesired; - StringBuffer sb; - int tailCol; - int tailOffset; - int iCol; - int nDoc; - const char *zDoc; - int iStart, iEnd; - int tailEllipsis = 0; - int iMatch; - +static void fts3SnippetAdvance(char **ppIter, int *piIter, int iNext){ + char *pIter = *ppIter; + if( pIter ){ + int iIter = *piIter; - sqlite3_free(pSnippet->zSnippet); - pSnippet->zSnippet = 0; - aMatch = pSnippet->aMatch; - nMatch = pSnippet->nMatch; - fts3SnippetSbInit(&sb); - - for(i=0; i<nMatch; i++){ - aMatch[i].snStatus = SNIPPET_IGNORE; - } - nDesired = 0; - for(i=0; i<FTS3_ROTOR_SZ; i++){ - for(j=0; j<nMatch; j++){ - if( aMatch[j].iTerm==i ){ - aMatch[j].snStatus = SNIPPET_DESIRED; - nDesired++; + while( iIter<iNext ){ + if( 0==(*pIter & 0xFE) ){ + iIter = -1; + pIter = 0; break; } + fts3GetDeltaPosition(&pIter, &iIter); } - } - iMatch = 0; - tailCol = -1; - tailOffset = 0; - for(i=0; i<nMatch && nDesired>0; i++){ - if( aMatch[i].snStatus!=SNIPPET_DESIRED ) continue; - nDesired--; - iCol = aMatch[i].iCol; - zDoc = (const char*)sqlite3_column_text(pCursor->pStmt, iCol+1); - nDoc = sqlite3_column_bytes(pCursor->pStmt, iCol+1); - iStart = aMatch[i].iStart - 40; - iStart = wordBoundary(iStart, zDoc, nDoc, aMatch, nMatch, iCol); - if( iStart<=10 ){ - iStart = 0; - } - if( iCol==tailCol && iStart<=tailOffset+20 ){ - iStart = tailOffset; - } - if( (iCol!=tailCol && tailCol>=0) || iStart!=tailOffset ){ - fts3SnippetTrimWhiteSpace(&sb); - fts3SnippetAppendWhiteSpace(&sb); - fts3SnippetAppend(&sb, zEllipsis, -1); - fts3SnippetAppendWhiteSpace(&sb); - } - iEnd = aMatch[i].iStart + aMatch[i].nByte + 40; - iEnd = wordBoundary(iEnd, zDoc, nDoc, aMatch, nMatch, iCol); - if( iEnd>=nDoc-10 ){ - iEnd = nDoc; - tailEllipsis = 0; - }else{ - tailEllipsis = 1; - } - while( iMatch<nMatch && aMatch[iMatch].iCol<iCol ){ iMatch++; } - while( iStart<iEnd ){ - while( iMatch<nMatch && aMatch[iMatch].iStart<iStart - && aMatch[iMatch].iCol<=iCol ){ - iMatch++; - } - if( iMatch<nMatch && aMatch[iMatch].iStart<iEnd - && aMatch[iMatch].iCol==iCol ){ - fts3SnippetAppend(&sb, &zDoc[iStart], aMatch[iMatch].iStart - iStart); - iStart = aMatch[iMatch].iStart; - fts3SnippetAppend(&sb, zStartMark, -1); - fts3SnippetAppend(&sb, &zDoc[iStart], aMatch[iMatch].nByte); - fts3SnippetAppend(&sb, zEndMark, -1); - iStart += aMatch[iMatch].nByte; - for(j=iMatch+1; j<nMatch; j++){ - if( aMatch[j].iTerm==aMatch[iMatch].iTerm - && aMatch[j].snStatus==SNIPPET_DESIRED ){ - nDesired--; - aMatch[j].snStatus = SNIPPET_IGNORE; - } - } - }else{ - fts3SnippetAppend(&sb, &zDoc[iStart], iEnd - iStart); - iStart = iEnd; - } - } - tailCol = iCol; - tailOffset = iEnd; - } - fts3SnippetTrimWhiteSpace(&sb); - if( tailEllipsis ){ - fts3SnippetAppendWhiteSpace(&sb); - fts3SnippetAppend(&sb, zEllipsis, -1); - } - pSnippet->zSnippet = sb.z; - pSnippet->nSnippet = sb.z ? sb.nUsed : 0; -} - -SQLITE_PRIVATE void sqlite3Fts3Offsets( - sqlite3_context *pCtx, /* SQLite function call context */ - Fts3Cursor *pCsr /* Cursor object */ -){ - Snippet *p; /* Snippet structure */ - int rc = snippetAllOffsets(pCsr, &p); - if( rc==SQLITE_OK ){ - snippetOffsetText(p); - if( p->zOffset ){ - sqlite3_result_text(pCtx, p->zOffset, p->nOffset, SQLITE_TRANSIENT); - }else{ - sqlite3_result_error_nomem(pCtx); - } - }else{ - sqlite3_result_error_nomem(pCtx); + *piIter = iIter; + *ppIter = pIter; } - fts3SnippetFree(p); } -SQLITE_PRIVATE void sqlite3Fts3Snippet( - sqlite3_context *pCtx, /* SQLite function call context */ - Fts3Cursor *pCsr, /* Cursor object */ - const char *zStart, /* Snippet start text - "<b>" */ - const char *zEnd, /* Snippet end text - "</b>" */ - const char *zEllipsis /* Snippet ellipsis text - "<b>...</b>" */ -){ - Snippet *p; /* Snippet structure */ - int rc = snippetAllOffsets(pCsr, &p); - if( rc==SQLITE_OK ){ - snippetText(pCsr, p, zStart, zEnd, zEllipsis); - if( p->zSnippet ){ - sqlite3_result_text(pCtx, p->zSnippet, p->nSnippet, SQLITE_TRANSIENT); - }else{ - sqlite3_result_error_nomem(pCtx); - } - }else{ - sqlite3_result_error_nomem(pCtx); - } - fts3SnippetFree(p); -} - -/************************************************************************* -** Below this point is the alternative, experimental snippet() implementation. +/* +** Advance the snippet iterator to the next candidate snippet. */ +static int fts3SnippetNextCandidate(SnippetIter *pIter){ + int i; /* Loop counter */ -#define SNIPPET_BUFFER_CHUNK 64 -#define SNIPPET_BUFFER_SIZE SNIPPET_BUFFER_CHUNK*4 -#define SNIPPET_BUFFER_MASK (SNIPPET_BUFFER_SIZE-1) - -static void fts3GetDeltaPosition(char **pp, int *piPos){ - int iVal; - *pp += sqlite3Fts3GetVarint32(*pp, &iVal); - *piPos += (iVal-2); -} + if( pIter->iCurrent<0 ){ + /* The SnippetIter object has just been initialized. The first snippet + ** candidate always starts at offset 0 (even if this candidate has a + ** score of 0.0). + */ + pIter->iCurrent = 0; -/* -** Iterate through all phrase nodes in an FTS3 query, except those that -** are part of a sub-tree that is the right-hand-side of a NOT operator. -** For each phrase node found, the supplied callback function is invoked. -** -** If the callback function returns anything other than SQLITE_OK, -** the iteration is abandoned and the error code returned immediately. -** Otherwise, SQLITE_OK is returned after a callback has been made for -** all eligible phrase nodes. -*/ -static int fts3ExprIterate( - Fts3Expr *pExpr, /* Expression to iterate phrases of */ - int (*x)(Fts3Expr *, void *), /* Callback function to invoke for phrases */ - void *pCtx /* Second argument to pass to callback */ -){ - int rc; - int eType = pExpr->eType; - if( eType==FTSQUERY_NOT ){ - rc = SQLITE_OK; - }else if( eType!=FTSQUERY_PHRASE ){ - assert( pExpr->pLeft && pExpr->pRight ); - rc = fts3ExprIterate(pExpr->pLeft, x, pCtx); - if( rc==SQLITE_OK ){ - rc = fts3ExprIterate(pExpr->pRight, x, pCtx); + /* Advance the 'head' iterator of each phrase to the first offset that + ** is greater than or equal to (iNext+nSnippet). + */ + for(i=0; i<pIter->nPhrase; i++){ + SnippetPhrase *pPhrase = &pIter->aPhrase[i]; + fts3SnippetAdvance(&pPhrase->pHead, &pPhrase->iHead, pIter->nSnippet); } }else{ - rc = x(pExpr, pCtx); - } - return rc; -} + int iStart; + int iEnd = 0x7FFFFFFF; -typedef struct LoadDoclistCtx LoadDoclistCtx; -struct LoadDoclistCtx { - Fts3Table *pTab; /* FTS3 Table */ - int nPhrase; /* Number of phrases so far */ -}; + for(i=0; i<pIter->nPhrase; i++){ + SnippetPhrase *pPhrase = &pIter->aPhrase[i]; + if( pPhrase->pHead && pPhrase->iHead<iEnd ){ + iEnd = pPhrase->iHead; + } + } + if( iEnd==0x7FFFFFFF ){ + return 1; + } -static int fts3ExprLoadDoclistsCb(Fts3Expr *pExpr, void *ctx){ - int rc = SQLITE_OK; - LoadDoclistCtx *p = (LoadDoclistCtx *)ctx; - p->nPhrase++; - if( pExpr->isLoaded==0 ){ - rc = sqlite3Fts3ExprLoadDoclist(p->pTab, pExpr); - pExpr->isLoaded = 1; - if( rc==SQLITE_OK && pExpr->aDoclist ){ - pExpr->pCurrent = pExpr->aDoclist; - pExpr->pCurrent += sqlite3Fts3GetVarint(pExpr->pCurrent,&pExpr->iCurrent); + pIter->iCurrent = iStart = iEnd - pIter->nSnippet + 1; + for(i=0; i<pIter->nPhrase; i++){ + SnippetPhrase *pPhrase = &pIter->aPhrase[i]; + fts3SnippetAdvance(&pPhrase->pHead, &pPhrase->iHead, iEnd+1); + fts3SnippetAdvance(&pPhrase->pTail, &pPhrase->iTail, iStart); } } - return rc; -} -static int fts3ExprLoadDoclists(Fts3Cursor *pCsr, int *pnPhrase){ - int rc; - LoadDoclistCtx sCtx = {0, 0}; - sCtx.pTab = (Fts3Table *)pCsr->base.pVtab; - rc = fts3ExprIterate(pCsr->pExpr, fts3ExprLoadDoclistsCb, (void *)&sCtx); - *pnPhrase = sCtx.nPhrase; - return rc; + return 0; } /* -** Each call to this function populates a chunk of a snippet-buffer -** SNIPPET_BUFFER_CHUNK bytes in size. -** -** Return true if the end of the data has been reached (and all subsequent -** calls to fts3LoadSnippetBuffer() with the same arguments will be no-ops), -** or false otherwise. +** Retrieve information about the current candidate snippet of snippet +** iterator pIter. */ -static int fts3LoadSnippetBuffer( - int iPos, /* Document token offset to load data for */ - u8 *aBuffer, /* Circular snippet buffer to populate */ - int nList, /* Number of position lists in appList */ - char **apList, /* IN/OUT: nList position list pointers */ - int *aiPrev /* IN/OUT: Previous positions read */ +static void fts3SnippetDetails( + SnippetIter *pIter, /* Snippet iterator */ + u64 mCovered, /* Bitmask of phrases already covered */ + int *piToken, /* OUT: First token of proposed snippet */ + int *piScore, /* OUT: "Score" for this snippet */ + u64 *pmCover, /* OUT: Bitmask of phrases covered */ + u64 *pmHighlight /* OUT: Bitmask of terms to highlight */ ){ - int i; - int nFin = 0; - - assert( (iPos&(SNIPPET_BUFFER_CHUNK-1))==0 ); + int iStart = pIter->iCurrent; /* First token of snippet */ + int iScore = 0; /* Score of this snippet */ + int i; /* Loop counter */ + u64 mCover = 0; /* Mask of phrases covered by this snippet */ + u64 mHighlight = 0; /* Mask of tokens to highlight in snippet */ - memset(&aBuffer[iPos&SNIPPET_BUFFER_MASK], 0, SNIPPET_BUFFER_CHUNK); + for(i=0; i<pIter->nPhrase; i++){ + SnippetPhrase *pPhrase = &pIter->aPhrase[i]; + if( pPhrase->pTail ){ + char *pCsr = pPhrase->pTail; + int iCsr = pPhrase->iTail; - for(i=0; i<nList; i++){ - int iPrev = aiPrev[i]; - char *pList = apList[i]; + while( iCsr<(iStart+pIter->nSnippet) ){ + int j; + u64 mPhrase = (u64)1 << i; + u64 mPos = (u64)1 << (iCsr - iStart); + assert( iCsr>=iStart ); + if( (mCover|mCovered)&mPhrase ){ + iScore++; + }else{ + iScore += 1000; + } + mCover |= mPhrase; - if( !pList ){ - nFin++; - continue; - } + for(j=0; j<pPhrase->nToken; j++){ + mHighlight |= (mPos>>j); + } - while( iPrev<(iPos+SNIPPET_BUFFER_CHUNK) ){ - if( iPrev>=iPos ){ - aBuffer[iPrev&SNIPPET_BUFFER_MASK] = (u8)(i+1); + if( 0==(*pCsr & 0x0FE) ) break; + fts3GetDeltaPosition(&pCsr, &iCsr); } - if( 0==((*pList)&0xFE) ){ - nFin++; - break; - } - fts3GetDeltaPosition(&pList, &iPrev); } - - aiPrev[i] = iPrev; - apList[i] = pList; } - return (nFin==nList); + /* Set the output variables before returning. */ + *piToken = iStart; + *piScore = iScore; + *pmCover = mCover; + *pmHighlight = mHighlight; } -typedef struct SnippetCtx SnippetCtx; -struct SnippetCtx { - Fts3Cursor *pCsr; - int iCol; - int iPhrase; - int *aiPrev; - int *anToken; - char **apList; -}; - -static int fts3SnippetFindPositions(Fts3Expr *pExpr, void *ctx){ - SnippetCtx *p = (SnippetCtx *)ctx; - int iPhrase = p->iPhrase++; +/* +** This function is an fts3ExprIterate() callback used by fts3BestSnippet(). +** Each invocation populates an element of the SnippetIter.aPhrase[] array. +*/ +static int fts3SnippetFindPositions(Fts3Expr *pExpr, int iPhrase, void *ctx){ + SnippetIter *p = (SnippetIter *)ctx; + SnippetPhrase *pPhrase = &p->aPhrase[iPhrase]; char *pCsr; - p->anToken[iPhrase] = pExpr->pPhrase->nToken; - pCsr = sqlite3Fts3FindPositions(pExpr, p->pCsr->iPrevId, p->iCol); + pPhrase->nToken = pExpr->pPhrase->nToken; + pCsr = sqlite3Fts3FindPositions(pExpr, p->pCsr->iPrevId, p->iCol); if( pCsr ){ - int iVal; - pCsr += sqlite3Fts3GetVarint32(pCsr, &iVal); - p->apList[iPhrase] = pCsr; - p->aiPrev[iPhrase] = iVal-2; - } - return SQLITE_OK; -} - -static void fts3SnippetCnt( - int iIdx, - int nSnippet, - int *anCnt, - u8 *aBuffer, - int *anToken, - u64 *pHlmask -){ - int iSub = (iIdx-1)&SNIPPET_BUFFER_MASK; - int iAdd = (iIdx+nSnippet-1)&SNIPPET_BUFFER_MASK; - int iSub2 = (iIdx+(nSnippet/3)-1)&SNIPPET_BUFFER_MASK; - int iAdd2 = (iIdx+(nSnippet*2/3)-1)&SNIPPET_BUFFER_MASK; - - u64 h = *pHlmask; - - anCnt[ aBuffer[iSub] ]--; - anCnt[ aBuffer[iSub2] ]--; - anCnt[ aBuffer[iAdd] ]++; - anCnt[ aBuffer[iAdd2] ]++; - - h = h >> 1; - if( aBuffer[iAdd] ){ - int j; - for(j=anToken[aBuffer[iAdd]-1]; j>=1; j--){ - h |= (u64)1 << (nSnippet-j); - } + int iFirst = 0; + pPhrase->pList = pCsr; + fts3GetDeltaPosition(&pCsr, &iFirst); + pPhrase->pHead = pCsr; + pPhrase->pTail = pCsr; + pPhrase->iHead = iFirst; + pPhrase->iTail = iFirst; + }else{ + assert( pPhrase->pList==0 && pPhrase->pHead==0 && pPhrase->pTail==0 ); } - *pHlmask = h; -} -static int fts3SnippetScore(int n, int *anCnt){ - int j; - int iScore = 0; - for(j=1; j<=n; j++){ - int nCnt = anCnt[j]; - iScore += nCnt + (nCnt ? 1000 : 0); - } - return iScore; + return SQLITE_OK; } +/* +** Select the fragment of text consisting of nFragment contiguous tokens +** from column iCol that represent the "best" snippet. The best snippet +** is the snippet with the highest score, where scores are calculated +** by adding: +** +** (a) +1 point for each occurence of a matchable phrase in the snippet. +** +** (b) +1000 points for the first occurence of each matchable phrase in +** the snippet for which the corresponding mCovered bit is not set. +** +** The selected snippet parameters are stored in structure *pFragment before +** returning. The score of the selected snippet is stored in *piScore +** before returning. +*/ static int fts3BestSnippet( int nSnippet, /* Desired snippet length */ Fts3Cursor *pCsr, /* Cursor to create snippet for */ int iCol, /* Index of column to create snippet from */ - int *piPos, /* OUT: Starting token for best snippet */ - u64 *pHlmask /* OUT: Highlight mask for best snippet */ + u64 mCovered, /* Mask of phrases already covered */ + u64 *pmSeen, /* IN/OUT: Mask of phrases seen */ + SnippetFragment *pFragment, /* OUT: Best snippet found */ + int *piScore /* OUT: Score of snippet pFragment */ ){ int rc; /* Return Code */ - u8 aBuffer[SNIPPET_BUFFER_SIZE];/* Circular snippet buffer */ - int *aiPrev; /* Used by fts3LoadSnippetBuffer() */ - int *anToken; /* Number of tokens in each phrase */ - char **apList; /* Array of position lists */ - int *anCnt; /* Running totals of phrase occurences */ - int nList; - - int i; + int nList; /* Number of phrases in expression */ + SnippetIter sIter; /* Iterates through snippet candidates */ + int nByte; /* Number of bytes of space to allocate */ + int iBestScore = -1; /* Best snippet score found so far */ + int i; /* Loop counter */ - u64 hlmask = 0; /* Current mask of highlighted terms */ - u64 besthlmask = 0; /* Mask of highlighted terms for iBestPos */ - int iBestPos = 0; /* Starting position of 'best' snippet */ - int iBestScore = 0; /* Score of best snippet higher->better */ - SnippetCtx sCtx; + memset(&sIter, 0, sizeof(sIter)); /* Iterate through the phrases in the expression to count them. The same ** callback makes sure the doclists are loaded for each phrase. */ - rc = fts3ExprLoadDoclists(pCsr, &nList); + rc = fts3ExprLoadDoclists(pCsr, &nList, 0); if( rc!=SQLITE_OK ){ return rc; } /* Now that it is known how many phrases there are, allocate and zero - ** the required arrays using malloc(). + ** the required space using malloc(). */ - apList = sqlite3_malloc( - sizeof(u8*)*nList + /* apList */ - sizeof(int)*(nList) + /* anToken */ - sizeof(int)*nList + /* aiPrev */ - sizeof(int)*(nList+1) /* anCnt */ - ); - if( !apList ){ + nByte = sizeof(SnippetPhrase) * nList; + sIter.aPhrase = (SnippetPhrase *)sqlite3_malloc(nByte); + if( !sIter.aPhrase ){ return SQLITE_NOMEM; } - memset(apList, 0, sizeof(u8*)*nList+sizeof(int)*nList+sizeof(int)*nList); - anToken = (int *)&apList[nList]; - aiPrev = &anToken[nList]; - anCnt = &aiPrev[nList]; - - /* Initialize the contents of the aiPrev and aiList arrays. */ - sCtx.pCsr = pCsr; - sCtx.iCol = iCol; - sCtx.apList = apList; - sCtx.aiPrev = aiPrev; - sCtx.anToken = anToken; - sCtx.iPhrase = 0; - (void)fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sCtx); - - /* Load the first two chunks of data into the buffer. */ - memset(aBuffer, 0, SNIPPET_BUFFER_SIZE); - fts3LoadSnippetBuffer(0, aBuffer, nList, apList, aiPrev); - fts3LoadSnippetBuffer(SNIPPET_BUFFER_CHUNK, aBuffer, nList, apList, aiPrev); - - /* Set the initial contents of the highlight-mask and anCnt[] array. */ - for(i=1-nSnippet; i<=0; i++){ - fts3SnippetCnt(i, nSnippet, anCnt, aBuffer, anToken, &hlmask); - } - iBestScore = fts3SnippetScore(nList, anCnt); - besthlmask = hlmask; - iBestPos = 0; - - for(i=1; 1; i++){ - int iScore; + memset(sIter.aPhrase, 0, nByte); - if( 0==(i&(SNIPPET_BUFFER_CHUNK-1)) ){ - int iLoad = i + SNIPPET_BUFFER_CHUNK; - if( fts3LoadSnippetBuffer(iLoad, aBuffer, nList, apList, aiPrev) ) break; + /* Initialize the contents of the SnippetIter object. Then iterate through + ** the set of phrases in the expression to populate the aPhrase[] array. + */ + sIter.pCsr = pCsr; + sIter.iCol = iCol; + sIter.nSnippet = nSnippet; + sIter.nPhrase = nList; + sIter.iCurrent = -1; + (void)fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sIter); + + /* Set the *pmSeen output variable. */ + for(i=0; i<nList; i++){ + if( sIter.aPhrase[i].pHead ){ + *pmSeen |= (u64)1 << i; } + } - /* Figure out how highly a snippet starting at token offset i scores - ** according to fts3SnippetScore(). If it is higher than any previously - ** considered position, save the current position, score and hlmask as - ** the best snippet candidate found so far. - */ - fts3SnippetCnt(i, nSnippet, anCnt, aBuffer, anToken, &hlmask); - iScore = fts3SnippetScore(nList, anCnt); + /* Loop through all candidate snippets. Store the best snippet in + ** *pFragment. Store its associated 'score' in iBestScore. + */ + pFragment->iCol = iCol; + while( !fts3SnippetNextCandidate(&sIter) ){ + int iPos; + int iScore; + u64 mCover; + u64 mHighlight; + fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover, &mHighlight); + assert( iScore>=0 ); if( iScore>iBestScore ){ - iBestPos = i; + pFragment->iPos = iPos; + pFragment->hlmask = mHighlight; + pFragment->covered = mCover; iBestScore = iScore; - besthlmask = hlmask; } } - sqlite3_free(apList); - *piPos = iBestPos; - *pHlmask = besthlmask; + sqlite3_free(sIter.aPhrase); + *piScore = iBestScore; return SQLITE_OK; } -typedef struct StrBuffer StrBuffer; -struct StrBuffer { - char *z; - int n; - int nAlloc; -}; +/* +** Append a string to the string-buffer passed as the first argument. +** +** If nAppend is negative, then the length of the string zAppend is +** determined using strlen(). +*/ static int fts3StringAppend( - StrBuffer *pStr, - const char *zAppend, - int nAppend + StrBuffer *pStr, /* Buffer to append to */ + const char *zAppend, /* Pointer to data to append to buffer */ + int nAppend /* Size of zAppend in bytes (or -1) */ ){ if( nAppend<0 ){ nAppend = (int)strlen(zAppend); } + /* If there is insufficient space allocated at StrBuffer.z, use realloc() + ** to grow the buffer until so that it is big enough to accomadate the + ** appended data. + */ if( pStr->n+nAppend+1>=pStr->nAlloc ){ int nAlloc = pStr->nAlloc+nAppend+100; char *zNew = sqlite3_realloc(pStr->z, nAlloc); @@ -106942,6 +108139,7 @@ static int fts3StringAppend( pStr->nAlloc = nAlloc; } + /* Append the data to the string buffer. */ memcpy(&pStr->z[pStr->n], zAppend, nAppend); pStr->n += nAppend; pStr->z[pStr->n] = '\0'; @@ -106949,126 +108147,201 @@ static int fts3StringAppend( return SQLITE_OK; } +/* +** The fts3BestSnippet() function often selects snippets that end with a +** query term. That is, the final term of the snippet is always a term +** that requires highlighting. For example, if 'X' is a highlighted term +** and '.' is a non-highlighted term, BestSnippet() may select: +** +** ........X.....X +** +** This function "shifts" the beginning of the snippet forward in the +** document so that there are approximately the same number of +** non-highlighted terms to the right of the final highlighted term as there +** are to the left of the first highlighted term. For example, to this: +** +** ....X.....X.... +** +** This is done as part of extracting the snippet text, not when selecting +** the snippet. Snippet selection is done based on doclists only, so there +** is no way for fts3BestSnippet() to know whether or not the document +** actually contains terms that follow the final highlighted term. +*/ +int fts3SnippetShift( + Fts3Table *pTab, /* FTS3 table snippet comes from */ + int nSnippet, /* Number of tokens desired for snippet */ + const char *zDoc, /* Document text to extract snippet from */ + int nDoc, /* Size of buffer zDoc in bytes */ + int *piPos, /* IN/OUT: First token of snippet */ + u64 *pHlmask /* IN/OUT: Mask of tokens to highlight */ +){ + u64 hlmask = *pHlmask; /* Local copy of initial highlight-mask */ + + if( hlmask ){ + int nLeft; /* Tokens to the left of first highlight */ + int nRight; /* Tokens to the right of last highlight */ + int nDesired; /* Ideal number of tokens to shift forward */ + + for(nLeft=0; !(hlmask & ((u64)1 << nLeft)); nLeft++); + for(nRight=0; !(hlmask & ((u64)1 << (nSnippet-1-nRight))); nRight++); + nDesired = (nLeft-nRight)/2; + + /* Ideally, the start of the snippet should be pushed forward in the + ** document nDesired tokens. This block checks if there are actually + ** nDesired tokens to the right of the snippet. If so, *piPos and + ** *pHlMask are updated to shift the snippet nDesired tokens to the + ** right. Otherwise, the snippet is shifted by the number of tokens + ** available. + */ + if( nDesired>0 ){ + int nShift; /* Number of tokens to shift snippet by */ + int iCurrent = 0; /* Token counter */ + int rc; /* Return Code */ + sqlite3_tokenizer_module *pMod; + sqlite3_tokenizer_cursor *pC; + pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule; + + /* Open a cursor on zDoc/nDoc. Check if there are (nSnippet+nDesired) + ** or more tokens in zDoc/nDoc. + */ + rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC); + if( rc!=SQLITE_OK ){ + return rc; + } + pC->pTokenizer = pTab->pTokenizer; + while( rc==SQLITE_OK && iCurrent<(nSnippet+nDesired) ){ + const char *ZDUMMY; int DUMMY1, DUMMY2, DUMMY3; + rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent); + } + pMod->xClose(pC); + if( rc!=SQLITE_OK && rc!=SQLITE_DONE ){ return rc; } + + nShift = (rc==SQLITE_DONE)+iCurrent-nSnippet; + assert( nShift<=nDesired ); + if( nShift>0 ){ + *piPos += nShift; + *pHlmask = hlmask >> nShift; + } + } + } + return SQLITE_OK; +} + +/* +** Extract the snippet text for fragment pFragment from cursor pCsr and +** append it to string buffer pOut. +*/ static int fts3SnippetText( Fts3Cursor *pCsr, /* FTS3 Cursor */ - const char *zDoc, /* Document to extract snippet from */ - int nDoc, /* Size of zDoc in bytes */ + SnippetFragment *pFragment, /* Snippet to extract */ + int iFragment, /* Fragment number */ + int isLast, /* True for final fragment in snippet */ int nSnippet, /* Number of tokens in extracted snippet */ - int iPos, /* Index of first document token in snippet */ - u64 hlmask, /* Bitmask of terms to highlight in snippet */ const char *zOpen, /* String inserted before highlighted term */ const char *zClose, /* String inserted after highlighted term */ - const char *zEllipsis, - char **pzSnippet /* OUT: Snippet text */ + const char *zEllipsis, /* String inserted between snippets */ + StrBuffer *pOut /* Write output here */ ){ Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab; int rc; /* Return code */ - int iCurrent = 0; - int iStart = 0; - int iEnd; - + const char *zDoc; /* Document text to extract snippet from */ + int nDoc; /* Size of zDoc in bytes */ + int iCurrent = 0; /* Current token number of document */ + int iEnd = 0; /* Byte offset of end of current token */ + int isShiftDone = 0; /* True after snippet is shifted */ + int iPos = pFragment->iPos; /* First token of snippet */ + u64 hlmask = pFragment->hlmask; /* Highlight-mask for snippet */ + int iCol = pFragment->iCol+1; /* Query column to extract text from */ sqlite3_tokenizer_module *pMod; /* Tokenizer module methods object */ sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor open on zDoc/nDoc */ - const char *ZDUMMY; /* Dummy arguments used with tokenizer */ - int DUMMY1, DUMMY2, DUMMY3; /* Dummy arguments used with tokenizer */ - - StrBuffer res = {0, 0, 0}; /* Result string */ + const char *ZDUMMY; /* Dummy argument used with tokenizer */ + int DUMMY1; /* Dummy argument used with tokenizer */ + + zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol); + if( zDoc==0 ){ + if( sqlite3_column_type(pCsr->pStmt, iCol)!=SQLITE_NULL ){ + return SQLITE_NOMEM; + } + return SQLITE_OK; + } + nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol); - /* Open a token cursor on the document. Read all tokens up to and - ** including token iPos (the first token of the snippet). Set variable - ** iStart to the byte offset in zDoc of the start of token iPos. - */ + /* Open a token cursor on the document. */ pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule; rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC); - while( rc==SQLITE_OK && iCurrent<iPos ){ - rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iStart, &DUMMY2, &iCurrent); - } - iEnd = iStart; - - if( rc==SQLITE_OK && iStart>0 ){ - rc = fts3StringAppend(&res, zEllipsis, -1); + if( rc!=SQLITE_OK ){ + return rc; } + pC->pTokenizer = pTab->pTokenizer; while( rc==SQLITE_OK ){ - int iBegin; - int iFin; + int iBegin; /* Offset in zDoc of start of token */ + int iFin; /* Offset in zDoc of end of token */ + int isHighlight; /* True for highlighted terms */ + rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent); + if( rc!=SQLITE_OK ){ + if( rc==SQLITE_DONE ){ + /* Special case - the last token of the snippet is also the last token + ** of the column. Append any punctuation that occurred between the end + ** of the previous token and the end of the document to the output. + ** Then break out of the loop. */ + rc = fts3StringAppend(pOut, &zDoc[iEnd], -1); + } + break; + } + if( iCurrent<iPos ){ continue; } - if( rc==SQLITE_OK ){ - if( iCurrent>=(iPos+nSnippet) ){ - rc = SQLITE_DONE; - }else{ - iEnd = iFin; - if( hlmask & ((u64)1 << (iCurrent-iPos)) ){ - if( fts3StringAppend(&res, &zDoc[iStart], iBegin-iStart) - || fts3StringAppend(&res, zOpen, -1) - || fts3StringAppend(&res, &zDoc[iBegin], iEnd-iBegin) - || fts3StringAppend(&res, zClose, -1) - ){ - rc = SQLITE_NOMEM; - } - iStart = iEnd; - } + if( !isShiftDone ){ + int n = nDoc - iBegin; + rc = fts3SnippetShift(pTab, nSnippet, &zDoc[iBegin], n, &iPos, &hlmask); + isShiftDone = 1; + + /* Now that the shift has been done, check if the initial "..." are + ** required. They are required if (a) this is not the first fragment, + ** or (b) this fragment does not begin at position 0 of its column. + */ + if( rc==SQLITE_OK && (iPos>0 || iFragment>0) ){ + rc = fts3StringAppend(pOut, zEllipsis, -1); } + if( rc!=SQLITE_OK || iCurrent<iPos ) continue; } - } - assert( rc!=SQLITE_OK ); - if( rc==SQLITE_DONE ){ - rc = fts3StringAppend(&res, &zDoc[iStart], iEnd-iStart); - if( rc==SQLITE_OK ){ - rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent); - if( rc==SQLITE_OK ){ - rc = fts3StringAppend(&res, zEllipsis, -1); - }else if( rc==SQLITE_DONE ){ - rc = fts3StringAppend(&res, &zDoc[iEnd], -1); + + if( iCurrent>=(iPos+nSnippet) ){ + if( isLast ){ + rc = fts3StringAppend(pOut, zEllipsis, -1); } + break; } + + /* Set isHighlight to true if this term should be highlighted. */ + isHighlight = (hlmask & ((u64)1 << (iCurrent-iPos)))!=0; + + if( iCurrent>iPos ) rc = fts3StringAppend(pOut, &zDoc[iEnd], iBegin-iEnd); + if( rc==SQLITE_OK && isHighlight ) rc = fts3StringAppend(pOut, zOpen, -1); + if( rc==SQLITE_OK ) rc = fts3StringAppend(pOut, &zDoc[iBegin], iFin-iBegin); + if( rc==SQLITE_OK && isHighlight ) rc = fts3StringAppend(pOut, zClose, -1); + + iEnd = iFin; } pMod->xClose(pC); - if( rc!=SQLITE_OK ){ - sqlite3_free(res.z); - }else{ - *pzSnippet = res.z; - } return rc; } /* -** An instance of this structure is used to collect the 'global' part of -** the matchinfo statistics. The 'global' part consists of the following: -** -** 1. The number of phrases in the query (nPhrase). -** -** 2. The number of columns in the FTS3 table (nCol). -** -** 3. A matrix of (nPhrase*nCol) integers containing the sum of the -** number of hits for each phrase in each column across all rows -** of the table. -** -** The total size of the global matchinfo array, assuming the number of -** columns is N and the number of phrases is P is: +** This function is used to count the entries in a column-list (a +** delta-encoded list of term offsets within a single column of a single +** row). When this function is called, *ppCollist should point to the +** beginning of the first varint in the column-list (the varint that +** contains the position of the first matching term in the column data). +** Before returning, *ppCollist is set to point to the first byte after +** the last varint in the column-list (either the 0x00 signifying the end +** of the position-list, or the 0x01 that precedes the column number of +** the next column in the position-list). ** -** 2 + P*(N+1) -** -** The number of hits for the 3rd phrase in the second column is found -** using the expression: -** -** aGlobal[2 + P*(1+2) + 1] -*/ -typedef struct MatchInfo MatchInfo; -struct MatchInfo { - Fts3Table *pTab; /* FTS3 Table */ - Fts3Cursor *pCursor; /* FTS3 Cursor */ - int iPhrase; /* Number of phrases so far */ - int nCol; /* Number of columns in table */ - u32 *aGlobal; /* Pre-allocated buffer */ -}; - -/* -** This function is used to count the entries in a column-list (delta-encoded -** list of term offsets within a single column of a single row). +** The number of elements in the column-list is returned. */ static int fts3ColumnlistCount(char **ppCollist){ char *pEnd = *ppCollist; @@ -107085,15 +108358,21 @@ static int fts3ColumnlistCount(char **ppCollist){ return nEntry; } -static void fts3LoadColumnlistCounts(char **pp, u32 *aOut){ +static void fts3LoadColumnlistCounts(char **pp, u32 *aOut, int isGlobal){ char *pCsr = *pp; while( *pCsr ){ + int nHit; sqlite3_int64 iCol = 0; if( *pCsr==0x01 ){ pCsr++; pCsr += sqlite3Fts3GetVarint(pCsr, &iCol); } - aOut[iCol] += fts3ColumnlistCount(&pCsr); + nHit = fts3ColumnlistCount(&pCsr); + assert( nHit>0 ); + if( isGlobal ){ + aOut[iCol*3+1]++; + } + aOut[iCol*3] += nHit; } pCsr++; *pp = pCsr; @@ -107101,16 +108380,18 @@ static void fts3LoadColumnlistCounts(char **pp, u32 *aOut){ /* ** fts3ExprIterate() callback used to collect the "global" matchinfo stats -** for a single query. +** for a single query. The "global" stats are those elements of the matchinfo +** array that are constant for all rows returned by the current query. */ static int fts3ExprGlobalMatchinfoCb( Fts3Expr *pExpr, /* Phrase expression node */ + int iPhrase, /* Phrase number (numbered from zero) */ void *pCtx /* Pointer to MatchInfo structure */ ){ MatchInfo *p = (MatchInfo *)pCtx; char *pCsr; char *pEnd; - const int iStart = 2 + p->nCol*p->iPhrase; + const int iStart = 2 + (iPhrase * p->nCol * 3) + 1; assert( pExpr->isLoaded ); @@ -107118,84 +108399,108 @@ static int fts3ExprGlobalMatchinfoCb( pCsr = pExpr->aDoclist; pEnd = &pExpr->aDoclist[pExpr->nDoclist]; while( pCsr<pEnd ){ - while( *pCsr++ & 0x80 ); - fts3LoadColumnlistCounts(&pCsr, &p->aGlobal[iStart]); + while( *pCsr++ & 0x80 ); /* Skip past docid. */ + fts3LoadColumnlistCounts(&pCsr, &p->aMatchinfo[iStart], 1); } - p->iPhrase++; return SQLITE_OK; } +/* +** fts3ExprIterate() callback used to collect the "local" matchinfo stats +** for a single query. The "local" stats are those elements of the matchinfo +** array that are different for each row returned by the query. +*/ static int fts3ExprLocalMatchinfoCb( Fts3Expr *pExpr, /* Phrase expression node */ + int iPhrase, /* Phrase number */ void *pCtx /* Pointer to MatchInfo structure */ ){ MatchInfo *p = (MatchInfo *)pCtx; - int iPhrase = p->iPhrase++; if( pExpr->aDoclist ){ char *pCsr; - int iOffset = 2 + p->nCol*(p->aGlobal[0]+iPhrase); + int iStart = 2 + (iPhrase * p->nCol * 3); + int i; + + for(i=0; i<p->nCol; i++) p->aMatchinfo[iStart+i*3] = 0; - memset(&p->aGlobal[iOffset], 0, p->nCol*sizeof(u32)); pCsr = sqlite3Fts3FindPositions(pExpr, p->pCursor->iPrevId, -1); - if( pCsr ) fts3LoadColumnlistCounts(&pCsr, &p->aGlobal[iOffset]); + if( pCsr ){ + fts3LoadColumnlistCounts(&pCsr, &p->aMatchinfo[iStart], 0); + } } return SQLITE_OK; } /* -** Populate pCsr->aMatchinfo[] with data for the current row. The 'matchinfo' -** data is an array of 32-bit unsigned integers (C type u32). +** Populate pCsr->aMatchinfo[] with data for the current row. The +** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32). */ static int fts3GetMatchinfo(Fts3Cursor *pCsr){ - MatchInfo g; + MatchInfo sInfo; Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab; + int rc = SQLITE_OK; + + sInfo.pCursor = pCsr; + sInfo.nCol = pTab->nColumn; + if( pCsr->aMatchinfo==0 ){ - int rc; - int nPhrase; - int nMatchinfo; + /* If Fts3Cursor.aMatchinfo[] is NULL, then this is the first time the + ** matchinfo function has been called for this query. In this case + ** allocate the array used to accumulate the matchinfo data and + ** initialize those elements that are constant for every row. + */ + int nPhrase; /* Number of phrases */ + int nMatchinfo; /* Number of u32 elements in match-info */ - g.pTab = pTab; - g.nCol = pTab->nColumn; - g.iPhrase = 0; - rc = fts3ExprLoadDoclists(pCsr, &nPhrase); + /* Load doclists for each phrase in the query. */ + rc = fts3ExprLoadDoclists(pCsr, &nPhrase, 0); if( rc!=SQLITE_OK ){ return rc; } + nMatchinfo = 2 + 3*sInfo.nCol*nPhrase; + if( pTab->bHasDocsize ){ + nMatchinfo += 1 + 2*pTab->nColumn; + } - nMatchinfo = 2 + 2*g.nCol*nPhrase; - - g.iPhrase = 0; - g.aGlobal = (u32 *)sqlite3_malloc(sizeof(u32)*nMatchinfo); - if( !g.aGlobal ){ + sInfo.aMatchinfo = (u32 *)sqlite3_malloc(sizeof(u32)*nMatchinfo); + if( !sInfo.aMatchinfo ){ return SQLITE_NOMEM; } - memset(g.aGlobal, 0, sizeof(u32)*nMatchinfo); + memset(sInfo.aMatchinfo, 0, sizeof(u32)*nMatchinfo); - g.aGlobal[0] = nPhrase; - g.aGlobal[1] = g.nCol; - (void)fts3ExprIterate(pCsr->pExpr, fts3ExprGlobalMatchinfoCb, (void *)&g); - pCsr->aMatchinfo = g.aGlobal; + /* First element of match-info is the number of phrases in the query */ + sInfo.aMatchinfo[0] = nPhrase; + sInfo.aMatchinfo[1] = sInfo.nCol; + (void)fts3ExprIterate(pCsr->pExpr, fts3ExprGlobalMatchinfoCb,(void*)&sInfo); + if( pTab->bHasDocsize ){ + int ofst = 2 + 3*sInfo.aMatchinfo[0]*sInfo.aMatchinfo[1]; + rc = sqlite3Fts3MatchinfoDocsizeGlobal(pCsr, &sInfo.aMatchinfo[ofst]); + } + pCsr->aMatchinfo = sInfo.aMatchinfo; + pCsr->isMatchinfoNeeded = 1; } - g.pTab = pTab; - g.pCursor = pCsr; - g.nCol = pTab->nColumn; - g.iPhrase = 0; - g.aGlobal = pCsr->aMatchinfo; - - if( pCsr->isMatchinfoOk ){ - (void)fts3ExprIterate(pCsr->pExpr, fts3ExprLocalMatchinfoCb, (void *)&g); - pCsr->isMatchinfoOk = 0; + sInfo.aMatchinfo = pCsr->aMatchinfo; + if( rc==SQLITE_OK && pCsr->isMatchinfoNeeded ){ + (void)fts3ExprIterate(pCsr->pExpr, fts3ExprLocalMatchinfoCb, (void*)&sInfo); + if( pTab->bHasDocsize ){ + int ofst = 2 + 3*sInfo.aMatchinfo[0]*sInfo.aMatchinfo[1]; + rc = sqlite3Fts3MatchinfoDocsizeLocal(pCsr, &sInfo.aMatchinfo[ofst]); + } + pCsr->isMatchinfoNeeded = 0; } return SQLITE_OK; } -SQLITE_PRIVATE void sqlite3Fts3Snippet2( +/* +** Implementation of snippet() function. +*/ +SQLITE_PRIVATE void sqlite3Fts3Snippet( sqlite3_context *pCtx, /* SQLite function call context */ Fts3Cursor *pCsr, /* Cursor object */ const char *zStart, /* Snippet start text - "<b>" */ @@ -107204,35 +108509,292 @@ SQLITE_PRIVATE void sqlite3Fts3Snippet2( int iCol, /* Extract snippet from this column */ int nToken /* Approximate number of tokens in snippet */ ){ - int rc; - int iPos = 0; - u64 hlmask = 0; - char *z = 0; - int nDoc; - const char *zDoc; + Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab; + int rc = SQLITE_OK; + int i; + StrBuffer res = {0, 0, 0}; + + /* The returned text includes up to four fragments of text extracted from + ** the data in the current row. The first iteration of the for(...) loop + ** below attempts to locate a single fragment of text nToken tokens in + ** size that contains at least one instance of all phrases in the query + ** expression that appear in the current row. If such a fragment of text + ** cannot be found, the second iteration of the loop attempts to locate + ** a pair of fragments, and so on. + */ + int nSnippet = 0; /* Number of fragments in this snippet */ + SnippetFragment aSnippet[4]; /* Maximum of 4 fragments per snippet */ + int nFToken = -1; /* Number of tokens in each fragment */ + + if( !pCsr->pExpr ){ + sqlite3_result_text(pCtx, "", 0, SQLITE_STATIC); + return; + } - rc = fts3BestSnippet(nToken, pCsr, iCol, &iPos, &hlmask); + for(nSnippet=1; 1; nSnippet++){ - nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol+1); - zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol+1); + int iSnip; /* Loop counter 0..nSnippet-1 */ + u64 mCovered = 0; /* Bitmask of phrases covered by snippet */ + u64 mSeen = 0; /* Bitmask of phrases seen by BestSnippet() */ - if( rc==SQLITE_OK ){ - rc = fts3SnippetText( - pCsr, zDoc, nDoc, nToken, iPos, hlmask, zStart, zEnd, zEllipsis, &z); + if( nToken>=0 ){ + nFToken = (nToken+nSnippet-1) / nSnippet; + }else{ + nFToken = -1 * nToken; + } + + for(iSnip=0; iSnip<nSnippet; iSnip++){ + int iBestScore = -1; /* Best score of columns checked so far */ + int iRead; /* Used to iterate through columns */ + SnippetFragment *pFragment = &aSnippet[iSnip]; + + memset(pFragment, 0, sizeof(*pFragment)); + + /* Loop through all columns of the table being considered for snippets. + ** If the iCol argument to this function was negative, this means all + ** columns of the FTS3 table. Otherwise, only column iCol is considered. + */ + for(iRead=0; iRead<pTab->nColumn; iRead++){ + SnippetFragment sF; + int iS; + if( iCol>=0 && iRead!=iCol ) continue; + + /* Find the best snippet of nFToken tokens in column iRead. */ + rc = fts3BestSnippet(nFToken, pCsr, iRead, mCovered, &mSeen, &sF, &iS); + if( rc!=SQLITE_OK ){ + goto snippet_out; + } + if( iS>iBestScore ){ + *pFragment = sF; + iBestScore = iS; + } + } + + mCovered |= pFragment->covered; + } + + /* If all query phrases seen by fts3BestSnippet() are present in at least + ** one of the nSnippet snippet fragments, break out of the loop. + */ + assert( (mCovered&mSeen)==mCovered ); + if( mSeen==mCovered || nSnippet==SizeofArray(aSnippet) ) break; + } + + assert( nFToken>0 ); + + for(i=0; i<nSnippet && rc==SQLITE_OK; i++){ + rc = fts3SnippetText(pCsr, &aSnippet[i], + i, (i==nSnippet-1), nFToken, zStart, zEnd, zEllipsis, &res + ); } + + snippet_out: if( rc!=SQLITE_OK ){ sqlite3_result_error_code(pCtx, rc); + sqlite3_free(res.z); }else{ - sqlite3_result_text(pCtx, z, -1, sqlite3_free); + sqlite3_result_text(pCtx, res.z, -1, sqlite3_free); } } + +typedef struct TermOffset TermOffset; +typedef struct TermOffsetCtx TermOffsetCtx; + +struct TermOffset { + char *pList; /* Position-list */ + int iPos; /* Position just read from pList */ + int iOff; /* Offset of this term from read positions */ +}; + +struct TermOffsetCtx { + int iCol; /* Column of table to populate aTerm for */ + int iTerm; + sqlite3_int64 iDocid; + TermOffset *aTerm; +}; + +/* +** This function is an fts3ExprIterate() callback used by sqlite3Fts3Offsets(). +*/ +static int fts3ExprTermOffsetInit(Fts3Expr *pExpr, int iPhrase, void *ctx){ + TermOffsetCtx *p = (TermOffsetCtx *)ctx; + int nTerm; /* Number of tokens in phrase */ + int iTerm; /* For looping through nTerm phrase terms */ + char *pList; /* Pointer to position list for phrase */ + int iPos = 0; /* First position in position-list */ + + UNUSED_PARAMETER(iPhrase); + pList = sqlite3Fts3FindPositions(pExpr, p->iDocid, p->iCol); + nTerm = pExpr->pPhrase->nToken; + if( pList ){ + fts3GetDeltaPosition(&pList, &iPos); + assert( iPos>=0 ); + } + + for(iTerm=0; iTerm<nTerm; iTerm++){ + TermOffset *pT = &p->aTerm[p->iTerm++]; + pT->iOff = nTerm-iTerm-1; + pT->pList = pList; + pT->iPos = iPos; + } + + return SQLITE_OK; +} + +/* +** Implementation of offsets() function. +*/ +SQLITE_PRIVATE void sqlite3Fts3Offsets( + sqlite3_context *pCtx, /* SQLite function call context */ + Fts3Cursor *pCsr /* Cursor object */ +){ + Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab; + sqlite3_tokenizer_module const *pMod = pTab->pTokenizer->pModule; + const char *ZDUMMY; /* Dummy argument used with xNext() */ + int NDUMMY; /* Dummy argument used with xNext() */ + int rc; /* Return Code */ + int nToken; /* Number of tokens in query */ + int iCol; /* Column currently being processed */ + StrBuffer res = {0, 0, 0}; /* Result string */ + TermOffsetCtx sCtx; /* Context for fts3ExprTermOffsetInit() */ + + if( !pCsr->pExpr ){ + sqlite3_result_text(pCtx, "", 0, SQLITE_STATIC); + return; + } + + memset(&sCtx, 0, sizeof(sCtx)); + assert( pCsr->isRequireSeek==0 ); + + /* Count the number of terms in the query */ + rc = fts3ExprLoadDoclists(pCsr, 0, &nToken); + if( rc!=SQLITE_OK ) goto offsets_out; + + /* Allocate the array of TermOffset iterators. */ + sCtx.aTerm = (TermOffset *)sqlite3_malloc(sizeof(TermOffset)*nToken); + if( 0==sCtx.aTerm ){ + rc = SQLITE_NOMEM; + goto offsets_out; + } + sCtx.iDocid = pCsr->iPrevId; + + /* Loop through the table columns, appending offset information to + ** string-buffer res for each column. + */ + for(iCol=0; iCol<pTab->nColumn; iCol++){ + sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */ + int iStart; + int iEnd; + int iCurrent; + const char *zDoc; + int nDoc; + + /* Initialize the contents of sCtx.aTerm[] for column iCol. There is + ** no way that this operation can fail, so the return code from + ** fts3ExprIterate() can be discarded. + */ + sCtx.iCol = iCol; + sCtx.iTerm = 0; + (void)fts3ExprIterate(pCsr->pExpr, fts3ExprTermOffsetInit, (void *)&sCtx); + + /* Retreive the text stored in column iCol. If an SQL NULL is stored + ** in column iCol, jump immediately to the next iteration of the loop. + ** If an OOM occurs while retrieving the data (this can happen if SQLite + ** needs to transform the data from utf-16 to utf-8), return SQLITE_NOMEM + ** to the caller. + */ + zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol+1); + nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol+1); + if( zDoc==0 ){ + if( sqlite3_column_type(pCsr->pStmt, iCol+1)==SQLITE_NULL ){ + continue; + } + rc = SQLITE_NOMEM; + goto offsets_out; + } + + /* Initialize a tokenizer iterator to iterate through column iCol. */ + rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC); + if( rc!=SQLITE_OK ) goto offsets_out; + pC->pTokenizer = pTab->pTokenizer; + + rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent); + while( rc==SQLITE_OK ){ + int i; /* Used to loop through terms */ + int iMinPos = 0x7FFFFFFF; /* Position of next token */ + TermOffset *pTerm = 0; /* TermOffset associated with next token */ + + for(i=0; i<nToken; i++){ + TermOffset *pT = &sCtx.aTerm[i]; + if( pT->pList && (pT->iPos-pT->iOff)<iMinPos ){ + iMinPos = pT->iPos-pT->iOff; + pTerm = pT; + } + } + + if( !pTerm ){ + /* All offsets for this column have been gathered. */ + break; + }else{ + assert( iCurrent<=iMinPos ); + if( 0==(0xFE&*pTerm->pList) ){ + pTerm->pList = 0; + }else{ + fts3GetDeltaPosition(&pTerm->pList, &pTerm->iPos); + } + while( rc==SQLITE_OK && iCurrent<iMinPos ){ + rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent); + } + if( rc==SQLITE_OK ){ + char aBuffer[64]; + sqlite3_snprintf(sizeof(aBuffer), aBuffer, + "%d %d %d %d ", iCol, pTerm-sCtx.aTerm, iStart, iEnd-iStart + ); + rc = fts3StringAppend(&res, aBuffer, -1); + }else if( rc==SQLITE_DONE ){ + rc = SQLITE_CORRUPT; + } + } + } + if( rc==SQLITE_DONE ){ + rc = SQLITE_OK; + } + + pMod->xClose(pC); + if( rc!=SQLITE_OK ) goto offsets_out; + } + + offsets_out: + sqlite3_free(sCtx.aTerm); + assert( rc!=SQLITE_DONE ); + if( rc!=SQLITE_OK ){ + sqlite3_result_error_code(pCtx, rc); + sqlite3_free(res.z); + }else{ + sqlite3_result_text(pCtx, res.z, res.n-1, sqlite3_free); + } + return; +} + +/* +** Implementation of matchinfo() function. +*/ SQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *pContext, Fts3Cursor *pCsr){ - int rc = fts3GetMatchinfo(pCsr); + int rc; + if( !pCsr->pExpr ){ + sqlite3_result_blob(pContext, "", 0, SQLITE_STATIC); + return; + } + rc = fts3GetMatchinfo(pCsr); if( rc!=SQLITE_OK ){ sqlite3_result_error_code(pContext, rc); }else{ - int n = sizeof(u32)*(2+pCsr->aMatchinfo[0]*pCsr->aMatchinfo[1]*2); + Fts3Table *pTab = (Fts3Table*)pCsr->base.pVtab; + int n = sizeof(u32)*(2+pCsr->aMatchinfo[0]*pCsr->aMatchinfo[1]*3); + if( pTab->bHasDocsize ){ + n += sizeof(u32)*(1 + 2*pTab->nColumn); + } sqlite3_result_blob(pContext, pCsr->aMatchinfo, n, SQLITE_TRANSIENT); } } @@ -107662,6 +109224,7 @@ nodeAcquire( rc = sqlite3_step(pRtree->pReadNode); if( rc==SQLITE_ROW ){ const u8 *zBlob = sqlite3_column_blob(pRtree->pReadNode, 0); + assert( sqlite3_column_bytes(pRtree->pReadNode, 0)==pRtree->iNodeSize ); memcpy(pNode->zData, zBlob, pRtree->iNodeSize); nodeReference(pParent); }else{ @@ -109858,31 +111421,69 @@ static int rtreeSqlInit( } /* -** This routine queries database handle db for the page-size used by -** database zDb. If successful, the page-size in bytes is written to -** *piPageSize and SQLITE_OK returned. Otherwise, and an SQLite error -** code is returned. +** The second argument to this function contains the text of an SQL statement +** that returns a single integer value. The statement is compiled and executed +** using database connection db. If successful, the integer value returned +** is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error +** code is returned and the value of *piVal after returning is not defined. */ -static int getPageSize(sqlite3 *db, const char *zDb, int *piPageSize){ +static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){ int rc = SQLITE_NOMEM; - char *zSql; - sqlite3_stmt *pStmt = 0; - - zSql = sqlite3_mprintf("PRAGMA %Q.page_size", zDb); - if( !zSql ){ - return SQLITE_NOMEM; + if( zSql ){ + sqlite3_stmt *pStmt = 0; + rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); + if( rc==SQLITE_OK ){ + if( SQLITE_ROW==sqlite3_step(pStmt) ){ + *piVal = sqlite3_column_int(pStmt, 0); + } + rc = sqlite3_finalize(pStmt); + } } + return rc; +} - rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0); - sqlite3_free(zSql); - if( rc!=SQLITE_OK ){ - return rc; +/* +** This function is called from within the xConnect() or xCreate() method to +** determine the node-size used by the rtree table being created or connected +** to. If successful, pRtree->iNodeSize is populated and SQLITE_OK returned. +** Otherwise, an SQLite error code is returned. +** +** If this function is being called as part of an xConnect(), then the rtree +** table already exists. In this case the node-size is determined by inspecting +** the root node of the tree. +** +** Otherwise, for an xCreate(), use 64 bytes less than the database page-size. +** This ensures that each node is stored on a single database page. If the +** database page-size is so large that more than RTREE_MAXCELLS entries +** would fit in a single node, use a smaller node-size. +*/ +static int getNodeSize( + sqlite3 *db, /* Database handle */ + Rtree *pRtree, /* Rtree handle */ + int isCreate /* True for xCreate, false for xConnect */ +){ + int rc; + char *zSql; + if( isCreate ){ + int iPageSize; + zSql = sqlite3_mprintf("PRAGMA %Q.page_size", pRtree->zDb); + rc = getIntFromStmt(db, zSql, &iPageSize); + if( rc==SQLITE_OK ){ + pRtree->iNodeSize = iPageSize-64; + if( (4+pRtree->nBytesPerCell*RTREE_MAXCELLS)<pRtree->iNodeSize ){ + pRtree->iNodeSize = 4+pRtree->nBytesPerCell*RTREE_MAXCELLS; + } + } + }else{ + zSql = sqlite3_mprintf( + "SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1", + pRtree->zDb, pRtree->zName + ); + rc = getIntFromStmt(db, zSql, &pRtree->iNodeSize); } - if( SQLITE_ROW==sqlite3_step(pStmt) ){ - *piPageSize = sqlite3_column_int(pStmt, 0); - } - return sqlite3_finalize(pStmt); + sqlite3_free(zSql); + return rc; } /* @@ -109903,7 +111504,6 @@ static int rtreeInit( int isCreate /* True for xCreate, false for xConnect */ ){ int rc = SQLITE_OK; - int iPageSize = 0; Rtree *pRtree; int nDb; /* Length of string argv[1] */ int nName; /* Length of string argv[2] */ @@ -109922,11 +111522,6 @@ static int rtreeInit( return SQLITE_ERROR; } - rc = getPageSize(db, argv[1], &iPageSize); - if( rc!=SQLITE_OK ){ - return rc; - } - /* Allocate the sqlite3_vtab structure */ nDb = strlen(argv[1]); nName = strlen(argv[2]); @@ -109945,44 +111540,37 @@ static int rtreeInit( memcpy(pRtree->zDb, argv[1], nDb); memcpy(pRtree->zName, argv[2], nName); - /* Figure out the node size to use. By default, use 64 bytes less than - ** the database page-size. This ensures that each node is stored on - ** a single database page. - ** - ** If the databasd page-size is so large that more than RTREE_MAXCELLS - ** entries would fit in a single node, use a smaller node-size. - */ - pRtree->iNodeSize = iPageSize-64; - if( (4+pRtree->nBytesPerCell*RTREE_MAXCELLS)<pRtree->iNodeSize ){ - pRtree->iNodeSize = 4+pRtree->nBytesPerCell*RTREE_MAXCELLS; - } + /* Figure out the node size to use. */ + rc = getNodeSize(db, pRtree, isCreate); /* Create/Connect to the underlying relational database schema. If ** that is successful, call sqlite3_declare_vtab() to configure ** the r-tree table schema. */ - if( (rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate)) ){ - *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db)); - }else{ - char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]); - char *zTmp; - int ii; - for(ii=4; zSql && ii<argc; ii++){ - zTmp = zSql; - zSql = sqlite3_mprintf("%s, %s", zTmp, argv[ii]); - sqlite3_free(zTmp); - } - if( zSql ){ - zTmp = zSql; - zSql = sqlite3_mprintf("%s);", zTmp); - sqlite3_free(zTmp); - } - if( !zSql ){ - rc = SQLITE_NOMEM; - }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){ + if( rc==SQLITE_OK ){ + if( (rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate)) ){ *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db)); + }else{ + char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]); + char *zTmp; + int ii; + for(ii=4; zSql && ii<argc; ii++){ + zTmp = zSql; + zSql = sqlite3_mprintf("%s, %s", zTmp, argv[ii]); + sqlite3_free(zTmp); + } + if( zSql ){ + zTmp = zSql; + zSql = sqlite3_mprintf("%s);", zTmp); + sqlite3_free(zTmp); + } + if( !zSql ){ + rc = SQLITE_NOMEM; + }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){ + *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db)); + } + sqlite3_free(zSql); } - sqlite3_free(zSql); } if( rc==SQLITE_OK ){ @@ -110113,7 +111701,7 @@ SQLITE_API int sqlite3_extension_init( ** May you share freely, never taking more than you give. ** ************************************************************************* -** $Id: sqlite3.c 294454 2010-02-03 20:23:53Z pajoye $ +** $Id: sqlite3.c 297173 2010-03-30 11:52:25Z iliaa $ ** ** This file implements an integration between the ICU library ** ("International Components for Unicode", an open-source library @@ -110614,7 +112202,7 @@ SQLITE_API int sqlite3_extension_init( ************************************************************************* ** This file implements a tokenizer for fts3 based on the ICU library. ** -** $Id: sqlite3.c 294454 2010-02-03 20:23:53Z pajoye $ +** $Id: sqlite3.c 297173 2010-03-30 11:52:25Z iliaa $ */ #if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) diff --git a/ext/sqlite3/libsqlite/sqlite3.h b/ext/sqlite3/libsqlite/sqlite3.h index 6709662bb..d72fdbd51 100644 --- a/ext/sqlite3/libsqlite/sqlite3.h +++ b/ext/sqlite3/libsqlite/sqlite3.h @@ -107,13 +107,13 @@ extern "C" { ** [sqlite3_libversion_number()], [sqlite3_sourceid()], ** [sqlite_version()] and [sqlite_source_id()]. */ -#define SQLITE_VERSION "3.6.22" -#define SQLITE_VERSION_NUMBER 3006022 -#define SQLITE_SOURCE_ID "2010-01-05 15:30:36 28d0d7710761114a44a1a3a425a6883c661f06e7" +#define SQLITE_VERSION "3.6.23.1" +#define SQLITE_VERSION_NUMBER 3006023 +#define SQLITE_SOURCE_ID "2010-03-26 22:28:06 b078b588d617e07886ad156e9f54ade6d823568e" /* ** CAPI3REF: Run-Time Library Version Numbers -** KEYWORDS: sqlite3_version +** KEYWORDS: sqlite3_version, sqlite3_sourceid ** ** These interfaces provide the same information as the [SQLITE_VERSION], ** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros @@ -135,9 +135,9 @@ extern "C" { ** function is provided for use in DLLs since DLL users usually do not have ** direct access to string constants within the DLL. ^The ** sqlite3_libversion_number() function returns an integer equal to -** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function a pointer -** to a string constant whose value is the same as the [SQLITE_SOURCE_ID] -** C preprocessor macro. +** [SQLITE_VERSION_NUMBER]. ^The sqlite3_sourceid() function returns +** a pointer to a string constant whose value is the same as the +** [SQLITE_SOURCE_ID] C preprocessor macro. ** ** See also: [sqlite_version()] and [sqlite_source_id()]. */ @@ -146,6 +146,33 @@ SQLITE_API const char *sqlite3_libversion(void); SQLITE_API const char *sqlite3_sourceid(void); SQLITE_API int sqlite3_libversion_number(void); +#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS +/* +** CAPI3REF: Run-Time Library Compilation Options Diagnostics +** +** ^The sqlite3_compileoption_used() function returns 0 or 1 +** indicating whether the specified option was defined at +** compile time. ^The SQLITE_ prefix may be omitted from the +** option name passed to sqlite3_compileoption_used(). +** +** ^The sqlite3_compileoption_get() function allows interating +** over the list of options that were defined at compile time by +** returning the N-th compile time option string. ^If N is out of range, +** sqlite3_compileoption_get() returns a NULL pointer. ^The SQLITE_ +** prefix is omitted from any strings returned by +** sqlite3_compileoption_get(). +** +** ^Support for the diagnostic functions sqlite3_compileoption_used() +** and sqlite3_compileoption_get() may be omitted by specifing the +** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time. +** +** See also: SQL functions [sqlite_compileoption_used()] and +** [sqlite_compileoption_get()] and the [compile_options pragma]. +*/ +SQLITE_API int sqlite3_compileoption_used(const char *zOptName); +SQLITE_API const char *sqlite3_compileoption_get(int N); +#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */ + /* ** CAPI3REF: Test To See If The Library Is Threadsafe ** @@ -437,6 +464,7 @@ SQLITE_API int sqlite3_exec( #define SQLITE_OPEN_CREATE 0x00000004 /* Ok for sqlite3_open_v2() */ #define SQLITE_OPEN_DELETEONCLOSE 0x00000008 /* VFS only */ #define SQLITE_OPEN_EXCLUSIVE 0x00000010 /* VFS only */ +#define SQLITE_OPEN_AUTOPROXY 0x00000020 /* VFS only */ #define SQLITE_OPEN_MAIN_DB 0x00000100 /* VFS only */ #define SQLITE_OPEN_TEMP_DB 0x00000200 /* VFS only */ #define SQLITE_OPEN_TRANSIENT_DB 0x00000400 /* VFS only */ @@ -918,7 +946,6 @@ SQLITE_API int sqlite3_os_end(void); /* ** CAPI3REF: Configuring The SQLite Library -** EXPERIMENTAL ** ** The sqlite3_config() interface is used to make global configuration ** changes to SQLite in order to tune SQLite to the specific needs of @@ -1259,6 +1286,7 @@ struct sqlite3_mem_methods { #define SQLITE_CONFIG_LOOKASIDE 13 /* int int */ #define SQLITE_CONFIG_PCACHE 14 /* sqlite3_pcache_methods* */ #define SQLITE_CONFIG_GETPCACHE 15 /* sqlite3_pcache_methods* */ +#define SQLITE_CONFIG_LOG 16 /* xFunc, void* */ /* ** CAPI3REF: Configuration Options @@ -3661,6 +3689,7 @@ SQLITE_API int sqlite3_collation_needed16( void(*)(void*,sqlite3*,int eTextRep,const void*) ); +#if SQLITE_HAS_CODEC /* ** Specify the key for an encrypted database. This routine should be ** called right after sqlite3_open(). @@ -3687,6 +3716,25 @@ SQLITE_API int sqlite3_rekey( ); /* +** Specify the activation key for a SEE database. Unless +** activated, none of the SEE routines will work. +*/ +SQLITE_API void sqlite3_activate_see( + const char *zPassPhrase /* Activation phrase */ +); +#endif + +#ifdef SQLITE_ENABLE_CEROD +/* +** Specify the activation key for a CEROD database. Unless +** activated, none of the CEROD routines will work. +*/ +SQLITE_API void sqlite3_activate_cerod( + const char *zPassPhrase /* Activation phrase */ +); +#endif + +/* ** CAPI3REF: Suspend Execution For A Short Time ** ** ^The sqlite3_sleep() function causes the current thread to suspend execution @@ -5648,6 +5696,30 @@ SQLITE_API int sqlite3_unlock_notify( SQLITE_API int sqlite3_strnicmp(const char *, const char *, int); /* +** CAPI3REF: Error Logging Interface +** EXPERIMENTAL +** +** ^The [sqlite3_log()] interface writes a message into the error log +** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()]. +** ^If logging is enabled, the zFormat string and subsequent arguments are +** passed through to [sqlite3_vmprintf()] to generate the final output string. +** +** The sqlite3_log() interface is intended for use by extensions such as +** virtual tables, collating functions, and SQL functions. While there is +** nothing to prevent an application from calling sqlite3_log(), doing so +** is considered bad form. +** +** The zFormat string must not be NULL. +** +** To avoid deadlocks and other threading problems, the sqlite3_log() routine +** will not use dynamically allocated memory. The log message is stored in +** a fixed-length buffer on the stack. If the log message is longer than +** a few hundred characters, it will be truncated to the length of the +** buffer. +*/ +SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...); + +/* ** Undo the hack that converts floating point types to integer for ** builds on processors without floating point support. */ diff --git a/ext/sqlite3/sqlite3.c b/ext/sqlite3/sqlite3.c index 372ecda44..1db73e9a0 100644 --- a/ext/sqlite3/sqlite3.c +++ b/ext/sqlite3/sqlite3.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sqlite3.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: sqlite3.c 300631 2010-06-21 11:06:31Z iliaa $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -120,11 +120,13 @@ PHP_METHOD(sqlite3, open) return; } +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(fullpath, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "safe_mode prohibits opening %s", fullpath); efree(fullpath); return; } +#endif if (php_check_open_basedir(fullpath TSRMLS_CC)) { zend_throw_exception_ex(zend_exception_get_default(TSRMLS_C), 0 TSRMLS_CC, "open_basedir prohibits opening %s", fullpath); @@ -158,7 +160,11 @@ PHP_METHOD(sqlite3, open) } #endif +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) || (PG(open_basedir) && *PG(open_basedir))) { +#else + if (PG(open_basedir) && *PG(open_basedir)) { +#endif sqlite3_set_authorizer(db_obj->db, php_sqlite3_authorizer, NULL); } @@ -292,6 +298,33 @@ PHP_METHOD(sqlite3, lastErrorMsg) } /* }}} */ +/* {{{ proto bool SQLite3::busyTimeout(int msecs) + Sets a busy handler that will sleep until database is not locked or timeout is reached. Passing a value less than or equal to zero turns off all busy handlers. */ +PHP_METHOD(sqlite3, busyTimeout) +{ + php_sqlite3_db_object *db_obj; + zval *object = getThis(); + long ms; + int return_code; + db_obj = (php_sqlite3_db_object *)zend_object_store_get_object(object TSRMLS_CC); + + SQLITE3_CHECK_INITIALIZED(db_obj, db_obj->initialised, SQLite3) + + if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &ms)) { + return; + } + + return_code = sqlite3_busy_timeout(db_obj->db, ms); + if (return_code != SQLITE_OK) { + php_sqlite3_error(db_obj, "Unable to set busy timeout: %d, %s", return_code, sqlite3_errmsg(db_obj->db)); + RETURN_FALSE; + } + + RETURN_TRUE; +} +/* }}} */ + + #ifndef SQLITE_OMIT_LOAD_EXTENSION /* {{{ proto bool SQLite3::loadExtension(String Shared Library) Attempts to load an SQLite extension library. */ @@ -1646,6 +1679,10 @@ ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_open, 0) ZEND_ARG_INFO(0, encryption_key) ZEND_END_ARG_INFO() +ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_busytimeout, 0) + ZEND_ARG_INFO(0, ms) +ZEND_END_ARG_INFO() + #ifndef SQLITE_OMIT_LOAD_EXTENSION ZEND_BEGIN_ARG_INFO(arginfo_sqlite3_loadextension, 0) ZEND_ARG_INFO(0, shared_library) @@ -1730,6 +1767,7 @@ static zend_function_entry php_sqlite3_class_methods[] = { PHP_ME(sqlite3, lastInsertRowID, arginfo_sqlite3_void, ZEND_ACC_PUBLIC) PHP_ME(sqlite3, lastErrorCode, arginfo_sqlite3_void, ZEND_ACC_PUBLIC) PHP_ME(sqlite3, lastErrorMsg, arginfo_sqlite3_void, ZEND_ACC_PUBLIC) + PHP_ME(sqlite3, busyTimeout, arginfo_sqlite3_busytimeout, ZEND_ACC_PUBLIC) #ifndef SQLITE_OMIT_LOAD_EXTENSION PHP_ME(sqlite3, loadExtension, arginfo_sqlite3_loadextension, ZEND_ACC_PUBLIC) #endif @@ -1779,14 +1817,18 @@ static zend_function_entry php_sqlite3_result_class_methods[] = { */ static int php_sqlite3_authorizer(void *autharg, int access_type, const char *arg3, const char *arg4, const char *arg5, const char *arg6) { - TSRMLS_FETCH(); switch (access_type) { case SQLITE_ATTACH: { - if (strncmp(arg3, ":memory:", sizeof(":memory:")-1)) { + if (strncmp(arg3, ":memory:", sizeof(":memory:")-1) && *arg3) { + TSRMLS_FETCH(); + +#if PHP_API_VERSION < 20100412 if (PG(safe_mode) && (!php_checkuid(arg3, NULL, CHECKUID_CHECK_FILE_AND_DIR))) { return SQLITE_DENY; } +#endif + if (php_check_open_basedir(arg3 TSRMLS_CC)) { return SQLITE_DENY; } diff --git a/ext/sqlite3/tests/sqlite3_15_open_error.phpt b/ext/sqlite3/tests/sqlite3_15_open_error.phpt index 49ddc23bb..1fcaca9c7 100644 --- a/ext/sqlite3/tests/sqlite3_15_open_error.phpt +++ b/ext/sqlite3/tests/sqlite3_15_open_error.phpt @@ -16,7 +16,7 @@ echo "Done\n"; unlink($unreadable); ?> --EXPECTF-- -exception 'Exception' with message 'Unable to open database: unable to open database file' in %s/sqlite3_15_open_error.php:%d +exception 'Exception' with message 'Unable to open database: %s' in %s/sqlite3_15_open_error.php:%d Stack trace: #0 %s/sqlite3_15_open_error.php(%d): SQLite3->__construct('%s') #1 {main} diff --git a/ext/sqlite3/tests/sqlite3_21_security.phpt b/ext/sqlite3/tests/sqlite3_21_security.phpt index 5061a595c..7e83bb23e 100644 --- a/ext/sqlite3/tests/sqlite3_21_security.phpt +++ b/ext/sqlite3/tests/sqlite3_21_security.phpt @@ -1,5 +1,5 @@ --TEST-- -SQLite3 open_basedir / safe_mode checks +SQLite3 open_basedir checks --SKIPIF-- <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?> --INI-- diff --git a/ext/standard/array.c b/ext/standard/array.c index e4156e89d..dd3ed25d9 100644 --- a/ext/standard/array.c +++ b/ext/standard/array.c @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c 293982 2010-01-25 14:11:32Z johannes $ */ +/* $Id: array.c 300371 2010-06-11 08:53:31Z dmitry $ */ #include "php.h" #include "php_ini.h" @@ -640,7 +640,7 @@ PHP_FUNCTION(usort) } /* Clear the is_ref flag, so the attemts to modify the array in user - * comaprison function will create a copy of array and won't affect the + * comparison function will create a copy of array and won't affect the * original array. The fact of modification is detected using refcount * comparison. The result of sorting in such case is undefined and the * function returns FALSE. @@ -1057,6 +1057,9 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive /* Set up known arguments */ args[1] = &key; args[2] = userdata; + if (userdata) { + Z_ADDREF_PP(userdata); + } zend_hash_internal_pointer_reset_ex(target_hash, &pos); @@ -1076,6 +1079,9 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive thash = Z_ARRVAL_PP(args[0]); if (thash->nApplyCount > 1) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected"); + if (userdata) { + zval_ptr_dtor(userdata); + } return 0; } @@ -1126,6 +1132,9 @@ static int php_array_walk(HashTable *target_hash, zval **userdata, int recursive zend_hash_move_forward_ex(target_hash, &pos); } + if (userdata) { + zval_ptr_dtor(userdata); + } return 0; } /* }}} */ diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index cd722db29..690c4a3a6 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | 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 | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: basic_functions.c 294503 2010-02-04 09:08:57Z pajoye $ */ +/* $Id: basic_functions.c 299320 2010-05-13 02:13:30Z felipe $ */ #include "php.h" #include "php_streams.h" @@ -2100,6 +2100,11 @@ ZEND_BEGIN_ARG_INFO(arginfo_stream_set_timeout, 0) ZEND_END_ARG_INFO() #endif +ZEND_BEGIN_ARG_INFO(arginfo_stream_set_read_buffer, 0) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, buffer) +ZEND_END_ARG_INFO() + ZEND_BEGIN_ARG_INFO(arginfo_stream_set_write_buffer, 0) ZEND_ARG_INFO(0, fp) ZEND_ARG_INFO(0, buffer) @@ -3104,6 +3109,7 @@ const zend_function_entry basic_functions[] = { /* {{{ */ PHP_FE(fputcsv, arginfo_fputcsv) PHP_FE(flock, arginfo_flock) PHP_FE(get_meta_tags, arginfo_get_meta_tags) + PHP_FE(stream_set_read_buffer, arginfo_stream_set_read_buffer) PHP_FE(stream_set_write_buffer, arginfo_stream_set_write_buffer) PHP_FALIAS(set_file_buffer, stream_set_write_buffer, arginfo_stream_set_write_buffer) @@ -3820,7 +3826,7 @@ PHP_FUNCTION(constant) return; } - if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, 0 TSRMLS_CC)) { + if (!zend_get_constant_ex(const_name, const_name_len, return_value, NULL, ZEND_FETCH_CLASS_SILENT TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "Couldn't find constant %s", const_name); RETURN_NULL(); } diff --git a/ext/standard/config.m4 b/ext/standard/config.m4 index 98912a165..f9bb1052f 100644 --- a/ext/standard/config.m4 +++ b/ext/standard/config.m4 @@ -1,4 +1,4 @@ -dnl $Id: config.m4 295350 2010-02-22 00:34:22Z pajoye $ -*- autoconf -*- +dnl $Id: config.m4 300511 2010-06-17 10:22:03Z pajoye $ -*- autoconf -*- divert(3)dnl @@ -306,6 +306,15 @@ else fi AC_DEFINE_UNQUOTED(PHP_EXT_DES_CRYPT, $ac_result, [Whether the system supports extended DES salt]) + if test "$ac_cv_crypt_md5" = "yes"; then + ac_result=1 + ac_crypt_md5=1 + else + ac_result=0 + ac_crypt_md5=0 + fi + AC_DEFINE_UNQUOTED(PHP_MD5_CRYPT, $ac_result, [Whether the system supports MD5 salt]) + if test "$ac_cv_crypt_sha512" = "yes"; then ac_result=1 ac_crypt_sha512=1 @@ -313,7 +322,7 @@ else ac_result=0 ac_crypt_sha512=0 fi - AC_DEFINE_UNQUOTED(PHP_EXT_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt]) + AC_DEFINE_UNQUOTED(PHP_SHA512_CRYPT, $ac_result, [Whether the system supports SHA512 salt]) if test "$ac_cv_crypt_sha256" = "yes"; then ac_result=1 @@ -322,7 +331,7 @@ else ac_result=0 ac_crypt_sha256=0 fi - AC_DEFINE_UNQUOTED(PHP_EXT_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt]) + AC_DEFINE_UNQUOTED(PHP_SHA256_CRYPT, $ac_result, [Whether the system supports SHA256 salt]) AC_DEFINE_UNQUOTED(PHP_USE_PHP_CRYPT_R, 0, [Whether PHP has to use its own crypt_r for blowfish, des and ext des]) fi @@ -558,6 +567,11 @@ if test "$ac_cv_type_mbstate_t" = "yes"; then fi dnl +dnl Check for atomic operation API availability in Solaris +dnl +AC_CHECK_HEADERS([atomic.h]) + +dnl dnl Setup extension sources dnl PHP_NEW_EXTENSION(standard, array.c base64.c basic_functions.c browscap.c crc32.c crypt.c \ diff --git a/ext/standard/credits_sapi.h b/ext/standard/credits_sapi.h index 56004e508..9cc7e6e22 100644 --- a/ext/standard/credits_sapi.h +++ b/ext/standard/credits_sapi.h @@ -20,6 +20,7 @@ CREDIT_LINE("CGI / FastCGI", "Rasmus Lerdorf, Stig Bakken, Shane Caraveo, Dmitry CREDIT_LINE("CLI", "Edin Kadribasic, Marcus Boerger, Johannes Schlueter"); CREDIT_LINE("Continuity", "Alex Leigh (based on nsapi code)"); CREDIT_LINE("Embed", "Edin Kadribasic"); +CREDIT_LINE("FastCGI Process Manager", "Andrei Nigmatulin, dreamcat4, Antony Dovgal, Jerome Loyet"); CREDIT_LINE("ISAPI", "Andi Gutmans, Zeev Suraski"); CREDIT_LINE("litespeed", "George Wang"); CREDIT_LINE("NSAPI", "Jayakumar Muthukumarasamy, Uwe Schindler"); diff --git a/ext/standard/crypt.c b/ext/standard/crypt.c index b4a5167b9..d2476ce7e 100644 --- a/ext/standard/crypt.c +++ b/ext/standard/crypt.c @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: crypt.c 295421 2010-02-23 17:49:00Z pajoye $ */ +/* $Id: crypt.c 300429 2010-06-14 09:56:50Z pajoye $ */ #include <stdlib.h> @@ -29,7 +29,7 @@ #if HAVE_UNISTD_H #include <unistd.h> #endif -#ifdef PHP_USE_PHP_CRYPT_R +#if PHP_USE_PHP_CRYPT_R # include "php_crypt_r.h" # include "crypt_freesec.h" #else @@ -107,11 +107,16 @@ PHP_MINIT_FUNCTION(crypt) /* {{{ */ REGISTER_LONG_CONSTANT("CRYPT_EXT_DES", PHP_EXT_DES_CRYPT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CRYPT_MD5", PHP_MD5_CRYPT, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("CRYPT_BLOWFISH", PHP_BLOWFISH_CRYPT, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("CRYPT_SHA256", PHP_SHA256_CRYPT, CONST_CS | CONST_PERSISTENT); - REGISTER_LONG_CONSTANT("CRYPT_SHA512", PHP_SHA512_CRYPT, CONST_CS | CONST_PERSISTENT); +#ifdef PHP_SHA256_CRYPT + REGISTER_LONG_CONSTANT("CRYPT_SHA256", PHP_SHA256_CRYPT, CONST_CS | CONST_PERSISTENT); +#endif + +#ifdef PHP_SHA512_CRYPT + REGISTER_LONG_CONSTANT("CRYPT_SHA512", PHP_SHA512_CRYPT, CONST_CS | CONST_PERSISTENT); +#endif -#ifdef PHP_USE_PHP_CRYPT_R +#if PHP_USE_PHP_CRYPT_R php_init_crypt_r(); #endif @@ -121,7 +126,7 @@ PHP_MINIT_FUNCTION(crypt) /* {{{ */ PHP_MSHUTDOWN_FUNCTION(crypt) /* {{{ */ { -#ifdef PHP_USE_PHP_CRYPT_R +#if PHP_USE_PHP_CRYPT_R php_shutdown_crypt_r(); #endif diff --git a/ext/standard/crypt_blowfish.c b/ext/standard/crypt_blowfish.c index c88c699c5..37160842e 100644 --- a/ext/standard/crypt_blowfish.c +++ b/ext/standard/crypt_blowfish.c @@ -1,5 +1,5 @@ /* - $Id: crypt_blowfish.c 295350 2010-02-22 00:34:22Z pajoye $ + $Id: crypt_blowfish.c 295339 2010-02-21 23:47:14Z pajoye $ */ /* * This code comes from John the Ripper password cracker, with reentrant diff --git a/ext/standard/crypt_freesec.c b/ext/standard/crypt_freesec.c index bb9c032c0..37eb538f4 100644 --- a/ext/standard/crypt_freesec.c +++ b/ext/standard/crypt_freesec.c @@ -1,5 +1,5 @@ /* - $Id: crypt_freesec.c 295350 2010-02-22 00:34:22Z pajoye $ + $Id: crypt_freesec.c 295340 2010-02-22 00:05:02Z pajoye $ */ /* * This version is derived from the original implementation of FreeSec @@ -41,7 +41,7 @@ * SUCH DAMAGE. * * $Owl: Owl/packages/glibc/crypt_freesec.c,v 1.4 2005/11/16 13:08:32 solar Exp $ - * $Id: crypt_freesec.c 295350 2010-02-22 00:34:22Z pajoye $ + * $Id: crypt_freesec.c 295340 2010-02-22 00:05:02Z pajoye $ * * This is an original implementation of the DES and the crypt(3) interfaces * by David Burren <davidb at werj.com.au>. diff --git a/ext/standard/crypt_sha256.c b/ext/standard/crypt_sha256.c index 3e234cee9..f9daed909 100644 --- a/ext/standard/crypt_sha256.c +++ b/ext/standard/crypt_sha256.c @@ -38,7 +38,6 @@ # include <sys/param.h> # include <sys/types.h> # if HAVE_STRING_H -//# define __USE_GNU 1 # include <string.h> # else # include <strings.h> diff --git a/ext/standard/crypt_sha512.c b/ext/standard/crypt_sha512.c index ba9a63918..f78ff0398 100644 --- a/ext/standard/crypt_sha512.c +++ b/ext/standard/crypt_sha512.c @@ -53,6 +53,11 @@ extern char * __php_stpncpy(char *dst, const char *src, size_t len); # define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif +/* See #51582 */ +#ifndef UINT64_C +# define UINT64_C(value) __CONCAT(value, ULL) +#endif + /* Structure to save state of computation between the single steps. */ struct sha512_ctx { diff --git a/ext/standard/dir.c b/ext/standard/dir.c index fcaf1f0b2..ddf651a11 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: dir.c 300764 2010-06-26 16:03:39Z felipe $ */ /* {{{ includes/startup/misc */ @@ -94,11 +94,17 @@ static zend_class_entry *dir_class_entry_ptr; if (!dirp) \ RETURN_FALSE; \ } + +/* {{{ arginfo */ +ZEND_BEGIN_ARG_INFO_EX(arginfo_dir, 0, 0, 0) + ZEND_ARG_INFO(0, dir_handle) +ZEND_END_ARG_INFO() +/* }}} */ static const zend_function_entry php_dir_class_functions[] = { - PHP_FALIAS(close, closedir, NULL) - PHP_FALIAS(rewind, rewinddir, NULL) - PHP_NAMED_FE(read, php_if_readdir, NULL) + PHP_FALIAS(close, closedir, arginfo_dir) + PHP_FALIAS(rewind, rewinddir, arginfo_dir) + PHP_NAMED_FE(read, php_if_readdir, arginfo_dir) {NULL, NULL, NULL} }; diff --git a/ext/standard/dns.c b/ext/standard/dns.c index 96d6fb77b..5ed906824 100644 --- a/ext/standard/dns.c +++ b/ext/standard/dns.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | 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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dns.c 292413 2009-12-21 15:22:40Z jani $ */ +/* $Id: dns.c 293211 2010-01-07 11:02:39Z sebastian $ */ /* {{{ includes */ #include "php.h" diff --git a/ext/standard/dns_win32.c b/ext/standard/dns_win32.c index 8c94f27f4..bd12c4ade 100644 --- a/ext/standard/dns_win32.c +++ b/ext/standard/dns_win32.c @@ -122,7 +122,7 @@ PHP_FUNCTION(dns_check_record) } } - status = DnsQuery_A(hostname, DNS_TYPE_MX, DNS_QUERY_STANDARD, NULL, &pResult, NULL); + status = DnsQuery_A(hostname, type, DNS_QUERY_STANDARD, NULL, &pResult, NULL); if (status) { RETURN_FALSE; @@ -274,6 +274,12 @@ static void php_parserr(PDNS_RECORD pRec, int type_to_fetch, int store, zval **s } } + if (have_v6_break && in_v6_break) { + tp[0] = ':'; + tp++; + } + tp[0] = '\0'; + add_assoc_string(*subarray, "type", "AAAA", 1); add_assoc_string(*subarray, "ipv6", buf, 1); } diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 54c25f2ef..713a8a09b 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -16,7 +16,7 @@ | Ilia Alshanetsky <iliaa@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: exec.c 294429 2010-02-03 18:11:24Z pajoye $ */ +/* $Id: exec.c 296107 2010-03-12 10:28:59Z jani $ */ #include <stdio.h> #include "php.h" diff --git a/ext/standard/file.c b/ext/standard/file.c index 0bfe060f2..fc16ab98b 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: file.c 294896 2010-02-11 18:03:57Z johannes $ */ +/* $Id: file.c 298882 2010-05-02 20:11:22Z felipe $ */ /* Synced with php 3.0 revision 1.218 1999-06-16 [ssb] */ @@ -136,7 +136,7 @@ php_file_globals file_globals; /* {{{ ZTS-stuff / Globals / Prototypes */ -/* sharing globals is *evil* */ +/* sharing globals is *evil* */ static int le_stream_context = FAILURE; PHPAPI int php_le_stream_context(void) @@ -2521,6 +2521,10 @@ PHP_FUNCTION(fnmatch) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Filename exceeds the maximum allowed length of %d characters", MAXPATHLEN); RETURN_FALSE; } + if (pattern_len >= MAXPATHLEN) { + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Pattern exceeds the maximum allowed length of %d characters", MAXPATHLEN); + RETURN_FALSE; + } RETURN_BOOL( ! fnmatch( pattern, filename, flags )); } diff --git a/ext/standard/filters.c b/ext/standard/filters.c index c534cc4b4..13ce8bf8b 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -20,7 +20,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filters.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: filters.c 298700 2010-04-28 14:10:01Z pajoye $ */ #include "php.h" #include "php_globals.h" @@ -1914,7 +1914,7 @@ typedef enum _php_chunked_filter_state { typedef struct _php_chunked_filter_data { php_chunked_filter_state state; - int chunk_size; + size_t chunk_size; int persistent; } php_chunked_filter_data; @@ -1991,7 +1991,7 @@ static int php_dechunk(char *buf, int len, php_chunked_filter_data *data) continue; } case CHUNK_BODY: - if (end - p >= data->chunk_size) { + if ((size_t) (end - p) >= data->chunk_size) { if (p != out) { memmove(out, p, data->chunk_size); } diff --git a/ext/standard/head.c b/ext/standard/head.c index 807d30b10..01dbe57c4 100644 --- a/ext/standard/head.c +++ b/ext/standard/head.c @@ -15,7 +15,7 @@ | Author: Rasmus Lerdorf <rasmus@lerdorf.on.ca> | +----------------------------------------------------------------------+ */ -/* $Id: head.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: head.c 296107 2010-03-12 10:28:59Z jani $ */ #include <stdio.h> #include "php.h" diff --git a/ext/standard/html.c b/ext/standard/html.c index c9c7a7555..ef6f96043 100644 --- a/ext/standard/html.c +++ b/ext/standard/html.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: html.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: html.c 296121 2010-03-12 16:19:25Z moriyoshi $ */ /* * HTML entity resources: @@ -741,8 +741,8 @@ static enum entity_charset determine_charset(char *charset_hint TSRMLS_DC) return cs_eucjp; case mbfl_no_encoding_sjis: - case mbfl_no_encoding_sjis_win: - case mbfl_no_encoding_sjis_mac: + case mbfl_no_encoding_sjis_open: + case mbfl_no_encoding_cp932: return cs_sjis; case mbfl_no_encoding_cp1252: diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 5a30d7fa2..09de024b4 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -19,7 +19,7 @@ | Sara Golemon <pollita@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: http_fopen_wrapper.c 294506 2010-02-04 09:17:20Z pajoye $ */ +/* $Id: http_fopen_wrapper.c 293998 2010-01-25 16:28:13Z jani $ */ #include "php.h" #include "php_globals.h" diff --git a/ext/standard/image.c b/ext/standard/image.c index 689f4a85a..85b5cd067 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: image.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: image.c 300881 2010-06-30 12:21:35Z iliaa $ */ #include "php.h" #include <stdio.h> @@ -402,12 +402,7 @@ static unsigned int php_next_marker(php_stream * stream, int last_marker, int co last_marker = M_PSEUDO; /* stop skipping non 0xff for M_COM */ } } - if (++a > 25) - { - /* who knows the maxim amount of 0xff? though 7 */ - /* but found other implementations */ - return M_EOI; - } + a++; } while (marker == 0xff); if (a < 2) { diff --git a/ext/standard/info.c b/ext/standard/info.c index 7746d0658..631ab3487 100644 --- a/ext/standard/info.c +++ b/ext/standard/info.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: info.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: info.c 299960 2010-05-30 07:46:45Z pajoye $ */ #include "php.h" #include "php_ini.h" @@ -281,11 +281,22 @@ char* php_get_windows_name() } if (VER_PLATFORM_WIN32_NT==osvi.dwPlatformId && osvi.dwMajorVersion > 4 ) { - if (osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 0 ) { - if (osvi.wProductType == VER_NT_WORKSTATION) { - major = "Windows Vista"; + if (osvi.dwMajorVersion == 6) { + if( osvi.dwMinorVersion == 0 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows Vista"; + } else { + major = "Windows Server 2008"; + } + } else + if ( osvi.dwMinorVersion == 2 ) { + if( osvi.wProductType == VER_NT_WORKSTATION ) { + major = "Windows 7"; + } else { + major = "Windows Server 2008 R2"; + } } else { - major = "Windows Server 2008"; + major = "Unknow Windows version"; } pGPI = (PGPI) GetProcAddress(GetModuleHandle("kernel32.dll"), "GetProductInfo"); diff --git a/ext/standard/lcg.c b/ext/standard/lcg.c index ae94f48e5..9a48ff2ae 100644 --- a/ext/standard/lcg.c +++ b/ext/standard/lcg.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: lcg.c 294448 2010-02-03 20:10:35Z pajoye $ */ +/* $Id: lcg.c 293253 2010-01-08 09:43:14Z rasmus $ */ #include "php.h" #include "php_lcg.h" diff --git a/ext/standard/mail.c b/ext/standard/mail.c index 09fa2ef94..57f69919e 100644 --- a/ext/standard/mail.c +++ b/ext/standard/mail.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: mail.c 294548 2010-02-05 00:19:32Z pajoye $ */ +/* $Id: mail.c 301396 2010-07-19 13:38:53Z aharvey $ */ #include <stdlib.h> #include <ctype.h> @@ -41,6 +41,7 @@ #include "php_mail.h" #include "php_ini.h" +#include "php_string.h" #include "safe_mode.h" #include "exec.h" @@ -97,7 +98,7 @@ PHP_FUNCTION(ezmlm_hash) Send an email message */ PHP_FUNCTION(mail) { - char *to=NULL, *message=NULL, *headers=NULL; + char *to=NULL, *message=NULL, *headers=NULL, *headers_trimmed=NULL; char *subject=NULL, *extra_cmd=NULL; int to_len, message_len, headers_len = 0; int subject_len, extra_cmd_len = 0, i; @@ -122,6 +123,7 @@ PHP_FUNCTION(mail) MAIL_ASCIIZ_CHECK(message, message_len); if (headers) { MAIL_ASCIIZ_CHECK(headers, headers_len); + headers_trimmed = php_trim(headers, headers_len, NULL, 0, NULL, 2 TSRMLS_CC); } if (extra_cmd) { MAIL_ASCIIZ_CHECK(extra_cmd, extra_cmd_len); @@ -173,12 +175,16 @@ PHP_FUNCTION(mail) extra_cmd = php_escape_shell_cmd(extra_cmd); } - if (php_mail(to_r, subject_r, message, headers, extra_cmd TSRMLS_CC)) { + if (php_mail(to_r, subject_r, message, headers_trimmed, extra_cmd TSRMLS_CC)) { RETVAL_TRUE; } else { RETVAL_FALSE; } + if (headers_trimmed) { + efree(headers_trimmed); + } + if (extra_cmd) { efree (extra_cmd); } @@ -215,7 +221,7 @@ PHPAPI int php_mail(char *to, char *subject, char *message, char *headers, char } \ return val; \ - if (mail_log) { + if (mail_log && *mail_log) { char *tmp; int l = spprintf(&tmp, 0, "mail() on [%s:%d]: To: %s -- Headers: %s\n", zend_get_executed_filename(TSRMLS_C), zend_get_executed_lineno(TSRMLS_C), to, hdr ? hdr : ""); php_stream *stream = php_stream_open_wrapper(mail_log, "a", IGNORE_URL_WIN | REPORT_ERRORS | STREAM_DISABLE_OPEN_BASEDIR, NULL); diff --git a/ext/standard/pack.c b/ext/standard/pack.c index 0723ece75..602d298e4 100644 --- a/ext/standard/pack.c +++ b/ext/standard/pack.c @@ -15,7 +15,7 @@ | Author: Chris Schneider <cschneid@relog.ch> | +----------------------------------------------------------------------+ */ -/* $Id: pack.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: pack.c 299279 2010-05-12 11:04:57Z dmitry $ */ #include "php.h" @@ -121,6 +121,9 @@ PHP_FUNCTION(pack) return; } + if (Z_ISREF_PP(argv[0])) { + SEPARATE_ZVAL(argv[0]); + } convert_to_string_ex(argv[0]); format = Z_STRVAL_PP(argv[0]); @@ -179,6 +182,9 @@ PHP_FUNCTION(pack) } if (arg < 0) { + if (Z_ISREF_PP(argv[currentarg])) { + SEPARATE_ZVAL(argv[currentarg]); + } convert_to_string_ex(argv[currentarg]); arg = Z_STRLEN_PP(argv[currentarg]); } @@ -312,6 +318,9 @@ PHP_FUNCTION(pack) case 'A': memset(&output[outputpos], (code == 'a') ? '\0' : ' ', arg); val = argv[currentarg++]; + if (Z_ISREF_PP(val)) { + SEPARATE_ZVAL(val); + } convert_to_string_ex(val); memcpy(&output[outputpos], Z_STRVAL_PP(val), (Z_STRLEN_PP(val) < arg) ? Z_STRLEN_PP(val) : arg); @@ -325,6 +334,9 @@ PHP_FUNCTION(pack) char *v; val = argv[currentarg++]; + if (Z_ISREF_PP(val)) { + SEPARATE_ZVAL(val); + } convert_to_string_ex(val); v = Z_STRVAL_PP(val); outputpos--; diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index 3d9d0229d..5e2d851de 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -1,4 +1,4 @@ -/* $Id: php_crypt_r.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_crypt_r.c 300511 2010-06-17 10:22:03Z pajoye $ */ /* +----------------------------------------------------------------------+ | PHP Version 5 | @@ -42,7 +42,11 @@ # include <Wincrypt.h> #endif -#include <signal.h> +#ifdef HAVE_ATOMIC_H /* Solaris 10 defines atomic API within */ +# include <atomic.h> +#else +# include <signal.h> +#endif #include "php_crypt_r.h" #include "crypt_freesec.h" @@ -75,17 +79,28 @@ void php_shutdown_crypt_r() void _crypt_extended_init_r(void) { +#ifdef PHP_WIN32 + LONG volatile initialized = 0; +#elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ + volatile unsigned int initialized = 0; +#else static volatile sig_atomic_t initialized = 0; +#endif #ifdef ZTS tsrm_mutex_lock(php_crypt_extended_init_lock); #endif - if (initialized) { - return; - } else { + if (!initialized) { +#ifdef PHP_WIN32 + InterlockedIncrement(&initialized); +#elif (defined(__GNUC__) && (__GNUC__ >= 4 && __GNUC_MINOR >= 2)) + __sync_fetch_and_add(&initialized, 1); +#elif defined(HAVE_ATOMIC_H) /* Solaris 10 defines atomic API within */ + membar_producer(); + atomic_add_int(&initialized, 1); +#endif _crypt_extended_init(); - initialized = 1; } #ifdef ZTS tsrm_mutex_unlock(php_crypt_extended_init_lock); @@ -212,9 +227,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { strcat_s(passwd, MD5_HASH_MAX_LEN, "$"); #else /* VC6 version doesn't have strcat_s or strncpy_s */ - if (strncpy(passwd + MD5_MAGIC_LEN, sp, sl + 1) < sl) { - goto _destroyCtx1; - } + strncpy(passwd + MD5_MAGIC_LEN, sp, sl + 1); strcat(passwd, "$"); #endif dwHashLen = 16; diff --git a/ext/standard/php_dns.h b/ext/standard/php_dns.h index 95900ae64..c5b84274b 100644 --- a/ext/standard/php_dns.h +++ b/ext/standard/php_dns.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2008 The PHP Group | + | 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 | @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_dns.h 289691 2009-10-16 02:10:52Z scottmac $ */ +/* $Id: php_dns.h 293211 2010-01-07 11:02:39Z sebastian $ */ #ifndef PHP_DNS_H #define PHP_DNS_H diff --git a/ext/standard/php_var.h b/ext/standard/php_var.h index 76546f3bf..3dc23e164 100644 --- a/ext/standard/php_var.h +++ b/ext/standard/php_var.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_var.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_var.h 301144 2010-07-09 21:19:27Z scottmac $ */ #ifndef PHP_VAR_H #define PHP_VAR_H @@ -33,6 +33,8 @@ PHP_FUNCTION(memory_get_peak_usage); PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC); PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC); +PHPAPI void php_var_export_ex(zval **struc, int level, smart_str *buf TSRMLS_DC); + PHPAPI void php_debug_zval_dump(zval **struc, int level TSRMLS_DC); /* typdef HashTable php_serialize_data_t; */ @@ -60,6 +62,7 @@ PHPAPI int php_var_unserialize(zval **rval, const unsigned char **p, const unsig var_destroy(&(var_hash)) PHPAPI void var_replace(php_unserialize_data_t *var_hash, zval *ozval, zval **nzval); +PHPAPI void var_push_dtor(php_unserialize_data_t *var_hash, zval **val); PHPAPI void var_destroy(php_unserialize_data_t *var_hash); #define PHP_VAR_UNSERIALIZE_ZVAL_CHANGED(var_hash, ozval, nzval) \ diff --git a/ext/standard/scanf.c b/ext/standard/scanf.c index 81a49e42b..dbfe83d59 100644 --- a/ext/standard/scanf.c +++ b/ext/standard/scanf.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: scanf.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: scanf.c 299484 2010-05-19 11:28:08Z mike $ */ /* scanf.c -- @@ -581,7 +581,8 @@ PHPAPI int php_sscanf_internal( char *string, char *format, int varStart, zval **return_value TSRMLS_DC) { int numVars, nconversions, totalVars = -1; - int i, value, result; + int i, result; + long value; int objIndex; char *end, *baseString; zval **current; @@ -1059,9 +1060,9 @@ addToInt: */ if (!(flags & SCAN_SUPPRESS)) { *end = '\0'; - value = (int) (*fn)(buf, NULL, base); + value = (long) (*fn)(buf, NULL, base); if ((flags & SCAN_UNSIGNED) && (value < 0)) { - snprintf(buf, sizeof(buf), "%u", value); /* INTL: ISO digit */ + snprintf(buf, sizeof(buf), "%lu", value); /* INTL: ISO digit */ if (numVars && objIndex >= argCount) { break; } else if (numVars) { diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index a0300606f..6285a337f 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.c 293995 2010-01-25 15:57:24Z johannes $ */ +/* $Id: streamsfuncs.c 297895 2010-04-12 13:10:05Z pajoye $ */ #include "php.h" #include "php_globals.h" @@ -70,7 +70,7 @@ PHP_FUNCTION(stream_socket_pair) s1 = php_stream_sock_open_from_socket(pair[0], 0); s2 = php_stream_sock_open_from_socket(pair[1], 0); - /* set the __exposed flag. + /* set the __exposed flag. * php_stream_to_zval() does, add_next_index_resource() does not */ php_stream_auto_cleanup(s1); php_stream_auto_cleanup(s2); @@ -99,11 +99,11 @@ PHP_FUNCTION(stream_socket_client) php_stream_context *context = NULL; RETVAL_FALSE; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|zzdlr", &host, &host_len, &zerrno, &zerrstr, &timeout, &flags, &zcontext) == FAILURE) { RETURN_FALSE; } - + context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); if (context) { @@ -113,7 +113,7 @@ PHP_FUNCTION(stream_socket_client) if (flags & PHP_STREAM_CLIENT_PERSISTENT) { spprintf(&hashkey, 0, "stream_socket_client__%s", host); } - + /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 1000000.0); tv.tv_sec = conv / 1000000; @@ -132,12 +132,12 @@ PHP_FUNCTION(stream_socket_client) STREAM_XPORT_CLIENT | (flags & PHP_STREAM_CLIENT_CONNECT ? STREAM_XPORT_CONNECT : 0) | (flags & PHP_STREAM_CLIENT_ASYNC_CONNECT ? STREAM_XPORT_CONNECT_ASYNC : 0), hashkey, &tv, context, &errstr, &err); - + if (stream == NULL) { /* host might contain binary characters */ char *quoted_host = php_addslashes(host, host_len, NULL, 0 TSRMLS_CC); - + php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to %s (%s)", quoted_host, errstr == NULL ? "Unknown error" : errstr); efree(quoted_host); } @@ -145,7 +145,7 @@ PHP_FUNCTION(stream_socket_client) if (hashkey) { efree(hashkey); } - + if (stream == NULL) { if (zerrno) { zval_dtor(zerrno); @@ -160,13 +160,13 @@ PHP_FUNCTION(stream_socket_client) } RETURN_FALSE; } - + if (errstr) { efree(errstr); } - + php_stream_to_zval(stream, return_value); - + } /* }}} */ @@ -184,13 +184,13 @@ PHP_FUNCTION(stream_socket_server) php_stream_context *context = NULL; RETVAL_FALSE; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|zzlr", &host, &host_len, &zerrno, &zerrstr, &flags, &zcontext) == FAILURE) { RETURN_FALSE; } - + context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); - + if (context) { zend_list_addref(context->rsrc_id); } @@ -207,11 +207,11 @@ PHP_FUNCTION(stream_socket_server) stream = php_stream_xport_create(host, host_len, ENFORCE_SAFE_MODE | REPORT_ERRORS, STREAM_XPORT_SERVER | flags, NULL, NULL, context, &errstr, &err); - + if (stream == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "unable to connect to %s (%s)", host, errstr == NULL ? "Unknown error" : errstr); } - + if (stream == NULL) { if (zerrno) { zval_dtor(zerrno); @@ -226,11 +226,11 @@ PHP_FUNCTION(stream_socket_server) } RETURN_FALSE; } - + if (errstr) { efree(errstr); } - + php_stream_to_zval(stream, return_value); } /* }}} */ @@ -249,13 +249,13 @@ PHP_FUNCTION(stream_socket_accept) zval *zstream; char *errstr = NULL; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|dz", &zstream, &timeout, &zpeername) == FAILURE) { RETURN_FALSE; } - + php_stream_from_zval(stream, &zstream); - + /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 1000000.0); tv.tv_sec = conv / 1000000; @@ -272,7 +272,7 @@ PHP_FUNCTION(stream_socket_accept) NULL, NULL, &tv, &errstr TSRMLS_CC) && clistream) { - + if (peername) { ZVAL_STRINGL(zpeername, peername, peername_len, 0); } @@ -297,11 +297,11 @@ PHP_FUNCTION(stream_socket_get_name) zend_bool want_peer; char *name = NULL; int name_len; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb", &zstream, &want_peer) == FAILURE) { RETURN_FALSE; } - + php_stream_from_zval(stream, &zstream); if (0 != php_stream_xport_get_name(stream, want_peer, @@ -327,7 +327,7 @@ PHP_FUNCTION(stream_socket_sendto) int datalen, target_addr_len = 0; php_sockaddr_storage sa; socklen_t sl = 0; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|ls", &zstream, &data, &datalen, &flags, &target_addr, &target_addr_len) == FAILURE) { RETURN_FALSE; } @@ -357,11 +357,11 @@ PHP_FUNCTION(stream_socket_recvfrom) char *read_buf; long flags = 0; int recvd; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|lz", &zstream, &to_read, &flags, &zremote) == FAILURE) { RETURN_FALSE; } - + php_stream_from_zval(stream, &zstream); if (zremote) { @@ -373,9 +373,9 @@ PHP_FUNCTION(stream_socket_recvfrom) php_error_docref(NULL TSRMLS_CC, E_WARNING, "Length parameter must be greater than 0"); RETURN_FALSE; } - + read_buf = safe_emalloc(1, to_read, 1); - + recvd = php_stream_xport_recvfrom(stream, read_buf, to_read, flags, NULL, NULL, zremote ? &remote_addr : NULL, zremote ? &remote_addr_len : NULL @@ -423,7 +423,7 @@ PHP_FUNCTION(stream_get_contents) } len = php_stream_copy_to_mem(stream, &contents, maxlen, 0); - + if (contents) { if (len && PG(magic_quotes_runtime)) { contents = php_addslashes(contents, len, &newlen, 1 TSRMLS_CC); /* 1 = free source string */ @@ -481,7 +481,7 @@ PHP_FUNCTION(stream_get_meta_data) php_stream_from_zval(stream, &arg1); array_init(return_value); - + if (stream->wrapperdata) { MAKE_STD_ZVAL(newval); MAKE_COPY_ZVAL(&stream->wrapperdata, newval); @@ -494,14 +494,14 @@ PHP_FUNCTION(stream_get_meta_data) add_assoc_string(return_value, "stream_type", (char *)stream->ops->label, 1); add_assoc_string(return_value, "mode", stream->mode, 1); - + #if 0 /* TODO: needs updating for new filter API */ if (stream->filterhead) { php_stream_filter *filter; - + MAKE_STD_ZVAL(newval); array_init(newval); - + for (filter = stream->filterhead; filter != NULL; filter = filter->next) { add_next_index_string(newval, (char *)filter->fops->label, 1); } @@ -509,7 +509,7 @@ PHP_FUNCTION(stream_get_meta_data) add_assoc_zval(return_value, "filters", newval); } #endif - + add_assoc_long(return_value, "unread_bytes", stream->writepos - stream->readpos); add_assoc_bool(return_value, "seekable", (stream->ops->seek) && (stream->flags & PHP_STREAM_FLAG_NO_SEEK) == 0); @@ -610,7 +610,7 @@ static int stream_array_to_fd_set(zval *stream_array, fd_set *fds, php_socket_t * is not displayed. * */ if (SUCCESS == php_stream_cast(stream, PHP_STREAM_AS_FD_FOR_SELECT | PHP_STREAM_CAST_INTERNAL, (void*)&this_fd, 1) && this_fd >= 0) { - + PHP_SAFE_FD_SET(this_fd, fds); if (this_fd > *max_fd) { @@ -635,7 +635,7 @@ static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC) } ALLOC_HASHTABLE(new_hash); zend_hash_init(new_hash, zend_hash_num_elements(Z_ARRVAL_P(stream_array)), NULL, ZVAL_PTR_DTOR, 0); - + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream_array)); zend_hash_get_current_data(Z_ARRVAL_P(stream_array), (void **) &elem) == SUCCESS; zend_hash_move_forward(Z_ARRVAL_P(stream_array))) { @@ -644,7 +644,7 @@ static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC) if (stream == NULL) { continue; } - /* get the fd + /* get the fd * NB: Most other code will NOT use the PHP_STREAM_CAST_INTERNAL flag * when casting. It is only used here so that the buffered data warning * is not displayed. @@ -667,7 +667,7 @@ static int stream_array_from_fd_set(zval *stream_array, fd_set *fds TSRMLS_DC) zend_hash_internal_pointer_reset(new_hash); Z_ARRVAL_P(stream_array) = new_hash; - + return ret; } @@ -683,7 +683,7 @@ static int stream_array_emulate_read_fd_set(zval *stream_array TSRMLS_DC) } ALLOC_HASHTABLE(new_hash); zend_hash_init(new_hash, zend_hash_num_elements(Z_ARRVAL_P(stream_array)), NULL, ZVAL_PTR_DTOR, 0); - + for (zend_hash_internal_pointer_reset(Z_ARRVAL_P(stream_array)); zend_hash_get_current_data(Z_ARRVAL_P(stream_array), (void **) &elem) == SUCCESS; zend_hash_move_forward(Z_ARRVAL_P(stream_array))) { @@ -719,7 +719,7 @@ static int stream_array_emulate_read_fd_set(zval *stream_array TSRMLS_DC) zend_hash_destroy(new_hash); FREE_HASHTABLE(new_hash); } - + return ret; } /* }}} */ @@ -750,7 +750,7 @@ PHP_FUNCTION(stream_select) max_set_count = set_count; sets += set_count; } - + if (w_array != NULL) { set_count = stream_array_to_fd_set(w_array, &wfds, &max_fd TSRMLS_CC); if (set_count > max_set_count) @@ -787,7 +787,7 @@ PHP_FUNCTION(stream_select) /* Solaris + BSD do not like microsecond values which are >= 1 sec */ if (usec > 999999) { tv.tv_sec = Z_LVAL_PP(sec) + (usec / 1000000); - tv.tv_usec = usec % 1000000; + tv.tv_usec = usec % 1000000; } else { tv.tv_sec = Z_LVAL_PP(sec); tv.tv_usec = usec; @@ -812,7 +812,7 @@ PHP_FUNCTION(stream_select) RETURN_LONG(retval); } } - + retval = php_select(max_fd+1, &rfds, &wfds, &efds, tv_p); if (retval == -1) { @@ -839,14 +839,14 @@ static void user_space_stream_notifier(php_stream_context *context, int notifyco zval *ps[6]; zval **ptps[6]; int i; - + for (i = 0; i < 6; i++) { INIT_ZVAL(zvs[i]); ps[i] = &zvs[i]; ptps[i] = &ps[i]; MAKE_STD_ZVAL(ps[i]); } - + ZVAL_LONG(ps[0], notifycode); ZVAL_LONG(ps[1], severity); if (xmsg) { @@ -885,7 +885,7 @@ static int parse_context_options(php_stream_context *context, zval *options TSRM int wkey_len, okey_len; int ret = SUCCESS; ulong num_key; - + zend_hash_internal_pointer_reset_ex(Z_ARRVAL_P(options), &pos); while (SUCCESS == zend_hash_get_current_data_ex(Z_ARRVAL_P(options), (void**)&wval, &pos)) { if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(Z_ARRVAL_P(options), &wkey, &wkey_len, &num_key, 0, &pos) @@ -915,7 +915,7 @@ static int parse_context_params(php_stream_context *context, zval *params TSRMLS zval **tmp; if (SUCCESS == zend_hash_find(Z_ARRVAL_P(params), "notification", sizeof("notification"), (void**)&tmp)) { - + if (context->notifier) { php_stream_notification_free(context->notifier); context->notifier = NULL; @@ -934,7 +934,7 @@ static int parse_context_params(php_stream_context *context, zval *params TSRMLS php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid stream/context parameter"); } } - + return ret; } @@ -1082,7 +1082,7 @@ PHP_FUNCTION(stream_context_get_default) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a", ¶ms) == FAILURE) { RETURN_FALSE; } - + if (FG(default_context) == NULL) { FG(default_context) = php_stream_context_alloc(); } @@ -1091,7 +1091,7 @@ PHP_FUNCTION(stream_context_get_default) if (params) { parse_context_options(context, params TSRMLS_CC); } - + php_stream_context_to_zval(context, return_value); } /* }}} */ @@ -1128,9 +1128,9 @@ PHP_FUNCTION(stream_context_create) if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|a!a!", &options, ¶ms) == FAILURE) { RETURN_FALSE; } - + context = php_stream_context_alloc(); - + if (options) { parse_context_options(context, options TSRMLS_CC); } @@ -1138,7 +1138,7 @@ PHP_FUNCTION(stream_context_create) if (params) { parse_context_params(context, params TSRMLS_CC); } - + RETURN_RESOURCE(context->rsrc_id); } /* }}} */ @@ -1166,7 +1166,7 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS) /* Chain not specified. * Examine stream->mode to determine which filters are needed * There's no harm in attaching a filter to an unused chain, - * but why waste the memory and clock cycles? + * but why waste the memory and clock cycles? */ if (strchr(stream->mode, 'r') || strchr(stream->mode, '+')) { read_write |= PHP_STREAM_FILTER_READ; @@ -1182,7 +1182,7 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS) RETURN_FALSE; } - if (append) { + if (append) { ret = php_stream_filter_append_ex(&stream->readfilters, filter TSRMLS_CC); } else { ret = php_stream_filter_prepend_ex(&stream->readfilters, filter TSRMLS_CC); @@ -1199,7 +1199,7 @@ static void apply_filter_to_stream(int append, INTERNAL_FUNCTION_PARAMETERS) RETURN_FALSE; } - if (append) { + if (append) { ret = php_stream_filter_append_ex(&stream->writefilters, filter TSRMLS_CC); } else { ret = php_stream_filter_prepend_ex(&stream->writefilters, filter TSRMLS_CC); @@ -1277,7 +1277,7 @@ PHP_FUNCTION(stream_get_line) char *buf; size_t buf_size; php_stream *stream; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|s", &zstream, &max_length, &str, &str_len) == FAILURE) { RETURN_FALSE; } @@ -1372,18 +1372,10 @@ PHP_FUNCTION(stream_set_write_buffer) size_t buff; php_stream *stream; - switch (ZEND_NUM_ARGS()) { - case 2: - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { - RETURN_FALSE; - } - break; - default: - WRONG_PARAM_COUNT; - /* NOTREACHED */ - break; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + RETURN_FALSE; } - + php_stream_from_zval(stream, &arg1); buff = arg2; @@ -1399,6 +1391,35 @@ PHP_FUNCTION(stream_set_write_buffer) } /* }}} */ +/* {{{ proto int stream_set_read_buffer(resource fp, int buffer) + Set file read buffer */ +PHP_FUNCTION(stream_set_read_buffer) +{ + zval *arg1; + int ret; + long arg2; + size_t buff; + php_stream *stream; + + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &arg1, &arg2) == FAILURE) { + RETURN_FALSE; + } + + php_stream_from_zval(stream, &arg1); + + buff = arg2; + + /* if buff is 0 then set to non-buffered */ + if (buff == 0) { + ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_NONE, NULL); + } else { + ret = php_stream_set_option(stream, PHP_STREAM_OPTION_READ_BUFFER, PHP_STREAM_BUFFER_FULL, &buff); + } + + RETURN_LONG(ret == 0 ? 0 : EOF); +} +/* }}} */ + /* {{{ proto int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]]) Enable or disable a specific kind of crypto on the stream */ PHP_FUNCTION(stream_socket_enable_crypto) @@ -1408,18 +1429,18 @@ PHP_FUNCTION(stream_socket_enable_crypto) php_stream *stream, *sessstream = NULL; zend_bool enable; int ret; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rb|lr", &zstream, &enable, &cryptokind, &zsessstream) == FAILURE) { RETURN_FALSE; } - + php_stream_from_zval(stream, &zstream); if (ZEND_NUM_ARGS() >= 3) { if (zsessstream) { php_stream_from_zval(sessstream, &zsessstream); } - + if (php_stream_xport_crypto_setup(stream, cryptokind, sessstream TSRMLS_CC) < 0) { RETURN_FALSE; } @@ -1435,7 +1456,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) case 0: RETURN_LONG(0); - + default: RETURN_TRUE; } @@ -1446,7 +1467,7 @@ PHP_FUNCTION(stream_socket_enable_crypto) Determine what file will be opened by calls to fopen() with a relative path */ PHP_FUNCTION(stream_resolve_include_path) { - char *filename, *resolved_path; + char *filename, *resolved_path; int filename_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { @@ -1482,7 +1503,7 @@ PHP_FUNCTION(stream_is_local) wrapper = stream->wrapper; } else { convert_to_string_ex(zstream); - + wrapper = php_stream_locate_url_wrapper(Z_STRVAL_PP(zstream), NULL, 0 TSRMLS_CC); } @@ -1526,11 +1547,11 @@ PHP_FUNCTION(stream_socket_shutdown) long how; zval *zstream; php_stream *stream; - + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &zstream, &how) == FAILURE) { RETURN_FALSE; } - + if (how != STREAM_SHUT_RD && how != STREAM_SHUT_WR && how != STREAM_SHUT_RDWR) { diff --git a/ext/standard/streamsfuncs.h b/ext/standard/streamsfuncs.h index e4e20e123..912efb33b 100644 --- a/ext/standard/streamsfuncs.h +++ b/ext/standard/streamsfuncs.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: streamsfuncs.h 293995 2010-01-25 15:57:24Z johannes $ */ +/* $Id: streamsfuncs.h 297895 2010-04-12 13:10:05Z pajoye $ */ /* Flags for stream_socket_client */ #define PHP_STREAM_CLIENT_PERSISTENT 1 @@ -36,6 +36,7 @@ PHP_FUNCTION(stream_get_contents); PHP_FUNCTION(stream_set_blocking); PHP_FUNCTION(stream_select); PHP_FUNCTION(stream_set_timeout); +PHP_FUNCTION(stream_set_read_buffer); PHP_FUNCTION(stream_set_write_buffer); PHP_FUNCTION(stream_get_transports); PHP_FUNCTION(stream_get_wrappers); diff --git a/ext/standard/string.c b/ext/standard/string.c index 2ebd18a04..3187310e6 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c 294517 2010-02-04 09:44:16Z pajoye $ */ +/* $Id: string.c 300105 2010-06-02 19:26:10Z rasmus $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -36,8 +36,19 @@ #ifdef HAVE_MONETARY_H # include <monetary.h> #endif +/* + * This define is here because some versions of libintl redefine setlocale + * to point to libintl_setlocale. That's a ridiculous thing to do as far + * as I am concerned, but with this define and the subsequent undef we + * limit the damage to just the actual setlocale() call in this file + * without turning zif_setlocale into zif_libintl_setlocale. -Rasmus + */ +#define php_my_setlocale setlocale #ifdef HAVE_LIBINTL # include <libintl.h> /* For LC_MESSAGES */ + #ifdef setlocale + # undef setlocale + #endif #endif #include "scanf.h" @@ -2219,12 +2230,21 @@ PHP_FUNCTION(substr_replace) } if (Z_TYPE_PP(str) != IS_ARRAY) { + if (Z_ISREF_PP(str)) { + SEPARATE_ZVAL(str); + } convert_to_string_ex(str); } if (Z_TYPE_PP(repl) != IS_ARRAY) { + if (Z_ISREF_PP(repl)) { + SEPARATE_ZVAL(repl); + } convert_to_string_ex(repl); } if (Z_TYPE_PP(from) != IS_ARRAY) { + if (Z_ISREF_PP(from)) { + SEPARATE_ZVAL(from); + } convert_to_long_ex(from); } @@ -4083,7 +4103,7 @@ PHP_FUNCTION(setlocale) } } - retval = setlocale(cat, loc); + retval = php_my_setlocale(cat, loc); zend_update_current_locale(); if (retval) { /* Remember if locale was changed */ @@ -4137,11 +4157,14 @@ PHP_FUNCTION(parse_str) Z_ARRVAL(tmp) = EG(active_symbol_table); sapi_module.treat_data(PARSE_STRING, res, &tmp TSRMLS_CC); } else { + zval ret; + + array_init(&ret); + sapi_module.treat_data(PARSE_STRING, res, &ret TSRMLS_CC); /* Clear out the array that was passed in. */ zval_dtor(arrayArg); - array_init(arrayArg); - - sapi_module.treat_data(PARSE_STRING, res, arrayArg TSRMLS_CC); + arrayArg->type = ret.type; + arrayArg->value = ret.value; } } /* }}} */ diff --git a/ext/standard/tests/array/array_map_variation2.phpt b/ext/standard/tests/array/array_map_variation2.phpt index e9608438f..16561abff 100644 --- a/ext/standard/tests/array/array_map_variation2.phpt +++ b/ext/standard/tests/array/array_map_variation2.phpt @@ -47,16 +47,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } } array(4) { @@ -94,16 +85,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } } } @@ -127,16 +109,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } } array(4) { @@ -166,16 +139,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } } } @@ -195,16 +159,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } } array(4) { @@ -240,16 +195,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } [1]=> &array(4) { @@ -260,16 +206,7 @@ array(4) { [0]=> &string(2) "v1" [1]=> - &array(4) { - ["k1"]=> - &string(2) "v1" - ["k2"]=> - string(2) "v2" - [0]=> - &string(2) "v1" - [1]=> - *RECURSION* - } + *RECURSION* } } } diff --git a/ext/standard/tests/array/array_push_variation4.phpt b/ext/standard/tests/array/array_push_variation4.phpt index ed339204f..f8f89042a 100644 --- a/ext/standard/tests/array/array_push_variation4.phpt +++ b/ext/standard/tests/array/array_push_variation4.phpt @@ -104,28 +104,7 @@ array(10) { [8]=> &string(1) "z" [9]=> - &array(10) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - [3]=> - &string(1) "a" - [4]=> - &string(1) "b" - [5]=> - &string(1) "c" - [6]=> - &string(1) "x" - [7]=> - &string(1) "y" - [8]=> - &string(1) "z" - [9]=> - *RECURSION* - } + *RECURSION* } } Done diff --git a/ext/standard/tests/array/array_values_variation4.phpt b/ext/standard/tests/array/array_values_variation4.phpt index 25980663e..9c35331fd 100644 --- a/ext/standard/tests/array/array_values_variation4.phpt +++ b/ext/standard/tests/array/array_values_variation4.phpt @@ -93,23 +93,7 @@ array(4) { int(3) } [0]=> - &array(4) { - ["zero"]=> - string(4) "zero" - ["un"]=> - string(3) "one" - ["sub"]=> - array(3) { - [0]=> - int(1) - [1]=> - int(2) - [2]=> - int(3) - } - [0]=> - *RECURSION* - } + *RECURSION* } } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/array/bug51552.phpt b/ext/standard/tests/array/bug51552.phpt new file mode 100644 index 000000000..fb61f489b --- /dev/null +++ b/ext/standard/tests/array/bug51552.phpt @@ -0,0 +1,23 @@ +--TEST-- +Bug #51552 (debug_backtrace() causes segmentation fault and/or memory issues) +--FILE-- +<?php +function walk($element, $key, $p) { + $backtrace = debug_backtrace(); + echo "$element\n"; +} + +$a = array(1,2,3,4,5,6,7,8,9,10); +array_walk($a, 'walk', 'testthis'); +?> +--EXPECT-- +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 diff --git a/ext/standard/tests/array/current_variation5.phpt b/ext/standard/tests/array/current_variation5.phpt new file mode 100644 index 000000000..b9bf4a995 --- /dev/null +++ b/ext/standard/tests/array/current_variation5.phpt @@ -0,0 +1,58 @@ +--TEST-- +Test current() function : usage variations - reference +--FILE-- +<?php +/* Prototype : mixed current(array $array_arg) + * Description: Return the element currently pointed to by the internal array pointer + * Source code: ext/standard/array.c + * Alias to functions: pos + */ + +echo "*** Testing current() : usage variations ***\n"; + +echo "\n-- Function: reference parameter --\n"; + +function current_variation5_ref(&$a) +{ + var_dump(current($a)); + var_dump(next($a)); +} + +$a = array('yes', 'maybe', 'no'); + +var_dump(current($a)); +var_dump(next($a)); +current_variation5($a); + +echo "\n-- Function: normal parameter --\n"; + +function current_variation5($a) +{ + var_dump(current($a)); + var_dump(next($a)); +} + +$a = array('yes', 'maybe', 'no'); + +var_dump(current($a)); +var_dump(next($a)); +current_variation5($a); + +?> +===DONE=== +<?php exit(0); ?> +--EXPECTF-- +*** Testing current() : usage variations *** + +-- Function: reference parameter -- +string(3) "yes" +string(5) "maybe" +string(5) "maybe" +string(2) "no" + +-- Function: normal parameter -- +string(3) "yes" +string(5) "maybe" +string(5) "maybe" +string(2) "no" +===DONE=== diff --git a/ext/standard/tests/array/natcasesort_variation7.phpt b/ext/standard/tests/array/natcasesort_variation7.phpt index c038f7d1c..91be7e262 100644 --- a/ext/standard/tests/array/natcasesort_variation7.phpt +++ b/ext/standard/tests/array/natcasesort_variation7.phpt @@ -44,18 +44,7 @@ array(5) { [3]=> string(1) "2" [4]=> - &array(5) { - [0]=> - int(1) - [1]=> - float(3) - [2]=> - string(4) "zero" - [3]=> - string(1) "2" - [4]=> - *RECURSION* - } + *RECURSION* } } bool(true) @@ -75,22 +64,11 @@ array(5) { [1]=> float(3) [4]=> - &array(5) { - [0]=> - int(1) - [3]=> - string(1) "2" - [1]=> - float(3) - [4]=> - *RECURSION* - [2]=> - string(4) "zero" - } + *RECURSION* [2]=> string(4) "zero" } [2]=> string(4) "zero" } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt index e8ffd5752..0accb2c85 100644 --- a/ext/standard/tests/directory/DirectoryClass_basic_001.phpt +++ b/ext/standard/tests/directory/DirectoryClass_basic_001.phpt @@ -35,13 +35,25 @@ Class [ <internal%s> class Directory ] { } - Methods [3] { - Method [ <internal%s> public method close ] { + Method [ <internal:standard> public method close ] { + + - Parameters [1] { + Parameter #0 [ <optional> $dir_handle ] + } } - Method [ <internal%s> public method rewind ] { + Method [ <internal:standard> public method rewind ] { + + - Parameters [1] { + Parameter #0 [ <optional> $dir_handle ] + } } - Method [ <internal%s> public method read ] { + Method [ <internal:standard> public method read ] { + + - Parameters [1] { + Parameter #0 [ <optional> $dir_handle ] + } } } } @@ -50,4 +62,4 @@ object(Directory)#%d (0) { } Warning: Directory::read(): Unable to find my handle property in %s on line 15 -bool(false)
\ No newline at end of file +bool(false) diff --git a/ext/standard/tests/file/bug39863.phpt b/ext/standard/tests/file/bug39863.phpt new file mode 100644 index 000000000..520a46412 --- /dev/null +++ b/ext/standard/tests/file/bug39863.phpt @@ -0,0 +1,24 @@ +--TEST-- +Bug #39863 (file_exists() silently truncates after a null byte) +--CREDITS-- +Andrew van der Stock, vanderaj @ owasp.org +--FILE-- +<?php + +$filename = __FILE__ . chr(0). ".ridiculous"; + +if (file_exists($filename)) { + echo "FAIL\n"; +} +else { + echo "PASS\n"; +} +?> +===DONE=== +<?php exit(0); ?> +--XFAIL-- +Needs bug #39863 fixed +--EXPECT-- +PASS +===DONE=== + diff --git a/ext/standard/tests/file/realpath_cache.phpt b/ext/standard/tests/file/realpath_cache.phpt index 567f0e2c7..a476063d6 100644 --- a/ext/standard/tests/file/realpath_cache.phpt +++ b/ext/standard/tests/file/realpath_cache.phpt @@ -19,7 +19,7 @@ echo "Done\n"; int(%d) array(4) { ["key"]=> - int(%d) + int(%i) ["is_dir"]=> bool(true) ["realpath"]=> diff --git a/ext/standard/tests/general_functions/bug49847.phpt b/ext/standard/tests/general_functions/bug49847.phpt index 8895202d0..6312d03c0 100644 --- a/ext/standard/tests/general_functions/bug49847.phpt +++ b/ext/standard/tests/general_functions/bug49847.phpt @@ -23,3 +23,4 @@ array(1) { [0]=> string(4098) "%s 1" } + diff --git a/ext/standard/tests/general_functions/bug52138.data b/ext/standard/tests/general_functions/bug52138.data new file mode 100644 index 000000000..4ce82e097 --- /dev/null +++ b/ext/standard/tests/general_functions/bug52138.data @@ -0,0 +1,11 @@ +[MYCONST] +MYCONST = MYCONST + +[M_PI] +FOO=M_PI " test" + +[foo::bar] +A=1 +B=A "A" A + +[MYCONST M_PI] diff --git a/ext/standard/tests/general_functions/bug52138.phpt b/ext/standard/tests/general_functions/bug52138.phpt new file mode 100644 index 000000000..d4f38735a --- /dev/null +++ b/ext/standard/tests/general_functions/bug52138.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #52138 (Constants are parsed into the ini file for section names) +--FILE-- +<?php + +define('MYCONST', 1); +define('A', 'B'); + +$ini_file = dirname(__FILE__)."/bug52138.data"; + +$ret = parse_ini_file($ini_file, true); +var_dump($ret); + +?> +--EXPECTF-- +array(4) { + ["MYCONST"]=> + array(1) { + ["MYCONST"]=> + string(1) "1" + } + ["M_PI"]=> + array(1) { + ["FOO"]=> + string(%d) "3.%d test" + } + ["foo::bar"]=> + array(2) { + ["A"]=> + string(1) "1" + ["B"]=> + string(3) "BAB" + } + ["MYCONST M_PI"]=> + array(0) { + } +} diff --git a/ext/standard/tests/general_functions/getservbyname_basic.phpt b/ext/standard/tests/general_functions/getservbyname_basic.phpt index 164e71afd..adaa7afb4 100755 --- a/ext/standard/tests/general_functions/getservbyname_basic.phpt +++ b/ext/standard/tests/general_functions/getservbyname_basic.phpt @@ -1,5 +1,5 @@ --TEST-- -Test function getservbyport() by calling it more than or less than its expected arguments +Test function getservbyname() --CREDITS-- Italian PHP TestFest 2009 Cesena 19-20-21 june Fabio Fabbrucci (fabbrucci@grupporetina.com) diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt index 1a525c53b..09e9f3b99 100644 --- a/ext/standard/tests/general_functions/var_dump.phpt +++ b/ext/standard/tests/general_functions/var_dump.phpt @@ -573,7 +573,7 @@ array(2) { *** Testing var_dump() on object variables *** -- Iteration 1 -- -object(object_class)#%d (7) { +object(object_class)#6 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -590,14 +590,14 @@ object(object_class)#%d (7) { int(11) } -- Iteration 2 -- -object(no_member_class)#%d (0) { +object(no_member_class)#7 (0) { } -- Iteration 3 -- -object(contains_object_class)#%d (7) { +object(contains_object_class)#8 (7) { ["p"]=> int(30) ["class_object1"]=> - object(object_class)#%d (7) { + object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -614,7 +614,7 @@ object(contains_object_class)#%d (7) { int(11) } ["class_object2"]=> - object(object_class)#%d (7) { + object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -631,7 +631,7 @@ object(contains_object_class)#%d (7) { int(11) } ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { + object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -648,7 +648,7 @@ object(contains_object_class)#%d (7) { int(11) } ["class_object4":protected]=> - object(object_class)#%d (7) { + object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -665,93 +665,17 @@ object(contains_object_class)#%d (7) { int(11) } ["no_member_class_object"]=> - object(no_member_class)#%d (0) { + object(no_member_class)#11 (0) { } ["class_object5"]=> - object(contains_object_class)#%d (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#%d (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } -- Iteration 4 -- -object(contains_object_class)#%d (7) { +object(contains_object_class)#1 (7) { ["p"]=> int(30) ["class_object1"]=> - object(object_class)#%d (7) { + object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -768,7 +692,7 @@ object(contains_object_class)#%d (7) { int(11) } ["class_object2"]=> - object(object_class)#%d (7) { + object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -785,7 +709,7 @@ object(contains_object_class)#%d (7) { int(11) } ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { + object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -802,7 +726,7 @@ object(contains_object_class)#%d (7) { int(11) } ["class_object4":protected]=> - object(object_class)#%d (7) { + object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -819,89 +743,13 @@ object(contains_object_class)#%d (7) { int(11) } ["no_member_class_object"]=> - object(no_member_class)#%d (0) { + object(no_member_class)#4 (0) { } ["class_object5"]=> - object(contains_object_class)#%d (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#%d (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } -- Iteration 5 -- -object(object_class)#%d (7) { +object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -918,7 +766,7 @@ object(object_class)#%d (7) { int(11) } -- Iteration 6 -- -object(object_class)#%d (7) { +object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -935,10 +783,10 @@ object(object_class)#%d (7) { int(11) } -- Iteration 7 -- -object(no_member_class)#%d (0) { +object(no_member_class)#4 (0) { } -- Iteration 8 -- -object(object_class)#%d (7) { +object(object_class)#5 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -958,7 +806,7 @@ object(object_class)#%d (7) { NULL ** Testing var_dump() on objects having circular reference ** -object(object_class)#%d (8) { +object(object_class)#13 (8) { ["value"]=> int(50) ["public_var1"]=> @@ -974,7 +822,7 @@ object(object_class)#%d (8) { ["public_var2"]=> int(11) ["obj"]=> - &object(object_class)#%d (8) { + &object(object_class)#12 (8) { ["value"]=> int(50) ["public_var1"]=> @@ -990,49 +838,15 @@ object(object_class)#%d (8) { ["public_var2"]=> int(11) ["obj"]=> - &object(object_class)#%d (8) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - ["obj"]=> - &object(object_class)#%d (8) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - ["obj"]=> - *RECURSION* - } - } + *RECURSION* } } *** Testing var_dump() on resources *** -- Iteration 1 -- -resource(%d) of type (stream) +resource(5) of type (stream) -- Iteration 2 -- -resource(%d) of type (stream) +resource(6) of type (stream) *** Testing var_dump() on different combinations of scalar and non-scalar variables *** @@ -1066,7 +880,7 @@ array(4) { -- Iteration 3 -- array(4) { [0]=> - object(no_member_class)#%d (0) { + object(no_member_class)#14 (0) { } [1]=> array(0) { @@ -1413,13 +1227,13 @@ array(4) { } array(2) { [0]=> - resource(%d) of type (stream) + resource(5) of type (stream) [1]=> - resource(%d) of type (stream) + resource(6) of type (stream) } array(9) { [0]=> - object(object_class)#%d (7) { + object(object_class)#6 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1436,14 +1250,14 @@ array(9) { int(11) } [1]=> - object(no_member_class)#%d (0) { + object(no_member_class)#7 (0) { } [2]=> - object(contains_object_class)#%d (7) { + object(contains_object_class)#8 (7) { ["p"]=> int(30) ["class_object1"]=> - object(object_class)#%d (7) { + object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1460,7 +1274,7 @@ array(9) { int(11) } ["class_object2"]=> - object(object_class)#%d (7) { + object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1477,7 +1291,7 @@ array(9) { int(11) } ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { + object(object_class)#9 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1494,7 +1308,7 @@ array(9) { int(11) } ["class_object4":protected]=> - object(object_class)#%d (7) { + object(object_class)#10 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1511,93 +1325,17 @@ array(9) { int(11) } ["no_member_class_object"]=> - object(no_member_class)#%d (0) { + object(no_member_class)#11 (0) { } ["class_object5"]=> - object(contains_object_class)#%d (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#%d (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } [3]=> - object(contains_object_class)#%d (7) { + object(contains_object_class)#1 (7) { ["p"]=> int(30) ["class_object1"]=> - object(object_class)#%d (7) { + object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1614,7 +1352,7 @@ array(9) { int(11) } ["class_object2"]=> - object(object_class)#%d (7) { + object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1631,7 +1369,7 @@ array(9) { int(11) } ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { + object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1648,7 +1386,7 @@ array(9) { int(11) } ["class_object4":protected]=> - object(object_class)#%d (7) { + object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1665,89 +1403,13 @@ array(9) { int(11) } ["no_member_class_object"]=> - object(no_member_class)#%d (0) { + object(no_member_class)#4 (0) { } ["class_object5"]=> - object(contains_object_class)#%d (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#%d (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#%d (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } [4]=> - object(object_class)#%d (7) { + object(object_class)#2 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1764,7 +1426,7 @@ array(9) { int(11) } [5]=> - object(object_class)#%d (7) { + object(object_class)#3 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1781,10 +1443,10 @@ array(9) { int(11) } [6]=> - object(no_member_class)#%d (0) { + object(no_member_class)#4 (0) { } [7]=> - object(object_class)#%d (7) { + object(object_class)#5 (7) { ["value"]=> int(50) ["public_var1"]=> @@ -1844,7 +1506,7 @@ array(6) { [2]=> array(4) { [0]=> - object(no_member_class)#%d (0) { + object(no_member_class)#14 (0) { } [1]=> array(0) { @@ -1907,5 +1569,6 @@ string(9) " *** Testing error conditions *** -Warning: var_dump() expects at least %d parameter, %d given in %s on line %d +Warning: var_dump() expects at least 1 parameter, 0 given in %s on line %d Done + diff --git a/ext/standard/tests/general_functions/var_dump_64bit.phpt b/ext/standard/tests/general_functions/var_dump_64bit.phpt index 3772536cf..a81980c02 100644 --- a/ext/standard/tests/general_functions/var_dump_64bit.phpt +++ b/ext/standard/tests/general_functions/var_dump_64bit.phpt @@ -462,8 +462,7 @@ string(34) "abcd -- Iteration 14 -- string(22) "1234 5678 - 9100 -abcda" + 9100
abcda" *** Testing var_dump() on boolean variables *** -- Iteration 1 -- @@ -669,83 +668,7 @@ object(contains_object_class)#8 (7) { object(no_member_class)#11 (0) { } ["class_object5"]=> - object(contains_object_class)#8 (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#9 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#10 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#9 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#10 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#11 (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } -- Iteration 4 -- object(contains_object_class)#1 (7) { @@ -823,83 +746,7 @@ object(contains_object_class)#1 (7) { object(no_member_class)#4 (0) { } ["class_object5"]=> - object(contains_object_class)#1 (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#2 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#3 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#2 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#3 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#4 (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } -- Iteration 5 -- object(object_class)#2 (7) { @@ -991,41 +838,7 @@ object(object_class)#13 (8) { ["public_var2"]=> int(11) ["obj"]=> - &object(object_class)#13 (8) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - ["obj"]=> - &object(object_class)#12 (8) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - ["obj"]=> - *RECURSION* - } - } + *RECURSION* } } @@ -1303,8 +1116,7 @@ array(14) { [13]=> string(22) "1234 5678 - 9100 -abcda" + 9100
abcda" } array(15) { [0]=> @@ -1516,83 +1328,7 @@ array(9) { object(no_member_class)#11 (0) { } ["class_object5"]=> - object(contains_object_class)#8 (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#9 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#10 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#9 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#10 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#11 (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } [3]=> object(contains_object_class)#1 (7) { @@ -1670,83 +1406,7 @@ array(9) { object(no_member_class)#4 (0) { } ["class_object5"]=> - object(contains_object_class)#1 (7) { - ["p"]=> - int(30) - ["class_object1"]=> - object(object_class)#2 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object2"]=> - object(object_class)#3 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object3":"contains_object_class":private]=> - object(object_class)#2 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["class_object4":protected]=> - object(object_class)#3 (7) { - ["value"]=> - int(50) - ["public_var1"]=> - int(10) - ["private_var1":"object_class":private]=> - int(20) - ["private_var2":"object_class":private]=> - int(21) - ["protected_var1":protected]=> - string(8) "string_1" - ["protected_var2":protected]=> - string(8) "string_2" - ["public_var2"]=> - int(11) - } - ["no_member_class_object"]=> - object(no_member_class)#4 (0) { - } - ["class_object5"]=> - *RECURSION* - } + *RECURSION* } [4]=> object(object_class)#2 (7) { @@ -1911,3 +1571,4 @@ string(9) " Warning: var_dump() expects at least 1 parameter, 0 given in %s on line %d Done + diff --git a/ext/standard/tests/general_functions/var_export_error2.phpt b/ext/standard/tests/general_functions/var_export_error2.phpt index 93d0dc164..2b306696a 100644 --- a/ext/standard/tests/general_functions/var_export_error2.phpt +++ b/ext/standard/tests/general_functions/var_export_error2.phpt @@ -14,12 +14,5 @@ var_export($obj, true); ?> ===DONE=== --EXPECTF-- -stdClass::__set_state(array( - 'p' => - stdClass::__set_state(array( - 'p' => - stdClass::__set_state(array( - 'p' => - stdClass::__set_state(array( Fatal error: Nesting level too deep - recursive dependency? in %s on line 9
\ No newline at end of file diff --git a/ext/standard/tests/general_functions/var_export_error3.phpt b/ext/standard/tests/general_functions/var_export_error3.phpt index 4ad512168..03ed496ac 100644 --- a/ext/standard/tests/general_functions/var_export_error3.phpt +++ b/ext/standard/tests/general_functions/var_export_error3.phpt @@ -14,14 +14,5 @@ var_export($a, true); ?> ===DONE=== --EXPECTF-- -array ( - 0 => - array ( - 0 => - array ( - 0 => - array ( - 0 => - array ( Fatal error: Nesting level too deep - recursive dependency? in %s on line 9
\ No newline at end of file diff --git a/ext/standard/tests/mail/bug51604.phpt b/ext/standard/tests/mail/bug51604.phpt new file mode 100644 index 000000000..a65702102 --- /dev/null +++ b/ext/standard/tests/mail/bug51604.phpt @@ -0,0 +1,35 @@ +--TEST-- +Bug #51604 (newline in end of header is shown in start of message) +--INI-- +sendmail_path=tee mail_bug51604.out >/dev/null +mail.add_x_header = Off +--SKIPIF-- +<?php +if(substr(PHP_OS, 0, 3) == "WIN") + die("skip Won't run on Windows"); +?> +--FILE-- +<?php +// Initialise all required variables +$to = 'user@company.com'; +$subject = 'Test Subject'; +$message = 'A Message'; +$additional_headers = "KHeaders\n\n\n\n\n"; +$outFile = "mail_bug51604.out"; +@unlink($outFile); + +// Calling mail() with all additional headers +var_dump( mail($to, $subject, $message, $additional_headers) ); +echo file_get_contents($outFile); +unlink($outFile); + +?> +===DONE=== +--EXPECT-- +bool(true) +To: user@company.com +Subject: Test Subject +KHeaders + +A Message +===DONE=== diff --git a/ext/standard/tests/misc/time_sleep_until_basic.phpt b/ext/standard/tests/misc/time_sleep_until_basic.phpt index 7f2f32d24..956985a62 100644 --- a/ext/standard/tests/misc/time_sleep_until_basic.phpt +++ b/ext/standard/tests/misc/time_sleep_until_basic.phpt @@ -1,5 +1,7 @@ --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');?> --CREDITS-- Manuel Baldassarri mb@ideato.it Michele Orselli mo@ideato.it diff --git a/ext/standard/tests/misc/time_sleep_until_error1.phpt b/ext/standard/tests/misc/time_sleep_until_error1.phpt index 9752fd70e..2a409a38b 100644 --- a/ext/standard/tests/misc/time_sleep_until_error1.phpt +++ b/ext/standard/tests/misc/time_sleep_until_error1.phpt @@ -1,5 +1,7 @@ --TEST-- time_sleep_until() function - error test for time_sleep_until() +--SKIPIF-- +<?php if (!function_exists("time_sleep_until")) die('skip time_sleep_until() not available');?> --CREDITS-- Fabio Fabbrucci fabbrucci@grupporetina.com Danilo Sanchi sanchi@grupporetina.com diff --git a/ext/standard/tests/misc/time_sleep_until_error2.phpt b/ext/standard/tests/misc/time_sleep_until_error2.phpt index d20c8ab65..bbfef1b76 100644 --- a/ext/standard/tests/misc/time_sleep_until_error2.phpt +++ b/ext/standard/tests/misc/time_sleep_until_error2.phpt @@ -1,9 +1,7 @@ --TEST-- time_sleep_until() function - error test for time_sleep_until() --SKIPIF-- -<?php - function_exists('time_sleep_until') or die('skip time_sleep_until() is not supported in this build.'); -?> +<?php if (!function_exists("time_sleep_until")) die('skip time_sleep_until() not available');?> --CREDITS-- Filippo De Santis fd@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 diff --git a/ext/standard/tests/misc/time_sleep_until_error3.phpt b/ext/standard/tests/misc/time_sleep_until_error3.phpt index 64489618a..f18e5b302 100644 --- a/ext/standard/tests/misc/time_sleep_until_error3.phpt +++ b/ext/standard/tests/misc/time_sleep_until_error3.phpt @@ -1,5 +1,7 @@ --TEST-- time_sleep_until() function - error test for time_sleep_until() +--SKIPIF-- +<?php if (!function_exists("time_sleep_until")) die('skip time_sleep_until() not available');?> --CREDITS-- Francesco Fullone ff@ideato.it #PHPTestFest Cesena Italia on 2009-06-20 diff --git a/ext/standard/tests/network/getmxrr.phpt b/ext/standard/tests/network/getmxrr.phpt index 5dc3560d0..b6753f0d6 100644 --- a/ext/standard/tests/network/getmxrr.phpt +++ b/ext/standard/tests/network/getmxrr.phpt @@ -8,7 +8,7 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { ?> --FILE-- <?php -$domains = array( 'php.net', 'ez.no' ); +$domains = array( 'php.net', 'lists.php.net' ); foreach ( $domains as $domain ) { if ( getmxrr( $domain, $hosts, $weights ) ) diff --git a/ext/standard/tests/serialize/bug28325.phpt b/ext/standard/tests/serialize/bug28325.phpt index 7f2bd6637..ee0e60e1a 100644 --- a/ext/standard/tests/serialize/bug28325.phpt +++ b/ext/standard/tests/serialize/bug28325.phpt @@ -24,16 +24,7 @@ object(a)#%d (1) { ["c"]=> object(c)#%d (1) { ["d"]=> - object(a)#%d (1) { - ["b"]=> - object(b)#%d (1) { - ["c"]=> - object(c)#%d (1) { - ["d"]=> - *RECURSION* - } - } - } + *RECURSION* } } } diff --git a/ext/standard/tests/serialize/serialization_arrays_001.phpt b/ext/standard/tests/serialize/serialization_arrays_001.phpt index f62f69855..ff5f34c5b 100644 --- a/ext/standard/tests/serialize/serialization_arrays_001.phpt +++ b/ext/standard/tests/serialize/serialization_arrays_001.phpt @@ -34,7 +34,6 @@ var_dump($arr_asso); echo "\nDone"; ?> --EXPECTF-- - --- Testing Circular reference of an array --- -- Normal array -- string(238) "a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.333333000000000101437080957111902534961700439453125;i:4;s:1:"a";i:5;a:0:{}i:6;a:7:{i:0;i:0;i:1;i:1;i:2;i:-2;i:3;d:3.333333000000000101437080957111902534961700439453125;i:4;s:1:"a";i:5;a:0:{}i:6;R:8;}}" @@ -68,23 +67,7 @@ array(7) { array(0) { } [6]=> - &array(7) { - [0]=> - int(0) - [1]=> - int(1) - [2]=> - int(-2) - [3]=> - float(3.333333) - [4]=> - string(1) "a" - [5]=> - array(0) { - } - [6]=> - *RECURSION* - } + *RECURSION* } } @@ -103,4 +86,4 @@ array(2) { &string(4) "test" } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/serialize/serialization_arrays_004.phpt b/ext/standard/tests/serialize/serialization_arrays_004.phpt index 942afdfb9..55d849c97 100644 --- a/ext/standard/tests/serialize/serialization_arrays_004.phpt +++ b/ext/standard/tests/serialize/serialization_arrays_004.phpt @@ -52,21 +52,12 @@ check($a); echo "Done"; ?> --EXPECTF-- - - --- 1 refs container: array(3) { [0]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - int(1) - [2]=> - int(1) - } + *RECURSION* [1]=> int(1) [2]=> @@ -82,14 +73,7 @@ array(3) { [0]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - int(1) - [2]=> - int(1) - } + *RECURSION* [1]=> int(1) [2]=> @@ -102,7 +86,7 @@ array(3) { } array(3) { [0]=> - %string(10) "b0.changed" + string(10) "b0.changed" [1]=> int(1) [2]=> @@ -110,7 +94,7 @@ array(3) { } array(3) { [0]=> - %string(10) "b0.changed" + string(10) "b0.changed" [1]=> string(10) "b1.changed" [2]=> @@ -118,7 +102,7 @@ array(3) { } array(3) { [0]=> - %string(10) "b0.changed" + string(10) "b0.changed" [1]=> string(10) "b1.changed" [2]=> @@ -131,46 +115,18 @@ array(3) { [0]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [2]=> int(1) } [1]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [2]=> int(1) } @@ -182,46 +138,18 @@ array(3) { [0]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [2]=> int(1) } [1]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - int(1) - } + *RECURSION* [2]=> int(1) } @@ -259,92 +187,29 @@ array(3) { [0]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [2]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* } [1]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [2]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* } [2]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [2]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* } } string(56) "a:3:{i:0;a:3:{i:0;R:2;i:1;R:2;i:2;R:2;}i:1;R:2;i:2;R:2;}" @@ -352,92 +217,29 @@ array(3) { [0]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [2]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* } [1]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [2]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* } [2]=> &array(3) { [0]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [1]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* [2]=> - &array(3) { - [0]=> - *RECURSION* - [1]=> - *RECURSION* - [2]=> - *RECURSION* - } + *RECURSION* } } array(3) { @@ -464,4 +266,4 @@ array(3) { [2]=> &string(10) "b2.changed" } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/serialize/serialization_arrays_005.phpt b/ext/standard/tests/serialize/serialization_arrays_005.phpt index dd3e436ed..10e33129f 100644 --- a/ext/standard/tests/serialize/serialization_arrays_005.phpt +++ b/ext/standard/tests/serialize/serialization_arrays_005.phpt @@ -79,8 +79,6 @@ check($c); ?> --EXPECTF-- - - --- Nested array references 1 element in containing array: array(3) { [0]=> @@ -443,19 +441,7 @@ array(3) { [1]=> int(1) [2]=> - &array(2) { - [0]=> - int(1) - [1]=> - &array(3) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - *RECURSION* - } - } + *RECURSION* } } } @@ -476,19 +462,7 @@ array(3) { [1]=> int(1) [2]=> - &array(2) { - [0]=> - int(1) - [1]=> - array(3) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - *RECURSION* - } - } + *RECURSION* } } } @@ -508,19 +482,7 @@ array(3) { [1]=> int(1) [2]=> - &array(2) { - [0]=> - int(1) - [1]=> - array(3) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - *RECURSION* - } - } + *RECURSION* } } } @@ -540,19 +502,7 @@ array(3) { [1]=> int(1) [2]=> - &array(2) { - [0]=> - string(12) "b2.0.changed" - [1]=> - array(3) { - [0]=> - int(1) - [1]=> - int(1) - [2]=> - *RECURSION* - } - } + *RECURSION* } } } diff --git a/ext/standard/tests/serialize/serialization_objects_015.phpt b/ext/standard/tests/serialize/serialization_objects_015.phpt index 02e8279c4..2265caba9 100644 --- a/ext/standard/tests/serialize/serialization_objects_015.phpt +++ b/ext/standard/tests/serialize/serialization_objects_015.phpt @@ -74,14 +74,7 @@ echo "Done"; --- a refs container: object(stdClass)#%d (3) { ["a"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - int(1) - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> int(1) ["c"]=> @@ -90,14 +83,7 @@ object(stdClass)#%d (3) { string(55) "O:8:"stdClass":3:{s:1:"a";R:1;s:1:"b";i:1;s:1:"c";i:1;}" object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - int(1) - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> int(1) ["c"]=> @@ -132,14 +118,7 @@ object(stdClass)#%d (3) { --- a eqs container: object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - int(1) - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> int(1) ["c"]=> @@ -148,14 +127,7 @@ object(stdClass)#%d (3) { string(55) "O:8:"stdClass":3:{s:1:"a";r:1;s:1:"b";i:1;s:1:"c";i:1;}" object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - int(1) - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> int(1) ["c"]=> @@ -190,46 +162,18 @@ object(stdClass)#%d (3) { --- a,b ref container: object(stdClass)#%d (3) { ["a"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["c"]=> int(1) } string(55) "O:8:"stdClass":3:{s:1:"a";R:1;s:1:"b";R:1;s:1:"c";i:1;}" object(stdClass)#%d (3) { ["a"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["c"]=> int(1) } @@ -262,46 +206,18 @@ object(stdClass)#%d (3) { --- a,b eq container: object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["c"]=> int(1) } string(55) "O:8:"stdClass":3:{s:1:"a";r:1;s:1:"b";r:1;s:1:"c";i:1;}" object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["b"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["c"]=> int(1) } @@ -309,14 +225,7 @@ object(stdClass)#%d (3) { ["a"]=> string(14) "obj->a.changed" ["b"]=> - object(stdClass)#%d (3) { - ["a"]=> - string(14) "obj->a.changed" - ["b"]=> - *RECURSION* - ["c"]=> - int(1) - } + *RECURSION* ["c"]=> int(1) } @@ -341,62 +250,20 @@ object(stdClass)#%d (3) { --- a,b,c ref container: object(stdClass)#%d (3) { ["a"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["b"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["c"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* } string(55) "O:8:"stdClass":3:{s:1:"a";R:1;s:1:"b";R:1;s:1:"c";R:1;}" object(stdClass)#%d (3) { ["a"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["b"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["c"]=> - &object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* } object(stdClass)#%d (3) { ["a"]=> @@ -427,84 +294,28 @@ object(stdClass)#%d (3) { --- a,b,c eq container: object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["b"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["c"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* } string(55) "O:8:"stdClass":3:{s:1:"a";r:1;s:1:"b";r:1;s:1:"c";r:1;}" object(stdClass)#%d (3) { ["a"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["b"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["c"]=> - object(stdClass)#%d (3) { - ["a"]=> - *RECURSION* - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* } object(stdClass)#%d (3) { ["a"]=> string(14) "obj->a.changed" ["b"]=> - object(stdClass)#%d (3) { - ["a"]=> - string(14) "obj->a.changed" - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* ["c"]=> - object(stdClass)#%d (3) { - ["a"]=> - string(14) "obj->a.changed" - ["b"]=> - *RECURSION* - ["c"]=> - *RECURSION* - } + *RECURSION* } object(stdClass)#%d (3) { ["a"]=> @@ -512,14 +323,7 @@ object(stdClass)#%d (3) { ["b"]=> string(14) "obj->b.changed" ["c"]=> - object(stdClass)#%d (3) { - ["a"]=> - string(14) "obj->a.changed" - ["b"]=> - string(14) "obj->b.changed" - ["c"]=> - *RECURSION* - } + *RECURSION* } object(stdClass)#%d (3) { ["a"]=> @@ -529,4 +333,4 @@ object(stdClass)#%d (3) { ["c"]=> string(14) "obj->c.changed" } -Done
\ No newline at end of file +Done diff --git a/ext/standard/tests/strings/bug47842.phpt b/ext/standard/tests/strings/bug47842.phpt new file mode 100644 index 000000000..4ac9da6d8 --- /dev/null +++ b/ext/standard/tests/strings/bug47842.phpt @@ -0,0 +1,34 @@ +--TEST-- +Bug #47842 sscanf() does not support 64-bit values +--SKIPIF-- +<?php +if (PHP_INT_MAX < pow(2,31)) die("skip PHP_INT_MAX < 32b\n"); +?> +--FILE-- +<?php +echo "-Test\n"; + +sscanf("2147483647", '%d', $int); +echo "sscanf 32-bit signed int '2147483647' (2^31)-1 = ",$int,"\n"; +sscanf("4294967295", '%u', $int); +echo "sscanf 32-bit unsign int '4294967295' (2^32)-1 = ",$int,"\n"; + +sscanf("9223372036854775807", '%d', $int); +echo "sscanf 64-bit signed int '9223372036854775807' (2^63)-1 = ",$int,"\n"; +sscanf("18446744073709551615", '%u', $int); +echo "sscanf 64-bit unsign int '18446744073709551615' (2^64)-1 = ",$int,"\n"; + +printf("printf 64-bit signed int '9223372036854775807' (2^63)-1 = %d\n", 9223372036854775807); +printf("printf 64-bit signed int '18446744073709551615' (2^64)-1 = %u\n", 18446744073709551615); + +echo "Done\n"; +?> +--EXPECTF-- +%aTest +sscanf 32-bit signed int '2147483647' (2^31)-1 = 2147483647 +sscanf 32-bit unsign int '4294967295' (2^32)-1 = 4294967295 +sscanf 64-bit signed int '9223372036854775807' (2^63)-1 = 9223372036854775807 +sscanf 64-bit unsign int '18446744073709551615' (2^64)-1 = 18446744073709551615 +printf 64-bit signed int '9223372036854775807' (2^63)-1 = 9223372036854775807 +printf 64-bit signed int '18446744073709551615' (2^64)-1 = 0 +Done diff --git a/ext/standard/tests/strings/bug51059.phpt b/ext/standard/tests/strings/bug51059.phpt index f2cbe9def..bdc56f176 100644 --- a/ext/standard/tests/strings/bug51059.phpt +++ b/ext/standard/tests/strings/bug51059.phpt @@ -2,8 +2,8 @@ Bug #51059 crypt() segfaults on certain salts --FILE-- <?php -$res = crypt('a', '_'); -if ($res == '*0' || $res == '*1') echo 'OK'; +$res = crypt(b'a', b'_'); +if ($res === b'*0' || $res === b'*1') echo 'OK'; else echo 'Not OK'; ?> diff --git a/ext/standard/tests/strings/bug51899.phpt b/ext/standard/tests/strings/bug51899.phpt new file mode 100644 index 000000000..fb430cf30 --- /dev/null +++ b/ext/standard/tests/strings/bug51899.phpt @@ -0,0 +1,37 @@ +--TEST-- +Bug #51899 (Parse error in parse_ini_file() function when empy value followed by no newline) +--FILE-- +<?php + +var_dump(parse_ini_string('a=')); +var_dump(parse_ini_string('a= ')); +var_dump(parse_ini_string('a='.PHP_EOL)); +var_dump(parse_ini_string('a=b ')); +var_dump(parse_ini_string('')); +var_dump(parse_ini_string(NULL)); +var_dump(parse_ini_string("\0")); + +?> +--EXPECT-- +array(1) { + ["a"]=> + string(0) "" +} +array(1) { + ["a"]=> + string(0) "" +} +array(1) { + ["a"]=> + string(0) "" +} +array(1) { + ["a"]=> + string(2) "b " +} +array(0) { +} +array(0) { +} +array(0) { +} diff --git a/ext/standard/tests/strings/crypt_blowfish_invalid_rounds.phpt b/ext/standard/tests/strings/crypt_blowfish_invalid_rounds.phpt deleted file mode 100644 index 6d40b0770..000000000 --- a/ext/standard/tests/strings/crypt_blowfish_invalid_rounds.phpt +++ /dev/null @@ -1,22 +0,0 @@ ---TEST-- -Test Blowfish crypt() with invalid rounds ---FILE-- -<?php - -foreach(range(32, 38) as $i) { - if (crypt('U*U', '$2a$'.$i.'$CCCCCCCCCCCCCCCCCCCCCC$') === FALSE) { - echo "$i. OK\n"; - } else { - echo "$i. Not OK\n"; - } -} - -?> ---EXPECT-- -32. OK -33. OK -34. OK -35. OK -36. OK -37. OK -38. OK diff --git a/ext/standard/tests/strings/crypt_blowfish_variation1.phpt b/ext/standard/tests/strings/crypt_blowfish_variation1.phpt new file mode 100644 index 000000000..1592cfe87 --- /dev/null +++ b/ext/standard/tests/strings/crypt_blowfish_variation1.phpt @@ -0,0 +1,37 @@ +--TEST-- +Test Blowfish crypt() with invalid rounds +--SKIPIF-- +<?php +if (!function_exists('crypt') || !defined("CRYPT_BLOWFISH")) { + die("SKIP crypt()-blowfish is not available"); +} +?> +--FILE-- +<?php + +$salts = array(b'32' => b'$2a$32$CCCCCCCCCCCCCCCCCCCCCC$', + b'33' => b'$2a$33$CCCCCCCCCCCCCCCCCCCCCC$', + b'34' => b'$2a$34$CCCCCCCCCCCCCCCCCCCCCC$', + b'35' => b'$2a$35$CCCCCCCCCCCCCCCCCCCCCC$', + b'36' => b'$2a$36$CCCCCCCCCCCCCCCCCCCCCC$', + b'37' => b'$2a$37$CCCCCCCCCCCCCCCCCCCCCC$', + b'38' => b'$2a$38$CCCCCCCCCCCCCCCCCCCCCC$',); + +foreach($salts as $i=>$salt) { + $crypt = crypt(b'U*U', $salt); + if ($crypt === b'*0' || $crypt === b'*1') { + echo "$i. OK\n"; + } else { + echo "$i. Not OK\n"; + } +} + +?> +--EXPECT-- +32. OK +33. OK +34. OK +35. OK +36. OK +37. OK +38. OK diff --git a/ext/standard/tests/strings/crypt_blowfish_variation2.phpt b/ext/standard/tests/strings/crypt_blowfish_variation2.phpt new file mode 100644 index 000000000..21bedc10c --- /dev/null +++ b/ext/standard/tests/strings/crypt_blowfish_variation2.phpt @@ -0,0 +1,14 @@ +--TEST-- +Test Blowfish crypt() falls back to DES when rounds are not specified, +or Blowfish is not available. +--FILE-- +<?php +$crypt = crypt(b'U*U', b'$2a$CCCCCCCCCCCCCCCCCCCCC.E5YPO9kmyuRGyh0XouQYb4YMJKvyOeW'); +if ($crypt===b'$2SHYF.wPGyfE') { + echo "OK\n"; +} else { + echo "Not OK\n"; +} +?> +--EXPECT-- +OK diff --git a/ext/standard/tests/strings/strtolower.phpt b/ext/standard/tests/strings/strtolower.phpt Binary files differindex d11f697e5..f498a95f7 100644 --- a/ext/standard/tests/strings/strtolower.phpt +++ b/ext/standard/tests/strings/strtolower.phpt diff --git a/ext/standard/tests/strings/strtoupper1.phpt b/ext/standard/tests/strings/strtoupper1.phpt Binary files differindex f7036a812..2890c02cc 100644 --- a/ext/standard/tests/strings/strtoupper1.phpt +++ b/ext/standard/tests/strings/strtoupper1.phpt diff --git a/ext/standard/tests/url/parse_url_basic_001.phpt b/ext/standard/tests/url/parse_url_basic_001.phpt index 3d50689a4..7b9d51399 100644 --- a/ext/standard/tests/url/parse_url_basic_001.phpt +++ b/ext/standard/tests/url/parse_url_basic_001.phpt @@ -845,55 +845,29 @@ echo "Done"; string(1) "/" } ---> http:///blah.com: -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com: bool(false) ---> http://:80: -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) +--> http://:80: bool(false) ---> http://user@:80: -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) +--> http://user@:80: bool(false) ---> http://user:pass@:80: -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) +--> http://user:pass@:80: bool(false) ---> http://:: -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) +--> http://:: bool(false) ---> http://@/: -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) +--> http://@/: bool(false) ---> http://@:/: -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) +--> http://@:/: bool(false) ---> http://:/: -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) +--> http://:/: bool(false) ---> http://?: -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) +--> http://?: bool(false) ---> http://?:: -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) +--> http://?:: bool(false) ---> http://:?: -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) +--> http://:?: bool(false) ---> http://blah.com:123456: -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) +--> http://blah.com:123456: bool(false) ---> http://blah.com:abcdef: -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http://blah.com:abcdef: bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_002.phpt b/ext/standard/tests/url/parse_url_basic_002.phpt index e25ab8dcd..f3ac770f0 100644 --- a/ext/standard/tests/url/parse_url_basic_002.phpt +++ b/ext/standard/tests/url/parse_url_basic_002.phpt @@ -109,43 +109,17 @@ echo "Done"; --> http://[x:80]/ : string(4) "http" --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_003.phpt b/ext/standard/tests/url/parse_url_basic_003.phpt index e34dc2d19..dbd92088a 100644 --- a/ext/standard/tests/url/parse_url_basic_003.phpt +++ b/ext/standard/tests/url/parse_url_basic_003.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : string(6) "[x:80]" --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_004.phpt b/ext/standard/tests/url/parse_url_basic_004.phpt index af3279547..387907f0e 100644 --- a/ext/standard/tests/url/parse_url_basic_004.phpt +++ b/ext/standard/tests/url/parse_url_basic_004.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : NULL --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_005.phpt b/ext/standard/tests/url/parse_url_basic_005.phpt index 5eb2541c1..d44dcfef3 100644 --- a/ext/standard/tests/url/parse_url_basic_005.phpt +++ b/ext/standard/tests/url/parse_url_basic_005.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : NULL --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_006.phpt b/ext/standard/tests/url/parse_url_basic_006.phpt index 926200a1a..bd6d03efd 100644 --- a/ext/standard/tests/url/parse_url_basic_006.phpt +++ b/ext/standard/tests/url/parse_url_basic_006.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : NULL --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_007.phpt b/ext/standard/tests/url/parse_url_basic_007.phpt index d99ccb667..aa9f88ba5 100644 --- a/ext/standard/tests/url/parse_url_basic_007.phpt +++ b/ext/standard/tests/url/parse_url_basic_007.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : string(1) "/" --> : string(0) "" --> / : string(1) "/" ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_008.phpt b/ext/standard/tests/url/parse_url_basic_008.phpt index d2d2ebb59..7b166127f 100644 --- a/ext/standard/tests/url/parse_url_basic_008.phpt +++ b/ext/standard/tests/url/parse_url_basic_008.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : NULL --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/tests/url/parse_url_basic_009.phpt b/ext/standard/tests/url/parse_url_basic_009.phpt index b23a30edf..a814546c5 100644 --- a/ext/standard/tests/url/parse_url_basic_009.phpt +++ b/ext/standard/tests/url/parse_url_basic_009.phpt @@ -108,43 +108,17 @@ echo "Done"; --> http://[x:80]/ : NULL --> : NULL --> / : NULL ---> http:///blah.com : -Warning: parse_url(http:///blah.com): Unable to parse URL in %s on line 15 -bool(false) ---> http://:80 : -Warning: parse_url(http://:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user@:80 : -Warning: parse_url(http://user@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://user:pass@:80 : -Warning: parse_url(http://user:pass@:80): Unable to parse URL in %s on line 15 -bool(false) ---> http://: : -Warning: parse_url(http://:): Unable to parse URL in %s on line 15 -bool(false) ---> http://@/ : -Warning: parse_url(http://@/): Unable to parse URL in %s on line 15 -bool(false) ---> http://@:/ : -Warning: parse_url(http://@:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://:/ : -Warning: parse_url(http://:/): Unable to parse URL in %s on line 15 -bool(false) ---> http://? : -Warning: parse_url(http://?): Unable to parse URL in %s on line 15 -bool(false) ---> http://?: : -Warning: parse_url(http://?:): Unable to parse URL in %s on line 15 -bool(false) ---> http://:? : -Warning: parse_url(http://:?): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:123456 : -Warning: parse_url(http://blah.com:123456): Unable to parse URL in %s on line 15 -bool(false) ---> http://blah.com:abcdef : -Warning: parse_url(http://blah.com:abcdef): Unable to parse URL in %s on line 15 -bool(false) +--> http:///blah.com : bool(false) +--> http://:80 : bool(false) +--> http://user@:80 : bool(false) +--> http://user:pass@:80 : bool(false) +--> http://: : bool(false) +--> http://@/ : bool(false) +--> http://@:/ : bool(false) +--> http://:/ : bool(false) +--> http://? : bool(false) +--> http://?: : bool(false) +--> http://:? : bool(false) +--> http://blah.com:123456 : bool(false) +--> http://blah.com:abcdef : bool(false) Done
\ No newline at end of file diff --git a/ext/standard/url.c b/ext/standard/url.c index eebcdd05f..dc94655dc 100644 --- a/ext/standard/url.c +++ b/ext/standard/url.c @@ -15,7 +15,7 @@ | Author: Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: url.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: url.c 300501 2010-06-16 18:56:24Z pajoye $ */ #include <stdlib.h> #include <string.h> @@ -355,7 +355,7 @@ PHP_FUNCTION(parse_url) resource = php_url_parse_ex(str, str_len); if (resource == NULL) { - php_error_docref1(NULL TSRMLS_CC, str, E_WARNING, "Unable to parse URL"); + /* @todo Find a method to determine why php_url_parse_ex() failed */ RETURN_FALSE; } diff --git a/ext/standard/url_scanner_ex.c b/ext/standard/url_scanner_ex.c index e6a357a47..7c2731dd3 100644 --- a/ext/standard/url_scanner_ex.c +++ b/ext/standard/url_scanner_ex.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.c 286380 2009-07-26 23:22:27Z jani $ */ +/* $Id: url_scanner_ex.c 296107 2010-03-12 10:28:59Z jani $ */ #include "php.h" diff --git a/ext/standard/url_scanner_ex.c.orig b/ext/standard/url_scanner_ex.c.orig index 35fa61e1a..57f273deb 100644 --- a/ext/standard/url_scanner_ex.c.orig +++ b/ext/standard/url_scanner_ex.c.orig @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.c 286380 2009-07-26 23:22:27Z jani $ */ +/* $Id: url_scanner_ex.c 296107 2010-03-12 10:28:59Z jani $ */ #include "php.h" diff --git a/ext/standard/url_scanner_ex.re b/ext/standard/url_scanner_ex.re index 91ba878aa..7609bd59a 100644 --- a/ext/standard/url_scanner_ex.re +++ b/ext/standard/url_scanner_ex.re @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: url_scanner_ex.re 286379 2009-07-26 23:20:34Z jani $ */ +/* $Id: url_scanner_ex.re 296107 2010-03-12 10:28:59Z jani $ */ #include "php.h" diff --git a/ext/standard/var.c b/ext/standard/var.c index 6d2614f4c..90e9250f7 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: var.c 301144 2010-07-09 21:19:27Z scottmac $ */ /* {{{ includes */ @@ -116,8 +116,9 @@ PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC) /* {{{ */ break; case IS_ARRAY: myht = Z_ARRVAL_PP(struc); - if (myht->nApplyCount > 1) { + if (++myht->nApplyCount > 1) { PUTS("*RECURSION*\n"); + --myht->nApplyCount; return; } php_printf("%sarray(%d) {\n", COMMON, zend_hash_num_elements(myht)); @@ -126,8 +127,9 @@ PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC) /* {{{ */ goto head_done; case IS_OBJECT: myht = Z_OBJDEBUG_PP(struc, is_temp); - if (myht && myht->nApplyCount > 1) { + if (myht && ++myht->nApplyCount > 1) { PUTS("*RECURSION*\n"); + --myht->nApplyCount; return; } @@ -138,6 +140,7 @@ PHPAPI void php_var_dump(zval **struc, int level TSRMLS_DC) /* {{{ */ head_done: if (myht) { zend_hash_apply_with_arguments(myht TSRMLS_CC, (apply_func_args_t) php_element_dump_func, 1, level); + --myht->nApplyCount; if (is_temp) { zend_hash_destroy(myht); efree(myht); @@ -331,27 +334,47 @@ PHP_FUNCTION(debug_zval_dump) } /* }}} */ +#define buffer_append_spaces(buf, num_spaces) \ + do { \ + char *tmp_spaces; \ + int tmp_spaces_len; \ + tmp_spaces_len = spprintf(&tmp_spaces, 0,"%*c", num_spaces, ' '); \ + smart_str_appendl(buf, tmp_spaces, tmp_spaces_len); \ + efree(tmp_spaces); \ + } while(0); + static int php_array_element_export(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; + smart_str *buf; level = va_arg(args, int); + buf = va_arg(args, smart_str *); if (hash_key->nKeyLength == 0) { /* numeric key */ - php_printf("%*c%ld => ", level + 1, ' ', hash_key->h); + buffer_append_spaces(buf, level+1); + smart_str_append_long(buf, hash_key->h); + smart_str_appendl(buf, " => ", 4); } else { /* string key */ char *key, *tmp_str; int key_len, tmp_len; key = php_addcslashes(hash_key->arKey, hash_key->nKeyLength - 1, &key_len, 0, "'\\", 2 TSRMLS_CC); tmp_str = php_str_to_str_ex(key, key_len, "\0", 1, "' . \"\\0\" . '", 12, &tmp_len, 0, NULL); - php_printf("%*c'", level + 1, ' '); - PHPWRITE(tmp_str, tmp_len); - php_printf("' => "); + + buffer_append_spaces(buf, level + 1); + + smart_str_appendc(buf, '\''); + smart_str_appendl(buf, tmp_str, tmp_len); + smart_str_appendl(buf, "' => ", 5); + efree(key); efree(tmp_str); } - php_var_export(zv, level + 2 TSRMLS_CC); - PUTS (",\n"); + php_var_export_ex(zv, level + 2, buf TSRMLS_CC); + + smart_str_appendc(buf, ','); + smart_str_appendc(buf, '\n'); + return 0; } /* }}} */ @@ -359,24 +382,33 @@ static int php_array_element_export(zval **zv TSRMLS_DC, int num_args, va_list a static int php_object_element_export(zval **zv TSRMLS_DC, int num_args, va_list args, zend_hash_key *hash_key) /* {{{ */ { int level; + smart_str *buf; char *prop_name, *class_name; level = va_arg(args, int); + buf = va_arg(args, smart_str *); - php_printf("%*c", level + 1, ' '); + buffer_append_spaces(buf, level + 2); if (hash_key->nKeyLength != 0) { zend_unmangle_property_name(hash_key->arKey, hash_key->nKeyLength - 1, &class_name, &prop_name); - php_printf(" '%s' => ", prop_name); + + smart_str_appendc(buf, '\''); + smart_str_appends(buf, prop_name); + smart_str_appendc(buf, '\''); } else { - php_printf(" %ld => ", hash_key->h); + smart_str_append_long(buf, hash_key->h); } - php_var_export(zv, level + 2 TSRMLS_CC); - PUTS (",\n"); + + smart_str_appendl(buf, " => ", 4); + php_var_export_ex(zv, level + 2, buf TSRMLS_CC); + smart_str_appendc(buf, ','); + smart_str_appendc(buf, '\n'); + return 0; } /* }}} */ -PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC) /* {{{ */ +PHPAPI void php_var_export_ex(zval **struc, int level, smart_str *buf TSRMLS_DC) /* {{{ */ { HashTable *myht; char *tmp_str, *tmp_str2; @@ -386,82 +418,109 @@ PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC) /* {{{ */ switch (Z_TYPE_PP(struc)) { case IS_BOOL: - php_printf("%s", Z_LVAL_PP(struc) ? "true" : "false"); + if (Z_LVAL_PP(struc)) { + smart_str_appendl(buf, "true", 4); + } else { + smart_str_appendl(buf, "false", 5); + } break; case IS_NULL: - php_printf("NULL"); + smart_str_appendl(buf, "NULL", 4); break; case IS_LONG: - php_printf("%ld", Z_LVAL_PP(struc)); + smart_str_append_long(buf, Z_LVAL_PP(struc)); break; case IS_DOUBLE: - php_printf("%.*H", (int) EG(precision), Z_DVAL_PP(struc)); + tmp_len = spprintf(&tmp_str, 0,"%.*H", (int) EG(precision), Z_DVAL_PP(struc)); + smart_str_appendl(buf, tmp_str, tmp_len); + efree(tmp_str); break; case IS_STRING: tmp_str = php_addcslashes(Z_STRVAL_PP(struc), Z_STRLEN_PP(struc), &tmp_len, 0, "'\\", 2 TSRMLS_CC); tmp_str2 = php_str_to_str_ex(tmp_str, tmp_len, "\0", 1, "' . \"\\0\" . '", 12, &tmp_len2, 0, NULL); - PUTS ("'"); - PHPWRITE(tmp_str2, tmp_len2); - PUTS ("'"); + + smart_str_appendc(buf, '\''); + smart_str_appendl(buf, tmp_str2, tmp_len2); + smart_str_appendc(buf, '\''); + efree(tmp_str2); efree(tmp_str); break; case IS_ARRAY: myht = Z_ARRVAL_PP(struc); if (level > 1) { - php_printf("\n%*c", level - 1, ' '); + smart_str_appendc(buf, '\n'); + buffer_append_spaces(buf, level - 1); } - PUTS ("array (\n"); - zend_hash_apply_with_arguments(myht TSRMLS_CC, (apply_func_args_t) php_array_element_export, 1, level, 0); + smart_str_appendl(buf, "array (\n", 8); + zend_hash_apply_with_arguments(myht TSRMLS_CC, (apply_func_args_t) php_array_element_export, 2, level, buf); + if (level > 1) { - php_printf("%*c", level - 1, ' '); + buffer_append_spaces(buf, level - 1); } - PUTS(")"); + smart_str_appendc(buf, ')'); + break; case IS_OBJECT: myht = Z_OBJPROP_PP(struc); if (level > 1) { - php_printf("\n%*c", level - 1, ' '); + smart_str_appendc(buf, '\n'); + buffer_append_spaces(buf, level - 1); } Z_OBJ_HANDLER(**struc, get_class_name)(*struc, &class_name, &class_name_len, 0 TSRMLS_CC); - php_printf ("%s::__set_state(array(\n", class_name); + + smart_str_appendl(buf, class_name, class_name_len); + smart_str_appendl(buf, "::__set_state(array(\n", 21); + efree(class_name); if (myht) { - zend_hash_apply_with_arguments(myht TSRMLS_CC, (apply_func_args_t) php_object_element_export, 1, level); + zend_hash_apply_with_arguments(myht TSRMLS_CC, (apply_func_args_t) php_object_element_export, 2, level, buf); } if (level > 1) { - php_printf("%*c", level - 1, ' '); + buffer_append_spaces(buf, level - 1); } - php_printf ("))"); + smart_str_appendl(buf, "))", 2); + break; default: - PUTS ("NULL"); + smart_str_appendl(buf, "NULL", 4); break; } } /* }}} */ +/* FOR BC reasons, this will always perform and then print */ +PHPAPI void php_var_export(zval **struc, int level TSRMLS_DC) /* {{{ */ +{ + smart_str buf = {0}; + php_var_export_ex(struc, level, &buf TSRMLS_CC); + smart_str_0 (&buf); + PHPWRITE(buf.c, buf.len); + smart_str_free(&buf); +} +/* }}} */ + /* {{{ proto mixed var_export(mixed var [, bool return]) Outputs or returns a string representation of a variable */ PHP_FUNCTION(var_export) { zval *var; zend_bool return_output = 0; + smart_str buf = {0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|b", &var, &return_output) == FAILURE) { return; } - if (return_output) { - php_start_ob_buffer (NULL, 0, 1 TSRMLS_CC); - } - - php_var_export(&var, 1 TSRMLS_CC); + php_var_export_ex(&var, 1, &buf TSRMLS_CC); + smart_str_0 (&buf); if (return_output) { - php_ob_get_buffer (return_value TSRMLS_CC); - php_end_ob_buffer (0, 0 TSRMLS_CC); + RETVAL_STRINGL(buf.c, buf.len, 1); + } else { + PHPWRITE(buf.c, buf.len); } + smart_str_free(&buf); } /* }}} */ @@ -529,7 +588,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, name_len); + smart_str_append_long(buf, (long)name_len); smart_str_appendl(buf, ":\"", 2); smart_str_appendl(buf, class_name, name_len); smart_str_appendl(buf, "\":", 2); @@ -636,12 +695,12 @@ static void php_var_serialize_intern(smart_str *buf, zval *struc, HashTable *var if (var_hash && php_add_var_hash(var_hash, struc, (void *) &var_already TSRMLS_CC) == FAILURE) { if (Z_ISREF_P(struc)) { smart_str_appendl(buf, "R:", 2); - smart_str_append_long(buf, *var_already); + smart_str_append_long(buf, (long)*var_already); smart_str_appendc(buf, ';'); return; } else if (Z_TYPE_P(struc) == IS_OBJECT) { smart_str_appendl(buf, "r:", 2); - smart_str_append_long(buf, *var_already); + smart_str_append_long(buf, (long)*var_already); smart_str_appendc(buf, ';'); return; } @@ -695,12 +754,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, Z_OBJCE_P(struc)->name_length); + smart_str_append_long(buf, (long)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, serialized_length); + smart_str_append_long(buf, (long)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 82c16222a..8c0d86715 100644 --- a/ext/standard/var_unserializer.c +++ b/ext/standard/var_unserializer.c @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Mon Nov 23 09:26:17 2009 */ +/* Generated by re2c 0.13.5 on Fri Jun 25 15:36:31 2010 */ /* +----------------------------------------------------------------------+ | PHP Version 5 | @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: var_unserializer.c 300843 2010-06-29 00:58:31Z stas $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -55,7 +55,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval) var_hash->data[var_hash->used_slots++] = *rval; } -static inline void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) +PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) { var_entries *var_hash = var_hashx->first_dtor, *prev = NULL; diff --git a/ext/standard/var_unserializer.c.orig b/ext/standard/var_unserializer.c.orig index 578f593ef..ad474c0dd 100644 --- a/ext/standard/var_unserializer.c.orig +++ b/ext/standard/var_unserializer.c.orig @@ -1,4 +1,4 @@ -/* Generated by re2c 0.13.5 on Mon Nov 23 09:26:17 2009 */ +/* Generated by re2c 0.13.5 on Fri Jun 25 15:36:31 2010 */ #line 1 "ext/standard/var_unserializer.re" /* +----------------------------------------------------------------------+ @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: var_unserializer.c 300843 2010-06-29 00:58:31Z stas $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -56,7 +56,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval) var_hash->data[var_hash->used_slots++] = *rval; } -static inline void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) +PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) { var_entries *var_hash = var_hashx->first_dtor, *prev = NULL; diff --git a/ext/standard/var_unserializer.re b/ext/standard/var_unserializer.re index 6cd6628aa..3312bee51 100644 --- a/ext/standard/var_unserializer.re +++ b/ext/standard/var_unserializer.re @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: var_unserializer.re 293035 2010-01-03 08:22:14Z sebastian $ */ +/* $Id: var_unserializer.re 300843 2010-06-29 00:58:31Z stas $ */ #include "php.h" #include "ext/standard/php_var.h" @@ -54,7 +54,7 @@ static inline void var_push(php_unserialize_data_t *var_hashx, zval **rval) var_hash->data[var_hash->used_slots++] = *rval; } -static inline void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) +PHPAPI void var_push_dtor(php_unserialize_data_t *var_hashx, zval **rval) { var_entries *var_hash = var_hashx->first_dtor, *prev = NULL; diff --git a/ext/sybase_ct/config.m4 b/ext/sybase_ct/config.m4 index 4b64dc23d..aba6f478d 100644 --- a/ext/sybase_ct/config.m4 +++ b/ext/sybase_ct/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 261867 2008-07-01 17:03:46Z felipe $ +dnl $Id: config.m4 301036 2010-07-07 10:15:24Z thekid $ dnl PHP_ARG_WITH(sybase-ct, for Sybase-CT support, @@ -31,9 +31,50 @@ if test "$PHP_SYBASE_CT" != "no"; then fi PHP_ADD_LIBPATH($SYBASE_CT_LIBDIR, SYBASE_CT_SHARED_LIBADD) - if test -f $SYBASE_CT_INCDIR/tds.h; then + if test -f $SYBASE_CT_INCDIR/tds.h || test -f $SYBASE_CT_INCDIR/tds_sysdep_public.h; then PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD) SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lct" + elif test -f $SYBASE_CT_INCDIR/libsybct64; then + PHP_ADD_LIBRARY(sybcs64,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybct64,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybcomn64,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybintl64,, SYBASE_CT_SHARED_LIBADD) + + ac_solid_uname_s=`uname -s 2>/dev/null` + case $ac_solid_uname_s in + *OSF*) ;; # Tru64/DEC OSF does NOT use the SYB_LP64 define + *) CFLAGS="${CFLAGS} -DSYB_LP64" ;; # + esac + SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs64 -lsybct64 -lsybcomn64 -lsybintl64" + + PHP_CHECK_LIBRARY(sybtcl64, netg_errstr, [ + PHP_ADD_LIBRARY(sybtcl64,,SYBASE_CT_SHARED_LIBADD) + ],[ + PHP_ADD_LIBRARY(sybtcl64,,SYBASE_CT_SHARED_LIBADD) + ],[ + $SYBASE_CT_LIBS + ]) + + PHP_CHECK_LIBRARY(insck64, insck__getVdate, [PHP_ADD_LIBRARY(insck64,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) + PHP_CHECK_LIBRARY(insck64, bsd_tcp, [PHP_ADD_LIBRARY(insck64,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) + elif test -f $SYBASE_CT_INCDIR/libsybct; then + PHP_ADD_LIBRARY(sybcs,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybct,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybcomn,, SYBASE_CT_SHARED_LIBADD) + PHP_ADD_LIBRARY(sybintl,, SYBASE_CT_SHARED_LIBADD) + + SYBASE_CT_LIBS="-L$SYBASE_CT_LIBDIR -lsybcs -lsybct -lsybcomn -lsybintl" + + PHP_CHECK_LIBRARY(sybtcl, netg_errstr, [ + PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD) + ],[ + PHP_ADD_LIBRARY(sybtcl,,SYBASE_CT_SHARED_LIBADD) + ],[ + $SYBASE_CT_LIBS + ]) + + PHP_CHECK_LIBRARY(insck, insck__getVdate, [PHP_ADD_LIBRARY(insck,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) + PHP_CHECK_LIBRARY(insck, bsd_tcp, [PHP_ADD_LIBRARY(insck,, SYBASE_CT_SHARED_LIBADD)],[],[-L$SYBASE_CT_LIBDIR]) else PHP_ADD_LIBRARY(cs,, SYBASE_CT_SHARED_LIBADD) PHP_ADD_LIBRARY(ct,, SYBASE_CT_SHARED_LIBADD) diff --git a/ext/sybase_ct/php_sybase_ct.c b/ext/sybase_ct/php_sybase_ct.c index 8871988df..8382a0eab 100644 --- a/ext/sybase_ct/php_sybase_ct.c +++ b/ext/sybase_ct/php_sybase_ct.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_sybase_ct.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_sybase_ct.c 300764 2010-06-26 16:03:39Z felipe $ */ #ifdef HAVE_CONFIG_H @@ -180,31 +180,30 @@ const zend_function_entry sybase_functions[] = { PHP_FE(sybase_deadlock_retry_count, arginfo_sybase_deadlock_retry_count) #if !defined(PHP_WIN32) && !defined(HAVE_MSSQL) - PHP_FALIAS(mssql_connect, sybase_connect, NULL) - PHP_FALIAS(mssql_pconnect, sybase_pconnect, NULL) - PHP_FALIAS(mssql_close, sybase_close, NULL) - PHP_FALIAS(mssql_select_db, sybase_select_db, NULL) - PHP_FALIAS(mssql_query, sybase_query, NULL) - PHP_FALIAS(mssql_unbuffered_query, sybase_unbuffered_query, NULL) - PHP_FALIAS(mssql_free_result, sybase_free_result, NULL) - PHP_FALIAS(mssql_get_last_message, sybase_get_last_message, NULL) - PHP_FALIAS(mssql_num_rows, sybase_num_rows, NULL) - PHP_FALIAS(mssql_num_fields, sybase_num_fields, NULL) - PHP_FALIAS(mssql_fetch_row, sybase_fetch_row, NULL) - PHP_FALIAS(mssql_fetch_array, sybase_fetch_array, NULL) - PHP_FALIAS(mssql_fetch_assoc, sybase_fetch_assoc, NULL) - PHP_FALIAS(mssql_fetch_object, sybase_fetch_object, NULL) - PHP_FALIAS(mssql_data_seek, sybase_data_seek, NULL) - PHP_FALIAS(mssql_fetch_field, sybase_fetch_field, NULL) - PHP_FALIAS(mssql_field_seek, sybase_field_seek, NULL) - PHP_FALIAS(mssql_result, sybase_result, NULL) - PHP_FALIAS(mssql_affected_rows, sybase_affected_rows, NULL) - PHP_FALIAS(mssql_min_client_severity, sybase_min_client_severity, NULL) - PHP_FALIAS(mssql_min_server_severity, sybase_min_server_severity, NULL) - PHP_FALIAS(mssql_set_message_handler, sybase_set_message_handler, NULL) - PHP_FALIAS(mssql_deadlock_retry_count, sybase_deadlock_retry_count, NULL) + PHP_FALIAS(mssql_connect, sybase_connect, arginfo_sybase_connect) + PHP_FALIAS(mssql_pconnect, sybase_pconnect, arginfo_sybase_pconnect) + PHP_FALIAS(mssql_close, sybase_close, arginfo_sybase_close) + PHP_FALIAS(mssql_select_db, sybase_select_db, arginfo_sybase_select_db) + PHP_FALIAS(mssql_query, sybase_query, arginfo_sybase_query) + PHP_FALIAS(mssql_unbuffered_query, sybase_unbuffered_query, arginfo_sybase_unbuffered_query) + PHP_FALIAS(mssql_free_result, sybase_free_result, arginfo_sybase_free_result) + PHP_FALIAS(mssql_get_last_message, sybase_get_last_message, arginfo_sybase_get_last_message) + PHP_FALIAS(mssql_num_rows, sybase_num_rows, arginfo_sybase_num_rows) + PHP_FALIAS(mssql_num_fields, sybase_num_fields, arginfo_sybase_num_fields) + PHP_FALIAS(mssql_fetch_row, sybase_fetch_row, arginfo_sybase_fetch_row) + PHP_FALIAS(mssql_fetch_array, sybase_fetch_array, arginfo_sybase_fetch_array) + PHP_FALIAS(mssql_fetch_assoc, sybase_fetch_assoc, arginfo_sybase_fetch_assoc) + PHP_FALIAS(mssql_fetch_object, sybase_fetch_object, arginfo_sybase_fetch_object) + PHP_FALIAS(mssql_data_seek, sybase_data_seek, arginfo_sybase_data_seek) + PHP_FALIAS(mssql_fetch_field, sybase_fetch_field, arginfo_sybase_fetch_field) + PHP_FALIAS(mssql_field_seek, sybase_field_seek, arginfo_sybase_field_seek) + PHP_FALIAS(mssql_result, sybase_result, arginfo_sybase_result) + PHP_FALIAS(mssql_affected_rows, sybase_affected_rows, arginfo_sybase_affected_rows) + PHP_FALIAS(mssql_min_client_severity, sybase_min_client_severity, arginfo_sybase_min_client_severity) + PHP_FALIAS(mssql_min_server_severity, sybase_min_server_severity, arginfo_sybase_min_server_severity) + PHP_FALIAS(mssql_set_message_handler, sybase_set_message_handler, arginfo_sybase_set_message_handler) + PHP_FALIAS(mssql_deadlock_retry_count, sybase_deadlock_retry_count, arginfo_sybase_deadlock_retry_count) #endif - {NULL, NULL, NULL} }; @@ -1248,8 +1247,17 @@ static int php_sybase_fetch_result_row (sybase_result *result, int numrows) } default: { - /* This indicates anything else, return it as string */ - ZVAL_STRINGL(&result->data[i][j], result->tmp_buffer[j], result->lengths[j]- 1, 1); + /* This indicates anything else, return it as string + * FreeTDS doesn't correctly set result->indicators[j] correctly + * for NULL fields in some version in conjunction with ASE 12.5 + * but instead sets result->lengths[j] to 0, which would lead to + * a negative memory allocation (and thus a segfault). + */ + if (result->lengths[j] < 1) { + ZVAL_NULL(&result->data[i][j]); + } else { + ZVAL_STRINGL(&result->data[i][j], result->tmp_buffer[j], result->lengths[j]- 1, 1); + } break; } } diff --git a/ext/sysvmsg/tests/004.phpt b/ext/sysvmsg/tests/004.phpt new file mode 100644 index 000000000..39467d744 --- /dev/null +++ b/ext/sysvmsg/tests/004.phpt @@ -0,0 +1,59 @@ +--TEST-- +msg_set_queue() and msg_stat_queue() +--SKIPIF-- +<?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extension is not available")?> +--FILE-- +<?php +$id = ftok(__FILE__, 'r'); + +$q = msg_get_queue($id); + +echo "Set mode:\n"; +$arr = array('msg_perm.mode' => 0600); +var_dump(msg_set_queue($q, $arr)); +echo "Did really work:\n"; +var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); + +echo "Set uid:\n"; // same as the running user to make it succeed +$arr = array('msg_perm.uid' => getmyuid()); +var_dump(msg_set_queue($q, $arr)); +echo "Did really work:\n"; +var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); + +echo "Set gid:\n"; // same as the running user to make it succeed +$arr = array('msg_perm.gid' => getmygid()); +var_dump(msg_set_queue($q, $arr)); +echo "Did really work:\n"; +var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); + +echo "Set smaller qbytes:\n"; +$res = msg_stat_queue($q); +$arr = array('msg_qbytes' => ($res['msg_qbytes'] -1)); +var_dump(msg_set_queue($q, $arr)); +echo "Did really work:\n"; +var_dump(count(array_diff_assoc($arr, msg_stat_queue($q))) == 0); + +if (!msg_remove_queue($q)) { + echo "BAD: queue removal failed\n"; +} + +echo "Done\n"; +?> +--EXPECTF-- +Set mode: +bool(true) +Did really work: +bool(true) +Set uid: +bool(true) +Did really work: +bool(true) +Set gid: +bool(true) +Did really work: +bool(true) +Set smaller qbytes: +bool(true) +Did really work: +bool(true) +Done diff --git a/ext/sysvmsg/tests/005.phpt b/ext/sysvmsg/tests/005.phpt new file mode 100644 index 000000000..d9437c63e --- /dev/null +++ b/ext/sysvmsg/tests/005.phpt @@ -0,0 +1,71 @@ +--TEST-- +sysvmsg functions on non-existing queue +--SKIPIF-- +<?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extension is not available")?> +--FILE-- +<?php + +$tests = array(null, 'foo'); + +foreach ($tests as $q) { + + if ($q === null) { + do { + $id = ftok(__FILE__, chr(mt_rand(0, 255))); + } while (msg_queue_exists($id)); + + $q = msg_get_queue($id) or die("Failed to create queue"); + msg_remove_queue($q) or die("Failed to close queue"); + } + + echo "Using '$q' as queue resource:\n"; + + $errno = 0; + + var_dump(msg_set_queue($q, array('msg_qbytes' => 1))); + + var_dump(msg_stat_queue($q)); + + var_dump(msg_receive($q, 0, $null, 1, $msg, true, 0, $errno)); + var_dump($errno != 0); + // again, but triggering an E_WARNING + var_dump(msg_receive($q, 0, $null, 0, $msg)); + + var_dump(msg_send($q, 1, 'foo', true, true, $errno)); + var_dump($errno != 0); +} + +echo "Done\n"; +?> +--EXPECTF-- +Using 'Resource id #4' as queue resource: +bool(false) +bool(false) +bool(false) +bool(true) + +Warning: msg_receive(): maximum size of the message has to be greater than zero in %s on line %d +bool(false) + +Warning: msg_send(): msgsnd failed: Invalid argument in %s on line %d +bool(false) +bool(true) +Using 'foo' as queue resource: + +Warning: msg_set_queue() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: msg_stat_queue() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: msg_receive() expects parameter 1 to be resource, string given in %s on line %d +bool(false) +bool(false) + +Warning: msg_receive() expects parameter 1 to be resource, string given in %s on line %d +bool(false) + +Warning: msg_send() expects parameter 1 to be resource, string given in %s on line %d +bool(false) +bool(false) +Done diff --git a/ext/sysvmsg/tests/006.phpt b/ext/sysvmsg/tests/006.phpt new file mode 100644 index 000000000..44074fae7 --- /dev/null +++ b/ext/sysvmsg/tests/006.phpt @@ -0,0 +1,69 @@ +--TEST-- +msg_send() data types when not serializing +--SKIPIF-- +<?php if (!extension_loaded("sysvmsg")) die("skip sysvmsg extenions is not available")?> +--FILE-- +<?php + +$queue = msg_get_queue (ftok(__FILE__, 'r'), 0600); + +$tests = array('foo', 123, PHP_INT_MAX +1, true, 1.01, null, array('bar')); + +foreach ($tests as $elem) { + echo "Sending/receiving '$elem':\n"; + var_dump(msg_send($queue, 1, $elem, false)); + + unset($msg); + var_dump(msg_receive($queue, 1, $msg_type, 1024, $msg, false, MSG_IPC_NOWAIT)); + + var_dump($elem == $msg); + var_dump($elem === $msg); +} + +if (!msg_remove_queue($queue)) { + echo "BAD: queue removal failed\n"; +} + +echo "Done\n"; +?> +--EXPECTF-- +Sending/receiving 'foo': +bool(true) +bool(true) +bool(true) +bool(true) +Sending/receiving '123': +bool(true) +bool(true) +bool(true) +bool(false) +Sending/receiving '%d': +bool(true) +bool(true) +bool(true) +bool(false) +Sending/receiving '1': +bool(true) +bool(true) +bool(true) +bool(false) +Sending/receiving '1.01': +bool(true) +bool(true) +bool(true) +bool(false) +Sending/receiving '': + +Warning: msg_send(): Message parameter must be either a string or a number. in %s on line %d +bool(false) +bool(false) +bool(true) +bool(false) +Sending/receiving 'Array': + +Warning: msg_send(): Message parameter must be either a string or a number. in %s on line %d +bool(false) +bool(false) +bool(false) +bool(false) +Done diff --git a/ext/sysvshm/sysvshm.c b/ext/sysvshm/sysvshm.c index 32af9a063..f13490a33 100644 --- a/ext/sysvshm/sysvshm.c +++ b/ext/sysvshm/sysvshm.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sysvshm.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: sysvshm.c 299328 2010-05-13 08:34:06Z dmitry $ */ /* This has been built and tested on Linux 2.2.14 * @@ -251,13 +251,18 @@ PHP_FUNCTION(shm_put_var) if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rlz", &shm_id, &shm_key, &arg_var)) { return; } - SHM_FETCH_RESOURCE(shm_list_ptr, shm_id); /* setup string-variable and serialize */ PHP_VAR_SERIALIZE_INIT(var_hash); php_var_serialize(&shm_var, &arg_var, &var_hash TSRMLS_CC); PHP_VAR_SERIALIZE_DESTROY(var_hash); + shm_list_ptr = zend_fetch_resource(&shm_id TSRMLS_CC, -1, PHP_SHM_RSRC_NAME, NULL, 1, php_sysvshm.le_shm); + if (!shm_list_ptr) { + smart_str_free(&shm_var); + RETURN_FALSE; + } + /* insert serialized variable into shared memory */ ret = php_put_shm_data(shm_list_ptr->ptr, shm_key, shm_var.c, shm_var.len); diff --git a/ext/tidy/php_tidy.h b/ext/tidy/php_tidy.h index 84864cb6c..e9f715a1d 100644 --- a/ext/tidy/php_tidy.h +++ b/ext/tidy/php_tidy.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_tidy.h 294004 2010-01-25 17:29:37Z johannes $ */ +/* $Id: php_tidy.h 296107 2010-03-12 10:28:59Z jani $ */ #ifndef PHP_TIDY_H #define PHP_TIDY_H diff --git a/ext/tidy/tidy.c b/ext/tidy/tidy.c index 34b4d23c5..2c755890b 100644 --- a/ext/tidy/tidy.c +++ b/ext/tidy/tidy.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c 294893 2010-02-11 17:36:40Z johannes $ */ +/* $Id: tidy.c 296107 2010-03-12 10:28:59Z jani $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -1085,7 +1085,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 294893 2010-02-11 17:36:40Z johannes $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c 296107 2010-03-12 10:28:59Z jani $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES(); diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 5dd532a26..7ca70997f 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xml.c 294434 2010-02-03 18:35:58Z pajoye $ */ +/* $Id: xml.c 293146 2010-01-05 13:03:40Z pierrick $ */ #define IS_EXT_MODULE diff --git a/ext/xmlrpc/tests/bug18916.phpt b/ext/xmlrpc/tests/bug18916.phpt index b2eb525d8..487838b60 100644 --- a/ext/xmlrpc/tests/bug18916.phpt +++ b/ext/xmlrpc/tests/bug18916.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #18916 (xmlrpc_set_type() not working) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --INI-- date.timezone="America/Sao_Paulo" --FILE-- diff --git a/ext/xmlrpc/tests/bug44996.phpt b/ext/xmlrpc/tests/bug44996.phpt index dc1bc5d4f..0f4d016e5 100644 --- a/ext/xmlrpc/tests/bug44996.phpt +++ b/ext/xmlrpc/tests/bug44996.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #44996 (xmlrpc_decode() ignores time zone on iso8601.datetime) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php diff --git a/ext/xmlrpc/tests/bug45226.phpt b/ext/xmlrpc/tests/bug45226.phpt index af9b6c472..e05385030 100644 --- a/ext/xmlrpc/tests/bug45226.phpt +++ b/ext/xmlrpc/tests/bug45226.phpt @@ -2,6 +2,8 @@ Bug #45226 (xmlrpc_set_type() segfaults with valid ISO8601 date string) --INI-- date.timezone="America/Sao_Paulo" +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php diff --git a/ext/xmlrpc/tests/bug45555.phpt b/ext/xmlrpc/tests/bug45555.phpt index 376b14fec..6b3da24c0 100644 --- a/ext/xmlrpc/tests/bug45555.phpt +++ b/ext/xmlrpc/tests/bug45555.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #45555 (Segfault with invalid non-string as register_introspection_callback) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php diff --git a/ext/xmlrpc/tests/bug45556.phpt b/ext/xmlrpc/tests/bug45556.phpt index 0e463e669..34897d8c9 100644 --- a/ext/xmlrpc/tests/bug45556.phpt +++ b/ext/xmlrpc/tests/bug45556.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #45556 (Return value from callback isn't freed) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php diff --git a/ext/xmlrpc/tests/bug47818.phpt b/ext/xmlrpc/tests/bug47818.phpt index 57e109030..a2944d8ec 100644 --- a/ext/xmlrpc/tests/bug47818.phpt +++ b/ext/xmlrpc/tests/bug47818.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #47818 (Segfault due to bound callback param) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php diff --git a/ext/xmlrpc/tests/bug50285.phpt b/ext/xmlrpc/tests/bug50285.phpt index cf766fc40..5da803c36 100644 --- a/ext/xmlrpc/tests/bug50285.phpt +++ b/ext/xmlrpc/tests/bug50285.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #50285 (xmlrpc does not preserve keys in encoded indexed arrays) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php diff --git a/ext/xmlrpc/tests/bug50761.phpt b/ext/xmlrpc/tests/bug50761.phpt index 653d8502f..ada19409c 100644 --- a/ext/xmlrpc/tests/bug50761.phpt +++ b/ext/xmlrpc/tests/bug50761.phpt @@ -1,5 +1,7 @@ --TEST-- Bug #50761 (system.multiCall crashes) +--SKIPIF-- +<?php if (!extension_loaded("xmlrpc")) print "skip"; ?> --FILE-- <?php $req = '<?xml version="1.0"?> diff --git a/ext/xmlrpc/tests/bug51288.phpt b/ext/xmlrpc/tests/bug51288.phpt new file mode 100644 index 000000000..d9bdef822 --- /dev/null +++ b/ext/xmlrpc/tests/bug51288.phpt @@ -0,0 +1,14 @@ +--TEST-- +Bug #51288 (CVE-2010-0397, NULL pointer deref when no <methodName> in request) +--FILE-- +<?php +$method = NULL; +$req = '<?xml version="1.0"?><methodCall></methodCall>'; +var_dump(xmlrpc_decode_request($req, $method)); +var_dump($method); +echo "Done\n"; +?> +--EXPECT-- +NULL +NULL +Done diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index 054ea2f2a..d81eb8a86 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -51,7 +51,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: xmlrpc-epi-php.c 294452 2010-02-03 20:19:05Z pajoye $ */ +/* $Id: xmlrpc-epi-php.c 296153 2010-03-13 20:26:51Z felipe $ */ /********************************************************************** * BUGS: * @@ -778,6 +778,7 @@ zval* decode_request_worker(char *xml_in, int xml_in_len, char *encoding_in, zva zval* retval = NULL; XMLRPC_REQUEST response; STRUCT_XMLRPC_REQUEST_INPUT_OPTIONS opts = {{0}}; + const char *method_name; opts.xml_elem_opts.encoding = encoding_in ? utf8_get_encoding_id_from_string(encoding_in) : ENCODING_DEFAULT; /* generate XMLRPC_REQUEST from raw xml */ @@ -788,10 +789,16 @@ zval* decode_request_worker(char *xml_in, int xml_in_len, char *encoding_in, zva if (XMLRPC_RequestGetRequestType(response) == xmlrpc_request_call) { if (method_name_out) { - zval_dtor(method_name_out); - Z_TYPE_P(method_name_out) = IS_STRING; - Z_STRVAL_P(method_name_out) = estrdup(XMLRPC_RequestGetMethodName(response)); - Z_STRLEN_P(method_name_out) = strlen(Z_STRVAL_P(method_name_out)); + method_name = XMLRPC_RequestGetMethodName(response); + if (method_name) { + zval_dtor(method_name_out); + Z_TYPE_P(method_name_out) = IS_STRING; + Z_STRVAL_P(method_name_out) = estrdup(method_name); + Z_STRLEN_P(method_name_out) = strlen(Z_STRVAL_P(method_name_out)); + } else if (retval) { + zval_ptr_dtor(&retval); + retval = NULL; + } } } diff --git a/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt b/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt index 1968b1b14..7f1cd0c64 100644 --- a/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt +++ b/ext/xmlwriter/tests/xmlwriter_write_attribute_ns_error_001.phpt @@ -31,5 +31,4 @@ Warning: xmlwriter_write_attribute_ns() expects exactly %d parameters, %d given <?xml version="1.0" encoding="UTF-8"?> <root> <elem1 attr1="first"/> -</root> -bool(false) +</root>%wbool(false) diff --git a/ext/zip/php_zip.c b/ext/zip/php_zip.c index c2d563fb1..2e1d69e46 100644 --- a/ext/zip/php_zip.c +++ b/ext/zip/php_zip.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zip.c 294817 2010-02-09 17:51:39Z pajoye $ */ +/* $Id: php_zip.c 300470 2010-06-15 18:48:33Z pajoye $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -184,7 +184,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil php_basename(path_cleaned, path_cleaned_len, NULL, 0, &file_basename, (size_t *)&file_basename_len TSRMLS_CC); - if (OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) { + if (ZIP_OPENBASEDIR_CHECKPATH(file_dirname_fullpath)) { efree(file_dirname_fullpath); efree(file_basename); free(new_state.cwd); @@ -238,7 +238,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil * is required, does a file can have a different * safemode status as its parent folder? */ - if (OPENBASEDIR_CHECKPATH(fullpath)) { + if (ZIP_OPENBASEDIR_CHECKPATH(fullpath)) { efree(fullpath); efree(file_dirname_fullpath); efree(file_basename); @@ -255,7 +255,7 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil return 0; } -#if (PHP_MAJOR_VERSION < 6) +#if PHP_API_VERSION < 20100412 stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS|ENFORCE_SAFE_MODE, NULL); #else stream = php_stream_open_wrapper(fullpath, "w+b", REPORT_ERRORS, NULL); @@ -280,15 +280,15 @@ static int php_zip_extract_file(struct zip * za, char *dest, char *file, int fil } /* }}} */ -static int php_zip_add_file(struct zip *za, const char *filename, int filename_len, - char *entry_name, int entry_name_len, long offset_start, long offset_len TSRMLS_DC) /* {{{ */ +static int php_zip_add_file(struct zip *za, const char *filename, size_t filename_len, + char *entry_name, size_t entry_name_len, long offset_start, long offset_len TSRMLS_DC) /* {{{ */ { struct zip_source *zs; int cur_idx; char resolved_path[MAXPATHLEN]; - if (OPENBASEDIR_CHECKPATH(filename)) { + if (ZIP_OPENBASEDIR_CHECKPATH(filename)) { return -1; } @@ -530,7 +530,7 @@ int php_zip_glob(char *pattern, int pattern_len, long flags, zval *return_value /* we assume that any glob pattern will match files from one directory only so checking the dirname of the first match should be sufficient */ strncpy(cwd, globbuf.gl_pathv[0], MAXPATHLEN); - if (OPENBASEDIR_CHECKPATH(cwd)) { + if (ZIP_OPENBASEDIR_CHECKPATH(cwd)) { return -1; } @@ -592,7 +592,7 @@ int php_zip_pcre(char *regexp, int regexp_len, char *path, int path_len, zval *r } #endif - if (OPENBASEDIR_CHECKPATH(path)) { + if (ZIP_OPENBASEDIR_CHECKPATH(path)) { return -1; } @@ -1148,7 +1148,7 @@ static PHP_NAMED_FUNCTION(zif_zip_open) RETURN_FALSE; } - if (OPENBASEDIR_CHECKPATH(filename)) { + if (ZIP_OPENBASEDIR_CHECKPATH(filename)) { RETURN_FALSE; } @@ -1437,7 +1437,7 @@ static ZIPARCHIVE_METHOD(open) RETURN_FALSE; } - if (OPENBASEDIR_CHECKPATH(filename)) { + if (ZIP_OPENBASEDIR_CHECKPATH(filename)) { RETURN_FALSE; } @@ -1629,7 +1629,7 @@ static void php_zip_add_from_pattern(INTERNAL_FUNCTION_PARAMETERS, int type) /* for (i = 0; i < found; i++) { char *file, *file_stripped, *entry_name; - int entry_name_len,file_stripped_len; + size_t entry_name_len, file_stripped_len; char entry_name_buf[MAXPATHLEN]; char *basename = NULL; @@ -2306,7 +2306,7 @@ static ZIPARCHIVE_METHOD(unchangeAll) } /* }}} */ -/* {{{ proto bool ZipArchive::unchangeAll() +/* {{{ proto bool ZipArchive::unchangeArchive() Revert all global changes to the archive archive. For now, this only reverts archive comment changes. */ static ZIPARCHIVE_METHOD(unchangeArchive) { @@ -2492,7 +2492,7 @@ static ZIPARCHIVE_METHOD(getFromName) } /* }}} */ -/* {{{ proto string ZipArchive::getFromIndex(string entryname[, int len [, int flags]]) +/* {{{ proto string ZipArchive::getFromIndex(int index[, int len [, int flags]]) get the contents of an entry using its index */ static ZIPARCHIVE_METHOD(getFromIndex) { @@ -2536,38 +2536,143 @@ static ZIPARCHIVE_METHOD(getStream) } /* }}} */ +/* {{{ arginfo */ +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_open, 0, 0, 1) + ZEND_ARG_INFO(0, source) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_ziparchive__void, 0) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_addemptydir, 0, 0, 1) + ZEND_ARG_INFO(0, dirname) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_addglob, 0, 0, 1) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, flags) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_addpattern, 0, 0, 1) + ZEND_ARG_INFO(0, pattern) + ZEND_ARG_INFO(0, path) + ZEND_ARG_INFO(0, options) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_addfile, 0, 0, 1) + ZEND_ARG_INFO(0, filepath) + ZEND_ARG_INFO(0, entryname) + ZEND_ARG_INFO(0, start) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_addfromstring, 0, 0, 2) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, content) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_statname, 0, 0, 1) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_statindex, 0, 0, 1) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_setarchivecomment, 0, 0, 2) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, comment) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_setcommentindex, 0, 0, 2) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, comment) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_getcommentname, 0, 0, 1) + ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_getcommentindex, 0, 0, 1) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_renameindex, 0, 0, 2) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, new_name) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_renamename, 0, 0, 2) + ZEND_ARG_INFO(0, name) + ZEND_ARG_INFO(0, new_name) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_unchangeindex, 0, 0, 1) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_unchangename, 0, 0, 1) + ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_extractto, 0, 0, 1) + ZEND_ARG_INFO(0, pathto) + ZEND_ARG_INFO(0, files) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_getfromname, 0, 0, 1) + ZEND_ARG_INFO(0, entryname) + ZEND_ARG_INFO(0, len) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_getfromindex, 0, 0, 1) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, len) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_ziparchive_getstream, 0, 0, 1) + ZEND_ARG_INFO(0, entryname) +ZEND_END_ARG_INFO() +/* }}} */ + /* {{{ ze_zip_object_class_functions */ static const zend_function_entry zip_class_functions[] = { - ZIPARCHIVE_ME(open, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(close, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getStatusString, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(addEmptyDir, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(addFromString, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(addFile, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(addGlob, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(addPattern, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(renameIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(renameName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(setArchiveComment, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getArchiveComment, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(setCommentIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(setCommentName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getCommentIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getCommentName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(deleteIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(deleteName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(statName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(statIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(locateName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getNameIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(unchangeArchive, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(unchangeAll, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(unchangeIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(unchangeName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(extractTo, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getFromName, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getFromIndex, NULL, ZEND_ACC_PUBLIC) - ZIPARCHIVE_ME(getStream, NULL, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(open, arginfo_ziparchive_open, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(close, arginfo_ziparchive__void, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getStatusString, arginfo_ziparchive__void, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(addEmptyDir, arginfo_ziparchive_addemptydir, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(addFromString, arginfo_ziparchive_addfromstring, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(addFile, arginfo_ziparchive_addfile, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(addGlob, arginfo_ziparchive_addglob, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(addPattern, arginfo_ziparchive_addpattern, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(renameIndex, arginfo_ziparchive_renameindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(renameName, arginfo_ziparchive_renamename, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(setArchiveComment, arginfo_ziparchive_setarchivecomment, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getArchiveComment, arginfo_ziparchive__void, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(setCommentIndex, arginfo_ziparchive_setcommentindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(setCommentName, arginfo_ziparchive_setarchivecomment, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getCommentIndex, arginfo_ziparchive_getcommentindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getCommentName, arginfo_ziparchive_getcommentname, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(deleteIndex, arginfo_ziparchive_getcommentindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(deleteName, arginfo_ziparchive_getcommentname, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(statName, arginfo_ziparchive_statname, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(statIndex, arginfo_ziparchive_statindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(locateName, arginfo_ziparchive_statname, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getNameIndex, arginfo_ziparchive_statindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(unchangeArchive, arginfo_ziparchive__void, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(unchangeAll, arginfo_ziparchive__void, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(unchangeIndex, arginfo_ziparchive_getcommentindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(unchangeName, arginfo_ziparchive_getcommentname, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(extractTo, arginfo_ziparchive_extractto, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getFromName, arginfo_ziparchive_getfromname, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getFromIndex, arginfo_ziparchive_getfromindex, ZEND_ACC_PUBLIC) + ZIPARCHIVE_ME(getStream, arginfo_ziparchive_getstream, ZEND_ACC_PUBLIC) {NULL, NULL, NULL} }; /* }}} */ @@ -2674,7 +2779,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 294817 2010-02-09 17:51:39Z pajoye $"); + php_info_print_table_row(2, "Extension Version","$Id: php_zip.c 300470 2010-06-15 18:48:33Z pajoye $"); 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 92374b00b..2eaf568d0 100644 --- a/ext/zip/php_zip.h +++ b/ext/zip/php_zip.h @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zip.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_zip.h 298626 2010-04-26 23:55:03Z kalle $ */ #ifndef PHP_ZIP_H #define PHP_ZIP_H @@ -43,12 +43,12 @@ extern zend_module_entry zip_module_entry; # endif #endif -/* {{{ OPENBASEDIR_CHECKPATH(filename) */ -#if (PHP_MAJOR_VERSION < 6) -# define OPENBASEDIR_CHECKPATH(filename) \ +/* {{{ ZIP_OPENBASEDIR_CHECKPATH(filename) */ +#if PHP_API_VERSION < 20100412 +# define ZIP_OPENBASEDIR_CHECKPATH(filename) \ (PG(safe_mode) && (!php_checkuid(filename, NULL, CHECKUID_CHECK_FILE_AND_DIR))) || php_check_open_basedir(filename TSRMLS_CC) #else -#define OPENBASEDIR_CHECKPATH(filename) \ +#define ZIP_OPENBASEDIR_CHECKPATH(filename) \ php_check_open_basedir(filename TSRMLS_CC) #endif /* }}} */ diff --git a/ext/zip/tests/bug47667.phpt b/ext/zip/tests/bug47667.phpt index cdbf604d8..e1084c45b 100644 --- a/ext/zip/tests/bug47667.phpt +++ b/ext/zip/tests/bug47667.phpt @@ -2,7 +2,7 @@ Bug #47667 (ZipArchive::OVERWRITE seems to have no effect) --SKIPIF-- <?php -/* $Id: bug47667.phpt 294522 2010-02-04 10:09:25Z pajoye $ */ +/* $Id: bug47667.phpt 294321 2010-02-01 19:30:32Z pajoye $ */ if(!extension_loaded('zip')) die('skip'); ?> --FILE-- diff --git a/ext/zip/zip_stream.c b/ext/zip/zip_stream.c index a3c37ffd0..c40b834b4 100644 --- a/ext/zip/zip_stream.c +++ b/ext/zip/zip_stream.c @@ -1,4 +1,4 @@ -/* $Id: zip_stream.c 287101 2009-08-11 17:08:23Z pajoye $ */ +/* $Id: zip_stream.c 298626 2010-04-26 23:55:03Z kalle $ */ #ifdef HAVE_CONFIG_H # include "config.h" #endif @@ -120,7 +120,7 @@ php_stream *php_stream_zip_open(char *filename, char *path, char *mode STREAMS_D } if (filename) { - if (OPENBASEDIR_CHECKPATH(filename)) { + if (ZIP_OPENBASEDIR_CHECKPATH(filename)) { return NULL; } @@ -201,7 +201,7 @@ php_stream *php_stream_zip_opener(php_stream_wrapper *wrapper, php_basename(path, path_len - fragment_len, NULL, 0, &file_basename, &file_basename_len TSRMLS_CC); fragment++; - if (OPENBASEDIR_CHECKPATH(file_dirname)) { + if (ZIP_OPENBASEDIR_CHECKPATH(file_dirname)) { efree(file_basename); return NULL; } diff --git a/ext/zlib/config0.m4 b/ext/zlib/config0.m4 index e8f57d830..828d7ccb3 100644 --- a/ext/zlib/config0.m4 +++ b/ext/zlib/config0.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config0.m4 201617 2005-11-29 18:35:26Z tony2001 $ +dnl $Id: config0.m4 296107 2010-03-12 10:28:59Z jani $ dnl PHP_ARG_WITH(zlib,for ZLIB support, diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index adb2f6eab..127220b7a 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_zlib.h 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: php_zlib.h 296107 2010-03-12 10:28:59Z jani $ */ #ifndef PHP_ZLIB_H #define PHP_ZLIB_H diff --git a/ext/zlib/tests/bug51269.phpt b/ext/zlib/tests/bug51269.phpt new file mode 100644 index 000000000..6b97bacf0 --- /dev/null +++ b/ext/zlib/tests/bug51269.phpt @@ -0,0 +1,21 @@ +--TEST-- +Bug #51269 (zlib.output_compression Overwrites Vary Header) +--INI-- +zlib.output_compression=1 +--ENV-- +HTTP_ACCEPT_ENCODING=gzip +--SKIPIF-- +<?php +if (!extension_loaded("zlib")) die("skip zlib required"); +?> +--FILE-- +<?php +header('Vary: Cookie'); +echo 'foo'; +?> +--EXPECTF-- +%s +--EXPECTHEADERS-- +Vary: Cookie +Content-Encoding: gzip +Vary: Accept-Encoding diff --git a/ext/zlib/tests/gzfilegzreadfile.phpt b/ext/zlib/tests/gzfilegzreadfile.phpt index a7c2c096a..433fcab14 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 242949 2007-09-26 15:44:16Z cvs2svn $ */ +<?php /* $Id: gzfilegzreadfile.phpt 296107 2010-03-12 10:28:59Z jani $ */ if (!extension_loaded("zlib")) print "skip"; ?> --FILE-- <?php diff --git a/ext/zlib/tests/zlib_filter_inflate2.phpt b/ext/zlib/tests/zlib_filter_inflate2.phpt index f8e7a8b80..a7ac33eb0 100644 --- a/ext/zlib/tests/zlib_filter_inflate2.phpt +++ b/ext/zlib/tests/zlib_filter_inflate2.phpt @@ -3,7 +3,7 @@ zlib.inflate of gzip-encoded stream --SKIPIF-- <?php if (!extension_loaded("zlib")) print "skip"; ?> --FILE-- -<?php /* $Id: zlib_filter_inflate2.phpt 250201 2008-01-09 06:45:36Z cellog $ */ +<?php /* $Id: zlib_filter_inflate2.phpt 296107 2010-03-12 10:28:59Z jani $ */ $a = gzopen(dirname(__FILE__) . '/test.txt.gz', 'w'); fwrite($a, "This is quite the thing ain't it\n"); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 4d1b30a4f..c127f18ff 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: zlib.c 300764 2010-06-26 16:03:39Z felipe $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -155,25 +155,57 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_ob_gzhandler, 0, 0, 2) ZEND_ARG_INFO(0, str) ZEND_ARG_INFO(0, mode) ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_gzputs, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, str) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_gzpassthru, 0) + ZEND_ARG_INFO(0, fp) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_gzseek, 0, 0, 2) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, offset) + ZEND_ARG_INFO(0, whence) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO(arginfo_gzread, 0) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_gzgetss, 0, 0, 1) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) + ZEND_ARG_INFO(0, allowable_tags) +ZEND_END_ARG_INFO() + +ZEND_BEGIN_ARG_INFO_EX(arginfo_gzgets, 0, 0, 1) + ZEND_ARG_INFO(0, fp) + ZEND_ARG_INFO(0, length) +ZEND_END_ARG_INFO() /* }}} */ /* {{{ php_zlib_functions[] */ static const zend_function_entry php_zlib_functions[] = { PHP_FE(readgzfile, arginfo_readgzfile) - PHP_FALIAS(gzrewind, rewind, NULL) - PHP_FALIAS(gzclose, fclose, NULL) - PHP_FALIAS(gzeof, feof, NULL) - PHP_FALIAS(gzgetc, fgetc, NULL) - PHP_FALIAS(gzgets, fgets, NULL) - PHP_FALIAS(gzgetss, fgetss, NULL) - PHP_FALIAS(gzread, fread, NULL) + PHP_FALIAS(gzrewind, rewind, arginfo_gzpassthru) + PHP_FALIAS(gzclose, fclose, arginfo_gzpassthru) + PHP_FALIAS(gzeof, feof, arginfo_gzpassthru) + PHP_FALIAS(gzgetc, fgetc, arginfo_gzpassthru) + PHP_FALIAS(gzgets, fgets, arginfo_gzgets) + PHP_FALIAS(gzgetss, fgetss, arginfo_gzgetss) + PHP_FALIAS(gzread, fread, arginfo_gzread) PHP_FE(gzopen, arginfo_gzopen) - PHP_FALIAS(gzpassthru, fpassthru, NULL) - PHP_FALIAS(gzseek, fseek, NULL) - PHP_FALIAS(gztell, ftell, NULL) - PHP_FALIAS(gzwrite, fwrite, NULL) - PHP_FALIAS(gzputs, fwrite, NULL) + PHP_FALIAS(gzpassthru, fpassthru, arginfo_gzpassthru) + PHP_FALIAS(gzseek, fseek, arginfo_gzseek) + PHP_FALIAS(gztell, ftell, arginfo_gzpassthru) + PHP_FALIAS(gzwrite, fwrite, arginfo_gzputs) + PHP_FALIAS(gzputs, fwrite, arginfo_gzputs) PHP_FE(gzfile, arginfo_gzfile) PHP_FE(gzcompress, arginfo_gzcompress) PHP_FE(gzuncompress, arginfo_gzuncompress) @@ -1056,7 +1088,7 @@ static void php_gzip_output_handler(char *output, uint output_len, char **handle sapi_add_header_ex(ZEND_STRL("Content-Encoding: deflate"), 1, 1 TSRMLS_CC); break; } - sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 1 TSRMLS_CC); + sapi_add_header_ex(ZEND_STRL("Vary: Accept-Encoding"), 1, 0 TSRMLS_CC); } else { /* Disable compression if headers can not be set (Fix for bug #49816) */ ZLIBG(output_compression) = 0; diff --git a/ext/zlib/zlib_filter.c b/ext/zlib/zlib_filter.c index bda2d9589..56fdc0e12 100644 --- a/ext/zlib/zlib_filter.c +++ b/ext/zlib/zlib_filter.c @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib_filter.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: zlib_filter.c 296107 2010-03-12 10:28:59Z jani $ */ #include "php.h" #include "php_zlib.h" diff --git a/ext/zlib/zlib_fopen_wrapper.c b/ext/zlib/zlib_fopen_wrapper.c index 66ab30e6d..086607636 100644 --- a/ext/zlib/zlib_fopen_wrapper.c +++ b/ext/zlib/zlib_fopen_wrapper.c @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zlib_fopen_wrapper.c 293036 2010-01-03 09:23:27Z sebastian $ */ +/* $Id: zlib_fopen_wrapper.c 296107 2010-03-12 10:28:59Z jani $ */ #define _GNU_SOURCE |